X-Git-Url: http://git.indexdata.com/?p=yaz-moved-to-github.git;a=blobdiff_plain;f=src%2Freadconf.c;h=688a433163194ed19dd98ef3113d15b2b2ca5814;hp=60f748675ce2290a7e0eb75f922c74ac0f57bef3;hb=c2d4d247b3fe28f7c191fbc3644c8e011e1a4fea;hpb=ee6ab2ee3a9ee1a8c65d7272ec7fba1d886f5af0 diff --git a/src/readconf.c b/src/readconf.c index 60f7486..688a433 100644 --- a/src/readconf.c +++ b/src/readconf.c @@ -1,5 +1,5 @@ /* This file is part of the YAZ toolkit. - * Copyright (C) 1995-2008 Index Data + * Copyright (C) 1995-2010 Index Data * See the file LICENSE for details. */ @@ -37,7 +37,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 +90,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