[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: lout on SunOS 4.1.3
From: |
Greg A. Woods |
Subject: |
Re: lout on SunOS 4.1.3 |
Date: |
Tue, 25 Jun 96 11:56:09 -0400 (EDT) |
[ On Tue, June 25, 1996 at 15:22:55 (), address@hidden wrote: ]
> Subject: lout on SunOS 4.1.3
>
> Does anyone have any advice on how successfully to compile lout (3.08)
> on a SunOS 4.1.3 system, where there is apparently no nl_types.h file
> (usually found in /usr/include)? nl_types.h is included by lout's
> `externs' file.
3.08? Did I miss something?
In 3.07 the include of <nl_types.h> is protected by LOCALE_ON, which is
defined only if you set USELOC to 1 in the makefile. It is not set by
default.
To build 3.07 I used the native compiler with the "unproto" tool by
Wietse Venema <address@hidden>. I'm not sure where you can find
it, though either an Archie query, or email to Wietse may help.
The following changes were necessary for a clean compile and install:
(actually the last change to data/standard.ld is to support a package I
had been working on, and isn't really necessary to build a working
binary! ;-)
Index: makefile
===================================================================
RCS file: /local/src-CVS/misc/lout/makefile,v
retrieving revision 1.1.1.3
diff -c -r1.1.1.3 makefile
*** makefile 1996/04/17 16:03:53 1.1.1.3
--- makefile 1996/05/28 21:28:54
***************
*** 203,249 ****
USESTAT = 1
! BINDIR = /u12/staff/jeff/bin
! LIBDIR = /u12/staff/jeff/lout.lib
! DOCDIR = /u12/staff/jeff/lout.doc
! MANDIR = /u12/staff/jeff/lout.man
CHARIN = 1
! CHAROUT = 0
USELOC = 0
LOC_FR = fr
LOC_DE = de
! CC = gcc
!
! COPTS = -ansi -pedantic -Wall
! CFLAGS = -DOS_UNIX=$(OSUNIX) \
! -DOS_DOS=$(OSDOS) \
! -DOS_MAC=$(OSMAC) \
! -DUSE_STAT=$(USESTAT) \
! -DFONT_DIR=\"$(LIBDIR)/font\" \
! -DMAPS_DIR=\"$(LIBDIR)/maps\" \
! -DINCL_DIR=\"$(LIBDIR)/include\" \
! -DDATA_DIR=\"$(LIBDIR)/data\" \
! -DHYPH_DIR=\"$(LIBDIR)/hyph\" \
! -DLOCALE_DIR=\"$(LIBDIR)/locale\" \
! -DCHAR_IN=$(CHARIN) \
! -DCHAR_OUT=$(CHAROUT) \
! -DLOCALE_ON=$(USELOC) \
! -DDEBUG_ON=0 \
! -DASSERT_ON=1 $(COPTS)
!
! OBJS = z01.o z02.o z03.o z04.o z05.o z06.o z07.o z08.o \
! z09.o z10.o z11.o z12.o z13.o z14.o z15.o z16.o \
! z17.o z18.o z19.o z20.o z21.o z22.o z23.o z24.o \
! z25.o z26.o z27.o z28.o z29.o z30.o z31.o z32.o \
! z33.o z34.o z35.o z36.o z37.o z38.o z39.o z40.o \
! z41.o z42.o z43.o z44.o z45.o z46.o
lout: $(OBJS)
! $(CC) -o lout $(OBJS) -lm
chmod a+x lout
$(OBJS): externs
--- 203,264 ----
USESTAT = 1
! prefix = /local
!
! BINDIR = $(prefix)/bin
! LIBDIR = $(prefix)/lib/lout
! DOCDIR = $(prefix)/lib/loutdoc
! MANDIR = $(prefix)/share/man/man1
CHARIN = 1
! CHAROUT = 1
USELOC = 0
LOC_FR = fr
LOC_DE = de
! CC = /usr/5bin/cc
! SDB =#-g
! OPTIM = -O
! DEBUG = 0
! ASSERT = 1
!
! LDLIBS = -lm
!
! COPTS = $(SDB) $(OPTIM) -Qpath /local/lib/unproto -I/local/include/unproto
! LOPTS = $(SDB) $(OPTIM)
!
! CFLAGS = \
! $(COPTS) \
! -DOS_UNIX=$(OSUNIX) \
! -DOS_DOS=$(OSDOS) \
! -DOS_MAC=$(OSMAC) \
! -DUSE_STAT=$(USESTAT) \
! -DFONT_DIR=\"$(LIBDIR)/font\" \
! -DMAPS_DIR=\"$(LIBDIR)/maps\" \
! -DINCL_DIR=\"$(LIBDIR)/include\" \
! -DDATA_DIR=\"$(LIBDIR)/data\" \
! -DHYPH_DIR=\"$(LIBDIR)/hyph\" \
! -DLOCALE_DIR=\"$(LIBDIR)/locale\" \
! -DCHAR_IN=$(CHARIN) \
! -DCHAR_OUT=$(CHAROUT) \
! -DLOCALE_ON=$(USELOC) \
! -DDEBUG_ON=$(DEBUG) \
! -DASSERT_ON=$(ASSERT)
!
! LDFLAGS = $(LOPTS)
!
! OBJS = \
! z01.o z02.o z03.o z04.o z05.o z06.o z07.o z08.o \
! z09.o z10.o z11.o z12.o z13.o z14.o z15.o z16.o \
! z17.o z18.o z19.o z20.o z21.o z22.o z23.o z24.o \
! z25.o z26.o z27.o z28.o z29.o z30.o z31.o z32.o \
! z33.o z34.o z35.o z36.o z37.o z38.o z39.o z40.o \
! z41.o z42.o z43.o z44.o z45.o z46.o
lout: $(OBJS)
! $(CC) $(LDFLAGS) -o lout $(OBJS) $(LDLIBS)
chmod a+x lout
$(OBJS): externs
***************
*** 263,297 ****
chmod 755 $(BINDIR)/c2lout
@echo ""
@echo "(b) Installing library files into LIBDIR $(LIBDIR)"
! mkdir $(LIBDIR)
chmod 755 $(LIBDIR)
@echo ""
! mkdir $(LIBDIR)/include
chmod 755 $(LIBDIR)/include
! cp include/* $(LIBDIR)/include
chmod 644 $(LIBDIR)/include/*
@echo ""
! mkdir $(LIBDIR)/data
chmod 755 $(LIBDIR)/data
! cp data/* $(LIBDIR)/data
chmod 644 $(LIBDIR)/data/*
@echo ""
! mkdir $(LIBDIR)/hyph
chmod 755 $(LIBDIR)/hyph
! cp hyph/* $(LIBDIR)/hyph
chmod 644 $(LIBDIR)/hyph/*
@echo ""
! mkdir $(LIBDIR)/font
chmod 755 $(LIBDIR)/font
! cp font/* $(LIBDIR)/font
chmod 644 $(LIBDIR)/font/*
@echo ""
! mkdir $(LIBDIR)/maps
chmod 755 $(LIBDIR)/maps
! cp maps/* $(LIBDIR)/maps
chmod 644 $(LIBDIR)/maps/*
@echo ""
! mkdir $(LIBDIR)/locale
chmod 755 $(LIBDIR)/locale
@echo ""
@echo "(c) Initializing run (should be silent, no errors expected)"
--- 278,312 ----
chmod 755 $(BINDIR)/c2lout
@echo ""
@echo "(b) Installing library files into LIBDIR $(LIBDIR)"
! -mkdir $(LIBDIR)
chmod 755 $(LIBDIR)
@echo ""
! -mkdir $(LIBDIR)/include
chmod 755 $(LIBDIR)/include
! cp `ls -d include/* | sed -e '/CVS/d' -e '/SCCS/d' -e '/RCS/d'`
$(LIBDIR)/include
chmod 644 $(LIBDIR)/include/*
@echo ""
! -mkdir $(LIBDIR)/data
chmod 755 $(LIBDIR)/data
! cp `ls -d data/* | sed -e '/CVS/d' -e '/SCCS/d' -e '/RCS/d'`
$(LIBDIR)/data
chmod 644 $(LIBDIR)/data/*
@echo ""
! -mkdir $(LIBDIR)/hyph
chmod 755 $(LIBDIR)/hyph
! cp `ls -d hyph/* | sed -e '/CVS/d' -e '/SCCS/d' -e '/RCS/d'`
$(LIBDIR)/hyph
chmod 644 $(LIBDIR)/hyph/*
@echo ""
! -mkdir $(LIBDIR)/font
chmod 755 $(LIBDIR)/font
! cp `ls -d font/* | sed -e '/CVS/d' -e '/SCCS/d' -e '/RCS/d'`
$(LIBDIR)/font
chmod 644 $(LIBDIR)/font/*
@echo ""
! -mkdir $(LIBDIR)/maps
chmod 755 $(LIBDIR)/maps
! cp `ls -d maps/* | sed -e '/CVS/d' -e '/SCCS/d' -e '/RCS/d'`
$(LIBDIR)/maps
chmod 644 $(LIBDIR)/maps/*
@echo ""
! -mkdir $(LIBDIR)/locale
chmod 755 $(LIBDIR)/locale
@echo ""
@echo "(c) Initializing run (should be silent, no errors expected)"
***************
*** 314,320 ****
installdoc:
@echo ""
@echo "Creating DOCDIR $(DOCDIR) and copying documentation into it"
! cp -r doc $(DOCDIR)
chmod 755 $(DOCDIR)
chmod 755 $(DOCDIR)/*
chmod 644 $(DOCDIR)/*/*
--- 329,335 ----
installdoc:
@echo ""
@echo "Creating DOCDIR $(DOCDIR) and copying documentation into it"
! find doc -depth -print | sed -e '/CVS/d' -e '/SCCS/d' -e '/RCS/d' |
cpio -pdm $(DOCDIR)
chmod 755 $(DOCDIR)
chmod 755 $(DOCDIR)/*
chmod 644 $(DOCDIR)/*/*
***************
*** 322,330 ****
installfr:
@echo ""
@echo "Installing French error messages into $(LIBDIR)/locale/$(LOC_FR)"
! mkdir $(LIBDIR)/locale/$(LOC_FR)
chmod 755 $(LIBDIR)/locale/$(LOC_FR)
! mkdir $(LIBDIR)/locale/$(LOC_FR)/LC_MESSAGES
chmod 755 $(LIBDIR)/locale/$(LOC_FR)/LC_MESSAGES
cp locale/msgs.fr $(LIBDIR)/locale/$(LOC_FR)/LC_MESSAGES/msgs.$(LOC_FR)
gencat $(LIBDIR)/locale/$(LOC_FR)/LC_MESSAGES/errors.$(LOC_FR) \
--- 337,345 ----
installfr:
@echo ""
@echo "Installing French error messages into $(LIBDIR)/locale/$(LOC_FR)"
! -mkdir $(LIBDIR)/locale/$(LOC_FR)
chmod 755 $(LIBDIR)/locale/$(LOC_FR)
! -mkdir $(LIBDIR)/locale/$(LOC_FR)/LC_MESSAGES
chmod 755 $(LIBDIR)/locale/$(LOC_FR)/LC_MESSAGES
cp locale/msgs.fr $(LIBDIR)/locale/$(LOC_FR)/LC_MESSAGES/msgs.$(LOC_FR)
gencat $(LIBDIR)/locale/$(LOC_FR)/LC_MESSAGES/errors.$(LOC_FR) \
***************
*** 334,342 ****
installde:
@echo ""
@echo "Installing German error messages into $(LIBDIR)/locale/$(LOC_DE)"
! mkdir $(LIBDIR)/locale/$(LOC_DE)
chmod 755 $(LIBDIR)/locale/$(LOC_DE)
! mkdir $(LIBDIR)/locale/$(LOC_DE)/LC_MESSAGES
chmod 755 $(LIBDIR)/locale/$(LOC_DE)/LC_MESSAGES
cp locale/msgs.de $(LIBDIR)/locale/$(LOC_DE)/LC_MESSAGES/msgs.$(LOC_DE)
gencat $(LIBDIR)/locale/$(LOC_DE)/LC_MESSAGES/errors.$(LOC_DE) \
--- 349,357 ----
installde:
@echo ""
@echo "Installing German error messages into $(LIBDIR)/locale/$(LOC_DE)"
! -mkdir $(LIBDIR)/locale/$(LOC_DE)
chmod 755 $(LIBDIR)/locale/$(LOC_DE)
! -mkdir $(LIBDIR)/locale/$(LOC_DE)/LC_MESSAGES
chmod 755 $(LIBDIR)/locale/$(LOC_DE)/LC_MESSAGES
cp locale/msgs.de $(LIBDIR)/locale/$(LOC_DE)/LC_MESSAGES/msgs.$(LOC_DE)
gencat $(LIBDIR)/locale/$(LOC_DE)/LC_MESSAGES/errors.$(LOC_DE) \
Index: z03.c
===================================================================
RCS file: /local/src-CVS/misc/lout/z03.c,v
retrieving revision 1.1.1.3
diff -c -r1.1.1.3 z03.c
*** z03.c 1996/04/17 16:03:44 1.1.1.3
--- z03.c 1996/05/28 20:24:13
***************
*** 569,575 ****
static FILE *SearchPath(FULL_CHAR *str, OBJECT fpath, BOOLEAN check_ld,
BOOLEAN check_lt, OBJECT *full_name, FILE_POS *xfpos, char *read_mode)
{ FULL_CHAR buff[MAX_BUFF], buff2[MAX_BUFF];
! OBJECT link, y, path; FILE *fp, *fp2;
debug4(DFS, DD, "SearchPath(%s, %s, %s, %s, -)", str, EchoObject(fpath),
bool(check_ld), bool(check_lt));
--- 569,575 ----
static FILE *SearchPath(FULL_CHAR *str, OBJECT fpath, BOOLEAN check_ld,
BOOLEAN check_lt, OBJECT *full_name, FILE_POS *xfpos, char *read_mode)
{ FULL_CHAR buff[MAX_BUFF], buff2[MAX_BUFF];
! OBJECT link, y, npath; FILE *fp, *fp2;
debug4(DFS, DD, "SearchPath(%s, %s, %s, %s, -)", str, EchoObject(fpath),
bool(check_ld), bool(check_lt));
***************
*** 582,592 ****
}
/* use fpath if relative file name, use empty_path if absolute filename */
! path = StringBeginsWith(str, STR_DIRECTORY) ? empty_path : fpath;
/* try opening each path name in the search path */
fp = null;
! for( link = Down(path); fp == null && link != path; link = NextDown(link)
)
{ Child(y, link);
/* set buff to the full path name */
--- 582,592 ----
}
/* use fpath if relative file name, use empty_path if absolute filename */
! npath = StringBeginsWith(str, STR_DIRECTORY) ? empty_path : fpath;
/* try opening each path name in the search path */
fp = null;
! for( link = Down(npath); fp == null && link != npath; link =
NextDown(link) )
{ Child(y, link);
/* set buff to the full path name */
Index: z38.c
===================================================================
RCS file: /local/src-CVS/misc/lout/z38.c,v
retrieving revision 1.1.1.3
diff -c -r1.1.1.3 z38.c
*** z38.c 1996/04/17 16:03:24 1.1.1.3
--- z38.c 1996/05/28 21:20:17
***************
*** 108,114 ****
MAPPING MapLoad(OBJECT file_name, BOOLEAN must_print)
{ FILE *fp; MAP_VEC map; MAPPING res;
! int i, m, line_num, line_pos, prev_code, dc, oc, count;
FULL_CHAR buff[MAX_BUFF], cn[MAX_BUFF], ch, mapname[MAX_BUFF],
mapval[MAX_BUFF];
debug2(DCM,D, "MapLoad(%s, %s)", EchoObject(file_name),bool(must_print));
--- 108,114 ----
MAPPING MapLoad(OBJECT file_name, BOOLEAN must_print)
{ FILE *fp; MAP_VEC map; MAPPING res;
! int i, m, current_line, line_pos, prev_code, dc, oc, count;
FULL_CHAR buff[MAX_BUFF], cn[MAX_BUFF], ch, mapname[MAX_BUFF],
mapval[MAX_BUFF];
debug2(DCM,D, "MapLoad(%s, %s)", EchoObject(file_name),bool(must_print));
***************
*** 169,179 ****
for( i = 0; i < MAX_CHASH; i++ ) map->hash_table[i] = 0;
/* first pass through the file; read character codes and names only */
! prev_code = -1; line_num = 0;
while( fgets( (char *) buff, MAX_BUFF, fp) == (char *) buff )
{
/* skip comment lines and blank lines */
! line_num++;
for( i = 0; buff[i] == ' ' || buff[i] == '\t'; i++ );
if( buff[i] == '#' || buff[i] == '\n' || buff[i] == '\0' ) continue;
--- 169,179 ----
for( i = 0; i < MAX_CHASH; i++ ) map->hash_table[i] = 0;
/* first pass through the file; read character codes and names only */
! prev_code = -1; current_line = 0;
while( fgets( (char *) buff, MAX_BUFF, fp) == (char *) buff )
{
/* skip comment lines and blank lines */
! current_line++;
for( i = 0; buff[i] == ' ' || buff[i] == '\t'; i++ );
if( buff[i] == '#' || buff[i] == '\n' || buff[i] == '\0' ) continue;
***************
*** 187,206 ****
FATAL, &fpos(file_name));
if( dc < 1 && !StringEqual(cn, STR_NOCHAR) )
Error(38, 6, "code %d too small (min is 1) in mapping file (line %d)",
! FATAL, &fpos(file_name), dc, line_num);
if( dc < prev_code )
Error(38, 7, "code %d out of order in mapping file (line %d)",
! FATAL, &fpos(file_name), dc, line_num);
if( dc == prev_code )
Error(38, 8, "code %d repeated in mapping file (line %d)",
! FATAL, &fpos(file_name), dc, line_num);
if( dc > MAX_CHARS )
Error(38, 9, "code %d too large (max is %d) in mapping file (line %d)",
! FATAL, &fpos(file_name), dc, MAX_CHARS, line_num);
prev_code = dc;
/* insert character name, if any */
! debug2(DCM, DD, " line %d: %s", line_num, cn);
if( count >= 3 && !StringEqual(cn, STR_NOCHAR) )
{
/* insert (cn, dc) pair into hash table; name may be repeated */
--- 187,206 ----
FATAL, &fpos(file_name));
if( dc < 1 && !StringEqual(cn, STR_NOCHAR) )
Error(38, 6, "code %d too small (min is 1) in mapping file (line %d)",
! FATAL, &fpos(file_name), dc, current_line);
if( dc < prev_code )
Error(38, 7, "code %d out of order in mapping file (line %d)",
! FATAL, &fpos(file_name), dc, current_line);
if( dc == prev_code )
Error(38, 8, "code %d repeated in mapping file (line %d)",
! FATAL, &fpos(file_name), dc, current_line);
if( dc > MAX_CHARS )
Error(38, 9, "code %d too large (max is %d) in mapping file (line %d)",
! FATAL, &fpos(file_name), dc, MAX_CHARS, current_line);
prev_code = dc;
/* insert character name, if any */
! debug2(DCM, DD, " line %d: %s", current_line, cn);
if( count >= 3 && !StringEqual(cn, STR_NOCHAR) )
{
/* insert (cn, dc) pair into hash table; name may be repeated */
***************
*** 213,223 ****
/* second pass through the file: read mappings */
rewind(fp);
! line_num = 0;
while( fgets( (char *) buff, MAX_BUFF, fp) == (char *) buff )
{
/* skip comment lines and blank lines */
! line_num++;
for( i = 0; buff[i] == ' ' || buff[i] == '\t'; i++ );
if( buff[i] == '#' || buff[i] == '\n' || buff[i] == '\0' ) continue;
--- 213,223 ----
/* second pass through the file: read mappings */
rewind(fp);
! current_line = 0;
while( fgets( (char *) buff, MAX_BUFF, fp) == (char *) buff )
{
/* skip comment lines and blank lines */
! current_line++;
for( i = 0; buff[i] == ' ' || buff[i] == '\t'; i++ );
if( buff[i] == '#' || buff[i] == '\n' || buff[i] == '\0' ) continue;
***************
*** 229,235 ****
while( sscanf( (char *) &buff[line_pos], "%s %[^;];%n",
mapname, mapval, &i) == 2 )
{
! debug3(DCM, DD, " line %d: %s %s", line_num, mapname, mapval);
line_pos += i;
if( StringEqual(mapname, AsciiToFull("UC")) )
m = MAP_UPPERCASE;
--- 229,235 ----
while( sscanf( (char *) &buff[line_pos], "%s %[^;];%n",
mapname, mapval, &i) == 2 )
{
! debug3(DCM, DD, " line %d: %s %s", current_line, mapname, mapval);
line_pos += i;
if( StringEqual(mapname, AsciiToFull("UC")) )
m = MAP_UPPERCASE;
***************
*** 241,251 ****
m = MAP_ACCENT;
else
Error(38, 10, "unknown mapping name %s in mapping file %s (line %d)",
! FATAL, &fpos(file_name), mapname, FileName(map->fnum), line_num);
ch = NameRetrieve(mapval, map);
if( ch == (FULL_CHAR) '\0' )
Error(38, 11, "unknown character %s in mapping file %s (line %d)",
! FATAL, &fpos(file_name), mapval, FileName(map->fnum), line_num);
map->map[m][dc] = ch;
}
}
--- 241,251 ----
m = MAP_ACCENT;
else
Error(38, 10, "unknown mapping name %s in mapping file %s (line %d)",
! FATAL, &fpos(file_name), mapname, FileName(map->fnum), current_line);
ch = NameRetrieve(mapval, map);
if( ch == (FULL_CHAR) '\0' )
Error(38, 11, "unknown character %s in mapping file %s (line %d)",
! FATAL, &fpos(file_name), mapval, FileName(map->fnum), current_line);
map->map[m][dc] = ch;
}
}
Index: data/standard.ld
===================================================================
RCS file: /local/src-CVS/misc/lout/data/standard.ld,v
retrieving revision 1.1.1.3
diff -c -r1.1.1.3 standard.ld
*** standard.ld 1996/04/17 16:11:21 1.1.1.3
--- standard.ld 1996/05/28 21:30:41
***************
*** 345,350 ****
--- 345,355 ----
}
}
+ { exhibit @Word @CurrLang @Case {
+ English @Yield { Exhibit }
+ }
+ }
+
{ appendix @Word @CurrLang @Case {
Czech @Yield { address@hidden address@hidden iacute}loha }
Danish @Yield { Appendiks }
--
Greg A. Woods
+1 416 443-1734 VE3TCP robohack!woods
Planix, Inc. <address@hidden>; Secrets of the Weird <address@hidden>