Commit Graph

19 Commits

Author SHA1 Message Date
jdolecek fbac8027bb fix off-by-one use of gensub() index parameter, and treat negative
number to mean 'replace first match'; the index use is now fully
aligned with GNU awk

fixes PR bin/25543 by Richard Rauch
2004-06-05 12:01:28 +00:00
jdolecek eff7cd8291 bump the regular expression cache from 20 expressions to 128 2003-10-26 13:39:38 +00:00
jdolecek 9ce369b7f5 exit with fatal error if backreferences are used in subst string
of gensub(); these are not supported (yet) and better to fail with
error than to end up with silent incorrect substitution
2003-10-26 13:27:26 +00:00
jdolecek a45cfadaff cleanup some (uschar **) to (char **) casts which break
strict aliasing rules, so that this builds with gcc 3.3; this was done
by changing variables & function arguments to uschar where appropriate
2003-10-26 11:34:23 +00:00
itojun e1e0321817 use bounded string op 2003-08-13 02:51:20 +00:00
jdolecek 19de07894e Merge nawk version 20030729 changes, and resolve conflicts. 2003-08-02 22:41:59 +00:00
jdolecek 4ea2a427d1 Import nawk as of 2003/07/29
Changes:
* internationalization improvements
* [:digit:] addition
* some bugfixes
2003-08-02 22:21:23 +00:00
itojun 93851338f2 sscanf overrun 2003-05-17 01:12:28 +00:00
jdolecek e46100bcfd correctly handle 'printf "%c", 0' - previously, it accessed random
memory and segv'd under some circumstances (e.g. when running
sys/arch/walnut/compile/mkimg.sh rev. 1.2 script)
2002-06-27 08:52:27 +00:00
jdolecek a88d50e63a call setlocale(3) on startup 2001-02-09 00:56:51 +00:00
jdolecek 7193677c62 cast the parameter to toupper()/tolower() to unsigned char, so that
this works with *p > 127
2001-02-09 00:56:18 +00:00
jdolecek 7f0ff9b2ee add GNU awk compatible functions systime(), strftime() and gensub()
XXX gensub() doesn't handle backreferences (\0 .... \9) yet
2001-02-08 20:42:39 +00:00
jdolecek 5d05ca039b ytab.[ch] --> awkgram.[ch] 2001-02-05 19:07:57 +00:00
jdolecek 8bd0c1d510 use awkgram.h, generate constified printname[] and tokname() 2001-02-05 19:07:15 +00:00
jdolecek 1286145cd7 change to build/use awkgram.[ch] instead of ytab.[ch] 2001-02-05 19:06:02 +00:00
jdolecek 9f2789de82 regen with correct token numbers (since only in comment, this is cosmetic only) 2001-02-05 18:43:34 +00:00
jdolecek 9a78fc84e2 Import nawk 2000/11/15.
These files are not used for build, but are usable when one want to regenerate
proctab.c
2001-02-05 13:31:17 +00:00
jdolecek e82124d4fa adapt to NetBSD build environment, constify a little 2001-01-23 22:26:02 +00:00
jdolecek adb545a48e Import nawk 2000/11/15, try #2.
This is the original New AWK from AT&T Labs as described in "The
AWK Programming Language", by Al Aho, Brian Kernighan, and Peter
Weinberger.

This would eventually replace gawk in our tree in future.
2001-01-23 22:14:07 +00:00