/* * LIBML library - read, write and manipulate MATLAB MAT-files * Copyright (C) 1994 Michael J. Maurer * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * * Michael Maurer * Durand Bldg - Room 232 * Stanford, CA 94305-4055 * (415) 723-1024 */ /****************************************************************************** libml.h Definitions to support I/O on Matlab format (level 1) data files. See Matlab 3.5 reference guide under LOAD/SAVE for format definition. Or see Matlab 4.0 "External Reference Guide". Michael Maurer, September 1991. ******************************************************************************/ /* $Log$ */ #ifndef LIBML_H #define LIBML_H /* header record for matlab variables */ typedef struct { unsigned long type; /* type */ unsigned long mrows; /* row dimension */ unsigned long ncols; /* column dimension */ unsigned long imagf; /* flag indicating imag part */ unsigned long namlen; /* name length (including NULL) */ } Fmatrix; /* defines for load/save file format */ /* defines for 1000s digit of MOPT: M (machine-type) */ /* the first name gives byte-order and float-format. */ /* the other names are just convenient synonyms. */ #define ML_LIT_IEEE 0 #define ML_MIPS 0 #define ML_MIPSEL 0 #define ML_PC 0 #define ML_INTEL 0 #define ML_BIG_IEEE 1000 #define ML_SUN 1000 #define ML_IEEE 1000 #define ML_MIPSEB 1000 #define ML_APOLLO 1000 #define ML_MAC 1000 #define ML_MOTOROLA 1000 #define ML_LIT_VAXD 2000 #define ML_VAX 2000 #define ML_VAXD 2000 #define ML_LIT_VAXG 3000 #define ML_VAXG 3000 /* defines for 100s digit of MOPT: O (column-major / row-major) */ #define ML_COL 0 #define ML_ROW 100 /* defines for 10s digit of MOPT: P (data-type) */ #define ML_DOUBLE 0 #define ML_FLOAT 10 #define ML_INT 20 #define ML_SHORT 30 #define ML_USHORT 40 #define ML_UCHAR 50 /* defines for 1s digit of MOPT: T (numeric / text) */ #define ML_NUM 0 #define ML_TEXT 1 /* defines for mlborder() */ #define ML_BIGEND 0 #define ML_LITEND 1 #define ML_UNKEND 2 /* a few built-in macros for ML_TYPE: add your own if you wish. */ #ifdef MIPSEL #define ML_TYPE ML_MIPSEL #endif #ifdef MIPSEB #define ML_TYPE ML_MIPSEB #endif #ifdef sun #define ML_TYPE ML_SUN #endif #ifdef vax #define ML_TYPE ML_VAXD #endif #endif /* LIBML_H */