Commit Graph

25 Commits

Author SHA1 Message Date
apb 1dc9ff828c In preparation for building awk as a host tool, add
#if HAVE_NBTOOL_CONFIG_H #include "nbtool_config.h"
2008-10-19 19:33:47 +00:00
christos e8c53cdebd sprintf -> snprintf 2008-07-12 19:57:59 +00:00
christos 19150c1762 explicitly disallow %L,%l,%h as TOG specifies. 2008-07-12 19:49:30 +00:00
christos e04577112e and remove debugging. 2008-07-11 23:06:48 +00:00
christos 86201bf107 better fix than before. Instead of copying the constant cells, set DONTFREE
on all non-strings.
2008-07-11 23:05:49 +00:00
christos 2a2697b888 PR/39132: cheusov at tut dot by: When copying an OCELL, make sure you make
a copy of its string and deal with DONTFREE properly, so that we don't try
to free the OCELL pointer later which points to a literal string in the text
segment.
2008-07-11 22:11:24 +00:00
christos 4459d9696e update to 20070501 2008-05-25 14:51:49 +00:00
christos 0f85ac800d Fix segmentation fault with printf("%*"); from Jukka Salmi 2008-01-21 17:18:06 +00:00
he 555e1d5a74 Remove a superfluous test, wcrtomb() cannot return (size_t)-2.
Pointed out by Aleksey Cheusov.
2007-10-25 22:22:41 +00:00
christos ba0aca47b0 PR/37205: Aleksey Cheusov: nawk: a number of open files is limited to very
small constant. Make the array of files dynamically allocated.
2007-10-25 15:12:03 +00:00
he 50d663aa6a Add support for multibyte charsets in the "tolower" and "toupper" awk
functions.  Code contributed by Aleksey Cheusov in PR#36394, and slightly
tweaked for closer-to-KNF conventions by me.  Also slightly improved checks
of error returns.
2007-10-25 14:44:49 +00:00
christos 407a09df84 strdup/strlcat/snprintf changes from Aleksey Cheusov 2006-07-26 20:46:37 +00:00
christos 57e31ffb5c Coverity CID 1867: Fix memory leak. 2006-03-18 22:39:40 +00:00
jdolecek e2ba6dc38f back-off 'use bounded string op' commit of 2003/08/13 - no real problem
has been fixed by it, but it introduced at least one bug

don't do any more of such gratuitous changes here, please
2005-07-03 15:18:11 +00:00
jdolecek e6b9888ace resolve conflicts 2005-07-02 20:10:34 +00:00
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 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 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 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 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