📄 news
字号:
Bug fix in substr() -- wasn't handling 3rd arg. of -1 properly.Manpage updates.Moved support from src release to doc release.Updated FUTURES file.Added some "lint" warnings.Changes from 2.12.7 to 2.12.8-----------------------------Changed time() to systime().Changed warning() in snode() to fatal().strftime() now defaults second arg. to current time.Changes from 2.12.6 to 2.12.7-----------------------------Fixed bug in sub_common() involving inadequate allocation of a buffer.Added some missing files to the Makefile.Changes from 2.12.5 to 2.12.6-----------------------------Fixed bug wherein non-redirected getline could call iop_close() just prior to a call from do_input().Fixed bug in handling of /dev/stdout and /dev/stderr.Changes from 2.12.4 to 2.12.5-----------------------------Updated README and support directory.Changes from 2.12.3 to 2.12.4-----------------------------Updated CHANGES and TODO (should have been done in previous 2 patches).Changes from 2.12.2 to 2.12.3-----------------------------Brought regex.c and alloca.s into line with current FSF versions.Changes from 2.12.1 to 2.12.2-----------------------------Portability improvements; mostly moving system prototypes out of awk.hIntroduction of strftime.Use of CONVFMT.Changes from 2.12 to 2.12.1-----------------------------Consolidated treatment of command-line assignments (thus correcting the-v treatment).Rationalized builtin-variable handling into a table-driven process, thussimplifying variable() and eliminating spc_var().Fixed bug in handling of command-line source that ended in a newline.Simplified install() and lookup().Did away with double-mallocing of identifiers and now free second and laterinstances of a name, after the first gets installed into the symbol table.Treat IGNORECASE specially, simplifying a lot of code, and allowingchecking against strict conformance only on setting it, rather than on eachpattern match.Fixed regexp matching when IGNORECASE is non-zero (broken when dfa.c was added).Fixed bug where $0 was not being marked as valid, even after it was rebuilt.This caused mangling of $0.Changes from 2.11.1 to 2.12-----------------------------Makefile:Portability improvements in Makefile.Move configuration stuff into config.hFSF files:Synchronized alloca.[cs] and regex.[ch] with FSF.array.c:Rationalized hash routines into one with a different algorithm.delete() now works if the array is a local variable.Changed interface of assoc_next() and avoided dereferencing past the end of the array.awk.h:Merged non-prototype and prototype declarations in awk.h.Expanded tree_eval #define to short-circuit more calls of r_tree_eval().awk.y:Delinted some of the code in the grammar.Fixed and improved some of the error message printing.Changed to accomodate unlimited length source lines.Line continuation now works as advertised.Source lines can be arbitrarily long.Refined grammar hacks so that /= assignment works. Regular expressions starting with /= are recognized at the beginning of a line, after && or || and after ~ or !~. More contexts can be added if necessary.Fixed IGNORECASE (multiple scans for backslash).Condensed expression_lists in array references.Detect and warn for correct # args in builtin functions -- call most of them with a fixed number (i.e. fill in defaults at parse-time rather than at run-time).Load ENVIRON only if it is referenced (detected at parse-time).Treat NF, FS, RS, NR, FNR specially at parse time, to improve run time.Fold constant expressions at parse time.Do make_regexp() on third arg. of split() at parse tiem if it is a constant.builtin.c:srand() returns 0 the first time called.Replaced alloca() with malloc() in do_sprintf().Fixed setting of RSTART and RLENGTH in do_match().Got rid of get_{one,two,three} and allowance for variable # of args. at run-time -- this is now done at parse-time.Fixed latent bug in [g]sub whereby changes to $0 would never get made.Rewrote much of sub_common() for simplicity and performance.Added ctime() and time() builtin functions (unless -DSTRICT). ctime() returns a time string like the C function, given the number of seconds since the epoch and time() returns the current time in seconds.do_sprintf() now checks for mismatch between format string and number of arguments supplied.dfa.cThis is borrowed (almost unmodified) from GNU grep to provide faster searches.eval.cNode_var, Node_var_array and Node_param_list handled from macro rather than in r_tree_eval().Changed cmp_nodes() to not do a force_number() -- this, combined with a force_number() on ARGV[] and ENVIRON[] brings it into line with other awksGreatly simplified cmp_nodes().Separated out Node_NF, Node_FS, Node_RS, Node_NR and Node_FNR in get_lhs().All adjacent string concatenations now done at once.field.cAdded support for FIELDWIDTHS.Fixed bug in get_field() whereby changes to a field were not always properly reflected in $0.Reordered tests in parse_field() so that reference off the end of the buffer doesn't happen.set_FS() now sets *parse_field i.e. routine to call depending on type of FS.It also does make_regexp() for FS if needed. get_field() passes FS_regexp to re_parse_field(), as does do_split().Changes to set_field() and set_record() to avoid malloc'ing and free'ing the field nodes repeatedly. The fields now just point into $0 unless they are assigned to another variable or changed. force_number() on the field is *only* done when the field is needed.gawk.1Fixed troff formatting problem on .TP lines.io.cMoved some code out into iop.c.Output from pipes and system() calls is properly synchronized.Status from pipe close properly returned.Bug in getline with no redirect fixed.iop.cThis file contains a totally revamped get_a_record and associated code.main.cCommand line programs no longer use a temporary file.Therefore, tmpnam() no longer required.Deprecated -a and -e options -- they will go away in the next release, but for now they cause a warning.Moved -C, -V, -c options to -W ala posix.Added -W posix option: throw out \xAdded -W lint option.node.cforce_number() now allows pure numerics to have leading whitespace.Added make_string facility to optimize case of adding an already malloc'd string.Cleaned up and simplified do_deref().Fixed bug in handling of stref==255 in do_deref().re.ccontains the interface to regexp codeChanges from 2.11.1 to FSF version of same------------------------------------------Thu Jan 4 14:19:30 1990 Jim Kingdon (kingdon at albert) * Makefile (YACC): Add -y to bison part. * missing.c: Add #include <stdio.h>.Sun Dec 24 16:16:05 1989 David J. MacKenzie (djm at hobbes.ai.mit.edu) * * Makefile: Add (commented out) default defines for Sony News. * awk.h: Move declaration of vprintf so it will compile when -DVPRINTF_MISSING is defined.Mon Nov 13 18:54:08 1989 Robert J. Chassell (bob at apple-gunkies.ai.mit.edu) * gawk.texinfo: changed @-commands that are not part of the standard, currently released texinfmt.el to those that are. Otherwise, only people with the as-yet unreleased makeinfo.c can format this file.Changes from 2.11beta to 2.11.1 (production)--------------------------------------------Went from "beta" to production status!!!Now flushes stdout before closing pipes or redirected files tosynchonize output.MS-DOS changes added in.Signal handler return type parameterized in Makefile and awk.h andsome lint removed. debug.c cleaned up.Fixed FS splitting to never match null strings, per book.Correction to the manual's description of FS.Some compilers break on char *foo = "string" + 4 so fixed version.sh andmain.c.Changes from 2.10beta to 2.11beta---------------------------------This release fixes all reported bugs that we could reproduce. Probablysome of the changes are not documented here.The next release will probably not be a beta release!The most important change is the addition of the -nostalgia option. :-)The documentation has been improved and brought up-to-date.There has been a lot of general cleaning up of the code that is not otherwisedocumented here. There has been a movement toward using standard-conforminglibrary routines and providing them (in missing.d) for systems lacking them.Improved (hopefully) configuration through Makfile modifications and missing.c.In particular, straightened out confusion over vprintf #defines, declarationsetc.Deleted RCS log comments from source, to reduce source size by about one third.Most of them were horribly out-of-date, anyway.Renamed source files to reflect (for the most part) their contents.More and improved error messages. Cleanup and fixes to yyerror().String constants are not altered in input buffer, so error messages come out better. Fixed usage message. Make use of ANSI C strerror() function(provided).Plugged many more memory leaks. The memory consumption is now quitereasonable over a wide range of programs.Uses volatile declaration if STDC > 0 to avoid problems due to longjmp.New -a and -e options to use awk or egrep style regexps, respectively,since POSIX says awk should use egrep regexps. Default is -a.Added -v option for setting variables before the first file is encountered.Version information now uses -V and copyleft uses -C.Added a patchlevel.h file and its use for -V and -C.Append_right() optimized for major improvement to programs with a *lot*of statements.Operator precedence has been corrected to match draft Posix.Tightened up grammar for builtin functions so that only lengthmay be called without arguments or parentheses./regex/ is now a normal expression that can appear in any expressioncontext.Allow /= to begin a regexp. Allow ..[../..].. in a regexp.Allow empty compound statements ({}).Made return and next illegal outside a function and in BEGIN/END respectively.Division by zero is now illegal and causes a fatal error.Fixed exponentiation so that x ^ 0 and x ^= 0 both return 1.Fixed do_sqrt, do_log, and do_exp to do argument/return checking andprint an error message, per the manual.Fixed main to catch SIGSEGV to get source and data file line numbers.Fixed yyerror to print the ^ at the beginning of the bad token, not the end.Fix to substr() builtin: it was failing if the argumentsweren't already strings.Added new node value flag NUMERIC to indicate that a variable ispurely a number as opposed to type NUM which indicates thatthe node's numeric value is valid. This is set in make_number(),tmp_number and r_force_number() when appropriate and used incmp_nodes(). This fixed a bug in comparison of variables that hadnumeric prefixes. The new code uses strtod() and eliminates is_a_number().A simple strtod() is provided for systems lacking one. It does nooverflow checking, so could be improved.Simplification and efficiency improvement in force_string.Added performance tweak in r_force_number().Fixed a bug with nested loops and break/continue in functions.Fixed inconsistency in handling of empty fields when $0 has to be rebuilt.Happens to simplify rebuild_record().Cleaned up the code associated with opening a pipe for reading. Gawknow has its own popen routine (gawk_popen) that allocates an IOBUFand keeps track of the pid of the child process. gawk_pclosemarks the appropriate child as defunct in the right struct redirect.Cleaned up and fixed close_redir().Fixed an obscure bug to do with redirection. Intermingled ">" and ">>"redirects did not output in a predictable order.Improved handling of output bufferring: now all print[f]s redirected to a ttyor pipe are flushed immediately and non-redirected output to a tty is flushedbefore the next input record is read.Fixed a bug in get_a_record() where bcopy() could have copied overa random pointer.Fixed a bug when RS="" and records separated by multiple blank lines.Got rid of SLOWIO code which was out-of-date anyway.Fix in get_field() for case where $0 is changed and then $(n) arechanged and then $0 is used.Fixed infinite loop on failure to open file for reading from getline.Now handles redirect file open failures properly.Filenames such as /dev/stdin now allowed on the command line as well asin redirects.Fixed so that gawk '$1' where $1 is a zero tests false.Fixed parsing so that `RLENGTH -1' parses the same as `RLENGTH - 1',for example.The return from a user-defined function now defaults to the Null node.This fixes a core-dump-causing bug when the return value of a functionis used and that function returns no value.Now catches floating point exceptions to avoid core dumps.Bug fix for deleting elements of an array -- under some conditions, it wasdeleting more than one element at a time.Fix in AWKPATH code for running off the end of the string.Fixed handling of precision in *printf calls. %0.2d now works properly,as does %c. [s]printf now recognizes %i and %X.Fixed a bug in printing of very large (>240) strings.Cleaned up erroneous behaviour for RS == "".Added IGNORECASE support to index().Simplified and fixed newnode/freenode.Fixed reference to $(anything) in a BEGIN block.Eliminated use of USG rand48().Bug fix in force_string for machines with 16-bit ints.Replaced use of mktemp() with tmpnam() and provided a partial implementation ofthe latter for systems that don't have it.Added a portability check for includes in io.c.Minor portability fix in alloc.c plus addition of xmalloc().Portability fix: on UMAX4.2, st_blksize is zero for a pipe, thus breakingiop_alloc() -- fixed.Workaround for compiler bug on Sun386i in do_sprintf.More and improved prototypes in awk.h.Consolidated C escape parsing code into one place.strict flag is now turned on only when invoked with compatability option.It now applies to fewer things.Changed cast of f._ptr in vprintf.c from (unsigned char *) to (char *).Hopefully this is right for the systems that use this code (I don't).Support for pipes under MSDOS added.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -