summaryrefslogtreecommitdiffstats
path: root/contrib/groff/src/include
diff options
context:
space:
mode:
authorru <ru@FreeBSD.org>2001-07-10 17:09:00 +0000
committerru <ru@FreeBSD.org>2001-07-10 17:09:00 +0000
commit8d6dea3a5542a987c08a218c28776d3751d6878d (patch)
tree815804646c42fb89b4a8005be0c1f82d27b95463 /contrib/groff/src/include
parent9ea23f4150d8e9a0b84050876c26239addf73c8c (diff)
downloadFreeBSD-src-8d6dea3a5542a987c08a218c28776d3751d6878d.zip
FreeBSD-src-8d6dea3a5542a987c08a218c28776d3751d6878d.tar.gz
Virgin import of FSF groff v1.17.2
Diffstat (limited to 'contrib/groff/src/include')
-rw-r--r--contrib/groff/src/include/getopt.h17
-rw-r--r--contrib/groff/src/include/groff-getopt.h28
-rw-r--r--contrib/groff/src/include/lib.h16
-rw-r--r--contrib/groff/src/include/nonposix.h3
4 files changed, 40 insertions, 24 deletions
diff --git a/contrib/groff/src/include/getopt.h b/contrib/groff/src/include/getopt.h
index b0147e9..c2f0180 100644
--- a/contrib/groff/src/include/getopt.h
+++ b/contrib/groff/src/include/getopt.h
@@ -1,5 +1,5 @@
/* Declarations for getopt.
- Copyright (C) 1989,90,91,92,93,94,96,97,98 Free Software Foundation, Inc.
+ Copyright (C) 1989-1994, 1996-1999, 2001 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -23,6 +23,17 @@
# define _GETOPT_H 1
#endif
+/* If __GNU_LIBRARY__ is not already defined, either we are being used
+ standalone, or this is the first header included in the source file.
+ If we are being used with glibc, we need to include <features.h>, but
+ that does not exist if we are standalone. So: if __GNU_LIBRARY__ is
+ not defined, include <ctype.h>, which will pull in <features.h> for us
+ if it's from glibc. (Why ctype.h? It's guaranteed to exist and it
+ doesn't flood the namespace with stuff the way some other headers do.) */
+#if !defined __GNU_LIBRARY__
+# include <ctype.h>
+#endif
+
#ifdef __cplusplus
extern "C" {
#endif
@@ -82,7 +93,7 @@ extern int optopt;
struct option
{
-# if defined __STDC__ && __STDC__
+# if (defined __STDC__ && __STDC__) || defined __cplusplus
const char *name;
# else
char *name;
@@ -126,7 +137,7 @@ struct option
arguments to the option '\0'. This behavior is specific to the GNU
`getopt'. */
-#if defined __STDC__ && __STDC__
+#if (defined __STDC__ && __STDC__) || defined __cplusplus
# ifdef __GNU_LIBRARY__
/* Many other libraries have conflicting prototypes for getopt, with
differences in the consts, in stdlib.h. To avoid compilation
diff --git a/contrib/groff/src/include/groff-getopt.h b/contrib/groff/src/include/groff-getopt.h
index 1807fc7..a30e197 100644
--- a/contrib/groff/src/include/groff-getopt.h
+++ b/contrib/groff/src/include/groff-getopt.h
@@ -1,5 +1,5 @@
// -*- C++ -*-
-/* Copyright (C) 2000 Free Software Foundation, Inc.
+/* Copyright (C) 2000, 2001 Free Software Foundation, Inc.
Written by Werner Lemberg (wl@gnu.org)
This file is part of groff.
@@ -47,19 +47,19 @@ struct option
#define required_argument 1
#define optional_argument 2
-extern int getopt(int __argc,
- char *const *__argv,
- const char *__shortopts);
-extern int getopt_long(int __argc,
- char *const *__argv,
- const char *__shortopts,
- const struct option *__longopts,
- int *__longind);
-extern int getopt_long_only(int __argc,
- char *const *__argv,
- const char *__shortopts,
- const struct option *__longopts,
- int *__longind);
+extern int getopt(int, // __argc
+ char *const *, // __argv
+ const char *); // __shortopts
+extern int getopt_long(int, // __argc
+ char *const *, // __argv
+ const char *, // __shortopts
+ const struct option *, // __longopts
+ int *); // __longind
+extern int getopt_long_only(int, // __argc
+ char *const *, // __argv
+ const char *, // __shortopts
+ const struct option *, // __longopts
+ int *); // __longind
#ifdef __cplusplus
}
diff --git a/contrib/groff/src/include/lib.h b/contrib/groff/src/include/lib.h
index ad416e0..db5277c 100644
--- a/contrib/groff/src/include/lib.h
+++ b/contrib/groff/src/include/lib.h
@@ -1,5 +1,5 @@
// -*- C++ -*-
-/* Copyright (C) 1989-2000 Free Software Foundation, Inc.
+/* Copyright (C) 1989-2000, 2001 Free Software Foundation, Inc.
Written by James Clark (jjc@jclark.com)
This file is part of groff.
@@ -19,16 +19,18 @@ with groff; see the file COPYING. If not, write to the Free Software
Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
extern "C" {
-#ifndef strerror
+#ifndef HAVE_STRERROR
char *strerror(int);
#endif
const char *i_to_a(int);
const char *if_to_a(int, int);
}
-/* stdio.h on IRIX and OSF/1 include getopt.h */
+/* stdio.h on IRIX, OSF/1, and UWIN includes getopt.h */
-#if !(defined(__sgi) || (defined(__osf__) && defined(__alpha)))
+#if !(defined(__sgi) \
+ || (defined(__osf__) && defined(__alpha)) \
+ || defined(_UWIN))
#include <groff-getopt.h>
#endif
@@ -41,8 +43,8 @@ int is_prime(unsigned);
#include <strings.h>
#endif
-FILE *xtmpfile(char **namep=0, char *postfix=0, int do_unlink=1);
-char *xtmptemplate(char *extension=0);
+FILE *xtmpfile(char **namep = 0, char *postfix = 0, int do_unlink = 1);
+char *xtmptemplate(char *extension = 0);
#ifdef NEED_DECLARATION_POPEN
@@ -56,6 +58,8 @@ extern "C" { int pclose (FILE *); }
#endif /* NEED_DECLARATION_PCLOSE */
+size_t file_name_max(const char *fname);
+
int interpret_lf_args(const char *p);
extern char illegal_char_table[];
diff --git a/contrib/groff/src/include/nonposix.h b/contrib/groff/src/include/nonposix.h
index 5144983..abd7d1e 100644
--- a/contrib/groff/src/include/nonposix.h
+++ b/contrib/groff/src/include/nonposix.h
@@ -27,7 +27,8 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
# define setmode(f,m) _setmode(f,m)
#endif
-#if defined(__MSDOS__) || (defined(_WIN32) && !defined(__CYGWIN32__))
+#if defined(__MSDOS__) \
+ || (defined(_WIN32) && !defined(_UWIN) && !defined(__CYGWIN32__))
/* Binary I/O nuisances. Note: "setmode" is right for DJGPP and
Borland; Windows compilers might need _setmode or some such. */
OpenPOWER on IntegriCloud