Subversion Repositories wimsdev

Rev

Rev 3717 | Rev 5476 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 3717 Rev 5456
Line 39... Line 39...
39
char *int2str(int i);
39
char *int2str(int i);
40
void *xmalloc(size_t n);
40
void *xmalloc(size_t n);
41
int msleep(int ms);     /* millisecond sleeper */
41
int msleep(int ms);     /* millisecond sleeper */
42
void _tolinux(char *p);         /* dos/mac to unix/linux translation */
42
void _tolinux(char *p);         /* dos/mac to unix/linux translation */
43
void ovlstrcpy(char *dest, char *src);  /* strcpy of possibly overlapping strings (64 bits problem)*/
43
void ovlstrcpy(char *dest, char *src);  /* strcpy of possibly overlapping strings (64 bits problem)*/
44
void mystrncpy(char *dest, char *src, int lim); /* optimized and secured strncpy */
44
void mystrncpy(char *dest, const char *src, size_t lim);        /* optimized and secured strncpy */
45
        /* find matching parenthesis.
45
        /* find matching parenthesis.
46
         * The entrance point should be after the opening parenthesis.
46
         * The entrance point should be after the opening parenthesis.
47
         * Returns NULL if unmatched. */
47
         * Returns NULL if unmatched. */
48
char *find_matching(char *p, char c);
48
char *find_matching(char *p, char c);
49
char *find_word_start(char *p); /* Strips leading spaces */
49
char *find_word_start(char *p); /* Strips leading spaces */
Line 92... Line 92...
92
void lines2items(char *p);      /* change lines to items */
92
void lines2items(char *p);      /* change lines to items */
93
void lines2words(char *p);      /* change lines to words */
93
void lines2words(char *p);      /* change lines to words */
94
void items2words(char *p);      /* change items to words */
94
void items2words(char *p);      /* change items to words */
95
void items2lines(char *p);      /* change items to lines */
95
void items2lines(char *p);      /* change items to lines */
96
void strip_enclosing_par(char *p);      /* Strip enclosing pairs of parentheses */
96
void strip_enclosing_par(char *p);      /* Strip enclosing pairs of parentheses */
97
        /* strstr but may have embedde deros.
97
        /* strstr but may have embedded zeros.
98
         * Returns memory end if not found.
98
         * Returns memory end if not found.
99
         * Supposes memory ends with 0. */
99
         * Supposes memory ends with 0. */
100
char *memstr(char *s1, char *s2, int len);
100
char *memstr(char *s1, char *s2, int len);
101
        /* Check whether parentheses are balanced in a given string.
101
        /* Check whether parentheses are balanced in a given string.
102
         * Returns 0 if OK. */
102
         * Returns 0 if OK. */
Line 104... Line 104...
104
int check_parentheses(char *p, int style);
104
int check_parentheses(char *p, int style);
105
void nospace(char *p);          /* collapses all space characters in string. */
105
void nospace(char *p);          /* collapses all space characters in string. */
106
void singlespace(char *p);      /* change all spaces into ' ', and collapse multiple occurences */
106
void singlespace(char *p);      /* change all spaces into ' ', and collapse multiple occurences */
107
void deaccent(char *p);         /* fold accented letters to unaccented */
107
void deaccent(char *p);         /* fold accented letters to unaccented */
108
void reaccent(char *p);         /* compose accented letters using symbols */
108
void reaccent(char *p);         /* compose accented letters using symbols */
109
        /* modify a string. Bufferlen must be ast least MAX_LINELEN */
109
        /* modify a string. Bufferlen must be at least MAX_LINELEN */
110
void string_modify(char *start, char *bad_beg, char *bad_end, char *good,...);
110
void string_modify(char *start, char *bad_beg, char *bad_end, char *good,...);
111
long int filelength(char *fn,...);
111
long int filelength(char *fn,...);
112
int catfile(FILE *outf, char *fn,...);
112
int catfile(FILE *outf, char *fn,...);
113
#ifdef libwims
113
#ifdef libwims
114
 char *fnd_position;
114
 char *fnd_position;
Line 197... Line 197...
197
#define myisalnum(x) (myisalpha(x) || myisdigit(x))
197
#define myisalnum(x) (myisalpha(x) || myisdigit(x))
198
#define myisupper(x) (x>='A' && x<='Z')
198
#define myisupper(x) (x>='A' && x<='Z')
199
#define myislower(x) (x>='a' && x<='z')
199
#define myislower(x) (x>='a' && x<='z')
200
#define myislspace(x) (x==' ' || x=='\t')
200
#define myislspace(x) (x==' ' || x=='\t')
201
#define myisspace(x) (x==' ' || x=='\t' || x=='\n' || x=='\r')
201
#define myisspace(x) (x==' ' || x=='\t' || x=='\n' || x=='\r')
-
 
202
 
-
 
203
/* should put parenthesis around x
-
 
204
#define myisdigit(x) ((x)>='0' && x<='9')
-
 
205
#define myisalpha(x) (((x)&~32)>='A' && ((x)&~32)<='Z')
-
 
206
#define myisalnum(x) (myisalpha(x) || myisdigit(x))
-
 
207
#define myisupper(x) ((x)>='A' && (x)<='Z')
-
 
208
#define myislower(x) ((x)>='a' && (x)<='z')
-
 
209
#define myislspace(x) ((x)==' ' || (x)=='\t')
-
 
210
#define myisspace(x) ((x)==' ' || (x)=='\t' || (x)=='\n' || (x)=='\r')
-
 
211
*/
-
 
212
/*ou
-
 
213
inline int myisdigit(char x) { return x>='0' && x<='9'; }
-
 
214
*/