Annotation of coherent/d/bin/awk/Changes, revision 1.1.1.1

1.1       root        1: Awk had the following problem.
                      2: 
                      3: Normally tokens are delimited by whitespace rules. That is any
                      4: number of spaces or tabs counts as a single delimiter. In normal
                      5: awk as long as FS = " \t" whitespace rules always apply. If FS
                      6: is anything else normal delimeter rules should apply. That is if
                      7: FS=":" the line a::c has 3 tokens, a, NULL, and c.
                      8: 
                      9: We were always applying whitespace rules. That is with FS=":"
                     10: a::c had two tokens a and c.
                     11: 
                     12: This is now fixed.
                     13: ---------------------------------------------------------------
                     14: 
                     15: Awk had the following problem
                     16: { print ($1 + 10) * 5 }
                     17: Gave a syntax error because print ( was detected first.
                     18: 
                     19: This is now fixed.
                     20: 
                     21: Steve made an improved make that uses $SRCPATH the Makefile now
                     22: takes advantage of this.
                     23: ---------------------------------------------------------------
                     24: 
                     25: Awk had the following problem
                     26: \ new line did not allow continuation lines.
                     27: { print \
                     28:        $1 }
                     29: Gave a syntax error.
                     30: This is now fixed.
                     31: ---------------------------------------------------------------
                     32: 
                     33: Awk had the following problem.
                     34: There was no provision for unary minus. It was treated as
                     35: a syntax error.
                     36: 
                     37: This is now fixed.
                     38: 
                     39: ---------------------------------------------------------------
                     40: 
                     41: Awk had the following bug. The input line
                     42:        b       c
                     43: Intrepeted b as field 1 and c as field 2.
                     44: 
                     45: This is now fixed. b is field 2 and c is field 3.
                     46: 
                     47: ---------------------------------------------------------------
                     48: If awk tried to store at say $3 on a line with only one field It
                     49: would end up storing at the famous unitialized pointer. Now it
                     50: will attempt to add the correct number of trailing delimeters
                     51: and then add the field at the end. If white space rules are in
                     52: effect and more than one trailing delimeter is needed there will
                     53: be a warning message and the field will be added at the end as
                     54: though whitespace rules were not in effect.
                     55: 
                     56: ---------------------------------------------------------------
                     57: Awk would not allow concatination as a pattern.
                     58: ($1 $2) == "abc" {     some stuff      }
                     59: Was a syntax error. This now works.
                     60: 
                     61: ---------------------------------------------------------------
                     62: If awk used a split() to break up a line multiple delimeters
                     63: were always counted as one and leading delimeters were skipped.
                     64: This is now fixed.
                     65: 
                     66: ---------------------------------------------------------------
                     67: If awk tried to store $3 on a line with an insufficient number
                     68: of fields and trailing delimeters it added new delimeters
                     69: without removing the old ones.
                     70: ---------------------------------------------------------------
                     71: Awk reported the wrong number of fields where there were trailing
                     72: delimeters. It failed to update the number of fields when new
                     73: fields were added at the end. This is fixed. (awk[35].c)
                     74: ---------------------------------------------------------------
                     75: Awk did not accept names with underscores. This is fixed (awk1.c)
                     76: ---------------------------------------------------------------
                     77: Thu Feb  4 13:50:09 1993 PST
                     78: Changes by steve to support "for (; cond; incr)" with absent initializer:
                     79: awk.h  Deleted bogus sprintf declaration.
                     80: awk.y  Added new FOR_ production with absent initializer.
                     81: awk3.c Changed AFOR code to evaluate initializer only if present.
                     82: ---------------------------------------------------------------

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.