Tue Jul 13 14:32:57 NDT 1999 Michael Rendell (michael@lyman.cs.mun.ca) * made pdksh-5.2.14 distribution Wed Jun 30 17:42:54 NDT 1999 Michael Rendell (michael@lyman.cs.mun.ca) * c_test.c(test_eval): changed -nt/-ot tests so they succeed if file2 (file2) `does not exist' (ie, the stat fails). (based on fix from Dave Hillman). Tue May 25 17:23:39 NDT 1999 Michael Rendell (michael@lyman.cs.mun.ca) * jobs.c(fill_command): do not eval() TCOM arguments - can cause problems. Tue May 25 15:26:31 NDT 1999 Michael Rendell (michael@lyman.cs.mun.ca) * new-version.sh,ksh.Man: added version number to man page; update version as well as date when updating tests/version.t and ksh.Man. Mon May 24 20:57:21 NDT 1999 Michael Rendell (michael@lyman.cs.mun.ca) * c_sh.c(c_eval): only set exstat to substs_exstat if in non-posix mode. Mon May 24 15:44:10 NDT 1999 Michael Rendell (michael@lyman.cs.mun.ca) * tree.h(FTIME): new define. * c_sh.c(timex): stuff to get info to/from timex_hook. * c_sh.c(timex_hook): new function (handles option processing). * exec.c(execute): call timex_hook() after TCOM eval(). Tue May 18 12:23:27 NDT 1999 Michael Rendell (michael@deimos.cs.mun.ca) * vi.c(vi_hook): case VREDO: removed != 0 from switch expression. Tue May 18 11:24:12 NDT 1999 Michael Rendell (michael@deimos.cs.mun.ca) * emacs.c(CHARMASK,X_TABSZ): changed from 128 to 256. * emacs.c(x_size,x_zotc,x_mapout): use iscntl() vs range test. (Based on changes from Martin Dalecki) Thu May 13 17:23:17 NDT 1999 Michael Rendell (michael@deimos.cs.mun.ca) * emacs.c(x_bound,bind_if_not_bound): new variable/fucntion. * emacs.c(x_bind): set bit in x_bound[]. * emacs.c(x_emacs_keys): call bind_if_not_bound. Thu May 13 14:23:12 NDT 1999 Michael Rendell (michael@deimos.cs.mun.ca) * sh.h: ifdefs for __CYGWIN__ for path defines. * path.c(simplify_path): ifdefs for __CYGWIN__; preserve leading double-slash on pathnames. * c_ksh.c(c_cd): use cygwin_conv_to_full_posix_path(). * edit.c(x_mode): default eof char to ^D. [fixes from Corinna Vinschen and Steven Hein, obtained from ftp://ftp.franken.de/pub/win32/develop/gnuwin32/cygwin/ porters/Vinschen_Corinna/B20/] Wed May 12 12:30:09 NDT 1999 Michael Rendell (michael@deimos.cs.mun.ca) * exit.c(x_mode): set fields of edchars to -1 if corrisponding char is unset. * exit.c(x_init): initialize edchars to -2, not -1. * emacs.c(x_emacs_keys): check if char is >= 0 before setting. Wed May 12 11:31:24 NDT 1999 Michael Rendell (michael@deimos.cs.mun.ca) * shf.c(shf_write): don't buffer if buffer is empty and we're writting a large amount. * shf.c(shf_open): changed to use shf_reopen instead of shf_fdopen so alloca failing won't lose the fd. Wed May 12 10:19:43 NDT 1999 Michael Rendell (michael@deimos.cs.mun.ca) * sh.h: deleted TT_HEREDOC_RAW define. * tree.h(struct ioword): added heredoc field. * tree.c(iocopy,iofree): copy/free heredoc field; remove special case for IOHERE and name field. * tree.c(ptree): changed to use heredoc content string (not open temp). * lex.c(yylex): initialize heredoc field. * lex.c(readhere): save to string instead of a temp file. * exec.c(herein): changed first are from file name to heredoc content string; changed all calls. Changed to always create a new temp file and write content to it. Tue May 11 11:38:22 NDT 1999 Michael Rendell (michael@deimos.cs.mun.ca) * tree.c(iofree): free delim field; don't free name of IOHERE iowords. Tue May 11 10:57:53 NDT 1999 Michael Rendell (michael@deimos.cs.mun.ca) * sh.h(func_heredocs): deleted. * sh.h(EF_FAKE_SIGDIE): added. * lex.c(readhere): put function heredocs at bottom of env stack. * main.c(quitenv,cleanup_proc_env): deleted remove_temps(func_heredocs) calls. * main.c(quitenv): moved exit of no oenv to en after reclaim. * main.c(cleanup_parents_env): free ep->savefd and set to 0. * main.c(unwind,quitenv): moved code for E_NONE from unwind() to quitenv(). Mon May 10 17:04:03 NDT 1999 Michael Rendell (michael@deimos.cs.mun.ca) * exec.c(herein): restore source to osource after yylex(). Mon May 10 12:14:40 NDT 1999 Michael Rendell (michael@deimos.cs.mun.ca) * tree.c(iocopy): don't copy IOHERE name (it belongs to a struct temp). * tree.c(wdscan): added default case to print internal error. Mon May 10 10:39:34 NDT 1999 Michael Rendell (michael@deimos.cs.mun.ca) * sh.h(Temp_type): new enum (TT_HEREDOC_RAW, TT_HEREDOC_EXP, TT_HIST_FILE). * sh.h(struct temp): added type field. * io.c(maketemp): added type and tlist arguments; changed all calls. Tue Apr 27 11:31:48 NDT 1999 Michael Rendell (michael@lyman.cs.mun.ca) * exec.c(execute): clear XEXEC in the call to timex() so time can be used at the end of a pipeline. Fri Apr 23 16:29:01 NDT 1999 Michael Rendell (michael@lyman.cs.mun.ca) * mail.c(mcheck): don't check if MAILCHECK is set, just check if mplist is null. * mail.c(mcset): new function. * var.c(setspec): case MAILCHECK: call mcset. * var.c(unspecial): new function. * var.c(unsetspec): call unspecial for LINENO, MAILCHECK, RANDOM, SECONDS, TMOUT. Fri Apr 23 15:34:39 NDT 1999 Michael Rendell (michael@lyman.cs.mun.ca) * main.c(initcoms): put MAILCHECK, SECONDS, TMOUT in an eval to preserve previous values. * var.c(getspec): case V_SECONDS: don't do anything special if variable not set. Thu Apr 22 15:03:27 NDT 1999 Michael Rendell (michael@lyman.cs.mun.ca) * var.c(setstr): error if var is RDONLY. * var.c(global): non-letter params: set RDONLY flag after setstr call. * c_ksh.c(c_getopts), eval.c(expand), exec.c(execute): removed readonly check. * sh.h(KSH_UNWIND_ERROR, KSH_RETURN_ERROR): new defines. * var.c(setstr): added error_ok argument; changed all calls. * c_ksh.c(c_getopts): clear READONLY and INTEGER flags for OPTARG; return non-zero if variable can't be set. * var.c(typeset): if fake_assign fails, unset the variable's value and carry on for rest of array, then unwind. * expr.c(expand,v_expand): changed all calls to use KSH_UNWIND_ERROR or KSH_RETURN_ERROR. Tue Apr 20 16:52:24 NDT 1999 Michael Rendell (michael@lyman.cs.mun.ca) * configure.in: added check dup2. * sh.h: added dup2 prototype. * aclocal.m4: replace AC_HEADER_DIRENT so it checks -lndir. * missing.c(dup2): new function. Based on code from Marc Olzheim. Fri Apr 16 16:32:27 NDT 1999 Michael Rendell (michael@lyman.cs.mun.ca) * syn.c(lineno_offset): removed variable and all references. * tree.c(tcopy): copy lineno field. * var.c(user_lineno): new variable. * var.c(setspec): added case for V_LINENO (sets user_lineno). * var.c(getspec): V_LINENO: add in user_lineno. Fri Apr 16 15:26:26 NDT 1999 Michael Rendell (michael@lyman.cs.mun.ca) * tree.h(struct op): added lineno field. * table.h(V_LINENO, current_lineno): new define/variable. * exec.c(execute): set current_lineno for TCOM. * syn.c(lineno_offset): new variable. * syn.c(get_command): set t->lineno. * syn.c(function_body): save/restore lineno_offset; * syn.c(compile): initialize lineno_offset * var.c(initvar,getspec): added V_LINENO entry. Changes from Mark Funkenhauser. Fri Apr 16 12:18:08 NDT 1999 Michael Rendell (michael@lyman.cs.mun.ca) * expr.c,misc.c(getoptions): added int casts to avoid errors from old K&R compilers. Fixes from Marc Olzheim. Fri Jan 15 12:51:53 NST 1999 Michael Rendell (michael@panda.cs.mun.ca) * expr.c: pass es as first param to all functions; deleted es global variable. Tue Jan 12 12:28:41 NST 1999 Michael Rendell (michael@panda.cs.mun.ca) * emacs.c(x_defbindings[]): removed #else part of ifdef OS2. * shf.c(shf_getse): added code to strip \r for OS2. * lex.c(getsc_line): removed OS2 ifdefs * os2/misc.c(ksh_execve),sh.h: added flags argument; changed all calls. * exec.c(scriptexec): OS2: make copy of a0 before calling search_access(X_OK). * sh.h: OS2: changed EXECSHELL, EXECSHELL_STR. * jobs.c(exchild): set XINTACT. * os2/config.h: added HAVE_TERMIOS_H. * os2/configure.cmd: changed test for existance of sed & gcc. Fixes from Ilya Zakharevich. * tests/th: added -C option, added "category" field. * tests/th(category_check): new function. * tests/*.t: added "category: !os:os2" to a few tests. Tue Jan 12 11:17:52 NST 1999 Michael Rendell (michael@panda.cs.mun.ca) * exec.c(execute): changed exit(rv) to unwind(LEXIT) to allow exit traps to be done. Tue Jan 5 16:45:00 NST 1999 Michael Rendell (michael@panda.cs.mun.ca) * aclocal.m4(KSH_CHECK_H_TYPE): remove extra [] from egrep pattern. * c_sh.c(c_exitreturn): fixed logic of exit status parsing (fixes from Martin Lucina). Tue Jan 5 16:31:37 NST 1999 Michael Rendell (michael@panda.cs.mun.ca) * edit.c(x_locate_word): changed IS_WORDC macro from !isspace to !lex1/'/" (based on fix from Kevin Schoedel). Wed Dec 16 15:02:48 NST 1998 Michael Rendell (michael@panda.cs.mun.ca) * io.c(kshdebug_init_,kshdebug_printf_,kshdebug_dump_), sh.h(kshdebug_init,kshdebug_printf,kshdebug_dump): new macros/functions. Wed Dec 16 12:12:23 NST 1998 Michael Rendell (michael@panda.cs.mun.ca) * c_sh.c(c_eval): set exstat to substs_exstat to propogate substition exit status if resulting command is empty (based on fix from Mark Funkenhauser). Tue Dec 15 15:50:34 NST 1998 Michael Rendell (michael@panda.cs.mun.ca) * main.c(initcom[]): PPID no longer read only. Mon Dec 14 17:09:52 NST 1998 Michael Rendell (michael@panda.cs.mun.ca) * trap.c(gettrap): added igncase argument; changed all calls. * c_sh.c(c_trap): use case sensitive compare for first gettrap(). (fix "trap exit 1"). Thu Dec 10 12:24:53 NST 1998 Michael Rendell (michael@panda.cs.mun.ca) * configure.in: added test for getcwd. * aclocal.m4(KSH_OS_TYPE): added case for hpux; added test for bug in hpux getcwd (dumps core if . is not readable). * config.h.in: added HAVE_HPUX_GETWD_BUG define. * aclocal.m4,configure.in: remove AC_C_CROSS or change to AC_PROG_CC. * misc.c(ksh_get_wd): added code to handle bug in hpux getwd; changed precedence of getcwd vs getwd (use getcwd if available: getwd causes warnings under linux). Tue Dec 8 17:17:47 NST 1998 Michael Rendell (michael@panda.cs.mun.ca) * main.c(main): seed RANDOM using time, pid, ppid (was just time). Tue Nov 24 17:17:12 NST 1998 Michael Rendell (michael@panda.cs.mun.ca) * c_ulimit.c(c_ulimit): improve setrlimit error message for EPERM (fix from Todd C. Miller). Thu Nov 19 18:09:59 NST 1998 Michael Rendell (michael@panda.cs.mun.ca) * jobs.c(waitfor): if j_lookup fails, always return (fix from Todd C. Miller). Fri Oct 23 19:59:25 NDT 1998 Michael Rendell (michael@lenny.cs.mun.ca) * jobs.c(JF_SAVEDTTYPGRP,j_resume,j_waitj): added save_ttypgrp stuff to deal with new gnu su which doesn't exec, but forks then execs. Thu Sep 24 16:23:48 NDT 1998 Michael Rendell (michael@panda.cs.mun.ca) * trap.c(inittrap): Don't assume sys_siglist[] has NSIG non-null entries (fix from clifford@clifford.at). Thu Aug 6 14:46:45 NDT 1998 Michael Rendell (michael@panda.cs.mun.ca) * eval.c(varsub): ${#array[*]} now prints N elements, not max index. Sun Jul 19 11:50:21 NDT 1998 Michael Rendell (michael@panda.cs.mun.ca) * syn.c(function_body): fixed bug in handling of empty function body; if empty, pretend there is a : command. Mon Jun 29 10:13:02 NDT 1998 Michael Rendell (michael@panda.cs.mun.ca) * exec.c(search_access): allow non-regular files to be .'ed (fix from Theo de Raadt). Thu Jun 25 17:01:36 NDT 1998 Michael Rendell (michael@panda.cs.mun.ca) * c_ulimit.c(c_ulimit): added KSH_RLIM_INFINITY and defined if system doesn't define RLIM_INFINITY; use when setting limits. When setting, if expression evaluates to 0 and string was not a number, generate an error (based on fix from Todd C. Miller). Wed Mar 11 16:35:37 NST 1998 Michael Rendell (michael@panda.cs.mun.ca) * exec.c(flushcom): clear ISSET bit, don't set all the other bits (fix from Eric Youngdale). Tue Dec 16 11:07:21 NST 1997 Michael Rendell (michael@panda.cs.mun.ca) * shf.c(shf_vfprintf): %e/%f/%g conversion now prints negative numbers correctly (fix from Larry Bouzane). Thu Nov 20 15:16:15 NST 1997 Michael Rendell (michael@panda.cs.mun.ca) * emacs.c(x_prev_histword): check if histptr is 0. Sat Nov 8 11:46:32 NST 1997 Michael Rendell (michael@panda.cs.mun.ca) * misc.c(options[]): changed null entries to (char *) 0 (based on fix from David E. Wexelblat). Fri Nov 7 14:45:24 NST 1997 Michael Rendell (michael@panda.cs.mun.ca) * alloc.c(aresize): avoid memory overrun when copying old memory to new memory. (fix from David E. Wexelblat). Tue Oct 28 11:26:22 NST 1997 Michael Rendell (michael@panda.cs.mun.ca) * tests/th: file-setup code: convert chmod argument to octal. Tue Oct 28 11:00:45 NST 1997 Michael Rendell (michael@panda.cs.mun.ca) * tree.c(tputS): incr wp after COMSUB and EXPRSUB while loop to get past null. Mon Oct 27 12:38:05 NST 1997 Michael Rendell (michael@panda.cs.mun.ca) * made pdksh-5.2.13 distribution Mon Oct 27 12:21:51 NST 1997 Michael Rendell (michael@panda.cs.mun.ca) * c_sh.c(c_dot): use search() error argument to report problem correctly. * exec.c(search_access): don't set *errnop if it is already set. * exec.c(search_access): extended non-regular file check from just X_OK to both X_OK and R_OK. Wed Oct 22 11:49:02 NDT 1997 Michael Rendell (michael@panda.cs.mun.ca) * edit.c(x_locate_word): don't skip trailing space if at end of buffer (based on fix from Marc Olzheim). Fri Aug 15 22:06:53 NDT 1997 Michael Rendell (michael@panda.cs.mun.ca) * eval.c(varsub,expand), lex.c(yylex): allow :%, :#, :%% and :## to be compatable with ksh88. Sat Aug 2 12:13:30 NDT 1997 Michael Rendell (michael@panda.cs.mun.ca) * syn.c(get_command): case MDPAREN/DBRACKET: do not clear KEYWORD|ALIAS from syniocf. Tue Jul 29 16:24:38 NDT 1997 Michael Rendell (michael@panda.cs.mun.ca) * c_sh.c(c_exec): added ifdef KSH around fd_clexec() (based on fix from George Robins). Tue Jun 3 12:52:05 NDT 1997 Michael Rendell (michael@panda.cs.mun.ca) * misc.c(do_gmatch): removed ifdef KSH about @(..|..) code as it is needed in SH mode for ${..%..} stuff. Mon May 19 16:10:06 NDT 1997 Michael Rendell (michael@panda.cs.mun.ca) * table.h(struct block): added getopt_state and flags fields; added BF_DOGETOPTS. * sh.h,c_ksh.c: moved user_opt decl/defn from c_ksh.c to sh.h. * var.c(getspec): added case for V_OPTIND. * var.c(popblock): if BF_DOGETOPTS set, restore user_opt. * exec.c(comexec): case CFUNC: save user_opt for ksh-style functions. * c_ksh.c(getopts_reset,c_getopts): removed getopts_noreset variable and code. * sh.h(Getopts): added uoptind field. Fri May 16 11:40:22 NDT 1997 Michael Rendell (michael@panda.cs.mun.ca) * io.c(error_prefix): don't print kshname if it is the same as the source file name. Thu Mar 13 10:42:31 NST 1997 Michael Rendell (michael@panda.cs.mun.ca) * mail.c(mbset): save a copy of the path so it can't get trashed (eg, by exporting a varibale). Wed Feb 26 11:24:06 NST 1997 Michael Rendell (michael@panda.cs.mun.ca) * emacs.c(x_prev_histword): get word from last command entered, not from last command relative to current location in history (fix from Greg A. Woods). Sun Feb 16 13:18:52 NST 1997 Michael Rendell (michael@panda.cs.mun.ca) * sh.h(FTALKING_I): new define * misc.c(options[]): added anonymous options for internal use: changed all code using options to not assume null option name is the end of options (use NELEM()) instead. Added slot for FTALKING_I * c_sh.c(c_read), exec.c(iosetup): test FTALKING_I instead of FTALKING. * main.c(main): set FTALKING_I. Fri Jan 10 16:36:36 NST 1997 Michael Rendell (michael@panda.cs.mun.ca) * jobs.c(exchild): use orig_flags instead of flags when testing XPIPEI/XPIPEO; clear all flags except XEXEC and XERROK. Tue Jan 7 11:16:08 NST 1997 Michael Rendell (michael@panda.cs.mun.ca) * lex.h(yynerrs): deleted (not used); deleted all assignments of it. Fri Jan 3 13:40:29 NST 1997 Michael Rendell (michael@panda.cs.mun.ca) * lex.c(yylex): case STBRACE: interpret ( | ) as patterns; case SPATTERN: allow ( as an alias for @(. Thu Jan 2 15:44:07 NST 1997 Michael Rendell (michael@panda.cs.mun.ca) * main.c(main): set PATH to def_path in startup. Thu Jan 2 10:19:43 NST 1997 Michael Rendell (michael@panda.cs.mun.ca) * exec.c(comexec): ifdef KSH the setting of $_; only set $_ to last arg if interactive. Wed Jan 1 13:38:26 NST 1997 Michael Rendell (michael@panda.cs.mun.ca) * lex.c(yylex),eval.c(expand),tree.c(tputS,wdscan,wdstrip): changed OSUBST/CSUBST encoding to have { or x after xSUBST. * lex.c(yylex): case ${: don't prepend @( and append ) to trim patterns. * eval.c(expand): prepend MAGIC @ and append MAGIC ) to trim patterns. * syn.c(function_body): call wdstrip(). * tree.c(wdstrip): new function. * lex.c(yylex): moved handling of < and > into one location. Wed Dec 11 13:00:05 NST 1996 Michael Rendell (michael@panda.cs.mun.ca) * sh.h(ksheuid): new variable. * main.c(main): set/use ksheuid. * misc.c(change_flag): set ksheuid. * c_test.c(test_eval): use ksheuid * c_test.c(test_eaccess): if doing X_OK and user is root, use stat to avoid false positives on files. Mon Dec 9 12:08:56 NST 1996 Michael Rendell (michael@panda.cs.mun.ca) * main.c(main): save/clear/restore FERREXIT flag while processing profile and ENV. Wed Dec 4 12:25:23 NST 1996 Michael Rendell (michael@panda.cs.mun.ca) * misc.c(parse_args): change -A option handling - make getopts gather the option (A: vs A). Thu Nov 21 15:42:57 NST 1996 Michael Rendell (michael@panda.cs.mun.ca) * c_ksh.c(c_alias): accept + options; don't print alias definition if + option used; allow export flag to be cleared; added -p option. Thu Nov 21 14:35:47 NST 1996 Michael Rendell (michael@panda.cs.mun.ca) * tree.c(ptree),c_ksh.c(c_typeset): print ksh functions as "function foo...", sh functions as "foo()...". * c_ksh.c(c_typeset): accept -p flag (does nothing). Wed Nov 20 11:36:08 NST 1996 Michael Rendell (michael@panda.cs.mun.ca) * c_ksh.c(c_typeset): simplified option exclusion code. * misc.c(ksh_getopt): allow options in same command line to start with either + or - (if appropriate). [code existed to similate ksh88 typeset behaviour which disallowed "typeset +x -i foo"] Wed Nov 13 12:02:59 NST 1996 Michael Rendell (michael@panda.cs.mun.ca) * syn.c(c_list): added multi argument; changed all calls to pass TRUE, except one in yyparse(); changed logic to accept and ignore blank lines if multi flag is set. * syn.c(get_command): removed multiline.on/cf=CONTIN test/assignment. * syn.c(struct multiline_state,struct nesting_state,multiline,nesting, multiline_push,multiline_pop,nesting_push,nesting_pop): renamed *multiline* to *nesting*; removed struct multiline_state.on field (deleted all references). Mon Nov 4 16:29:50 NST 1996 Michael Rendell (michael@panda.cs.mun.ca) * c_test.c(c_test): in special < 5 arg code: if single arg is -t and not in FPOSIX mode, don't decide its a string test. Wed Oct 30 11:34:39 NST 1996 Michael Rendell (michael@panda.cs.mun.ca) * main.c(include): call quitenv() after shf_close() (fix from Eric J. Chet). Wed Oct 30 11:23:17 NST 1996 Michael Rendell (michael@panda.cs.mun.ca) * exec.c(comexec): case CFUNC: set $0 to kshname if non-function function. $OpenBSD: ChangeLog,v 1.12 1999/07/14 13:37:23 millert Exp $ Tue Oct 29 11:34:58 NST 1996 Michael Rendell (michael@panda.cs.mun.ca) * made pdksh-5.2.12 distribution Fri Oct 25 11:59:48 NDT 1996 Michael Rendell (michael@panda.cs.mun.ca) * vi.c(vi_cmd): case Cntl('i'): dont fall through, call complete_word(). Tue Oct 22 17:38:21 NDT 1996 Michael Rendell (michael@panda.cs.mun.ca) * table.h(USERATTRIB): new define. * c_ksh.c(c_typeset): report unset params only if it has some interesting attributes. Tue Oct 22 15:54:39 NDT 1996 Michael Rendell (michael@panda.cs.mun.ca) * jobs.c(exchild): changed NEED_PGRP_SYNC code so j_sync_pipe[1] isn't left open in 2nd+ children. Tue Oct 22 12:59:49 NDT 1996 Michael Rendell (michael@panda.cs.mun.ca) * main.c(main): memset() env to 0. Mon Oct 21 12:53:44 NDT 1996 Michael Rendell (michael@panda.cs.mun.ca) * main.c(cleanup_proc_env): new function. * exec.c(execute): call cleanup_proc_env() before calling ksh_execve(). Fri Oct 11 22:53:57 NDT 1996 Michael Rendell (michael@panda.cs.mun.ca) * vi.c(display): use ch not e->buf[cur] when printing character. Fri Oct 11 13:26:11 NDT 1996 Michael Rendell (michael@panda.cs.mun.ca) * aclocal.m4(KSH_TIMES_CHECK,KSH_DUP2_CLEXEC_CHECK,KSH_OPENDIR_CHECK): changed sense of test so "yes" result is printed if you have a good system. * aclocal.m4(KSH_C_FUNC_ATTR): changed return type of test_cnst to int. Fri Oct 11 13:05:40 NDT 1996 Michael Rendell (michael@panda.cs.mun.ca) * syn.c(get_command): added inalias() call when setting cf = CONTIN. Thu Oct 10 16:22:03 NDT 1996 Michael Rendell (michael@panda.cs.mun.ca) * lex.c(getsc__): case SALIAS: if we read eof, break, don't continue. Tue Oct 8 13:14:00 NDT 1996 Michael Rendell (michael@panda.cs.mun.ca) * aclocal.m4(KSH_TERM): added SYS_IOCTL_WITH_TERMIOS, SYS_IOCTL_WITH_TERMIO tests. * tty.h: include with / if possible. Tue Oct 8 11:42:36 NDT 1996 Michael Rendell (michael@panda.cs.mun.ca) * made pdksh-5.2.11 distribution Tue Oct 8 11:02:54 NDT 1996 Michael Rendell (michael@panda.cs.mun.ca) * syn.c(inalias): new function. * syn.c(c_list): call inalias() instead of testing source->type. Mon Oct 7 17:00:40 NDT 1996 Michael Rendell (michael@panda.cs.mun.ca) * made pdksh-5.2.10 distribution Mon Oct 7 16:23:53 NDT 1996 Michael Rendell (michael@panda.cs.mun.ca) * c_sh.c(c_read): when printing prompt, use isatty, not FTALKING. Wed Oct 2 12:00:51 NDT 1996 Michael Rendell (michael@panda.cs.mun.ca) * lex.c(yylex): redirection stuff: save result of getsc() == '-' and use it for ungetsc(). * lex.h(struct source): moved ugbuf out of union so it can be used with alias stuff. * lex.c(getsc__) case SALIAS: instead of appending a space, get the next character and stuff it in ugbuf. * lex.c(getsc_,getsc__): getsc_() renamed to getsc__(). * lex.c(getsc_,getsc): getsc() macro renamed to getsc_(). * lex.c(backslash_skip,ignore_backslash_newline): new variables. * lex.c(getsc): new macro that checks backslash_skip. * lex.c(getsc_bn_,getsc_bn): getsc_bn() macro deleted (all calls replaced with getsc()); getsc_bn_ renamed to getsc_bn. * lex.c(ungetsc_,ungetsc): ungetsc() macro deleted; renamed ungetsc_() to ungetsc(). * lex.c(yylex,ungetsc,getsc_bn): set and use backslash_skip, ignore_backslash_newline. * lex.c(yylex): removed special cases for backslash-newline sequence, explicitly ignore backslash followed by eof. Mon Sep 30 17:14:41 NDT 1996 Michael Rendell (michael@panda.cs.mun.ca) * made pdksh-5.2.9 distribution Mon Sep 30 12:52:21 NDT 1996 Michael Rendell (michael@panda.cs.mun.ca) * lex.c(pprompt): fixed usage of ntruncate. Thu Sep 19 17:43:33 NDT 1996 Michael Rendell (michael@panda.cs.mun.ca) * sh.h(KSH_SYSTEM_PROFILE): new define. * main.c(main): use KSH_SYSTEM_PROFILE. * aclocal.m4(KSH_OS_TYPE): added case for NEXT. Thu Sep 19 15:39:54 NDT 1996 Michael Rendell (michael@panda.cs.mun.ca) * tty.c(tty_init): added hack for NeXT's rlogin's missing controlling tty. Mon Sep 16 11:18:10 NDT 1996 Michael Rendell (michael@panda.cs.mun.ca) * edit.c(add_glob): don't append a * to a ~username. * edit.c(x_init): set got_sigwinch before calling check_sigwinch(). Wed Sep 11 14:38:38 NDT 1996 Michael Rendell (michael@panda.cs.mun.ca) * c_ksh.c(c_let): ifdef'd KSH. * lex.h(SDPAREN),lex.c: ifdef'd KSH all uses of SDPAREN. * lex.h(MDPAREN),syn.c: ifdef'd KSH all uses of MDPAREN. Mon Sep 9 16:18:03 NDT 1996 Michael Rendell (michael@panda.cs.mun.ca) * aclocal.m4(AC_PROG_CC): replaced autoconf's version with modified version. * configure.in(clock_t): check in sys/time.h as well. * ksh_times.h: include ksh_time.h. * ksh_time.h,ksh_times.h: added ifndef KSH_TIME_H/KSH_TIMES_H. Fri Sep 6 13:20:24 NDT 1996 Michael Rendell (michael@panda.cs.mun.ca) * edit.c(promptlen): X\r hack for delimiting hidden characters in prompt. (Based on fix from Bill Kish) Tue Sep 3 11:03:26 NDT 1996 Michael Rendell (michael@panda.cs.mun.ca) * Makefile.in: removed options.h from HDRS (also removed file). Thu Aug 29 10:04:01 NDT 1996 Michael Rendell (michael@panda.cs.mun.ca) * aclocal.m4(KSH_MEMMOVE): added return 0 to end of main(). Fri Aug 23 14:23:50 NDT 1996 Michael Rendell (michael@panda.cs.mun.ca) * aclocal.m4,ksh_stat.h: changed S_IFFIFO to S_IFIFO. Fri Aug 23 09:58:09 NDT 1996 Michael Rendell (michael@panda.cs.mun.ca) * var.c(skip_wdvarname): don't check for array if first char isn't [. Thu Aug 22 12:51:25 NDT 1996 Michael Rendell (michael@panda.cs.mun.ca) * jobs.c: added ifdef KSH around Coproc_id/j->coproc_id usagae. * c_ksh.c(c_read): added ifdef KSH around opipe. Tue Aug 20 09:41:32 NDT 1996 Michael Rendell (michael@panda.cs.mun.ca) * configure.in: fixed quoting of sed LDSTATIC expression. Mon Aug 19 14:26:08 NDT 1996 Michael Rendell (michael@panda.cs.mun.ca) * made pdksh-5.2.8 distribution Mon Aug 19 11:38:16 NDT 1996 Michael Rendell (michael@panda.cs.mun.ca) * table.c(texpand): don't free entry if FINUSE is set. * var.c(unset): preserve ARRAY and DEFINED if unsetting foo[0]. Thu Aug 15 15:08:52 NDT 1996 Michael Rendell (michael@panda.cs.mun.ca) * jobs.c(sm_sigchld,sm_default): moved to sh.h. * sh.h(Coproc_id, struct coproc): new typedef; added njobs and id fields to struct coproc. * exec.c(execute): case TCOPROC: re-did coprocess stuff to use njobs/coprocess id. * jobs.c(struct Job): added coproc_id field. * jobs.c(exchild): initialize coproc_id to 0; set job coproc_id and increment coproc.njobs in parent. * jobs.c(checkjob): check coproc_id and close co-process input/output if needed. * exec.c(iosetup): only play with coprocess fds if this is an empty exec. * c_sh.c(c_read): commented out coproc_readw_close() call and eof call. * c_ksh.c(c_print): commented out closing coprocess fd on EPIPE. * jobs.c(exchild): in parent, last part of job: use orig_flags (not flags) when checking XCOPROC. Thu Aug 15 15:00:42 NDT 1996 Michael Rendell (michael@panda.cs.mun.ca) * io.c(get_coproc_fd,cleanup_coproc): renamed to coproc_getfd() and coproc_cleanup(), respecitively; changed all calls. Tue Aug 13 16:56:59 NDT 1996 Michael Rendell (michael@panda.cs.mun.ca) * expr.c(O_COMMA,P_COMMA): new enums. * expr.c(evalexpr): added case for O_COMMA. Tue Aug 13 15:18:28 NDT 1996 Michael Rendell (michael@panda.cs.mun.ca) * expr.c(do_ppmm): new function to handle ++/--. * expr.c(evalexpr): call do_ppmm() in P_PRIMARY code. * expr.c(LAST_BINOP): deleted. * expr.c(IS_BINOP): new define. * expr.c(evalexpr): use IS_BINOP. * expr.c(O_PLUSPLUS,O_MINUSMUNS,opinfo[]): new enums; updated opinfo * expr.c(ET_LVALUE,ET_RDONLY): new enums. * expr.c(token): var code: don't increment cp in iter part of for loop, do it in body; don't correct for off by 1 in array or !noasign code. * table.h(EXPRLVALUE): new define. * expr.c(token): var code: set EXPRLVALUE flag if noassign. * expr.c(intvar): copy temp var if EXPRLVALUE set. * expr.c(assign_check): new function. * expr.c(evalexpr): if assign-op, call assign_check(). Tue Aug 13 11:02:32 NDT 1996 Michael Rendell (michael@panda.cs.mun.ca) * vi.c(do_comment),edit.c(x_do_comment): made do_comment generic, renamed and moved to edit.c; changed all calls. * emacs.c(x_ftab[]): added x_comment. * emacs.c(x_defbindings[]): added XFUNC_comment as #. * emacs.c(x_comment): new function. Mon Aug 12 16:13:36 NDT 1996 Michael Rendell (michael@panda.cs.mun.ca) * expr.c(ET_BADVAR): deleted. * expr.c(ET_RECURSIVE, struct expr.evaling),table.h(EXPRNEVAL): added. * expr.c(v_evaluate): if curstate.evaling set, clear EXPRINEVAL. * expr.c(evalerr): added ET_RECURSIVE case, removed ET_BADVAR case. * expr.c(intvar): do recursion check, call v_evaluate() on value. Mon Aug 12 14:25:23 NDT 1996 Michael Rendell (michael@panda.cs.mun.ca) * io.c(coproc_read_close): call coproc_readw_close() instead of duplicating code. Mon Aug 12 11:21:39 NDT 1996 Michael Rendell (michael@panda.cs.mun.ca) * edit.c(x_locate_word): changed to allow at most 1 leading blank before the word. * edit.c(x_file_glob,x_command_glob,add_glob): allow zero length word. * edit.c(x_cf_glob): allow zero length globs on when doing file completion. * edit.c(x_complete_word): #if 0 - it isn't used... * edit.c(x_file_glob,x_command_glob,x_locate_word): made static. * eval.c(varsub): changed FNOUNSET error from "unset variable" to "parameter no set", ala at&t ksh. * c_ksh.c(c_typeset): print variables that aren't set (just leave out the =...). Mon Aug 12 11:03:22 NDT 1996 Michael Rendell (michael@panda.cs.mun.ca) * exec.c(findfunc): removed redundent DEFINED check after tsearch(). Fri Aug 9 22:16:21 NDT 1996 Michael Rendell (michael@panda.cs.mun.ca) * jobs.c(j_change): when turning off FMONITOR and not FTALKING, changed SS_RESTORE_CURR to SS_RESTORE_ORIG. * edit.c(x_sigwinch): new function. * edit.c(x_init): set up signal handler for SIGWINCH; moved code to get window size into x_sigwinch(); call x_sigwinch(). * emacs.c(xx_cols): new variable. * emacs.c(x_init): set xx_cols_to x_cols; change all uses of x_cols to xx_cols. * vi.c(display): when displaying morec, changed x_cols-2 to pwidth+winwidth+1. Fri Aug 9 12:49:00 NDT 1996 Michael Rendell (michael@panda.cs.mun.ca) * table.h(FKSH): new define. * tree.h(struct op): put evalflags into new union u, added ksh_func to union; changed all uses of evalflags. * syn.c(function_body): set u.ksh_func. * exec.c(execute): changed define() arg to t (was t->left). * exec.c(define): copy t->left (was t); set FKSH in flag if is a ksh function. * exec.c(comexec): don't keep assignments for x() style functions. * exec.c(comexec: case CFUNC: set kshname ($0) for ksh style functions only (was FPOSIX). * exec.c(execute): case TAND/TOR: pass XERROK on when executing right hand side. * jobs.c(exchild): deleted redundant code to set j->flags (near new_job() call). * sh.h(ksh_tmout),main.c(alarm_init),trap.c(alarm_init,alarm_catcher): ifdef'd KSH. * sh.h(SS_SHTRAP,Trap.shtrap): added. * trap.c(trapsig): if shtrap is non-zero, call it. * trap.c(setsig): set shtrap if SS_SHTRAP set. * jobs.c(j_init),trap.c(alarm_init): pass SS_SHTRAP. * jobs.c(j_sigchld),trap.c(alarm_catcher): don't call trapsig(). * trap.c(Sigact_alarm): removed. Thu Aug 8 15:57:14 NDT 1996 Michael Rendell (michael@panda.cs.mun.ca) * exec.c(comexec): case CEXEC: print cannot execute error only if / in pathname; also, set exit code to 126. * exec.c(do_selectargs): added print_menu arg; only print menu if this is set, or if REPLY is null; removed "while isspace" loop. * exec.c(execute): case TSELECT: call do_selectargs with print_menu of TRUE on first call only. * exec.c(define): added was_set variable and logic. * c_sh.c(c_unset): return 1 if variable/function to be unset wasn't set to begin with. Wed Jul 31 10:33:00 NDT 1996 Michael Rendell (michael@panda.cs.mun.ca) * sh.h(Tflag): new type. * sh.h(builtin_flag): changed type to Tflag. * table.h(struct tbl): changed type of flag field to Tflag. * c_ksh.c(typeset): changed type of flag, fset, fclr to Tflag. * c_ksh.c(c_alias): changed type of xflag to Tflag. * exec.c(comexec): changed type of old_inuse to Tflag. * exec.c(builtin): changed type of flag to Tflag. * var.c(typeset): changed set, clr args to Tflag; convert second arg of call to local() to boolean. Wed Jul 31 10:26:25 NDT 1996 Michael Rendell (michael@panda.cs.mun.ca) * sh.h(C_QUOTE): new define. * sh.h(ctypes[]),misc.c(ctypes[]): changed from char to short. * misc.c(initctypes): set C_QUOTE bits in ctypes[]. * misc.c(print_value_quoted): use C_QUOTE. Mon Jul 29 11:38:36 NDT 1996 Michael Rendell (michael@panda.cs.mun.ca) * lex.c(set_prompt): don't print warning message if setjmp returns non-zero. Fri Jul 26 10:16:27 NDT 1996 Michael Rendell (michael@panda.cs.mun.ca) * lex.c(set_prompt): don't do ! and parameter expansion if !KSH. * table.h(V_MAIL,V_MAILPATH,V_MAILCHECK): ifdef KSH. * var.c(initvar,setspec,unsetspec): ifdef KSH use of MAIL stuff. * mail.c: ifdef KSH whole file. * main.c(shell): ifdef KSH call to mcheck(). * main.c(initcoms[]): ifdef KSH the MAILCHECK=600. (based on patches from Marc Olzheim). * exec.c(PS4_SUBSTITUTE): new macro. * exec.c(execute, comexec, iosetup): use PS4_SUBSTITUTE. Thu Jul 25 17:19:17 NDT 1996 Michael Rendell (michael@panda.cs.mun.ca) * sh.h(F_VIESCCOMPLETE): new define. * misc.c(options[]): added vi-esccomplete. * vi.c(classify[]): make ^[ a repeatable command. * vi.c(vi_cmd): check F_VIESCCOMPLETE for ^[. Mon Jul 22 16:54:38 NDT 1996 Michael Rendell (michael@panda.cs.mun.ca) * c_ksh.c(c_getopts): return if variable is readonly; don't change OPTIND if option is bad (fragile). * c_sh.c(c_brkcont): use ksh_getopt(); changed error message if n <= 0. * c_sh.c(c_dot,c_eval,c_exitreturn): use ksh_getopt(). * misc.c(ksh_getopt): print `unknown option' instead of `bad option'. Mon Jul 22 16:08:40 NDT 1996 Michael Rendell (michael@panda.cs.mun.ca) * edit.c(x_init): do NOT export COLUMNS/LINES - causes more problems than it fixes. Mon Jul 22 15:49:35 NDT 1996 Michael Rendell (michael@panda.cs.mun.ca) * syn.c(get_command): fixed test for '< foo (command)' so it works. Fri Jun 21 09:57:47 NDT 1996 Michael Rendell (michael@panda.cs.mun.ca) * aclocal.m4(KSH_OPENDIR_CHECK): include dirent.h if HAVE_DIRENT_H defined (was DIRENT || _POSIX_VERSION). * aclocal.m4(KSH_UNISTD_H): don't test HAVE_DIRENT_H when including dirent.h. Wed Jun 12 11:02:32 NDT 1996 Michael Rendell (michael@panda.cs.mun.ca) * c_test.c(b_ops[]): added "==" entry (ksh93ism). Mon Jun 10 14:00:21 1996 Michael Rendell (michael@lyman.cs.mun.ca) * ksh_stat.h: undef S_ISSOCK if STAT_MACROS_BROKEN defined. * aclocal.m4(AC_HEADER_STAT): redefine autoconf's version to handle FreeBSD's S_ISSOCK. Tue Jun 4 08:41:19 NDT 1996 Michael Rendell (michael@panda.cs.mun.ca) * made pdksh-5.2.7 distribution * vi.c(CMDLEN): changed from 16 back to 1024. Sun Jun 2 11:54:46 NDT 1996 Michael Rendell (michael@panda.cs.mun.ca) * made pdksh-5.2.6 distribution Sun Jun 2 11:46:56 NDT 1996 Michael Rendell (michael@panda.cs.mun.ca) * exec.c(search_access): changed ordering of xsuffixes[], rsuffixes[]; removed code that used xsuffixes[] when suffix is present. * lex.c(getsc_line): set O_TEXT/O_BINARY if os/2. * main.c(remove_temps): added os2 ifdefs. [Changes from Dale DePriest.] Tue May 21 14:18:22 NDT 1996 Michael Rendell (michael@panda.cs.mun.ca) * vi.c(vi_cmd): case '#': call do_comment() to do work. * vi.c(do_comment): new function. * vi.c(putbuf,grabhist,grabsearch): fixed pesimestic off-by-1 error (cbufsize - 1 -> cbufsize). * vi.c(vi_hook): case VCMD: case -1: added refresh(0). * vi.c(vi_cmd): case 'P': don't move cursor back if nothing added. Tue May 21 12:03:34 NDT 1996 Michael Rendell (michael@panda.cs.mun.ca) * emacs.c(do_complete): don't add space if single match and it doesn't end with a /. Tue May 21 11:51:36 NDT 1996 Michael Rendell (michael@panda.cs.mun.ca) * edit.c(x_init): use typeset to set EXPORT attribute for COLUMNS/LINES. Tue May 21 11:40:12 NDT 1996 Michael Rendell (michael@panda.cs.mun.ca) * misc.c(parseargs): option setting: ignore context if option isn't being changed. * misc.c(printoptions): for non-verbose mode: print a set command (eg, set -o vi -o ...) instead of just the option names. Tue May 21 11:14:27 NDT 1996 Michael Rendell (michael@panda.cs.mun.ca) * c_sh.c(c_brkcont): if n is too big, use last enclosing loop. Fri May 10 09:27:47 NDT 1996 Michael Rendell (michael@panda.cs.mun.ca) * sh.h(Getopt): changed field p from int to unsigned. Tue May 7 12:10:47 NDT 1996 Michael Rendell (michael@panda.cs.mun.ca) * made pdksh-5.2.5 distribution Tue May 7 11:45:37 NDT 1996 Michael Rendell (michael@panda.cs.mun.ca) * syn.c(compile): set multiline if source is SSTRING. * syn.c(yyparse): don't peek before calling c_list() - build TEOF if c_list() fails and c is 0. * syn.c(c_list): remove SSTRING test. * syn.c(get_command): if EOF is reached, free iops,args,vars. * syn.c(syntaxerr): set multiline.on to false when it is used; don't use multiline.on if start token is 0. Tue May 7 10:11:41 NDT 1996 Michael Rendell (michael@panda.cs.mun.ca) * history.c(c_fc,hist_execute): moved calls to histbackup() from c_fc() to hist_execute(). * history.c(hist_get): number: took out +1 correction as histbackup hasn't been done yet; string: added -1 correction to ensure current fc command isn't searched. * history.c(hist_get_newest,hist_get_oldest): don't find the current (fc) command; removed print_err argument (was always true). * history.c(hist_get,hist_get_newest): added allow_cur argument; changed all calls. Mon May 6 09:55:29 NDT 1996 Michael Rendell (michael@panda.cs.mun.ca) * emacs.c(x_nextcmdp): renamed to x_nextcmd, changed from char ** to int. * emacs.c(x_nl_next_com): save absolute command number, not relative position in history array (which changes). * emacs.c(x_emacs): convert x_nextcmd back to relative position. * emacs.c(x_init_emacs): initialize x_nextcmd to -1. Sun May 5 13:10:48 NDT 1996 Michael Rendell (michael@panda.cs.mun.ca) * expr.c(evalexpr): when assigning a non-integer, call setint() (not setstr(..., strval(...))). Sun May 5 12:16:11 NDT 1996 Michael Rendell (michael@panda.cs.mun.ca) * mail.c(maddmsg): changed name to mprintit(); now prints message directly instead of saving in a linked list; changed all calls. * mail.c(mprint): deleted; deleted all calls. * mail.c(mmsgs,struct mailmsg): deleted. Sun May 5 11:52:05 NDT 1996 Michael Rendell (michael@panda.cs.mun.ca) * lex.h(SF_TTY): new flag. * lex.h(STTY): deleted. * main.c(main): if tty, use SSTDIN, set SF_TTY. * main.c(shell): check SF_TTY instead of STTY. * lex.c(getsc_): call getsc_line for SSTDIN/SFILE. * lex.c(getsc_line): new function (merged old STTY/SSTDIN/SFILE code). Fri May 3 11:24:17 NDT 1996 Michael Rendell (michael@panda.cs.mun.ca) * main.c(shell): changed exit_atend to toplevel. Changed interactive to be falking&toplevel (was talking&s->type==STTY). Fri May 3 10:59:22 NDT 1996 Michael Rendell (michael@panda.cs.mun.ca) * var.c(getint): only allow one base (ie, disallow 2#4#5). Thu May 2 21:31:23 NDT 1996 Michael Rendell (michael@panda.cs.mun.ca) * var.c(array_index_calc): new function * var.c(global): call array_index_calc(); moved $2 code into if (!letter(c))... * var.c(local): call array_index_calc(); added copy argument & code; changed all calls. * table.h(LOCAL_COPY): new define. * exec.c(comexec): maybe pass LOCAL_COPY to typeset(). Thu May 2 16:34:29 NDT 1996 Michael Rendell (michael@panda.cs.mun.ca) * emacs.c: command completion changes. * emacs.c(Comp_type,CT_LIST,CT_COMPLETE,CT_COMPLIST): new type. * emacs.c(x_ins): return type changed to int; return -1 if string can't be inserted. * emacs.c(x_do_ins): new function. * emacs.c(add_stash,list_stash,compl_dec,compl_file,compl_command, str_match): deleted; changed callers to use do_complete(). * emacs.c(do_complete,x_expand): new functions. * emacs.c(x_ftab[],x_defbindings[]): added entry for file-expand; bound to *. Thu May 2 15:31:32 NDT 1996 Michael Rendell (michael@panda.cs.mun.ca) * lex.c(set_prompt): pass strlen() + 1 to shf_sopen. (fix from Arnon Kanfi). Wed Apr 24 11:50:52 NDT 1996 Michael Rendell (michael@panda.cs.mun.ca) * history.c(c_fc): -e -: don't increment wp past null; allow pat=replace arg with "-1" type argument. (based on fix from Jason Tyler). Mon Apr 15 11:58:34 NDT 1996 Michael Rendell (michael@panda.cs.mun.ca) * table.c(tenter),alloc.c(alloc): changed use of offsetof() so field parameter is a constant expression. * sh.h: took out undef of offsetof on CRAYs. Fri Apr 12 16:01:40 NDT 1996 Michael Rendell (michael@panda.cs.mun.ca) * jobs.c(JF_USETTYMODE): renamed JR_ORIGFG to JF_USETTYMODE. * jobs.c(j_waitj): clear JF_USETTYMODE if fg job is stopped. Sun Apr 7 12:35:30 NDT 1996 Michael Rendell (michael@panda.cs.mun.ca) * c_ksh(c_print): echo: don't treat a lone minus as an option. Sat Apr 6 00:09:37 NST 1996 Michael Rendell (michael@panda.cs.mun.ca) * c_ulimit.c(c_ulimit.c): always pass 2 args to ulimit(). * ksh_sigsetjmp(): changed all uses to be simple expressions - seems to be required by the cray C compiler. * sh.h(offsetof): undef if on a cray. (based on fixes from Dave Kinchlea) Sat Mar 23 13:58:12 NST 1996 Michael Rendell (michael@panda.cs.mun.ca) * siglist.in: added WAITING,LWP,FREEZE,THAW,CANCEL Thu Mar 7 23:26:37 NST 1996 Michael Rendell (michael@panda.cs.mun.ca) * edit.c(x_init): set LINES if possible. Thu Mar 7 23:01:55 NST 1996 Michael Rendell (michael@panda.cs.mun.ca) * main.c(main): call x_init() after j_init() (based on fix from Stefan Dalibor). Thu Mar 7 16:13:10 NST 1996 Michael Rendell (michael@panda.cs.mun.ca) * aclocal.m4(KSH_OS_TYPE): check for TitanOS (use cc -43). * aclocal.m4(KSH_SIGNAL_TYPE): for bsd41 signals, check if signal interrupt read(). Thu Mar 7 13:59:29 NST 1996 Michael Rendell (michael@panda.cs.mun.ca) * sh.h(strstr),missing.c(strstr): changed args to const. Wed Mar 6 17:21:36 NST 1996 Michael Rendell (michael@panda.cs.mun.ca) * io.c(errorf,bi_errorf): changed null pointer string check to empty string; changed all calls (due to new error gcc warnings). Wed Mar 6 17:15:58 NST 1996 Michael Rendell (michael@panda.cs.mun.ca) * exec.c(search_access): files aren't executable if they don't have any execute bits. * ksh_stat.h: added S_IXUSR,S_IXGRP,S_IXOTH. * exec.c(search_access,search_access1): OS2: changed the meaning of these two functions (search_access1 now called from search_access). Wed Mar 6 16:23:23 NST 1996 Michael Rendell (michael@panda.cs.mun.ca) * tree.c(ptree): add case for TSELECT. Wed Mar 6 12:40:34 NST 1996 Michael Rendell (michael@panda.cs.mun.ca) * vi.c(Z_,is_zeroarg): new defines. * vi.c(classify): use Z_ for G, g, _, |, v, ^I, ^F. * vi.c(vi_cmd): use is_zerocount(). * vi.c(complete_word): if command prefixed by a count, complete to count'th expansion (as reported by print_expansions()). Tue Mar 5 14:43:48 NST 1996 Michael Rendell (michael@panda.cs.mun.ca) * eval.c(GF_NONE,GF_EXCHECK,GF_GLOBBED,GF_MARKDIR): new defines. * eval.c(glob_str): added markdirs argument; changed all calls; made function non-static. * eval.c(glob): added markdirs argument; changed all calls. * tree.h(DOMARKDIRS): new define. * eval.c(expand): set DOMARKDIRS if FMARKDIRS. * edit.c(x_complete_word,x_print_expansions,x_file_glob,x_command_glob, x_locate_word,x_cf_glob,x_add_glob,x_longest_prefix,x_free_words): new functions. * proto,edit.h: moved functions defined in edit.c to edit.h. * vi.c(struct edstate): moved to top of file. * vi.c(print_expansions): added struct edstate argument; changed all calls. * vi.c(struct glob,Glob,globstr,glob_word,): deleted * vi.c(vi_pprompt): new function; changed all calls of pprompt() in vi.c to use vi_pprompt(). * vi.c(x_vi): moved to top of file. * vi.c(expand_word,complete_word): free buf if it is not null. * vi.c(expand_word,complete_word,print_expansions): changed to use new edit.c functions. Tue Feb 20 11:02:05 NST 1996 Michael Rendell (michael@panda.cs.mun.ca) * table.c(twalk,tnext,struct tstate),table.h(struct tstate): moved struct tstate from table.c to table.h; changed twalk,tnext to take struct tstate* argument; changed all calls; deleted static tstate variable. Sat Feb 17 12:28:11 NST 1996 Michael Rendell (michael@panda.cs.mun.ca) * vi.c(vi_hook): case VSEARCH: if new pattern is empty, repeat last search. Sat Feb 10 15:59:28 NST 1996 Michael Rendell (michael@panda.cs.mun.ca) * table.h(struct arg_info): new struct. * table.h(struct block): changed argv, argc fields to argi. Sat Feb 10 15:12:47 NST 1996 Michael Rendell (michael@panda.cs.mun.ca) ANSI C name space requirements: * vi.c(isbad,iscmd,islong,ismove,issrch,isundoable,iswordch): changed to is_bad,is_cmd,is_long,is_move,is_srch,is_undoable,is_wordch. * emacs.c(iscfs,ismfs): changed to is_cfs, is_mfs. * emacs.c(strmatch): changed to str_match. * sh.h(strchr_dirsep,strrchr_dirsep): changed to ksh_strchr_dirsep, ksh_strtchr_dirsep; changed all calls. * missing.c(strichars[]): changed to ichars[]. * var.c(strint,strval): changed to setint_v, str_val. * missing.c(strsave,strnsave): changed to str_save,str_nsave. Fri Feb 9 11:30:15 NST 1996 Michael Rendell (michael@panda.cs.mun.ca) * main.c(main): remove envp parameter; declare and use environ. * c_ksh.c(c_print): octal digit escape sequences must start with \0. Sat Feb 3 15:35:41 NST 1996 Michael Rendell (michael@panda.cs.mun.ca) * vi.c(vi_cmd,classify[]): made ^I a command. Fri Feb 2 10:40:32 NST 1996 Michael Rendell (michael@panda.cs.mun.ca) * lex.h(struct source): added u.freeme field. * lex.c(getsc_): case SREREAD: free u.freeme iff start isn't u.ugbuf. Thu Feb 1 15:27:06 NST 1996 Michael Rendell (michael@panda.cs.mun.ca) * c_test.h(Test_env): added end union. * c_test.c(c_test): keep track of end postition using end.wp; don't write on wp. * emacs.c(x_mapin): changed to dup string, then munge; return duped; changed all calls. * eval.c(homedir): deleted getpwnam() declaration - can't believe its needed anywhere (we shall see, though). * sh.h(handler_t): use ARGS for prototype; use h * sh.h(struct trap),trap.c(setsig,settrap),sigact.c,sigact.h: use handler_t. * history.c,c_sh.c,c_ksh.c: removed register declaration from c_*() functions. * exec.c(builtin),proto.h(builtin): use prototype for func. * misc.c(qsortp,qsort1),proto.h(qsortp): use prototype for f. * c_ksh.c(ksh_getopt): made options arg const. * tree.c(fptreef,snptreef,vfptreef): made fmt arg const. * jobs.c(waitfor,j_kill,j_resume,j_lookup,j_jobs): made cp arg const. * shf.c(shf_snprintf,shf_smprintf,shf_vfprintf): made fmt arg const. * c_test.h(Test_env.error),c_test.c(ptest_error): made msg arg const. * c_test.c(test_stat,test_eaccess): made path arg const. * c_test.c(ptest_getopnd,dbteste_getopnd): made return value const. * c_test.c(ptest_eval,test_eval,dbteste_eval,dbtestp_eval,test_primary): made opnd1,opnd2 arg const. * c_test.c(test_isop): made s arg const. * misc.c(bi_getn,getn): made as arg const. * misc.c(getn): made as arg const. * misc.c(gmatch): made s/p arg const. * misc.c(has_globbing): made xp/xpe arg const. * misc.c(do_gmatch): made s/p/se/pe arg const. * misc.c(cclass): made p arg const. Thu Feb 1 14:54:32 NST 1996 Michael Rendell (michael@panda.cs.mun.ca) * edit.h, sh.h, tty.h: changed _I_ to I__. * edit.h, edit.c: changed _D_ to D__. * jobs.c,shf.c,tty.c: include ksh_stat.h (POSIX: needed for open). * sigact.c: use ARGS instead of __P; comment out __P defines. * shf.c: include math.h if FP. * shf.c(my_ceil): remove modf() declaration. * shf.c(shf_fvprintf): comment out frexp() declaration; changed exp to expo. * jobs.c(struct job, j_utime, j_stime): changed utime/stime to usrtime/systime; change j_utime/j_stime to j_usrtime/j_systime. Wed Jan 31 16:13:44 NST 1996 Michael Rendell (michael@panda.cs.mun.ca) * edit.c(x_getc): cast return value to int to avoid warnings on strange compilers. * exec.c(funcfunc): changed second arg to unsigned int (was int). * syn.c(elsepart): move return NULL to end of function (avoids warning from some compilers). * vi.c(classify[]): changed type to unsigned char. * shf.c(shf_smprintf): delete unused variable n. * aclocal.m4(KSH_TIMES_CHECK): define INT32 in test code. * aclocal.m4(KSH_SIGNAL_CHECK): typeo: had bsd42 instead of bsd41. * sh.h(MAGIC): changed to 7 to increase portability. * jobs.c(tcsetpgrp,tcgetpgrp): define if TTY_PGRP (was TIOCSPGRP). Tue Jan 23 11:40:25 NST 1996 Michael Rendell (michael@panda.cs.mun.ca) * sh.h(ksh_jmp_buf): new define. Thu Jan 18 15:03:19 NST 1996 Michael Rendell (michael@panda.cs.mun.ca) * history.c(hist_replace): fixed substitution code (again). Wed Jan 17 20:10:02 NST 1996 Michael Rendell (michael@panda.cs.mun.ca) * made pdksh-5.2.4 distribution * main.c(initcoms): changed hash alias to "hash=alias -t". * exec.c(do_selectargs): deleted c_read() declaration. * c_ksh(c_alias): call ksh_getopt_reset() before calling c_unalias(). Wed Jan 17 19:47:55 NST 1996 Michael Rendell (michael@panda.cs.mun.ca) * history.c(histbackup): changed "histptr > history" to "histptr >= history". * history.c(hist_replace): removed un-needed "last" - use "s" instead. (based on fix from Jason Tyler). Thu Jan 11 15:59:46 NST 1996 Michael Rendell (michael@panda.cs.mun.ca) * c_ksh.c(c_whence,c_command),main.c(initcoms[]): removed ifdef KSH (type is a builtin in sys-5 sh). Wed Jan 10 11:49:59 NST 1996 Michael Rendell (michael@panda.cs.mun.ca) * Makefile.in: added NEWS.os2 to OS2FILES. * version.c: include "sh.h" (needed for const define). * exec.c(pr_menu): made non-static. * vi.c(print_expansions): gather expansions into an arrat and use pr_menu(). (fixes from Mike Jetzer). * vi.c(redraw_line): added newline option; changed all calls. Wed Jan 10 10:21:06 NST 1996 Michael Rendell (michael@panda.cs.mun.ca) * vi.c(classify): made 'U' a C_. * vi.c(ohnum): new variable. * vi.c(vi_reset): set ohnum to hlast. * vi.c(grabhist): set ohnum. * vi.c(vi_cmd): case n,N,/,? set ohnum; added case 'U'. * vi.c(edit_reset): clear holdlen. (based on fix from Dale DePriest). Tue Jan 9 11:23:36 NST 1996 Michael Rendell (michael@panda.cs.mun.ca) * emacs.c(iscfs): make ', " seperators. (fix from Dale DePriest). * conf-end.h: deleted stuff to undef HISTORY, VI, EMACS, etc if KSH wasn't defined (now done in configure). * sh.h(GI_NONAME): changed to GF_NONAME; changed all uses. * configure.in: added AC_ARG_PROGRAM. * Makefile.in: replaced binprefix and manprefix with program_transform stuff. Mon Jan 8 11:42:46 NST 1996 Michael Rendell (michael@panda.cs.mun.ca) * sh.h(struct temp): added shf field. * io.c(maketemp): changed to use O_EXCL; keep trying if open fails (due to O_EXCL); fill in shf field; changed all calls. * main.c(include): added intr_ok flag; changed all calls. * main.c(main): if compiled as sh and posix option not set, do not include $ENV. * trap.c: define FROM_TRAP_C before including sh.h. * sh.h: don't declare sigtraps if FROM_TRAP_C declared. * c_ksh.c(c_cd): fixed error message. * vi.c(glob_word): don't add * if word contains a $. (Based on fixes from Mike Jetzer). * eval.c(tilde): if HOME,PWD,OLDPWD aren't set, don't expand ~,~+/~-. Fri Jan 5 12:15:58 NST 1996 Michael Rendell (michael@garfield.cs.mun.ca) * c_ksh.c(c_typeset): separate loop for printing functions (do not traverse array link). * c_ksh.c(c_typeset): list functions: do not ignore unset functions. * exec.c(findfunc): set val.t to 0 when creating new entry. * exec.c(define): if FINUSE, use tail recursion. Thu Jan 4 11:10:22 NST 1996 Michael Rendell (michael@panda.cs.mun.ca) * vi.c(globstr): deleted ifdef'd out code. Sun Dec 10 11:07:52 NST 1995 Michael Rendell (michael@panda.cs.mun.ca) * lex.c(yylex): added case for STBRACE; wrap word part of trim substitution in @(..). * eval.c(trimsub): deleted code to wrap pattern in @(..); changed '%' code to use strnsave(). Fri Dec 8 22:55:56 NST 1995 Michael Rendell (michael@panda.cs.mun.ca) * eval.c(trimsub): if trim pattern contains a |, wrap pattern in @(...). * lex.c(yylex): make | special when incounted in a ${...} substitution. Fri Dec 8 11:52:38 NST 1995 Michael Rendell (michael@panda.cs.mun.ca) * var.c: ifdef'd HISTFILE, HISTSIZE stuff with HISTORY (was KSH). * *.c,*.h: ifdef'd coprocess stuff with KSH. Thu Dec 7 14:41:06 NST 1995 Michael Rendell (michael@angel.cs.mun.ca) * options.h(BRACEEXPAND): changed to BRACE_EXPAND; changed all references. Thu Dec 7 13:54:20 NST 1995 Michael Rendell (michael@angel.cs.mun.ca) * exec.c(do_selectargs): don't print newline on eof. Thu Dec 7 10:23:30 NST 1995 Michael Rendell (michael@angel.cs.mun.ca) * c_ksh.c(c_print): added -f for OS2. * tree.h(DODIRSWP),eval.c: deleted define and all uses of it. * exec.c(scriptexec): ... * io.c(check_fd): set O_TEXT/O_BINARY flag for OS2. * main.c(main): set O_BINARY/O_TEXT, search path for arg. * emacs.c(compl_file): call opendir with buf, not dirnam. (based on changes from Dale DePriest). Wed Nov 29 15:50:36 NST 1995 Michael Rendell (michael@angel.cs.mun.ca) * eval.c(expand,debunk): handle extended pattern matching stuff. * eval.c(debunk): now has two arguments, changed all calls. * eval.c(globit): changed to use has_globbing. * eval.c(copy_non_glob): deleted. * misc.c(has_globbing): new function. * misc.c(cclass): changed argument to unsigned char *; handle extended pattern matching. * misc.c(do_gmatch): new function (taken from gmatch()). * misc.c(gmatch): changed to call do_gmatch. * misc.c(do_gmatch): added cases for extended pattern matching (*(foo|bar), etc.). * misc.c(pat_scan): new function. * lex.c(yylex): added SPATTERN case. * lex.c(arraysub): changed to assume just past the leading [ (was assuming about to read [); changed all calls; changed to use getsc_bn(). * lex.c(ungetsc): added argument; changed all calls; can now unget arbitrary number of characters. * lex.c(ungetsc_): new function. * lex.h(struct source): added start field, removed u.start field, changed all uses. * lex.c(getsc_): case STTY: skip blank line only if this is first line of a command (eg, not part of here documennt, etc.). * lex.c(yylex): case SHEREDELIM,SHEREDQUOTE: ignore \newline. * lex.c(readhere,get_brace_var): ignore \newline. * lex.c(getsc_bn,getsc_bn_): new define/function. * exec.c(iosetup): don't enforce noclobber for non-regular files. * tree.h(OPAT,SPAT,CPAT): new defines. * tree.c(tputS,wdscan): added cases for OPAT,SPAT,CPAT. * lex.c(yylex): moved case '[' from Subst: switch to case SBASE:. Tue Nov 14 11:00:48 NST 1995 Michael Rendell (michael@angel.cs.mun.ca) * syn.c(get_command,caselist): moved parsing of IN/ESAC into caselist; allow {/} instead of IN/ESAC; * syn.c(casepart): new parameter: endtok. * lex.c(yylex): allow } as well as ESAC when ESACONLY set. (changes based on fix from DaviD W. Sanderson). Tue Nov 14 10:22:17 NST 1995 Michael Rendell (michael@angel.cs.mun.ca) * main.c(shell): do not zero exstat at start of routine. * exec.c(execute): removed redundent "exstat = rv" before unwind(LERROR). Thu Nov 9 15:01:54 NST 1995 Michael Rendell (michael@angel.cs.mun.ca) * var.c(arrayname): made argument const. * var.c(typeset): made var argument const. * var.c(export): made val argument const. * tree.c(wdscan): changed return type to non-const (added casts). Thu Nov 9 14:39:49 NST 1995 Michael Rendell (michael@panda.cs.mun.ca) * c_ksh.c(c_alias),c_sh.c(c_set): made args[] array const. * c_ulimt.c(c_ulimit): made limits[] array const. * edit.c(x_mode): x_cur_mode no longer explicitly initialized to 0. * emacs.c(x_tab,x_atab): no longer explicitly initialized to 0. * exec.c(comexec): made texec non-static, non-initialized. * history.c(hist_finish): once no longer explicitly initialized to 0. * io.c(maketemp): io no longer explicitly initialized to 0. * jobs.c(job_list,last_job,async_job,free_jobs,free_procs): no longer explicitly initialized to 0. * jobs.c(lookup_msgs[],tt_sigs[]): made array const. * mail.c(mplist,mbox,mlastchkd,mmsgs): no longer explicitly initialized to 0. * vi.c(expand_word,complete_word): buf no longer explicitly initialized to 0. * vi.c(classify[]): made array const. Tue Nov 7 11:08:01 NST 1995 Michael Rendell (michael@panda.cs.mun.ca) * mkman: new script * Makefile.in: use mkman to generate ksh.1 * ksh.Man,ksh.1: renamed ksh.1 to ksh.Man * ksh.Man: changed way sh/ksh option handled. (changes based on fix from Michael Haardt). Tue Sep 19 09:53:53 NDT 1995 Michael Rendell (michael@panda.cs.mun.ca) * jobs.c(j_stopped): deleted function. * jobs.c(j_exit): send SIGCONT, then SIGHUP; send SIGHUP if job is in foreground. (based on fix from Paul Borman) * Makefile.in: move .PRECIOUS to after all. Wed Sep 13 15:00:22 NDT 1995 Michael Rendell (michael@panda.cs.mun.ca) * exec.c(dbteste_getopnd): changed tests from TO_STLT/TO_STGT to TO_STEQL/TO_STNEQ. Thu Aug 31 11:54:02 NDT 1995 Michael Rendell (michael@panda.cs.mun.ca) * jobs.c(exchild): if fork fails, allow user to ^C out of loop. Tue Aug 29 09:40:37 NDT 1995 Michael Rendell (michael@panda.cs.mun.ca) * exec.c(iosetup): don't do globing if not interactive (POSIX). * exec.c(iosetup): print <& or >& as appropriate in error message. * tree.h(IONAMEXP): new define. * tree.c(pioact): handle IONAMEXP. * exec.c(iosetup): set IONAMEXP. * io.c(savefd): added noclose parameter; changed all calls. * exec.c(iosetup): move call to savefd() to after the open(); re-arranged the dup'ing (failed dups reported). * main.c(shell): call quitenv() before internal_error(). Sun Aug 13 21:38:44 NDT 1995 Michael Rendell (michael@panda.cs.mun.ca) * sh.h(ksh_sigsetjmp,ksh_siglongjmp): new defines; changed all uses of setjmp/longjmp to these. * configure.in: added checks for sigsetjmp() and _setjmp(). Wed Jul 26 10:08:23 NDT 1995 Michael Rendell (michael@panda.cs.mun.ca) * c_ulimit.c(c_ulimit): added -p ("maxproc", RLIMIT_NPROC) (fix from Simon J. Gerraty). Thu Jun 29 10:22:51 NDT 1995 Michael Rendell (michael@panda.cs.mun.ca) * edit.c(promptlen): added spp parameter; changed all calls. * vi.c(prompt_skip): new variable. * vi.c(edit_reset): set prompt_skip; use prompt_skip in all calls to pprompt(). Sat Jun 24 15:55:03 NDT 1995 Michael Rendell (michael@panda.cs.mun.ca) * IAFA-PACKAGE: new file. * Makefile.in: added IAFA-PACKAGE to DISTFILES. Mon Jun 19 10:04:52 NDT 1995 Michael Rendell (michael@panda.cs.mun.ca) * main.c(initcoms[]): added EXTRA_INITCOMS. Fri Jun 16 12:33:10 NDT 1995 Michael Rendell (michael@panda.cs.mun.ca) * exec.c(search_access1): use FILECMP() instead of strcmp(). * sh.h(FIELCHCONV): OS2 version: added isascii(). * misc.c(gmatch); took unsigned out again for sc and pc. * main.c(main): don't set PS1 if it's already set; set it if we are root and prompt doesn't contain a #.