00001 #ifndef __SDS_H_
00002 #define __SDS_H_
00003
00009 #ifndef ANSI
00010 #if defined(__STDC__) ||defined(__cplusplus)||defined(_LANGUAGE_C_PLUS_PLUS)
00011 #define ANSI
00012 #endif
00013 #endif
00014
00015 #ifdef ANSI
00016 #define CPROTO(x) x
00017 #else
00018 #define CPROTO(x) ()
00019 #endif
00020
00021 #include <hdf.h>
00022
00023 #include <mfhdf.h>
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033 void SDSdeactivate CPROTO((char *filename));
00034 void SDSreactivate CPROTO((char *filename));
00035
00036
00037
00038
00039
00040 void SDSopen CPROTO((char *filename,char *access));
00041 void SDSclose CPROTO((char *filename));
00042 void SDScloseAll CPROTO((void));
00043 void SDSflush CPROTO((char *filename));
00044 void SDSpurge CPROTO((char *filename));
00045
00046
00047
00048
00049
00050
00051 void SDSseek CPROTO((char *filename,int setnum));
00052 int32 SDSseekName CPROTO((char *filename,char *name));
00053 #define SDSgetLocation(x) SDSgetIndex(x)
00054 int32 SDSgetIndex CPROTO((char *filename));
00055 int32 SDSisCoord CPROTO((char *filename));
00056
00057
00058
00059
00060
00061
00062
00063 void SDSgetFileInfo CPROTO((char *filename,int32 *nsds, int32 *nattrib));
00064 int32 SDSgetDataName CPROTO((char *filename,char *name));
00065 int32 SDSgetNumDatasets CPROTO((char *filename));
00066 long SDSgetDims CPROTO((char *filename,char *dataname,
00067 int32 *rank,int32 *dims));
00068 int32 SDSgetNT CPROTO((char *filename));
00069 void SDSsetNT CPROTO((char *filename,int32 numbertype));
00070 long SDScomputeSize CPROTO((int32 rank,int32 *dims,int32 numbertype));
00071
00072
00073
00074
00075
00076
00077 int SDSreadData CPROTO((char *filename,
00078 int32 rank,int32 *dims,VOIDP data));
00079 int SDSreadChunk CPROTO((char *filename,int32 rank,int32 *dims,
00080 int32 *origin,int32 *stride,VOIDP data));
00081
00082
00083
00084
00085 int32 SDSallocateDataset CPROTO((char *filename,char *dataname,
00086 int32 rank,int32 *dims));
00087 int SDSwriteData CPROTO((char *filename,char *dataname,
00088 int32 rank,int32 *dims,VOIDP data));
00089 int SDSwriteChunk CPROTO((char *filename,
00090 int32 rank,int32 *dims,
00091 int32 *origin,int32 *stride,VOIDP data));
00092
00093
00094 int32 SDSaddAnnotation CPROTO((char *filename,char *annotation));
00095 int32 SDSgetAnnotationSize CPROTO((char *filename));
00096 int32 SDSgetAnnotation CPROTO((char *filename,char *annotation,int32 maxlen));
00097
00098
00099
00100 int32 SDSgetNumAttribs CPROTO((char *filename));
00101 int32 SDSwriteAttrib CPROTO((char *filename,char *attribname,
00102 int32 numbertype,int32 nelements,VOIDP buffer));
00103
00104
00105 int32 SDSreadAttrib CPROTO((char *filename,char *attribname,
00106 int32 nelements,VOIDP buffer));
00107 int32 SDSfindAttribInfo CPROTO((char *filename,char *attribname,
00108 int32 *numbertype, int32 *nelements));
00109 int32 SDSgetAttribInfo CPROTO((char *filename,int32 index,char *attribname,
00110 int32 *numbertype, int32 *nelements));
00111
00112 int32 SDSgetDataStrs CPROTO((char *filename,char *label,char *units,
00113 char *format, char *coordsys, int len));
00114 #endif