Main Page | Modules | Data Structures | File List | Data Fields | Globals

massspec/util.h

Go to the documentation of this file.
00001 #ifndef _UTIL_H_ 00002 #define _UTIL_H_ 00003 00004 /* Copyright (c) Kyriacos Leptos and the President and Fellows of Harvard University 00005 Release Date: 2004-11-01 00006 Part of the MapQuant suite library "massspec.lib" 00007 */ 00008 00019 extern int integer_temp; 00020 extern float float_temp; 00021 00022 #define _TOGGLE(param) \ 00023 if(param == 1) param = 0; \ 00024 else if(param == 0) param = 1; \ 00025 00026 #define SWAP(a,b) {integer_temp=(a);(a)=(b);(b)=integer_temp;} 00027 #define FLOAT_SWAP(a,b) {float_temp=(a);(a)=(b);(b)=float_temp;} 00028 00029 extern int VERBOSE; 00030 00031 extern const char* SEPARATOR; 00032 extern const char* DOT; 00033 00034 enum {SORT_DESCENDING = -1, SORT_ASCENDING = 1}; 00035 extern int SORT_DIRECTION; 00036 void setSortDirection(int direction); 00037 00038 extern const char* USAGE; 00039 extern const char* HELP; 00040 00041 typedef struct 00042 { 00043 int* pIndices; 00044 int nIndices; 00045 } IndexArray; 00046 00047 #define CONSOLE_WIDTH 120 00048 #define MAX_NO_OF_STRING_NUMBERS 10 00049 00050 int isVowel(char letter); 00051 00052 // Float and Int 00053 00054 int isFloatWithinBounds(float num, float lower, float upper); 00055 int isIntWithinBounds(int num, int lower, int upper); 00056 int cmpInt (const void *p1, const void *p2); 00057 int cmpFloat(const void *p1, const void *p2); 00058 int Float_cmp(const void *p1, const void *p2); 00059 int Int_cmp(const void *p1, const void *p2); 00060 int* Int_new(int d); 00061 char* Int_toString(int number, int width); 00062 char* Int_getName(int number); 00063 00064 int checkbit(int a, int bit); 00065 char* itoa_2(int i); 00066 char* itoa_3(int i, int min); 00067 char* ftoa(char* format, float i); 00068 int round(float n); 00069 void printSeparator(); 00070 void fprintSeparator(FILE* fp); 00071 char* getTimeFlag(); 00072 00073 void File_fwrite(FILE* out, char* szMSARFilename); 00074 void Util_createFolder(char* folder); 00075 char** Util_getFolderContent(char* sourcepath, char* ext, int *nelem); 00076 int Util_countNumberOfFilesInFolder(char* sourcepath, char* ext); 00077 00078 int _isRowAvailable(char* row, int start_index, int stop_index); 00079 00080 int Program_loadProperties(); 00081 int Program_loadPaths(); 00082 void Program_release(); 00083 00084 00085 00086 #endif 00087

Generated on Sun Feb 13 01:05:59 2005 for MapQuant by doxygen 1.3.7