diff options
author | wlemb <wlemb> | 2000-06-26 13:57:25 +0000 |
---|---|---|
committer | wlemb <wlemb> | 2000-06-26 13:57:25 +0000 |
commit | f18ee87c527997720f5cab83461ff8bd371357d4 (patch) | |
tree | cc2f04c216a4cc7b3e4e5a8679e348cf9311b5ac | |
parent | f1878c21d6af4527105dcc7306da768adb10c749 (diff) | |
download | groff-f18ee87c527997720f5cab83461ff8bd371357d4.tar.gz |
* src/devics/grodvi/dvi.cc: Replace _setmode() (for MSC) with
SET_BINARY().
* src/include/posix.h: Use HAVE_UNISTD instead of _MSC_VER.
* win32-diffs: Updated.
* README.WIN32: Added CRs to make all Windows editors happy.
* src/roff/troff/node.cc: Added WIFSIGNALED() macro (copied from
src/roff/groff/pipeline.c).
-rw-r--r-- | ChangeLog | 13 | ||||
-rw-r--r-- | README.WIN32 | 136 | ||||
-rw-r--r-- | src/devices/grodvi/dvi.cc | 6 | ||||
-rw-r--r-- | src/include/posix.h | 2 | ||||
-rw-r--r-- | src/roff/troff/node.cc | 6 | ||||
-rw-r--r-- | win32-diffs | 4 |
6 files changed, 93 insertions, 74 deletions
@@ -1,3 +1,16 @@ +2000-06-25 Werner LEMBERG <wl@gnu.org> + + * src/devics/grodvi/dvi.cc: Replace _setmode() (for MSC) with + SET_BINARY(). + + * src/include/posix.h: Use HAVE_UNISTD instead of _MSC_VER. + + * win32-diffs: Updated. + * README.WIN32: Added CRs to make all Windows editors happy. + + * src/roff/troff/node.cc: Added WIFSIGNALED() macro (copied from + src/roff/groff/pipeline.c). + 2000-06-23 Eli Zaretskii <eliz@is.elta.co.il> * src/roff/grog/Makefile.sub (grog): Prepend `-e' to diff --git a/README.WIN32 b/README.WIN32 index 3427e488..478d13a1 100644 --- a/README.WIN32 +++ b/README.WIN32 @@ -1,68 +1,68 @@ - -WIN32 port of GROFF and friends done by Blake McBride -(blake@florida-software.com) 4/14/00. - -This port differs from other ports in that it uses the Microsoft -compiler. The changes were done such that they only have effect on -the code when compiled with the Microsoft compiler. - -Note that not all preprocessors and output devices have been ported; -missing are grohtml, grolbp, grn, refer, soelim, and groff. Besides -these programs, no utility program has been ported. Of course, -gxditview (which only runs on the X Window System, the standard Unix -GUI) is missing also. - - -The following programs were used, running on Windows NT 4.0: - - Microsoft Visual C++ 6.0 - Unix utilities under NT (gzip, tar, patch) - - -Build Instructions ------------------- - -. Unpack groff (using gzip & tar) as follows: - - cd \ - gzip -dc groff-1.16.tar.gz | tar xvf - - -. Now apply the patch file `win32-diffs': - - cd \groff-1.16 - patch -p1 < win32-diffs - - Note that with older versions of `patch', you will get a lot of - *.orig files (most of them are empty) which can be safely deleted. - -. Edit the file `src/include/defs.h' and adapt the path names to - your needs. - -. Build everything by typing: - - nmake -f Makefile.msc - -You are done. - -The `bin' directory contains some .cmd files to help show how to run -stuff. Since Windows 95/98 doesn't understand .cmd files, if you are -operating under that OS, you'll have to rename them to .bat files. -.bat files do have output redirection problems. - - -The changes I made fall into two categories. - -1. Makefiles. Several makefiles were added. All makefiles were named - Makefile.msc. - -2. The Groff build includes several scripts which generate auxiliary - files used by groff (such as DESC, I, R, prologue, etc). - - -Directories needed at runtime ------------------------------ - -bin -font -tmac -mm (copied, including sub-directories, from contrib/mm) +
+WIN32 port of GROFF and friends done by Blake McBride
+(blake@florida-software.com) 4/14/00.
+
+This port differs from other ports in that it uses the Microsoft
+compiler. The changes were done such that they only have effect on
+the code when compiled with the Microsoft compiler.
+
+Note that not all preprocessors and output devices have been ported;
+missing are grohtml, grolbp, grn, refer, soelim, and groff. Besides
+these programs, no utility program has been ported. Of course,
+gxditview (which only runs on the X Window System, the standard Unix
+GUI) is missing also.
+
+
+The following programs were used, running on Windows NT 4.0:
+
+ Microsoft Visual C++ 6.0
+ Unix utilities under NT (gzip, tar, patch)
+
+
+Build Instructions
+------------------
+
+. Unpack groff (using gzip & tar) as follows:
+
+ cd \
+ gzip -dc groff-1.16.tar.gz | tar xvf -
+
+. Now apply the patch file `win32-diffs':
+
+ cd \groff-1.16
+ patch -p1 < win32-diffs
+
+ Note that with older versions of `patch', you will get a lot of
+ *.orig files (most of them are empty) which can be safely deleted.
+
+. Edit the file `src/include/defs.h' and adapt the path names to
+ your needs.
+
+. Build everything by typing:
+
+ nmake -f Makefile.msc
+
+You are done.
+
+The `bin' directory contains some .cmd files to help show how to run
+stuff. Since Windows 95/98 doesn't understand .cmd files, if you are
+operating under that OS, you'll have to rename them to .bat files.
+.bat files do have output redirection problems.
+
+
+The changes I made fall into two categories.
+
+1. Makefiles. Several makefiles were added. All makefiles were named
+ Makefile.msc.
+
+2. The Groff build includes several scripts which generate auxiliary
+ files used by groff (such as DESC, I, R, prologue, etc).
+
+
+Directories needed at runtime
+-----------------------------
+
+bin
+font
+tmac
+mm (copied, including sub-directories, from contrib/mm)
diff --git a/src/devices/grodvi/dvi.cc b/src/devices/grodvi/dvi.cc index 04ef9c5a..305470e1 100644 --- a/src/devices/grodvi/dvi.cc +++ b/src/devices/grodvi/dvi.cc @@ -851,9 +851,6 @@ int main(int argc, char **argv) static char stderr_buf[BUFSIZ]; setbuf(stderr, stderr_buf); int c; -#ifdef _MSC_VER - _setmode(_fileno(stdout), _O_BINARY); -#endif while ((c = getopt(argc, argv, "F:vw:d")) != EOF) switch(c) { case 'v': @@ -882,6 +879,9 @@ int main(int argc, char **argv) default: assert(0); } +#ifdef SET_BINARY + SET_BINARY(fileno(stdout)); +#endif if (optind >= argc) do_file("-"); else { diff --git a/src/include/posix.h b/src/include/posix.h index 915fd33f..1b7d5cdc 100644 --- a/src/include/posix.h +++ b/src/include/posix.h @@ -25,7 +25,7 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include <osfcn.h> #else #include <fcntl.h> -#ifndef _MSC_VER +#ifdef HAVE_UNISTD_H #include <unistd.h> #endif #endif diff --git a/src/roff/troff/node.cc b/src/roff/troff/node.cc index e5abff99..d53bf333 100644 --- a/src/roff/troff/node.cc +++ b/src/roff/troff/node.cc @@ -37,14 +37,20 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "nonposix.h" #ifdef _POSIX_VERSION + #include <sys/wait.h> + #else /* not _POSIX_VERSION */ + /* traditional Unix */ + #define WIFEXITED(s) (((s) & 0377) == 0) #define WEXITSTATUS(s) (((s) >> 8) & 0377) #define WTERMSIG(s) ((s) & 0177) #define WIFSTOPPED(s) (((s) & 0377) == 0177) #define WSTOPSIG(s) (((s) >> 8) & 0377) +#define WIFSIGNALED(s) (((s) & 0377) != 0 && (((s) & 0377) != 0177)) + #endif /* not _POSIX_VERSION */ #define STORE_WIDTH 1 diff --git a/win32-diffs b/win32-diffs index 97ff4b0d..26e66005 100644 --- a/win32-diffs +++ b/win32-diffs @@ -2946,8 +2946,8 @@ diff -aruN groff/src/preproc/pic/Makefile.msc groff.win32/src/preproc/pic/Makefi +# by Blake McBride (blake@florida-software.com) + + -+#CFLAGS = -nologo -I../../include -GF -Zi -Yd -+CFLAGS = -nologo -I../../include -GF -Ox ++#CFLAGS = -nologo -I../../include -GF -Zi -Yd -DRET_TYPE_SRAND_IS_VOID ++CFLAGS = -nologo -I../../include -GF -Ox -DRET_TYPE_SRAND_IS_VOID + +.SUFFIXES : .cc + |