summaryrefslogtreecommitdiffstats
path: root/contrib/groff/soelim
diff options
context:
space:
mode:
authorru <ru@FreeBSD.org>2000-12-05 18:49:44 +0000
committerru <ru@FreeBSD.org>2000-12-05 18:49:44 +0000
commita812d8b090bc4edc23150bff257717b24f282e41 (patch)
tree19d4540966cb92612af25d5154efcc062eefb5c5 /contrib/groff/soelim
parent2e2c9047c3a8b5b6fdcdcd4585d5b114f31cd386 (diff)
downloadFreeBSD-src-a812d8b090bc4edc23150bff257717b24f282e41.zip
FreeBSD-src-a812d8b090bc4edc23150bff257717b24f282e41.tar.gz
Virgin import of FSF groff v1.16.1
Diffstat (limited to 'contrib/groff/soelim')
-rw-r--r--contrib/groff/soelim/Makefile.sub2
-rw-r--r--contrib/groff/soelim/soelim.cc19
-rw-r--r--contrib/groff/soelim/soelim.man6
3 files changed, 20 insertions, 7 deletions
diff --git a/contrib/groff/soelim/Makefile.sub b/contrib/groff/soelim/Makefile.sub
index 7c873a6..77007e2 100644
--- a/contrib/groff/soelim/Makefile.sub
+++ b/contrib/groff/soelim/Makefile.sub
@@ -2,5 +2,5 @@ PROG=soelim
MAN1=soelim.n
XLIBS=$(LIBGROFF)
OBJS=soelim.o
-CCSRCS=soelim.cc
+CCSRCS=$(srcdir)/soelim.cc
NAMEPREFIX=$(g)
diff --git a/contrib/groff/soelim/soelim.cc b/contrib/groff/soelim/soelim.cc
index a6f63ae..257fc88 100644
--- a/contrib/groff/soelim/soelim.cc
+++ b/contrib/groff/soelim/soelim.cc
@@ -28,6 +28,7 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "errarg.h"
#include "error.h"
#include "stringclass.h"
+#include "nonposix.h"
static int include_list_length;
static char **include_list;
@@ -43,8 +44,16 @@ static void
include_path_append(char *path)
{
++include_list_length;
- size_t nbytes = include_list_length * sizeof(include_list[0]);
- include_list = (char **)realloc((void *)include_list, nbytes);
+ size_t nbytes = include_list_length * sizeof(char *);
+ if (include_list)
+ include_list = (char **)realloc((void *)include_list, nbytes);
+ else
+ include_list = (char **)malloc(nbytes);
+ if (include_list == NULL)
+ {
+ fprintf(stderr, "%s: out of memory\n", program_name);
+ exit(2);
+ }
include_list[include_list_length - 1] = path;
}
@@ -64,8 +73,8 @@ int main(int argc, char **argv)
switch (opt) {
case 'v':
{
- extern const char *version_string;
- fprintf(stderr, "GNU soelim version %s\n", version_string);
+ extern const char *Version_string;
+ fprintf(stderr, "GNU soelim version %s\n", Version_string);
fflush(stderr);
break;
}
@@ -149,7 +158,7 @@ int do_file(const char *filename)
whole_filename = filename;
whole_filename += '\0';
}
- else if (filename[0] == '/') {
+ else if (IS_ABSOLUTE(filename)) {
whole_filename = filename;
whole_filename += '\0';
errno = 0;
diff --git a/contrib/groff/soelim/soelim.man b/contrib/groff/soelim/soelim.man
index 7026f3e..0d927f7 100644
--- a/contrib/groff/soelim/soelim.man
+++ b/contrib/groff/soelim/soelim.man
@@ -1,5 +1,5 @@
.ig \"-*- nroff -*-
-Copyright (C) 1989-1999 Free Software Foundation, Inc.
+Copyright (C) 1989-2000 Free Software Foundation, Inc.
Permission is granted to make and distribute verbatim copies of
this manual provided the copyright notice and this permission notice
@@ -30,6 +30,10 @@ the original English.
[
.IR files \|.\|.\|.\|
]
+.PP
+It is possible to have whitespace between the
+.B \-I
+command line option and its parameter.
.SH DESCRIPTION
.B @g@soelim
reads
OpenPOWER on IntegriCloud