summaryrefslogtreecommitdiff
path: root/shells/v7sh/files/patch-error.c
diff options
context:
space:
mode:
authorPav Lucistnik <pav@FreeBSD.org>2004-06-22 08:24:19 +0000
committerPav Lucistnik <pav@FreeBSD.org>2004-06-22 08:24:19 +0000
commit6b787b91fc0797ed15597e469b619422097a60bb (patch)
treea1b95711a4085320a1bc7b8bb0ee0183fb21ec47 /shells/v7sh/files/patch-error.c
parent- Fix runtime on nvidia driver (diff)
Add v7sh, the original Steve R. Bourne shell from the 7th edition Unix including
System III, 4.3BSD-Reno, Ultrix 3.1 and `home made'' fixes and enhancements PR: ports/68127 Submitted by: Cyrille Lefevre <cyrille.lefevre@laposte.net>
Notes
Notes: svn path=/head/; revision=111975
Diffstat (limited to 'shells/v7sh/files/patch-error.c')
-rw-r--r--shells/v7sh/files/patch-error.c91
1 files changed, 91 insertions, 0 deletions
diff --git a/shells/v7sh/files/patch-error.c b/shells/v7sh/files/patch-error.c
new file mode 100644
index 000000000000..7b73594922c9
--- /dev/null
+++ b/shells/v7sh/files/patch-error.c
@@ -0,0 +1,91 @@
+diff -u -x CVS -x work -x core -x *.core -x #* -x *~ -x *.orig -x *.rej -I $Id.*$ -I $.+BSD.*$ error.c.orig error.c
+--- error.c.orig Fri Jun 4 02:51:01 2004
++++ error.c Sat Jun 19 18:42:22 2004
+@@ -9,15 +9,17 @@
+
+ #include "defs.h"
+
++STRING exitadr;
++INT exitval;
+
+ /* ======== error handling ======== */
+
+-exitset()
++VOID exitset()
+ {
+ assnum(&exitadr,exitval);
+ }
+
+-sigchk()
++VOID sigchk()
+ {
+ /* Find out if it is time to go away.
+ * `trapnote' is set to SIGSET when fault is seen and
+@@ -25,26 +27,29 @@
+ */
+ IF trapnote&SIGSET
+ THEN exitsh(SIGFAIL);
++ /*NOTREACHED*/
+ FI
+ }
+
+-failed(s1,s2)
+- STRING s1, s2;
++VOID failed(s1,s2)
++ CSTRING s1, s2;
+ {
+ prp(); prs(s1);
+ IF s2
+ THEN prs(colon); prs(s2);
+ FI
+ newline(); exitsh(ERROR);
++ /*NOTREACHED*/
+ }
+
+-error(s)
+- STRING s;
++VOID error(s)
++ CSTRING s;
+ {
+ failed(s,NIL);
++ /*NOTREACHED*/
+ }
+
+-exitsh(xno)
++VOID exitsh(xno)
+ INT xno;
+ {
+ /* Arrive here from `FATAL' errors
+@@ -57,23 +62,29 @@
+ exitval=xno;
+ IF (flags & (forked|errflg|ttyflg)) != ttyflg
+ THEN done();
++ /*NOTREACHED*/
+ ELSE clearup();
++#if defined(SYSIII)
++ execbrk = breakcnt = 0;
++#endif
+ longjmp(errshell,1);
+ FI
+ }
+
+-done()
++VOID done()
+ {
+ REG STRING t;
+- IF t=trapcom[0]
++
++ IF (t=trapcom[0])!=NIL /* GCC */
+ THEN trapcom[0]=0; /*should free but not long */
+ execexp(t,0);
+ FI
+ rmtemp(0);
+ exit(exitval);
++ /*NOTREACHED*/
+ }
+
+-rmtemp(base)
++VOID rmtemp(base)
+ IOPTR base;
+ {
+ WHILE iotemp>base