home *** CD-ROM | disk | FTP | other *** search
- --- Makefile.Linux
- +++ Makefile.Linux 1994/07/17 21:18:34
- @@ -0,0 +1,12 @@
- +config.h: config.h-dist
- + ln -s config.h-dist config.h
- +
- +Makefile: makefile.sys.v
- + ln -s makefile.sys.v Makefile
- +
- +compile: config.h Makefile
- + make
- +
- +install: compile
- + make install
- +
- --- config.h-dist
- +++ config.h-dist 1994/07/17 21:18:34
- @@ -1,5 +1,7 @@
- /* config.h 1.1 (c) copyright 1986 (Dan Heller) */
-
- +/* #define HOMEMAIL */
- +
- /* Default names and locations for files */
- #define MAILRC ".mushrc"
- #define ALTERNATE_RC ".mailrc"
- @@ -33,9 +35,9 @@
-
- /* default settings for some variable strings */
- #define DEF_PROMPT "Msg %m of %t: "
- -#define DEF_PAGER "more" /* set to "internal" to use internal pager */
- -#define DEF_SHELL "csh"
- -#define DEF_EDITOR "vi"
- +#define DEF_PAGER "less" /* set to "internal" to use internal pager */
- +#define DEF_SHELL "sh"
- +#define DEF_EDITOR "elvis"
- #define DEF_FOLDER "~/Mail" /* default Mail folder */
- #define DEF_MBOX "~/mbox" /* default mbox */
- #define DEF_INDENT_STR "> " /* indent included mail */
- @@ -110,7 +112,7 @@
- /*
- * If you are not using MMDF, check these definitions.
- */
- -#define MAIL_DELIVERY "/usr/lib/sendmail -i" /* "-i" works like "-oi" */
- +#define MAIL_DELIVERY "/usr/sbin/sendmail -i" /* "-i" works like "-oi" */
- #define VERBOSE_ARG "-v" /* undef if none exists */
- #define METOO_ARG "-m" /* man sendmail for more info. */
- #define MTA_EXIT 0 /* exit status for successful mail delivery */
- @@ -146,13 +148,13 @@
- #endif /* MMDF */
-
- #ifdef HOMEMAIL
- -#define MAILFILE "Mailbox" /* or whatever */
- +#define MAILFILE ".mail" /* or whatever */
- #else /* HOMEMAIL */
- #ifndef MAILDIR
- #if defined(SYSV) && !defined(SVR4)
- -#define MAILDIR "/usr/mail"
- +#define MAILDIR "/var/mail"
- #else /* BSD || SVR4 */
- -#define MAILDIR "/usr/spool/mail"
- +#define MAILDIR "/var/mail"
- #endif /* SYSV && !SVR4 */
- #endif /* MAILDIR */
- #endif /* HOMEMAIL */
- @@ -186,13 +188,13 @@
- * is known not to be RFC822 compiant (xenix, older sys-v) or can be
- * counted on to pass through user-defined headers without modification.
- */
- -/* #define PICKY_MAILER /**/
- +#define PICKY_MAILER /**/
-
- /* If your system supports the vprintf() functions, True for sys-v and
- * later sun versions (3.0+ ?). Typically not true for BSD systems, but
- * that will probably change in the future.
- */
- -#if defined(SYSV) || defined(sun)
- +#if 1 || defined(SYSV) || defined(sun)
- #define VPRINTF
- #endif /* SYSV || sun */
-
- @@ -204,7 +206,7 @@
- /* If your system has the BSD-style directory routines (opendir/readdir),
- * define DIRECTORY. This happens automatically in glob.h for BSD.
- */
- -#ifdef SVR4
- +#if 1
- #define DIRECTORY
- #endif /* SVR4 */
-
- @@ -212,7 +214,7 @@
- * define POSIX_UTIME. You may have to change <sys/utime.h> to <utime.h>
- * in mush.h.
- */
- -#if defined(SVR4) && !defined(sun)
- +#if 1
- #define POSIX_UTIME
- #endif /* SVR4 && !sun */
-
- --- glob.c
- +++ glob.c 1994/07/17 21:18:34
- @@ -31,6 +31,8 @@
- #define TESTGLOB(str1,str2) \
- printf("%s %s = %s\n",str1,str2,glob(str1,str2)?"TRUE":"FALSE")
-
- +static int sglob();
- +
- main(argc, argv)
- int argc;
- char **argv;
- --- init.c
- +++ init.c 1994/07/17 21:18:35
- @@ -3,6 +3,7 @@
- /* init.c -- functions and whatnot that initialize everything */
- #include "mush.h"
- #include <pwd.h>
- +#include <netdb.h>
-
- #if defined(BSD) || defined(HPUX) || defined(IRIX4)
- #include <netdb.h>
- @@ -18,8 +19,10 @@
- char *home, *realname, *argv[4];
- extern char *getlogin();
- char buf[MAXPATHLEN];
- -#if defined(SYSV) && !defined(HPUX) && !defined(IRIX4)
- +#if defined(SYSV) && !defined(HPUX) && !defined(IRIX4) && !defined(__linux__)
- +#ifndef __linux__
- extern struct passwd *getpwuid(); /* sys-v forgot this in pwd.h! */
- +#endif
- struct utsname ourhost;
- #else
- char ourhost[128];
- @@ -27,7 +30,7 @@
- register char *p;
- struct passwd *entry;
- int cnt;
- -#if defined(BSD) || defined(HPUX) || defined(IRIX4)
- +#if defined(BSD) || defined(HPUX) || defined(IRIX4) || defined(__linux__)
- struct hostent *hp;
- #endif /* BSD || HPUX || IRIX4 */
-
- @@ -98,7 +101,7 @@
- escape = DEF_ESCAPE;
- prompt = DEF_PROMPT;
-
- -#if defined(BSD) || defined(HPUX) || defined(IRIX4)
- +#if defined(BSD) || defined(HPUX) || defined(IRIX4) || defined(__linux__)
- (void) gethostname(ourhost, sizeof ourhost);
- if (!(hp = gethostbyname(ourhost))) {
- if (ourname = (char **)calloc((unsigned)2, sizeof (char *)))
- --- lock.c
- +++ lock.c 1994/07/17 21:29:17
- @@ -14,6 +14,12 @@
- #include <sys/locking.h>
- #endif /* SYSV && !USG */
-
- +#ifdef __linux__
- +#undef USG
- +#undef SYSV
- +#define BSD
- +#endif
- +
- #ifdef DOT_LOCK
-
- #ifndef DOLOCK_PATH
- @@ -253,6 +259,7 @@
- /*
- * Define some BSD names for the SYSV world
- */
- +#ifndef __linux__
- #ifdef USG
- #define LOCK_SH F_RDLCK
- #define LOCK_EX F_WRLCK
- @@ -263,6 +270,7 @@
- #define LOCK_UN LK_UNLCK
- #endif /* USG */
- #define LOCK_NB 0 /* Always non-blocking in this case */
- +#endif /* __linux__ */
-
- #ifdef EWOULDBLOCK
- #undef EWOULDBLOCK
- --- mail.c
- +++ mail.c 1994/07/17 21:18:35
- @@ -26,6 +26,8 @@
- FILE *ed_fp;
- char *hfile, *mktemp();
-
- +static int mail_someone();
- +
- /* argc and argv could be null if coming from tool mode compose */
- do_mail(n, argv, list)
- register int n; /* no need for "argc", so use the space for a variable */
- --- makefile.sys.v
- +++ makefile.sys.v 1994/07/17 21:18:35
- @@ -23,7 +23,7 @@
-
- # Sun OS systems who wish to compile with sys-v options:
- # CC= /usr/5bin/cc
- -# CFLAGS= -O -DSYSV -DCURSES -DUSG -DDIRECTORY
- +# CFLAGS= -O -DSYSV -DCURSES -DUSG -DDIRECTORY -UREGCMP
- # LIBS= -L/usr/5lib -lcurses
-
- # IRIX 3.2 systems (SGI Iris workstations) should add -DDIRECTORY to CFLAGS
- @@ -31,9 +31,9 @@
- # System V Release 4 (SunOS 5?) should add -DSVR4 -DDIRECTORY to CFLAGS and
- # should replace -lPW with -lgen
-
- -CFLAGS= -O -DSYSV -DUSG -DCURSES -DREGCMP -DSIGRET=void
- +CFLAGS= -fwritable-strings -O6 -fomit-frame-pointer -m486 -DSYSV -DUSG -DCURSES -DSIGRET=void -DENV_MAIL
- LDFLAGS=
- -LIBS= -lcurses -lPW
- +LIBS= -lcurses -ltermcap #-lPW
- OTHERLIBS=
- # Use some variant of this one if you #define MMDF in config.h
- #OTHERLIBS=/usr/src/mmdf/lib/libmmdf.a
- @@ -47,10 +47,10 @@
- $(OBJS2): $(HDRS1) $(HDRS2) $(HDRS3)
- loop.o: version.h
-
- -BINDIR= /usr/local/bin
- -LIBDIR= /usr/local/lib
- +BINDIR= /usr/bin
- +LIBDIR= /usr/lib
- MRCDIR= /usr/lib
- -MANDIR= /usr/local/man/man1
- +MANDIR= /usr/man/man1
- MANEXT= 1
-
- install: mush
- --- msgs.c
- +++ msgs.c 1994/07/17 21:18:35
- @@ -516,7 +516,9 @@
- struct utimbuf times[1];
- (void) fflush(mail_fp); /* just in case */
- times[0].modtime = time(×[0].actime) - 2;
- +#ifndef __linux__
- times[0].ausec = times[0].modusec = 0;
- +#endif /* __linux__ */
- #else /* !POSIX_UTIME */
- long times[2];
- (void) fflush(mail_fp); /* just in case */
- --- mush.h
- +++ mush.h 1994/07/17 21:18:35
- @@ -31,7 +31,7 @@
- #else /* CURSES */
- #include <stdio.h>
- #if defined(SYSV) && defined(USG) || defined(AIX)
- -#include <termio.h>
- +#include <termios.h>
- #endif /* SYSV && USG */
- #endif /* CURSES */
-
- @@ -39,6 +39,7 @@
- #include <sys/ttold.h>
- #endif /* SVR4 */
-
- +#include <sys/param.h>
- #include <ctype.h>
- #include <errno.h>
- #include <setjmp.h>
- @@ -91,7 +92,7 @@
- #endif /* SUNTOOL */
-
- #ifdef POSIX_UTIME
- -#include <sys/utime.h>
- +#include <utime.h> /* <sys/utime.h> */
- #endif /* POSIX_UTIME */
- #include <sys/stat.h>
- #include <sys/file.h>
- @@ -165,7 +166,7 @@
- #define stty(fd, sgttybuf) ioctl(fd, TIOCSETN, sgttybuf)
- #endif /* TIOCSETN */
-
- -/* for system-V machines that run termio */
- +/* for system-V machines that run termios */
- #if defined(SYSV) && defined(USG) || defined(AIX)
- #ifdef crmode
- #undef crmode
- @@ -173,13 +174,13 @@
- #endif /* nocrmode */
-
- unsigned char vmin, vtime;
- -#define sg_erase c_cc[2]
- +#define sg_erase c_cc[VERASE]
- #define sg_flags c_lflag
- -#define sg_kill c_cc[3]
- +#define sg_kill c_cc[VKILL]
- #define sg_ospeed c_cflag
- -#define gtty(fd, SGTTYbuf) ioctl(fd, TCGETA, SGTTYbuf)
- +#define gtty(fd, SGTTYbuf) ioctl(fd, TCGETS, SGTTYbuf)
- #undef stty
- -#define stty(fd, SGTTYbuf) ioctl(fd, TCSETAW, SGTTYbuf)
- +#define stty(fd, SGTTYbuf) ioctl(fd, TCSETSW, SGTTYbuf)
- #define echon() (_tty.sg_flags |= (ECHO|ECHOE), stty(0, &_tty))
- #define echoff() (_tty.sg_flags &= ~ECHO, stty(0, &_tty))
- #define cbrkon() \
- @@ -187,14 +188,17 @@
- #define cbrkoff() \
- (_tty.sg_flags |= ICANON,_tty.c_cc[VMIN] = vmin,_tty.c_iflag |= ICRNL, \
- _tty.c_cc[VTIME] = vtime, stty(0, &_tty))
- +#undef savetty
- #define savetty() \
- (void) gtty(0, &_tty), vtime = _tty.c_cc[VTIME], vmin = _tty.c_cc[VMIN]
- +#undef cbreak
- #define cbreak() cbrkon()
- +#undef nocbreak
- #define nocbreak() cbrkoff()
-
- /* If curses isn't defined, declare our 'tty' and macros for echo/cbreak */
- #ifndef CURSES
- -typedef struct termio SGTTY;
- +typedef struct termios SGTTY;
- #define echom() echon()
- #define noechom() echoff()
- #define crmode() cbrkon()
- --- signals.c
- +++ signals.c 1994/07/17 21:18:35
- @@ -8,6 +8,7 @@
-
- static int was_stopped;
-
- +#ifndef __linux__
- #ifndef SYSV
- extern char *sys_siglist[];
- #else
- @@ -35,6 +36,7 @@
- /* SIGPWR */ "power-fail restart"
- };
- #endif /* SYSV */
- +#endif /* __linux__ */
-
- SIGRET
- intrpt(sig)
- --- sort.c
- +++ sort.c 1994/07/17 21:18:35
- @@ -13,11 +13,12 @@
- static int depth, order, ignore_case;
- static jmp_buf sortbuf;
-
- +static int msg_cmp();
- +
- sort(argc, argv, list)
- register int argc;
- register char *argv[], list[];
- {
- - int msg_cmp();
- SIGRET (*oldint)(), (*oldquit)();
- int n, offset = -1, range = 0;
- long curr_msg_off = msg[current_msg].m_offset;
-