diff options
author | Will Andrews <will@FreeBSD.org> | 2000-12-31 06:02:40 +0000 |
---|---|---|
committer | Will Andrews <will@FreeBSD.org> | 2000-12-31 06:02:40 +0000 |
commit | 58e54dfd2300055f4b5285d83ee10d7c37f91b71 (patch) | |
tree | d2fc2d23bfd7c870e396a8d68ac2fee1d3e06bca /shells | |
parent | 641bd655c323339a63706419249effce58575383 (diff) | |
download | ports-58e54dfd2300055f4b5285d83ee10d7c37f91b71.tar.gz ports-58e54dfd2300055f4b5285d83ee10d7c37f91b71.zip |
Add pash 2.2, a full-screen shell, similar to Midnight Commander. Some
patches were included to fix various bugs (including what I believe are
potential overflow bugs involving gets()).
PR: 23949
Submitted by: George Reid <greid@ukug.uk.freebsd.org>
Notes
Notes:
svn path=/head/; revision=36511
Diffstat (limited to 'shells')
-rw-r--r-- | shells/Makefile | 1 | ||||
-rw-r--r-- | shells/pash/Makefile | 30 | ||||
-rw-r--r-- | shells/pash/distinfo | 1 | ||||
-rw-r--r-- | shells/pash/files/patch-aa | 20 | ||||
-rw-r--r-- | shells/pash/files/patch-ab | 10 | ||||
-rw-r--r-- | shells/pash/files/patch-ac | 42 | ||||
-rw-r--r-- | shells/pash/files/patch-ad | 12 | ||||
-rw-r--r-- | shells/pash/files/patch-ae | 285 | ||||
-rw-r--r-- | shells/pash/files/patch-af | 13 | ||||
-rw-r--r-- | shells/pash/files/patch-ag | 11 | ||||
-rw-r--r-- | shells/pash/pkg-comment | 1 | ||||
-rw-r--r-- | shells/pash/pkg-descr | 17 | ||||
-rw-r--r-- | shells/pash/pkg-plist | 4 |
13 files changed, 447 insertions, 0 deletions
diff --git a/shells/Makefile b/shells/Makefile index 2032a7b9c5be..d8e63c42c4cb 100644 --- a/shells/Makefile +++ b/shells/Makefile @@ -9,6 +9,7 @@ SUBDIR += flash SUBDIR += ksh93 SUBDIR += osh + SUBDIR += pash SUBDIR += pdksh SUBDIR += perlsh SUBDIR += rc diff --git a/shells/pash/Makefile b/shells/pash/Makefile new file mode 100644 index 000000000000..207964d6649d --- /dev/null +++ b/shells/pash/Makefile @@ -0,0 +1,30 @@ +# New ports collection makefile for: pash +# Date created: 30 December 2000 +# Whom: George Reid <greid@ukug.uk.freebsd.org> +# +# $FreeBSD$ +# + +PORTNAME= pash +PORTVERSION= 2.2 +CATEGORIES= shells +MASTER_SITES= http://www.chez-pierre.com/pash/Archives/ +DISTNAME= pash.sources + +MAINTAINER= greid@ukug.uk.freebsd.org + +NO_WRKSUBDIR= yes + +MAKEFILE= makefile + +do-install: + ${INSTALL_PROGRAM} ${WRKSRC}/pash ${PREFIX}/bin/pash + +post-install: + @${ECHO} "updating /etc/shells" + @${CP} /etc/shells /etc/shells.bak + @(${GREP} -v ${PREFIX}/bin/osh /etc/shells.bak; \ + ${ECHO} ${PREFIX}/bin/pash) > /etc/shells + @${RM} /etc/shells.bak + +.include <bsd.port.mk> diff --git a/shells/pash/distinfo b/shells/pash/distinfo new file mode 100644 index 000000000000..1a5f258245e9 --- /dev/null +++ b/shells/pash/distinfo @@ -0,0 +1 @@ +MD5 (pash.sources.tar.gz) = 38fd3ef6fddc84cbd484073404238af6 diff --git a/shells/pash/files/patch-aa b/shells/pash/files/patch-aa new file mode 100644 index 000000000000..3b2bc71311d4 --- /dev/null +++ b/shells/pash/files/patch-aa @@ -0,0 +1,20 @@ +--- ash.c.orig Sun Jan 12 17:39:42 1997 ++++ ash.c Sat Dec 30 03:05:28 2000 +@@ -1850,7 +1850,7 @@ + printf("Display=Color|B/W\n"); + printf("\n[Press Enter for more...]"); + fflush(stdout); +- gets(DummyStr); ++ fgets(DummyStr, DUMMYSTR_SIZE, stdin); + printf("\nOverriding configuration file on the command line:\n\n"); + printf("-s pc|vt|text for screen configuration\n"); + printf("-k posix|system_v|bsd|/usr/group for keyboard configuration\n"); +@@ -2012,7 +2012,7 @@ + printf("Type pash -h or see pash.txt for informations about this file.\n\n"); + printf("[Press Enter to go on...]"); + fflush(stdout); +- gets(Buffer); ++ fgets(Buffer, sizeof(Buffer), stdin); + } + + for(i=1;i<argc;i++) diff --git a/shells/pash/files/patch-ab b/shells/pash/files/patch-ab new file mode 100644 index 000000000000..64a3c6c53ebb --- /dev/null +++ b/shells/pash/files/patch-ab @@ -0,0 +1,10 @@ +--- ash.h.orig Wed Nov 6 21:13:06 1996 ++++ ash.h Sat Dec 30 02:28:03 2000 +@@ -14,7 +14,6 @@ + #include <sys/stat.h> + #include <fcntl.h> + #include <dirent.h> +-#include <malloc.h> + #include <time.h> + #include <unistd.h> + #include <errno.h> diff --git a/shells/pash/files/patch-ac b/shells/pash/files/patch-ac new file mode 100644 index 000000000000..2d6028ee65fe --- /dev/null +++ b/shells/pash/files/patch-ac @@ -0,0 +1,42 @@ +--- copy.c.orig Wed Nov 6 21:13:06 1996 ++++ copy.c Sat Dec 30 02:30:37 2000 +@@ -305,9 +305,6 @@ + case ENOSPC: + AddAnswerBoxItem(&InfoMsg,"Out of inodes."); + break; +- case ENOSR: +- AddAnswerBoxItem(&InfoMsg,"Unable to allocate stream."); +- break; + case ENOENT: + case ENOTDIR: + AddAnswerBoxItem(&InfoMsg,"Invalid file specification."); +@@ -369,9 +366,6 @@ + case ENOSPC: + AddAnswerBoxItem(&InfoMsg,"Out of inodes."); + break; +- case ENOSR: +- AddAnswerBoxItem(&InfoMsg,"Unable to allocate stream."); +- break; + case ENOENT: + case ENOTDIR: + AddAnswerBoxItem(&InfoMsg,"Invalid file specification."); +@@ -992,9 +986,6 @@ + case ENOSPC: + AddAnswerBoxItem(&InfoMsg,"Out of inodes."); + break; +- case ENOSR: +- AddAnswerBoxItem(&InfoMsg,"Unable to allocate stream."); +- break; + case ENOENT: + case ENOTDIR: + AddAnswerBoxItem(&InfoMsg,"Invalid file specification."); +@@ -1055,9 +1046,6 @@ + break; + case ENOSPC: + AddAnswerBoxItem(&InfoMsg,"Out of inodes."); +- break; +- case ENOSR: +- AddAnswerBoxItem(&InfoMsg,"Unable to allocate stream."); + break; + case ENOENT: + case ENOTDIR: diff --git a/shells/pash/files/patch-ad b/shells/pash/files/patch-ad new file mode 100644 index 000000000000..e099eebf002d --- /dev/null +++ b/shells/pash/files/patch-ad @@ -0,0 +1,12 @@ +--- findfile.c.orig Wed Nov 6 21:39:52 1996 ++++ findfile.c Sat Dec 30 02:30:51 2000 +@@ -201,9 +201,6 @@ + case ENOSPC: + AddAnswerBoxItem(&InfoMsg,"Out of inodes."); + break; +- case ENOSR: +- AddAnswerBoxItem(&InfoMsg,"Unable to allocate stream."); +- break; + case ENOTDIR: + AddAnswerBoxItem(&InfoMsg,"Invalid file specification."); + break; diff --git a/shells/pash/files/patch-ae b/shells/pash/files/patch-ae new file mode 100644 index 000000000000..af0e10071988 --- /dev/null +++ b/shells/pash/files/patch-ae @@ -0,0 +1,285 @@ +--- keyboard.c.orig Sun Jan 12 18:11:44 1997 ++++ keyboard.c Sat Dec 30 03:06:17 2000 +@@ -26,7 +26,7 @@ + #define _TEXT_TAIL_ ':' + + /* Memorisation de l'etat de depart du terminal */ +-struct termio _InitialState_; ++struct termios _InitialState_; + int _fcntl_flags_; + + jmp_buf _uk_buf_, /* Reveil de lecture des touches speciales */ +@@ -104,7 +104,7 @@ + case SIGBUS: printf("SIGBUS"); break; + case SIGSEGV: printf("SIGSEGV"); break; + case SIGPIPE: printf("SIGPIPE"); break; +- case SIGCLD: printf("SIGCLD"); break; ++ case SIGCHLD: printf("SIGCHLD"); break; + } + if(_InFree_) printf(" (%d) received on a free() system call. Exiting.\n",Num); + else printf(" (%d) received. Exiting.\n",Num); +@@ -229,7 +229,7 @@ + void GetKey(char *Buf) + { + int i; +- struct termio Avant,Apres; ++ struct termios Avant,Apres; + #ifdef SIGACT + struct sigaction IntNew,IntOld, + TermNew,TermOld, +@@ -259,21 +259,21 @@ + QuitFct = signal(SIGQUIT,_terminate_); + #endif + +- ioctl(0,TCGETA,&Avant); ++ tcgetattr(0, &Avant); + +- memcpy(&Apres,&Avant,sizeof(struct termio)); +- Apres.c_iflag &= ~(INLCR | ICRNL | IUCLC | ISTRIP | BRKINT | IXON); ++ memcpy(&Apres,&Avant,sizeof(struct termios)); ++ Apres.c_iflag &= ~(INLCR | ICRNL | ISTRIP | BRKINT | IXON); + Apres.c_oflag &= ~OPOST; + Apres.c_lflag &= ~ICANON; + Apres.c_cc[VMIN] = MAX_KEY; + Apres.c_cc[VTIME] = 1; +- ioctl(0,TCSETA,&Apres); ++ tcsetattr(0, TCSANOW, &Apres); + + for(i=0;i<MAX_KEY;i++) Buf[i] = 0; + + while((read(0,Buf,MAX_KEY) == -1) && (errno == EINTR)); + +- ioctl(0,TCSETA,&Avant); ++ tcsetattr(0, TCSANOW, &Avant); + + #ifdef SIGACT + sigaction(SIGINT,&IntOld,&IntNew); +@@ -388,7 +388,7 @@ + char Temp[MAX_KEY]; + int i,offset,rc,Code = -1,Fini = 0,CodeRead; + unsigned int Remains; +- struct termio Avant,Apres; ++ struct termios Avant,Apres; + #ifdef SIGACT + struct sigaction IntNew,IntOld, + TermNew,TermOld, +@@ -418,14 +418,13 @@ + QuitFct = signal(SIGQUIT,_terminate_); + #endif + +- ioctl(0,TCGETA,&Avant); ++ tcgetattr(0, &Avant); + + for(i=0;i<MAX_KEY;i++) Temp[i] = 0; + +- memcpy(&Apres,&Avant,sizeof(struct termio)); ++ memcpy(&Apres,&Avant,sizeof(struct termios)); + Apres.c_iflag &= ~(INLCR | /* Pas de conversion LF -> CR */ + ICRNL | /* Pas de conversion CR -> LF */ +- IUCLC | /* Pas de conversion Maj -> Min */ + ISTRIP | /* Pas de conversion 8 bits -> 7 bits */ + BRKINT | /* Pas de caractere de controle */ + IXON); /* Pas de controle de flux par Ctrl-S */ +@@ -435,7 +434,7 @@ + Apres.c_cc[VSTOP] = 0; /* Pour empecher Ctrl-S d'envoyer un Stop */ + Apres.c_cc[VSTART] = 0; /* Si Ctrl-S est deconnecte, Ctrl-Q ne */ + /* sert plus a rien: on le vire */ +- ioctl(0,TCSETA,&Apres); ++ tcsetattr(0, TCSANOW, &Apres); + + SetNonBlock(); + +@@ -477,7 +476,7 @@ + } + + SetBlock(); +- ioctl(0,TCSETA,&Avant); ++ tcsetattr(0, TCSANOW, &Avant); + + #ifdef SIGACT + sigaction(SIGINT,&IntOld,&IntNew); +@@ -512,7 +511,7 @@ + char Temp[MAX_KEY]; + int i,offset,rc,Code = -1,Fini = 0,CodeRead; + unsigned int Remains; +- struct termio Avant,Apres; ++ struct termios Avant,Apres; + #ifdef SIGACT + struct sigaction IntNew,IntOld, + TermNew,TermOld, +@@ -547,14 +546,13 @@ + QuitFct = signal(SIGQUIT,_terminate_); + #endif + +- ioctl(0,TCGETA,&Avant); ++ tcgetattr(0, &Avant); + + for(i=0;i<MAX_KEY;i++) Temp[i] = 0; + +- memcpy(&Apres,&Avant,sizeof(struct termio)); ++ memcpy(&Apres,&Avant,sizeof(struct termios)); + Apres.c_iflag &= ~(INLCR | /* Pas de conversion LF -> CR */ + ICRNL | /* Pas de conversion CR -> LF */ +- IUCLC | /* Pas de conversion Maj -> Min */ + ISTRIP | /* Pas de conversion 8 bits -> 7 bits */ + BRKINT | /* Pas de caractere de controle */ + IXON); /* Pas de controle de flux par Ctrl-S */ +@@ -564,7 +562,7 @@ + Apres.c_cc[VSTOP] = 0; /* Pour empecher Ctrl-S d'envoyer un Stop */ + Apres.c_cc[VSTART] = 0; /* Si Ctrl-S est deconnecte, Ctrl-Q ne */ + /* sert plus a rien: on le vire */ +- ioctl(0,TCSETA,&Apres); ++ tcsetattr(0, TCSANOW, &Apres); + + while((read(0,Temp,1) == -1) && (errno == EINTR)); + +@@ -596,7 +594,7 @@ + SetBlock(); + } + +- ioctl(0,TCSETA,&Avant); ++ tcsetattr(0, TCSANOW, &Avant); + + #ifdef SIGACT + sigaction(SIGINT,&IntOld,&IntNew); +@@ -619,7 +617,7 @@ + char Temp[MAX_KEY]; + int i,offset,rc,Code = -1,Fini = 0,CodeRead; + unsigned int Remains; +- struct termio Avant,Apres; ++ struct termios Avant,Apres; + #ifdef SIGACT + struct sigaction IntNew,IntOld, + TermNew,TermOld, +@@ -656,14 +654,13 @@ + QuitFct = signal(SIGQUIT,_terminate_); + #endif + +- ioctl(0,TCGETA,&Avant); ++ tcgetattr(0, &Avant); + + for(i=0;i<MAX_KEY;i++) Temp[i] = 0; + +- memcpy(&Apres,&Avant,sizeof(struct termio)); ++ memcpy(&Apres,&Avant,sizeof(struct termios)); + Apres.c_iflag &= ~(INLCR | /* Pas de conversion LF -> CR */ + ICRNL | /* Pas de conversion CR -> LF */ +- IUCLC | /* Pas de conversion Maj -> Min */ + ISTRIP | /* Pas de conversion 8 bits -> 7 bits */ + BRKINT | /* Pas de caractere de controle */ + IXON); /* Pas de controle de flux par Ctrl-S */ +@@ -673,7 +670,7 @@ + Apres.c_cc[VSTOP] = 0; /* Pour empecher Ctrl-S d'envoyer un Stop */ + Apres.c_cc[VSTART] = 0; /* Si Ctrl-S est deconnecte, Ctrl-Q ne */ + /* sert plus a rien: on le vire */ +- ioctl(0,TCSETA,&Apres); ++ tcsetattr(0, TCSANOW, &Apres); + + while((read(0,Temp,1) == -1) && (errno == EINTR)); + +@@ -738,7 +735,7 @@ + } + } + +- ioctl(0,TCSETA,&Avant); ++ tcsetattr(0, TCSANOW, &Avant); + + #ifdef SIGACT + sigaction(SIGINT,&IntOld,&IntNew); +@@ -767,7 +764,7 @@ + int Getch(void) + { + char Temp; +- struct termio Avant,Apres; ++ struct termios Avant,Apres; + #ifdef SIGACT + struct sigaction IntNew,IntOld, + TermNew,TermOld, +@@ -797,19 +794,19 @@ + QuitFct = signal(SIGQUIT,_terminate_); + #endif + +- ioctl(0,TCGETA,&Avant); +- memcpy(&Apres,&Avant,sizeof(struct termio)); +- Apres.c_iflag &= ~(INLCR | ICRNL | IUCLC | ISTRIP | IXON | BRKINT); ++ tcgetattr(0, &Avant); ++ memcpy(&Apres,&Avant,sizeof(struct termios)); ++ Apres.c_iflag &= ~(INLCR | ICRNL | ISTRIP | IXON | BRKINT); + Apres.c_oflag &= ~OPOST; + Apres.c_lflag &= ~ICANON; + Apres.c_cc[VMIN] = 1; + Apres.c_cc[VSTOP] = 0; + Apres.c_cc[VSTART] = 0; +- ioctl(0,TCSETA,&Apres); ++ tcsetattr(0, TCSANOW, &Apres); + + while((read(0,&Temp,1) == -1) && (errno == EINTR)); + +- ioctl(0,TCSETA,&Avant); ++ tcsetattr(0, TCSANOW, &Avant); + + #ifdef SIGACT + sigaction(SIGINT,&IntOld,&IntNew); +@@ -1021,7 +1018,7 @@ + SetKeyboard(); + printf("Please press the <Enter> key to begin..."); + fflush(stdout); +- gets(D); ++ fgets(D, sizeof(D), stdin); + + printf("\n\n"); + +@@ -1058,7 +1055,7 @@ + printf(" and restart the program.\n\n"); + printf("[Press Enter to go on...]"); + fflush(stdout); +- gets(D); ++ fgets(D, sizeof(D), stdin); + } + + /***************************************************************************** +@@ -1073,14 +1070,14 @@ + + void SetKeyboard(void) + { +- struct termio Tmp; ++ struct termios Tmp; + + /* Retablir les valeurs de depart */ + RestoreKeyboard(); +- memcpy(&Tmp,&_InitialState_,sizeof(struct termio)); ++ memcpy(&Tmp,&_InitialState_,sizeof(struct termios)); + /* Modifier ce qu'il faut */ + Tmp.c_lflag &= ~(ISIG | ECHO); +- ioctl(0,TCSETA,&Tmp); ++ tcsetattr(0, TCSANOW, &Tmp); + } + + /***************************************************************************** +@@ -1092,7 +1089,7 @@ + void RestoreKeyboard(void) + { + fcntl(0,F_SETFL,_fcntl_flags_); +- ioctl(0,TCSETA,&_InitialState_); ++ tcsetattr(0, TCSANOW, &_InitialState_); + } + + /***************************************************************************** +@@ -1128,7 +1125,7 @@ + sigaction(SIGHUP,&New,&Old); + sigaction(SIGUSR1,&New,&Old); + sigaction(SIGUSR2,&New,&Old); +- sigaction(SIGCLD,&New,&Old); ++ sigaction(SIGCHLD,&New,&Old); + sigemptyset(&New.sa_mask); + sigaction(SIGALRM,&New,&Old); + +@@ -1415,7 +1412,7 @@ + { fprintf(stderr,"Unable to get the terminal configuration through fcntl.\n"); + exit(1); } + fprintf(stderr,"Getting terminal configuration through ioctl().\n"); +- ioctl(0,TCGETA,&_InitialState_); ++ tcgetattr(0, &_InitialState_); + + fprintf(stderr,"Setting terminal state.\n"); + SetKeyboard(); diff --git a/shells/pash/files/patch-af b/shells/pash/files/patch-af new file mode 100644 index 000000000000..27f71b31bb55 --- /dev/null +++ b/shells/pash/files/patch-af @@ -0,0 +1,13 @@ +--- keyboard.h.orig Mon Nov 6 09:43:04 1995 ++++ keyboard.h Sat Dec 30 02:36:25 2000 +@@ -61,7 +61,8 @@ + #include <limits.h> + #include <signal.h> + #include <setjmp.h> +-#include <termio.h> ++#include <termios.h> ++#include <term.h> + #include <fcntl.h> + #include <errno.h> + #include <unistd.h> +Only in old: pash.sources.tar.gz diff --git a/shells/pash/files/patch-ag b/shells/pash/files/patch-ag new file mode 100644 index 000000000000..ffd73f02f0b8 --- /dev/null +++ b/shells/pash/files/patch-ag @@ -0,0 +1,11 @@ +--- screen.h.orig Sat Nov 11 20:31:16 1995 ++++ screen.h Sat Dec 30 02:27:14 2000 +@@ -28,7 +28,7 @@ + #include <stdio.h> + #include <stdlib.h> + #include <string.h> +-#include <termio.h> ++#include <term.h> + #include <signal.h> + #include <limits.h> + #include <unistd.h> diff --git a/shells/pash/pkg-comment b/shells/pash/pkg-comment new file mode 100644 index 000000000000..a576175c6c94 --- /dev/null +++ b/shells/pash/pkg-comment @@ -0,0 +1 @@ +A full-screen shell (commander GUI) for *nix. diff --git a/shells/pash/pkg-descr b/shells/pash/pkg-descr new file mode 100644 index 000000000000..2160c5f48e79 --- /dev/null +++ b/shells/pash/pkg-descr @@ -0,0 +1,17 @@ +Pash 2.2 is a full screen shell, a Commander for Unix. The versions +distributed through this website are ports of Pash to PC Unix +Operating Systems. + +The standard main screen displays 2 windows containing a listing of +the 2 current directories, a menu bar and a command line. + +Pash can switch to a 4 window mode. Here's a view of this feature +along with part of the pull-down menu system. Selected files in each +window will be highlighted. + +Besides all the classical file manipulation functions (copy, move, +...), Pash also acts as a shell, allowing you to control Processes and +IPC devices. + +- George Reid +greid@ukug.uk.freebsd.org diff --git a/shells/pash/pkg-plist b/shells/pash/pkg-plist new file mode 100644 index 000000000000..ad2ecb523ed4 --- /dev/null +++ b/shells/pash/pkg-plist @@ -0,0 +1,4 @@ +bin/pash +@exec echo "updating /etc/shells"; cp /etc/shells /etc/shells.bak; (grep -v %D/%F /etc/shells.bak; echo %D/%F) >/etc/shells +@unexec echo "updating /etc/shells"; cp /etc/shells /etc/shells.bak; (grep -v %D/%F /etc/shells.bak) >/etc/shells + |