Introduced -devel and -extras subpackages for gawk
[platform/upstream/gawk.git] / ChangeLog
1 2012-03-28         Arnold D. Robbins     <arnold@skeeve.com>
2
3         * 4.0.1: Release tar ball made.
4
5 2012-03-28         Arnold D. Robbins     <arnold@skeeve.com>
6
7         * getopt.c: Add DJGPP to list of platforms where it's ok
8         to include <stdlib.h>.
9         * awkgram.y, builtin.c, ext.c, mbsupport.h, re.c: Update
10         copyright year.
11
12 2012-03-21         Corinna Vinschen      <vinschen@redhat.com>
13
14         * getopt.c: Add Cygwin to list of platforms where it's ok
15         to include <stdlib.h>.
16
17 2012-03-20         Arnold D. Robbins     <arnold@skeeve.com>
18
19         Get new getopt to work on Linux and C90 compilers:
20
21         * getopt.c: Undef ELIDE_CODE for gawk.
22         (_getopt_internal_r): Init first.needs_free to 0. In test for -W
23         move executable code to after declarations for C90 compilers.
24         * getopt1.c: Undef ELIDE_CODE for gawk.
25
26         Minor bug fix with printf, thanks to John Haque:
27
28         * builtin.c (format_tree): Initialize base to zero at the top
29         of the while loop.
30
31         Getting next tar ball ready:
32
33         * configure.ac: Remove duplicate check for wcscoll. Thanks
34         to Stepan Kasal.
35
36 2012-03-16         Arnold D. Robbins     <arnold@skeeve.com>
37
38         * getopt.c, getopt.h, getopt1.c, getopt_int.h, regcomp.c,
39         regex.c, regex.h, regex_internal.c, regex_internal.h,
40         regexec.c: Sync with GLIBC, what the heck.
41
42 2012-03-14         Eli Zaretskii  <eliz@gnu.org>
43
44         * mbsupport.h (btowc): Change for non-DJGPP.
45         * re.c (dfaerror): Add call to exit for DJGPP.
46
47 2012-03-14         Arnold D. Robbins     <arnold@skeeve.com>
48
49         * regex_internal.c (re_string_skip_chars): Fix calculation of
50         remain_len with m.b. chars. Thanks to Stanislav Brabec
51         <sbrabec@suse.cz>.
52
53 2012-02-28         Arnold D. Robbins     <arnold@skeeve.com>
54
55         * main.c (init_groupset): Make `getgroups' failing a non-fatal
56         error.  After all, what's the big deal?  Should help on Plan 9.
57
58 2012-02-27         Arnold D. Robbins     <arnold@skeeve.com>
59
60         * dfa.c (parse_bracket_exp): Revert changes 2012-02-15 to stay
61         in sync with grep.
62         * dfa.h (dfarerror): Add __attribute__ from grep.
63
64 2012-02-15         Arnold D. Robbins     <arnold@skeeve.com>
65
66         Fix warnings from GCC 4.6.2 -Wall option.
67
68         * awkgram.y (newline_eof): New function to replace body of
69         NEWLINE_EOF macro.
70         (yylex): Replace body of NEWLINE_EOF macro.
71         * dfa.c (parse_bracket_exp): Init variables to zero.
72         * ext.c (dummy, junk): Remove.
73         * regex_internal.c (re_string_reconstruct): Remove buf array. It was
74         set but not used.
75
76 2012-02-10         Arnold D. Robbins     <arnold@skeeve.com>
77
78         * dfa.c: Sync with GNU grep.
79
80 2012-02-07         Arnold D. Robbins     <arnold@skeeve.com>
81
82         * main.c (main): Move init of `output_fp' to before parsing of
83         program so that error messages from msg.c don't dump core.
84         Thanks to Michael Haardt <michael@moria.de>.
85
86 2012-01-13         Arnold D. Robbins     <arnold@skeeve.com>
87
88         * dfa.c [is_valid_unibtye_character]: Fix from GNU grep to 
89         bug reported by me from Scott Deifik for DJGPP.
90
91 2012-01-03         Arnold D. Robbins     <arnold@skeeve.com>
92
93         * dfa.c: Sync with GNU grep.
94
95 2011-12-31         Arnold D. Robbins     <arnold@skeeve.com>
96
97         * awk.h [STREQ, STREQN]: Remove macros.
98         * awkgram.y, builtin.c, command.y, debug.c, eval.c,
99         io.c, msg.c: Change all uses to call strcmp, strncmp.
100
101 2011-12-26         Arnold D. Robbins     <arnold@skeeve.com>
102
103         Finish Rational Range Interpretation (!)
104
105         * dfa.c (match_mb_charset): Compare wide characters directly
106         instead of using wcscoll().
107         * regexec.c (check_node_accept_byte): Ditto.
108
109         Thanks to Paolo Bonzini for pointing these out.
110
111 2011-12-06         John Haque      <j.eh@mchsi.com>
112
113         * debug.c (source_find): Fix misplaced call to efree.
114         * profile.c (redir2str): Add a missing comma in the redirtab array.
115         * eval.c (r_interpret): Disallow call to exit if currule is undefined.
116         This avoids the possiblity of running END blocks more than once when
117         used in a user-defined sorted-in comparision function.
118         * array.c (sort_user_func): Adjust appropriately.
119
120 2011-12-06         Arnold D. Robbins     <arnold@skeeve.com>
121
122         * awk.h, mbsupport.h: Changes for MBS support on DJGPP
123         and z/OS.
124         * io.c: Disable pty support on z/OS.
125
126 2011-11-27         Arnold D. Robbins     <arnold@skeeve.com>
127
128         * dfa.c: Sync with GNU grep.
129         * dfa.h: Add _GL_ATTRIBUTE_PURE macro. Bleah.
130
131 2011-11-14         John Haque      <j.eh@mchsi.com>
132
133         * debug.c (set_breakpoint_at): Fix problem with setting
134         breakpoints in a switch statement. Thanks to Giorgio Palandri
135         <giorgio.palandri@gmail.com> for the bug report.
136
137 2011-11-14         Arnold D. Robbins     <arnold@skeeve.com>
138
139         * mbsupport.h: Add check for HAVE_BTOWC, per Pat Rankin.
140
141 2011-11-12         Eli Zaretskii  <eliz@gnu.org>
142
143         * mbsupport.h: Additional glop for dfa.c in Windows environment.
144
145 2011-11-01         Arnold D. Robbins     <arnold@skeeve.com>
146
147         * dfa.c: Move glop for ! MBS_SUPPORT to ...
148         * mbsupport.h: ... here.
149         * replace.c: Include missing_d/wcmisc.c if ! MBS_SUPPORT.
150         * regex_internal.h: Move include of mbsupport.h up and add
151         additional checks to avoid inclusion of wctype.h and wchar.h.
152
153 2011-10-27         Arnold D. Robbins     <arnold@skeeve.com>
154
155         * builtin.c (do_strftime): Per Pat Rankin, instead of casting
156         fclock, use a long variable and check for negative or overflow.
157
158 2011-10-25         Arnold D. Robbins     <arnold@skeeve.com>
159
160         * Makefile.am (dist-hook): Use `cd $(srcdir)/pc' so that
161         `make distcheck' works completely.
162         * builtin.c (do_strftime): Add cast to long int in check
163         for fclock < 0 for systems where time_t is unsigned (e.g., VMS).
164
165 2011-10-25  Stefano Lattarini  <stefano.lattarini@gmail.com>
166
167         dist: generated file `version.c' is not removed by "make distclean"
168
169         * Makefile.am (distcleancheck_listfiles): Define to ignore the
170         generated `version.c' file.
171
172 2011-10-24         Arnold D. Robbins     <arnold@skeeve.com>
173
174         * dfa.c (wcscoll): Create for VMS.
175         * Makefile.am (dist-hook): Run sed scripts to make pc/config.h.
176
177 2011-10-24  Eli Zaretskii  <eliz@gnu.org>
178
179         * builtin.c [HAVE_POPEN_H]: Include "popen.h".
180         * README.git: Update for pc/ systems.
181
182 2011-10-21         Arnold D. Robbins     <arnold@skeeve.com>
183
184         * Makefile.am (distcleancheck_listfiles): Added, per advice from
185         Stefano Lattarini <stefano.lattarini@gmail.com>.
186         * dfa.c: Additional faking of mbsupport for systems without it;
187         mainly VMS.
188
189 2011-10-21  Stefano Lattarini  <stefano.lattarini@gmail.com>
190
191         * configure.ac (AM_C_PROTOTYPES): Remove call to this macro.
192         The comments in configure.ac said that the call to AM_C_PROTOTYPES
193         was needed for dfa.h, synced from GNU grep; but this statement is
194         not true anymore in grep since commit v2.5.4-24-g9b5e7d4 "replace
195         AC_CHECK_* with gnulib modules", dating back to 2009-11-26.  Also,
196         the support for automatic de-ANSI-fication has been deprecated in
197         automake 1.11.2, and will be removed altogether in automake 1.12.
198         * vms/vms-conf.h (PROTOTYPES, __PROTOTYPES): Remove these #define,
199         they are not used anymore.
200         * pc/config.h (PROTOTYPES): Likewise.
201
202 2011-10-18         Dave Pitts            <dpitts@cozx.com>
203
204         * dfa.c: Move some decls to the top of their functions for
205         C90 compilers.
206
207 2011-10-18         Arnold D. Robbins     <arnold@skeeve.com>
208
209         * builtin.c (do_strftime): Add check for negative / overflowed
210         time_t value with fatal error. Thanks to Hermann Peifer
211         <peifer@gmx.eu> for the bug report.
212         * dfa.c (setbit_wc): Non-MBS version. Add a return false
213         since VMS compiler doesn't understand that abort doesn't return.
214
215 2011-10-10         Arnold D. Robbins     <arnold@skeeve.com>
216
217         * builtin.c (do_sub): Init textlen to zero to avoid "may be
218         used unitialized" warning. Thanks to Corinna Vinschen for
219         pointing this out.
220         * eval.c (unwind_stack): Add parentheses around condition in while
221         to avoid overzealous warning from GCC.
222
223 2011-09-30  Eli Zaretskii  <eliz@gnu.org>
224
225         * io.c (remap_std_file): Fix non-portable code that caused
226         redirected "print" to fail if a previous read from standard input
227         returned EOF.  Reported by David Millis <tvtronix@yahoo.com>.
228         (remap_std_file): Per Eli's suggestion, removed the leading close
229         of oldfd and will let dup2 do the close for us.
230
231 2011-10-09         Arnold D. Robbins     <arnold@skeeve.com>
232
233         * dfa.c: Sync with GNU grep.
234
235 2011-10-04         Arnold D. Robbins     <arnold@skeeve.com>
236
237         * awk.h, main.c (gawk_mb_cur_max): Make it a constant 1 when
238         MBS_SUPPORT isn't available to allow GCC dead code constant
239         expression computation and dead code elimination to help out.
240
241 2011-10-02         Arnold D. Robbins     <arnold@skeeve.com>
242
243         * io.c (rsnullscan, get_a_record): Fix the cases where terminators
244         are incomplete when RS == "". Also fix the case where the new value
245         is shorter than the old one.  Based on patch from Rogier
246         <rogier777@gmail.com> as submitted by Jeroen Schot
247         <schot@A-Eskwadraat.nl>.
248
249 2011-09-24         Arnold D. Robbins     <arnold@skeeve.com>
250
251         * eval.c, io.c, re.c: Fix some spelling errors. Thanks to
252         Jeroen Schot <schot@A-Eskwadraat.nl>.
253
254 2011-09-21         Arnold D. Robbins     <arnold@skeeve.com>
255
256         * dfa.c, mbsupport.h: Sync with GNU grep. Large amount of changes
257         that remove many ifdefs, moving many conditions for multibyte
258         support into regular C code and relying GCC's dead code optimization
259         to elimnate code that won't be needed.
260         * dfa.c: For gawk, add a number of additional defines so that things
261         will compile if MBS_SUPPORT is 0.
262         * array.c, awk.h, awkgram.y, builtin.c, eval.c, field.c, main.c,
263         node.c, re.c: Change `#ifdef MBS_SUPPORT' to `#if MBS_SUPPORT'.
264         * awk.h, regex_internal.h: Move NO_MBSUPPORT handling to ...
265         * mbsupport.h: ...here.
266
267 2011-09-16         Arnold D. Robbins     <arnold@skeeve.com>
268
269         * dfa.c: Sync with GNU grep.
270
271 2011-09-03         Arnold D. Robbins     <arnold@skeeve.com>
272
273         * dfa.c: Sync with GNU grep.
274
275 2011-08-24         Arnold D. Robbins     <arnold@skeeve.com>
276
277         Fix pty co-process communication on Ubuntu GNU/Linux.
278
279         * io.c: Add include of <sys/ioctl.h> to get definition of TIOCSCTTY.
280         (two_way_open): Move call for this ioctl to after setsid() call.
281
282 2011-08-23         Arnold D. Robbins     <arnold@skeeve.com>
283
284         * regex_internal.c (re_string_fetch_byte_case ): Remove
285         __attribute((pure)) since it causes failures with gcc -O2
286         -fno-inline. Thanks to Neil Cahill <ncahill_alt@yahoo.com>
287         for reporting the bug.
288
289 2011-08-10         John Haque      <j.eh@mchsi.com>
290
291         BEGINFILE/ENDFILE related code redone.
292
293         * awk.h (prev_frame_size, has_endfile, target_get_record,
294         target_newfile): New defines.
295         * awkgram.y (mk_program): Initialize has_endfile appropriately for
296         Op_get_record.
297         (parse_program): Initialize new jump targets for
298         Op_get_record and Op_newfile.
299         * eval.c (unwind_stack): Change argument to number of
300         items to be left in the stack. Adjust code.
301         (pop_fcall, pop_stack): New defines.
302         (setup_frame): Initialize prev_frame_size.
303         (exec_state, EXEC_STATE): New structure and typedef.
304         (exec_state_stack): New variable.
305         (push_exec_state, pop_exec_state): New functions to save and
306         later retrieve an execution state.
307         (r_interpret): Use the new functions and the defines in
308         cases Op_K_getline, Op_after_beginfile, Op_after_endfile,
309         Op_newfile and Op_K_exit.
310         * io.c (after_beginfile): When skipping a file using nextfile,
311         return zero in case there was an error opening the file. 
312         (has_endfile): Nuke global variable.
313         (inrec): Add a second argument to pass errno to the calling
314         routine.
315         * debug.c (print_instruction): Update cases.
316
317 2011-08-10         Arnold D. Robbins     <arnold@skeeve.com>
318
319         Fix (apparently long-standing) problem with FIELDWIDTHS.
320         Thanks to Johannes Meixner <jsmeix@suse.de>.
321
322         * field.c (set_FIELDWIDTHS): Adjust calculations.
323
324         Fix problem with FPAT, reported by "T. X. G." <leopardie333@yahoo.com>
325
326         * awk.h (Regexp): Add new member 'non_empty'.
327         * field.c (fpat_parse_field): Save/restore local variable non_empty
328         from member in Regexp struct.
329
330 2011-08-09         Arnold D. Robbins     <arnold@skeeve.com>
331
332         Fix pty issue reported by "T. X. G." <leopardie333@yahoo.com>
333
334         * configure.ac: Check for setsid.
335         * awk.h: If not HAVE_SETSID define it as an empty macro.
336         * io.c (two_way_open): Call setsid if using pty's.
337
338 2011-07-29  Eli Zaretskii  <eliz@gnu.org>
339
340         * builtin.c (format_tree): Rename small -> small_flag,
341         big -> big_flag, bigbig -> bigbig_flag.  Solves compilation errors
342         when building Gawk with libsigsegv on MS-Windows, see
343         https://lists.gnu.org/archive/html/bug-gawk/2011-07/msg00029.html.
344
345 2011-07-28         Arnold D. Robbins     <arnold@skeeve.com>
346
347         * builtin.c (do_sub): Revert to gawk 3.1 behavior for backslash
348         handling. It was stupid to think I could break compatibility.
349         Thanks to John Ellson <ellson@research.att.com> for raising
350         the issue.
351
352 2011-07-26         John Haque      <j.eh@mchsi.com>
353
354         * eval.c (r_interpret): In cases Op_var_assign and Op_field_assign,
355         include Op_K_getline_redir in the test for skipping the routine.
356
357 2011-07-26         John Haque      <j.eh@mchsi.com>
358
359         Fix handling of assign routines for 'getline var'.
360         Rework the previous fix for (g)sub.
361
362         * awk.h: New define assign_ctxt for use in Op_var_assign
363         and Op_field_assign opcodes. Remove define AFTER_ASSIGN.
364         * awkgram.y (snode, mk_getline): Initialize assign_ctxt.
365         * builtin.c (do_sub): Adjust to take only the first two
366         arguments.
367         * eval.c (r_interpret): In cases Op_var_assign and Op_field_assign,
368         skip the routine as appropriate. Adjust case Op_sub_builtin.
369         * main.c (get_spec_varname): New function.
370         * debug.c (print_instruction): Use the new function to get
371         special variable name.
372
373 2011-07-17         Arnold D. Robbins     <arnold@skeeve.com>
374
375         * main.c (varinit): Mark FPAT as NON_STANDARD. Thanks to
376         Wolfgang Seeberg <wolfgang.seeberg@yahoo.com> for the report.
377         * Makefile.am (EXTRA_DIST): Add po/README, per advice from
378         Bruno Haible.
379         * dfa.c: Sync with GNU grep.
380         * xalloc.h (xzalloc): New function, from GNU grep, for dfa.c.
381         * README: Note that bug list is really a real mailing list.
382
383 2011-07-16         Arnold D. Robbins     <arnold@skeeve.com>
384
385         * Makefile.am (AUTOMAKE_OPTIONS): Removed.
386         * configure.ac (AM_INIT_AUTOMAKE): Removed dist-bzip2 option, on
387         advice from Karl Berry.
388
389 2011-07-15         John Haque      <j.eh@mchsi.com>
390
391         * awk.h (Op_sub_builtin): New opcode.
392         (GSUB, GENSUB, AFTER_ASSIGN, LITERAL): New flags for 
393         Op_sub_builtin.
394         * awkgram.y (struct tokentab): Change opcode to Op_sub_builtin
395         for sub, gsub and gensub.
396         (snode): Update processing of sub, gsub and gensub.
397         * builtin.c (do_sub, do_gsub, do_gensub): Nuke.
398         (sub_common): Renamed to do_sub. Relocate gensub argument
399         handling code from do_gensub to here; Simplify the code a
400         little bit. 
401         * eval.c (r_interpret): Handle Op_sub_builtin. Avoid field
402         re-splitting or $0 rebuilding if (g)sub target string is
403         a field and no substitutions were done.
404         * pprint (profile.c): Add case for the new opcode.
405         * print_instruction (debug.c): Ditto.
406
407 2011-07-15         Arnold D. Robbins     <arnold@skeeve.com>
408
409         * awk.h: Typo fix: "loner" --> longer. Thanks to Nelson Beebe.
410         * builtin.c (efwrite): Fix flushing test back to what it was 
411         in 3.1.8. Thanks to Strefil <strefil@yandex.ru> for the problem
412         report.
413         * configure.ac: Bump version to 4.0.0a for stable branch.
414
415 2011-06-24         Arnold D. Robbins     <arnold@skeeve.com>
416
417         * Makefile.am (EXTRA_DIST): Add ChangeLog.0.
418         * 4.0.0: Remake the tar ball.
419
420 2011-06-23         Arnold D. Robbins     <arnold@skeeve.com>
421
422         * configure.ac: Update version to 4.0.0.
423         * configure: Regenerated.
424         * ChangeLog.0: Rotated ChangeLog into this file.
425         * ChangeLog: Created anew for gawk 4.0.0 and on.
426         * README: Bump version to 4.0.0.
427         * 4.0.0: Release tar ball made.