Go to the documentation of this file.
33 #include "common/sysdepend.h"
39 #if defined(_MSC_VER) || defined(__MINGW32__) // MSVC or MinGW
40 #ifndef WINDOWS_NATIVE
41 #define WINDOWS_NATIVE
44 #if defined(_MSC_VER) && !defined(S_ISREG)
45 #define S_ISREG(mode) ((mode)&_S_IFREG)
50 #define atoll(a) _atoi64(a)
54 #define HAVE_PWIZ_MZML_LIB 1 // define this to enable use of Spielberg Proteomics Center's pwiz mzML reader
56 #ifdef HAVE_PWIZ_MZML_LIB
57 #define RAMP_HAVE_GZ_INPUT 1 // can read mzxml.gz, mzdata.gz - depends on pwiz lib
60 #ifdef WINDOWS_NATIVE // MSVC or MinGW
62 #include <sys/types.h>
67 #include <netinet/in.h>
71 #ifdef RAMP_HAVE_GZ_INPUT
72 #include "random_access_gzFile.h"
74 #else // no gzip support
75 #ifdef _MSC_VER // use MSFT API for 64 bit file pointers
76 #define RAMP_NONNATIVE_LONGFILE
80 #endif // end else not MSVC
81 #endif // end else no gzip support
84 #ifndef RAMPREAL_FLOAT
95 #ifndef RAMP_STRUCT_DECL_ONLY // useful for pwiz, which only wants to mimic ramp structs
96 #ifdef HAVE_PWIZ_MZML_LIB
109 #ifdef HAVE_PWIZ_MZML_LIB
114 #endif // RAMP_STRUCT_DECL_ONLY
115 #ifdef RAMP_HAVE_GZ_INPUT
116 #define ramp_fgets(buf,len,handle) random_access_gzgets((handle)->fileHandle, buf, len )
117 #define ramp_feof(a) random_access_gzeof((a)->fileHandle)
118 #define ramp_fseek(a,b,c) random_access_gzseek((a)->fileHandle,b,c)
119 #define ramp_fread(buf,len,handle) random_access_gzread((handle)->fileHandle,buf,len)
120 #define ramp_ftell(a) random_access_gztell((a)->fileHandle)
122 #elif defined(RAMP_NONNATIVE_LONGFILE) // use MSFT API for 64 bit file pointers
124 #define ramp_fseek(a,b,c) _lseeki64((a)->fileHandle,b,c)
125 #define ramp_ftell(a) _lseeki64((a)->fileHandle,0,SEEK_CUR)
126 #define ramp_fread(buf,len,handle) read((handle)->fileHandle,buf,len)
127 #ifndef RAMP_STRUCT_DECL_ONLY // useful for pwiz, which only wants to mimic ramp structs
130 #define ramp_feof(handle) eof((handle)->fileHandle)
131 #else // can use fopen for long files
132 #define ramp_fread(buf,len,handle) fread(buf,1,len,(handle)->fileHandle)
133 #define ramp_fgets(buf,len,handle) fgets(buf, len, (handle)->fileHandle)
134 #define ramp_feof(handle) feof((handle)->fileHandle)
137 #define ramp_fseek(a,b,c) fseeko64((a)->fileHandle,b,c)
138 #define ramp_ftell(a) ftello64((a)->fileHandle)
139 #else // a real OS with real file handling
141 #define ramp_fseek(a,b,c) fseeko((a)->fileHandle,b,c)
142 #define ramp_ftell(a) ftello((a)->fileHandle)
152 #define INSTRUMENT_LENGTH 2000
153 #define SCANTYPE_LENGTH 32
154 #define CHARGEARRAY_LENGTH 128
209 #ifndef RAMP_STRUCT_DECL_ONLY // useful for pwiz, which only wants to mimic ramp structs
222 const char *basename);
320 #endif // ifndef RAMP_STRUCT_DECL_ONLY useful for pwiz, which only wants to mimic ramp structs