1 diff -u -x CVS -x work -x core -x *.core -x #* -x *~ -x *.orig -x *.rej -I $Id.*$ -I $.+BSD.*$ builtin.c.orig builtin.c 2 --- builtin.c.orig Fri Jun 4 02:51:01 2004 3 +++ builtin.c Sat Jun 19 18:42:21 2004 4 @@ -1,2 +1,43 @@ 5 -builtin() 6 -{return(0);} 7 +#include "defs.h" 8 + 9 +#if defined(SYSIII) 10 +VOID builtin(xbuiltin, argn, com) 11 +/* 12 + builtin commands are those that Bourne did not intend 13 + to be part of his shell. 14 + Redirection of i/o, or rather the lack of it, is still a 15 + problem.. 16 +*/ 17 + INT xbuiltin; 18 + INT argn; 19 + STRING com[]; 20 +{ 21 + SWITCH xbuiltin IN 22 + case TEST: /* test expression */ 23 + exitval = test(argn,com); 24 + break; 25 + ENDSW 26 +} 27 + 28 +VOID bfailed(s1, s2, s3) 29 + /* fake diagnostics to continue to look like original 30 + test(1) diagnostics 31 + */ 32 + CSTRING s1, s2, s3; 33 +{ 34 + prp(); prs(s1); 35 + IF s2 36 + THEN prs(colon); prs(s2); prs(s3); 37 + FI 38 + newline(); exitsh(ERROR); 39 + /*NOTREACHED*/ 40 +} 41 +#else /* V7 */ 42 +INT builtin(argn, com) 43 + INT argn; 44 + STRING com[]; 45 +{ 46 + argn=argn; com=com; /* GCC */ 47 + return(0); 48 +} 49 +#endif 50