aboutsummaryrefslogtreecommitdiff
path: root/contrib/groff/src/preproc/refer
diff options
context:
space:
mode:
authorRuslan Ermilov <ru@FreeBSD.org>2001-07-10 17:09:00 +0000
committerRuslan Ermilov <ru@FreeBSD.org>2001-07-10 17:09:00 +0000
commit5ecb0ad24ff062000e7bae1c5681a97f6d37025c (patch)
tree815804646c42fb89b4a8005be0c1f82d27b95463 /contrib/groff/src/preproc/refer
parentaf2a8ba6c3e16939879224e370aeb54850188579 (diff)
downloadsrc-5ecb0ad24ff062000e7bae1c5681a97f6d37025c.tar.gz
src-5ecb0ad24ff062000e7bae1c5681a97f6d37025c.zip
Virgin import of FSF groff v1.17.2
Notes
Notes: svn path=/vendor/groff/dist/; revision=79543
Diffstat (limited to 'contrib/groff/src/preproc/refer')
-rw-r--r--contrib/groff/src/preproc/refer/command.cc5
-rw-r--r--contrib/groff/src/preproc/refer/ref.cc8
-rw-r--r--contrib/groff/src/preproc/refer/refer.cc3
-rw-r--r--contrib/groff/src/preproc/refer/refer.man8
-rw-r--r--contrib/groff/src/preproc/refer/token.cc4
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 004189eeb03a..bf88c89d2f6b 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 c3517b194598..9c040789a82f 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 b6cefc5859cf..c39def73ce9a 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 13708cf0e568..d8468bb9cd5a 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 1cf6890f24d4..e9fac5df3fa2 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)