📄 changelog.0
字号:
with an argument (POSIX); deleted cargp argument to parse_args(). * main.c(main): print error if -c and no arguments left. * lex.h(SSTDIN): new define. * lex.c(yylex): added case for SSTDIN. * main.c(main): if -s flag used, set source type to SSTDIN.Tue Sep 27 08:52:11 NDT 1994 Michael Rendell (michael@arlene.cs.mun.ca) * lex.c(get_brace_var): new function. * lex.c(yylex): removed most ${..} parsing - leave it to expand(); use get_brace_var() to read the variable part of a ${..} expression. * tree.c(tputs,wdscan): case OSUBST: delete code that understood partially compiled ${..}. * sh.h(C_SUBOP,C_SUBOP1,C_SUBOP2): changed C_SUBOP to C_SUBOP1, added C_SUBOP2. * misc.c(initctypes): removed # and % from C_SUBOP; changed C_SUBOP to C_SUBOP1; added C_SUBOP2. * eval.c(varsub): look at word part of substitution to figure out type of substitution; check for bad substitutions; check for unset variables for #/% substitutions. * eval.c(struct SubType): changed type field to stype; changed quote field to short; added f field. * tree.h(DOTEMP_): new define. * eval.c(expand): case CSUBST: case '=': deleted bad substitution error (now handled in varsub); case OSUBST: removed special handling of trimming - varsub() does it now; when pushing/poping state (st), save/restore value of f; set f to DOPAT when trimming; case CSUBST: case '=': restore original position in string, substitute the value of the variable (as opposed to the value that was assigned to the variable); case OSUBST: if '?' qualifier, turn off DOBLANK when expandined word part; define DOTEMP_ when expanding word part of ${..[#%=?]..}; deleted first_eq and tstart - replaced with tilde_ok and saw_eq. * eval.c(expand): tilde expansion: use tstart variable instead of cp; changed '?' error message to be like at&t ksh; don't test if strval() returns NULL - it doesn't. * var.c(strval): if !ISSET, instead of returning null, set s to null. * exec.c(comexec): case TDBRACKET: don't pass DOASNTILDE to evalstr(). * exec.c(scriptexec): changed line[] to buf[] so it doesn't get confused with global the line[]. * main.c(initsubs): initialize PS4. * edit.c(x_getc): cast char to unsigned before returning.Mon Sep 26 11:06:55 NDT 1994 Michael Rendell (michael@arlene.cs.mun.ca) * eval.c(globit): call strnsave instead of strsave; if file has trailing /, use stat() to check that it is a directory. * eval.c(expand): case CSUBST: case #/%: deleted duplicate *dp = 0; case CSUBST: case =: copy string and call debunk() to oust MAGICs. * misc.c(print_value_quoted): deleted bogus shf_shlout argument to shprintf(); deleted unneeded test (p != s). * main.c(main): turn on FBRACEEXPAND. * misc.c(change_flag): turn FBRACEEXPAND off if turning FPOSIX on. * vi.c(x_vi): use x_vi_zotc() to print ^D. * vi.c(CHAR_LEN): new define. * vi.c(vi_hook): use CHAR_LEN() instead of inline tests for c < ' ' || c== 0x7f; search editing: display M- if necessary. * vi.c(display): changed to deal tiwh meta-characters. * vi.c(x_vi_zotc): print M- for meta chars. * emacs.c(x_e_getc): new function; changed all x_getc() calls to x_e_getc() calls. * edit.c(x_getc): don't and out upper bit. * sh.h(OPAREN,CPAREN,OBRACK,CBRACK,OBRACE,CBRACE): new defines * expr.c(OPAREN,CPAREN): re-named to OPEN_PAREN, CLOSE_PAREN. * eval.c(debunk): changed to convert MAGIC MAGIC -> MAGIC. * eval.c(expand): removed ismagic_bracket stuff - not needed. * eval.c(expand): always restore value of quote when CSUBST reached; don't set DOGLOB in fdo if trimming.Sat Sep 24 11:46:03 NDT 1994 Michael Rendell (michael@arlene.cs.mun.ca) * tree.h(DOBRACE_): new define. * eval.c(expand): changed check for leading ! in [..] to be more robust (old test could have looked before start of string). * eval.c(expand,maybe_expand_tilde): case ~: moved code into a function (maybe_expand_tilde). * eval.c(expand): expand alternations after macros, before globing (was before macros). * eval.c(alt_expand): changed to be called after macro expansion. * eval.c(alt_scan,alt_count): deleted (no longer needed). * misc.c(cclass): return NULL (no match) if first char in a range is greater than the second. * eval.c(expand): when building strings, stuff literal MAGIC chars.Thu Sep 22 15:05:48 NDT 1994 Michael Rendell (michael@panda.cs.mun.ca) * exec.c(comexec): re-arranged handling of builtin and exec; handle command (and command -p, etc.); deleted comexec_flags variable; made function static again; removed fcflags argument. * table.h(FC_NOBLOCK): deleted define. * c_sh.c(c_exec): changed empty function to deal with preserving I/O redirects (code taken from comexec()). * c_ksh.c(c_command): new function - calls c_whence. * c_ksh.c(c_whence): removed code to deal with command -p. * Makefile.in: changed [ to test. * shf.h: changed errno structure member to errno_; changed all uses (fixes for QNX from Brian Campbell). * c_test.c(enum Op): deleted trailing comma (some compilers complain). * proto.h: added volatile to tp arg of comexec() prototype.Thu Sep 22 11:08:31 NDT 1994 Michael Rendell (michael@panda.cs.mun.ca) * made pdksh-5.0.8 distribution * Makefile.in(install): added missing dollar (fix from Thomas Gellekum). * emacs.c: changed CMASK to CHARMASK to avoid conflicts with some system headers (eg, HP-UX 9.01 <sys/param.h>). Reported by Sean Hogan. * history.c(c_fc): wp not being incremented; -e strcmp() test reversed (reported by Sean Hogan).Thu Sep 21 21:12:03 NDT 1994 Michael Rendell (michael@panda.cs.mun.ca) * made pdksh-5.0.7 distributionTue Sep 20 09:56:54 NDT 1994 Michael Rendell (michael@arlene.cs.mun.ca) * history.c(c_fc): use ksh_getopt() to parse arguments. * c_ksh.c(c_bind): use ksh_getopt() to parse arguments. * main.c(initcoms[]): changed hash alias from alias -t - to alias -t --. * misc.c(print_value_quoted): don't use quotes if no special characters. * c_ksh.c(c_whence): added POSIX command command. * c_sh.c(c_label): removed check for null wp. * exec.c(comexec): added new flags argument (FC_*); don't call newblock() if FC_NOBLOCK set; pass flags on to findcom(); changed all calls; made comexc() a non-static function. * table.h:(FC_SPECBI,FC_FUNC,FC_REGBI,FC_UNREGBI,FC_PATH,FC_DEFPATH, FC_NOAUTOLOAD,FC_NOBLOCK): new defines. * exec.c(findcom): merged insert/justsearch/autoload arguments into one flags argument; changed code to check various flags; changed all calls.Sat Sep 17 20:17:59 NDT 1994 Michael Rendell (michael@garfield.cs.mun.ca) * exec.c(comexec): print error if builtin has no command. * exec.c(execute): before doing redirections, check for TCOM and evaluate arguments and determine if it is a special builtin; print arguments (using PS4) if FXTRACE set; case TCOM: simply call comexec(). * exec.c(comexec): deleted vp argument; only call newblock() if needed (ie, !special, !empty); evaluate assignments and put in environment one at a time; print environment (using PS4) if FXTRACE set; removed code to turn empty command into :; removed environment setting code in switch statement. * exec.c(echo): deleted function. * lex.c(yylex): only honour CMDWORD if FPOSIX set. * c_sh.c(shbuiltins): removed = attribute from false/true commands. * sh.h(E_TCOM): delete define - not used. * sh.h(null),var.c: use EXTERN for initialization of null. * sh.h(space,newline,slash): new variables (" ", "\n", "/") use these everwhere instead of "", " ", "\n", "/". * path.c: include sh.h. * exec.c(execute): combined TFOR/TSELECT cases.Fri Sep 16 11:32:01 NDT 1994 Michael Rendell (michael@panda.cs.mun.ca) * lex.h(CMDWORD): new define to prevent continued alias expansion in non-command contexts. * lex.c(yylex): only set ALIAS if SF_ALIAS and CMDWORD are set. * syn.c(get_command): case LWORD/REDIR: pass CMDWORD if argc is 0. * exec.c(comexec): if there is no command, do assignments and set the return value to subst_exstat (used to fake a : command). * sh.h(subst_exstat): new variable. * exec.c(execute): case TCOM: clear subst_exstat before doing eval()s. * eval.c(expand): set subst_exstat to return value of waitlast(). * c_sh.c(c_set): if !FPOSIX, return subst_exstat instead of 0. * exec.c(execute): removed redundent "exstat = rv;" near if FERREXIT. * exec.c(comexec): case CFUNC: for normal function completion, set i to 0 and rv to return value of execute() (was i=LRETURN,exstat=..). * main.c(include): return -1 if file could not be found/opened, otherwise, the exit status of the last command is returned; changed all calls. * c_sh.c(c_dot): print error if include() returns < 0. * var.c(setspec): ifdef EDIT'd V_VISUAL, V_EDITOR cases. * misc.c(parse_args): no longer accept set -o alternations as a substitute for set -o braceexpand. * jobs.c(j_exit): when restoring tty process group, also restore our process group. * config.h.bot: define JOB_SIGS iff we have modern signal and wait routines. * jobs.c: use ifdef JOB_SIGS instead of ifdef JOBS when setting signal masks and routines or using waitpid; define TTY_PGRP and NEED_PGRP_SYNC separately from JOBS. * jobs.c(j_kill): only send SIGCONT if job is stopped. * jobs.c(j_jobs): remove exited/signaled jobs even if !FMONITOR, un-ifdef JOBS same. * jobs.c(check_job): ifdef FNOTIFY with JOBS (noted by Michael Haardt <u31b3hs@POOL.Informatik.RWTH-Aachen.DE>). * jobs.c(j_notify,j_waitj): put ifdef JOBS around use of FMONITOR. * main.c(shell): removed ifdef JOBS from declaration of interactive. * ksh_limval.h,sh.h: moved include of <limits.h> from ksh_limval.h to sh.h since some machines define CLK_TCK there.Thu Sep 15 09:58:14 NDT 1994 Michael Rendell (michael@panda.cs.mun.ca) * vi.c(vi_cmd): took out ESC as file completion char in command mode (too annoying). * jobs.c(exchild): if starting a job in the background and FBGNICE is set, call nice(). * Makefile.in: changed maxext to manext (fix from Thomas Gellekum <thomas@ghpc8.ihf.rwth-aachen.de>); in the install target, check if the path of the installed shell is in /etc/shells and complain if it isn't; added depend target, removed old $(OBJS) and trap.o dependencies.Wed Sep 14 09:39:55 NDT 1994 Michael Rendell (michael@panda.cs.mun.ca) * misc.c(options[]): changed position of vi-tabcomplete option. * lex.c(yylex): ifdef use of FVI/FEMACS/FGMACES with VI/EMACS (fix from Gordan Larson <hoh@approve.se>). * ksh.1(DESCRIPTION): added missing P in \fP (fix from Gordan Larson <hoh@approve.se>).Tue Sep 13 11:01:47 NDT 1994 Michael Rendell (michael@panda.cs.mun.ca) * made pdksh-5.0.6 distributionMon Sep 12 11:39:07 NDT 1994 Michael Rendell (michael@panda.cs.mun.ca) * exec.c(scriptexec): changed so it will compile if SHARPBANG is defined; fixed error message; shell argument is everything up to a newline; don't listen to #! line unless it ends in a newline. * syn.c(get_command): case FOR: changed VARASN to ARRAYVAR. * jobs.c(waitfor): restore signal mask before returning if named job isn't own own; when waiting for unspecified jobs, only consider running jobs; don't pass JW_STOPPEDWAIT flag to j_wait. * table.h(V_TMPDIR,tmpdir): new define/variable. * var.c(setspec, unsetspec): added case for V_TMPDIR. * io.c(maketemp): use tmpdir variable if it is set, else use /tmp. * var.c(popblock): if poping a variable that wasn't set in the old environment, call unsetspec().Fri Sep 9 10:37:18 NDT 1994 Michael Rendell (michael@panda.cs.mun.ca) * sh.h(PATHMAX): increased value from 256 to 1024. * main.c(main): moved initialization of name to start of main; if getcwd() fails, use name in error message and call shf_flush(). * io.c(maketemp): check/use TMPDIR variable instead of /tmp; allocate temp structure and path in one chunk. * c_ksh.c(c_cd): when checking for no home directory, compare against null, not (char *) 0.Thu Sep 8 10:52:59 NDT 1994 Michael Rendell (michael@panda.cs.mun.ca) * lex.c(yylex): case SHIST: flush shl_out after printing command. * jobs.c(check_job): when notifing, do not remove job if it is stopped.Wed Sep 7 10:55:35 NDT 1994 Michael Rendell (michael@panda.cs.mun.ca) * made pdksh-5.0.5 distribution * main.c(shell): commented out shf_flush(shl_out) - shouldn't be needed since -v flushes itself.Tue Sep 6 09:30:57 NDT 1994 Michael Rendell (michael@arlene.cs.mun.ca) * sh.h(LSHELL,really_exit): new define/variable. * c_sh.c(c_exitreturn): if how is LEXIT, check if there are stopped jobs and, if so, unwind with LSHELL (also check/set really_exit). * main.c(shell): added case for LSHELL - stop unwinding if shell is interactive; changed local reallyquit to global really_exit. * main.c(include),exec.c(comexec): added case for LSHELL. * c_sh.c(c_exitreturn): quitenv() for LRETURN as well as LEXIT. * sh.h(TF_CHANGED): new define. * trap.c(runtrap): default EXIT/ERR trap during execution and restore original if TF_CHANGED not set. * trap.c(settrap): set TF_CHANGED when setting trap. * jobs.c(j_stopped): check that job created by current process; print "You have stopped jobs" message. * main.c(shell): don't print you have stopped jobs message. * main.c(initcoms): removed echo alias. * c_ksh.c(kshbuiltins): added echo as a builtin. * c_ksh.c(c_print): if wp[0] is echo, act like strict sysv echo; added \a (BEL) escape sequence. * syn.c(function_body): new function; calls get_command() to get the body of a function (old code did nested { } block which caused problems with how redirections after the block were handled). * syn.c(get_command): call function body to deal with foo() and function foo. * jobs.c(res
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -