X-Git-Url: http://git.indexdata.com/?p=yaz-moved-to-github.git;a=blobdiff_plain;f=util%2Freadconf.c;h=119b4711f6293bfaf9385dcc00cb0802a11492a7;hp=a890e08187c4256e007c6acd16666662b33bb854;hb=d8effb26c004e99bfd83855511c4ec5a7c7f3c79;hpb=2004bbd9b3bbce5eb8ecc49520255b3d0bf578b9;ds=sidebyside diff --git a/util/readconf.c b/util/readconf.c index a890e08..119b471 100644 --- a/util/readconf.c +++ b/util/readconf.c @@ -4,7 +4,13 @@ * Sebastian Hammer, Adam Dickmeiss * * $Log: readconf.c,v $ - * Revision 1.1 1995-11-01 13:55:06 quinn + * Revision 1.3 1996-05-29 15:48:48 quinn + * Added \n to the isspace rule. + * + * Revision 1.2 1996/05/29 10:05:01 quinn + * Changed space criteria to support 8-bit characters + * + * Revision 1.1 1995/11/01 13:55:06 quinn * Minor adjustments * * Revision 1.2 1995/10/30 13:54:27 quinn @@ -21,6 +27,8 @@ #include +#define l_isspace(c) ((c) == '\t' || (c) == ' ' || (c) == '\n') + int readconf_line(FILE *f, char *line, int len, char *argv[], int num) { char *p; @@ -41,12 +49,12 @@ int readconf_line(FILE *f, char *line, int len, char *argv[], int num) if (*p == '#') /* trailing comment */ break; argv[argc] = p; - while (*p && !isspace(*p)) + while (*p && !l_isspace(*p)) p++; if (*p) { *(p++) = '\0'; - while (*p && isspace(*p)) + while (*p && l_isspace(*p)) p++; } }