1
Tue Jul 26 21:46:16 2005 Arnold D. Robbins <arnold@skeeve.com>
3
* Release 3.1.5: Release tar file made.
5
Tue Jul 26 21:44:54 2005 Arnold D. Robbins <arnold@skeeve.com>
7
Copyright dates on all relevant files updated to 2005.
9
Wed Jul 6 17:09:02 2005 Arnold D. Robbins <arnold@skeeve.com>
13
* io.c (do_index): Remove unused variables `mbclen', `mbs1' and `mbs2'.
14
* node.c (wstrstr): Remove unsed variable `j'.
15
(dump_wstr): `#ifdef' out, not currently needed.
16
* eval.c (op_assign): Move decl of `t1' and `t2' into a separate block for
17
the `! HAVE_FMOD' case. Keeps the compiler quiet. Similar for `ltemp'.
19
Wed Jul 6 16:51:31 2005 Arnold D. Robbins <arnold@skeeve.com>
21
* io.c (close_io): Now takes pointer to boolean parameter indicating
22
if there was a problem closing standard output or standard error.
23
Update it in the right places.
24
* awk.h (close_io): Update the declaration.
25
* main.c (main): New variable `stdio_problem'. Pass it to `close_io'.
26
Check the result and exit non-zero if there was a problem.
27
(usage, version): Print warning message if problems with stdout.
31
* main.c (main): For call to `setlocale' for LC_MESSAGES, just use
32
`#ifdef LC_MESSAGES'. Per Bruno Haible <bruno@clisp.org>.
34
Wed Jul 6 16:44:58 2005 Jim Meyering <jim@meyering.net>
36
* main.c (init_fds): If any of the STDIN_FILENO, STDOUT_FILENO,
37
STDERR_FILENO are initially closed, reopen them with permissions
38
contrary to common usage so that any reasonable attempt to use
39
them will evoke the same sort of error as reading or writing to
40
a closed file descriptor would.
42
Mon Jul 4 09:38:29 2005 Arnold D. Robbins <arnold@skeeve.com>
44
More multibyte fixes from Kimura Koichi, <kimura.koichi@canon.co.jp>.
46
* node.c (format_val, r_dupnode): Spell `wstptr' correctly.
47
* regex_internal.c (build_wcs_upper_buffer): Label `offsets_needed' should not
48
be inside `#ifdef _LIBC'.
49
* regcomp.c (build_charclass): Fix declaration of `class_name' in prototype to
52
Thu Jun 30 11:52:34 2005 Arnold D. Robbins <arnold@skeeve.com>
54
* profile.c (tree_eval): Node_not: Remember to print the exclamation
55
point! Thanks to Dan Nielsen <Dan.Nielsen@corporate.ge.com>
57
* mbsupport.h: Fix spelling of HAVE_ISWUPPER. Thanks to
58
Kimura Koichi, <kimura.koichi@canon.co.jp>.
60
Sun Jun 26 16:37:59 2005 Arnold D. Robbins <arnold@skeeve.com>
64
* builtin.c (do_length): Allow array argument to length().
65
Returns number of elements in array.
67
* awkgram.y (yylex): Ignore carriage returns in source code. Sigh.
69
Wed Jun 15 22:12:15 2005 Arnold D. Robbins <arnold@skeeve.com>
71
* node.c (isnondecimal): Check loc.decimal_point before using it.
72
Avoids problems with command line assignment when locale info may
73
not be set up all the way yet.
75
Wed Jun 15 21:59:54 2005 Arnold D. Robbins <arnold@skeeve.com>
77
* node.c (make_str_node): If working with multibyte characters, while
78
parsing string constants, keep multibyte characters together. This avoids
79
problems in cases where one of the bytes is backslash. Initial patch
80
supplied by Kimura Koichi, <kimura.koichi@canon.co.jp>.
82
Tue Jun 14 21:50:37 2005 Andrew J. Schorr <ajschorr@users.sourceforge.net>
84
Use Exponentiation By Squaring for integer powers for ^ and ^=.
86
* eval.c (calc_exp, cal_exp_posint): New functions.
87
(r_tree_eval): Use them.
89
Fri Jun 3 12:15:54 2005 Arnold D. Robbins <arnold@skeeve.com>
91
* configure.ac: Further change the hack at the end so that
92
it works on Mac OS X `sed'. Sigh.
94
Thu Jun 2 22:44:01 2005 Arnold D. Robbins <arnold@skeeve.com>
96
* configure.ac (TYPE_SOCKLEN_T): Use `int' as default type if can't
98
* awkgram.y: Warn that `//' is not a C++ comment. (:-)
100
Thu Jun 2 20:55:27 2005 Arnold D. Robbins <arnold@skeeve.com>
102
From: Benno Schulenberg <benno@nietvergeten.nl>
104
* eval.c (func_call): Take message out of gettext call since it's for debugging.
105
* ext.c (get_actual_argument): Fix formatting of message.
107
Wed May 25 09:19:37 2005 Arnold D. Robbins <arnold@skeeve.com>
109
* configure.ac: Change hack at end that fixes Makefile to keep
110
version.c to use `sed' and not `ed'. More portable to OS/2, probably
113
Mon May 23 09:01:26 2005 Arnold D. Robbins <arnold@skeeve.com>
115
Portability help from Jim Meyering.
117
* io.c: Rework ifdefs for <inttypes.h> and <stdint.h>. Test them
119
* configure.ac: Add AC_C_RESTRICT and code for socklen_t from rsync.
120
Check for isascii and btowc for regex.
122
Sat May 14 22:49:54 2005 Arnold D. Robbins <arnold@skeeve.com>
124
* wait_any (errno): Remove decl.
125
* gawk_popen: The pipe-simulated but not VMS or DOS version. Remove
126
decl/use of `strdup' in favor of `emalloc' and `strcpy'.
128
Wed May 11 18:33:30 2005 Arnold D. Robbins <arnold@skeeve.com>
130
All files: Updated address of FSF to:
132
51 Franklin Street, Fifth Floor
133
Cambridge, MA 02110-1301
135
Wed May 11 18:19:03 2005 Jim Meyering <jim@meyering.net>
137
* configure.ac: Use AM_GNU_GETTEXT([external]).
138
Reflect upgrade to gettext-0.14.4.
139
Reflect renaming of `jm_'-prefixed macros.
140
(AC_CONFIG_FILES): Remove intl/Makefile.
142
* Makefile.am (SUBDIRS): Remove intl.
143
(AM_CPPFLAGS): Remove -Iintl.
145
Wed May 11 11:42:06 2005 Arnold D. Robbins <arnold@skeeve.com>
147
Straighten out mess with `isblank' which is C99 <ctype.h> function.
149
* configure.ac: Remove check for `isblank' in call to AC_CHECK_FUNCS.
150
* regex_internal.h: #ifdef out definition of `isblank' and provide `is_blank'
153
* regcomp.c: #ifdef use of `isblank' and add `is_blank' use instead.
155
Mon May 9 08:29:37 2005 Arnold D. Robbins <arnold@skeeve.com>
157
* configure.ac: Add type check for `socklen_t', fixes compile
158
warning on AMD/64 Linux.
159
* io.c (socketopen): Change type of socket lenght variables
160
to `socklen_t' from `size_t'.
162
Thu May 5 22:00:03 2005 John E. Haque <j.eh@mchsi.com>
164
* io.c (iop_alloc): Let a input processor hook installed via
165
`register_open_hooks' open its own fd in case gawk does not know
167
(iop_open): Call `os_close_on_exec' after `iop_alloc'.
168
ADR: If `iop_alloc' returns NULL but the fd is valid, close
169
the fd to avoid an fd leak.
171
Mon May 2 08:05:59 2005 Arnold D. Robbins <arnold@skeeve.com>
173
* eval.c (update_ERRNO): Don't use `return' in a `void' function.
174
* awk.h (AWKNUM): Back out use of `long double' based on LDBL_MANT_DIG.
175
* builtin.c (tmp_integer): Back out extra ifdefs.
177
Fri Apr 29 13:01:05 2005 Arnold D. Robbins <arnold@skeeve.com>
179
* configure.ac: Look for `isblank' function.
180
* field.c: Add define for `isblank' if we don't have it.
182
Fri Apr 29 12:01:33 2005 Julian Foad <julianfoad@btopenworld.com>
184
From grep. Doesn't seem to affect awk.
186
* dfa.c (lex): Fix bug #9519: "echo do^re | grep do^re" was
187
failing to find a match. [Towards end, set `lasttok' before
190
Fri Apr 29 00:28:46 2005 Arnold D. Robbins <arnold@skeeve.com>
192
* configure.ac: Jump through an amazingly convoluted hoop to get
193
config.status to keep version.c upon `make distclean'. Seems to
196
Thu Apr 28 23:40:02 2005 Stepan Kasal <kasal@ucw.cz>
198
* configure.ac (PRINTF_HAS_F_FORMAT): Some cosmetic changes.
199
(custom.h): Don't cat custom.h at the end of config.h; instead, use
200
AH_BOTTOM([#include "custom.h"])
201
* awklib/Makefile.am (AM_CPPFLAGS): Add $(top_srcdir) so that
202
custom.h can be found.
204
Thu Apr 28 23:21:22 2005 Jim Meyering <jim@meyering.net>
206
* field.c (set_FIELDWIDTHS): Tighten up the code to accept FIELDWIDTHS
207
values in [1..INT_MAX], e.g., detect overflow and invalid strings,
208
and reject strings starting with `-'.
210
Thu Apr 28 23:05:33 2005 Stepan Kasal <kasal@ucw.cz>
212
* dfa.c (parse_bracket_exp_mb): Shorten one part of the code, to get
213
closer to grep's copy.
215
Thu Apr 28 23:00:58 2005 Pat Rankin <rankin@pactechdata.com>
217
* builtin.c (format_tree) [#if VAXCRTL]: For floating point
218
formatting, reject zero_flag if using old VAXCRTL run-time
219
library to avoid getting erroneous results which appear as if
220
numerically incorrect (due to an embedded space in some cases,
221
extra trailing zeroes in others) rather than just misformatted.
222
`hsprint' test still fails, but not as badly.
224
Thu Apr 28 19:12:03 2005 Arnold D. Robbins <arnold@skeeve.com>
226
* re.c (reflags2str): Add three new RE_ flags from current regex.h
227
to bring the table up to date.
229
* builtin.c (format_tree): Save 2 spare bytes instead of one. Suggested
232
Thu Apr 28 18:16:09 2005 Andrew J. Schorr <ajschorr@users.sourceforge.net>
234
* awk.h (IOBUF): Add new fields `opaque', `get_record', and `close_func',
235
to support insertion of an alternate input processor. This is used
236
by the XML extension.
237
(register_deferred_variable, register_open_hook, update_ERRNO_saved):
238
Declare new functions.
239
(load_environ, load_procinfo): Remove declarations -- these functions
240
are no longer global, since we use register_deferred_variable instead.
241
* awkgram.y (register_deferred_variable): New function to allow
242
calling code to register special variable names that trigger a callback
243
upon the first reference. This is now used to implement ENVIRON
245
(variable): Search the list of deferred variables instead of hardcoded
246
tests for ENVIRON and PROCINFO.
247
* eval.c (set_BINMODE): Fix spelling of "arbitrary" in warning message.
248
(update_ERRNO_saved): New function that allows the caller to specify
249
the errno value instead of using the current value.
250
(update_ERRNO): Implement by calling update_ERRNO_saved(errno).
251
* io.c (iop_close): Call `iop->close_func' if non-NULL.
252
(close_redir): Should save `errno' value, otherwise `lintwarn' messages
253
might update it. Then use `update_ERRNO_saved' to set ERRNO.
254
(do_getline): Call `update_ERRNO_saved' to set ERRNO based on the
255
error code returned by the redirect function (instead of the current
256
value of errno). Similarly, use `update_ERRNO_saved' to set ERRNO
257
based on the value returned by `get_a_record'. But add a special
258
check to avoid updating ERRNO if `get_a_record' returns an error
259
code value of -1 (this is used by the XML extension which already
260
sets ERRNO before returning).
261
(register_open_hook): New function to register a function to be
262
called whenever a new data file is opened. This can be used to
263
install a special input processor (as in the XML extension).
264
(iop_alloc): Call registered open hook.
265
(get_a_record): If a `get_record' method has been set, call that instead.
266
* main.c (init_vars): Use `register_deferred_variable' to implement
267
ENVIRON and PROCINFO.
268
(load_environ, load_procinfo): Now static instead of global.
269
* doc/gawk.texi: Document new internal functions `update_ERRNO_saved',
270
`register_deferred_variable', and `register_open_hook'.
272
Thu Apr 28 10:50:10 2005 Arnold D. Robbins <arnold@skeeve.com>
274
* array.c (assoc_find, do_delete): Change incorrect uses of STREQN
276
* builtin.c (do_index): Same.
277
* field.c (set_FS): Same.
278
* io.c (redirect, getredirect, do_close, set_RS): Same.
279
* re.c (reisstring): Same.
281
Wed Apr 27 21:35:57 2005 Arnold D. Robbins <arnold@skeeve.com>
283
Allow for long double. Initial changes from Jean-Marc Saffroy
284
<jean-marc.saffroy@ext.bull.net>.
286
* awk.h (AWKNUM): If have long doubles (LDBL_MANT_DIG), define AWKNUM
287
as long double, otherwise just use double.
288
* builtin.c (format_tree): Change type of tmpval to double.
289
(do_strtonum): Same for `d' and types used in casts.
290
(tmp_integer): Don't do bit shifting if have long doubles.
292
Unrelated, from Andrew J. Schorr:
294
* io.c (close_one): Check for RED_FILE|RED_WRITE, not just RED_FILE.
296
Mon Apr 25 12:23:18 2005 Andrew J. Schorr <aschorr@telemetry-investments.com>
298
* eval.c (r_tree_eval): In Node_assign_concat case, when copying string
299
constants, include the terminating zero byte.
301
Fri Apr 1 06:26:31 2005 Arnold D. Robbins <arnold@skeeve.com>
303
Update to Automake 1.9.5.
305
* INSTALL, aclocal.m4, depcomp, install-sh, missing,
306
mkinstalldirs, ylwrap: Updated.
310
* builtin.c (do_tolower, do_toupper): Remove old code
311
based on 8-bit character table.
313
Wed Feb 23 08:23:22 2005 Arnold D. Robbins <arnold@skeeve.com>
315
* bisonfix.awk: New file, fixes continued #ifdef for dumb compilers.
316
* Makefile.am (awkgram.c): Fix rule to use it.
317
(EXTRA_DIST): Include bisonfix.awk.
319
Tue Feb 22 21:18:50 2005 Arnold D. Robbins <arnold@skeeve.com>
321
* random.h: Remove include of config.h and move it to ...
322
* random.c: Here. Move include of random.h back to where it was.
324
* regcomp.c, regex.c, regexec.c: NUKED all use of alloca not inside
325
`_LIBC' ifdef. Hooray!
327
Sat Feb 19 20:13:28 2005 Pat Rankin <rankin@pactechdata.com>
329
Workarounds for bugs and missing C89 features in old VAX C compiler.
331
* regex_internal.h "mbsupport.h": Suppress inclusion if NO_MBSUPPORT
333
[MB_CUR_MAX]: Define as 1 if mbsupport.h hasn't defined it.
334
[ER_ERRMSG, ERRMSG_TYPE, ERRMSG_OFFSET, ERRMSG_SEPARATOR]: New macros
335
conditionalized upon gawk's NO_TOKEN_PASTING macro.
336
* regcomp.c: Use them.
337
(parse_dup_op): Use alternate initialization of start_token if
338
RE_TOKEN_INIT_BUG is defined.
339
* regexec.c (proceed_next_node): Compare push_fail_stack() result
340
explicitly against REG_NOERROR rather than implicitly against 0.
342
Sat Feb 19 20:05:50 2005 Pat Rankin <rankin@pactechdata.com>
344
* dfa.c "mbsupport.h": Suppress inclusion if NO_MBSUPPORT is defined.
346
Wed Feb 16 20:43:07 2005 Pat Rankin <rankin@pactechdata.com>
348
* awk.h "mbsupport.h": Suppress inclusion if NO_MBSUPPORT is defined.
349
* regex.h <sys/types.h>: Guard inclusion with HAVE_SYS_TYPES_H.
350
* regex.c <sys/types.h>: Likewise.
351
* random.c "random.h": include this first to get config.h setup.
352
<fcntl.h>: Guard inclusion with HAVE_FCNTL_H.
353
<unistd.h>: Guard inclusion with HAVE_UNISTD_H.
354
* io.c [#if defined(MSDOS) ||... defined(__CYGWIN__)]: Splice the
355
backslash continuation back into one long line.
357
Wed Feb 16 10:11:21 2005 Arnold D. Robbins <arnold@skeeve.com>
359
* node.c (unref, format_val): Add assertions checking that both
360
`tmp->wstptr != NULL' and `(tmp->flags & WSTRCUR) != 0' before
361
freeing `tmp->wstptr'. Thanks to kimura.koichi@canon.co.jp.
363
* random.c (HAVE_UNISTD_H): Conditionalize include of <unistd.h>.
364
Thanks to Scott Deifik <scottd@amgen.com>.
366
Sun Feb 13 18:24:50 2005 Arnold D. Robbins <arnold@skeeve.com>
368
* io.c (socketopen): Move `#ifdef MSG_PEEK' up to above
369
declarations too. Thanks to Michal Jaegermann.
371
* config.guess, config.sub: Updated from Savannah.
373
Thu Feb 10 15:48:48 2005 Arnold D. Robbins <arnold@skeeve.com>
375
* regex_internal.c (re_dfa_add_node): Remove variable `type'
376
and just use `token.type' directly in RE_ENABLE_I18N code below.
377
Saves a compiler warning, and a good compiler will handle it anyway.
378
* regexec.c (check_arrival_add_next_nodes): Move decl of `err'
379
inside #ifdef RE_ENABLE_I18N code where it's used.
380
* awkgram.y (yylex): Add casts to int before use of `strlen' results
381
for printf-style precision. Avoid a compiler warning.
382
* io.c (redirect, do_close): Same for use of tmp->stlen.
384
Thanks to Michal Jaegermann <michal@harddata.com>.
386
Wed Feb 9 10:19:15 2005 Stepan Kasal <kasal@ucw.cz>
388
* Makefile.am (datadir, libexecdir): Removed.
389
(awkdatadir): Renamed to pkgdatadir.
390
(pkgdatadir, LDADD): Use the make syntax to refer to other variables,
393
Wed Feb 9 10:05:46 2005 Arnold D. Robbins <arnold@skeeve.com>
395
* node.c (r_dupnode): Assign NULL to r->wstr after `getnode'.
396
Fix count of bytes to copy in call to `memcpy'.
397
Thanks to Kimura Koichi, <kimura.koichi@canon.co.jp>.
399
Tue Feb 8 19:26:22 2005 Pat Rankin <rankin@pactechdata.com>
401
* regcomp.c (init_dfa): Avoid strcasecmp() since regex.c doesn't
402
use awk.h and none of the assorted other included header files
403
are guaranteed to declare it.
404
(parse_expression): Modify casts for the string arguments passed to
405
build_charclass_op() to fix char * vs unsigned char * mismatch.
406
(parse_bracket_exp): Likewise add cast for the string argument
407
passed to build_charclass().
409
Mon Feb 7 15:04:09 2005 Arnold D. Robbins <arnold@skeeve.com>
411
* eval.c (make_scalar): Don't use P() macro in definition.
412
Thanks to Juergen Kahrs <Juergen.Kahrs@barco.com>.
414
Wed Feb 2 16:36:19 2005 Arnold D. Robbins <arnold@skeeve.com>
416
* main.c (main): Call `close_io', without its result affecting
417
the exit status. Super small, super dark corner.
419
See test/exitval2.awk.
421
Tue Feb 1 11:58:29 2005 Arnold D. Robbins <arnold@skeeve.com>
423
* regex.h (__APPLE_CC__): Removed test and definition of __restrict.
424
Not needed for current MacOS X compiler.
426
Sun Jan 30 13:56:37 2005 Arnold D. Robbins <arnold@skeeve.com>
428
Fresh merge with CVS regex routines. Fixes handling of \B.
429
See tests/gnureop3.awk and also
430
http://sources.redhat.com/bugzilla/show_bug.cgi?id=693.
434
* regcomp.c: Version 1.92, Thu Jan 27 19:05:20 2005.
435
* regexec.c: Version 1.77, Thu Jan 27 19:06:34 2005.
436
* regex_internal.c: Version 1.49, Thu Jan 27 19:07:15 2005.
437
* regex_internal.h: Version 1.60, Wed Jan 26 22:40:50 2005.
438
* regexec.c: Version 1.77, Thu Jan 27 19:06:34 2005.
440
Sat Jan 22 22:30:40 2005 Arnold D. Robbins <arnold@skeeve.com>
442
Reinstate patch of 18 Nov 2001, for VMS, at least:
444
* random.c (srandomdev): ifdef-out. Lots of compile time
445
problems on multiple platforms, and gawk doesn't even
446
use the routine. The heck with fine-grained solutions.
448
Thu Jan 20 14:15:32 2005 Arnold D. Robbins <arnold@skeeve.com>
450
* awkgram.y (LEX_FOR): Free NAME tokens in transformation of
451
`for (iggy in foo) delete foo[iggy]' into `delete foo'.
452
Thanks and a tip of the hatlo to Valgrind.
454
* dfa.c (_): Clean up stuff here by just including "gettext.h".
457
Wed Jan 19 18:29:23 2005 Arnold D. Robbins <arnold@skeeve.com>
459
* awkgram.y (yylex): Improve parsing of numeric constants
460
and hex values, via a push from Paul Eggert. See test/hex.awk.
462
* regex_internal.c (re_node_set_alloc): If `size' is 0, just
463
zero out the structure. From valgrind.
465
Tue Jan 18 17:23:25 2005 Arnold D. Robbins <arnold@skeeve.com>
467
Make gawk multibyte aware. This means that index(), length(),
468
substr() and match() all work in terms of characters, not bytes.
470
* awk.h (NODE): Add `wsp' and `wslen' elements to value for wide
472
(WSTRCUR, wstptr, wstlen, force_wstring): New macros.
473
(str2wstr, wstrstr, wcasestrstr): New declarations.
474
* builtin.c (do_index, do_length, do_substr, do_match): Handle wide
476
* eval.c (flags2str): Add WSTRCUR.
477
* node.c (format_val, r_dupnode, mk_number, make_str_node, unref):
478
Add code to deal with wide strings.
479
(str2wstr, dump_wstr, wstrstr, wcasestrstr): New functions.
481
Sun Jan 16 15:10:35 2005 Arnold D. Robbins <arnold@skeeve.com>
483
* random.h (int32_t): Define this type.
485
Thu Jan 13 14:38:13 2005 Arnold D. Robbins <arnold@skeeve.com>
487
Cause `configure --disable-nls' to still allow locale-correct
488
formating of numeric values.
490
* builtin.c (format_tree): Change #ifdefs to only test HAVE_LOCALE_H.
491
Improve code for ' flag so that extraneous separator is not included if
492
number of digits is multiple of locale separater count (3, 6, 9, etc.)
493
* dfa.c (dfaparse): Change ifdef to only test #ifdef LC_COLLATE.
494
* eval.c (fmt_ok): Remove ENABLE_NLS from #ifdef test.
495
* gettext.h: Include <locale.h> on both sides of test. Should really
497
* main.c (loc): Remove ENABLE_NLS from #ifdef test.
498
(main): Same in call to localeconv().
499
* node.c (isnondecimal): Remove ENABLE_NLS from #ifdef test.
503
* regcomp.c (init_dfa): Change `codeset' to `codeset_name' in two
506
Mon Jan 10 11:49:56 2005 Arnold D. Robbins <arnold@skeeve.com>
508
Annual sync with glibc.
510
* getopt_int.h: New file.
511
* Makefile.am (base_sources): Add it.
512
* getopt.h, getopt.c, getopt1.c: Updated.
513
* regcomp.c, regex.c, regex.h, regex_internal.c, regex_internal.h,
518
getopt_int.h, 1.1, Tue Mar 9 10:31:19 2004
519
getopt1.c, 1.10, Tue Mar 9 10:35:37 2004
520
getopt.h, 1.21, Fri Mar 19 00:19:32 2004
521
getopt.c, 1.53, Wed Mar 10 23:13:26 2004
522
regcomp.c, 1.87, Mon Dec 6 02:56:42 2004
523
regex.c, 1.126, Fri Jan 30 05:19:58 2004
524
regex.h, 1.33, Thu Nov 18 23:50:57 2004
525
regex_internal.c, 1.46, Thu Jan 6 20:59:49 2005
526
regex_internal.h, 1.57, Mon Dec 27 16:29:05 2004
527
regexec.c, 1.75, Mon Dec 27 16:29:52 2004
529
* regex.h: Add check for __APPLE_CC__ and definition of __restrict.
530
* regex.c: Add check for _MSC_VER and include <stdio.h>.
531
* regex_internal.h (_RE_ENABLE_I18N): Change test.
532
(re_realloc): Add check/fix for SunOS 4.1.x.
533
* regex_internal.c (build_wcs_upper_buffer): ifdef label
534
`offsets_needed', add cast in call to `wcrtomb'.
535
* regcomp.c (build_charclass, build_charclass_op): Remove `unsigned'
536
from declarations of `char *' params.
537
(regerror): Remove use of mempcpy.
538
(peek_token): Disallow \s and \S for gawk.
539
(build_charclass): Change decl of `class_name' and use it directly.
540
Nuke variable `name'.
541
(build_charclass_op): Change decl of `class_name' and `extra'.
543
Thu Jan 6 16:44:32 2005 Arnold D. Robbins <arnold@skeeve.com>
545
Improve autoconfiscation stuff for wide character use.
547
* builtin.c (do_tolower, do_toupper): Conditionally compile
548
call to `wide_tolower_toupper'.
549
(wide_tolower_toupper): Conditionally compile typedefs and function.
550
* mbsupport.h: Add check for having `wint_t', and `iswlower',
551
`iswupper', `towlower' and `towupper'.
552
* configure.ac (HAVE_WINT_T): Add test.
553
(AC_CHECK_FUNCS): Add `wint_t', `iswlower', `iswupper', `towlower'
558
* hard-locale.h (hard_locale): Add decl of `xmalloc' to prevent
559
redeclaration problems on some compilers.
561
Wed Jan 5 10:20:17 2005 Arnold D. Robbins <arnold@skeeve.com>
565
* bisonfix.sed: Removed, no longer needed.
566
* Makefile.am (EXTRA_DIST): Removed bisonfix.sed.
567
(awkgram.c): Fix build rule.
568
* awkgram.c: Regenerated.
570
Tue Jan 4 18:47:56 2005 Arnold D. Robbins <arnold@skeeve.com>
572
Update to Automake 1.9.4.
574
* alocal.m4, config.guess, config.sub, install-sh: Updated.
576
Mon Jan 3 14:08:27 2005 Arnold D. Robbins <arnold@skeeve.com>
578
Update to Automake 1.9.3.
580
* INSTALL, alocal.m4, config.guess, config.sub, depcomp,
581
install-sh, missing, ylwrap: Updated.
583
Mon Jan 3 11:23:36 2005 Arnold D. Robbins <arnold@skeeve.com>
585
Fix obscure issue. ^ in RS should only match at the very
586
beginning of the input. Essentially, the file is one long
587
string. To do this, use the `not_bol' flag in the `struct
588
pattern_buffer'. Thanks to Stepan Kasal for pointing out the
589
problem and to Andreas Schwab for pointing out the mechanism
592
* awk.h (RE_NEED_START, RE_NO_BOL): New flags for `research'.
593
(IOP_AT_START): New flag for IOBUF.
594
(research): Last parameter is now `flags'.
595
* builtin.c (do_match, sub_common): Change calls to `research'.
596
* eval.c (interpret, match_op): Same.
597
* field.c (re_parse_field): Same.
598
* io.c (spec_setup): Add IOP_AT_START flag.
600
(rsrescan): Modify logic to check IOP_AT_START and if not on to
601
add RE_NO_BOL to flags value in call to `research'.
602
(get_a_record): Clear IOP_AT_START upon return from `*matchrec'.
603
(iopflags2str): Add IOP_AT_START to table. Also IOP_CLOSED,
604
which was missing. (Ooops.)
605
* re.c (research): Last paramater is now flags. Modify logic to
606
handle RE_NO_BOL case by setting the right bit initially. Clean
607
up control flow so that it's cleared before returning. If RE_NO_BOL,
608
don't bother with the dfa matcher, as it doesn't have an analogous
611
Wed Dec 22 12:33:48 2004 Arnold D. Robbins <arnold@skeeve.com>
613
For --exec, don't allow x=y assignments where filenames would be.
614
Do allow -v. This is because we assume --exec is used mainly for
615
CGI stuff and we don't want var assigns to affect the code.
617
Suggested by Stepan Kasal; motivated by reading about web security.
619
* main.c (disallow_var_assigns): New variable.
620
(main): Set the var for --exec.
621
(arg_assign): Check it appropriately.
623
Sun Dec 19 17:27:09 2004 Arnold D. Robbins <arnold@skeeve.com>
625
* builtin.c (do_gensub): Make `global' flag smarter, such that
626
a string numeric constant (e.g., "3") acts like a numeric
628
* node.c (r_force_number): Not really related: Only set NUMCUR
629
if we actually convert some digits.
631
Sun Dec 19 16:08:50 2004 Arnold D. Robbins <arnold@skeeve.com>
633
* dfa.h, dfa.c: Synchronize with what's happening in GNU grep
634
development. Effectively only minor whitespace changes and some
635
slight code motion of ifdefs and includes.
636
* hard-locale.h: New file, extracted from old dfa.c.
637
* Makefile.am (base_sources): Add hard-locale.h.
639
Sun Dec 19 11:13:45 2004 Arnold D. Robbins <arnold@skeeve.com>
641
* io.c (socketopen): Change type of `readle' and `namelen'
642
variables to size_t. For QNX, but a good idea anyway. Thanks
643
to `Anthony' (rz1a@mail.ru).
645
Mon Dec 6 11:11:22 2004 Arnold D. Robbins <arnold@skeeve.com>
647
Undid change of Mar 9 2004, to add gofast patch. It gets things
648
wrong for gawk. This removes the bandaid of ifdef-ing out the
649
main check. Eventually this'll all get straightened out in the
652
* dfa.c (buf_offset): Removed.
653
(SKIP_REMAINS_MB_IF_INITIAL_STATE): Removed use of buf_offset, do
654
free `mblen_buf', `inputwcs'.
655
(match_anychar, match_mb_charset, transit_state_consume_1char,
656
transit_state): Remove use of buf_offset in mblen_buf.
657
(dfaexec): Use `free' and `malloc', not `realloc'.
659
Mon Dec 6 10:55:37 2004 Fumitoshi UKAI <ukai@debian.or.jp>
661
Forwarded from james@nocrew.org, the Debian contact.
663
* dfa.c (parse_bracket_exp_mb):
664
1. Build range correctly when IGNORECASE for [a-a] to also get 'A'.
665
2. For [:lower:] and [:upper:], if ignoring case, set type string
666
to "alpha". This parallels code in the regex routines.
667
3. Reset wc1 to EOF when parsing bracket expressions.
669
Mon Nov 29 18:36:25 2004 Arnold D. Robbins <arnold@skeeve.com>
671
* io.c (redirect): When allocating a new struct redirect, set
672
rp->pid to -1, not 0, so that code checking for EOF on an
673
input pipe works correctly.
675
Thu Nov 25 14:22:41 2004 Stepan Kasal <kasal@ucw.cz>
677
* Makefile.am (MAINTAINERCLEANFILES): Add.
678
* version.in (version_string): Use PACKAGE_STRING.
680
Tue Nov 23 17:27:38 2004 Stepan Kasal <kasal@ucw.cz>
682
* re.c: Fix a typo in a comment.
684
Mon Nov 22 16:47:00 2004 Arnold D. Robbins <arnold@skeeve.com>
686
* awkgram.y (yylex): Add lint check for tawk style modifiers on
687
regexes, /.../i and /.../s. Not that it'll help anyone.
689
Wed Oct 27 14:25:18 2004 Stepan Kasal <kasal@ucw.cz>
691
* builtin.c (do_tolower, do_toupper): Fix the wide char handling,
692
especially when the lowercased char doesn't ocuppy the same
693
number of bytes as its uppercase equivalent. Make use of ...
694
(wide_tolower_toupper): ... this new static function.
696
Mon Oct 25 11:51:14 2004 Arnold D. Robbins <arnold@skeeve.com>
698
* builtin.c (bchunk, bchunk_one, cksize): Change type of `olen'
699
to size_t from long. It is the 21st century now, after all...
700
Thanks to Stepan Kasal.
702
Mon Oct 11 10:49:09 2004 Arnold D. Robbins <arnold@skeeve.com>
704
* awkgram.y (yylex): Improve lint warnings for non-decimal constants.
705
* node.c (isnondecimal): Made a little smarter, thanks to Stepan Kasal.
707
Thu Oct 7 21:59:38 2004 Arnold D. Robbins <arnold@skeeve.com>
709
* dfa.c (dfamust): Redo fix of 22 Sep to match code from
712
Sun Oct 3 23:06:00 2004 Arnold D. Robbins <arnold@skeeve.com>
714
* node.c (isnondecimal): Made smarter, so that 0xEE does
715
register as non-decimal. Added parameter to indicate use of
716
locale's decimal point and changed declaration and callers.
718
Tue Sep 28 18:38:17 2004 Arnold D. Robbins <arnold@skeeve.com>
720
* node.c (isnondecimal): New function, now smarter.
721
* awk.h (isnondecimal): Changed from macro to function.
723
Wed Sep 22 11:24:46 2004 Arnold D. Robbins <arnold@skeeve.com>
725
* dfa.c (dfamust): At end, check results of `malloc'.
726
Based on bug report from Sorav Bansal <sbansal@stanford.edu>
729
Mon Sep 20 13:18:18 2004 Arnold D. Robbins <arnold@skeeve.com>
731
New --exec option. Needed for gawk CGI scripts to prevent
732
arbitrary options and/or source getting passed in from the web.
734
* main.c (optab): New long option, --exec.
735
(main): Catch it. Like -f but end option processing.
736
(usage): Add it to the usage message.
738
Thanks to John DuBois and Don Stokes for their input.
742
* dfa.c (dfaexec): Disabled caching into buffer that bypasses
743
multibyte initialization, since it can get things wrong. Thanks
744
to Andreas Schwab <schwab@suse.de>.
746
Mon Sep 20 12:59:42 2004 Andreas Schwab <schwab@suse.de>
748
* awkgram.y (nextc): Check for end of lexer buffer before
749
advancing ring buffer index.
751
Wed Sep 8 09:54:53 2004 Arnold D. Robbins <arnold@skeeve.com>
753
* main.c (main): Force LC_NUMERIC locale to "C" before parsing
754
the program, since a variable assignment with -v can leave the
755
locale set incorrectly.
757
Thanks to Sirix <sirix@poczta.onet.pl> for reporting the problem.
759
Wed Aug 25 18:55:30 2004 Arnold D. Robbins <arnold@skeeve.com>
761
* main.c (UPDATE_YEAR): New constant at top of file, where we
765
Sun Aug 22 17:26:39 2004 Stepan Kasal <kasal@ucw.cz>
767
Define gawk_mb_cur_max even if there is no mbs support, as
768
``const int'' and assign 1 to it.
769
This fixes a bug in re.c where #ifdef MBS_SUPPORT was missing.
771
* awk.h (gawk_mb_cur_max): Declare.
772
* main.c (gawk_mb_cur_max): Define.
773
* awkgram.y (nextc_is_1stbyte): Without mbs support, define to 1.
774
* builtin.c (index_multibyte_buffer): Define a dummy function
775
when there is no mbs support.
776
* awkgram.y, builtin.c, re.c: Remove some `#ifdef MBS_SUPPORT'.
778
Sun Aug 15 22:08:04 2004 Arnold D. Robbins <arnold@skeeve.com>
780
Import current FreeBSD random.c. Make it work for gawk.
781
Needed for cases where long is more than 32 bits.
783
* random.c: Imported from FreeBSD. Header includes tweaked.
784
* random.h: Typdef gawk_uint32_t appropriately and #define uint32_t
786
* configure.ac: Add calls to AC_CHECK_SIZEOF for unsigned int
790
http://www.freebsd.org/cgi/cvsweb.cgi/src/lib/libc/stdlib/random.c
791
Thanks to Andreas Schwab <schwab@suse.de> for the pointer.
793
Thu Aug 12 13:09:53 2004 Arnold D. Robbins <arnold@skeeve.com>
795
* main.c (copyleft): Fix copyright year.
1
797
Mon Aug 2 12:18:15 2004 Arnold D. Robbins <arnold@skeeve.com>
3
799
* Release 3.1.4: Release tar file made.