spBase
Loading...
Searching...
No Matches
spBase.h
Go to the documentation of this file.
1
4#ifndef __SPBASE_H
5#define __SPBASE_H
6
7#include <sp/spDefs.h>
8#include <sp/spMemory.h>
9#include <sp/spString.h>
10
11#ifdef __cplusplus
12extern "C" {
13#endif
14
18 /*----@addtogroup spBaseGroup----*/
19
20typedef void (*spPrintFunc)(const char *message);
21
39
40typedef unsigned long spPaperOrientation;
41#define SP_PAPER_ORIENTATION_HORIZONTAL_MASK (1L<<4)
42#define SP_PAPER_ORIENTATION_REVERSE_MASK (1L<<5)
43#define SP_PAPER_ORIENTATION_UNKNOWN_MASK (1L<<6)
44#define SP_PAPER_ORIENTATION_PORTRAIT (0L)
45#define SP_PAPER_ORIENTATION_LANDSCAPE SP_PAPER_ORIENTATION_HORIZONTAL_MASK
46#define SP_PAPER_ORIENTATION_SEASCAPE (SP_PAPER_ORIENTATION_HORIZONTAL_MASK|SP_PAPER_ORIENTATION_REVERSE_MASK)
47#define SP_PAPER_ORIENTATION_UPSIDE_DOWN SP_PAPER_ORIENTATION_REVERSE_MASK
48#define SP_PAPER_ORIENTATION_UNKNOWN SP_PAPER_ORIENTATION_UNKNOWN_MASK
49
50#define spIsPaperOrientationHorizontal(orient) (((orient) & SP_PAPER_ORIENTATION_HORIZONTAL_MASK) ? SP_TRUE : SP_FALSE)
51
52
53#define SP_PAPER_SIZE_STRING_UNIT_BOTH (1L<<0) /* such as `10 mm x 10 mm' */
54#define SP_PAPER_SIZE_STRING_UNIT_SYMBOL (1L<<1) /* `1 x 1"' instead of `1 x 1 in' */
55#define SP_PAPER_SIZE_STRING_NO_UNIT (1L<<2) /* such as `10 x 10' */
56#define SP_PAPER_SIZE_STRING_NO_SPACE (1L<<3) /* such as `10x10mm' */
57#define SP_PAPER_SIZE_STRING_INCLUDE_SIZE (1L<<6)
58#define SP_PAPER_SIZE_STRING_INCH (1L<<8)
59
60typedef unsigned long spPaperSize;
61#define SP_PAPER_SIZE_NUMBER_MASK 0xf
62#define SP_PAPER_SIZE_MASK 0xfff
63#define SP_PAPER_TYPE_MASK 0xf000
64#define SP_PAPER_SIZE_0_MASK (0L)
65#define SP_PAPER_SIZE_1_MASK (1L)
66#define SP_PAPER_SIZE_2_MASK (2L)
67#define SP_PAPER_SIZE_3_MASK (3L)
68#define SP_PAPER_SIZE_4_MASK (4L)
69#define SP_PAPER_SIZE_5_MASK (5L)
70#define SP_PAPER_SIZE_6_MASK (6L)
71#define SP_PAPER_SIZE_7_MASK (7L)
72#define SP_PAPER_SIZE_8_MASK (8L)
73#define SP_PAPER_SIZE_9_MASK (9L)
74#define SP_PAPER_SIZE_10_MASK (10L)
75#define SP_PAPER_SIZE_2_0_MASK (11L)
76#define SP_PAPER_SIZE_4_0_MASK (12L)
77#define SP_PAPER_SIZE_LETTER_MASK (1L<<4)
78#define SP_PAPER_SIZE_LEGAL_MASK (1L<<5)
79#define SP_PAPER_SIZE_TABLOID_MASK (1L<<6)
80#define SP_PAPER_SIZE_HAGAKI_MASK (1L<<7)
81#define SP_PAPER_SIZE_STATEMENT_MASK (1L<<8)
82#define SP_PAPER_SIZE_QUARTO_MASK (1L<<9)
83#define SP_PAPER_SIZE_FOOLSCAP_MASK (1L<<10)
84#define SP_PAPER_SIZE_EXECUTIVE_MASK (1L<<11)
85#define SP_PAPER_SIZE_POST_MASK (1L<<12)
86#define SP_PAPER_SIZE_CROWN_MASK (1L<<13)
87#define SP_PAPER_SIZE_ROYAL_MASK (1L<<14)
88#define SP_PAPER_SIZE_DEMY_MASK (1L<<15)
89#define SP_PAPER_SIZE_ELEPHANT_MASK (1L<<16)
90#define SP_PAPER_SIZE_PRINCESS_MASK (1L<<17)
91#define SP_PAPER_SIZE_EMPEROR_MASK (1L<<18)
92#define SP_PAPER_SIZE_SMALL_MASK (1L<<19)
93#define SP_PAPER_SIZE_MEDIUM_MASK (1L<<20)
94#define SP_PAPER_SIZE_DOUBLE_MASK (1L<<21)
95#define SP_PAPER_SIZE_LARGE_MASK (1L<<22)
96#define SP_PAPER_SIZE_CUSTOM_MASK (1L<<23)
97#define SP_PAPER_TYPE_A_MASK (1L<<24)
98#define SP_PAPER_TYPE_B_MASK (1L<<25)
99#define SP_PAPER_TYPE_C_MASK (1L<<26)
100#define SP_PAPER_TYPE_JIS_B_MASK (1L<<27)
101#define SP_PAPER_TYPE_ANSI_MASK (1L<<28)
102#define SP_PAPER_TYPE_ARCH_MASK (1L<<29)
103#define SP_PAPER_TYPE_PA_MASK (1L<<30)
104#define SP_PAPER_TYPE_US_MASK (1L<<31)
105
106#define SP_PAPER_SIZE_UNKNOWN 0L
107#define SP_PAPER_SIZE_A0 (SP_PAPER_TYPE_A_MASK | SP_PAPER_SIZE_0_MASK)
108#define SP_PAPER_SIZE_A1 (SP_PAPER_TYPE_A_MASK | SP_PAPER_SIZE_1_MASK)
109#define SP_PAPER_SIZE_A2 (SP_PAPER_TYPE_A_MASK | SP_PAPER_SIZE_2_MASK)
110#define SP_PAPER_SIZE_A3 (SP_PAPER_TYPE_A_MASK | SP_PAPER_SIZE_3_MASK)
111#define SP_PAPER_SIZE_A4 (SP_PAPER_TYPE_A_MASK | SP_PAPER_SIZE_4_MASK)
112#define SP_PAPER_SIZE_A5 (SP_PAPER_TYPE_A_MASK | SP_PAPER_SIZE_5_MASK)
113#define SP_PAPER_SIZE_A6 (SP_PAPER_TYPE_A_MASK | SP_PAPER_SIZE_6_MASK)
114#define SP_PAPER_SIZE_2A0 (SP_PAPER_TYPE_A_MASK | SP_PAPER_SIZE_2_0_MASK)
115#define SP_PAPER_SIZE_4A0 (SP_PAPER_TYPE_A_MASK | SP_PAPER_SIZE_4_0_MASK)
116
117#define SP_PAPER_SIZE_B0 (SP_PAPER_TYPE_B_MASK | SP_PAPER_SIZE_0_MASK)
118#define SP_PAPER_SIZE_B1 (SP_PAPER_TYPE_B_MASK | SP_PAPER_SIZE_1_MASK)
119#define SP_PAPER_SIZE_B2 (SP_PAPER_TYPE_B_MASK | SP_PAPER_SIZE_2_MASK)
120#define SP_PAPER_SIZE_B3 (SP_PAPER_TYPE_B_MASK | SP_PAPER_SIZE_3_MASK)
121#define SP_PAPER_SIZE_B4 (SP_PAPER_TYPE_B_MASK | SP_PAPER_SIZE_4_MASK)
122#define SP_PAPER_SIZE_B5 (SP_PAPER_TYPE_B_MASK | SP_PAPER_SIZE_5_MASK)
123#define SP_PAPER_SIZE_B6 (SP_PAPER_TYPE_B_MASK | SP_PAPER_SIZE_6_MASK)
124
125#define SP_PAPER_SIZE_JIS_B0 (SP_PAPER_TYPE_JIS_B_MASK | SP_PAPER_SIZE_0_MASK)
126#define SP_PAPER_SIZE_JIS_B1 (SP_PAPER_TYPE_JIS_B_MASK | SP_PAPER_SIZE_1_MASK)
127#define SP_PAPER_SIZE_JIS_B2 (SP_PAPER_TYPE_JIS_B_MASK | SP_PAPER_SIZE_2_MASK)
128#define SP_PAPER_SIZE_JIS_B3 (SP_PAPER_TYPE_JIS_B_MASK | SP_PAPER_SIZE_3_MASK)
129#define SP_PAPER_SIZE_JIS_B4 (SP_PAPER_TYPE_JIS_B_MASK | SP_PAPER_SIZE_4_MASK)
130#define SP_PAPER_SIZE_JIS_B5 (SP_PAPER_TYPE_JIS_B_MASK | SP_PAPER_SIZE_5_MASK)
131#define SP_PAPER_SIZE_JIS_B6 (SP_PAPER_TYPE_JIS_B_MASK | SP_PAPER_SIZE_6_MASK)
132
133#define SP_PAPER_SIZE_ANSI_A (SP_PAPER_TYPE_ANSI_MASK | SP_PAPER_SIZE_4_MASK)
134#define SP_PAPER_SIZE_ANSI_B (SP_PAPER_TYPE_ANSI_MASK | SP_PAPER_SIZE_3_MASK)
135#define SP_PAPER_SIZE_ANSI_C (SP_PAPER_TYPE_ANSI_MASK | SP_PAPER_SIZE_2_MASK)
136#define SP_PAPER_SIZE_ANSI_D (SP_PAPER_TYPE_ANSI_MASK | SP_PAPER_SIZE_1_MASK)
137#define SP_PAPER_SIZE_ANSI_E (SP_PAPER_TYPE_ANSI_MASK | SP_PAPER_SIZE_0_MASK)
138
139#define SP_PAPER_SIZE_ARCH_A (SP_PAPER_TYPE_ARCH_MASK | SP_PAPER_SIZE_4_MASK)
140#define SP_PAPER_SIZE_ARCH_B (SP_PAPER_TYPE_ARCH_MASK | SP_PAPER_SIZE_3_MASK)
141#define SP_PAPER_SIZE_ARCH_C (SP_PAPER_TYPE_ARCH_MASK | SP_PAPER_SIZE_2_MASK)
142#define SP_PAPER_SIZE_ARCH_D (SP_PAPER_TYPE_ARCH_MASK | SP_PAPER_SIZE_1_MASK)
143#define SP_PAPER_SIZE_ARCH_E (SP_PAPER_TYPE_ARCH_MASK | SP_PAPER_SIZE_0_MASK)
144#define SP_PAPER_SIZE_ARCH_E1 (SP_PAPER_TYPE_ARCH_MASK | SP_PAPER_SIZE_5_MASK)
145
146#define SP_PAPER_SIZE_PA0 (SP_PAPER_TYPE_PA_MASK | SP_PAPER_SIZE_0_MASK)
147#define SP_PAPER_SIZE_PA1 (SP_PAPER_TYPE_PA_MASK | SP_PAPER_SIZE_1_MASK)
148#define SP_PAPER_SIZE_PA2 (SP_PAPER_TYPE_PA_MASK | SP_PAPER_SIZE_2_MASK)
149#define SP_PAPER_SIZE_PA3 (SP_PAPER_TYPE_PA_MASK | SP_PAPER_SIZE_3_MASK)
150#define SP_PAPER_SIZE_PA4 (SP_PAPER_TYPE_PA_MASK | SP_PAPER_SIZE_4_MASK)
151#define SP_PAPER_SIZE_PA5 (SP_PAPER_TYPE_PA_MASK | SP_PAPER_SIZE_5_MASK)
152#define SP_PAPER_SIZE_PA6 (SP_PAPER_TYPE_PA_MASK | SP_PAPER_SIZE_6_MASK)
153
154#define SP_PAPER_SIZE_LETTER SP_PAPER_SIZE_LETTER_MASK
155#define SP_PAPER_SIZE_GOVERNMENT_LETTER (SP_PAPER_TYPE_US_MASK | SP_PAPER_SIZE_LETTER_MASK)
156#define SP_PAPER_SIZE_LEGAL SP_PAPER_SIZE_LEGAL_MASK
157#define SP_PAPER_SIZE_TABLOID SP_PAPER_SIZE_TABLOID_MASK
158#define SP_PAPER_SIZE_HAGAKI SP_PAPER_SIZE_HAGAKI_MASK
159#define SP_PAPER_SIZE_STATEMENT SP_PAPER_SIZE_STATEMENT_MASK
160#define SP_PAPER_SIZE_QUARTO SP_PAPER_SIZE_QUARTO_MASK
161#define SP_PAPER_SIZE_FOOLSCAP SP_PAPER_SIZE_FOOLSCAP_MASK
162#define SP_PAPER_SIZE_EXECUTIVE SP_PAPER_SIZE_EXECUTIVE_MASK
163#define SP_PAPER_SIZE_CUSTOM SP_PAPER_SIZE_CUSTOM_MASK
164
165#if defined(MACOS)
166#pragma import on
167#endif
168
169extern void spsetstdio(FILE *in, FILE *out, FILE *err);
170extern FILE *spgetstdin(void);
171extern FILE *spgetstdout(void);
172extern FILE *spgetstderr(void);
173extern void spSetPrintFunc(spPrintFunc func);
174extern void spPrint(const char *message, FILE *fp);
175
180extern void spSetWarningFlag(int flag);
182extern void spWarning(const char *format, ...);
184extern void spSetMessageFlag(int flag);
186extern void spMessage(const char *format, ...);
188extern void spError(int status, const char *format, ...);
190extern void spProgError(const char *func_name, const char *format, ...);
192extern void spSetDebugStdout(int flag);
194extern void spSetDebugLevel(int level);
196extern int spGetDebugLevel(void);
198extern void spDebug(int level, const char *func_name, const char *format, ...);
199
206extern void spSleep(int sec);
208extern void spMSleep(int msec);
210extern long spGetProcessId(void);
211
219extern spBool spExecBrowser(const char *base_url, const char *sub_url, spBool local_path);
220
227extern int spStrCaseCmp(const char *s1, const char *s2);
229extern int spStrNCaseCmp(const char *s1, const char *s2, int n);
231extern int spStrWhite(const char *string);
233extern char *spSkipWhite(const char *string);
235extern char *xspStrCat(const char *orig, const char *src);
237extern char *spStrCat(char *dest, int destsize, const char *src);
239extern char *spStrCopy(char *dest, int destsize, const char *src);
241extern char *spGetSuffix(const char *name); /* including dot such as ".wav" */
243extern int spEqSuffix(const char *file1, const char *file2);
245extern spBool spRemoveNSuffix(char *path, char *removed_suffix, int suffixsize);
247extern spBool spRemoveSuffix(char *path, char *removed_suffix);
249extern spBool spReplaceNSuffix(char *path, int pathsize, const char *suffix);
251extern spBool spReplaceSuffix(char *path, const char *suffix);
252
259extern int spConvertToEscapedString(char *escaped, int bufsize, const char *string, const char *charlist);
260/* return: */
267extern int spConvertFromEscapedString(char *string, int bufsize, const char *escaped, const char *charlist);
268
272extern void spStrPToC(const unsigned char *in_p, char *out_c);
273extern void spStrCToP(const char *in_c, unsigned char *out_p);
274extern void spCopyPStr(const unsigned char *source, unsigned char *dest);
275extern void spCatPStr(unsigned char *target, const unsigned char *source);
276extern spBool spGetMacFileInfo(const char *filename, unsigned long *creator, unsigned long *file_type); /* application info if filename == NULL */
277extern spBool spSetMacFileInfo(const char *filename, unsigned long creator, unsigned long file_type);
278
283extern FILE *spOpenFile(const char *path, const char *mode);
285extern int spCloseFile(FILE *stream);
287extern int spSeekFile(FILE *stream, spFileOffset offset, int origin);
288#ifdef SP_SUPPORT_64BIT_INT
290extern int spSeekFile64(FILE *stream, spLong64 offset, int origin);
291#endif
293extern int spSeekFileC64(FILE *stream, char offset_c64[8], int swap_endian, int origin);
295extern void spAddC64(char offset_c64[8], long value, int swap_endian);
297extern spULong spC64ToULong(char value_c64[8], int swap_endian);
299extern void spULongToC64(spULong value, char value_c64[8], int swap_endian);
300#ifdef SP_SUPPORT_64BIT_INT
302extern spLong64 spC64ToLong64(char value_c64[8], int swap_endian);
304extern void spLong64ToC64(spLong64 value, char value_c64[8], int swap_endian);
305#endif
307extern spFileOffset spTellFile(FILE *stream);
309extern spBool spGetFileInfo(const char *path, spBool *dir_flag, spFileOffset *size);
311extern spBool spExists(const char *path);
313extern spBool spIsExist(const char *path);
315extern spBool spIsFile(const char *path);
317extern spBool spIsDir(const char *path);
319extern spBool spCreateDir(const char *path, unsigned short mode);
321extern spBool spCreateDirRecursive(const char *path, unsigned short mode);
323extern spBool spRemoveDir(const char *path);
325extern spBool spRemoveFile(const char *path);
327extern spBool spRenameFile(const char *oldpath, const char *newpath);
328
335extern spBool spAddDirSeparator(char *dir);
337extern spBool spRemoveDirSeparator(char *dir);
339extern spBool spIsExactName(const char *name);
341extern char *xspGetExactName(const char *name);
343extern char *spGetBaseName(const char *name);
345extern char *xspGetBaseName(const char *name);
347extern char *spGetDirName(char *filename);
349extern char *xspGetDirName(const char *filename);
351extern spBool spSetMacReadableEncoding(unsigned int encoding);
353extern char *xspGetReadablePath(const char *real_path);
355extern char *xspGetRealPath(const char *readable_path);
356
358extern char *xspCutPathList(const char *pathlist, int col);
360extern char *xspAppendPathList(const char *pathlist, const char *new_list);
362extern char *xspPrependPathList(const char *pathlist, const char *new_list);
363
370extern const char *spGetCurrentDir(void);
372extern char *xspGetCurrentDir(void);
373extern const char *spGetDefaultDir(void);
375extern const char *spGetHomeDir(void);
377extern char *xspGetHomeDir(void);
379extern const char *spGetTempDir(void);
381extern char *xspGetTempDir(void);
382
384extern spBool spSetApplicationId(const char *id);
386extern const char *spGetCompanyId(void);
388extern const char *spGetApplicationId(void);
390extern const char *spGetVersionId(void);
391extern const char *spGetApplicationLibDir(void);
392extern const char *spGetApplicationDocDir(void);
393
394extern spBool spGetApplicationPath(char *application_path, int path_size, spBool *id_depend,
395 const char *application_id, const char *company_id, spBool create_dir);
396extern spBool spGetVersionApplicationPath(char *version_application_path, int path_size,
397 const char *application_path, const char *version_id, spBool create_dir);
398extern spBool spGetApplicationTempPath(char *application_temp_path, int path_size,
399 const char *application_path, const char *application_id, const char *version_id,
400 spBool id_depend, spBool create_dir);
401
403extern const char *spCreateApplicationDir(spBool *id_depend, spBool *version_depend);
405extern const char *spGetApplicationDir(spBool *version_depend);
407extern char *xspGetApplicationDir(spBool *version_depend);
409extern const char *spGetApplicationTempDir(void);
411extern char *xspGetApplicationTempDir(void);
413extern spBool spSetApplicationTempDir(const char *dir);
415extern char *xspGetDocumentDir(spFileKind file_kind);
416
423extern double spRound(double x);
425extern double spFix(double x);
427extern double spFrac(double x);
429extern double spRem(double x, double y);
431extern long spFactorial(int n);
433extern void spNFtos(char *buf, int bufsize, double x);
435extern void spFtos(char *buf, double x);
437extern long spNextPow2(long n);
438
445extern int spGetBitByte(int samp_bit, spBool *float_flag);
447extern double spGetBitNormalizeFactor(int samp_bit);
449extern long spConvertDoubleToBitWeighted(double *idata, long length, void *odata, int samp_bit, double weight);
451extern long spConvertDoubleToBit(double *idata, long length, void *odata, int samp_bit, double max);
453extern long spConvertDoubleToClippedBitWeighted(double *idata, long length, void *odata, int samp_bit, double weight);
455extern long spConvertDoubleToClippedBit(double *idata, long length, void *odata, int samp_bit, double max);
457extern long spConvertBitToDoubleWeighted(void *idata, long length, double *odata, int samp_bit, double weight);
459extern long spConvertBitToDouble(void *idata, long length, double *odata, int samp_bit, double max);
460
464extern spBool spGetPaperDimensions(spPaperSize paper_size, spPaperOrientation paper_orientation,
465 double *width_mm, double *height_mm);
466extern spBool spGetPaperSizeString(spPaperSize paper_size, unsigned long options, char *buf, int buf_size);
467extern spBool spGetPaperDimensionString(spPaperSize paper_size, unsigned long options, char *buf, int buf_size);
468extern spBool spGetPaperFromDimensions(double width_mm, double height_mm,
469 spPaperSize *paper_size, spPaperOrientation *paper_orientation);
470
471#if defined(MACOS)
472extern spBool spIsAltiVecSupportedMac(void);
473extern spBool spIsAltiVecDoubleSupportedMac(void);
474#endif
475
476#if defined(MACOS) && !defined(MACOSX64)
477extern spBool spFSSpecToExactNameMac(/*FSSpec *fsspec*/void *fsspec, char *filename);
478
479#pragma import off
480#endif
481
482#define spStrCaseEq(s1, s2) ((s1 != NULL) && (s2 != NULL) && (spStrCaseCmp((s1), (s2)) == 0) ? 1 : 0)
483#define spStrNCaseEq(s1, s2, n) ((s1 != NULL) && (s2 != NULL) && (spStrNCaseCmp((s1), (s2), n) == 0) ? 1 : 0)
484#define spStrVCaseEq(s1, s2) ((s1 != NULL) && (s2 != NULL) && (spStrNCaseCmp((s1), (s2), (int)strlen(s2)) == 0) ? 1 : 0)
486#if !defined(SP_DISABLE_ABBREVIATION)
487#ifndef strcaseeq
488#define strcaseeq(s1, s2) spStrCaseEq(s1, s2)
489#endif
490#ifndef strncaseeq
491#define strncaseeq(s1, s2, n) spStrNCaseEq(s1, s2, n)
492#endif
493#ifndef strvcaseeq
494#define strvcaseeq(s1, s2) spStrVCaseEq(s1, s2)
495#endif
496
497#ifndef strwhite
498#define strwhite(string) spStrWhite(string)
499#endif
500
501#ifndef xstrcat
502#define xstrcat(orig, src) xspStrCat(orig, src)
503#endif
504#endif /* !defined(SP_DISABLE_ABBREVIATION) */
505
506 /*----@addtogroup spBaseGroup----*/
507
508#ifdef __cplusplus
509} /* Close scope of 'extern "C"' declaration */
510#endif
511
512#endif /* __SPBASE_H */
void spSleep(int sec)
spFileOffset spTellFile(FILE *stream)
spBool spRemoveFile(const char *path)
char * spGetBaseName(const char *name)
spBool spGetFileInfo(const char *path, spBool *dir_flag, spFileOffset *size)
char * spSkipWhite(const char *string)
void spSetMessageFlag(int flag)
long spNextPow2(long n)
long spConvertBitToDoubleWeighted(void *idata, long length, double *odata, int samp_bit, double weight)
int spStrNCaseCmp(const char *s1, const char *s2, int n)
const char * spGetCompanyId(void)
char * xspGetTempDir(void)
spBool spRemoveDirSeparator(char *dir)
char * spGetDirName(char *filename)
const char * spCreateApplicationDir(spBool *id_depend, spBool *version_depend)
char * xspPrependPathList(const char *pathlist, const char *new_list)
const char * spGetVersionId(void)
void spFtos(char *buf, double x)
double spRem(double x, double y)
char * xspGetRealPath(const char *readable_path)
void spError(int status, const char *format,...)
void spSetDebugLevel(int level)
char * spStrCat(char *dest, int destsize, const char *src)
const char * spGetCurrentDir(void)
void spSetDebugStdout(int flag)
int spConvertFromEscapedString(char *string, int bufsize, const char *escaped, const char *charlist)
char * xspGetReadablePath(const char *real_path)
const char * spGetApplicationTempDir(void)
spBool spAddDirSeparator(char *dir)
spBool spIsExist(const char *path)
void spWarning(const char *format,...)
char * spStrCopy(char *dest, int destsize, const char *src)
void spSetWarningFlag(int flag)
const char * spGetTempDir(void)
spBool spSetApplicationId(const char *id)
long spFactorial(int n)
char * xspGetCurrentDir(void)
spBool spIsDir(const char *path)
spBool spSetApplicationTempDir(const char *dir)
void spMessage(const char *format,...)
long spConvertDoubleToBitWeighted(double *idata, long length, void *odata, int samp_bit, double weight)
double spFrac(double x)
int spSeekFile(FILE *stream, spFileOffset offset, int origin)
int spStrWhite(const char *string)
spBool spRemoveDir(const char *path)
spBool spCreateDirRecursive(const char *path, unsigned short mode)
char * xspGetDirName(const char *filename)
long spGetProcessId(void)
spFileKind
Definition spBase.h:23
char * xspGetApplicationDir(spBool *version_depend)
int spStrCaseCmp(const char *s1, const char *s2)
void spNFtos(char *buf, int bufsize, double x)
spBool spCreateDir(const char *path, unsigned short mode)
char * xspGetBaseName(const char *name)
spBool spExecBrowser(const char *base_url, const char *sub_url, spBool local_path)
int spGetBitByte(int samp_bit, spBool *float_flag)
FILE * spOpenFile(const char *path, const char *mode)
void spProgError(const char *func_name, const char *format,...)
long spConvertBitToDouble(void *idata, long length, double *odata, int samp_bit, double max)
spBool spIsExactName(const char *name)
char * xspCutPathList(const char *pathlist, int col)
int spGetDebugLevel(void)
long spConvertDoubleToClippedBitWeighted(double *idata, long length, void *odata, int samp_bit, double weight)
spBool spExists(const char *path)
spBool spRenameFile(const char *oldpath, const char *newpath)
const char * spGetApplicationDir(spBool *version_depend)
int spSeekFile64(FILE *stream, spLong64 offset, int origin)
const char * spGetApplicationId(void)
double spFix(double x)
char * xspGetApplicationTempDir(void)
double spRound(double x)
char * xspGetDocumentDir(spFileKind file_kind)
long spConvertDoubleToBit(double *idata, long length, void *odata, int samp_bit, double max)
double spGetBitNormalizeFactor(int samp_bit)
long spConvertDoubleToClippedBit(double *idata, long length, void *odata, int samp_bit, double max)
spBool spRemoveNSuffix(char *path, char *removed_suffix, int suffixsize)
char * xspGetHomeDir(void)
const char * spGetHomeDir(void)
int spConvertToEscapedString(char *escaped, int bufsize, const char *string, const char *charlist)
spBool spRemoveSuffix(char *path, char *removed_suffix)
spBool spIsFile(const char *path)
void spMSleep(int msec)
void spDebug(int level, const char *func_name, const char *format,...)
spBool spReplaceNSuffix(char *path, int pathsize, const char *suffix)
char * xspGetExactName(const char *name)
spBool spReplaceSuffix(char *path, const char *suffix)
char * xspStrCat(const char *orig, const char *src)
char * spGetSuffix(const char *name)
int spEqSuffix(const char *file1, const char *file2)
char * xspAppendPathList(const char *pathlist, const char *new_list)
int spCloseFile(FILE *stream)
@ SP_FILE_KIND_MOVIE
Definition spBase.h:33
@ SP_FILE_KIND_SOUND
Definition spBase.h:32
@ SP_FILE_KIND_INCLUDE
Definition spBase.h:28
@ SP_FILE_KIND_DOCUMENT
Definition spBase.h:25
@ SP_FILE_KIND_URI
Definition spBase.h:37
@ SP_FILE_KIND_APPLICATION
Definition spBase.h:34
@ SP_FILE_KIND_PICTURE
Definition spBase.h:29
@ SP_FILE_KIND_SOURCE
Definition spBase.h:26
@ SP_FILE_KIND_LIBRARY
Definition spBase.h:35
@ SP_FILE_KIND_FIGURE
Definition spBase.h:30
@ SP_FILE_KIND_CONFIG
Definition spBase.h:27
@ SP_FILE_KIND_UNKNOWN
Definition spBase.h:24
@ SP_FILE_KIND_MUSIC
Definition spBase.h:31
@ SP_FILE_KIND_ARCHIVE
Definition spBase.h:36
int spBool
Definition spDefs.h:248