Files
jens 1625aa7391 Initial import
git-svn-id: http://moon:8086/svn/software/trunk/libsrc/mlio@1 b431acfa-c32f-4a4a-93f1-934dc6c82436
2014-07-19 07:44:42 +00:00

47 lines
1.3 KiB
C
Executable File

// -----------------------------------------------------------------------------------------
// mlio.h
// Input/output for Matlab matrices
// 26.02.2005, J. Ahrensfeld
//
// -----------------------------------------------------------------------------------------
#ifndef MLIO_H
#define MLIO_H
// -----------------------------------------------------------------------------------------
#define MLIO_READ 1
#define MLIO_WRITE 2
// -----------------------------------------------------------------------------------------
typedef struct _data_hdr_t
{
unsigned num_row, num_col;
unsigned size;
} data_hdr_t;
typedef struct _file_hdr_t
{
unsigned version;
char prec_typename[32];
} file_hdr_t;
typedef struct _mlio_t
{
FILE *pFile;
unsigned io_mode;
file_hdr_t hdr_file;
data_hdr_t hdr_data;
} mlio_t;
// -----------------------------------------------------------------------------------------
int mlio_open(mlio_t *pObj, char *pName, unsigned mode);
int mlio_close(mlio_t *pObj);
int mlio_read(mlio_t *pObj, double *pData);
int mlio_write(mlio_t *pObj, double *pData, unsigned num_rows, unsigned num_cols);
// -----------------------------------------------------------------------------------------
#endif //MLIO_H