From: hank@ducvax.auburn.edu
Newsgroups: comp.lang.postscript
Subject: nenscript 1.13 patches for OS/2 and MSDOS
Date: 9 Oct 92 11:44:13 GMT
Organization: Auburn University, AL

Several weeks ago, mail to "geoffw@extro.ucc.oz.au" worked; today it doesn't.
I noticed at least one other post which says the same thing. This note
is primarily intended for Craig Southeren, but it may be of interest to
users of MSC and nenscript 1.13.


Thanks for the update.  I've only done preliminary testing, but it seems
to work under OS/2 and MSDOS with minor patches.

I see that you've lost your MSDOS machine. There is a typo in machdep.h
and an incorrect def for stricmp; see patches.os2.  I used a stacksize
based on the supplied MSC makefile from 1.12. This makefile will produce
an OS/2 1.x--2.0 version and a separate OS/2 and MSDOS bound version.

The supplied Makefile contains and incorrect line (look for 'main.$(OBJ)').
The 'install' lines are incorrect for GNU install (so I changed these in
my makefile). RM is defined but not used in Makefile.

I intend to upload to ftp-os2.nmsu.edu, as we discussed earlier. 
Thanks again.

--darrel hankerson hank@ducvax.auburn.edu  (shar file follows)


#	This is a shell archive.
#	Remove everything above and including the cut line.
#	Then run the rest of the file through sh.
#----cut here-----cut here-----cut here-----cut here----#
#!/bin/sh
# shar:    Shell Archiver
#	Run the following text with /bin/sh to create:
#	readme.os2
#	makefile.msc
#	patches.os2
# This archive created: Fri Oct 09 06:07:42 1992
cat << \SHAR_EOF > readme.os2
Makefile required minor changes for MSC 6.00A--see makefile.msc. Also, 
see patches.os2 for changes to machdep.h. Stacksize was chosen from
the makefile.msc supplied with nenscript 1.12.

To re-build the executables, 
 1. Apply the patches
      patch < patches.os2
 2. Make
      make -f makefile.msc

Executables:
  nenscript.exe	OS/2 executable
  nenscrib.exe	   OS/2 and MSDOS bound executable

Darrel Hankerson hank@ducvax.auburn.edu
8-Oct-92
SHAR_EOF
cat << \SHAR_EOF > makefile.msc
#
# Makefile for MSC 6.00A using dmake 3.8 under OS/2
# Adapted with minor changes from the supplied Makefile.
# Files:
#  nenscript.exe	OS/2 executable
#  nenscrib.exe   OS/2 and MSDOS bound executable
# Darrel Hankerson hank@ducvax.auburn.edu, 4-Oct-92
#

.IMPORT : HOME

CC = cl
LINK = cl
BIND = bind

OBJ		= .obj

BaseName =  nenscript
PROG		=	$(BaseName).exe
MAN		=	$(BaseName).1
SOURCES		=	main.c postscri.c print.c fontwidt.c font_lis.c paper.c
OBJECTS		=	$(SOURCES:.c=.obj)

INSTALLDIR	=
BININSTALLDIR	=	$(INSTALLDIR)/bin
MANINSTALLDIR	=	$(INSTALLDIR)/etc/man

LOCALINSTALLDIR		=	$(HOME)/bin
LOCALMANINSTALLDIR	=	$(HOME)/man/man1

#
# uncomment macro below for debug version
#
#DEBUG	= -g

#
# US_VERSION selects default US paper format as well as selecting US format date
#
CFLAGS	=	$(DEBUG) #-DUS_VERSION
LFLAGS	=	-Lp /F 5000

DEFS = -DMSDOS -D__STDC__

CHMOD	=	chmod
CP	=	cp
RM	=	rm -f
INSTALL	=	install

all debug:	$(PROG) nenscrib.exe

$(PROG): $(OBJECTS) $(BaseName).def
	$(LINK) $(LFLAGS) -o $@ $<

nenscrib.exe : $(PROG)
	$(BIND) $< /o $@ 

.c.obj :; $(CC) -c $(CFLAGS) $(DEFS) $<

install: $(PROG)
	$(INSTALL)  $(PROG) $(BININSTALLDIR)

install.man: $(MAN)
	$(INSTALL) $(MAN) $(MANINSTALLDIR)

install.local:	$(PROG) $(MAN)
	$(INSTALL) $(PROG) $(LOCALINSTALLDIR)
	$(INSTALL) $(MAN) $(LOCALMANINSTALLDIR)

clean:
	$(RM) *$(OBJ) *.mdt $(PROG) nenscrib.exe

font_lis.c: machdep.h defs.h font_lis.h main.h

fontwidt.c: machdep.h defs.h fontwidt.h main.h

main.c: machdep.h defs.h version.h postscri.h print.h main.h paper.h

paper.c: machdep.h paper.h

postscri.c: machdep.h defs.h paper.h postscri.h fontwidt.h font_lis.h main.h

print.c: machdep.h defs.h print.h postscri.h main.h
SHAR_EOF
cat << \SHAR_EOF > patches.os2
diff -c orig/machdep.h new/machdep.h
*** orig/machdep.h	Thu Oct 01 16:06:22 1992
--- new/machdep.h	Thu Oct 08 21:20:12 1992
***************
*** 14,20 ****
  # include <string.h>
  # include <malloc.h>
  
! # define STRICMP(s1,s2) _stricmp (s1,s2)
  # ifdef _WINDOWS
  #  define	STRDUP(str)	_strdup(str)
  # else
--- 14,20 ----
  # include <string.h>
  # include <malloc.h>
  
! # define STRICMP(s1,s2) stricmp (s1,s2)
  # ifdef _WINDOWS
  #  define	STRDUP(str)	_strdup(str)
  # else
***************
*** 21,27 ****
  #  define	STRDUP(str)	strdup(str)
  # endif
  
! # define USERNAME	getenv("LOGNAME")!=NULL?getenv("LOGNAME"):getenv("USER")!=NULL?getenv("USER"):"Unknown")
  
  # define	GETTIME(tm,str)	strftime(str,15,"%X",tm)
  
--- 21,27 ----
  #  define	STRDUP(str)	strdup(str)
  # endif
  
! # define USERNAME	getenv("LOGNAME")!=NULL?getenv("LOGNAME"):getenv("USER")!=NULL?getenv("USER"):"Unknown"
  
  # define	GETTIME(tm,str)	strftime(str,15,"%X",tm)
  
Only in new: makefile.msc
Only in new: nenscript.def
SHAR_EOF
#	End of shell archive
exit 0