diff options
author | wlemb <wlemb> | 2001-12-22 08:28:30 +0000 |
---|---|---|
committer | wlemb <wlemb> | 2001-12-22 08:28:30 +0000 |
commit | d32ee60d7e7aba695a0ee5adee3ee9f28e5d5866 (patch) | |
tree | b80fdfc955745cc1d1d3dd3a8fab8e576c3523d7 /src/preproc/grn/hdb.cc | |
parent | b25c4dc312ee0234534d37a394dd7dfb13e2d7be (diff) | |
download | groff-d32ee60d7e7aba695a0ee5adee3ee9f28e5d5866.tar.gz |
* tmac/doc-common, tmac/doc-syms: Small updates.
* tmac/an-old.tmac (an-p-footer): Set title length in environment 1.
* MANIFEST: New file.
* src/preproc/grn/grn.man: Updated.
* src/preproc/grn/hdb.cc (MAXSTRING_S): New macro.
(DBRead): Use it.
Diffstat (limited to 'src/preproc/grn/hdb.cc')
-rw-r--r-- | src/preproc/grn/hdb.cc | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/preproc/grn/hdb.cc b/src/preproc/grn/hdb.cc index fd5bb48a..53f967c6 100644 --- a/src/preproc/grn/hdb.cc +++ b/src/preproc/grn/hdb.cc @@ -15,6 +15,7 @@ #include "error.h" #define MAXSTRING 128 +#define MAXSTRING_S "127" /* imports from main.cc */ @@ -89,7 +90,7 @@ DBRead(register FILE *file) SUNFILE = FALSE; elist = DBInit(); - (void) fscanf(file, "%s\n", string); + (void) fscanf(file, "%" MAXSTRING_S "s\n", string); if (strcmp(string, "gremlinfile")) { if (strcmp(string, "sungremlinfile")) { error("`%1' is not a gremlin file", gremlinfile); @@ -103,10 +104,10 @@ DBRead(register FILE *file) done = FALSE; while (!done) { - /* if (fscanf(file,"%s\n", string) == EOF) */ + /* if (fscanf(file,"%" MAXSTRING_S "s\n", string) == EOF) */ /* I changed the scanf format because the element */ /* can have two words (e.g. CURVE SPLINE) */ - if (fscanf(file, "\n%[^\n]\n", string) == EOF) { + if (fscanf(file, "\n%" MAXSTRING_S "[^\n]\n", string) == EOF) { error("`%1', error in file format", gremlinfile); return (elist); } |