1 |
/* |
/* |
2 |
* Copyright (c) 1998, 1999 Shigio Yamaguchi |
* Copyright (c) 1998, 1999 Shigio Yamaguchi |
3 |
* Copyright (c) 1999, 2000 Tama Communications Corporation |
* Copyright (c) 1999, 2000, 2004 Tama Communications Corporation |
4 |
* |
* |
5 |
* This file is part of GNU GLOBAL. |
* This file is part of GNU GLOBAL. |
6 |
* |
* |
22 |
#ifndef _STRMAKE_H_ |
#ifndef _STRMAKE_H_ |
23 |
#define _STRMAKE_H_ |
#define _STRMAKE_H_ |
24 |
|
|
25 |
|
#include <ctype.h> |
26 |
|
|
27 |
|
#define TRIM_HEAD 1 |
28 |
|
#define TRIM_TAIL 2 |
29 |
|
#define TRIM_BOTH 3 |
30 |
|
#define TRIM_ALL 4 |
31 |
|
|
32 |
|
#ifndef isblank |
33 |
|
#define isblank(c) ((c) == ' ' || (c) == '\t') |
34 |
|
#endif |
35 |
|
|
36 |
|
#define SKIP_BLANKS(p) do { \ |
37 |
|
while (*p && isblank((unsigned char)*p)) \ |
38 |
|
p++; \ |
39 |
|
} while (0) |
40 |
|
|
41 |
char *strmake(const char *, const char *); |
char *strmake(const char *, const char *); |
42 |
|
char *strtrim(const char *, int, int *); |
43 |
|
|
44 |
#endif /* ! _STRMAKE_H_ */ |
#endif /* ! _STRMAKE_H_ */ |