- Switched to NAPI-3.0 with XML support

- Fixed exeman to write files by default into the first directory in batchpath
- Fixed a bug in nxdict which prevented it from handling attributes
  containing :/ properly
- Removed junk files
- Fixed a bug in hklscan.c which made it dump core
- Added XML support to nxscript.c
- Added support for writing NeXus-XML data files to tasub
This commit is contained in:
koennecke
2005-05-27 11:58:05 +00:00
parent 46492ca9bd
commit 1247dcdb82
27 changed files with 1805 additions and 2977 deletions

69
nxdataset.h Normal file
View File

@ -0,0 +1,69 @@
/*
This is a module which implements the notion of a dataset. Its is
designed for the use with scripting languages.
copyright: GPL
Mark Koennecke, October 2002
*/
#ifndef NXDATASET
#define NXDATASET
#define MAGIC 7776622
typedef struct {
int magic;
int rank;
int type;
int *dim;
char *format;
union {
void *ptr;
float *fPtr;
double *dPtr;
int *iPtr;
short int *sPtr;
char *cPtr;
} u;
}*pNXDS, NXDS;
/*
include NeXus type codes if not already defined
*/
#ifndef NX_FLOAT32
#define NX_FLOAT32 5
#define NX_FLOAT64 6
#define NX_INT8 20
#define NX_UINT8 21
#define NX_INT16 22
#define NX_UINT16 23
#define NX_INT32 24
#define NX_UINT32 25
#define NX_CHAR 4
#define NX_MAXRANK 32
#endif
pNXDS createNXDataset(int rank, int typecode, int dim[]);
pNXDS createTextNXDataset(char *name);
void dropNXDataset(pNXDS dataset);
int getNXDatasetRank(pNXDS dataset);
int getNXDatasetDim(pNXDS dataset, int which);
int getNXDatasetType(pNXDS dataset);
int getNXDatasetLength(pNXDS dataset);
int getNXDatasetByteLength(pNXDS dataset);
double getNXDatasetValue(pNXDS dataset, int pos[]);
double getNXDatasetValueAt(pNXDS dataset, int address);
char *getNXDatasetText(pNXDS dataset);
int putNXDatasetValue(pNXDS dataset, int pos[], double value);
int putNXDatasetValueAt(pNXDS dataset, int address, double value);
#endif