diff options
| author | wiz <wiz@NetBSD.org> | 2004-07-30 14:44:08 +0000 |
|---|---|---|
| committer | wiz <wiz@NetBSD.org> | 2004-07-30 14:44:08 +0000 |
| commit | 48af41221fbe020e8450a03ff592db7e31ecfec4 (patch) | |
| tree | b38c984775ddeca9c50226f71bd29870c4890a22 /gnu/dist/groff/src/include | |
| parent | adda7c4307676809026dc5296e39d4c4543a9ddf (diff) | |
Import groff-1.19.1. Changes since 1.19:
Groff
-----
o The argument of the command line option `-I' is now also passed to troff
and grops, specifying a directory to search for files on the command line,
files named in `so' and `psbb' requests, and files named in \X'ps: file'
and \X'ps: import' escapes.
o If option `-V' is used more than once, the commands will be both printed
on standard error and run.
Troff
-----
o Two new read-only, string-valued registers `.m' and `.M' return the
name of the current drawing and background color, respectively.
o New read-only register `.U' which is set to 1 if in safer mode and set
to 0 if in unsafe mode.
o An input encoding file for latin-5 (a.k.a. ISO 8859-9) has been added.
Example use:
groff -Tdvi -mlatin5 my_file > my_file.dvi
Note that some output devices don't support all glyphs of this encoding.
o If the `return' request is called with an argument, it exits twice,
namely the current macro and the macro one level higher. This is
used to define a wrapper macro for `return' in trace.tmac.
o For completeness, two new requests have been added: `dei1' and `ami1'.
They are equivalent to `dei' and `ami', respectively, but the macros
are executed with compatibility mode off (similar to `de1' and `am1').
o New command line option `-I' to specify a directory for files (both
those on the command line and those named in `psbb' requests). This is
also handled by the groff wrapper program.
o Since version 1.19 you can say `.vs 0'. Older versions emit a warning
and convert this to `.vs \n[.V]'.
This hasn't been documented properly. Note that `.vs 0' isn't saved in a
diversion since it doesn't result in vertical motion.
Pic
___
o Dashed and dotted ellipses have been implemented.
Tbl
---
o New key character `x' to make tbl call a user-defined macro on a table
cell. Patch by Heinz-Jürgen Oertel <hj.oertel@surfeu.de>.
Grohtml
-------
o New option `-j' to emit output splitted into multiple files.
Grops
-----
o New command line option `-I' to specify a directory to search for files
on the command line and files named in \X'ps: import' and \X'ps: file'
escapes. This is also handled by the groff wrapper program.
o The default value for the `broken' keyword in the DESC file is now 0.
Grolj4
------
o A new man page `lj4_font(5)' documents how fonts are accessed with
grolj4.
o The built-in fonts for LJ4 and newer PCL 5 devices have been completely
revised, mainly to access as much glyphs as possible. The provided
metric files should be compatible with recent PCL 5 printers also.
Additionally, font description files have been added for the Arial and
Times New Roman family, the MS symbol, and Wingdings fonts.
Hpftodit
--------
o Completely revised to handle HP TrueType metric files also. See the
hpftodit manual page for more details.
Macro Packages
--------------
o www.tmac: New macro `JOBNAME' to split output into multiple files.
o In mdoc, multiple calls to `.Lb' are now supported in the LIBRARY
section.
Diffstat (limited to 'gnu/dist/groff/src/include')
| -rw-r--r-- | gnu/dist/groff/src/include/Makefile.sub | 4 | ||||
| -rw-r--r-- | gnu/dist/groff/src/include/color.h | 6 | ||||
| -rw-r--r-- | gnu/dist/groff/src/include/config.hin | 29 | ||||
| -rw-r--r-- | gnu/dist/groff/src/include/driver.h | 4 | ||||
| -rw-r--r-- | gnu/dist/groff/src/include/error.h | 7 | ||||
| -rw-r--r-- | gnu/dist/groff/src/include/font.h | 7 | ||||
| -rw-r--r-- | gnu/dist/groff/src/include/lib.h | 47 | ||||
| -rw-r--r-- | gnu/dist/groff/src/include/nonposix.h | 163 | ||||
| -rw-r--r-- | gnu/dist/groff/src/include/posix.h | 4 | ||||
| -rw-r--r-- | gnu/dist/groff/src/include/printer.h | 6 | ||||
| -rw-r--r-- | gnu/dist/groff/src/include/ptable.h | 7 | ||||
| -rw-r--r-- | gnu/dist/groff/src/include/search.h | 10 | ||||
| -rw-r--r-- | gnu/dist/groff/src/include/searchpath.h | 6 | ||||
| -rw-r--r-- | gnu/dist/groff/src/include/symbol.h | 85 | ||||
| -rw-r--r-- | gnu/dist/groff/src/include/unicode.h | 28 |
15 files changed, 311 insertions, 102 deletions
diff --git a/gnu/dist/groff/src/include/Makefile.sub b/gnu/dist/groff/src/include/Makefile.sub index 620d3453931..a0ab6e14e9f 100644 --- a/gnu/dist/groff/src/include/Makefile.sub +++ b/gnu/dist/groff/src/include/Makefile.sub @@ -22,7 +22,9 @@ HDRS=\ refid.h \ search.h \ searchpath.h \ - stringclass.h + stringclass.h \ + symbol.h \ + unicode.h GENHDRS=defs.h all depend: $(GENHDRS) diff --git a/gnu/dist/groff/src/include/color.h b/gnu/dist/groff/src/include/color.h index 65c9cca228e..894beb87bfc 100644 --- a/gnu/dist/groff/src/include/color.h +++ b/gnu/dist/groff/src/include/color.h @@ -1,4 +1,4 @@ -/* $NetBSD: color.h,v 1.1.1.1 2003/06/30 17:52:05 wiz Exp $ */ +/* $NetBSD: color.h,v 1.1.1.2 2004/07/30 14:44:50 wiz Exp $ */ // -*- C++ -*- @@ -26,6 +26,7 @@ with groff; see the file COPYING. If not, write to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include <stddef.h> +#include "symbol.h" enum color_scheme {DEFAULT, CMY, CMYK, RGB, GRAY}; @@ -40,8 +41,9 @@ private: const size_t); public: + symbol nm; enum {MAX_COLOR_VAL = 0xffff}; - color() : scheme(DEFAULT){} + color(symbol s = default_symbol) : scheme(DEFAULT), nm(s) {} color(const color * const); ~color(); void *operator new(size_t); diff --git a/gnu/dist/groff/src/include/config.hin b/gnu/dist/groff/src/include/config.hin index 13a3630d7cf..20b305baf42 100644 --- a/gnu/dist/groff/src/include/config.hin +++ b/gnu/dist/groff/src/include/config.hin @@ -12,6 +12,13 @@ /* Define if you have a C++ <stdint.h>. */ #undef HAVE_CC_STDINT_H +/* Define to 1 if you have the declaration of `sys_siglist', and to 0 if you + don't. */ +#undef HAVE_DECL_SYS_SIGLIST + +/* Define to 1 if you have the <direct.h> header file. */ +#undef HAVE_DIRECT_H + /* Define to 1 if you have the <dirent.h> header file. */ #undef HAVE_DIRENT_H @@ -33,6 +40,9 @@ /* Define to 1 if you have the `isatty' function. */ #undef HAVE_ISATTY +/* Define to 1 if you have the `kill' function. */ +#undef HAVE_KILL + /* Define to 1 if you have the <limits.h> header file. */ #undef HAVE_LIMITS_H @@ -48,6 +58,9 @@ /* Define to 1 if you have a working `mmap' system call. */ #undef HAVE_MMAP +/* Define to 1 if you have the <process.h> header file. */ +#undef HAVE_PROCESS_H + /* Define to 1 if you have the `putenv' function. */ #undef HAVE_PUTENV @@ -93,10 +106,10 @@ /* Define to 1 if you have the <sys/dir.h> header file. */ #undef HAVE_SYS_DIR_H -/* Define if you have sys_errlist in <errno.h> or in <stdio.h>. */ +/* Define if you have sys_errlist in <errno.h>, <stdio.h>, or <stdlib.h>. */ #undef HAVE_SYS_ERRLIST -/* Define if you have sysnerr in <errno.h> or <stdio.h>. */ +/* Define if you have sys_nerr in <errno.h>, <stdio.h>, or <stdio.h>. */ #undef HAVE_SYS_NERR /* Define to 1 if you have the <sys/stat.h> header file. */ @@ -111,6 +124,9 @@ /* Define to 1 if you have the <unistd.h> header file. */ #undef HAVE_UNISTD_H +/* Define to 1 if you have the `vsnprintf' function. */ +#undef HAVE_VSNPRINTF + /* Define if the host's encoding is EBCDIC. */ #undef IS_EBCDIC_HOST @@ -147,6 +163,12 @@ /* Define if your C++ doesn't declare strncasecmp(). */ #undef NEED_DECLARATION_STRNCASECMP +/* Define if your C++ doesn't declare vfprintf(). */ +#undef NEED_DECLARATION_VFPRINTF + +/* Define if your C++ doesn't declare vsnprintf(). */ +#undef NEED_DECLARATION_VSNPRINTF + /* Define to the address where bug reports for this package should be sent. */ #undef PACKAGE_BUGREPORT @@ -174,9 +196,6 @@ /* Define to 1 if you have the ANSI C header files. */ #undef STDC_HEADERS -/* Define to 1 if `sys_siglist' is declared by <signal.h> or <unistd.h>. */ -#undef SYS_SIGLIST_DECLARED - /* Define if your C++ compiler uses a traditional (Reiser) preprocessor. */ #undef TRADITIONAL_CPP diff --git a/gnu/dist/groff/src/include/driver.h b/gnu/dist/groff/src/include/driver.h index 18363ed5d30..ff339d7b5dc 100644 --- a/gnu/dist/groff/src/include/driver.h +++ b/gnu/dist/groff/src/include/driver.h @@ -1,7 +1,7 @@ -/* $NetBSD: driver.h,v 1.1.1.2 2003/06/30 17:52:05 wiz Exp $ */ +/* $NetBSD: driver.h,v 1.1.1.3 2004/07/30 14:44:50 wiz Exp $ */ // -*- C++ -*- -/* Copyright (C) 1989, 1990, 1991, 1992, 2000, 2001 +/* Copyright (C) 1989, 1990, 1991, 1992, 2000, 2001, 2003 Free Software Foundation, Inc. Written by James Clark (jjc@jclark.com) diff --git a/gnu/dist/groff/src/include/error.h b/gnu/dist/groff/src/include/error.h index d9a2d0f7617..e4ef7fad616 100644 --- a/gnu/dist/groff/src/include/error.h +++ b/gnu/dist/groff/src/include/error.h @@ -1,7 +1,8 @@ -/* $NetBSD: error.h,v 1.1.1.2 2003/06/30 17:52:05 wiz Exp $ */ +/* $NetBSD: error.h,v 1.1.1.3 2004/07/30 14:44:50 wiz Exp $ */ // -*- C++ -*- -/* Copyright (C) 1989, 1990, 1991, 1992, 2003 Free Software Foundation, Inc. +/* Copyright (C) 1989, 1990, 1991, 1992, 2003, 2004 + Free Software Foundation, Inc. Written by James Clark (jjc@jclark.com) This file is part of groff. @@ -54,7 +55,7 @@ extern void warning(const char *, const errarg &arg3 = empty_errarg); -extern const char *program_name; +extern "C" const char *program_name; extern int current_lineno; extern const char *current_filename; extern const char *current_source_filename; diff --git a/gnu/dist/groff/src/include/font.h b/gnu/dist/groff/src/include/font.h index 87446a98477..e2a7d6d4593 100644 --- a/gnu/dist/groff/src/include/font.h +++ b/gnu/dist/groff/src/include/font.h @@ -1,7 +1,8 @@ -/* $NetBSD: font.h,v 1.1.1.2 2003/06/30 17:52:05 wiz Exp $ */ +/* $NetBSD: font.h,v 1.1.1.3 2004/07/30 14:44:50 wiz Exp $ */ // -*- C++ -*- -/* Copyright (C) 1989, 1990, 1991, 1992, 2002 Free Software Foundation, Inc. +/* Copyright (C) 1989, 1990, 1991, 1992, 2002, 2004 + Free Software Foundation, Inc. Written by James Clark (jjc@jclark.com) This file is part of groff. @@ -89,7 +90,7 @@ private: unsigned ligatures; font_kern_list **kern_hash_table; int space_width; - short *ch_index; + int *ch_index; int nindices; font_char_metric *ch; int ch_used; diff --git a/gnu/dist/groff/src/include/lib.h b/gnu/dist/groff/src/include/lib.h index e26c99f7999..0e245878960 100644 --- a/gnu/dist/groff/src/include/lib.h +++ b/gnu/dist/groff/src/include/lib.h @@ -1,4 +1,4 @@ -/* $NetBSD: lib.h,v 1.1.1.2 2003/06/30 17:52:05 wiz Exp $ */ +/* $NetBSD: lib.h,v 1.1.1.3 2004/07/30 14:44:51 wiz Exp $ */ // -*- C++ -*- /* Copyright (C) 1989-2000, 2001, 2002, 2003 Free Software Foundation, Inc. @@ -33,14 +33,15 @@ extern "C" { const char *if_to_a(int, int); } -/* stdio.h on IRIX, OSF/1, emx, and UWIN include getopt.h */ +/* stdio.h on IRIX, OSF/1, emx, UWIN, and MinGW include getopt.h */ /* unistd.h on CYGWIN includes getopt.h */ #if !(defined(__sgi) \ || (defined(__osf__) && defined(__alpha)) \ || defined(_UWIN) \ || defined(__EMX__) \ - || defined(__CYGWIN__)) + || defined(__CYGWIN__) \ + || defined(__MINGW32__)) #include <groff-getopt.h> #else #include <getopt.h> @@ -61,13 +62,21 @@ int is_prime(unsigned); #include <strings.h> #endif -/* HP-UX 10.20 doesn't declare snprintf() */ -#if !defined(HAVE_SNPRINTF) || defined(NEED_DECLARATION_SNPRINTF) #include <stdarg.h> -extern "C" { - int snprintf(char *, size_t, const char *, /*args*/ ...); - int vsnprintf(char *, size_t, const char *, va_list); -} + +/* HP-UX 10.20 and LynxOS 4.0.0 don't declare snprintf() */ +#if !defined(HAVE_SNPRINTF) || defined(NEED_DECLARATION_SNPRINTF) +extern "C" { int snprintf(char *, size_t, const char *, /*args*/ ...); } +#endif + +/* LynxOS 4.0.0 has snprintf() but no vsnprintf() */ +#if !defined(HAVE_VSNPRINTF) || defined(NEED_DECLARATION_VSNPRINTF) +extern "C" { int vsnprintf(char *, size_t, const char *, va_list); } +#endif + +/* LynxOS 4.0.0 doesn't declare vfprintf() */ +#ifdef NEED_DECLARATION_VFPRINTF +extern "C" { int vfprintf(FILE *, const char *, va_list); } #endif #ifndef HAVE_MKSTEMP @@ -104,29 +113,21 @@ inline int invalid_input_char(int c) #ifdef HAVE_STRCASECMP #ifdef NEED_DECLARATION_STRCASECMP -extern "C" { - // Ultrix4.3's string.h fails to declare this. - int strcasecmp(const char *, const char *); -} +// Ultrix4.3's string.h fails to declare this. +extern "C" { int strcasecmp(const char *, const char *); } #endif /* NEED_DECLARATION_STRCASECMP */ #else /* not HAVE_STRCASECMP */ -extern "C" { - int strcasecmp(const char *, const char *); -} +extern "C" { int strcasecmp(const char *, const char *); } #endif /* HAVE_STRCASECMP */ #if !defined(_AIX) && !defined(sinix) && !defined(__sinix__) #ifdef HAVE_STRNCASECMP #ifdef NEED_DECLARATION_STRNCASECMP -extern "C" { - // SunOS's string.h fails to declare this. - int strncasecmp(const char *, const char *, int); -} +// SunOS's string.h fails to declare this. +extern "C" { int strncasecmp(const char *, const char *, int); } #endif /* NEED_DECLARATION_STRNCASECMP */ #else /* not HAVE_STRNCASECMP */ -extern "C" { - int strncasecmp(const char *, const char *, size_t); -} +extern "C" { int strncasecmp(const char *, const char *, size_t); } #endif /* HAVE_STRNCASECMP */ #endif /* !_AIX && !sinix && !__sinix__ */ diff --git a/gnu/dist/groff/src/include/nonposix.h b/gnu/dist/groff/src/include/nonposix.h index 5e893fb57ef..97e670e2534 100644 --- a/gnu/dist/groff/src/include/nonposix.h +++ b/gnu/dist/groff/src/include/nonposix.h @@ -1,6 +1,6 @@ -/* $NetBSD: nonposix.h,v 1.1.1.2 2003/06/30 17:52:05 wiz Exp $ */ +/* $NetBSD: nonposix.h,v 1.1.1.3 2004/07/30 14:44:51 wiz Exp $ */ -/* Copyright (C) 2000, 2001, 2002, 2003 Free Software Foundation, Inc. +/* Copyright (C) 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. Written by Eli Zaretskii (eliz@is.elta.co.il) This file is part of groff. @@ -20,7 +20,9 @@ with groff; see the file COPYING. If not, write to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ /* This header file compartmentalize all idiosyncrasies of non-Posix - systems, such as MS-DOS, MS-Windows, etc. */ + systems, such as MS-DOS, MS-Windows, etc. It should be loaded after + the system headers like stdio.h to protect against warnings and error + messages w.r.t. redefining macros. */ #if defined _MSC_VER # ifndef _WIN32 @@ -31,31 +33,47 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #if defined(__MSDOS__) || defined(__EMX__) \ || (defined(_WIN32) && !defined(_UWIN) && !defined(__CYGWIN__)) -/* Binary I/O nuisances. Note: "setmode" is right for DJGPP and - Borland; Windows compilers might need _setmode or some such. */ +/* Binary I/O nuisances. */ # include <fcntl.h> # include <io.h> # ifdef HAVE_UNISTD_H # include <unistd.h> # endif -# ifdef _MSC_VER -# define POPEN_RT "rt" -# define POPEN_WT "wt" -# define popen(c,m) _popen(c,m) -# define pclose(p) _pclose(p) -# define getpid() (1) -# define mkdir(p,m) _mkdir(p) -# define setmode(f,m) _setmode(f,m) -# define WAIT(s,p,m) _cwait(s,p,m) -# define creat(p,m) _creat(p,m) +# ifndef STDIN_FILENO +# define STDIN_FILENO 0 +# define STDOUT_FILENO 1 +# define STDERR_FILENO 2 # endif -# define SET_BINARY(f) do {if (!isatty(f)) setmode(f,O_BINARY);} while(0) -# define FOPEN_RB "rb" -# define FOPEN_WB "wb" -# define FOPEN_RWB "wb+" +# ifdef HAVE_DIRECT_H +# include <direct.h> +# endif +# ifdef HAVE_PROCESS_H +# include <process.h> +# endif +# if defined(_MSC_VER) || defined(__MINGW32__) +# define POPEN_RT "rt" +# define POPEN_WT "wt" +# define popen(c,m) _popen(c,m) +# define pclose(p) _pclose(p) +# define pipe(pfd) _pipe((pfd),0,_O_BINARY|_O_NOINHERIT) +# define mkdir(p,m) _mkdir(p) +# define setmode(f,m) _setmode(f,m) +# define WAIT(s,p,m) _cwait(s,p,m) +# define creat(p,m) _creat(p,m) +# define read(f,b,s) _read(f,b,s) +# define write(f,b,s) _write(f,b,s) +# define dup(f) _dup(f) +# define dup2(f1,f2) _dup2(f1,f2) +# define close(f) _close(f) +# define isatty(f) _isatty(f) +# endif +# define SET_BINARY(f) do {if (!isatty(f)) setmode(f,O_BINARY);} while(0) +# define FOPEN_RB "rb" +# define FOPEN_WB "wb" +# define FOPEN_RWB "wb+" # ifndef O_BINARY # ifdef _O_BINARY -# define O_BINARY (_O_BINARY) +# define O_BINARY (_O_BINARY) # endif # endif @@ -63,96 +81,145 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ systems don't have standard places where it lives, and might not have it installed to begin with. We want to give them some leeway. */ # ifdef __EMX__ -# define getcwd(b,s) _getcwd2(b,s) +# define getcwd(b,s) _getcwd2(b,s) # else -# define BSHELL (system_shell_name()) -# define BSHELL_DASH_C (system_shell_dash_c()) -# define IS_BSHELL(s) (is_system_shell(s)) +# define BSHELL (system_shell_name()) +# define BSHELL_DASH_C (system_shell_dash_c()) +# define IS_BSHELL(s) (is_system_shell(s)) # endif /* The separator for directories in PATH and other environment variables. */ -# define PATH_SEP ";" +# define PATH_SEP ";" +# define PATH_SEP_CHAR ';' /* Characters that separate directories in a path name. */ -# define DIR_SEPS "/\\:" +# define DIR_SEPS "/\\:" /* How to tell if the argument is an absolute file name. */ # define IS_ABSOLUTE(f) \ ((f)[0] == '/' || (f)[0] == '\\' || (f)[0] && (f)[1] == ':') /* The executable extension. */ -# define EXE_EXT ".exe" +# define EXE_EXT ".exe" /* The system null device. */ -# define NULL_DEV "NUL" +# define NULL_DEV "NUL" + +/* The default place to create temporary files. */ +# ifndef P_tmpdir +# ifdef _P_tmpdir +# define P_tmpdir _P_tmpdir +# else +# define P_tmpdir "c:/temp" +# endif +# endif /* Prototypes. */ # ifdef __cplusplus extern "C" { # endif - const char * system_shell_name(void); + char * system_shell_name(void); const char * system_shell_dash_c(void); - int is_system_shell(const char *); + int is_system_shell(const char *); +# ifdef __cplusplus + } +# endif + +#endif + +#if defined(_WIN32) && !defined(_UWIN) && !defined(__CYGWIN__) +/* Win32 implementations which use the Microsoft runtime library + * are prone to hanging when a pipe reader quits with unread data in the pipe. + * `gtroff' avoids this, by invoking `FLUSH_INPUT_PIPE()', defined as ... */ +# define FLUSH_INPUT_PIPE(fd) \ + do if (!isatty(fd)) \ + { \ + char drain[BUFSIZ]; \ + while (read(fd, drain, sizeof(drain)) > 0) \ + ; \ + } while (0) + +/* The Microsoft runtime library also has a broken argument passing mechanism, + * which may result in improper grouping of arguments passed to a child process + * by the `spawn()' family of functions. In `groff', only the `spawnvp()' + * function is affected; we work around this defect, by substituting a + * wrapper function in place of `spawnvp()' calls. */ + +# ifdef __cplusplus + extern "C" { +# endif + int spawnvp_wrapper(int, char *, char **); # ifdef __cplusplus } # endif +# ifndef SPAWN_FUNCTION_WRAPPERS +# undef spawnvp +# define spawnvp spawnvp_wrapper +# undef _spawnvp +# define _spawnvp spawnvp +# endif /* SPAWN_FUNCTION_WRAPPERS */ +#else +/* Other implementations do not suffer from Microsoft runtime bugs, + * but `gtroff' requires a dummy definition for FLUSH_INPUT_PIPE() */ +# define FLUSH_INPUT_PIPE(fd) do {} while(0) #endif /* Defaults, for Posix systems. */ #ifndef SET_BINARY -# define SET_BINARY(f) do {} while(0) +# define SET_BINARY(f) do {} while(0) #endif #ifndef FOPEN_RB -# define FOPEN_RB "r" +# define FOPEN_RB "r" #endif #ifndef FOPEN_WB -# define FOPEN_WB "w" +# define FOPEN_WB "w" #endif #ifndef FOPEN_RWB -# define FOPEN_RWB "w+" +# define FOPEN_RWB "w+" #endif #ifndef POPEN_RT -# define POPEN_RT "r" +# define POPEN_RT "r" #endif #ifndef POPEN_WT -# define POPEN_WT "w" +# define POPEN_WT "w" #endif #ifndef O_BINARY -# define O_BINARY 0 +# define O_BINARY 0 #endif #ifndef BSHELL -# define BSHELL "/bin/sh" +# define BSHELL "/bin/sh" #endif #ifndef BSHELL_DASH_C -# define BSHELL_DASH_C "-c" +# define BSHELL_DASH_C "-c" #endif #ifndef IS_BSHELL -# define IS_BSHELL(s) ((s) && strcmp(s,BSHELL) == 0) +# define IS_BSHELL(s) ((s) && strcmp(s,BSHELL) == 0) #endif #ifndef PATH_SEP -# define PATH_SEP ":" +# define PATH_SEP ":" +# define PATH_SEP_CHAR ':' #endif #ifndef DIR_SEPS -# define DIR_SEPS "/" +# define DIR_SEPS "/" #endif #ifndef IS_ABSOLUTE -# define IS_ABSOLUTE(f) ((f)[0] == '/') +# define IS_ABSOLUTE(f) ((f)[0] == '/') #endif #ifndef EXE_EXT -# define EXE_EXT "" +# define EXE_EXT "" #endif #ifndef NULL_DEV -# define NULL_DEV "/dev/null" +# define NULL_DEV "/dev/null" #endif #ifndef GS_NAME -# define GS_NAME "gs" +# define GS_NAME "gs" #endif #ifndef WAIT -# define WAIT(s,p,m) wait(s) +# define WAIT(s,p,m) wait(s) #endif #ifndef _WAIT_CHILD -# define _WAIT_CHILD 0 +# define _WAIT_CHILD 0 #endif diff --git a/gnu/dist/groff/src/include/posix.h b/gnu/dist/groff/src/include/posix.h index 3b878bbba8c..63a1931e401 100644 --- a/gnu/dist/groff/src/include/posix.h +++ b/gnu/dist/groff/src/include/posix.h @@ -1,7 +1,7 @@ -/* $NetBSD: posix.h,v 1.1.1.2 2003/06/30 17:52:05 wiz Exp $ */ +/* $NetBSD: posix.h,v 1.1.1.3 2004/07/30 14:44:51 wiz Exp $ */ // -*- C++ -*- -/* Copyright (C) 1992, 2000, 2001 Free Software Foundation, Inc. +/* Copyright (C) 1992, 2000, 2001, 2002 Free Software Foundation, Inc. Written by James Clark (jjc@jclark.com) This file is part of groff. diff --git a/gnu/dist/groff/src/include/printer.h b/gnu/dist/groff/src/include/printer.h index eeab0d2f27c..9d85d17cab9 100644 --- a/gnu/dist/groff/src/include/printer.h +++ b/gnu/dist/groff/src/include/printer.h @@ -1,10 +1,10 @@ -/* $NetBSD: printer.h,v 1.1.1.2 2003/06/30 17:52:05 wiz Exp $ */ +/* $NetBSD: printer.h,v 1.1.1.3 2004/07/30 14:44:51 wiz Exp $ */ // -*- C++ -*- // <groff_src_dir>/src/include/printer.h -/* Copyright (C) 1989, 1990, 1991, 1992, 2001, 2002, 2003 +/* Copyright (C) 1989, 1990, 1991, 1992, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. Written by James Clark (jjc@jclark.com) @@ -51,7 +51,7 @@ struct environment { color *fill; }; -struct font; +class font; struct font_pointer_list { font *p; diff --git a/gnu/dist/groff/src/include/ptable.h b/gnu/dist/groff/src/include/ptable.h index 973d17a8cc9..10ba27338bd 100644 --- a/gnu/dist/groff/src/include/ptable.h +++ b/gnu/dist/groff/src/include/ptable.h @@ -1,7 +1,8 @@ -/* $NetBSD: ptable.h,v 1.1.1.2 2003/06/30 17:52:05 wiz Exp $ */ +/* $NetBSD: ptable.h,v 1.1.1.3 2004/07/30 14:44:51 wiz Exp $ */ // -*- C++ -*- -/* Copyright (C) 1989, 1990, 1991, 1992, 2003 Free Software Foundation, Inc. +/* Copyright (C) 1989, 1990, 1991, 1992, 2003, 2004 + Free Software Foundation, Inc. Written by James Clark (jjc@jclark.com) This file is part of groff. @@ -45,7 +46,7 @@ struct PASSOC(T) { \ PASSOC(T)(); \ }; \ \ -struct PTABLE(T); \ +class PTABLE(T); \ \ class PTABLE_ITERATOR(T) { \ PTABLE(T) *p; \ diff --git a/gnu/dist/groff/src/include/search.h b/gnu/dist/groff/src/include/search.h index 37dcbc4fc64..0a0df7d8090 100644 --- a/gnu/dist/groff/src/include/search.h +++ b/gnu/dist/groff/src/include/search.h @@ -1,7 +1,7 @@ -/* $NetBSD: search.h,v 1.1.1.1 2001/04/19 12:50:47 wiz Exp $ */ +/* $NetBSD: search.h,v 1.1.1.2 2004/07/30 14:44:51 wiz Exp $ */ // -*- C++ -*- -/* Copyright (C) 1989, 1990, 1991, 1992 Free Software Foundation, Inc. +/* Copyright (C) 1989, 1990, 1991, 1992, 2004 Free Software Foundation, Inc. Written by James Clark (jjc@jclark.com) This file is part of groff. @@ -20,8 +20,8 @@ You should have received a copy of the GNU General Public License along with groff; see the file COPYING. If not, write to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -struct search_item; -struct search_item_iterator; +class search_item; +class search_item_iterator; class search_list { public: @@ -36,7 +36,7 @@ private: friend class search_list_iterator; }; -struct bmpattern; +class bmpattern; class linear_searcher { const char *ignore_fields; diff --git a/gnu/dist/groff/src/include/searchpath.h b/gnu/dist/groff/src/include/searchpath.h index 27263c45617..c7a7e92cb87 100644 --- a/gnu/dist/groff/src/include/searchpath.h +++ b/gnu/dist/groff/src/include/searchpath.h @@ -1,7 +1,8 @@ -/* $NetBSD: searchpath.h,v 1.1.1.2 2003/06/30 17:52:05 wiz Exp $ */ +/* $NetBSD: searchpath.h,v 1.1.1.3 2004/07/30 14:44:51 wiz Exp $ */ // -*- C++ -*- -/* Copyright (C) 1989, 1990, 1991, 1992, 2000 Free Software Foundation, Inc. +/* Copyright (C) 1989, 1990, 1991, 1992, 2000, 2003 + Free Software Foundation, Inc. Written by James Clark (jjc@jclark.com) This file is part of groff. @@ -29,4 +30,5 @@ public: ~search_path(); void command_line_dir(const char *); FILE *open_file(const char *, char **); + FILE *open_file_cautious(const char *, char ** = 0, const char * = 0); }; diff --git a/gnu/dist/groff/src/include/symbol.h b/gnu/dist/groff/src/include/symbol.h new file mode 100644 index 00000000000..8ab67ede6cd --- /dev/null +++ b/gnu/dist/groff/src/include/symbol.h @@ -0,0 +1,85 @@ +/* $NetBSD: symbol.h,v 1.1.1.1 2004/07/30 14:44:51 wiz Exp $ */ + +// -*- C++ -*- +/* Copyright (C) 1989, 1990, 1991, 1992, 2002, 2004 + Free Software Foundation, Inc. + Written by James Clark (jjc@jclark.com) + +This file is part of groff. + +groff is free software; you can redistribute it and/or modify it under +the terms of the GNU General Public License as published by the Free +Software Foundation; either version 2, or (at your option) any later +version. + +groff is distributed in the hope that it will be useful, but WITHOUT ANY +WARRANTY; without even the implied warranty of MERCHANTABILITY or +FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +for more details. + +You should have received a copy of the GNU General Public License along +with groff; see the file COPYING. If not, write to the Free Software +Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + +#define DONT_STORE 1 +#define MUST_ALREADY_EXIST 2 + +class symbol { + static const char **table; + static int table_used; + static int table_size; + static char *block; + static int block_size; + const char *s; +public: + symbol(const char *p, int how = 0); + symbol(); + unsigned long hash() const; + int operator ==(symbol) const; + int operator !=(symbol) const; + const char *contents() const; + int is_null() const; + int is_empty() const; +}; + + +extern const symbol NULL_SYMBOL; +extern const symbol EMPTY_SYMBOL; + +inline symbol::symbol() : s(0) +{ +} + +inline int symbol::operator==(symbol p) const +{ + return s == p.s; +} + +inline int symbol::operator!=(symbol p) const +{ + return s != p.s; +} + +inline unsigned long symbol::hash() const +{ + return (unsigned long)s; +} + +inline const char *symbol::contents() const +{ + return s; +} + +inline int symbol::is_null() const +{ + return s == 0; +} + +inline int symbol::is_empty() const +{ + return s != 0 && *s == 0; +} + +symbol concat(symbol, symbol); + +extern symbol default_symbol; diff --git a/gnu/dist/groff/src/include/unicode.h b/gnu/dist/groff/src/include/unicode.h new file mode 100644 index 00000000000..f30dcd9dd0a --- /dev/null +++ b/gnu/dist/groff/src/include/unicode.h @@ -0,0 +1,28 @@ +/* $NetBSD: unicode.h,v 1.1.1.1 2004/07/30 14:44:51 wiz Exp $ */ + +// -*- C++ -*- +/* Copyright (C) 2002, 2003 + Free Software Foundation, Inc. + Written by Werner Lemberg <wl@gnu.org> + +This file is part of groff. + +groff is free software; you can redistribute it and/or modify it under +the terms of the GNU General Public License as published by the Free +Software Foundation; either version 2, or (at your option) any later +version. + +groff is distributed in the hope that it will be useful, but WITHOUT ANY +WARRANTY; without even the implied warranty of MERCHANTABILITY or +FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +for more details. + +You should have received a copy of the GNU General Public License along +with groff; see the file COPYING. If not, write to the Free Software +Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + +const char *glyph_name_to_unicode(const char *); +const char *unicode_to_glyph_name(const char *); +const char *decompose_unicode(const char *); + +const char *check_unicode_name(const char *); |
