james@bigtex.cactus.org (James Van Artsdalen) (06/10/89)
Here are the patches I've generated so far. This is a verbatim "rcsdiff RCS/*" - I haven't removed local configuration changes to the makefile. A quick description: The file malloc-rcheck.c had to be renamed malloc-chk.c. The file unwind-protect.c had to be renamed unwind-prt.c The makefile dependencies were replaced with data from "gcc -MM" - The existing dependencies are neither complete nor accurate. "make clean" should remove y.tab.h too. SysV handles ulimit arguments differently than BSD. Add a struct rlimit for SysV. If we're using GNU C, use the built in alloca. Even if the OS provides an alloca, they're often broken, and certainly slower. Some SysVs have index and rindex #define'd in system header files - #undef if so. Avoid signed char to signed int promotions when reading from input: meta keys will cause confusion. The union wait declaration was wrong. I don't know which "i386" it was intended for. I replaced it with one that works for SysVr3.2 i386 and looks just like the BSD union. rl_dispatch() only takes one argument - remove spurious argument in calls. Return NULL for SysV hostname expansion. This isn't strictly right, as some SysVs (including mine) can do this, but make forward progress for now. SysV doesn't have SIGVTALRM or SIGPROF. /usr/bin/mail isn't exactly universal. Try /usr/lib/sendmail instead. A few minor cleanups that make compilers give fewer warnings. *** /tmp/,RCSt1a18934 Sat Jun 10 11:14:06 1989 --- Makefile Sat Jun 10 11:12:26 1989 *************** *** 27,48 **** # # The mailing address of you, the local maintainer. This *must* be # enclosed in double quotes. Until I make a better Makefile. ! MAINTAINER = '"bfox@ai.mit.edu"' # Destination installation directory. The shell is copied here if # you do a `make install'. The directory name does NOT end in a slash. ! DESTDIR = /usr/gnu/bin # The name of the target hardware. It makes a difference. If your # machine doesn't seem to be represented by one of the machines here, # try one and see how well you do. # SUN3, SUN4, VAX, SONY, CONVEX, HP, HP9KS300 ! TARGET = SUN3 # The name of the target operating system. There isn't such a big # difference between SUNOS3 and Bsd. But there might be in the future. # SUNOS3, SUNOS4, SYSV, Bsd, HPUX ! OS = SUNOS4 # You only need this if you are hacking the shell in a location # that doesn't do enough backups, or does a poor job. In that --- 27,48 ---- # # The mailing address of you, the local maintainer. This *must* be # enclosed in double quotes. Until I make a better Makefile. ! MAINTAINER = '"bug-bash@ai.mit.edu"' # Destination installation directory. The shell is copied here if # you do a `make install'. The directory name does NOT end in a slash. ! DESTDIR = /usr/local/bin # The name of the target hardware. It makes a difference. If your # machine doesn't seem to be represented by one of the machines here, # try one and see how well you do. # SUN3, SUN4, VAX, SONY, CONVEX, HP, HP9KS300 ! TARGET = ISC3_2 # The name of the target operating system. There isn't such a big # difference between SUNOS3 and Bsd. But there might be in the future. # SUNOS3, SUNOS4, SYSV, Bsd, HPUX ! OS = SYSV # You only need this if you are hacking the shell in a location # that doesn't do enough backups, or does a poor job. In that *************** *** 107,121 **** # end in a slash, as in `../lib/' ALLOC_SOURCE = ./alloc-files/ ! # Our malloc. Use alloc-files/malloc-rcheck.o for debugging, or # alloc-files/malloc.o if not. ! MALLOC = $(ALLOC_SOURCE)malloc-rcheck.o #MALLOC= $(ALLOC_SOURCE)malloc.o #ALLOCA= $(ALLOC_SOURCE)alloca.o ALLOC_HEADERS = $(ALLOC_SOURCE)getpagesize.h ALLOC_FILES = $(ALLOC_SOURCE)malloc.c $(ALLOC_SOURCE)alloca.c\ ! $(ALLOC_SOURCE)i386-alloca.s $(ALLOC_SOURCE)malloc-rcheck.c CSOURCES = shell.c parse.y general.c make_cmd.c print_cmd.c\ dispose_cmd.c execute_cmd.c variables.c builtins.c\ --- 107,121 ---- # end in a slash, as in `../lib/' ALLOC_SOURCE = ./alloc-files/ ! # Our malloc. Use alloc-files/malloc-chk.o for debugging, or # alloc-files/malloc.o if not. ! MALLOC = $(ALLOC_SOURCE)malloc-chk.o #MALLOC= $(ALLOC_SOURCE)malloc.o #ALLOCA= $(ALLOC_SOURCE)alloca.o ALLOC_HEADERS = $(ALLOC_SOURCE)getpagesize.h ALLOC_FILES = $(ALLOC_SOURCE)malloc.c $(ALLOC_SOURCE)alloca.c\ ! $(ALLOC_SOURCE)i386-alloca.s $(ALLOC_SOURCE)malloc-chk.c CSOURCES = shell.c parse.y general.c make_cmd.c print_cmd.c\ dispose_cmd.c execute_cmd.c variables.c builtins.c\ *************** *** 122,128 **** copy_cmd.c flags.c subst.c glob.c hash.c mailcheck.c\ test.c readline.c trap.c history.c jobs.c nojobs.c $(ALLOC_FILES)\ keymaps.c emacs_keymap.c vi_keymap.c funmap.c braces.c\ ! unwind_protect.c HSOURCES = history.h shell.h flags.h trap.h hash.h jobs.h readline.h\ builtins.h alias.c alias.h general.h variables.h config.h\ --- 122,128 ---- copy_cmd.c flags.c subst.c glob.c hash.c mailcheck.c\ test.c readline.c trap.c history.c jobs.c nojobs.c $(ALLOC_FILES)\ keymaps.c emacs_keymap.c vi_keymap.c funmap.c braces.c\ ! unwind_prt.c HSOURCES = history.h shell.h flags.h trap.h hash.h jobs.h readline.h\ builtins.h alias.c alias.h general.h variables.h config.h\ *************** *** 134,140 **** dispose_cmd.o execute_cmd.o variables.o builtins.o copy_cmd.o\ flags.o jobs.o subst.o glob.o hash.o mailcheck.o test.o\ readline.o trap.o history.o alias.o $(MALLOC) $(ALLOCA)\ ! braces.o unwind_protect.o # Documentation for the shell. DOCDIR = ./documentation/ --- 134,140 ---- dispose_cmd.o execute_cmd.o variables.o builtins.o copy_cmd.o\ flags.o jobs.o subst.o glob.o hash.o mailcheck.o test.o\ readline.o trap.o history.o alias.o $(MALLOC) $(ALLOCA)\ ! braces.o unwind_prt.o # Documentation for the shell. DOCDIR = ./documentation/ *************** *** 196,214 **** keymaps.c: emacs_keymap.c vi_keymap.c touch keymaps.c ! y.tab.h: y.tab.c ! alias.o: alias.h alias.c ! subst.o: subst.c shell.h ! make_cmd.o: shell.h config.h make_cmd.c ! print_cmd.o: shell.h y.tab.h print_cmd.c ! execute_cmd.o: shell.h y.tab.h config.h execute_cmd.c ! dispose_cmd.o: shell.h dispose_cmd.c ! copy_cmd.o: shell.h copy_cmd.c ! builtins.o: shell.h flags.h trap.h builtins.h jobs.h config.h builtins.c ! flags.o: flags.h flags.c config.h ! hash.o: hash.h hash.c ! trap.o: shell.h trap.h config.h trap.c ! variables.o: variables.h version.h flags.h readline: readline.c history.c keymaps.c funmap.c history.h readline.h $(GCC) $(TRADITIONAL) $(CFLAGS) -DTEST -o readline\ --- 196,234 ---- keymaps.c: emacs_keymap.c vi_keymap.c touch keymaps.c ! alias.o : alias.c config.h general.h alias.h ! braces.o : braces.c general.h ! builtins.o : builtins.c shell.h config.h general.h variables.h builtins.h \ ! alias.h trap.h flags.h history.h hash.h ! copy_cmd.o : copy_cmd.c shell.h config.h general.h variables.h ! dispose_cmd.o : dispose_cmd.c shell.h config.h general.h variables.h ! execute_cmd.o : execute_cmd.c shell.h config.h general.h variables.h y.tab.h \ ! builtins.h alias.h flags.h hash.h ! flags.o : flags.c flags.h config.h ! funmap.o : funmap.c readline.h general.h ! general.o : general.c shell.h config.h general.h variables.h ! glob.o : glob.c ! hash.o : hash.c shell.h config.h general.h variables.h hash.h ! history.o : history.c history.h general.h ! jobs.o : jobs.c config.h nojobs.c general.h jobs.h ! mailcheck.o : mailcheck.c shell.h config.h general.h variables.h ! make_cmd.o : make_cmd.c shell.h config.h general.h variables.h flags.h ! newversion.o : newversion.c ! print_cmd.o : print_cmd.c shell.h config.h general.h variables.h y.tab.h ! readline.o : readline.c readline.h general.h history.h keymaps.c \ ! emacs_keymap.c vi_keymap.c funmap.c ! shell.o : shell.c version.h shell.h config.h general.h variables.h flags.h \ ! history.h ! subst.o : subst.c shell.h config.h general.h variables.h flags.h alias.h \ ! history.h ! test.o : test.c ! trap.o : trap.c trap.h shell.h config.h general.h variables.h ! unwind_prt.o : unwind_prt.c config.h general.h ! variables.o : variables.c shell.h config.h general.h variables.h flags.h \ ! version.h ! y.tab.o : y.tab.c shell.h config.h general.h variables.h flags.h readline.h ! malloc-chk.o : alloc-files/malloc-chk.c alloc-files/malloc.c \ ! alloc-files/getpagesize.h readline: readline.c history.c keymaps.c funmap.c history.h readline.h $(GCC) $(TRADITIONAL) $(CFLAGS) -DTEST -o readline\ *************** *** 270,276 **** tags: $(SOURCES) etags $(SOURCES) clean: ! rm -f $(OBJECTS) $(PROGRAM) y.tab.c newversion.aux dist-clean: ! rm -f $(OBJECTS) $(PROGRAM) y.tab.c newversion.aux rm -rf uuencoded --- 290,296 ---- tags: $(SOURCES) etags $(SOURCES) clean: ! rm -f $(OBJECTS) $(PROGRAM) y.tab.c y.tab.h newversion.aux dist-clean: ! rm -f $(OBJECTS) $(PROGRAM) y.tab.c y.tab.h newversion.aux rm -rf uuencoded *** /tmp/,RCSt1a18934 Sat Jun 10 11:14:17 1989 --- builtins.c Sat Jun 10 11:12:28 1989 *************** *** 9,15 **** --- 9,17 ---- #include <stdio.h> #include <sys/param.h> #include <sys/time.h> + #ifndef SYSV #include <sys/resource.h> + #endif #include <sys/types.h> #include <sys/stat.h> #include <sys/file.h> *************** *** 2224,2230 **** --- 2226,2237 ---- /* **************************************************************** */ /* Block size for ulimit operations. */ + + #ifndef SYSV #define ULIMIT_BLOCK_SIZE ((long)1024) + #else + #define ULIMIT_BLOCK_SIZE ((long)512) + #endif #define u_FILE_SIZE 1 #define u_MAX_BREAK_VAL 3 *************** *** 2317,2323 **** --- 2324,2334 ---- } } + #ifndef SYSV i = shell_ulimit (cmd, lim * block_factor, setting); + #else + i = shell_ulimit (cmd, lim, setting); + #endif if (i == (long)-1) { *************** *** 2330,2336 **** --- 2341,2351 ---- if (!setting) { if (i != RLIM_INFINITY) + #ifndef SYSV printf ("%ld\n", (i / block_factor)); + #else + printf ("%ld\n", i); + #endif else printf ("unlimited\n"); } *************** *** 2351,2357 **** int which, setting; long newlim; { ! struct rlimit limit; switch (which) { --- 2366,2379 ---- int which, setting; long newlim; { ! struct rlimit ! #ifdef SYSV ! { ! int rlim_cur; ! int rlim_max; ! } ! #endif ! limit; switch (which) { *** /tmp/,RCSt1a18934 Sat Jun 10 11:14:21 1989 --- config.h Sat Jun 10 11:12:28 1989 *************** *** 7,12 **** --- 7,16 ---- #include <alloca.h> #endif + #if defined(__GNUC__) && !defined(alloca) + #define alloca(N) __builtin_alloca(N) + #endif + /* Define READLINE to get the nifty/glitzy editing features. This is on by default. You can turn it off interactively with the -nolineediting flag. */ *************** *** 38,44 **** /* The default value of the PATH variable. */ #define DEFAULT_PATH_VALUE \ ! ":/usr/gnu/bin:/usr/local/bin:/usr/ucb:/bin:/etc:/usr/etc" /* Define READLINE to get the nifty/glitzy editing features. This is on by default. You can turn it off interactively --- 42,48 ---- /* The default value of the PATH variable. */ #define DEFAULT_PATH_VALUE \ ! "/usr/local/bin:/bin:/usr/bin:/usr/ucb:" /* Define READLINE to get the nifty/glitzy editing features. This is on by default. You can turn it off interactively *** /tmp/,RCSt1a18934 Sat Jun 10 11:14:23 1989 --- general.c Sat Jun 10 11:12:28 1989 *************** *** 341,346 **** --- 341,353 ---- extern int errno; #include <sys/errno.h> + #ifdef index + #undef index + #endif + #ifdef rindex + #undef rindex + #endif + bcopy(s,d,n) char *d,*s; { while(n--) *d++ = *s++; } char *getwd(s) char *s; { getcwd(s,MAXPATHLEN); return s; } char *index(s,c) char *s; { char *strchr(); return strchr(s,c); } *************** *** 351,357 **** FILE *stream; { int result; ! char c; while (1) { --- 358,364 ---- FILE *stream; { int result; ! unsigned char c; while (1) { *** /tmp/,RCSt1a18934 Sat Jun 10 11:14:24 1989 --- glob.c Sat Jun 10 11:12:29 1989 *************** *** 44,49 **** --- 44,53 ---- extern char *alloca (); #endif /* sparc */ + #if defined(__GNUC__) && !defined(alloca) + #define alloca(N) __builtin_alloca(N) + #endif + extern char *malloc (), *realloc (); extern void free (); *** /tmp/,RCSt1a18934 Sat Jun 10 11:14:25 1989 --- jobs.h Sat Jun 10 11:12:29 1989 *************** *** 6,21 **** #ifdef i386 ! union wait { struct { char high; char low; } bytes; short word; }; ! #define WSTOPPED 0177 ! #define w_status word ! #define w_termsig bytes.low ! #define w_stopsig bytes.high ! #define w_retcode bytes.high ! #define w_coredump w_termsig & 0x7f ! #define WIFEXITED(wstat) ((wstat).bytes.low == 0) ! #define WIFSTOPPED(wstat) ((wstat).bytes.low == 0177) ! #define WIFTERMINATED(wstat) ((wstat).bytes.high == 0) #else --- 6,28 ---- #ifdef i386 ! union wait { ! short w_status; ! struct { ! unsigned short w_Termsig:7; ! unsigned short w_Coredump:1; ! unsigned short w_Retcode:8; ! } w_T; ! }; ! ! #define w_termsig w_T.w_Termsig ! #define w_coredump w_T.w_Coredump ! #define w_retcode w_T.w_Retcode ! #define w_stopval w_S.w_Stopval ! #define w_stopsig w_S.w_Stopsig ! ! #define WIFSIGNALED(x) ((x).w_termsig != 0) ! #define WIFEXITED(x) ((x).w_termsig == 0) #else *** /tmp/,RCSt1a18934 Sat Jun 10 11:14:27 1989 --- mailcheck.c Sat Jun 10 11:12:29 1989 *************** *** 175,181 **** if (finfo.st_size != 0) return (time != finfo.st_mtime); } ! else return (0); } /* Return non-zero if FILE's access date has changed. */ --- 175,181 ---- if (finfo.st_size != 0) return (time != finfo.st_mtime); } ! return (0); } /* Return non-zero if FILE's access date has changed. */ *************** *** 192,198 **** if (finfo.st_size != 0) return (time != finfo.st_atime); } ! else return (0); } #ifdef SYSV --- 192,198 ---- if (finfo.st_size != 0) return (time != finfo.st_atime); } ! return (0); } #ifdef SYSV *** /tmp/,RCSt1a18934 Sat Jun 10 11:14:29 1989 --- nojobs.c Sat Jun 10 11:12:29 1989 *************** *** 132,139 **** /* Default return value. */ return_val = status.w_retcode & 0x7f; ! if (status.w_termsig != 0 && ! status.w_termsig != WSTOPPED) { #ifndef SYSV extern char *sys_siglist[]; fprintf (stderr, "%s", sys_siglist[status.w_termsig]); --- 132,142 ---- /* Default return value. */ return_val = status.w_retcode & 0x7f; ! if (status.w_termsig != 0 ! #ifndef SYSV ! && status.w_termsig != WSTOPPED ! #endif ! ) { #ifndef SYSV extern char *sys_siglist[]; fprintf (stderr, "%s", sys_siglist[status.w_termsig]); *** /tmp/,RCSt1a18934 Sat Jun 10 11:14:36 1989 --- readline.c Sat Jun 10 11:12:33 1989 *************** *** 75,80 **** --- 75,82 ---- #endif #endif + static void move_cursor_relative (); + static void output_some_chars(); /* **************************************************************** */ *************** *** 231,236 **** --- 233,239 ---- } #ifdef SIGWINCH + static int rl_handle_sigwinch (sig, code, scp) int sig, code; struct sigcontext *scp; *************** *** 368,374 **** } c = rl_read_key (); ! rl_dispatch (c, keymap); /* If there was no change in last_command_was_kill, then no kill has taken place. Note that if input is pending we are reading --- 371,377 ---- } c = rl_read_key (); ! rl_dispatch (c); /* If there was no change in last_command_was_kill, then no kill has taken place. Note that if input is pending we are reading *************** *** 721,727 **** { register int in, out, c, linenum; register char *line = invisible_line; - static void move_cursor_relative (); int c_pos = 0, v_pos = 0; int inv_botlin = 0; /* Number of lines in newly drawn buffer. */ --- 724,729 ---- *************** *** 1648,1658 **** rl_forward (count) int count; { ! if (count < 0) return (rl_backward (-count)); else while (count) { ! if (rl_point == rl_end) return (ding ()); ! else rl_point++; --count; } } --- 1650,1664 ---- rl_forward (count) int count; { ! if (count < 0) ! rl_backward (-count); else while (count) { ! if (rl_point == rl_end) { ! ding (); ! return; ! } else ! rl_point++; --count; } } *************** *** 1661,1671 **** rl_backward (count) int count; { ! if (count < 0) return (rl_forward (-count)); else while (count) { ! if (!rl_point) return (ding ()); ! else --rl_point; --count; } } --- 1667,1681 ---- rl_backward (count) int count; { ! if (count < 0) ! rl_forward (-count); else while (count) { ! if (!rl_point) { ! ding (); ! return; ! } else ! --rl_point; --count; } } *************** *** 1688,1694 **** { int c; ! if (count < 0) return (rl_backward_word (-count)); while (count) { if (rl_point == rl_end) return; --- 1698,1707 ---- { int c; ! if (count < 0) { ! rl_backward_word (-count); ! return; ! } while (count) { if (rl_point == rl_end) return; *************** *** 1717,1724 **** { int c; ! if (count < 0) ! return (rl_forward_word (-count)); while (count) { --- 1730,1739 ---- { int c; ! if (count < 0) { ! rl_forward_word (-count); ! return; ! } while (count) { *************** *** 1858,1866 **** rl_rubout (count) int count; { ! if (count < 0) return (rl_delete (-count)); ! if (!rl_point) return (ding ()); ! if (count > 1) { int orig_point = rl_point; rl_backward (count); --- 1873,1883 ---- rl_rubout (count) int count; { ! if (count < 0) ! rl_delete (-count); ! else if (!rl_point) ! ding (); ! else if (count > 1) { int orig_point = rl_point; rl_backward (count); *************** *** 1892,1899 **** rl_delete (count, invoking_key) int count; { ! if (count < 0) ! return (rl_rubout (-count)); if (rl_point == rl_end) { if ((!rl_point) && --- 1909,1918 ---- rl_delete (count, invoking_key) int count; { ! if (count < 0) { ! rl_rubout (-count); ! return; ! } if (rl_point == rl_end) { if ((!rl_point) && *************** *** 1904,1910 **** rl_pending_input = EOF; return; } else { ! return (ding ()); } } if (count > 1) { --- 1923,1930 ---- rl_pending_input = EOF; return; } else { ! ding(); ! return; } } if (count > 1) { *************** *** 2778,2783 **** --- 2798,2816 ---- } /* How about a completion function for hostnames? */ + + #ifdef SYSV + + char * + hostname_completion_function (text, state) + int state; + char *text; + { + return NULL; + } + + #else + #include <sys/socket.h> #include <netdb.h> *************** *** 2815,2820 **** --- 2848,2854 ---- } } + #endif /* !SYSV */ #endif /* SHELL */ *************** *** 3126,3133 **** { HIST_ENTRY *temp = (HIST_ENTRY *)NULL; ! if (count < 0) ! return (rl_get_previous_history (-count)); if (!count) return; --- 3160,3169 ---- { HIST_ENTRY *temp = (HIST_ENTRY *)NULL; ! if (count < 0) { ! rl_get_previous_history (-count); ! return; ! } if (!count) return; *************** *** 3157,3164 **** HIST_ENTRY *old_temp = (HIST_ENTRY *)NULL; HIST_ENTRY *temp; ! if (count < 0) ! return (rl_get_next_history (-count)); if (!count) return; --- 3193,3202 ---- HIST_ENTRY *old_temp = (HIST_ENTRY *)NULL; HIST_ENTRY *temp; ! if (count < 0) { ! rl_get_next_history (-count); ! return; ! } if (!count) return; *************** *** 3670,3676 **** { int orig_point = rl_point; ! if (count < 0) return (rl_backward_kill_word (-count)); rl_forward_word (count); --- 3708,3717 ---- { int orig_point = rl_point; ! if (count < 0) { ! rl_backward_kill_word (-count); ! return; ! } rl_forward_word (count); *************** *** 3685,3691 **** { int orig_point = rl_point; ! if (count < 0) return (rl_backward_kill_word (-count)); rl_backward_word (count); if (rl_point != orig_point) --- 3726,3736 ---- { int orig_point = rl_point; ! if (count < 0) { ! rl_backward_kill_word (-count); ! return; ! } ! rl_backward_word (count); if (rl_point != orig_point) *************** *** 3699,3705 **** { int orig_point = rl_point; ! if (direction < 0) return (rl_backward_kill_line (1)); rl_end_of_line (); if (orig_point != rl_point) rl_kill_text (orig_point, rl_point); --- 3744,3754 ---- { int orig_point = rl_point; ! if (direction < 0) { ! rl_backward_kill_line (1); ! return; ! } ! rl_end_of_line (); if (orig_point != rl_point) rl_kill_text (orig_point, rl_point); *************** *** 3713,3719 **** { int orig_point = rl_point; ! if (direction < 0) return (rl_kill_line (1)); if (!rl_point) ding (); else { rl_beg_of_line (); --- 3762,3771 ---- { int orig_point = rl_point; ! if (direction < 0) { ! rl_kill_line (1); ! } ! if (!rl_point) ding (); else { rl_beg_of_line (); *************** *** 4379,4385 **** FILE *stream; { int result; ! char c; while (1) { --- 4431,4437 ---- FILE *stream; { int result; ! unsigned char c; while (1) { *** /tmp/,RCSt1a18934 Sat Jun 10 11:14:46 1989 --- shell.c Sat Jun 10 11:12:34 1989 *************** *** 370,376 **** /* Under 4.x, you have mail if there is something in your inbox. I set the remembered mail dates to 1900. */ reset_mail_files (); ! #endif SYSV /* If this was a login shell, then assume that /bin/login has already taken care of informing the user that they have new mail. Otherwise, --- 370,376 ---- /* Under 4.x, you have mail if there is something in your inbox. I set the remembered mail dates to 1900. */ reset_mail_files (); ! #endif /* SYSV */ /* If this was a login shell, then assume that /bin/login has already taken care of informing the user that they have new mail. Otherwise, *************** *** 732,738 **** --- 732,740 ---- #ifdef SIGXFSZ SIGXFSZ, #endif + #ifdef SIGVTALRM SIGVTALRM, SIGPROF, + #endif #ifdef SIGLOST SIGLOST, #else *************** *** 827,833 **** FILE *stream, *popen (); HIST_ENTRY **list = history_list (); ! stream = popen ("/usr/bin/mail bug-bash@wheaties.ai.mit.edu", "w"); save_history (); if (i < 0) i = 0; --- 829,835 ---- FILE *stream, *popen (); HIST_ENTRY **list = history_list (); ! stream = popen ("/usr/bin/sendmail bug-bash@wheaties.ai.mit.edu", "w"); save_history (); if (i < 0) i = 0; *** /tmp/,RCSt1a18934 Sat Jun 10 11:14:48 1989 --- test.c Sat Jun 10 11:12:35 1989 *************** *** 26,32 **** #define X_OK 1 #endif #ifndef lint ! static char *rcsid="$Id: test.c,v 1.1 89/06/10 01:29:21 james Exp $"; #endif /* The following few defines control the truth and false output of each stage. --- 26,32 ---- #define X_OK 1 #endif #ifndef lint ! static char *rcsid="$Id: test.c,v 1.2 89/06/10 03:25:40 james Exp $"; #endif /* The following few defines control the truth and false output of each stage. *************** *** 508,514 **** return (FALSE); } return (TRUE == (S_IFIFO == (stat_buf.st_mode & S_IFMT))); ! #endif S_IFIFO case 'L': /* Same as -h */ /*FALLTHROUGH*/ --- 508,514 ---- return (FALSE); } return (TRUE == (S_IFIFO == (stat_buf.st_mode & S_IFMT))); ! #endif /* S_IFIFO */ case 'L': /* Same as -h */ /*FALLTHROUGH*/ *************** *** 522,528 **** return (FALSE); } return (TRUE == (S_IFLNK == (stat_buf.st_mode & S_IFMT))); ! #endif S_IFLNK case 'u': /* File is setuid? */ unary_advance (); --- 522,528 ---- return (FALSE); } return (TRUE == (S_IFLNK == (stat_buf.st_mode & S_IFMT))); ! #endif /* S_IFLNK */ case 'u': /* File is setuid? */ unary_advance (); -- James R. Van Artsdalen james@bigtex.cactus.org "Live Free or Die" Dell Computer Co 9505 Arboretum Blvd Austin TX 78759 512-338-8789
composer@bu-cs.BU.EDU (Jeff Kellem) (06/11/89)
In article <17920@bigtex.cactus.org> james@bigtex.cactus.org (James Van Artsdalen) writes: >"make clean" should remove y.tab.h too. Actually, the way Brian (bfox) has the Makefile set up, y.tab.h should not be removed. There is a check before the grammar is run through $(BISON) if y.tab.h exist, and if so, it is moved to old-y.tab.h. After the y.tab.c and y.tab.h have been produced, a comparison is made between the old y.tab.h and the newly produced y.tab.h. If they're the same, old-y.tab.h is moved back to y.tab.h. This way, files that depend on y.tab.h don't have to be remade each time you recompile the grammar, if the same header file is produced. >/usr/bin/mail isn't exactly universal. Try /usr/lib/sendmail instead. Or, it could be replaced with /bin/mail ... >James R. Van Artsdalen james@bigtex.cactus.org "Live Free or Die" >Dell Computer Co 9505 Arboretum Blvd Austin TX 78759 512-338-8789 -jeff Jeff Kellem INTERNET: composer@bu-cs.bu.edu (or composer%bu-cs.bu.edu@bu-it.bu.edu) UUCP: ...!harvard!bu-cs!composer