diff options
-rw-r--r-- | libidu/idread.c | 4 | ||||
-rw-r--r-- | src/lid.c | 10 |
2 files changed, 7 insertions, 7 deletions
diff --git a/libidu/idread.c b/libidu/idread.c index c725f9f..b327a6a 100644 --- a/libidu/idread.c +++ b/libidu/idread.c @@ -1,5 +1,5 @@ /* idread.c -- functions to read ID database files - Copyright (C) 1995, 1996 Free Software Foundation, Inc. + Copyright (C) 1995, 1996, 1999 Free Software Foundation, Inc. Written by Greg McGary <gkm@gnu.ai.mit.edu> This program is free software; you can redistribute it and/or modify @@ -55,7 +55,7 @@ struct file_link ** maybe_read_id_file (char const *id_file_name, struct idhead *idhp) { obstack_init (&idhp->idh_file_link_obstack); - idhp->idh_FILE = fopen (id_file_name, "r"); + idhp->idh_FILE = fopen (id_file_name, "rb"); if (idhp->idh_FILE == 0) return 0; @@ -555,17 +555,17 @@ report_grep (char const *name, struct file_link **flinkv) while (*flinkv) { int line_number = 0; - FILE *gid_FILE; + FILE *source_FILE; maybe_relative_file_name (file_name, *flinkv++, cw_dlink); - gid_FILE = fopen (file_name, "r"); - if (gid_FILE == 0) + source_FILE = fopen (file_name, "r"); + if (source_FILE == 0) { error (0, errno, "can't open `%s'", file_name); continue; } - while (fgets (line + 1, sizeof (line) - 1, gid_FILE)) + while (fgets (line + 1, sizeof (line) - 1, source_FILE)) { line_number++; if (pattern) @@ -579,7 +579,7 @@ report_grep (char const *name, struct file_link **flinkv) else if (word_match (name, line)) printf ("%s:%d:%s", file_name, line_number, line + 1); } - fclose (gid_FILE); + fclose (source_FILE); } } |