projects
/
yaz-moved-to-github.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Version 5.9.0
[yaz-moved-to-github.git]
/
src
/
readconf.c
diff --git
a/src/readconf.c
b/src/readconf.c
index
4d9bd05
..
2c444f5
100644
(file)
--- a/
src/readconf.c
+++ b/
src/readconf.c
@@
-1,5
+1,5
@@
/* This file is part of the YAZ toolkit.
/* This file is part of the YAZ toolkit.
- * Copyright (C) 1995-2011 Index Data
+ * Copyright (C) Index Data
* See the file LICENSE for details.
*/
* See the file LICENSE for details.
*/
@@
-24,7
+24,7
@@
int readconf_line(FILE *f, int *lineno, char *line, int len,
{
char *p;
int argc;
{
char *p;
int argc;
-
+
while ((p = fgets(line, len, f)))
{
(*lineno)++;
while ((p = fgets(line, len, f)))
{
(*lineno)++;
@@
-35,7
+35,7
@@
int readconf_line(FILE *f, int *lineno, char *line, int len,
}
if (!p)
return 0;
}
if (!p)
return 0;
-
+
for (argc = 0; *p && argc < num ; argc++)
{
if (*p == '#') /* trailing comment */
for (argc = 0; *p && argc < num ; argc++)
{
if (*p == '#') /* trailing comment */
@@
-63,7
+63,7
@@
int readconf(char *name, void *rprivate,
char line[512], *m_argv[50];
int m_argc;
int lineno = 0;
char line[512], *m_argv[50];
int m_argc;
int lineno = 0;
-
+
if (!(f = fopen(name, "r")))
{
yaz_log(YLOG_WARN|YLOG_ERRNO, "readconf: %s", name);
if (!(f = fopen(name, "r")))
{
yaz_log(YLOG_WARN|YLOG_ERRNO, "readconf: %s", name);
@@
-72,7
+72,7
@@
int readconf(char *name, void *rprivate,
for (;;)
{
int res;
for (;;)
{
int res;
-
+
if (!(m_argc = readconf_line(f, &lineno, line, 512, m_argv, 50)))
{
fclose(f);
if (!(m_argc = readconf_line(f, &lineno, line, 512, m_argv, 50)))
{
fclose(f);