mshell port

This commit is contained in:
angelos 1998-05-20 08:01:31 +00:00
parent fa5d2d46cd
commit 2bb6d8d3df
10 changed files with 210 additions and 0 deletions

26
misc/mshell/Makefile Normal file
View File

@ -0,0 +1,26 @@
# OpenBSD makefile for: mshell
# Version required: 93/3/3
# Date created: May 20 1998
# Whom: Angelos D. Keromytis
#
# $OpenBSD: Makefile,v 1.1.1.1 1998/05/20 08:01:31 angelos Exp $
#
DISTNAME= mshell
PKGNAME= mshell-1.0
CATEGORIES= misc
MASTER_SITES= ftp://src.doc.ic.ac.uk/usenet/alt.sources/articles/07000-07999/
DISTFILES= 7432.Z
MAINTAINER= angelos@openbsd.org
NO_WRKSUBDIR= yes
MAN1= mshell.1
do-extract:
@rm -rf ${WRKDIR}
@${MKDIR} ${WRKDIR}
zcat ${DISTDIR}/${DISTFILES} |(cd ${WRKDIR}; \
awk '{if (/^#!/) x++} {if(x) print $$0'}| /bin/sh)
.include <bsd.port.mk>

1
misc/mshell/files/md5 Normal file
View File

@ -0,0 +1 @@
MD5 (7432.Z) = 1bbfe1b922ad2ffbe3456cd7ce0f5117

View File

@ -0,0 +1,62 @@
*** Makefile.orig Tue May 27 00:29:12 1997
--- Makefile Tue May 27 02:13:51 1997
***************
*** 8,21 ****
#
# Check mshell.h for other options, e.g., max menu sizes.
! CFLAGS = -O -DBSD -DMENUDIR='"/nyx/lib/menus"' -DLOGDIR='"/nyx/lib/logs"'
OBJS = mshell.o main.o string.o functions1.o functions2.o chdir.o mail.o \
settatr.o setenv.o xsystem.o dl.o macro.o
mshell: $(OBJS)
! cc $(CFLAGS) $(OBJS) -lcurses -ltermcap -o mshell
$(OBJS) : mshell.h
clean:
! rm *.o mshell
--- 8,50 ----
#
# Check mshell.h for other options, e.g., max menu sizes.
! CFLAGS = -O -DBSD -DMENUDIR=\"${PREFIX}/lib/menus\" -DMAILDIR='"/var/mail/"' \
! -DGLOBAL_MACRO_FILE=\"${PREFIX}/lib/menus/macros\" \
! -DCOMMAND_LIST=\"${PREFIX}/lib/menus/commands\"
OBJS = mshell.o main.o string.o functions1.o functions2.o chdir.o mail.o \
settatr.o setenv.o xsystem.o dl.o macro.o
+ all: mshell
+
mshell: $(OBJS)
! cc $(CFLAGS) $(OBJS) -lcurses -ltermlib -o mshell
$(OBJS) : mshell.h
clean:
! rm -f *.o mshell
!
! install: mshell
! mkdir -p ${PREFIX}/bin
! install -c -o bin mshell ${PREFIX}/bin
! mkdir -p ${PREFIX}/lib/menus
! sed -e s/dldir/HOME/g < sample.men > ${PREFIX}/lib/menus/sample.men
! install -c -m 644 menulogin ${PREFIX}/lib/menus
! mkdir -p ${PREFIX}/man/man1
! echo .Dd `/bin/date` > mshell.1
! echo .Dt MSHELL 1 >> mshell.1
! echo .Sh NAME >> mshell.1
! echo .Nm mshell >> mshell.1
! echo .Nd a Unix menuing shell >> mshell.1
! echo .Sh SYNOPSIS >> mshell.1
! echo .Nm mshell >> mshell.1
! echo .Op Fl s >> mshell.1
! echo .Ar menuname >> mshell.1
! echo .Sh DESCRIPTION >> mshell.1
! cat mshell.doc >>mshell.1
! echo >>mshell.1
! cat menu.doc >>mshell.1
! echo >>mshell.1
! echo .Sh AUTHOR >>mshell.1
! echo Andrew Burt, aburt@du.edu >>mshell.1
! install -m 644 mshell.1 ${PREFIX}/man/man1

View File

@ -0,0 +1,46 @@
*** settatr.c.orig Sat Sep 24 00:47:17 1994
--- settatr.c Sat Sep 24 00:49:46 1994
***************
*** 15,21 ****
ioctl ( 0, TIOCGETP, &sg );
if (access(".stty", 0) == -1) { /* not already set up */
sg.sg_erase = '';
! sg.sg_kill = '';
sg.sg_flags |= XTABS;
}
sg.sg_flags |= ECHO;
--- 15,21 ----
ioctl ( 0, TIOCGETP, &sg );
if (access(".stty", 0) == -1) { /* not already set up */
sg.sg_erase = '';
! sg.sg_kill = 21; /* ^U */
sg.sg_flags |= XTABS;
}
sg.sg_flags |= ECHO;
***************
*** 25,36 ****
ioctl ( 0, TIOCSETP, &sg );
ioctl ( 0, TIOCGETC, &tc );
! tc.t_intrc = '';
ioctl ( 0, TIOCSETC, &tc );
ioctl ( 0, TIOCGLTC, &lt );
! lt.t_werasc = '';
! lt.t_rprntc = '';
ioctl ( 0, TIOCSLTC, &lt );
#endif
#ifdef SYSV
--- 25,36 ----
ioctl ( 0, TIOCSETP, &sg );
ioctl ( 0, TIOCGETC, &tc );
! tc.t_intrc = 3; /* ^C */
ioctl ( 0, TIOCSETC, &tc );
ioctl ( 0, TIOCGLTC, &lt );
! lt.t_werasc = 23; /* ^W */
! lt.t_rprntc = 18; /* ^R */
ioctl ( 0, TIOCSLTC, &lt );
#endif
#ifdef SYSV

View File

@ -0,0 +1,19 @@
*** functions1.c.orig Sat Sep 24 00:51:45 1994
--- functions1.c Sat Sep 24 00:52:03 1994
***************
*** 15,21 ****
FILE * fp;
char record [DESCLEN];
if (( fp = fopen (filename, "r")) == NULL ) {
! printf ("\tNo such helpfile as %s\!\!\n", filename);
return;
}
--- 15,21 ----
FILE * fp;
char record [DESCLEN];
if (( fp = fopen (filename, "r")) == NULL ) {
! printf ("\tNo such helpfile as %s!!\n", filename);
return;
}

View File

@ -0,0 +1,19 @@
*** mshell.c.orig Sat Sep 24 00:51:51 1994
--- mshell.c Sat Sep 24 00:52:20 1994
***************
*** 142,148 ****
if ( strcmp (action_string, NULLSTR) == 0 ) {
invalid_option = TRUE;
! printf ("\tNo such help option name as: %s\!\!\n", opt2);
}
else {
tmpword[0] = EOS;
--- 142,148 ----
if ( strcmp (action_string, NULLSTR) == 0 ) {
invalid_option = TRUE;
! printf ("\tNo such help option name as: %s!!\n", opt2);
}
else {
tmpword[0] = EOS;

View File

@ -0,0 +1,22 @@
*** string.c.orig Fri Sep 23 18:34:06 1994
--- string.c Fri Sep 23 18:50:39 1994
***************
*** 4,9 ****
--- 4,20 ----
#define strchr index
#endif
+ char *
+ gets (char *s)
+ {
+ char *x = fgets (s, WORDLEN, stdin);
+ if (x) {
+ char *p = strchr (x, '\n');
+ if (p)
+ *p = 0;
+ }
+ return x;
+ }
/* function to find the position of sub_string in main_string
* ---------------------------------------------------------- */

1
misc/mshell/pkg/COMMENT Normal file
View File

@ -0,0 +1 @@
A Unix menuing shell.

10
misc/mshell/pkg/DESCR Normal file
View File

@ -0,0 +1,10 @@
Mshell was written to shield users (and other non-Unix gurus, like
mathematicians and secretaries in the department) from "raw" Unix. It
is as flexible as you can get (supports full shell capabilties like
pipes, etc. inside the menu commands) but simple to write menus for.
It is was developped for Nyx, a free, public access Unix system.
Indeed, you're welcome to try Nyx -- log into Nyx as:
- telnet to nyx.cs.du.edu (130.253.192.68), user 'new'.
- call 303-871-3324

4
misc/mshell/pkg/PLIST Normal file
View File

@ -0,0 +1,4 @@
lib/menus/sample.men
lib/menus/menulogin
man/man1/mshell.1
bin/mshell