X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=src%2Freadconf.c;h=b293ff61ac133d5ba5db37dcbf3d8937156ecfda;hb=a3e65bcd3250b107397675bc65b35b5939355025;hp=08ed587a0bae94ebf8985523f3e974973dd0edfa;hpb=2788a4851b551e1a3efb320a2878b809f2d8a9d7;p=yaz-moved-to-github.git diff --git a/src/readconf.c b/src/readconf.c index 08ed587..b293ff6 100644 --- a/src/readconf.c +++ b/src/readconf.c @@ -1,5 +1,5 @@ /* This file is part of the YAZ toolkit. - * Copyright (C) 1995-2009 Index Data + * Copyright (C) 1995-2012 Index Data * See the file LICENSE for details. */ @@ -13,7 +13,6 @@ #endif #include -#include #include #include @@ -37,7 +36,7 @@ int readconf_line(FILE *f, int *lineno, char *line, int len, if (!p) return 0; - for (argc = 0; *p ; argc++) + for (argc = 0; *p && argc < num ; argc++) { if (*p == '#') /* trailing comment */ break; @@ -90,6 +89,7 @@ int readconf(char *name, void *rprivate, /* * Local variables: * c-basic-offset: 4 + * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab