diff options
-rw-r--r-- | ChangeLog | 15 | ||||
-rw-r--r-- | font/devlj4/Makefile.sub | 10 | ||||
-rw-r--r-- | src/include/nonposix.h | 20 | ||||
-rw-r--r-- | src/roff/troff/div.cpp | 3 |
4 files changed, 43 insertions, 5 deletions
@@ -1,3 +1,18 @@ +2004-02-18 Werner LEMBERG <wl@gnu.org> + + * font/devlj4/Makefile.sub (DEVFILES): Updated to contain all + new font and mapping files. + +2004-02-18 Jeff Conrad <jeff_conrad@msn.com> + Keith Marshall <keith.d.marshall@ntlworld.com> + + * src/include/nonposix.h (FLUSH_INPUT_PIPE): New macro to empty + an input pipe. This is needed for the MSVC compiler to make troff's + `-o' option work. + + * src/roff/troff/div.cpp: Include nonposix.h. + (cleanup_and_exit): Call FLUSH_INPUT_PIPE. + 2004-02-17 Werner LEMBERG <wl@gnu.org> * font/devlj4/generate/special.awk: New script. diff --git a/font/devlj4/Makefile.sub b/font/devlj4/Makefile.sub index dd49b637..f764135d 100644 --- a/font/devlj4/Makefile.sub +++ b/font/devlj4/Makefile.sub @@ -2,6 +2,7 @@ DEV=lj4 LJ4RES=600 LJ4PRINT=$(PSPRINT) DEVFILES=DESC \ + AB ABI AI AR \ ALBB ALBR \ AOB AOI AOR \ CB CBI CI CR \ @@ -9,10 +10,17 @@ DEVFILES=DESC \ LGB LGI LGR \ OB OBI OI OR \ TB TBI TI TR \ + TNRB TNRBI TNRI TNRR \ UB UBI UI UR \ UCB UCBI UCI UCR \ CLARENDON CORONET MARIGOLD S \ - generate/Makefile generate/text.map generate/special.map + SYMBOL WINGDINGS \ + generate/Makefile \ + generate/special.map \ + generate/symbol.map \ + generate/text.map \ + generate/wingdings.map \ + generate/special.awk CLEANADD=DESC diff --git a/src/include/nonposix.h b/src/include/nonposix.h index a9e78cc4..a4f05c48 100644 --- a/src/include/nonposix.h +++ b/src/include/nonposix.h @@ -1,4 +1,4 @@ -/* 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. @@ -29,8 +29,7 @@ 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 @@ -57,7 +56,8 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ # 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 read(f,b,s) _read(f,b,s) +# define isatty(f) _isatty(f) # endif # define SET_BINARY(f) do {if (!isatty(f)) setmode(f,O_BINARY);} while(0) # define FOPEN_RB "rb" @@ -120,6 +120,18 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #endif +#if defined(_WIN32) && !defined(__CYGWIN__) +# define FLUSH_INPUT_PIPE(fd) \ + do if (!isatty(fd)) \ + { \ + char drain[BUFSIZ]; \ + while (read(fd, drain, sizeof(drain)) > 0) \ + ; \ + } while (0) +#else +# define FLUSH_INPUT_PIPE(fd) do {} while(0) +#endif + /* Defaults, for Posix systems. */ #ifndef SET_BINARY diff --git a/src/roff/troff/div.cpp b/src/roff/troff/div.cpp index df4df4f5..c94f4eb4 100644 --- a/src/roff/troff/div.cpp +++ b/src/roff/troff/div.cpp @@ -22,6 +22,8 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ // diversions +#include "nonposix.h" + #include "troff.h" #include "dictionary.h" #include "hvunits.h" @@ -542,6 +544,7 @@ void cleanup_and_exit(int exit_code) the_output->trailer(topdiv->get_page_length()); delete the_output; } + FLUSH_INPUT_PIPE(STDIN_FILENO); exit(exit_code); } |