regen patches, and fix a few obvious defines for OpenBSD.

This commit is contained in:
espie 2004-01-06 03:29:08 +00:00
parent cf1e0698b9
commit 056c1b20a9
22 changed files with 325 additions and 341 deletions

View File

@ -1,5 +1,6 @@
--- Makefile.orig Wed Mar 25 14:28:24 1998
+++ Makefile Wed Mar 25 14:41:41 1998
$OpenBSD: patch-Makefile,v 1.1 2004/01/06 03:29:08 espie Exp $
--- Makefile.orig 2004-01-06 04:20:22.000000000 +0100
+++ Makefile 2004-01-06 04:20:22.000000000 +0100
@@ -0,0 +1,12 @@
+#
+# simple makefile for uemacs

View File

@ -1,20 +0,0 @@
--- src/lock.c.orig Sun Nov 19 03:09:22 1995
+++ src/lock.c Wed Mar 25 13:56:13 1998
@@ -10,10 +10,17 @@
#if FILOCK
+#if BSD
+#undef BSD
+#include <sys/param.h>
+#endif
+
#if BSD || FREEBSD || WMCS || SUN || XENIX || HPUX8 || HPUX9 || AVIION || USG || AIX || AUX
#include <sys/errno.h>
+#if !(defined(BSD) && (BSD >= 199103))
extern int sys_nerr; /* number of system error messages defined */
extern char *sys_errlist[]; /* list of message texts */
+#endif
#endif
#if MSC

View File

@ -1,12 +0,0 @@
--- h/epath.h.orig Sun Nov 19 03:09:52 1995
+++ h/epath.h Wed Mar 25 13:57:22 1998
@@ -68,7 +68,8 @@
{
".emacsrc",
"emacs.hlp",
- "/usr/local/",
+ "/usr/local/share/uemacs/",
+ "/usr/local/lib/uemacs/",
"/usr/lib/",
""
};

View File

@ -1,13 +0,0 @@
--- freebsd/makefile.orig Sat Nov 18 13:19:02 1995
+++ freebsd/makefile Wed Mar 25 15:07:14 1998
@@ -14,8 +14,8 @@
# options and arguments to the C compiler
-#CFLAGS += -I. -I$(HDIR)
-CFLAGS = -O -I. -I$(HDIR)
+CFLAGS += -I. -I$(HDIR)
+#CFLAGS = -O -I. -I$(HDIR)
# list of header files

View File

@ -1,13 +0,0 @@
--- openbsd/makefile.old Sat Nov 18 13:19:02 1995
+++ openbsd/makefile Tue Jun 9 23:04:56 1998
@@ -14,8 +14,8 @@
# options and arguments to the C compiler
-#CFLAGS += -I. -I$(HDIR)
-CFLAGS = -O -I. -I$(HDIR)
+CFLAGS += -I. -I$(HDIR)
+#CFLAGS = -O -I. -I$(HDIR)
# list of header files

View File

@ -1,254 +0,0 @@
Only in src.old: bind.c.orig
diff -ur src.old/char.c src/char.c
--- src.old/char.c Sun Nov 19 03:09:20 1995
+++ src/char.c Tue Jun 9 23:35:26 1998
@@ -142,14 +142,14 @@
lowcase[index] = index ^ DIFCASE;
upcase[index ^ DIFCASE] = index;
}
-#if BSD || FREEBSD || USG || AIX || AUX || SMOS || HPUX8 || HPUX9 || SUN || XENIX || AVIION
+#if BSD || FREEBSD || USG || AIX || AUX || SMOS || HPUX8 || HPUX9 || SUN || XENIX || AVIION || OPENBSD
/* and for those international characters! */
for (index = (unsigned char)'\340';
index <= (unsigned char)'\375'; index++) {
lowcase[index] = index ^ DIFCASE;
upcase[index ^ DIFCASE] = index;
}
-#endif /* BSD || FREEBSD || USG || AIX || AUX || SMOS || HPUX8 || HPUX9 || SUN || XENIX || AVIION */
+#endif /* BSD || FREEBSD || USG || AIX || AUX || SMOS || HPUX8 || HPUX9 || SUN || XENIX || AVIION || OPENBSD */
#if MSDOS
/* setup various extended IBM-PC characters */
diff -ur src.old/dolock.c src/dolock.c
--- src.old/dolock.c Sun Nov 19 03:09:20 1995
+++ src/dolock.c Tue Jun 9 23:35:38 1998
@@ -53,8 +53,8 @@
}
#endif
-#if FILOCK && (MSDOS || WINNT || OS2 || SUN || USG || AIX || AUX || AVIION || BSD || FREEBSD || HPUX8 || HPUX9 || AMIGA)
-#if OS2 || ((MSDOS || WINNT) && MSC) || BSD || FREEBSD
+#if FILOCK && (MSDOS || WINNT || OS2 || SUN || USG || AIX || AUX || AVIION || BSD || FREEBSD || HPUX8 || HPUX9 || AMIGA || OPENBSD)
+#if OS2 || ((MSDOS || WINNT) && MSC) || BSD || FREEBSD || OPENBSD
#include <sys/types.h>
#endif
#include <sys/stat.h>
diff -ur src.old/file.c src/file.c
--- src.old/file.c Sat Nov 18 16:36:58 1995
+++ src/file.c Tue Jun 9 23:36:55 1998
@@ -11,7 +11,7 @@
#include "eproto.h"
#include "edef.h"
#include "elang.h"
-#if BSD | FREEBSD | SUN | USG | AIX
+#if BSD || FREEBSD || SUN || USG || AIX || OPENBSD
#include <sys/types.h>
#include <sys/stat.h>
#endif
@@ -323,7 +323,7 @@
}
ffclose(); /* Ignore errors. */
-#if BSD || FREEBSD || USG || AUX || SMOS || HPUX8 || HPUX9 || SUN || XENIX || AVION
+#if BSD || FREEBSD || USG || AUX || SMOS || HPUX8 || HPUX9 || SUN || XENIX || AVION || OPENBSD
/* if we don't have write priviledges, make this in VIEW mode */
if (s !=FIOERR && s != FIOFNF) {
if (access(fname, 2 /* W_OK*/) != 0)
@@ -428,7 +428,7 @@
while (cp1!=&fname[0] && cp1[-1]!=':' && cp1[-1]!='\\'&&cp1[-1]!='/')
--cp1;
#endif
-#if USG | AIX | AUX | SMOS | HPUX8 | HPUX9 | BSD | FREEBSD | SUN | XENIX | AVIION
+#if USG || AIX || AUX || SMOS || HPUX8 || HPUX9 || BSD || FREEBSD || SUN || XENIX || AVIION || OPENBSD
while (cp1!=&fname[0] && cp1[-1]!='/')
--cp1;
#endif
@@ -600,7 +600,7 @@
int sflag; /* are we safe saving? */
char tname[NSTRING]; /* temporary file name */
char buf[NSTRING]; /* message buffer */
-#if BSD | FREEBSD | SUN | XENIX | USG | AIX
+#if BSD || FREEBSD || SUN || XENIX || USG || AIX || OPENBSD
struct stat st; /* we need info about the file permisions */
#endif
@@ -680,14 +680,14 @@
strcat(buf, "s");
if (sflag) {
-#if BSD | FREEBSD | SUN | XENIX | USG | AIX
+#if BSD || FREEBSD || SUN || XENIX || USG || AIX || OPENBSD
/* get the permisions on the original file */
stat(fn, &st);
#endif
/* erase original file */
/* rename temporary file to original name */
if (unlink(fn) == 0 && rename(tname, fn) == 0) {
-#if BSD | FREEBSD | SUN | XENIX | USG | AIX
+#if BSD || FREEBSD || SUN || XENIX || USG || AIX || OPENBSD
chown(fn, (int)st.st_uid, (int)st.st_gid);
chmod(fn, (int)st.st_mode);
#else
diff -ur src.old/fileio.c src/fileio.c
--- src.old/fileio.c Sun Nov 19 03:09:22 1995
+++ src/fileio.c Tue Jun 9 23:37:40 1998
@@ -106,7 +106,7 @@
putc(26, ffp); /* add a ^Z at the end of the file */
#endif
-#if USG | AIX | AUX | SMOS | HPUX8 | HPUX9 | SUN | XENIX | BSD || FREEBSD | WMCS | VMS | (MSDOS & (LATTICE | MSC | TURBO | IC | ZTC)) | WINNT | OS2 | (TOS & MWC) | AVIION
+#if USG || AIX || AUX || SMOS || HPUX8 || HPUX9 || SUN || XENIX || BSD || FREEBSD || OPENBSD || WMCS || VMS || (MSDOS && (LATTICE || MSC || TURBO || IC || ZTC)) || WINNT || OS2 || (TOS && MWC) || AVIION
if (fclose(ffp) != FALSE) {
mlwrite(TEXT156);
/* "Error closing file" */
diff -ur src.old/input.c src/input.c
--- src.old/input.c Fri Dec 29 19:10:12 1995
+++ src/input.c Tue Jun 9 23:38:44 1998
@@ -47,7 +47,7 @@
#include "edef.h"
#include "elang.h"
-#if USG | AIX | AUX | BSD | FREEBSD | SUN | HPUX8 | HPUX9
+#if USG || AIX || AUX || BSD || FREEBSD || SUN || HPUX8 || HPUX9 || OPENBSD
#include <pwd.h>
extern struct passwd *getpwnam();
#endif
@@ -244,7 +244,7 @@
char *ptr; /* string pointer */
char user_name[NSTRING]; /* user name for directory */
static char buf[NSTRING];/* buffer to hold tentative name */
-#if USG | AIX | AUX | BSD | FREEBSD | SUN | HPUX8 | HPUX9
+#if USG || AIX || AUX || BSD || FREEBSD || SUN || HPUX8 || HPUX9 || OPENBSD
struct passwd *pwd; /* password structure */
#endif
@@ -353,7 +353,7 @@
--ttcol;
}
-#if USG | AIX | AUX | BSD | FREEBSD | SUN | HPUX8 | HPUX9
+#if USG || AIX || AUX || BSD || FREEBSD || SUN || HPUX8 || HPUX9 || OPENBSD
/* lookup someone else's home directory! */
if (user_name[0] != 0) {
pwd = getpwnam(user_name);
diff -ur src.old/keyboard.c src/keyboard.c
--- src.old/keyboard.c Sat Nov 18 16:36:58 1995
+++ src/keyboard.c Tue Jun 9 23:38:51 1998
@@ -224,7 +224,7 @@
#endif
#endif
-#if BSD || FREEBSD || USG || AIX || AUX || SMOS || HPUX8 || HPUX9 || SUN || XENIX || (AVVION || TERMIOS) || (VMS && SMG) || MPE
+#if BSD || FREEBSD || USG || AIX || AUX || SMOS || HPUX8 || HPUX9 || SUN || XENIX || (AVVION || TERMIOS) || (VMS && SMG) || MPE || OPENBSD
#define NKEYSEQ 300 /* Number of keymap entries */
diff -ur src.old/lock.c src/lock.c
--- src.old/lock.c Tue Jun 9 22:59:50 1998
+++ src/lock.c Tue Jun 9 23:33:21 1998
@@ -15,7 +15,7 @@
#include <sys/param.h>
#endif
-#if BSD || FREEBSD || WMCS || SUN || XENIX || HPUX8 || HPUX9 || AVIION || USG || AIX || AUX
+#if BSD || FREEBSD || WMCS || SUN || XENIX || HPUX8 || HPUX9 || AVIION || USG || AIX || AUX || OPENBSD
#include <sys/errno.h>
#if !(defined(BSD) && (BSD >= 199103))
extern int sys_nerr; /* number of system error messages defined */
@@ -165,7 +165,7 @@
strcpy(obuf, errstr);
strcat(obuf, " - ");
-#if BSD || FREEBSD || WMCS || SUN || XENIX || HPUX8 || HPUX9 || AVIION || USG || AIX || AUX
+#if BSD || FREEBSD || WMCS || SUN || XENIX || HPUX8 || HPUX9 || AVIION || USG || AIX || AUX || OPENBSD
if (errno < sys_nerr)
strcat(obuf, sys_errlist[errno]);
else
Only in src.old: lock.c.orig
diff -ur src.old/unix.c src/unix.c
--- src.old/unix.c Sat Nov 18 16:36:58 1995
+++ src/unix.c Tue Jun 9 23:34:23 1998
@@ -81,7 +81,7 @@
}
/** Only compile for UNIX machines **/
-#if BSD || FREEBSD || USG || AIX || AUX || SMOS || HPUX8 || HPUX9 || SUN || XENIX || (AVVION || TERMIOS)
+#if BSD || FREEBSD || USG || AIX || AUX || SMOS || HPUX8 || HPUX9 || SUN || XENIX || (AVVION || TERMIOS) || OPENBSD
/** Include files **/
#include "eproto.h" /* Function definitions */
@@ -98,7 +98,7 @@
#include <sys/ioctl.h> /* I/O control definitions */
/** Additional include files **/
-#if FREEBSD
+#if FREEBSD || OPENBSD
#define TERMIOS 1
#include <sys/time.h>
#undef BSD
@@ -109,9 +109,9 @@
#if (BSD && !TERMIOS)
#include <sys/time.h> /* Timer definitions */
#endif /* (BSD && !TERMIOS) */
-#if BSD || FREEBSD || SUN || HPUX8 || HPUX9 || (AVVION || TERMIOS) || AIX
+#if BSD || FREEBSD || SUN || HPUX8 || HPUX9 || (AVVION || TERMIOS) || AIX || OPENBSD
#include <signal.h> /* Signal definitions */
-#endif /* BSD || FREEBSD || SUN || HPUX8 || HPUX9 || (AVVION || TERMIOS) */
+#endif /* BSD || FREEBSD || SUN || HPUX8 || HPUX9 || (AVVION || TERMIOS) || OPENBSD */
#if USG || AIX || AUX || SMOS || HPUX8 || HPUX9 || SUN || XENIX
#include <termio.h> /* Terminal I/O definitions */
#endif /* USG || AIX || AUX || SMOS || HPUX8 || HPUX9 || SUN || XENIX */
@@ -126,7 +126,7 @@
/** Completion include files **/
/** Directory accessing: Try and figure this out... if you can! **/
-#if ((BSD || FREEBSD) && !TERMIOS)
+#if ((BSD || FREEBSD || OPENBSD) && !TERMIOS)
#include <sys/dir.h> /* Directory entry definitions */
#define DIRENTRY direct
#endif /* (BSD && !TERMIOS) */
@@ -485,7 +485,7 @@
/** Close terminal device **/
int ttclose()
{
-#if ((AIX == 0) && (TERMIOS == 0)) || (FREEBSD == 1)
+#if ((AIX == 0) && (TERMIOS == 0)) || FREEBSD || OPENBSD
/* Restore original terminal modes */
if (reset != (char*)NULL)
write(1, reset, strlen(reset));
@@ -1202,7 +1202,7 @@
return(0);
}
-#if BSD || FREEBSD || SUN || HPUX8 || HPUX9 || (AVVION || TERMIOS)
+#if BSD || FREEBSD || SUN || HPUX8 || HPUX9 || (AVVION || TERMIOS) || OPENBSD
/* Surely more than just BSD systems do this */
/** Perform a stop signal **/
@@ -1225,7 +1225,7 @@
return(0);
}
-#endif /* BSD || FREEBSD || SUN || HPUX8 || HPUX9 || (AVVION || TERMIOS) */
+#endif /* BSD || FREEBSD || SUN || HPUX8 || HPUX9 || (AVVION || TERMIOS) || OPENBSD */
/** Get time of day **/
char * timeset()
@@ -1327,9 +1327,9 @@
/* Get shell path */
sh = getenv("SHELL");
if (!sh)
-#if BSD || FREEBSD || SUN
+#if BSD || FREEBSD || SUN || OPENBSD
sh = "/bin/csh";
-#endif /* BSD || FREEBSD || SUN */
+#endif /* BSD || FREEBSD || SUN || OPENBSD */
#if USG || AIX || AUX || SMOS || HPUX8 || HPUX9 || XENIX || (AVVION || TERMIOS)
sh = "/bin/sh";
#endif /* USG || AIX || AUX || SMOS || HPUX8 || HPUX9 || XENIX || (AVVION || TERMIOS) */
@@ -1726,4 +1726,4 @@
}
#endif
-#endif /* BSD || FREEBSD || USG || AIX || AUX || SMOS || HPUX8 || HPUX9 || SUN || XENIX || (AVVION || TERMIOS) */
+#endif /* BSD || FREEBSD || USG || AIX || AUX || SMOS || HPUX8 || HPUX9 || SUN || XENIX || (AVVION || TERMIOS) || OPENBSD */

View File

@ -1,5 +1,6 @@
--- freebsd/estruct.h.orig Wed Mar 25 14:21:05 1998
+++ freebsd/estruct.h Wed Mar 25 14:25:34 1998
$OpenBSD: patch-freebsd_estruct_h,v 1.1 2004/01/06 03:29:09 espie Exp $
--- freebsd/estruct.h.orig 2004-01-06 04:20:22.000000000 +0100
+++ freebsd/estruct.h 2004-01-06 04:20:22.000000000 +0100
@@ -0,0 +1,1254 @@
+/* ESTRUCT: Structure and preprocesser defined for
+ MicroEMACS 4.00

View File

@ -0,0 +1,14 @@
$OpenBSD: patch-freebsd_makefile,v 1.1 2004/01/06 03:29:09 espie Exp $
--- freebsd/makefile.orig 1995-11-18 13:19:02.000000000 +0100
+++ freebsd/makefile 2004-01-06 04:20:22.000000000 +0100
@@ -14,8 +14,8 @@ HDIR = ../h
# options and arguments to the C compiler
-#CFLAGS += -I. -I$(HDIR)
-CFLAGS = -O -I. -I$(HDIR)
+CFLAGS += -I. -I$(HDIR)
+#CFLAGS = -O -I. -I$(HDIR)
# list of header files

View File

@ -1,7 +1,7 @@
diff -ur h.old/ebind.h h/ebind.h
--- h.old/ebind.h Sun Dec 31 15:04:34 1995
+++ h/ebind.h Tue Jun 9 23:42:33 1998
@@ -93,7 +93,7 @@
$OpenBSD: patch-h_ebind_h,v 1.1 2004/01/06 03:29:09 espie Exp $
--- h/ebind.h.orig 1995-12-31 15:04:34.000000000 +0100
+++ h/ebind.h 2004-01-06 04:20:22.000000000 +0100
@@ -93,7 +93,7 @@ NOSHARE KEYTAB keytab[NBINDS] = {
{CTLX|'A', BINDFNC, setvar},
{CTLX|'B', BINDFNC, usebuffer},
{CTLX|'C', BINDFNC, spawncli},
@ -10,7 +10,7 @@ diff -ur h.old/ebind.h h/ebind.h
{CTLX|'D', BINDFNC, bktoshell},
#endif
{CTLX|'E', BINDFNC, ctlxe},
@@ -155,7 +155,7 @@
@@ -155,7 +155,7 @@ NOSHARE KEYTAB keytab[NBINDS] = {
{META|'P', BINDFNC, gotobop},
{META|'Q', BINDFNC, fillpara},
{META|'R', BINDFNC, sreplace},
@ -19,15 +19,3 @@ diff -ur h.old/ebind.h h/ebind.h
{META|'S', BINDFNC, bktoshell},
#endif
{META|'U', BINDFNC, upperword},
diff -ur h.old/epath.h h/epath.h
--- h.old/epath.h Tue Jun 9 22:59:50 1998
+++ h/epath.h Tue Jun 9 23:42:57 1998
@@ -64,7 +64,7 @@
};
#endif
-#if V7 | BSD | FREEBSD | USG | AIX | SMOS | HPUX8 | HPUX9 | XENIX | SUN | AVIION
+#if V7 || BSD || FREEBSD || USG || AIX || SMOS || HPUX8 || HPUX9 || XENIX || SUN || AVIION || OPENBSD
{
".emacsrc",
"emacs.hlp",

View File

@ -0,0 +1,12 @@
$OpenBSD: patch-h_epath_h,v 1.1 2004/01/06 03:29:09 espie Exp $
--- h/epath.h.orig 2004-01-06 04:20:22.000000000 +0100
+++ h/epath.h 2004-01-06 04:20:22.000000000 +0100
@@ -64,7 +64,7 @@ NOSHARE CONST char *pathname[] =
};
#endif
-#if V7 | BSD | FREEBSD | USG | AIX | SMOS | HPUX8 | HPUX9 | XENIX | SUN | AVIION
+#if V7 || BSD || FREEBSD || USG || AIX || SMOS || HPUX8 || HPUX9 || XENIX || SUN || AVIION || OPENBSD
{
".emacsrc",
"emacs.hlp",

View File

@ -0,0 +1,12 @@
$OpenBSD: patch-h_eproto_h,v 1.1 2004/01/06 03:29:09 espie Exp $
--- h/eproto.h.orig 2004-01-06 04:24:49.000000000 +0100
+++ h/eproto.h 2004-01-06 04:25:04.000000000 +0100
@@ -552,7 +552,7 @@ extern int PASCAL NEAR backtagword(int f
char *strrev(char *);
-#if WINNT || WINDOW_MSWIN || (MSDOS && IC) || GCC || VMS
+#if WINNT || WINDOW_MSWIN || (MSDOS && IC) || GCC || VMS || OPENBSD
#include <stdlib.h>
#include <string.h>
#else

View File

@ -1,5 +1,6 @@
--- /dev/null Tue Jun 9 22:59:35 1998
+++ openbsd/estruct.h Tue Jun 9 23:14:20 1998
$OpenBSD: patch-openbsd_estruct_h,v 1.1 2004/01/06 03:29:09 espie Exp $
--- openbsd/estruct.h.orig 2004-01-06 04:20:22.000000000 +0100
+++ openbsd/estruct.h 2004-01-06 04:23:14.000000000 +0100
@@ -0,0 +1,1255 @@
+/* ESTRUCT: Structure and preprocesser defined for
+ MicroEMACS 4.00
@ -236,7 +237,7 @@
+
+/* Prototypes in use? */
+
+#if MSC || TURBO || IC || VMS || GCC || ZTC
+#if MSC || TURBO || IC || VMS || GCC || ZTC || OPENBSD
+#define PROTO 1
+#else
+#define PROTO 0
@ -495,7 +496,7 @@
+#endif
+
+#if VARARG
+#if (GCC == 0) && (USG || AIX || AUX || BSD || FREEBSD || SUN || XENIX || HPUX8 || HPUX9 || AVIION || MPE || OPENBSD)
+#if (GCC == 0) && (USG || AIX || AUX || BSD || FREEBSD || SUN || XENIX || HPUX8 || HPUX9 || AVIION || MPE)
+#define VARG 1
+#define SARG 0
+#include <varargs.h>

View File

@ -0,0 +1,14 @@
$OpenBSD: patch-openbsd_makefile,v 1.1 2004/01/06 03:29:09 espie Exp $
--- openbsd/makefile.orig 1995-11-18 13:19:02.000000000 +0100
+++ openbsd/makefile 2004-01-06 04:20:22.000000000 +0100
@@ -14,8 +14,8 @@ HDIR = ../h
# options and arguments to the C compiler
-#CFLAGS += -I. -I$(HDIR)
-CFLAGS = -O -I. -I$(HDIR)
+CFLAGS += -I. -I$(HDIR)
+#CFLAGS = -O -I. -I$(HDIR)
# list of header files

View File

@ -1,6 +1,7 @@
--- src/bind.c.orig Sun Nov 19 03:09:20 1995
+++ src/bind.c Wed Mar 25 15:00:37 1998
@@ -634,7 +634,8 @@
$OpenBSD: patch-src_bind_c,v 1.1 2004/01/06 03:29:09 espie Exp $
--- src/bind.c.orig 1995-11-19 03:09:20.000000000 +0100
+++ src/bind.c 2004-01-06 04:20:22.000000000 +0100
@@ -634,7 +634,8 @@ int hflag; /* Look in the HOME environme
register char *sp; /* pointer into path spec */
register int i; /* index */
static char fspec[NFILEN]; /* full path spec to search */
@ -10,7 +11,7 @@
/* if we have an absolute path.. check only there! */
sp = fname;
while (*sp) {
@@ -689,9 +690,11 @@
@@ -689,9 +690,11 @@ int hflag; /* Look in the HOME environme
#if OS2
path = getenv("DPATH");
#else

View File

@ -0,0 +1,20 @@
$OpenBSD: patch-src_char_c,v 1.1 2004/01/06 03:29:09 espie Exp $
--- src/char.c.orig 1995-11-19 03:09:20.000000000 +0100
+++ src/char.c 2004-01-06 04:20:22.000000000 +0100
@@ -142,14 +142,14 @@ VOID PASCAL NEAR initchars() /* initiali
lowcase[index] = index ^ DIFCASE;
upcase[index ^ DIFCASE] = index;
}
-#if BSD || FREEBSD || USG || AIX || AUX || SMOS || HPUX8 || HPUX9 || SUN || XENIX || AVIION
+#if BSD || FREEBSD || USG || AIX || AUX || SMOS || HPUX8 || HPUX9 || SUN || XENIX || AVIION || OPENBSD
/* and for those international characters! */
for (index = (unsigned char)'\340';
index <= (unsigned char)'\375'; index++) {
lowcase[index] = index ^ DIFCASE;
upcase[index ^ DIFCASE] = index;
}
-#endif /* BSD || FREEBSD || USG || AIX || AUX || SMOS || HPUX8 || HPUX9 || SUN || XENIX || AVIION */
+#endif /* BSD || FREEBSD || USG || AIX || AUX || SMOS || HPUX8 || HPUX9 || SUN || XENIX || AVIION || OPENBSD */
#if MSDOS
/* setup various extended IBM-PC characters */

View File

@ -0,0 +1,14 @@
$OpenBSD: patch-src_dolock_c,v 1.1 2004/01/06 03:29:09 espie Exp $
--- src/dolock.c.orig 1995-11-19 03:09:20.000000000 +0100
+++ src/dolock.c 2004-01-06 04:20:22.000000000 +0100
@@ -53,8 +53,8 @@ char *fname;
}
#endif
-#if FILOCK && (MSDOS || WINNT || OS2 || SUN || USG || AIX || AUX || AVIION || BSD || FREEBSD || HPUX8 || HPUX9 || AMIGA)
-#if OS2 || ((MSDOS || WINNT) && MSC) || BSD || FREEBSD
+#if FILOCK && (MSDOS || WINNT || OS2 || SUN || USG || AIX || AUX || AVIION || BSD || FREEBSD || HPUX8 || HPUX9 || AMIGA || OPENBSD)
+#if OS2 || ((MSDOS || WINNT) && MSC) || BSD || FREEBSD || OPENBSD
#include <sys/types.h>
#endif
#include <sys/stat.h>

View File

@ -0,0 +1,56 @@
$OpenBSD: patch-src_file_c,v 1.1 2004/01/06 03:29:09 espie Exp $
--- src/file.c.orig 1995-11-18 16:36:58.000000000 +0100
+++ src/file.c 2004-01-06 04:20:22.000000000 +0100
@@ -11,7 +11,7 @@
#include "eproto.h"
#include "edef.h"
#include "elang.h"
-#if BSD | FREEBSD | SUN | USG | AIX
+#if BSD || FREEBSD || SUN || USG || AIX || OPENBSD
#include <sys/types.h>
#include <sys/stat.h>
#endif
@@ -323,7 +323,7 @@ int lockfl; /* check for file locks? */
}
ffclose(); /* Ignore errors. */
-#if BSD || FREEBSD || USG || AUX || SMOS || HPUX8 || HPUX9 || SUN || XENIX || AVION
+#if BSD || FREEBSD || USG || AUX || SMOS || HPUX8 || HPUX9 || SUN || XENIX || AVION || OPENBSD
/* if we don't have write priviledges, make this in VIEW mode */
if (s !=FIOERR && s != FIOFNF) {
if (access(fname, 2 /* W_OK*/) != 0)
@@ -428,7 +428,7 @@ char *fname;
while (cp1!=&fname[0] && cp1[-1]!=':' && cp1[-1]!='\\'&&cp1[-1]!='/')
--cp1;
#endif
-#if USG | AIX | AUX | SMOS | HPUX8 | HPUX9 | BSD | FREEBSD | SUN | XENIX | AVIION
+#if USG || AIX || AUX || SMOS || HPUX8 || HPUX9 || BSD || FREEBSD || SUN || XENIX || AVIION || OPENBSD
while (cp1!=&fname[0] && cp1[-1]!='/')
--cp1;
#endif
@@ -600,7 +600,7 @@ char *mode; /* mode to open file (w = wr
int sflag; /* are we safe saving? */
char tname[NSTRING]; /* temporary file name */
char buf[NSTRING]; /* message buffer */
-#if BSD | FREEBSD | SUN | XENIX | USG | AIX
+#if BSD || FREEBSD || SUN || XENIX || USG || AIX || OPENBSD
struct stat st; /* we need info about the file permisions */
#endif
@@ -680,14 +680,14 @@ char *mode; /* mode to open file (w = wr
strcat(buf, "s");
if (sflag) {
-#if BSD | FREEBSD | SUN | XENIX | USG | AIX
+#if BSD || FREEBSD || SUN || XENIX || USG || AIX || OPENBSD
/* get the permisions on the original file */
stat(fn, &st);
#endif
/* erase original file */
/* rename temporary file to original name */
if (unlink(fn) == 0 && rename(tname, fn) == 0) {
-#if BSD | FREEBSD | SUN | XENIX | USG | AIX
+#if BSD || FREEBSD || SUN || XENIX || USG || AIX || OPENBSD
chown(fn, (int)st.st_uid, (int)st.st_gid);
chmod(fn, (int)st.st_mode);
#else

View File

@ -0,0 +1,12 @@
$OpenBSD: patch-src_fileio_c,v 1.1 2004/01/06 03:29:09 espie Exp $
--- src/fileio.c.orig 1995-11-19 03:09:22.000000000 +0100
+++ src/fileio.c 2004-01-06 04:20:22.000000000 +0100
@@ -106,7 +106,7 @@ PASCAL NEAR ffclose()
putc(26, ffp); /* add a ^Z at the end of the file */
#endif
-#if USG | AIX | AUX | SMOS | HPUX8 | HPUX9 | SUN | XENIX | BSD || FREEBSD | WMCS | VMS | (MSDOS & (LATTICE | MSC | TURBO | IC | ZTC)) | WINNT | OS2 | (TOS & MWC) | AVIION
+#if USG || AIX || AUX || SMOS || HPUX8 || HPUX9 || SUN || XENIX || BSD || FREEBSD || OPENBSD || WMCS || VMS || (MSDOS && (LATTICE || MSC || TURBO || IC || ZTC)) || WINNT || OS2 || (TOS && MWC) || AVIION
if (fclose(ffp) != FALSE) {
mlwrite(TEXT156);
/* "Error closing file" */

View File

@ -0,0 +1,30 @@
$OpenBSD: patch-src_input_c,v 1.1 2004/01/06 03:29:09 espie Exp $
--- src/input.c.orig 1995-12-29 19:10:12.000000000 +0100
+++ src/input.c 2004-01-06 04:20:22.000000000 +0100
@@ -47,7 +47,7 @@
#include "edef.h"
#include "elang.h"
-#if USG | AIX | AUX | BSD | FREEBSD | SUN | HPUX8 | HPUX9
+#if USG || AIX || AUX || BSD || FREEBSD || SUN || HPUX8 || HPUX9 || OPENBSD
#include <pwd.h>
extern struct passwd *getpwnam();
#endif
@@ -244,7 +244,7 @@ int maxlen; /* maximum length of input
char *ptr; /* string pointer */
char user_name[NSTRING]; /* user name for directory */
static char buf[NSTRING];/* buffer to hold tentative name */
-#if USG | AIX | AUX | BSD | FREEBSD | SUN | HPUX8 | HPUX9
+#if USG || AIX || AUX || BSD || FREEBSD || SUN || HPUX8 || HPUX9 || OPENBSD
struct passwd *pwd; /* password structure */
#endif
@@ -353,7 +353,7 @@ int maxlen; /* maximum length of input
--ttcol;
}
-#if USG | AIX | AUX | BSD | FREEBSD | SUN | HPUX8 | HPUX9
+#if USG || AIX || AUX || BSD || FREEBSD || SUN || HPUX8 || HPUX9 || OPENBSD
/* lookup someone else's home directory! */
if (user_name[0] != 0) {
pwd = getpwnam(user_name);

View File

@ -0,0 +1,12 @@
$OpenBSD: patch-src_keyboard_c,v 1.1 2004/01/06 03:29:09 espie Exp $
--- src/keyboard.c.orig 1995-11-18 16:36:58.000000000 +0100
+++ src/keyboard.c 2004-01-06 04:20:22.000000000 +0100
@@ -224,7 +224,7 @@ case 0x90: return(SPEC | CTRL | '+'); /*
#endif
#endif
-#if BSD || FREEBSD || USG || AIX || AUX || SMOS || HPUX8 || HPUX9 || SUN || XENIX || (AVVION || TERMIOS) || (VMS && SMG) || MPE
+#if BSD || FREEBSD || USG || AIX || AUX || SMOS || HPUX8 || HPUX9 || SUN || XENIX || (AVVION || TERMIOS) || (VMS && SMG) || MPE || OPENBSD
#define NKEYSEQ 300 /* Number of keymap entries */

View File

@ -0,0 +1,21 @@
$OpenBSD: patch-src_lock_c,v 1.1 2004/01/06 03:29:09 espie Exp $
--- src/lock.c.orig 1995-11-19 03:09:22.000000000 +0100
+++ src/lock.c 2004-01-06 04:24:14.000000000 +0100
@@ -10,7 +10,7 @@
#if FILOCK
-#if BSD || FREEBSD || WMCS || SUN || XENIX || HPUX8 || HPUX9 || AVIION || USG || AIX || AUX
+#if BSD || FREEBSD || WMCS || SUN || XENIX || HPUX8 || HPUX9 || AVIION || USG || AIX || AUX || OPENBSD
#include <sys/errno.h>
extern int sys_nerr; /* number of system error messages defined */
extern char *sys_errlist[]; /* list of message texts */
@@ -158,7 +158,7 @@ char *errstr; /* lock error string to p
strcpy(obuf, errstr);
strcat(obuf, " - ");
-#if BSD || FREEBSD || WMCS || SUN || XENIX || HPUX8 || HPUX9 || AVIION || USG || AIX || AUX
+#if BSD || FREEBSD || WMCS || SUN || XENIX || HPUX8 || HPUX9 || AVIION || USG || AIX || AUX || OPENBSD
if (errno < sys_nerr)
strcat(obuf, sys_errlist[errno]);
else

View File

@ -0,0 +1,87 @@
$OpenBSD: patch-src_unix_c,v 1.1 2004/01/06 03:29:09 espie Exp $
--- src/unix.c.orig 1995-11-18 16:36:58.000000000 +0100
+++ src/unix.c 2004-01-06 04:20:22.000000000 +0100
@@ -81,7 +81,7 @@ int scnothing()
}
/** Only compile for UNIX machines **/
-#if BSD || FREEBSD || USG || AIX || AUX || SMOS || HPUX8 || HPUX9 || SUN || XENIX || (AVVION || TERMIOS)
+#if BSD || FREEBSD || USG || AIX || AUX || SMOS || HPUX8 || HPUX9 || SUN || XENIX || (AVVION || TERMIOS) || OPENBSD
/** Include files **/
#include "eproto.h" /* Function definitions */
@@ -98,7 +98,7 @@ int scnothing()
#include <sys/ioctl.h> /* I/O control definitions */
/** Additional include files **/
-#if FREEBSD
+#if FREEBSD || OPENBSD
#define TERMIOS 1
#include <sys/time.h>
#undef BSD
@@ -109,9 +109,9 @@ int scnothing()
#if (BSD && !TERMIOS)
#include <sys/time.h> /* Timer definitions */
#endif /* (BSD && !TERMIOS) */
-#if BSD || FREEBSD || SUN || HPUX8 || HPUX9 || (AVVION || TERMIOS) || AIX
+#if BSD || FREEBSD || SUN || HPUX8 || HPUX9 || (AVVION || TERMIOS) || AIX || OPENBSD
#include <signal.h> /* Signal definitions */
-#endif /* BSD || FREEBSD || SUN || HPUX8 || HPUX9 || (AVVION || TERMIOS) */
+#endif /* BSD || FREEBSD || SUN || HPUX8 || HPUX9 || (AVVION || TERMIOS) || OPENBSD */
#if USG || AIX || AUX || SMOS || HPUX8 || HPUX9 || SUN || XENIX
#include <termio.h> /* Terminal I/O definitions */
#endif /* USG || AIX || AUX || SMOS || HPUX8 || HPUX9 || SUN || XENIX */
@@ -126,7 +126,7 @@ int scnothing()
/** Completion include files **/
/** Directory accessing: Try and figure this out... if you can! **/
-#if ((BSD || FREEBSD) && !TERMIOS)
+#if ((BSD || FREEBSD || OPENBSD) && !TERMIOS)
#include <sys/dir.h> /* Directory entry definitions */
#define DIRENTRY direct
#endif /* (BSD && !TERMIOS) */
@@ -485,7 +485,7 @@ int ttopen()
/** Close terminal device **/
int ttclose()
{
-#if ((AIX == 0) && (TERMIOS == 0)) || (FREEBSD == 1)
+#if ((AIX == 0) && (TERMIOS == 0)) || FREEBSD || OPENBSD
/* Restore original terminal modes */
if (reset != (char*)NULL)
write(1, reset, strlen(reset));
@@ -1202,7 +1202,7 @@ char * cmd; /* Palette command */
return(0);
}
-#if BSD || FREEBSD || SUN || HPUX8 || HPUX9 || (AVVION || TERMIOS)
+#if BSD || FREEBSD || SUN || HPUX8 || HPUX9 || (AVVION || TERMIOS) || OPENBSD
/* Surely more than just BSD systems do this */
/** Perform a stop signal **/
@@ -1225,7 +1225,7 @@ int bktoshell(f, n)
return(0);
}
-#endif /* BSD || FREEBSD || SUN || HPUX8 || HPUX9 || (AVVION || TERMIOS) */
+#endif /* BSD || FREEBSD || SUN || HPUX8 || HPUX9 || (AVVION || TERMIOS) || OPENBSD */
/** Get time of day **/
char * timeset()
@@ -1327,9 +1327,9 @@ int n; /* Argument count */
/* Get shell path */
sh = getenv("SHELL");
if (!sh)
-#if BSD || FREEBSD || SUN
+#if BSD || FREEBSD || SUN || OPENBSD
sh = "/bin/csh";
-#endif /* BSD || FREEBSD || SUN */
+#endif /* BSD || FREEBSD || SUN || OPENBSD */
#if USG || AIX || AUX || SMOS || HPUX8 || HPUX9 || XENIX || (AVVION || TERMIOS)
sh = "/bin/sh";
#endif /* USG || AIX || AUX || SMOS || HPUX8 || HPUX9 || XENIX || (AVVION || TERMIOS) */
@@ -1726,4 +1726,4 @@ void winch_new_size()
}
#endif
-#endif /* BSD || FREEBSD || USG || AIX || AUX || SMOS || HPUX8 || HPUX9 || SUN || XENIX || (AVVION || TERMIOS) */
+#endif /* BSD || FREEBSD || USG || AIX || AUX || SMOS || HPUX8 || HPUX9 || SUN || XENIX || (AVVION || TERMIOS) || OPENBSD */