summaryrefslogtreecommitdiff
path: root/ChangeLog
blob: dbead39b0ecf5b6c291a0e86f73a533b8b4ba2ec (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
2011-10-27         Arnold D. Robbins     <arnold@skeeve.com>

	* builtin.c (do_strftime): Per Pat Rankin, instead of casting
	fclock, use a long variable and check for negative or overflow.

2011-10-25         Arnold D. Robbins     <arnold@skeeve.com>

	Merge with gawk_performance branch done. Additionally:

	* cint_array.c, int_array.c, str_array.c: Fix compiler complaints
	about printf formats (signed / unsigned vs. %d / %u).
	* eval.c (setup_frame): Add a missing return value.

2011-10-25         Arnold D. Robbins     <arnold@skeeve.com>

	* Makefile.am (dist-hook): Use `cd $(srcdir)/pc' so that
	`make distcheck' works completely.
	* builtin.c (do_strftime): Add cast to long int in check
	for fclock < 0 for systems where time_t is unsigned (e.g., VMS).

2011-10-25  Stefano Lattarini  <stefano.lattarini@gmail.com>

	dist: generated file `version.c' is not removed by "make distclean"

	* Makefile.am (distcleancheck_listfiles): Define to ignore the
	generated `version.c' file.

2011-10-24         Arnold D. Robbins     <arnold@skeeve.com>

	* dfa.c (wcscoll): Create for VMS.
	* Makefile.am (dist-hook): Run sed scripts to make pc/config.h.

2011-10-24  Eli Zaretskii  <eliz@gnu.org>

	* builtin.c [HAVE_POPEN_H]: Include "popen.h".
	* README.git: Update for pc/ systems.

2011-10-21         Arnold D. Robbins     <arnold@skeeve.com>

	* Makefile.am (distcleancheck_listfiles): Added, per advice from
	Stefano Lattarini <stefano.lattarini@gmail.com>.
	* dfa.c: Additional faking of mbsupport for systems without it;
	mainly VMS.

2011-10-21  Stefano Lattarini  <stefano.lattarini@gmail.com>

	* configure.ac (AM_C_PROTOTYPES): Remove call to this macro.
	The comments in configure.ac said that the call to AM_C_PROTOTYPES
	was needed for dfa.h, synced from GNU grep; but this statement is
	not true anymore in grep since commit v2.5.4-24-g9b5e7d4 "replace
	AC_CHECK_* with gnulib modules", dating back to 2009-11-26.  Also,
	the support for automatic de-ANSI-fication has been deprecated in
	automake 1.11.2, and will be removed altogether in automake 1.12.
	* vms/vms-conf.h (PROTOTYPES, __PROTOTYPES): Remove these #define,
	they are not used anymore.
	* pc/config.h (PROTOTYPES): Likewise.

2011-10-18         Dave Pitts            <dpitts@cozx.com>

	* dfa.c: Move some decls to the top of their functions for
	C90 compilers.

2011-10-18         Arnold D. Robbins     <arnold@skeeve.com>

	* builtin.c (do_strftime): Add check for negative / overflowed
	time_t value with fatal error. Thanks to Hermann Peifer
	<peifer@gmx.eu> for the bug report.
	* dfa.c (setbit_wc): Non-MBS version. Add a return false
	since VMS compiler doesn't understand that abort doesn't return.

2011-10-10         Arnold D. Robbins     <arnold@skeeve.com>

	* builtin.c (do_sub): Init textlen to zero to avoid "may be
	used unitialized" warning. Thanks to Corinna Vinschen for
	pointing this out.
	* eval.c (unwind_stack): Add parentheses around condition in while
	to avoid overzealous warning from GCC.

2011-09-30  Eli Zaretskii  <eliz@gnu.org>

	* io.c (remap_std_file): Fix non-portable code that caused
	redirected "print" to fail if a previous read from standard input
	returned EOF.  Reported by David Millis <tvtronix@yahoo.com>.
	(remap_std_file): Per Eli's suggestion, removed the leading close
	of oldfd and will let dup2 do the close for us.

2011-10-11         John Haque     <j.eh@mchsi.com>

	* symbol.c: Add licence notice.
	* array.c (PREC_NUM, PREC_STR): Define as macros.

2011-10-09         Arnold D. Robbins     <arnold@skeeve.com>

	* dfa.c: Sync with GNU grep.

2011-10-07         John Haque     <j.eh@mchsi.com>

	Tail recursion optimization.
	* awkgram.y (grammar, mk_function): Recognize tail-recursive
	calls.
	* awk.h (tail_call, num_tail_calls): New defines.
	* eval.c (setup_frame): Reuse function call stack for
	tail-recursive calls.
	(dump_fcall_stack): Reworked.

2011-10-04         Arnold D. Robbins     <arnold@skeeve.com>

	* awk.h, main.c (gawk_mb_cur_max): Make it a constant 1 when
	MBS_SUPPORT isn't available to allow GCC dead code constant
	expression computation and dead code elimination to help out.

2011-10-02         Arnold D. Robbins     <arnold@skeeve.com>

	* io.c (rsnullscan, get_a_record): Fix the cases where terminators
	are incomplete when RS == "". Also fix the case where the new value
	is shorter than the old one.  Based on patch from Rogier
	<rogier777@gmail.com> as submitted by Jeroen Schot
	<schot@A-Eskwadraat.nl>.

2011-09-24         Arnold D. Robbins     <arnold@skeeve.com>

	* eval.c, io.c, re.c: Fix some spelling errors. Thanks to
	Jeroen Schot <schot@A-Eskwadraat.nl>.

2011-09-21         Arnold D. Robbins     <arnold@skeeve.com>

	* dfa.c, mbsupport.h: Sync with GNU grep. Large amount of changes
	that remove many ifdefs, moving many conditions for multibyte
	support into regular C code and relying GCC's dead code optimization
	to elimnate code that won't be needed.
	* dfa.c: For gawk, add a number of additional defines so that things
	will compile if MBS_SUPPORT is 0.
	* array.c, awk.h, awkgram.y, builtin.c, eval.c, field.c, main.c,
	node.c, re.c: Change `#ifdef MBS_SUPPORT' to `#if MBS_SUPPORT'.
	* awk.h, regex_internal.h: Move NO_MBSUPPORT handling to ...
	* mbsupport.h: ...here.

2011-09-16         Arnold D. Robbins     <arnold@skeeve.com>

	* dfa.c: Sync with GNU grep.

2011-09-08         John Haque     <j.eh@mchsi.com>

	Optimization for compound assignment, increment and
	decrement operators; Avoid unref and make_number calls
	when there is no extra references to the value NODE.

2011-09-03         Arnold D. Robbins     <arnold@skeeve.com>

	* dfa.c: Sync with GNU grep.

2011-08-31         John Haque     <j.eh@mchsi.com>

	Grammar related changes: Simplify grammar for user-defined
	functions and general cleanups.

	* symbol.c: New file.
	* awkgram.y: Move symbol table related routines to the
	new file.
	(rule, func_name, function_prologue, param_list): Reworked.
	(install_function, check_params): Do all error checkings
	for the function name and parameters before installing in
	the symbol table.
	(mk_function): Finalize function definition.
	(func_install, append_param, dup_params): Nuked.
	* symbol.c (make_params): allocate function parameter nodes
	for the symbol table. Use the hash node as Node_param_list;
	Saves a NODE for each parameter.
	(install_params): Install function parameters into the symbol
	table.
	(remove_params): Remove parameters out of the symbol table.
	* awk.h (parmlist, FUNC): Nuked.
	(fparms): New define.


	Dynamically loaded function parameters are now handled like
	those for a builtin.

	* awk.h (Node_ext_func, Op_ext_builtin): New types.
	(Op_ext_func): Nuked.
	* ext.c (make_builtin): Simplified.
	(get_curfunc_arg_count): Nuked; Use the argument 'nargs' of
	the extension function instead.
	(get_argument, get_actual_argument): Adjust.
	* eval.c (r_interpret): Update case Op_func_call for a dynamic
	extension function. Handle the new opcode Op_ext_builtin.
	* pprint (profile.c): Adjust.


	Use a single variable to process gawk options.

	* awk.h (do_flags): New variable.
	(DO_LINT_INVALID, DO_LINT_ALL, DO_LINT_OLD, DO_TRADITIONAL,
	DO_POSIX, DO_INTL, DO_NON_DEC_DATA, DO_INTERVALS,
	DO_PROFILING, DO_DUMP_VARS, DO_TIDY_MEM,
	DO_SANDBOX): New defines.
	(do_traditional, do_posix, do_intervals, do_intl,
	do_non_decimal_data, do_profiling, do_dump_vars,
	do_tidy_mem, do_sandbox, do_lint,
	do_lint_old): Defined as macros.	
	* main.c: Remove definitions of the do_XX variables. Add
	do_flags definition.
	* debug.c (execute_code, do_eval, parse_condition): Save
	do_flags before executing/parsing and restore afterwards.


	Nuke PERM flag. Always increment/decrement the reference
	count for a Node_val. Simplifies macros and avoids
	occassional memory leaks, specially in the debugger.

	* awk.h (UPREF, DEREF, dupnode, unref): Simplified.
	(mk_number): Nuked.
	* (*.c): Increment the reference count of Nnull_string before
	assigning as a value.


	Revamped array handling mechanism for more speed and
	less memory consumption.

	* awk.h (union bucket_item, BUCKET): New definitions. Used as
	bucket elements for the hash table implementations of arrays;
	40% space saving in 32 bit x86.
	(buckets, nodes, array_funcs, array_base, array_capacity,
	xarray, alookup, aexists, aclear, aremove, alist,
	acopy, adump, NUM_AFUNCS): New defines.
	(array_empty): New macro to test for an empty array.
	(assoc_lookup, in_array): Defined as macros.
	(enum assoc_list_flags): New declaration.
	(Node_ahash, NUMIND): Nuked.
	* eval.c (r_interpret): Adjust cases Op_subscript,
	Op_subscript_lhs, Op_store_var and Op_arrayfor_incr.
	* node.c (dupnode, unref): Removed code related to Node_ahash. 
	* str_array.c: New file to handle array with string indices.
	* int_array.c: New file to handle array with integer indices.
	* cint_array.c: New file. Special handling of arrays with
	(mostly) consecutive integer indices.


	Memory pool management reworked to handle NODE and BUCKET.

	* awk.h (struct block_item, BLOCK, block_id): New definitions.
	(getblock, freeblock): New macros.
	(getbucket, freebucket): New macros to allocate and deallocate
	a BUCKET.
	(getnode, freenode): Adjusted.
	* node.c (more_nodes): Nuked.
	(more_blocks): New routine to allocate blocks of memory.

2011-08-24         Arnold D. Robbins     <arnold@skeeve.com>

	Fix pty co-process communication on Ubuntu GNU/Linux.

	* io.c: Add include of <sys/ioctl.h> to get definition of TIOCSCTTY.
	(two_way_open): Move call for this ioctl to after setsid() call.

2011-08-23         Arnold D. Robbins     <arnold@skeeve.com>

	* regex_internal.c (re_string_fetch_byte_case ): Remove
	__attribute((pure)) since it causes failures with gcc -O2
	-fno-inline. Thanks to Neil Cahill <ncahill_alt@yahoo.com>
	for reporting the bug.

2011-08-10         John Haque      <j.eh@mchsi.com>

	BEGINFILE/ENDFILE related code redone.

	* awk.h (prev_frame_size, has_endfile, target_get_record,
	target_newfile): New defines.
	* awkgram.y (mk_program): Initialize has_endfile appropriately for
	Op_get_record.
	(parse_program): Initialize new jump targets for
	Op_get_record and Op_newfile.
	* eval.c (unwind_stack): Change argument to number of
	items to be left in the stack. Adjust code.
	(pop_fcall, pop_stack): New defines.
	(setup_frame): Initialize prev_frame_size.
	(exec_state, EXEC_STATE): New structure and typedef.
	(exec_state_stack): New variable.
	(push_exec_state, pop_exec_state): New functions to save and
	later retrieve an execution state.
	(r_interpret): Use the new functions and the defines in
	cases Op_K_getline, Op_after_beginfile, Op_after_endfile,
	Op_newfile and Op_K_exit.
	* io.c (after_beginfile): When skipping a file using nextfile,
	return zero in case there was an error opening the file. 
	(has_endfile): Nuke global variable.
	(inrec): Add a second argument to pass errno to the calling
	routine.
	* debug.c (print_instruction): Update cases.

2011-08-10         Arnold D. Robbins     <arnold@skeeve.com>

	Fix (apparently long-standing) problem with FIELDWIDTHS.
	Thanks to Johannes Meixner <jsmeix@suse.de>.

	* field.c (set_FIELDWIDTHS): Adjust calculations.

	Fix problem with FPAT, reported by "T. X. G." <leopardie333@yahoo.com>

	* awk.h (Regexp): Add new member 'non_empty'.
	* field.c (fpat_parse_field): Save/restore local variable non_empty
	from member in Regexp struct.

2011-08-09         Arnold D. Robbins     <arnold@skeeve.com>

	Fix pty issue reported by "T. X. G." <leopardie333@yahoo.com>

	* configure.ac: Check for setsid.
	* awk.h: If not HAVE_SETSID define it as an empty macro.
	* io.c (two_way_open): Call setsid if using pty's.

2011-07-29  Eli Zaretskii  <eliz@gnu.org>

	* builtin.c (format_tree): Rename small -> small_flag,
	big -> big_flag, bigbig -> bigbig_flag.  Solves compilation errors
	when building Gawk with libsigsegv on MS-Windows, see
	https://lists.gnu.org/archive/html/bug-gawk/2011-07/msg00029.html.

2011-07-28         Arnold D. Robbins     <arnold@skeeve.com>

	* builtin.c (do_sub): Revert to gawk 3.1 behavior for backslash
	handling. It was stupid to think I could break compatibility.
	Thanks to John Ellson <ellson@research.att.com> for raising
	the issue.

2011-07-26         John Haque      <j.eh@mchsi.com>

	* eval.c (r_interpret): In cases Op_var_assign and Op_field_assign,
	include Op_K_getline_redir in the test for skipping the routine.

2011-07-26         John Haque      <j.eh@mchsi.com>

	Fix handling of assign routines for 'getline var'.
	Rework the previous fix for (g)sub.

	* awk.h: New define assign_ctxt for use in Op_var_assign
	and Op_field_assign opcodes. Remove define AFTER_ASSIGN.
	* awkgram.y (snode, mk_getline): Initialize assign_ctxt.
	* builtin.c (do_sub): Adjust to take only the first two
	arguments.
	* eval.c (r_interpret): In cases Op_var_assign and Op_field_assign,
	skip the routine as appropriate. Adjust case Op_sub_builtin.
	* main.c (get_spec_varname): New function.
	* debug.c (print_instruction): Use the new function to get
	special variable name.

2011-07-17         Arnold D. Robbins     <arnold@skeeve.com>

	* main.c (varinit): Mark FPAT as NON_STANDARD. Thanks to
	Wolfgang Seeberg <wolfgang.seeberg@yahoo.com> for the report.
	* Makefile.am (EXTRA_DIST): Add po/README, per advice from
	Bruno Haible.
	* dfa.c: Sync with GNU grep.
	* xalloc.h (xzalloc): New function, from GNU grep, for dfa.c.
	* README: Note that bug list is really a real mailing list.

2011-07-16         Arnold D. Robbins     <arnold@skeeve.com>

	* Makefile.am (AUTOMAKE_OPTIONS): Removed.
	* configure.ac (AM_INIT_AUTOMAKE): Removed dist-bzip2 option, on
	advice from Karl Berry.

2011-07-15         John Haque      <j.eh@mchsi.com>

	* awk.h (Op_sub_builtin): New opcode.
	(GSUB, GENSUB, AFTER_ASSIGN, LITERAL): New flags for 
	Op_sub_builtin.
	* awkgram.y (struct tokentab): Change opcode to	Op_sub_builtin
	for sub, gsub and gensub.
	(snode): Update processing of sub, gsub and gensub.
	* builtin.c (do_sub, do_gsub, do_gensub): Nuke.
	(sub_common): Renamed to do_sub. Relocate gensub argument
	handling code from do_gensub to here; Simplify the code a
	little bit. 
	* eval.c (r_interpret): Handle Op_sub_builtin. Avoid field
	re-splitting or $0 rebuilding if (g)sub target string is
	a field and no substitutions were done.
	* pprint (profile.c): Add case for the new opcode.
	* print_instruction (debug.c): Ditto.

2011-07-15         Arnold D. Robbins     <arnold@skeeve.com>

	* awk.h: Typo fix: "loner" --> longer. Thanks to Nelson Beebe.
	* builtin.c (efwrite): Fix flushing test back to what it was 
	in 3.1.8. Thanks to Strefil <strefil@yandex.ru> for the problem
	report.
	* configure.ac: Bump version to 4.0.0a for stable branch.

2011-06-24         Arnold D. Robbins     <arnold@skeeve.com>

	* Makefile.am (EXTRA_DIST): Add ChangeLog.0.
	* 4.0.0: Remake the tar ball.

2011-06-23         Arnold D. Robbins     <arnold@skeeve.com>

	* configure.ac: Update version to 4.0.0.
	* configure: Regenerated.
	* ChangeLog.0: Rotated ChangeLog into this file.
	* ChangeLog: Created anew for gawk 4.0.0 and on.
	* README: Bump version to 4.0.0.
	* 4.0.0: Release tar ball made.