2
* getwordx public domain library v.2.0
3
* (c) 1995,1996,1997 <maloff@tts.magadan.su>
6
* $Id: getw.h,v 2.0 2001/01/10 12:12:38 gul Exp $
9
* Revision 2.0 2001/01/10 12:12:38 gul
10
* Binkd is under CVS again
15
#define MAX_ENV_VAR_NAME 256
20
#define GWX_SUBST 1 /* Perform %VAR% substs */
21
#define GWX_HASH 2 /* Process `#' comments */
22
#define GWX_NOESC 4 /* Treat `\' as a regular character */
24
/* Example: fldsep == ":", fldskip == " \t" */
25
#define DEF_FLDSEP " \t\n\r"
26
#define DEF_FLDSKIP " \t\n\r"
29
* Src is a source string, n is a word number (1...), returned string must
30
* be free()'d. Returns 0 if there is no word #n.
32
char *getwordx2 (char *src, int n, int flags, char *fldsep, char *fldskip);
34
#define getwordx(src,n,flags) \
35
getwordx2(src, n, flags, DEF_FLDSEP, DEF_FLDSKIP)
36
#define getword(src,n) getwordx(src, n, GWX_SUBST | GWX_HASH)