Relay-Version: version B 2.10.3 4.3bsd-beta 6/6/85; site seismo.UUCP Posting-Version: version B 2.10.2 9/3/84; site genrad.UUCP Path: seismo!harvard!talcott!panda!grkermi!genrad!sources-request From: sources-request@genrad.UUCP Newsgroups: mod.sources Subject: Bourne shell history + tilde + job control + more (Part 5 of 9) Message-ID: <883@genrad.UUCP> Date: 11 Jun 85 15:46:38 GMT Sender: john@genrad.UUCP Lines: 2657 Approved: john@genrad.UUCP From: Arnold Robbins This is part 5 of 9. It contains the first set of code diffs for the System V Release 2 Bourne shell. BSD users who happen to also have source for System V Release 2 will probably want to use this version of the shell, since it has many bug fixes and improvements over the (much) earlier version that comes with Berkeley Unix. Arnold Robbins arnold@gatech.{UUCP, CSNET} ----------- pretend your screen is really a paper towel ------------ :::::::: :fix ::::::: No differences encountered :::::::: args.c ::::::: *** ../orig.u/args.c Wed May 15 17:08:06 1985 --- args.c Mon May 20 15:20:33 1985 *************** *** 13,19 extern struct dolnod *freeargs(); static struct dolnod *dolh; ! char flagadr[14]; char flagchar[] = { --- 13,23 ----- extern struct dolnod *freeargs(); static struct dolnod *dolh; ! #if JOBS ! char flagadr[19]; ! #else ! char flagadr[17]; ! #endif char flagchar[] = { *************** *** 30,35 'h', 'f', 'a', 0 }; --- 34,46 ----- 'h', 'f', 'a', + #if JOBS + 'J', + 'I', + #endif + 'E', + 'q', /* ADR --- -q to not read ~/.shrc */ + 'H', /* ADR --- -H to turn off history mechanism */ 0 }; *************** *** 48,53 hashflg, nofngflg, exportflg, 0 }; --- 59,71 ----- hashflg, nofngflg, exportflg, + #if JOBS + jobflg, + infoflg, + #endif + noeotflg, + quickflg, + nohistflg, 0 }; *************** *** 83,89 /* * Step along 'flagchar[]' looking for matches. ! * 'sicr' are not legal with 'set' command. */ while (*++cp) --- 101,107 ----- /* * Step along 'flagchar[]' looking for matches. ! * 'sicrq' are not legal with 'set' command. */ while (*++cp) *************** *** 93,99 flagc++; if (*cp == *flagc) { ! if (eq(argv[0], "set") && any(*cp, "sicr")) failed(argv[1], badopt); else { --- 111,117 ----- flagc++; if (*cp == *flagc) { ! if (eq(argv[0], "set") && any(*cp, "sicrq")) failed(argv[1], badopt); else { *************** *** 97,102 failed(argv[1], badopt); else { flags |= flagval[flagc-flagchar]; if (flags & errflg) eflag = errflg; --- 115,124 ----- failed(argv[1], badopt); else { + #if JOBS + if (*cp == 'J') + j_init(); + #endif flags |= flagval[flagc-flagchar]; if (flags & errflg) eflag = errflg; *************** *** 116,121 argc--; } else if (argc > 1 && *argp[1] == '+') /* unset flags x, k, t, n, v, e, u */ { cp = argp[1]; while (*++cp) --- 138,144 ----- argc--; } else if (argc > 1 && *argp[1] == '+') /* unset flags x, k, t, n, v, e, u */ + /* or jobs or history flag */ { cp = argp[1]; while (*++cp) *************** *** 126,132 /* * step through flags */ ! if (!any(*cp, "sicr") && *cp == *flagc) { /* * only turn off if already on --- 149,155 ----- /* * step through flags */ ! if (!any(*cp, "sicrq") && *cp == *flagc) { /* * only turn off if already on *************** *** 133,139 */ if ((flags & flagval[flagc-flagchar])) { ! flags &= ~(flagval[flagc-flagchar]); if (*cp == 'e') eflag = 0; } --- 156,165 ----- */ if ((flags & flagval[flagc-flagchar])) { ! #if JOBS ! if (*cp != 'J' || !j_finish(FALSE)) ! #endif ! flags &= ~(flagval[flagc-flagchar]); if (*cp == 'e') eflag = 0; } :::::::: blok.c ::::::: *** ../orig.u/blok.c Wed May 15 17:08:06 1985 --- blok.c Thu May 16 16:56:01 1985 *************** *** 102,107 { register struct blk *p; if ((p = ap) && p < bloktop) { #ifdef DEBUG --- 102,116 ----- { register struct blk *p; + #if gould + /* + * On Vax, (struct blk *)csrt) + #else if ((p = ap) && p < bloktop) #endif { ***********