diff options
Diffstat (limited to 'contrib/groff/src/preproc/refer')
-rw-r--r-- | contrib/groff/src/preproc/refer/command.cc | 5 | ||||
-rw-r--r-- | contrib/groff/src/preproc/refer/ref.cc | 8 | ||||
-rw-r--r-- | contrib/groff/src/preproc/refer/refer.cc | 3 | ||||
-rw-r--r-- | contrib/groff/src/preproc/refer/refer.man | 8 | ||||
-rw-r--r-- | contrib/groff/src/preproc/refer/token.cc | 4 |
5 files changed, 17 insertions, 11 deletions
diff --git a/contrib/groff/src/preproc/refer/command.cc b/contrib/groff/src/preproc/refer/command.cc index 004189e..bf88c89d 100644 --- a/contrib/groff/src/preproc/refer/command.cc +++ b/contrib/groff/src/preproc/refer/command.cc @@ -1,5 +1,5 @@ // -*- C++ -*- -/* Copyright (C) 1989, 1990, 1991, 1992 Free Software Foundation, Inc. +/* Copyright (C) 1989, 1990, 1991, 1992, 2001 Free Software Foundation, Inc. Written by James Clark (jjc@jclark.com) This file is part of groff. @@ -755,7 +755,8 @@ static int check_args(const char *types, const char *name, static void execute_command(const char *name, int argc, argument *argv) { - for (int i = 0; i < sizeof(command_table)/sizeof(command_table[0]); i++) + for (unsigned int i = 0; + i < sizeof(command_table)/sizeof(command_table[0]); i++) if (strcmp(name, command_table[i].name) == 0) { if (check_args(command_table[i].arg_types, name, argc, argv)) (*command_table[i].func)(argc, argv); diff --git a/contrib/groff/src/preproc/refer/ref.cc b/contrib/groff/src/preproc/refer/ref.cc index c3517b1..9c04078 100644 --- a/contrib/groff/src/preproc/refer/ref.cc +++ b/contrib/groff/src/preproc/refer/ref.cc @@ -1,5 +1,5 @@ // -*- C++ -*- -/* Copyright (C) 1989, 1990, 1991, 1992 Free Software Foundation, Inc. +/* Copyright (C) 1989, 1990, 1991, 1992, 2001 Free Software Foundation, Inc. Written by James Clark (jjc@jclark.com) This file is part of groff. @@ -327,13 +327,13 @@ void sortify_title(const char *s, int len, string &key) break; } if (ptr < end) { - int first_word_len = ptr - s - 1; + unsigned int first_word_len = ptr - s - 1; const char *ae = articles.contents() + articles.length(); for (const char *a = articles.contents(); a < ae; a = strchr(a, '\0') + 1) if (first_word_len == strlen(a)) { - int j; + unsigned int j; for (j = 0; j < first_word_len; j++) if (a[j] != cmlower(s[j])) break; @@ -951,7 +951,7 @@ static int find_month(const char *start, const char *end) while (ptr < end && csalpha(*ptr)) ptr++; if (ptr - start >= 3) { - for (int i = 0; i < sizeof(months)/sizeof(months[0]); i++) { + for (unsigned int i = 0; i < sizeof(months)/sizeof(months[0]); i++) { const char *q = months[i]; const char *p = start; for (; p < ptr; p++, q++) diff --git a/contrib/groff/src/preproc/refer/refer.cc b/contrib/groff/src/preproc/refer/refer.cc index b6cefc5..c39def7 100644 --- a/contrib/groff/src/preproc/refer/refer.cc +++ b/contrib/groff/src/preproc/refer/refer.cc @@ -25,6 +25,8 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "search.h" #include "command.h" +extern "C" const char *Version_string; + const char PRE_LABEL_MARKER = '\013'; const char POST_LABEL_MARKER = '\014'; const char LABEL_MARKER = '\015'; // label_type is added on @@ -344,7 +346,6 @@ int main(int argc, char **argv) } if (strcmp(opt,"-version")==0) { case 'v': - extern const char *Version_string; printf("GNU refer (groff) version %s\n", Version_string); exit(0); break; diff --git a/contrib/groff/src/preproc/refer/refer.man b/contrib/groff/src/preproc/refer/refer.man index 13708cf..d8468bb 100644 --- a/contrib/groff/src/preproc/refer/refer.man +++ b/contrib/groff/src/preproc/refer/refer.man @@ -1,5 +1,5 @@ -.ig \"-*- nroff -*- -Copyright (C) 1989-2000 Free Software Foundation, Inc. +.ig +Copyright (C) 1989-2000, 2001 Free Software Foundation, Inc. Permission is granted to make and distribute verbatim copies of this manual provided the copyright notice and this permission notice @@ -1300,3 +1300,7 @@ In label expressions, expressions are ignored inside .BI . char expressions. +. +.\" Local Variables: +.\" mode: nroff +.\" End: diff --git a/contrib/groff/src/preproc/refer/token.cc b/contrib/groff/src/preproc/refer/token.cc index 1cf6890..e9fac5d 100644 --- a/contrib/groff/src/preproc/refer/token.cc +++ b/contrib/groff/src/preproc/refer/token.cc @@ -1,5 +1,5 @@ // -*- C++ -*- -/* Copyright (C) 1989, 1990, 1991, 1992 Free Software Foundation, Inc. +/* Copyright (C) 1989, 1990, 1991, 1992, 2001 Free Software Foundation, Inc. Written by James Clark (jjc@jclark.com) This file is part of groff. @@ -181,7 +181,7 @@ const token_info *lookup_token(const char *start, const char *end) for (;;) { if (token_table[n].tok == 0) break; - if (strlen(token_table[n].tok) == end - start + if (strlen(token_table[n].tok) == size_t(end - start) && memcmp(token_table[n].tok, start, end - start) == 0) return &(token_table[n].ti); if (n == 0) |