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 | |
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')
-rw-r--r-- | src/preproc/grn/grn.man | 2 | ||||
-rw-r--r-- | src/preproc/grn/hdb.cc | 7 |
2 files changed, 6 insertions, 3 deletions
diff --git a/src/preproc/grn/grn.man b/src/preproc/grn/grn.man index 82e43cf9..72aab1d3 100644 --- a/src/preproc/grn/grn.man +++ b/src/preproc/grn/grn.man @@ -479,6 +479,8 @@ The stuff on this line really isn't all that important; a value of ``1 0.00 .IP \(bu The rest of the file consists of zero or more element specifications. After the last element specification is a line containing the string ``-1''. +.IP \(bu +Lines longer than 127 characters are chopped to this limit. .SH ELEMENT SPECIFICATIONS .IP \(bu The first line of each element contains a single decimal number giving the 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); } |