summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--[-rwxr-xr-x]COPYING0
-rw-r--r--ChangeLog515
-rw-r--r--FUTURES25
-rw-r--r--Makefile.am21
-rw-r--r--Makefile.in56
-rw-r--r--NEWS22
-rw-r--r--POSIX.NOTES25
-rw-r--r--README_d/README.cygwin-dynamic88
-rw-r--r--README_d/README.pc16
-rw-r--r--README_d/README.solaris140
-rw-r--r--TODO61
-rw-r--r--aclocal.m41
-rw-r--r--array.c539
-rw-r--r--awk.h1439
-rw-r--r--awkgram.c7107
-rw-r--r--awkgram.y5395
-rw-r--r--awklib/Makefile.in7
-rw-r--r--awkprintf.h1019
-rw-r--r--bisonfix.awk18
-rw-r--r--builtin.c2367
-rw-r--r--cmd.h212
-rw-r--r--command.c3646
-rw-r--r--command.y1680
-rw-r--r--configh.in7
-rwxr-xr-xconfigure118
-rw-r--r--configure.ac15
-rw-r--r--custom.h37
-rw-r--r--debug.c5732
-rw-r--r--dfa.c207
-rw-r--r--dfa.h8
-rw-r--r--doc/ChangeLog33
-rw-r--r--doc/Makefile.am5
-rw-r--r--doc/Makefile.in12
-rw-r--r--doc/README.DGAWK304
-rw-r--r--doc/awkcard.in1843
-rw-r--r--doc/bc_notes323
-rw-r--r--doc/gawk.1586
-rw-r--r--doc/gawk.info5090
-rw-r--r--doc/gawk.texi3589
-rw-r--r--doc/lflashlight.eps2
-rw-r--r--doc/rflashlight.eps2
-rw-r--r--eval.c3917
-rw-r--r--eval_d.c27
-rw-r--r--ext.c226
-rw-r--r--extension/arrayparm.c21
-rw-r--r--extension/dl.c20
-rw-r--r--extension/filefuncs.c94
-rw-r--r--extension/fork.c27
-rw-r--r--extension/ordchr.c25
-rw-r--r--extension/readfile.c20
-rw-r--r--extension/rwarray.c181
-rwxr-xr-xextension/steps16
-rw-r--r--extension/testarg.c22
-rw-r--r--field.c432
-rw-r--r--floatcomp.c2
-rw-r--r--gawkmisc.c22
-rw-r--r--io.c1729
-rw-r--r--m4/arch.m44
-rw-r--r--m4/readline.m463
-rw-r--r--main.c475
-rw-r--r--missing_d/ChangeLog5
-rw-r--r--missing_d/getaddrinfo.h5
-rw-r--r--missing_d/setenv.c178
-rw-r--r--msg.c99
-rw-r--r--node.c340
-rw-r--r--pc/ChangeLog15
-rw-r--r--pc/Makefile30
-rw-r--r--pc/Makefile.tst141
-rw-r--r--pc/config.h4
-rw-r--r--pc/gawkmisc.pc8
-rw-r--r--pc/popen.c12
-rw-r--r--po/ChangeLog13
-rw-r--r--po/ast.gmobin43395 -> 37956 bytes
-rw-r--r--po/ast.po1460
-rw-r--r--po/ca.gmobin31098 -> 26698 bytes
-rw-r--r--po/ca.po1488
-rw-r--r--po/da.gmobin29608 -> 25468 bytes
-rw-r--r--po/da.po1501
-rw-r--r--po/de.gmobin29064 -> 25418 bytes
-rw-r--r--po/de.po1507
-rw-r--r--po/es.gmobin42063 -> 37981 bytes
-rw-r--r--po/es.po1572
-rw-r--r--po/fr.gmobin40055 -> 34626 bytes
-rw-r--r--po/fr.po1482
-rw-r--r--po/ga.gmobin39360 -> 34811 bytes
-rw-r--r--po/ga.po1461
-rw-r--r--po/gawk.pot1171
-rw-r--r--po/he.gmobin29589 -> 25476 bytes
-rw-r--r--po/he.po1500
-rw-r--r--po/id.gmobin42200 -> 36680 bytes
-rw-r--r--po/id.po1460
-rw-r--r--po/it.gmobin40952 -> 36690 bytes
-rw-r--r--po/it.po1552
-rw-r--r--po/ja.gmobin37957 -> 32840 bytes
-rw-r--r--po/ja.po1454
-rw-r--r--po/nl.gmobin39461 -> 35358 bytes
-rw-r--r--po/nl.po1780
-rw-r--r--po/pl.gmobin40684 -> 38676 bytes
-rw-r--r--po/pl.po2089
-rw-r--r--po/pt_BR.gmobin34920 -> 29992 bytes
-rw-r--r--po/pt_BR.po1470
-rw-r--r--po/ro.gmobin30466 -> 26272 bytes
-rw-r--r--po/ro.po1475
-rw-r--r--po/rw.gmobin474 -> 474 bytes
-rw-r--r--po/rw.po1470
-rw-r--r--po/sv.gmobin34436 -> 34674 bytes
-rw-r--r--po/sv.po1598
-rw-r--r--po/tr.gmobin40036 -> 34702 bytes
-rw-r--r--po/tr.po1453
-rw-r--r--po/vi.gmobin48377 -> 41484 bytes
-rw-r--r--po/vi.po1567
-rw-r--r--po/zh_CN.gmobin37299 -> 34547 bytes
-rw-r--r--po/zh_CN.po1510
-rw-r--r--posix/gawkmisc.c8
-rw-r--r--profile.c2428
-rw-r--r--protos.h137
-rw-r--r--re.c80
-rw-r--r--regcomp.c4
-rw-r--r--regex.h1
-rw-r--r--regex_internal.c2
-rw-r--r--regexec.c2
-rw-r--r--replace.c25
-rw-r--r--test/ChangeLog47
-rw-r--r--test/Makefile.am52
-rw-r--r--test/Makefile.in99
-rw-r--r--test/Maketests39
-rw-r--r--test/aadelete1.awk19
-rw-r--r--test/aadelete1.ok6
-rw-r--r--test/aadelete2.awk10
-rw-r--r--test/aadelete2.ok2
-rw-r--r--test/aarray1.awk28
-rw-r--r--test/aarray1.ok6
-rw-r--r--test/aasort.awk34
-rw-r--r--test/aasort.ok26
-rw-r--r--test/aasorti.awk35
-rw-r--r--test/aasorti.ok20
-rw-r--r--test/arrayparm.ok2
-rw-r--r--test/aryprm3.ok2
-rw-r--r--test/backgsub.ok2
-rw-r--r--test/badargs.ok12
-rw-r--r--test/beginfile1.awk19
-rw-r--r--test/beginfile1.ok14
-rw-r--r--test/concat4.awk2
-rw-r--r--test/concat4.ok2
-rw-r--r--test/defref.ok2
-rw-r--r--test/dumpvars.in3
-rw-r--r--test/dumpvars.ok24
-rw-r--r--test/fmtspcl.tok16
-rw-r--r--test/fnarray.ok4
-rw-r--r--test/fsbs.awk2
-rw-r--r--test/funsmnam.ok4
-rw-r--r--test/inftest.ok202
-rw-r--r--test/nofile.ok2
-rw-r--r--test/paramres.ok4
-rw-r--r--test/parseme.ok5
-rw-r--r--test/posix2008sub.awk (renamed from test/psx96sub.awk)0
-rw-r--r--test/posix2008sub.ok (renamed from test/psx96sub.ok)2
-rwxr-xr-xtest/range1.awk1
-rw-r--r--test/range1.in2
-rw-r--r--test/range1.ok1
-rw-r--r--test/reg/func2.good2
-rw-r--r--test/sclifin.ok2
-rw-r--r--test/shadow.ok8
-rw-r--r--test/switch2.ok0
-rw-r--r--test/uninit3.ok4
-rw-r--r--test/uninit5.ok7
-rw-r--r--test/unterm.ok2
-rw-r--r--unsupported/atari/ChangeLog4
-rw-r--r--unsupported/tandem/ChangeLog4
-rw-r--r--version.c54
-rw-r--r--version.in52
-rw-r--r--vms/ChangeLog50
-rw-r--r--vms/descrip.mms50
-rw-r--r--vms/gawkmisc.vms11
-rw-r--r--vms/redirect.h50
-rw-r--r--vms/vms-conf.h13
-rw-r--r--vms/vms.h54
-rw-r--r--vms/vms_fwrite.c16
-rw-r--r--vms/vms_misc.c8
-rw-r--r--vms/vms_popen.c14
-rw-r--r--vms/vmsbuild.com33
-rw-r--r--[-rwxr-xr-x]ylwrap0
182 files changed, 53193 insertions, 33189 deletions
diff --git a/COPYING b/COPYING
index 94a9ed02..94a9ed02 100755..100644
--- a/COPYING
+++ b/COPYING
diff --git a/ChangeLog b/ChangeLog
index 35d10bdc..8407ce88 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,405 @@
+Thu Nov 18 16:01:58 2010 Arnold D. Robbins <arnold@skeeve.com>
+
+ * configure.ac: Remove `--enable-portals' option. I don't think
+ anyone ever used it.
+ * io.c (two_way_open): Remove the code for portals.
+
+Tue Nov 16 11:56:31 2010 Arnold D. Robbins <arnold@skeeve.com>
+
+ * version.in: Removed descriptive comments. New features and
+ so on are documented in the documentation and in NEWS.
+
+Mon Nov 15 19:19:25 2010 Arnold D. Robbins <arnold@skeeve.com>
+
+ * awkgram.y (LEX_LENGTH): Removed warning about length with
+ no argument being deprecated.
+ * awkprintf.h: Remove code for sun386. Fix %c to print multibyte
+ character instead of first byte.
+ * builtin.c (sub_common): Update commentary about POSIX.
+ * io.c (nextfile): Add MAYBE_NUM to FILENAME.
+
+Fri Nov 12 11:53:15 2010 Arnold D. Robbins <arnold@skeeve.com>
+
+ * main.c (update_global_values): New routine, needed for correct
+ operation of --dump-variables.
+ * awk.h: Declared it.
+ * awkgram.y (get_varlist): Call it.
+ Thanks to Hermann Peifer <peifer@gmx.eu> for the bug report.
+
+ * debug.c (find_subscript): Initialize `r' to NULL, per
+ Michal Jaegermann.
+
+Thu Nov 11 16:31:49 2010 Arnold D. Robbins <arnold@skeeve.com>
+
+ * awk.h: Restore decls of strcasecmp, strncasecmp.
+ * builtin.c: Lots of general cleanups.
+ (sub_common): Actually enable POSIX rules! (Wasn't done right
+ earlier.)
+
+Thu Nov 4 14:08:29 2010 Arnold D. Robbins <arnold@skeeve.com>
+
+ * array.c, awkgram.y, awkprintf.h, builtin.c, debug.c, eval.c,
+ field.c, io.c, main.c, node.c, profile.c, re.c: Remove register
+ keyword everywhere.
+ * node.c: Minor code cleanups.
+
+Wed Nov 3 08:29:15 2010 Arnold D. Robbins <arnold@skeeve.com>
+
+ * node.c (free_wstr): If argument is null string or null field,
+ return. Thanks to Vojtech Vitek <vvitek@redhat.com>
+
+Tue Nov 2 16:45:06 2010 Arnold D. Robbins <arnold@skeeve.com>
+
+ Straighten out options more. --lint --> -L, --lint-old --> -t
+
+ * main.c (optlist, optab, main, usage): Adjusted approrpiately.
+
+ Other:
+ * awk.h: Lots more general cleanup.
+ * builtin.c (strncasecmpmbs): Move mbstate vars into the routine.
+ * awk.h (strncasecmpmbs): Adjust declaration.
+ * eval.c (cmp_nodes): Adjust call.
+ * awkgram.y, command.y: Remove unused variables.
+
+Mon Nov 1 21:55:26 2010 Arnold D. Robbins <arnold@skeeve.com>
+
+ * main.c (optlist, optab, main): Renamed -l option to -t
+ so can eventually merge in xgawk's -l option.
+ (usage): Adjusted approrpiately.
+
+Mon Nov 1 16:23:52 2010 Arnold D. Robbins <arnold@skeeve.com>
+
+ * array.c, awk.h, custom.h, eval.c, gawkmisc.c, io.c, main.c,
+ protos.h, replace.c: Remove code related to: __amigaos__,
+ atarist, BeOS, _MSC_VER, MSDOS, TANDOM, WIN32, and anything
+ not for __STDC__.
+
+Sun Oct 31 21:49:22 2010 Arnold D. Robbins <arnold@skeeve.com>
+
+ * awk.h: Start on cleaning up. Remove stuff for DOS, WIN32,
+ TANDEM, atarist, NeXT even!
+
+Sun Oct 31 05:56:23 2010 John Haque <j.eh@mchsi.com>
+
+ Add array of arrays.
+
+ * awk.h (Op_sub_array): New opcode.
+ (POP_SCALAR, TOP_SCALAR): New macros. If the item is not a scalar,
+ make it a fatal error.
+ (POP_STRING, TOP_STRING): Use POP_SCALAR and TOP_SCALAR instead
+ of POP and TOP.
+ (force_string, force_number): Unrelated: simplify (remove) macros
+ for older gcc and non-gcc compilers.
+ * awkgram.y (grammar): New non-terminals for array subscripts.
+ delete array subscripts are handled differently than array subscripts
+ used as a variable.
+ (SUBSCRIPT): New terminal symbol to indicate end of subscripts.
+ (yylex): Return SUBSCRIPT after all the subscripts has been read.
+ (rules variable, LEX_DELETE and LEX_FOR): Adapt to these changes.
+ (sub_counter): New global to count the number of subscripts in a
+ delete statement.
+ (optimize_assignment): Adjust code for assignment to an array element.
+ * array.c (make_aname): New function to construct a sub-array name.
+ (get_array): Handle Node_val in the default case.
+ (concat_exp): Issue fatal error message if each expression is not a
+ scalar.
+ (assoc_clear): Recursively clear sub-arrays.
+ (do_delete, assoc_dump, assoc_sort_inplace, dup_table):
+ Handle array of arrays.
+ * builtin.c: Replace POP with POP_SCALAR as appropriate.
+ * eval.c (optypes): Add entry for Op_sub_array.
+ (r_interpret): Handle Op_sub_array. For case Op_subscript, increment
+ reference count only if the result is a scalar. If type is not a
+ scalar in Op_subscript_lhs, make it fatal. Adjust stack pointer
+ after a call to do_delete in Op_K_delete. Change POP(TOP)
+ to POP_SCALAR(TOP_SCALAR) as needed.
+ * profile.c (pprint): Add case for Op_sub_array.
+ * command.y (grammar): New non-terminals and rules to handle
+ array of arrays.
+ * debug.c (struct list_item): Redesigned. Field subs is NODE ** now,
+ new fields num_subs and sname. New flags OLD_IS_ARRAY and CUR_IS_ARRAY;
+ removed flag ARRAY_WATCH. Renamed macro IS_ARRAY() to WATCHING_ARRAY.
+ (do_info): Adapt to the structural changes in cases A_WATCH and
+ A_DISPLAY.
+ (print_array): New function to print contents of an array.
+ (print_subscript): New function to print an element of an array.
+ (do_print_var): Use the new functions to print an array element
+ and contents.
+ (do_set_var): Adapt to the structural changes in list_item for
+ an array element.
+ (delete_item, do_add_item, display): Ditto.
+ (add_item): Ditto. Use field symbol, not subs to store field number and
+ adjust accordingly everywhere.
+ Unrelated: handle function parameter correctly, watch and display now
+ prints the param name instead of the actual array name.
+ (find_subscript): New function.
+ (initialize_watch_item): Use the new function find_subscript
+ to locate an array element NODE.
+ (watchpoint_triggered): Redone.
+ (cmp_val): Redone.
+ (print_watch_code): Adjust code for printing subscript.
+ (print_instruction): Add case for Op_sub_array.
+ (serialize_subscript): New function.
+ (serialize): Use the new function to serialize watch and display
+ subscripts.
+ (unserialize_list_item): Adapt to the structural changes. Also,
+ simplify code.
+ (do_print_f): Redo code for printting array element.
+ (pre_execute_code, execute_code): Change POP to POP_SCALAR.
+
+ Unrelated:
+
+ * debug.c (unserialize_commands): New function for common code in
+ unserialize_breakpoint and unserialize_list_item.
+ (unserialize_breakpoint and unserialize_list_item): Use the new
+ function.
+
+ * awkgram.y (grammar): Do not terminate parser if seen an empty(NULL)
+ subscript. Install null string as subscript and continue parsing.
+ (variable): Do not terminate parser if type is Node_func, change it
+ to Node_var_new temporarily. Simplifies grammar and allows parser to
+ continue.
+
+ * command.y (yylex): Add history entry when blank line repeats
+ previous command.
+
+ * debug.c (pp_args): Removed. Pretty-printing SUBSEP
+ seperated indexes can not be made to work reasonably in all cases.
+ (struct list_item): Removed field pp_subs.
+ (concat_args): Move to file command.y.
+ * command.y (grammar): Concatenate SUPSEP seperated indexes.
+
+Thu Oct 28 16:25:08 2010 Arnold D. Robbins <arnold@skeeve.com>
+
+ Remove use of varargs.h everywhere:
+
+ * awkgram.y (yyerror): Fixed.
+ * awk.h [CAN_USE_STADARG_H]: Removed, #error added if not available.
+ (snprintf, Func_print, msg, error, warning): Fix declarations.
+ * cmd.h (gprintf, d_error): Fix declaration.
+ * command.y (yyerror): Fixed.
+ * debug.c (d_error, gprintf): Fixed code.
+ * main.c (lintfunc): Fix declaration.
+ * msg.c (msg, warnning, error, r_fatal): Fixed code.
+
+Wed Oct 27 16:45:29 2010 Arnold D. Robbins <arnold@skeeve.com>
+
+ * awk.h [P]: Finally, nuked the `P' macro. Removed definitions
+ and uses.
+ [HAVE_DOPRNT]: Removed check for this, now require vfprintf.
+ [BELL]: Nuked; require a compiler that supports '\a'.
+ * array.c, awkgram.y, awkprintf.h, builtin.c, cmd.h, command.y,
+ debug.c, eval.c, ext.c, field.c, io.c, main.c, protos.h [P]:
+ Remove all uses.
+ * node.c (r_force_number): Change check with strtod to `ptr == cpend',
+ SunOS 3.5 compatibility no longer concerns us. Removed the comment.
+ [P]: Removed all uses.
+ (parse_escape): Change from BELL to '\a'.
+ * profile.c (pp_string): Change from BELL to '\a'.
+ [P]: Removed all uses.
+
+Tue Oct 26 20:11:37 2010 Arnold D. Robbins <arnold@skeeve.com>
+
+ * awkgram.y (fix_break_continue): New routine to make break and
+ continue instructions point to where they should jump to. Adjusted
+ grammar to call it for switch and loops.
+ * eval.c (r_interpret): For Op_K_break and Op_K_continue, jump
+ to pc->target_jmp.
+ * command.y (cmdtab, do_help): Translate the help messages.
+ * debug.c (option_list, option_help): Translate the help messages.
+ Elsewhere, clean up / add calls to gettext.
+
+Fri Oct 22 11:18:29 2010 Arnold D. Robbins <arnold@skeeve.com>
+
+ * ChangeLog: Merged with ChangeLog.BYTECODE.
+ * Makefile.am (EXTRA_DIST): Removed ChangeLog.BYTECODE.
+ * ChangeLog.BYTECODE: Removed the file.
+
+Thu Oct 21 12:16:35 2010 Arnold D. Robbins <arnold@skeeve.com>
+
+ Make break and continue outside a loop not allowed at all,
+ even with --traditional, as BWK awk no longer allows this.
+
+ * eval.c (r_interpret): For Op_K_break and Op_K_continue, make
+ them fatal errors if not in a loop.
+ * awkgram.y (break_allowed, continue_allowed): New variables.
+ [BREAK, CONTINUE]: New flags for tokentab.
+ (yylex): If set, increment the corresponding variable.
+ (Grammar): Test variables when break/continue seen, decrement them
+ at the end of productions for loops and switch.
+
+Tue Oct 19 20:03:29 2010 Arnold D. Robbins <arnold@skeeve.com>
+
+ * main.c (optab, usage): Remove --compat, --copyleft, and --usage extra
+ option aliases.
+
+Tue Oct 19 08:25:02 2010 Arnold D. Robbins <arnold@skeeve.com>
+
+ * awkprintf.h (r_format_arg): Undouble "%" characters in
+ error messages. Thanks to Scott Deifik for catching the problem.
+
+Sat Oct 16 22:08:54 2010 Arnold Robbins <arnold@skeeve.com>
+
+ Apply changes from John Haque:
+
+ * awk.h [ASSIGNED]: Remove unused flag.
+ (Op_cond_pair_left): Remove.
+ * debug.c (print_instruction): Remove Op_cond_pair_left.
+ (do_trace_instruction): Fix print for Op_newfile.
+ (parse_condition): Improve code.
+ * eval.c (optypes): Add space to string for "!".
+ (r_interpret): Remove Op_cond_pair_left and Node_instruction cases.
+ Revise Op_cond_pair to handle left and right sides correctly.
+ Simple code fixes in some other cases.
+ * profile.c (pprint): Remove Op_cond_pair_left. Simplify Op_not.
+
+Fri Oct 15 14:17:09 2010 Arnold Robbins <arnold@skeeve.com>
+
+ * awk.h (Op_cond_pair_left): New op for left side of condition pair.
+ * debug.c (print_instruction): Support it.
+ * profile.c (pprint): Ditto.
+ * eval.c (r_interpret): Split Op_cond_pair into two cases; they have
+ to be handled differently.
+
+Wed Oct 13 19:17:03 2010 Arnold D. Robbins <arnold@skeeve.com>
+
+ * regex.h [RE_SYNTAX_AWK]: Add RE_CHAR_CLASSES, for compatibility
+ with modern Unix awk.
+
+Sun Oct 10 15:31:01 2010 Arnold D. Robbins <arnold@skeeve.com>
+
+ * re.c (dfawarn): Do nothing in body, since gawk does it's
+ own checking.
+
+Sun Oct 10 15:30:34 2010 Arnold D. Robbins <arnold@skeeve.com>
+
+ MERGE with bytecode version! Many many files changed / added.
+
+Sun Oct 3 08:41:25 2010 John Haque <j.eh@mchsi.com>
+
+ * Lots of files: Indirect function call, FPAT, BEGINFILE/ENDFILE
+ from gawk-devel.
+
+ * awk.h (defrule): New enum for rule types.
+ (ruletab): Converts rule types to string constants.
+ * awkgram.y: Use rule types to simplify code in grammar.
+ * eval.c, debug.c, profile.c, awkgram.y routines: Update to use ruletab.
+
+ * Lots of files: New debugger command eval for evaluation of
+ arbitrary (g)awk expression(s).
+ eval "awk statement(s)"
+ OR
+ eval p1, p2
+ > awk statement
+ > more awk statement(s)
+ > end
+ p1, p2 are eval locals.
+ Conditional break/watch point:
+ break 1 "condition expression"
+ OR
+ break 1
+ condition "condition expression"
+
+ * command.y: grammar clean-ups.
+ (find_command): Redo to fix bugs in abbreviation/partial-string
+ search.
+
+ * debug.c (command_source): New structure. Used to manage
+ sources for debugger commands. 'source file' command can now
+ include additional source commands.
+
+ * awk.h: new enum type redirval for I/O redirection types;
+ remove redirection types from OPCODE.
+ * awkgram.y: Adjust grammar for redirection type changes.
+ (yylex, mk_getline): Update for redirection type changes.
+ * io.c (redirect, do_getline): Ditto.
+ * profile.c (redir2str): New function to convert redirection types
+ to string constants.
+ (pprint): Use new function redir2str.
+ * debug.c (print_instruction): Ditto.
+ * eval.c (optypes): Remove redirection types from table.
+
+ * main.c (main): initialize do_optimize to 1, default optimizations.
+ do_optimize > 1 for -O (--optimize) command line option.
+ do_optimize = 0 turns off all optimizations, and is for debugging
+ purposes.
+ * awkgram.y: Updated.
+
+ Lots of other cleanups and improvements.
+
+Thu Sep 16 09:44:47 2010 John Haque <j.eh@mchsi.com>
+
+ Lots of bug fixes & improvements, including work on
+ profiling.
+
+Wed Aug 18 22:15:06 2010 Arnold Robbins <arnold@skeeve.com>
+
+ Lots of files: Sync fully with gawk-stable version, in particular
+ documentation edits and all ChangeLog files.
+
+Mon Aug 9 07:17:54 2010 John Haque <j.eh@mchsi.com>
+
+ Fix the case when runtime stack can have a INSTRUCTION pointer
+ while popping stack items (a next/nextfile statement inside a loop).
+
+ * awk.h: new NODETYPE Node_instruction. Remove instruction pointer
+ from STACK_ITEM union, and all related macros.
+ * eval.c (r_interpret): wrap code (INSTRUCTION) pointer inside
+ a NODE for Op_push_loop. Change Op_pop_loop, Op_K_break
+ and Op_K_continue accordingly.
+ (unwind_stack): free Node_instruction.
+ (nodetypes): add new entry for Node_instruction.
+
+Thu Aug 5 15:05:22 2010 Arnold Robbins <arnold@skeeve.com>
+
+ * awk.h: Remove redundant declaration of struct lconv loc;
+ * awkprintf.h: Move ifdef for HAVE_LOCALE_H inside case '\''.
+ * custom.h: Add macros for setenv and unsetenv for Z/OS.
+ * main.c (main): Remove three argument version for Tiny CC after
+ applying patches to local copy that fix the issue with environ.
+
+Mon Jul 26 07:23:01 2010 John Haque <j.eh@mchsi.com>
+
+ Started Byte Code version ChangeLog.
+
+ * awk.h, eval.c, debug.c, profile.c: Renamed opcode Op_exit to
+ Op_atexit. Simplify exit value handling; use existing global
+ exit_val from main.c.
+ New opcode Op_stop.
+
+ * msg.c: New variables fatal_tag_valid, fatal_tag.
+ (r_fatal): Use these new variables.
+ (err): Change myname from dgawk to gawk when debugging;
+ reflects the correct source of error messages.
+
+ * builtin.c, msg.c: Change stdout to output_fp.
+ (do_fflush): Also flush output_fp if not stdout.
+
+ * command.y (yylex, yyparse): (Much) improved error recovery.
+
+ * awkgram.y (yylex): Add 'goto out' in 'check_special'
+ for do_traditional or do_posix check, lost somewhere
+ between 3.1.3 to 3.1.8.
+ (pop_var): New name remove_symbol to go with mk_symbol.
+ (install): New name install_symbol.
+
+ * debug.c:(set_gawk_output): Improved handling of /dev files
+ including /dev/ttyN, /dev/pts/N.
+ (pre_execute): Renamed execute, a pre_hook in r_interpret.
+ (post_execute): New function, a post_hook in r_interpret;
+ used to detect non-local jumps (next, nextfile, exit)
+ with commands 'until' and 'finish', and to print the
+ returned value for finish.
+ (print_instruction): Redo function params initialization
+ when trace is on. Hopefully, correct this time around.
+ (close_all): New function to close all known files
+ during quit and restart.
+
+ * eval.c(r_interpret): Redefine macro JUMPTO to include
+ post_hook from above, and use it exclusively to move to
+ the next instruction for execution.
+
+ * debug.c (do_run): Trap gawk fatal errors.
Sun Sep 5 12:44:24 2010 Arnold D. Robbins <arnold@skeeve.com>
* re.c (check_bracket_exp): Add `warned' flag to table and adjust
@@ -263,6 +665,119 @@ Thu Aug 16 12:21:28 2001 Arnold D. Robbins <arnold@skeeve.com>
(do_getline): Update them as appropriate.
(do_mark, do_reset): New functions.
+Fri Sep 17 12:42:42 2010 Arnold D. Robbins <arnold@skeeve.com>
+
+ * regcomp.c (btowc): Changed to use mbrtowc.
+
+Wed Sep 15 08:26:55 2010 Arnold D. Robbins <arnold@skeeve.com>
+
+ * dfa.c: Further sync with GNU grep.
+
+Tue Sep 14 09:53:55 2010 Arnold D. Robbins <arnold@skeeve.com>
+
+ * node.c (str2wstr): Per advice from Ulrich Drepper, when converting,
+ if the current byte is isprint, isgraph, iscntrl or zero, then it
+ can't start a multibyte character. This can save many calls to
+ `mbrtowcs', and speed up the conversion considerably.
+
+Mon Sep 13 11:19:21 2010 Arnold D. Robbins <arnold@skeeve.com>
+
+ * dfa.h, dfa.c: Sync with GNU grep.
+ * re.c (dfawarn): New routine for use by dfa.
+
+Sun Sep 12 22:17:02 2010 Arnold D. Robbins <arnold@skeeve.com>
+
+ * profile.c (tree_eval): Fix comment on for ... delete array loop.
+ (pp_string_fp): Get escapes right on regex constant.
+
+Sun Sep 5 20:38:42 2010 John E. Haque <j.eh@mchsi.com>
+
+ * re.c (str2wstr): Decrement src_count when skipping bad bytes.
+
+Fri Aug 27 13:51:13 2010 Arnold D. Robbins <arnold@skeeve.com>
+
+ * dfa.c: Sync with current GNU grep - minor edits only.
+
+Fri Aug 20 16:26:14 2010 Arnold D. Robbins <arnold@skeeve.com>
+
+ * profile.c (tree_eval): Always parenthesize Node_cond_exp.
+ May add a few extra parens but guarantees the right semantics.
+ Thanks to Hermann Peifer <peifer@gmx.eu> for the bug report.
+
+Thu Aug 19 21:35:13 2010 Arnold D. Robbins <arnold@skeeve.com>
+
+ * regex_internal.c (re_string_reconstruct): Move ifdef out to cover
+ variable declarations, to avoid "unused variable" warnings.
+ * regexec.c (check_arrival_add_next_nodes): Bracket declaration of
+ `err' with ifdef for the same reason.
+
+ Thanks to avarab@gmail.com for the suggestions.
+
+Wed Aug 18 22:13:30 2010 Arnold D. Robbins <arnold@skeeve.com>
+
+ * Makefile.am (AUTOMAKE_OPTIONS): Added. Other minor cleanups.
+
+Tue Aug 17 23:27:43 2010 Arnold D. Robbins <arnold@skeeve.com>
+
+ * profile.c (pp_string_fp): Use different sets of escape characters
+ if printing a string or a regex, based on delimiter. Thanks to
+ Hermann Peifer <peifer@gmx.eu> for the bug report.
+
+Sun Aug 8 23:05:09 2010 Arnold D. Robbins <arnold@skeeve.com>
+
+ * re.c (make_regexp): Don't allocate rp->dfareg unless
+ we're using dfa; causes a memory leak otherwise. Thanks to
+ Antonio Columbo for reporting the bug.
+
+Wed Jul 14 23:04:30 2010 Eli Zaretskii <eliz@gnu.org>
+
+ * dfa.c: Include langinfo.h only if HAVE_LANGINFO_CODESET is
+ defined.
+
+Wed Jul 14 23:00:19 2010 Arnold D. Robbins <arnold@skeeve.com>
+
+ * awkgram.y (yylex): Allow a backslash before CR-LF to also
+ work for line continuation, for MS-DOS style source files.
+ Thanks to (Vincent Belaiche) for pointing this out.
+
+Wed Jul 14 22:31:53 2010 Arnold D. Robbins <arnold@skeeve.com>
+
+ * node.c (str2wstr): Keep going if get a bad multibyte sequence.
+ Allows match to give correct answers for RSTART, RLENGTH.
+ Add a lint warning. Correctly set the length of the string
+ based on pointer subtraction.
+
+Wed Jun 16 21:52:09 2010 Arnold D. Robbins <arnold@skeeve.com>
+
+ * awk.h (exec_count): Moved into NODE structure as standalone
+ element since count on `/pat/ { ... }' was wrong. Thanks to
+ Hermann Peifer <peifer@gmx.eu> for the bug report.
+
+ Note to self: DO NOT propogate this to the byte-code version.
+
+ Unrelated:
+
+ * awkgram.y (matchop): Made left associative to match behavior
+ of other awks.
+ (print_expression_list): Simplified so that something like
+ `print ("a", "b") in B in A' will work. Again, to match what
+ other awks do.
+
+Fri Jun 4 15:56:59 2010 Arnold D. Robbins <arnold@skeeve.com>
+
+ * dfa.c: Further merges with GNU grep.
+
+Thu May 20 22:20:32 2010 Stepan Kasal <skasal@redhat.com>
+
+ * Makefile.am [AUTOMAKE_OPTIONS]: Removed, contents now in ...
+ * configure.ac [AM_INIT_AUTOMAKE]: ... here.
+ Added dist-xz while I'm at it, per Karl Berry.
+
+Tue May 18 14:52:04 2010 Marcin Szewczyk <Marcin.Szewczyk@wodny.org>
+
+ * builtin.c (format_tree): Simplify code in pr_tail when multibyte
+ and %s or %d.
+
Thu May 6 20:55:14 2010 Arnold D. Robbins <arnold@skeeve.com>
* Release 3.1.8: Release tar file made.
diff --git a/FUTURES b/FUTURES
index 583756c0..efad1a11 100644
--- a/FUTURES
+++ b/FUTURES
@@ -21,15 +21,15 @@ now, though. :-)
For 3.1.8 + bytecode
====================
- Performance fixes / improvements
+ DONE: Performance fixes / improvements
DONE: Change @sourcefile to @include per awk.info poll
- Document @include
+ DONE: Document @include
- Update copyrights
+ DONE: Update copyrights
- Document dgawk
+ DONE: Document dgawk
For 4.0
=======
@@ -42,11 +42,11 @@ For 4.0
Remove all old README* files.
- ? Remove --copyleft, leaving just --copyright.
+ DONE: Remove --copyleft, leaving just --copyright.
DONE: Enable \s, \S in regexes (regcomp.c and dfa.c) and document them.
- Integrate byte code changes and dgawk
+ DONE: Integrate byte code changes and dgawk
Indirect functions
BEGINFILE, ENDFILE
@@ -61,6 +61,8 @@ For 4.0
DONE: Add IPv6 support.
+ DONE: Add true multidimensional arrays.
+
Gnulib?
Move to git?
@@ -68,20 +70,25 @@ For 4.0
Additional manual features:
Remove all page breaks
Review internal notes about reorganization
- Full front to back read through
+ DONE: Full front to back read through - before editing
+ Full front to back read through - after editing
For 4.1
=======
Implement designed API for loadable modules
- Redo the loadable modules interface from the awk level.
+ Merge xmlgawk -l feature
- ? Move the loadable modules interface to libtool.
+ Merge xmlgawk XML extensions
+
+ Redo the loadable modules interface from the awk level.
Rework management of array index storage. (Partially DONE.)
DBM storage of awk arrays. Try to allow multiple dbm packages.
+ ? Move the loadable modules interface to libtool.
+
? Add an optional base to strtonum, allowing 2-36.
? Optional third argument for index indicating where to start the
diff --git a/Makefile.am b/Makefile.am
index a131c516..774861a9 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -23,10 +23,10 @@
## process this file with automake to produce Makefile.in
-# Automatic de-ANSI-fication if needed, make .bz2 files also.
+# Make .bz2 files also.
AUTOMAKE_OPTIONS = dist-bzip2
-# This undocumented variable insures that aclocal runs
+# This variable insures that aclocal runs
# correctly after changing configure.ac
ACLOCAL_AMFLAGS = -I m4
@@ -36,6 +36,8 @@ AM_MAKEFLAGS = 'CFLAGS=$(CFLAGS)' 'LDFLAGS=$(LDFLAGS)'
# Stuff to include in the dist that doesn't need it's own
# Makefile.am files
EXTRA_DIST = \
+TODO \
+POSIX.NOTES \
COPYING \
FUTURES \
INSTALL \
@@ -75,7 +77,7 @@ SUBDIRS = \
test
# what to make and install
-bin_PROGRAMS = gawk pgawk
+bin_PROGRAMS = gawk pgawk dgawk
# sources for both gawk and pgawk
base_sources = \
@@ -83,6 +85,7 @@ base_sources = \
awk.h \
awkgram.y \
builtin.c \
+ awkprintf.h \
custom.h \
dfa.c \
dfa.h \
@@ -114,9 +117,11 @@ base_sources = \
gawk_SOURCES = $(base_sources) eval.c profile.c
pgawk_SOURCES = $(base_sources) eval_p.c profile_p.c
+dgawk_SOURCES = $(base_sources) eval_d.c profile.c cmd.h command.y debug.c
# Get extra libs as needed, Automake will supply LIBINTL and SOCKET_LIBS.
LDADD = $(LIBSIGSEGV) $(LIBINTL) $(SOCKET_LIBS)
+dgawk_LDADD = $(LDADD) @LIBREADLINE@
# Directory for gawk's data files. Automake supplies datadir.
pkgdatadir = $(datadir)/awk
@@ -165,9 +170,11 @@ dist-hook:
cd $(distdir) ; find . -type d -name CVS | xargs rm -fr
# Special rules for individual files
+# Use of awk instead of $(AWK) is deliberate, in case gawk doesn't build
+# or work correctly.
awkgram.c: awkgram.y
$(YACC) $(AM_YFLAGS) $(YFLAGS) $<
- sed 's/parse error/syntax error/g' < y.tab.c | $(AWK) -f $(srcdir)/bisonfix.awk > $*.c && rm y.tab.c
+ sed 's/parse error/syntax error/g' < y.tab.c | awk -f $(srcdir)/bisonfix.awk awkgram > $*.c && rm y.tab.c
if test -f y.tab.h; then \
if cmp -s y.tab.h $*.h; then rm -f y.tab.h; else mv y.tab.h $*.h; fi; \
else :; fi
@@ -175,6 +182,10 @@ awkgram.c: awkgram.y
version.c: config.status version.in
$(SHELL) ./config.status --file=version.c:version.in
+command.c: command.y
+ $(YACC) -p zz $<
+ sed 's/parse error/syntax error/g' < y.tab.c | awk -f $(srcdir)/bisonfix.awk command > $*.c && rm y.tab.c
+
# This is for my development & testing.
efence: gawk
$(CC) $(LDFLAGS) -o gawk $$(ls *.o | grep -v '_p.o$$') $(LIBS) -lefence
@@ -184,5 +195,5 @@ diffout valgrind-scan:
valgrind:
cd test; rm -f log.[0-9]*; \
- make check AWK="valgrind --log-file=log ../gawk"; \
+ make check AWK="valgrind --leak-check=full --log-file=log.%p ../gawk"; \
make valgrind-scan
diff --git a/Makefile.in b/Makefile.in
index 3a75f199..fa8c54b8 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -56,13 +56,14 @@ PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
-bin_PROGRAMS = gawk$(EXEEXT) pgawk$(EXEEXT)
+bin_PROGRAMS = gawk$(EXEEXT) pgawk$(EXEEXT) dgawk$(EXEEXT)
subdir = .
DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \
$(srcdir)/Makefile.in $(srcdir)/configh.in \
$(top_srcdir)/configure ABOUT-NLS AUTHORS COPYING ChangeLog \
- INSTALL NEWS awkgram.c config.guess config.rpath config.sub \
- depcomp install-sh missing mkinstalldirs ylwrap
+ INSTALL NEWS TODO awkgram.c command.c config.guess \
+ config.rpath config.sub depcomp install-sh missing \
+ mkinstalldirs ylwrap
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/arch.m4 \
$(top_srcdir)/m4/codeset.m4 $(top_srcdir)/m4/gettext.m4 \
@@ -73,9 +74,9 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/arch.m4 \
$(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libsigsegv.m4 \
$(top_srcdir)/m4/longlong.m4 $(top_srcdir)/m4/nls.m4 \
$(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \
- $(top_srcdir)/m4/socket.m4 $(top_srcdir)/m4/stdint_h.m4 \
- $(top_srcdir)/m4/uintmax_t.m4 $(top_srcdir)/m4/ulonglong.m4 \
- $(top_srcdir)/configure.ac
+ $(top_srcdir)/m4/readline.m4 $(top_srcdir)/m4/socket.m4 \
+ $(top_srcdir)/m4/stdint_h.m4 $(top_srcdir)/m4/uintmax_t.m4 \
+ $(top_srcdir)/m4/ulonglong.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
@@ -92,10 +93,16 @@ am__objects_1 = array.$(OBJEXT) awkgram.$(OBJEXT) builtin.$(OBJEXT) \
getopt1.$(OBJEXT) io.$(OBJEXT) main.$(OBJEXT) msg.$(OBJEXT) \
node.$(OBJEXT) random.$(OBJEXT) re.$(OBJEXT) regex.$(OBJEXT) \
replace.$(OBJEXT) version.$(OBJEXT)
+am_dgawk_OBJECTS = $(am__objects_1) eval_d.$(OBJEXT) profile.$(OBJEXT) \
+ command.$(OBJEXT) debug.$(OBJEXT)
+dgawk_OBJECTS = $(am_dgawk_OBJECTS)
+am__DEPENDENCIES_1 =
+am__DEPENDENCIES_2 = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+ $(am__DEPENDENCIES_1)
+dgawk_DEPENDENCIES = $(am__DEPENDENCIES_2)
am_gawk_OBJECTS = $(am__objects_1) eval.$(OBJEXT) profile.$(OBJEXT)
gawk_OBJECTS = $(am_gawk_OBJECTS)
gawk_LDADD = $(LDADD)
-am__DEPENDENCIES_1 =
gawk_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
$(am__DEPENDENCIES_1)
am_pgawk_OBJECTS = $(am__objects_1) eval_p.$(OBJEXT) \
@@ -114,8 +121,8 @@ CCLD = $(CC)
LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
YACCCOMPILE = $(YACC) $(YFLAGS) $(AM_YFLAGS)
YLWRAP = $(top_srcdir)/ylwrap
-SOURCES = $(gawk_SOURCES) $(pgawk_SOURCES)
-DIST_SOURCES = $(gawk_SOURCES) $(pgawk_SOURCES)
+SOURCES = $(dgawk_SOURCES) $(gawk_SOURCES) $(pgawk_SOURCES)
+DIST_SOURCES = $(dgawk_SOURCES) $(gawk_SOURCES) $(pgawk_SOURCES)
RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
html-recursive info-recursive install-data-recursive \
install-dvi-recursive install-exec-recursive \
@@ -163,7 +170,7 @@ am__relativize = \
dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
done; \
reldir="$$dir2"
-DIST_ARCHIVES = $(distdir).tar.gz $(distdir).tar.bz2
+DIST_ARCHIVES = $(distdir).tar.gz $(distdir).tar.bz2 $(distdir).tar.xz
GZIP_ENV = --best
distuninstallcheck_listfiles = find . -type f -print
distcleancheck_listfiles = find . -type f -print
@@ -205,6 +212,7 @@ LDFLAGS = @LDFLAGS@
LIBICONV = @LIBICONV@
LIBINTL = @LIBINTL@
LIBOBJS = @LIBOBJS@
+LIBREADLINE = @LIBREADLINE@
LIBS = @LIBS@
LIBSIGSEGV = @LIBSIGSEGV@
LIBSIGSEGV_PREFIX = @LIBSIGSEGV_PREFIX@
@@ -291,10 +299,10 @@ top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
-# Automatic de-ANSI-fication if needed, make .bz2 files also.
+# Make .bz2 files also.
AUTOMAKE_OPTIONS = dist-bzip2
-# This undocumented variable insures that aclocal runs
+# This variable insures that aclocal runs
# correctly after changing configure.ac
ACLOCAL_AMFLAGS = -I m4
@@ -304,6 +312,8 @@ AM_MAKEFLAGS = 'CFLAGS=$(CFLAGS)' 'LDFLAGS=$(LDFLAGS)'
# Stuff to include in the dist that doesn't need it's own
# Makefile.am files
EXTRA_DIST = \
+TODO \
+POSIX.NOTES \
COPYING \
FUTURES \
INSTALL \
@@ -350,6 +360,7 @@ base_sources = \
awk.h \
awkgram.y \
builtin.c \
+ awkprintf.h \
custom.h \
dfa.c \
dfa.h \
@@ -381,9 +392,11 @@ base_sources = \
gawk_SOURCES = $(base_sources) eval.c profile.c
pgawk_SOURCES = $(base_sources) eval_p.c profile_p.c
+dgawk_SOURCES = $(base_sources) eval_d.c profile.c cmd.h command.y debug.c
# Get extra libs as needed, Automake will supply LIBINTL and SOCKET_LIBS.
LDADD = $(LIBSIGSEGV) $(LIBINTL) $(SOCKET_LIBS)
+dgawk_LDADD = $(LDADD) @LIBREADLINE@
# stuff for compiling gawk/pgawk
DEFPATH = '".$(PATH_SEPARATOR)$(pkgdatadir)"'
@@ -487,6 +500,9 @@ uninstall-binPROGRAMS:
clean-binPROGRAMS:
-test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS)
+dgawk$(EXEEXT): $(dgawk_OBJECTS) $(dgawk_DEPENDENCIES)
+ @rm -f dgawk$(EXEEXT)
+ $(LINK) $(dgawk_OBJECTS) $(dgawk_LDADD) $(LIBS)
gawk$(EXEEXT): $(gawk_OBJECTS) $(gawk_DEPENDENCIES)
@rm -f gawk$(EXEEXT)
$(LINK) $(gawk_OBJECTS) $(gawk_LDADD) $(LIBS)
@@ -503,8 +519,11 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/array.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/awkgram.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/builtin.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/command.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/debug.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dfa.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eval.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eval_d.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eval_p.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ext.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/field.Po@am__quote@
@@ -756,7 +775,6 @@ dist-bzip2: distdir
dist-lzma: distdir
tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma
$(am__remove_distdir)
-
dist-xz: distdir
tardir=$(distdir) && $(am__tar) | xz -c >$(distdir).tar.xz
$(am__remove_distdir)
@@ -777,6 +795,7 @@ dist-zip: distdir
dist dist-all: distdir
tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2
+ tardir=$(distdir) && $(am__tar) | xz -c >$(distdir).tar.xz
$(am__remove_distdir)
# This target untars the dist file and tries a VPATH configuration. Then
@@ -890,6 +909,7 @@ maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
-rm -f awkgram.c
+ -rm -f command.c
-test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
clean: clean-recursive
@@ -1018,9 +1038,11 @@ dist-hook:
cd $(distdir) ; find . -type d -name CVS | xargs rm -fr
# Special rules for individual files
+# Use of awk instead of $(AWK) is deliberate, in case gawk doesn't build
+# or work correctly.
awkgram.c: awkgram.y
$(YACC) $(AM_YFLAGS) $(YFLAGS) $<
- sed 's/parse error/syntax error/g' < y.tab.c | $(AWK) -f $(srcdir)/bisonfix.awk > $*.c && rm y.tab.c
+ sed 's/parse error/syntax error/g' < y.tab.c | awk -f $(srcdir)/bisonfix.awk awkgram > $*.c && rm y.tab.c
if test -f y.tab.h; then \
if cmp -s y.tab.h $*.h; then rm -f y.tab.h; else mv y.tab.h $*.h; fi; \
else :; fi
@@ -1028,6 +1050,10 @@ awkgram.c: awkgram.y
version.c: config.status version.in
$(SHELL) ./config.status --file=version.c:version.in
+command.c: command.y
+ $(YACC) -p zz $<
+ sed 's/parse error/syntax error/g' < y.tab.c | awk -f $(srcdir)/bisonfix.awk command > $*.c && rm y.tab.c
+
# This is for my development & testing.
efence: gawk
$(CC) $(LDFLAGS) -o gawk $$(ls *.o | grep -v '_p.o$$') $(LIBS) -lefence
@@ -1037,7 +1063,7 @@ diffout valgrind-scan:
valgrind:
cd test; rm -f log.[0-9]*; \
- make check AWK="valgrind --log-file=log ../gawk"; \
+ make check AWK="valgrind --leak-check=full --log-file=log.%p ../gawk"; \
make valgrind-scan
# Tell versions [3.59,3.63) of GNU make to not export all variables.
diff --git a/NEWS b/NEWS
index eca568e5..c87c9a20 100644
--- a/NEWS
+++ b/NEWS
@@ -5,13 +5,14 @@
are permitted in any medium without royalty provided the copyright
notice and this notice are preserved.
-Changes from xxxx to 4.0.0
---------------------------
+Changes from 3.1.8 to 4.0.0
+---------------------------
1. The special files /dev/pid, /dev/ppid, /dev/pgrpid and /dev/user are
now completely gone. Use PROCINFO instead.
-2. The POSIX 2001 behavior for `sub' and `gsub' are now the default.
+2. The POSIX 2008 behavior for `sub' and `gsub' are now the default.
+ THIS CHANGES BEHAVIOR!!!!
3. The \s and \S escape sequences are now recognized in regular expressions.
@@ -49,6 +50,21 @@ Changes from xxxx to 4.0.0
16. Added a warning for /[:space:]/ that should be /[[:space:]]/.
+17. Merged with John Haque's byte code internals. Adds dgawk debugger and
+ possibly improved performance.
+
+18. `break' and `continue' are no longer valid outside a loop, even with
+ --traditional.
+
+19. POSIX character classes work, even with --traditional (BWK awk supports
+ them).
+
+20. Nuked redundant --compat, --copyleft, and --usage long options.
+
+21. Arrays of arrays added.
+
+22. Many code cleanups. Removed code for many old, unsupported systems.
+
Changes from 3.1.7 to 3.1.8
---------------------------
1. The zero flag no longer applies to %c and %s; apparently the standards
diff --git a/POSIX.NOTES b/POSIX.NOTES
new file mode 100644
index 00000000..5840e309
--- /dev/null
+++ b/POSIX.NOTES
@@ -0,0 +1,25 @@
+15 November 2010
+----------------
+
+1. POSIX leaves undefined what happens for something like
+
+ awk '{ print ; exit }' if=42 /etc/passwd
+
+ Mawk diagnoses this. Gawk and BWK awk do not.
+
+2. String comparison with <, <= etc is supposed to take the local collating
+ sequence into account. Gawk currently doesn't. This is exacerbated
+ by the fact that the standard routines all want zero-terminated
+ strings to work on.
+
+3. For printf %c, when passing a numeric value, it is converted to
+ a character and printed. I suspect that it should be converted
+ to a wide-character and then that wide character's multibyte
+ encoding should be printed.
+
+ Similarly, when given a string, only the first character of the
+ string should be printed. Right now it only prints the first byte.
+
+4. Plain `length' is no longer marked obsolescent; the doc needs updating.
+
+5. The POSIX.STD file needs updating.
diff --git a/README_d/README.cygwin-dynamic b/README_d/README.cygwin-dynamic
deleted file mode 100644
index 948538fd..00000000
--- a/README_d/README.cygwin-dynamic
+++ /dev/null
@@ -1,88 +0,0 @@
-From: courierdavid@hotmail.com
-Newsgroups: comp.lang.awk
-Subject: Re: Compiling gawk extensions under Cygwin
-Date: 14 Mar 2005 20:47:09 -0800
-Organization: http://groups.google.com
-Lines: 67
-Message-ID: <1110862029.175727.109280@o13g2000cwo.googlegroups.com>
-References: <1e4e8dbe.0501140813.18248833@posting.google.com>
- <u62nb2-pro.ln1@news.heiming.de>
-NNTP-Posting-Host: 194.237.142.24
-Mime-Version: 1.0
-Content-Type: text/plain; charset="iso-8859-1"
-X-Trace: posting.google.com 1110862033 8921 127.0.0.1 (15 Mar 2005 04:47:13 GMT)
-X-Complaints-To: groups-abuse@google.com
-NNTP-Posting-Date: Tue, 15 Mar 2005 04:47:13 +0000 (UTC)
-User-Agent: G2/0.2
-Complaints-To: groups-abuse@google.com
-Injection-Info: o13g2000cwo.googlegroups.com; posting-host=194.237.142.24;
- posting-account=Iz4C5wwAAABx1yG_ft8eEAI99Wu1Tku1
-Path: news.012.net.il!seanews2.seabone.net!newsfeed.albacom.net!news.mailgate.org!newsfeed.stueberl.de!proxad.net!64.233.160.134.MISMATCH!postnews.google.com!o13g2000cwo.googlegroups.com!not-for-mail
-Xref: news.012.net.il comp.lang.awk:21835
-
-Thanks for your help there Michael. I wouldn't have thought of that one
-myself without your help :-)
-
-Anyway - for those who must stick with Cygwin here's a method that
-works using the mingw32 makefiles and some modifications:
-
-Basically you need to extract all exportable symbol names from the
-gawk.exe file into a text file and then create a dummy library file
-which we can link against on Cygwin. You then throw the library file
-away because in reality we use the gawk.exe file as the provider of
-those functions.
-
-1. First grab the gawk source, e.g. gawk-3.1.4.tar.bz2 and decompress
-it.
-2. Move to the gawk-3.1.4 directory you just created.
-3. cp pc/* . (copy the pc directory into the main one)
-4. edit makefile - uncomment lines "DYN_FLAGS", "DYN_EXP", "DYN_OBJ"
-and "DYN_MAKEXP=$(DMEmingw32)
-5. make mingw32 (make a gawk.exe)
-6. run "gcc -o gawk.exe array.o builtin.o eval.o field.o gawkmisc.o
-io.o main.o ext.o msg.o node.o profile.o re.o version.o dlfcn.o
-gawk.exp awkgram.o getid.o popen.o getopt.o getopt1.o dfa.o regex.o
-random.o" (i.e. remove the -s from the compile command from the
-makefile so the symbols are left in gawk.exe)
-
-now export all symbols from gawk.exe into foo.def so that we can put
-these in our library
-7. echo EXPORTS > foo.def
-8. nm gawk.exe | grep -E ' [TBD] _' | sed 's/.* [TBD] _//' >> foo.def
-9. cp foo.def gawkw32.def
-
-build the new library with all symbols included
-10. make mingw32
-
-Now you will see a file "libgawk.a" which you can link against to
-create extensions. For example to build an extension called "file" run:
-
-gcc -shared -dll -DHAVE_CONFIG_H -I . extension/file.c -o file.dll -L .
--lgawk
-
-Then you can load it in gawk using the expression:
-
-extension("./file.dll", "dlload");
-
-You must use the gawk you compiled from source though. It won't work
-with any other gawk unfortunately :-( But that's OK because the
-stripped gawk is not too big in size.
-
-Cheers,
-Dave.
-
-Michael Heiming wrote:
-> In comp.lang.awk David Smith <courierdavid@hotmail.com>:
-> > Has anyone managed to compile gawk extensions (such as "filefuncs")
-> > under Cygwin?
->
-> Solution is pretty simple, install a real OS, Linux/*BSD or any
-> other unix and this and further problems won't happen.
->
-> Good luck
->
-> --
-> Michael Heiming (X-PGP-Sig > GPG-Key ID: EDD27B94)
-> mail: echo zvpunry@urvzvat.qr | perl -pe 'y/a-z/n-za-m/'
-> #bofh excuse 242: Software uses US measurements, but the OS
-> is in metric...
diff --git a/README_d/README.pc b/README_d/README.pc
index a95ada64..12e4279a 100644
--- a/README_d/README.pc
+++ b/README_d/README.pc
@@ -9,8 +9,8 @@ version for Windows 9x/NT, and MSC can be used to build 16-bit versions
for DOS and OS/2. (As of 3.1.2, the MSC version doesn't work, but the
maintainer for it is working on fixing it.)
- The cygwin environment (http://www.cygwin.com) may also be used
-to compile and run gawk under Windows. For cygwin, building and
+ The Cygwin environment (http://cygwin.com) may also be used
+to compile and run gawk under Windows. For Cygwin, building and
installation is the same as under Unix:
tar -xvpzf gawk-3.1.x.tar.gz
@@ -20,7 +20,7 @@ installation is the same as under Unix:
The `configure' step takes a long time, but works otherwise.
******************************** N O T E **********************************
-* The `|&' operator only works when gawk is compiled for cygwin. Neither *
+* The `|&' operator only works when gawk is compiled for Cygwin. Neither *
* socket support nor two-way pipes work in any other Windows environment! *
***************************************************************************
@@ -187,10 +187,10 @@ plus under OS/2 even for command-line programs, native Windows32 versions
may be desired under NT and Win95.
Users interested in Windows32 applications may also wish to examine the
-Cygnus cygwin project at http://sources.redhat.com/cygwin/ or the
-Mingw32 work at http://www.mingw.org. Windows32 gawk will often require
-that utilities run from within gawk be Windows32 (e.g., the tests place this
-requirement on the cat utility).
+Red Hat Cygwin project at http://cygwin.com/ or the Mingw32 work at
+http://www.mingw.org. Windows32 gawk will often require that utilities run
+from within gawk be Windows32 (e.g., the tests place this requirement on the
+cat utility).
3. An sh-like shell may be useful for awk programming (and is essential
@@ -344,7 +344,7 @@ FPU after a program exits, so if Make has SIGFPE unmasked, it crashes."
9. gawk built from the mingw32 and vcWin32 targets continues to have
problems with pipes; in particular, the pipeio1 test fails.
-10. As mentioned above, `|&' only works with cygwin.
+10. As mentioned above, `|&' only works with Cygwin.
Gawk thanks
diff --git a/README_d/README.solaris b/README_d/README.solaris
index c5829643..60b7a42a 100644
--- a/README_d/README.solaris
+++ b/README_d/README.solaris
@@ -5,143 +5,3 @@ not gawk.
Arnold Robbins
arnold@skeeve.com
-
------- Stuff below here is probably only of historical interest ----------
-Solaris Problem #1:
-===================
-From: carson@lehman.com
-Date: Fri, 7 Feb 1997 01:05:58 -0500
-To: arnold@gnu.ai.mit.edu
-Subject: Solaris 2.5.1 x86 bug in gawk-3.0.2
-
-awktab.c has the following bogus logic:
-
-#ifndef alloca
-#ifdef __GNUC__
-#define alloca __builtin_alloca
-#else /* not GNU C. */
-#if (!defined (__STDC__) && defined (sparc)) || defined (__sparc__) || defined (__sparc) || defined (__sgi)
-#include <alloca.h>
-#else /* not sparc */
-
-Solaris x86 obviously dosn't define sparc or __sparc.
-
-What you _meant_ to say was:
-
-if (defined(__sun) && defined(__SVR4))
-
-(which identifies Solaris 2.x under both Sun's cc and gcc)
-
---
-Carson Gaspar -- carson@cs.columbia.edu carson@lehman.com
-http://www.cs.columbia.edu/~carson/home.html
-<This is the boring business .sig - no outre sayings here>
-
- * * * * * * *
-
-Solution to Problem #1:
-=======================
-Tue Oct 20 21:25:11 IST 1998
-
-This has been fixed in 3.1.0 with the bisonfix.sed script.
-
-Arnold Robbins
-arnold@skeeve.com
-
-Solaris Problem #2:
-===================
-Tue Apr 13 16:57:45 IDT 1999
-
-There is a known problem in that the `manyfiles' test will fail under
-Solaris if you set your soft limit on the number of file descriptors to
-above 256. This is due to a "feature" of fdopen that an fd must be
-less than 256 (see fdopen(3)).
-
-IMHO this is Sun's problem, not mine.
-
-Arnold Robbins
-arnold@skeeve.com
-
-Solution (a) to Problem #2:
-===========================
-Now fixed in the code via Paul Eggert's 2001-09-0 patch. See the
-ChangeLog.
-
-Solution (b) to Problem #2:
-===========================
-From: Paul Nevai <nevai@math.ohio-state.edu>
-Subject: Re: gawk-3.0.4
-To: arnold@skeeve.com (Aharon Robbins)
-Date: Tue, 6 Jul 1999 09:09:05 -0400 (EDT)
-
-Dear Aharon:
-
-Toda raba. Why don't you add something like that to README_d/README.solaris
-file:
-
-for the SunOS do in
-
-/bin/sh: ulimit -n 256; ulimit -a; make test
-/bin/tcsh: limit descriptors 256; ulimit -a; make test
-
-otherwise "make test" will fail
-
-Shalom, Paul
-
-Aharon Robbins wrote to Paul Nevai:
-# >From the README_d/README.solaris file:
-#
-# Tue Apr 13 16:57:45 IDT 1999
-#
-# There is a known problem in that the `manyfiles' test will fail under
-# Solaris if you set your soft limit on the number of file descriptors to
-# above 256. This is due to a "feature" of fdopen that an fd must be
-# less than 256 (see fdopen(3)).
-#
-# IMHO this is Sun's problem, not mine.
-#
-# Arnold Robbins
-# arnold@skeeve.com
-#
-# Double check your settings with ulimit; I suspect that this is
-# your problem.
-#
-# Thanks,
-#
-# Arnold
-# --
-# Aharon (Arnold) Robbins arnold@skeeve.com [ <<=== NOTE: NEW ADDRESS!! ]
-# P.O. Box 354 Home Phone: +972 8 979-0381 Fax: +1 603 761-6761
-# Nof Ayalon Cell Phone: +972 51 297-545 (See www.efax.com)
-# D.N. Shimshon 99784 Laundry increases exponentially in the
-# ISRAEL number of children. -- Miriam Robbins
-#
-#
-
-
-
-Paul Nevai pali+@osu.edu
-Department of Mathematics nevai@math.ohio-state.edu
-The Ohio State University http://www.math.ohio-state.edu/~nevai/
-231 West Eighteenth Avenue http://www.math.ohio-state.edu/~jat/
-Columbus, Ohio 43210-1174 1-614-292-5310 (Office/Answering Device)
-The United States of America 1-614-292-1479 (Math Dept Fax)
-
-Solaris Problem #3:
-===================
-Sun Feb 9 10:35:51 IST 2003
-
-Certain versions of Sun C give compilation errors under Solaris 5.5, 5.6 and
-possibly later. Here's what I was told:
-
-> We have this version of cc here:
-> cc -V
-> cc: Sun WorkShop 6 update 1 C 5.2 2000/09/11
->
-> Probably, the others use different combinations of OS and CC.
-> A quick fix was this (we use csh-syntax here):
->
-> setenv CC "/opt/SUNWspro/bin/cc -Xc"
-> ./configure
-> make check
-
diff --git a/TODO b/TODO
new file mode 100644
index 00000000..cadb70b2
--- /dev/null
+++ b/TODO
@@ -0,0 +1,61 @@
+FIX regular field splitting to use FPAT algorithm.
+
+Add in gawk/mp
+
+Document env vars.
+
+Design and implement I/O plugin API.
+
+Implement C function call API per man pages
+
+xgawk features (@load, -l, others)
+Make a git repository!
+Xfer it to savannah
+Tag last CVS revisions
+Remove treatment of CVS directories from makefiles (awklib, check others)
+# Review POSIX standard
+Fix issues related to POSIX
+Revise FS splitting to use FPAT algorithm
+Add tests for pgawk
+Add tests for patches in emails
+Add doc fix in email
+# Update debugger chapter with new features
+Add debugger commands to reference card
+Remove obsolete directories
+Remove all obsolete README files
+Update bootstrap.sh and README.CVS types of files
+Review all FIXME and TODO comments
+
+# Check on strftime %e with porters.
+
+Code Review:
+array.c
+awkprintf.h
+cmd.h
+command.c
+command.y
+custom.h
+debug.c
+eval.c
+ext.c
+field.c
+floatcomp.c
+floatmagic.h
+gawkmisc.c
+hard-locale.h
+io.c
+main.c
+profile.c
+protos.h
+re.c
+
+DONE:
+awkgram.y
+awk.h
+builtin.c
+node.c
+mbsupport.h
+xalloc.h
+version.c
+replace.c
+msg.c
diff --git a/aclocal.m4 b/aclocal.m4
index cdef210e..fed150f7 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -992,6 +992,7 @@ m4_include([m4/longlong.m4])
m4_include([m4/nls.m4])
m4_include([m4/po.m4])
m4_include([m4/progtest.m4])
+m4_include([m4/readline.m4])
m4_include([m4/socket.m4])
m4_include([m4/stdint_h.m4])
m4_include([m4/uintmax_t.m4])
diff --git a/array.c b/array.c
index dc78c27f..6d1468b0 100644
--- a/array.c
+++ b/array.c
@@ -42,14 +42,17 @@ static int AVG_CHAIN_MAX = 2; /* 11/2002: Modern machines are bigger, cut this d
#include "awk.h"
-static NODE *assoc_find P((NODE *symbol, NODE *subs, unsigned long hash1));
-static void grow_table P((NODE *symbol));
+static size_t SUBSEPlen;
+static char *SUBSEP;
-static unsigned long gst_hash_string P((const char *str, size_t len, unsigned long hsize, size_t *code));
-static unsigned long scramble P((unsigned long x));
-static unsigned long awk_hash P((const char *s, size_t len, unsigned long hsize, size_t *code));
+static NODE *assoc_find(NODE *symbol, NODE *subs, unsigned long hash1);
+static void grow_table(NODE *symbol);
-unsigned long (*hash)P((const char *s, size_t len, unsigned long hsize, size_t *code)) = awk_hash;
+static unsigned long gst_hash_string(const char *str, size_t len, unsigned long hsize, size_t *code);
+static unsigned long scramble(unsigned long x);
+static unsigned long awk_hash(const char *s, size_t len, unsigned long hsize, size_t *code);
+
+unsigned long (*hash)(const char *s, size_t len, unsigned long hsize, size_t *code) = awk_hash;
/* array_init --- possibly temporary function for experimentation purposes */
@@ -71,60 +74,6 @@ array_init()
}
/*
- * get_actual --- proceed to the actual Node_var_array,
- * change Node_var_new to an array.
- * If canfatal and type isn't good, die fatally,
- * otherwise return the final actual value.
- */
-
-NODE *
-get_actual(NODE *symbol, int canfatal)
-{
- int isparam = (symbol->type == Node_param_list
- && (symbol->flags & FUNC) == 0);
- NODE *save_symbol = symbol;
-
- if (isparam) {
- save_symbol = symbol = stack_ptr[symbol->param_cnt];
- if (symbol->type == Node_array_ref)
- symbol = symbol->orig_array;
- }
-
- switch (symbol->type) {
- case Node_var_new:
- symbol->type = Node_var_array;
- symbol->var_array = NULL;
- /* fall through */
- case Node_var_array:
- break;
-
- case Node_array_ref:
- case Node_param_list:
- if ((symbol->flags & FUNC) == 0)
- cant_happen();
- /* else
- fall through */
-
- default:
- /* notably Node_var but catches also e.g. FS[1] = "x" */
- if (canfatal) {
- if ((symbol->flags & FUNC) != 0)
- fatal(_("attempt to use function `%s' as an array"),
- save_symbol->vname);
- else if (isparam)
- fatal(_("attempt to use scalar parameter `%s' as an array"),
- save_symbol->vname);
- else
- fatal(_("attempt to use scalar `%s' as array"),
- save_symbol->vname);
- } else
- break;
- }
-
- return symbol;
-}
-
-/*
* array_vname --- print the name of the array
*
* Returns a pointer to a statically maintained dynamically allocated string.
@@ -139,15 +88,13 @@ get_actual(NODE *symbol, int canfatal)
#define MAX_LEN 0
char *
-array_vname(register const NODE *symbol)
+array_vname(const NODE *symbol)
{
- if (symbol->type == Node_param_list)
- symbol = stack_ptr[symbol->param_cnt];
-
+ static char *message = NULL;
+
if (symbol->type != Node_array_ref || symbol->orig_array->type != Node_var_array)
return symbol->vname;
else {
- static char *message = NULL;
static size_t msglen = 0;
char *s;
size_t len;
@@ -256,50 +203,165 @@ array_vname(register const NODE *symbol)
}
#undef MAX_LEN
+/* make_aname --- construct a sub-array name for multi-dimensional array */
+
+char *
+make_aname(NODE *array, NODE *subs)
+{
+ static char *aname = NULL;
+ static size_t aname_len;
+ size_t slen;
+
+ slen = strlen(array->vname) + subs->stlen + 6;
+ if (aname == NULL) {
+ emalloc(aname, char *, slen, "make_aname");
+ aname_len = slen;
+ } else if (slen > aname_len) {
+ erealloc(aname, char *, slen, "make_aname");
+ aname_len = slen;
+ }
+ sprintf(aname, "%s[\"%.*s\"]", array->vname, (int) subs->stlen, subs->stptr);
+ return aname;
+}
+
+
+/*
+ * get_array --- proceed to the actual Node_var_array,
+ * change Node_var_new to an array.
+ * If canfatal and type isn't good, die fatally,
+ * otherwise return the final actual value.
+ */
+
+NODE *
+get_array(NODE *symbol, int canfatal)
+{
+ NODE *save_symbol = symbol;
+ int isparam = FALSE;
+
+ if (symbol->type == Node_param_list && (symbol->flags & FUNC) == 0) {
+ save_symbol = symbol = GET_PARAM(symbol->param_cnt);
+ isparam = TRUE;
+ if (symbol->type == Node_array_ref)
+ symbol = symbol->orig_array;
+ }
+
+ switch (symbol->type) {
+ case Node_var_new:
+ symbol->type = Node_var_array;
+ symbol->var_array = NULL;
+ /* fall through */
+ case Node_var_array:
+ break;
+
+ case Node_array_ref:
+ case Node_param_list:
+ if ((symbol->flags & FUNC) == 0)
+ cant_happen();
+ /* else
+ fall through */
+
+ default:
+ /* notably Node_var but catches also e.g. FS[1] = "x" */
+ if (canfatal) {
+ if (symbol->type == Node_val)
+ fatal(_("attempt to use a scalar value as array"));
+
+ if ((symbol->flags & FUNC) != 0)
+ fatal(_("attempt to use function `%s' as an array"),
+ save_symbol->vname);
+ else if (isparam)
+ fatal(_("attempt to use scalar parameter `%s' as an array"),
+ save_symbol->vname);
+ else
+ fatal(_("attempt to use scalar `%s' as array"),
+ save_symbol->vname);
+ } else
+ break;
+ }
+
+ return symbol;
+}
+
+
+/* set_SUBSEP --- update SUBSEP related variables when SUBSEP assigned to */
+
+void
+set_SUBSEP()
+{
+ SUBSEP = force_string(SUBSEP_node->var_value)->stptr;
+ SUBSEPlen = SUBSEP_node->var_value->stlen;
+}
+
/* concat_exp --- concatenate expression list into a single string */
NODE *
-concat_exp(register NODE *tree)
+concat_exp(int nargs, int do_subsep)
{
- register NODE *r;
+ /* do_subsep is false for Node-concat */
+ NODE *r;
char *str;
char *s;
- size_t len;
- int offset;
- size_t subseplen;
- const char *subsep;
-
- if (tree->type != Node_expression_list)
- return force_string(tree_eval(tree));
- r = force_string(tree_eval(tree->lnode));
- if (tree->rnode == NULL)
- return r;
- subseplen = SUBSEP_node->var_value->stlen;
- subsep = SUBSEP_node->var_value->stptr;
- len = r->stlen + subseplen + 2;
- emalloc(str, char *, len, "concat_exp");
- memcpy(str, r->stptr, r->stlen+1);
+ long len; /* NOT size_t, which is unsigned! */
+ size_t subseplen = 0;
+ int i;
+ extern NODE **args_array;
+
+ if (nargs == 1)
+ return POP_STRING();
+
+ if (do_subsep)
+ subseplen = SUBSEPlen;
+
+ len = -subseplen;
+ for (i = 1; i <= nargs; i++) {
+ r = POP();
+ if (r->type == Node_var_array) {
+ while (--i > 0)
+ DEREF(args_array[i]); /* avoid memory leak */
+ fatal(_("attempt to use array `%s' in a scalar context"), array_vname(r));
+ }
+ args_array[i] = force_string(r);
+ len += r->stlen + subseplen;
+ }
+
+ emalloc(str, char *, len + 2, "concat_exp");
+
+ r = args_array[nargs];
+ memcpy(str, r->stptr, r->stlen);
s = str + r->stlen;
- free_temp(r);
- for (tree = tree->rnode; tree != NULL; tree = tree->rnode) {
+ DEREF(r);
+ for (i = nargs - 1; i > 0; i--) {
if (subseplen == 1)
- *s++ = *subsep;
- else {
- memcpy(s, subsep, subseplen+1);
+ *s++ = *SUBSEP;
+ else if (subseplen > 0) {
+ memcpy(s, SUBSEP, subseplen);
s += subseplen;
}
- r = force_string(tree_eval(tree->lnode));
- len += r->stlen + subseplen;
- offset = s - str;
- erealloc(str, char *, len, "concat_exp");
- s = str + offset;
- memcpy(s, r->stptr, r->stlen+1);
+ r = args_array[i];
+ memcpy(s, r->stptr, r->stlen);
s += r->stlen;
- free_temp(r);
+ DEREF(r);
+ }
+
+ return make_str_node(str, len, ALREADY_MALLOCED);
+}
+
+/* ahash_unref --- remove reference to a Node_ahash */
+
+void
+ahash_unref(NODE *tmp)
+{
+ if (tmp == NULL)
+ return;
+
+ assert(tmp->type == Node_ahash);
+
+ if (tmp->ahname_ref > 1)
+ tmp->ahname_ref--;
+ else {
+ efree(tmp->ahname_str);
+ freenode(tmp);
}
- r = make_str_node(str, s - str, ALREADY_MALLOCED);
- r->flags |= TEMP;
- return r;
}
/* assoc_clear --- flush all the values in symbol[] before doing a split() */
@@ -315,12 +377,18 @@ assoc_clear(NODE *symbol)
for (i = 0; i < symbol->array_size; i++) {
for (bucket = symbol->var_array[i]; bucket != NULL; bucket = next) {
next = bucket->ahnext;
- unref(bucket->ahvalue);
- unref(bucket); /* unref() will free the ahname_str */
+ if (bucket->ahvalue->type == Node_var_array) {
+ NODE *r = bucket->ahvalue;
+ assoc_clear(r); /* recursively clear all sub-arrays */
+ efree(r->vname);
+ freenode(r);
+ } else
+ unref(bucket->ahvalue);
+ ahash_unref(bucket); /* unref() will free the ahname_str */
}
symbol->var_array[i] = NULL;
}
- free(symbol->var_array);
+ efree(symbol->var_array);
symbol->var_array = NULL;
symbol->array_size = symbol->table_size = 0;
symbol->flags &= ~ARRAYMAXED;
@@ -329,9 +397,9 @@ assoc_clear(NODE *symbol)
/* awk_hash --- calculate the hash function of the string in subs */
static unsigned long
-awk_hash(register const char *s, register size_t len, unsigned long hsize, size_t *code)
+awk_hash(const char *s, size_t len, unsigned long hsize, size_t *code)
{
- register unsigned long h = 0;
+ unsigned long h = 0;
/*
* This is INCREDIBLY ugly, but fast. We break the string up into
@@ -375,7 +443,7 @@ awk_hash(register const char *s, register size_t len, unsigned long hsize, size_
}
if (len > (8 - 1)) {
- register size_t loop = len >> 3;
+ size_t loop = len >> 3;
do {
HASHC;
HASHC;
@@ -390,7 +458,7 @@ awk_hash(register const char *s, register size_t len, unsigned long hsize, size_
#else /* ! VAXC */
/* "Duff's Device" for those who can handle it */
if (len > 0) {
- register size_t loop = (len + 8 - 1) >> 3;
+ size_t loop = (len + 8 - 1) >> 3;
switch (len & (8 - 1)) {
case 0:
@@ -418,9 +486,9 @@ awk_hash(register const char *s, register size_t len, unsigned long hsize, size_
/* assoc_find --- locate symbol[subs] */
static NODE * /* NULL if not found */
-assoc_find(NODE *symbol, register NODE *subs, unsigned long hash1)
+assoc_find(NODE *symbol, NODE *subs, unsigned long hash1)
{
- register NODE *bucket;
+ NODE *bucket;
const char *s1_str;
size_t s1_len;
NODE *s2;
@@ -451,26 +519,17 @@ assoc_find(NODE *symbol, register NODE *subs, unsigned long hash1)
NODE *
in_array(NODE *symbol, NODE *subs)
{
- register unsigned long hash1;
+ unsigned long hash1;
NODE *ret;
- symbol = get_array(symbol);
+ assert(symbol->type == Node_var_array);
- /*
- * Evaluate subscript first, it could have side effects.
- */
- subs = concat_exp(subs); /* concat_exp returns a string node */
- if (symbol->var_array == NULL) {
- free_temp(subs);
+ if (symbol->var_array == NULL)
return NULL;
- }
+
hash1 = hash(subs->stptr, subs->stlen, (unsigned long) symbol->array_size, NULL);
ret = assoc_find(symbol, subs, hash1);
- free_temp(subs);
- if (ret)
- return ret->ahvalue;
- else
- return NULL;
+ return (ret ? ret->ahvalue : NULL);
}
/*
@@ -485,8 +544,8 @@ in_array(NODE *symbol, NODE *subs)
NODE **
assoc_lookup(NODE *symbol, NODE *subs, int reference)
{
- register unsigned long hash1;
- register NODE *bucket;
+ unsigned long hash1;
+ NODE *bucket;
size_t code;
assert(symbol->type == Node_var_array);
@@ -503,10 +562,8 @@ assoc_lookup(NODE *symbol, NODE *subs, int reference)
hash1 = hash(subs->stptr, subs->stlen,
(unsigned long) symbol->array_size, & code);
bucket = assoc_find(symbol, subs, hash1);
- if (bucket != NULL) {
- free_temp(subs);
+ if (bucket != NULL)
return &(bucket->ahvalue);
- }
}
if (do_lint && reference) {
@@ -542,21 +599,12 @@ assoc_lookup(NODE *symbol, NODE *subs, int reference)
bucket->flags |= MALLOC;
bucket->ahname_ref = 1;
- /* For TEMP node, reuse the storage directly */
- if ((subs->flags & TEMP) != 0) {
- bucket->ahname_str = subs->stptr;
- bucket->ahname_len = subs->stlen;
- bucket->ahname_str[bucket->ahname_len] = '\0';
- subs->flags &= ~TEMP; /* for good measure */
- freenode(subs);
- } else {
- emalloc(bucket->ahname_str, char *, subs->stlen + 2, "assoc_lookup");
- bucket->ahname_len = subs->stlen;
- memcpy(bucket->ahname_str, subs->stptr, subs->stlen);
- bucket->ahname_str[bucket->ahname_len] = '\0';
- }
-
+ emalloc(bucket->ahname_str, char *, subs->stlen + 2, "assoc_lookup");
+ bucket->ahname_len = subs->stlen;
+ memcpy(bucket->ahname_str, subs->stptr, subs->stlen);
+ bucket->ahname_str[bucket->ahname_len] = '\0';
bucket->ahvalue = Nnull_string;
+
bucket->ahnext = symbol->var_array[hash1];
bucket->ahcode = code;
symbol->var_array[hash1] = bucket;
@@ -567,30 +615,43 @@ assoc_lookup(NODE *symbol, NODE *subs, int reference)
/*
* `symbol' is array
- * `tree' is subscript
+ * `nsubs' is no of subscripts
*/
void
-do_delete(NODE *sym, NODE *tree)
+do_delete(NODE *symbol, int nsubs)
{
- register unsigned long hash1;
- register NODE *bucket, *last;
+ unsigned long hash1;
+ NODE *bucket, *last;
NODE *subs;
- register NODE *symbol = get_array(sym);
- if (tree == NULL) { /* delete array */
+ assert(symbol->type == Node_var_array);
+
+#define free_subs(n) do { \
+ NODE *s = PEEK(n - 1); \
+ if (s->type == Node_val) { \
+ (void) force_string(s); /* may have side effects ? */ \
+ DEREF(s); \
+ } \
+} while (--n > 0)
+
+ if (nsubs == 0) { /* delete array */
assoc_clear(symbol);
return;
}
+ /* NB: subscripts are in reverse order on stack */
+ subs = PEEK(nsubs - 1);
+ if (subs->type != Node_val) {
+ if (--nsubs > 0)
+ free_subs(nsubs);
+ fatal(_("attempt to use array `%s' in a scalar context"), array_vname(subs));
+ }
+ (void) force_string(subs);
+
last = NULL; /* shut up gcc -Wall */
hash1 = 0; /* ditto */
- /*
- * Always evaluate subscript, it could have side effects.
- */
- subs = concat_exp(tree); /* concat_exp returns string node */
-
if (symbol->var_array != NULL) {
hash1 = hash(subs->stptr, subs->stlen,
(unsigned long) symbol->array_size, NULL);
@@ -621,28 +682,48 @@ do_delete(NODE *sym, NODE *tree)
if (bucket == NULL) {
if (do_lint)
lintwarn(_("delete: index `%s' not in array `%s'"),
- subs->stptr, array_vname(sym));
- free_temp(subs);
+ subs->stptr, array_vname(symbol));
+ DEREF(subs);
+
+ /* avoid memory leak, free rest of the subs */
+ if (--nsubs > 0)
+ free_subs(nsubs);
return;
}
- free_temp(subs);
+ DEREF(subs);
+ if (bucket->ahvalue->type == Node_var_array) {
+ NODE *r = bucket->ahvalue;
+ do_delete(r, nsubs - 1);
+ if (r->var_array != NULL || nsubs > 1)
+ return;
+ /* else
+ cleared a sub_array, free index */
+ } else if (--nsubs > 0) {
+ /* e.g.: a[1] = 1; delete a[1][1] */
+ free_subs(nsubs);
+ fatal(_("attempt to use scalar `%s[\"%.*s\"]' as an array"),
+ symbol->vname, bucket->ahname_len, bucket->ahname_str);
+ } else
+ unref(bucket->ahvalue);
if (last != NULL)
last->ahnext = bucket->ahnext;
else
symbol->var_array[hash1] = bucket->ahnext;
- unref(bucket->ahvalue);
- unref(bucket); /* unref() will free the ahname_str */
+
+ ahash_unref(bucket); /* unref() will free the ahname_str */
symbol->table_size--;
if (symbol->table_size <= 0) {
- memset(symbol->var_array, '\0',
- sizeof(NODE *) * symbol->array_size);
symbol->table_size = symbol->array_size = 0;
symbol->flags &= ~ARRAYMAXED;
- free((char *) symbol->var_array);
- symbol->var_array = NULL;
+ if (symbol->var_array != NULL) {
+ efree((char *) symbol->var_array);
+ symbol->var_array = NULL;
+ }
}
+
+#undef free_subs
}
/* do_delete_loop --- simulate ``for (iggy in foo) delete foo[iggy]'' */
@@ -654,13 +735,11 @@ do_delete(NODE *sym, NODE *tree)
*/
void
-do_delete_loop(NODE *symbol, NODE *tree)
+do_delete_loop(NODE *symbol, NODE **lhs)
{
long i;
- NODE **lhs;
- Func_ptr after_assign = NULL;
- symbol = get_array(symbol);
+ assert(symbol->type == Node_var_array);
if (symbol->var_array == NULL)
return;
@@ -668,12 +747,9 @@ do_delete_loop(NODE *symbol, NODE *tree)
/* get first index value */
for (i = 0; i < symbol->array_size; i++) {
if (symbol->var_array[i] != NULL) {
- lhs = get_lhs(tree->lnode, & after_assign, FALSE);
unref(*lhs);
*lhs = make_string(symbol->var_array[i]->ahname_str,
symbol->var_array[i]->ahname_len);
- if (after_assign)
- (*after_assign)();
break;
}
}
@@ -701,7 +777,7 @@ grow_table(NODE *symbol)
* just jumping from 8K to 64K.
*/
static const long sizes[] = { 13, 127, 1021, 8191, 16381, 32749, 65497,
-#if ! defined(MSDOS) && ! defined(OS2) && ! defined(atarist)
+#if ! defined(OS2)
131101, 262147, 524309, 1048583, 2097169,
4194319, 8388617, 16777259, 33554467,
67108879, 134217757, 268435459, 536870923,
@@ -748,7 +824,7 @@ grow_table(NODE *symbol)
new[hash1] = chain;
}
}
- free(old);
+ efree(old);
done:
/*
@@ -759,43 +835,43 @@ done:
symbol->array_size = newsize;
}
-/* set_SUBSEP --- make sure SUBSEP always has a string value */
-
-void
-set_SUBSEP(void)
-{
-
- (void) force_string(SUBSEP_node->var_value);
- return;
-}
-
/* pr_node --- print simple node info */
static void
pr_node(NODE *n)
{
if ((n->flags & (NUMCUR|NUMBER)) != 0)
- printf("%g", n->numbr);
+ printf("%s %g p: %p", flags2str(n->flags), n->numbr, n);
else
- printf("%.*s", (int) n->stlen, n->stptr);
+ printf("%s %.*s p: %p", flags2str(n->flags), (int) n->stlen, n->stptr, n);
+}
+
+
+static void
+indent(int indent_level)
+{
+ int k;
+ for (k = 0; k < indent_level; k++)
+ printf("\t");
}
/* assoc_dump --- dump the contents of an array */
NODE *
-assoc_dump(NODE *symbol)
+assoc_dump(NODE *symbol, int indent_level)
{
long i;
NODE *bucket;
+ indent(indent_level);
if (symbol->var_array == NULL) {
printf(_("%s: empty (null)\n"), symbol->vname);
- return tmp_number((AWKNUM) 0);
+ return make_number((AWKNUM) 0);
}
if (symbol->table_size == 0) {
printf(_("%s: empty (zero)\n"), symbol->vname);
- return tmp_number((AWKNUM) 0);
+ return make_number((AWKNUM) 0);
}
printf(_("%s: table_size = %d, array_size = %d\n"), symbol->vname,
@@ -804,41 +880,46 @@ assoc_dump(NODE *symbol)
for (i = 0; i < symbol->array_size; i++) {
for (bucket = symbol->var_array[i]; bucket != NULL;
bucket = bucket->ahnext) {
- printf("%s: I: [len %d <%.*s>] V: [",
+ indent(indent_level);
+ printf("%s: I: [len %d <%.*s> p: %p] V: [",
symbol->vname,
(int) bucket->ahname_len,
(int) bucket->ahname_len,
+ bucket->ahname_str,
bucket->ahname_str);
- pr_node(bucket->ahvalue);
+ if (bucket->ahvalue->type == Node_var_array) {
+ printf("\n");
+ assoc_dump(bucket->ahvalue, indent_level + 1);
+ indent(indent_level);
+ } else
+ pr_node(bucket->ahvalue);
printf("]\n");
}
}
- return tmp_number((AWKNUM) 0);
+ return make_number((AWKNUM) 0);
}
/* do_adump --- dump an array: interface to assoc_dump */
NODE *
-do_adump(NODE *tree)
+do_adump(int nargs)
{
NODE *r, *a;
- a = tree->lnode;
-
+ a = POP();
if (a->type == Node_param_list) {
printf(_("%s: is parameter\n"), a->vname);
- a = stack_ptr[a->param_cnt];
+ a = GET_PARAM(a->param_cnt);
}
-
if (a->type == Node_array_ref) {
printf(_("%s: array_ref to %s\n"), a->vname,
a->orig_array->vname);
a = a->orig_array;
}
-
- r = assoc_dump(a);
-
+ if (a->type != Node_var_array)
+ fatal(_("adump: argument not an array"));
+ r = assoc_dump(a, 0);
return r;
}
@@ -894,7 +975,20 @@ dup_table(NODE *symbol, NODE *newsymb)
memcpy(bucket->ahname_str, chain->ahname_str, chain->ahname_len);
bucket->ahname_str[bucket->ahname_len] = '\0';
- bucket->ahvalue = dupnode(chain->ahvalue);
+ if (chain->ahvalue->type == Node_var_array) {
+ NODE *r;
+ char *aname;
+ size_t aname_len;
+ getnode(r);
+ r->type = Node_var_array;
+ aname_len = strlen(newsymb->vname) + chain->ahname_len + 4;
+ emalloc(aname, char *, aname_len + 2, "dup_table");
+ sprintf(aname, "%s[\"%.*s\"]", newsymb->vname, (int) chain->ahname_len, chain->ahname_str);
+ r->vname = aname;
+ dup_table(chain->ahvalue, r);
+ bucket->ahvalue = r;
+ } else
+ bucket->ahvalue = dupnode(chain->ahvalue);
/*
* put the node on the corresponding
@@ -989,7 +1083,7 @@ assoc_from_list(NODE *symbol, NODE *list)
{
NODE *next;
unsigned long i = 0;
- register unsigned long hash1;
+ unsigned long hash1;
char buf[100];
for (; list != NULL; list = next) {
@@ -1033,7 +1127,7 @@ assoc_sort_inplace(NODE *symbol, ASORT_TYPE how)
if (symbol->var_array == NULL
|| symbol->array_size <= 0
|| symbol->table_size <= 0)
- return tmp_number((AWKNUM) 0);
+ return make_number((AWKNUM) 0);
/* build a linked list out of all the entries in the table */
if (how == VALUE) {
@@ -1041,9 +1135,11 @@ assoc_sort_inplace(NODE *symbol, ASORT_TYPE how)
num = 0;
for (i = 0; i < symbol->array_size; i++) {
for (bucket = symbol->var_array[i]; bucket != NULL; bucket = next) {
+ if (bucket->ahvalue->type == Node_var_array)
+ fatal(_("attempt to use array in a scalar context"));
next = bucket->ahnext;
if (bucket->ahname_ref == 1) {
- free(bucket->ahname_str);
+ efree(bucket->ahname_str);
bucket->ahname_str = NULL;
bucket->ahname_len = 0;
} else {
@@ -1051,7 +1147,7 @@ assoc_sort_inplace(NODE *symbol, ASORT_TYPE how)
getnode(r);
*r = *bucket;
- unref(bucket);
+ ahash_unref(bucket);
bucket = r;
bucket->flags |= MALLOC;
bucket->ahname_ref = 1;
@@ -1072,7 +1168,13 @@ assoc_sort_inplace(NODE *symbol, ASORT_TYPE how)
next = bucket->ahnext;
/* toss old value */
- unref(bucket->ahvalue);
+ if (bucket->ahvalue->type == Node_var_array) {
+ NODE *r = bucket->ahvalue;
+ assoc_clear(r);
+ efree(r->vname);
+ freenode(r);
+ } else
+ unref(bucket->ahvalue);
/* move index into value */
if (bucket->ahname_ref == 1) {
@@ -1086,7 +1188,7 @@ assoc_sort_inplace(NODE *symbol, ASORT_TYPE how)
bucket->ahvalue = make_string(bucket->ahname_str, bucket->ahname_len);
getnode(r);
*r = *bucket;
- unref(bucket);
+ ahash_unref(bucket);
bucket = r;
bucket->flags |= MALLOC;
bucket->ahname_ref = 1;
@@ -1116,20 +1218,35 @@ assoc_sort_inplace(NODE *symbol, ASORT_TYPE how)
*/
assoc_from_list(symbol, list);
- return tmp_number((AWKNUM) num);
+ return make_number((AWKNUM) num);
}
/* asort_actual --- do the actual work to sort the input array */
static NODE *
-asort_actual(NODE *tree, ASORT_TYPE how)
+asort_actual(int nargs, ASORT_TYPE how)
{
- NODE *array = get_array(tree->lnode);
+ NODE *dest = NULL;
+ NODE *array;
+
+ if (nargs == 2) { /* 2nd optional arg */
+ dest = POP_PARAM();
+ if (dest->type != Node_var_array) {
+ fatal(how == VALUE ?
+ _("asort: second argument not an array") :
+ _("asorti: second argument not an array"));
+ }
+ assoc_clear(dest);
+ }
- if (tree->rnode != NULL) { /* 2nd optional arg */
- NODE *dest = get_array(tree->rnode->lnode);
+ array = POP_PARAM();
+ if (array->type != Node_var_array) {
+ fatal(how == VALUE ?
+ _("asort: first argument not an array") :
+ _("asorti: first argument not an array"));
+ }
- assoc_clear(dest);
+ if (dest != NULL) {
dup_table(array, dest);
array = dest;
}
@@ -1140,17 +1257,17 @@ asort_actual(NODE *tree, ASORT_TYPE how)
/* do_asort --- sort array by value */
NODE *
-do_asort(NODE *tree)
+do_asort(int nargs)
{
- return asort_actual(tree, VALUE);
+ return asort_actual(nargs, VALUE);
}
/* do_asorti --- sort array by index */
NODE *
-do_asorti(NODE *tree)
+do_asorti(int nargs)
{
- return asort_actual(tree, INDEX);
+ return asort_actual(nargs, INDEX);
}
/*
diff --git a/awk.h b/awk.h
index 857741f9..74cba872 100644
--- a/awk.h
+++ b/awk.h
@@ -29,9 +29,6 @@
* config.h absolutely, positively, *M*U*S*T* be included before
* any system headers. Otherwise, extreme death, destruction
* and loss of life results.
- *
- * Well, OK, gawk just won't work on systems using egcs and LFS. But
- * that's almost as bad.
*/
#ifdef HAVE_CONFIG_H
#include <config.h>
@@ -63,16 +60,19 @@
#endif /* LOCALEDIR */
#endif
-#if defined(HAVE_STDARG_H) && defined(__STDC__) && __STDC__
-#define CAN_USE_STDARG_H 1
+#if !defined(__STDC__) || __STDC__ < 1
+#error "gawk no longer supports non-C89 environments (no __STDC__ or __STDC__ < 1)"
+#endif
+
+#if defined(HAVE_STDARG_H)
#include <stdarg.h>
#else
-#include <varargs.h>
+#error "gawk no loner supports <varargs.h>. Please update your compiler and runtime"
#endif
#include <signal.h>
#include <time.h>
#include <errno.h>
-#if ! defined(errno) && ! defined(MSDOS) && ! defined(OS2)
+#if ! defined(errno) && ! defined(OS2)
extern int errno;
#endif
@@ -101,24 +101,12 @@ extern int errno;
# include <stdint.h>
#endif
#endif /* !ZOS_USS */
-
-#if defined(_MSC_VER)
-/* for read()/close() in use replace.c */
-#include <io.h>
-#endif
/* ----------------- System dependencies (with more includes) -----------*/
/* This section is the messiest one in the file, not a lot that can be done */
-#ifdef __STDC__
-#define P(s) s
#define MALLOC_ARG_T size_t
-#else /* not __STDC__ */
-#define P(s) ()
-#define MALLOC_ARG_T unsigned
-#define volatile
-#endif /* not __STDC__ */
#ifndef VMS
#include <sys/types.h>
@@ -127,6 +115,15 @@ extern int errno;
#include <stddef.h>
#include <stat.h>
#include <file.h> /* avoid <fcntl.h> in io.c */
+/* debug.c needs this; when _DECC_V4_SOURCE is defined (as it is
+ in our config.h [vms/vms-conf.h]), off_t won't get declared */
+# if !defined(__OFF_T) && !defined(_OFF_T)
+# if defined(____OFF_T) || defined(___OFF_T)
+typedef __off_t off_t; /* __off_t is either int or __int64 */
+# else
+typedef int off_t;
+# endif
+# endif
#endif /* VMS */
#if ! defined(S_ISREG) && defined(S_IFREG)
@@ -150,69 +147,50 @@ extern int errno;
#endif /* HAVE_STRINGS_H */
#endif /* not HAVE_STRING_H */
-#ifdef NeXT
-#if __GNUC__ < 2 || __GNUC_MINOR__ < 7
-#include <libc.h>
-#endif
-#undef atof
-#define getopt GNU_getopt
-#define GFMT_WORKAROUND
-#endif /* NeXT */
-
-#if defined(atarist) || defined(VMS)
-#include <unixlib.h>
-#endif /* atarist || VMS */
-
-#if ! defined(MSDOS) && ! defined(OS2) && ! defined(WIN32) && ! defined(__EMX__) && ! defined(__CYGWIN__) && ! defined(O_BINARY) /*duh*/
+#if ! defined(O_BINARY)
#define O_BINARY 0
#endif
-#if defined(TANDEM)
-#define variable variabl
-#define open(name, how, mode) open(name, how) /* !!! ANSI C !!! */
-#endif
-
#if HAVE_UNISTD_H
#include <unistd.h>
#endif /* HAVE_UNISTD_H */
#ifdef VMS
+#include <unixlib.h>
#include "vms/redirect.h"
#endif /*VMS*/
-#ifdef atarist
-#include "unsupported/atari/redirect.h"
-#endif
-
#ifndef HAVE_VPRINTF
-/* if you don't have vprintf, try this and cross your fingers. */
-#ifdef HAVE_DOPRNT
-#define vfprintf(fp,fmt,arg) _doprnt((fmt), (arg), (fp))
-#else /* not HAVE_DOPRNT */
-you
-lose
-#endif /* not HAVE_DOPRNT */
+#error "you lose: you need a system with vfprintf"
#endif /* HAVE_VPRINTF */
#ifndef HAVE_SNPRINTF
-#if defined(HAVE_STDARG_H) && defined(__STDC__) && __STDC__
/* will use replacement version */
-extern int snprintf P((char *restrict buf, size_t len, const char *restrict fmt, ...));
-#else
-extern int snprintf ();
-#endif
+extern int snprintf(char *restrict buf, size_t len, const char *restrict fmt, ...);
#endif
#ifndef HAVE_SETLOCALE
#define setlocale(locale, val) /* nothing */
#endif /* HAVE_SETLOCALE */
+#if HAVE_MEMCPY_ULONG
+extern char *memcpy_ulong(char *dest, const char *src, unsigned long l);
+#define memcpy memcpy_ulong
+#endif
+#if HAVE_MEMSET_ULONG
+extern void *memset_ulong(void *dest, int val, unsigned long l);
+#define memset memset_ulong
+#endif
+
+#ifndef HAVE_STRNCASECMP
+extern int strcasecmp(const char *s1, const char *s2);
+extern int strncasecmp(const char *s1, const char *s2, register size_t n);
+#endif
+
/* use this as lintwarn("...")
this is a hack but it gives us the right semantics */
#define lintwarn (*(set_loc(__FILE__, __LINE__),lintfunc))
-#define GNU_REGEX
-#ifdef GNU_REGEX
#include "regex.h"
#include "dfa.h"
typedef struct Regexp {
@@ -227,7 +205,7 @@ typedef struct Regexp {
#define SUBPATSTART(rp,s,n) (rp)->regs.start[n]
#define SUBPATEND(rp,s,n) (rp)->regs.end[n]
#define NUMSUBPATS(rp,s) (rp)->regs.num_regs
-#endif /* GNU_REGEX */
+
/* regexp matching flags: */
#define RE_NEED_START 1 /* need to know start/end of match */
#define RE_NO_BOL 2 /* not allowed to match ^ in regexp */
@@ -262,27 +240,8 @@ extern double gawk_strtod();
#define __extension__
#endif
-/* this is defined by Windows32 extension libraries. It must be added to
- * every variable which is exported (including function pointers) */
-#if defined(WIN32_EXTENSION) && !defined(ATTRIBUTE_EXPORTED)
-# define ATTRIBUTE_EXPORTED __declspec(dllimport)
-#else
-# define ATTRIBUTE_EXPORTED
-#endif
-
-
/* ------------------ Constants, Structures, Typedefs ------------------ */
-#if 0
-/* This isn't right. Figure it out the right way for the next release */
-#ifndef AWKNUM
-#ifdef LDBL_MANT_DIG
-#define AWKNUM long double
-#else
-#endif
-#endif
-#endif
-
#define AWKNUM double
#ifndef TRUE
@@ -294,164 +253,41 @@ extern double gawk_strtod();
#define LINT_INVALID 1 /* only warn about invalid */
#define LINT_ALL 2 /* warn about all things */
-/* Figure out what '\a' really is. */
-#ifdef __STDC__
-#define BELL '\a' /* sure makes life easy, don't it? */
-#else
-# if 'z' - 'a' == 25 /* ascii */
-# if 'a' != 97 /* machine is dumb enough to use mark parity */
-# define BELL '\207'
-# else
-# define BELL '\07'
-# endif
-# else
-# define BELL '\057'
-# endif
-#endif
+enum defrule {BEGIN = 1, Rule, END, BEGINFILE, ENDFILE,
+ MAXRULE /* sentinel, not legal */ };
+extern const char *const ruletab[];
+
typedef enum nodevals {
/* illegal entry == 0 */
Node_illegal,
- /* binary operators lnode and rnode are the expressions to work on */
- Node_times,
- Node_quotient,
- Node_mod,
- Node_plus,
- Node_minus,
- Node_cond_pair, /* conditional pair (see Node_line_range) */
- Node_subscript,
- Node_concat,
- Node_exp,
-
- /* unary operators subnode is the expression to work on */
- Node_preincrement,
- Node_predecrement,
- Node_postincrement,
- Node_postdecrement,
- Node_unary_minus,
- Node_field_spec,
-
- /* assignments lnode is the var to assign to, rnode is the exp */
- Node_assign,
- Node_assign_times,
- Node_assign_quotient,
- Node_assign_mod,
- Node_assign_plus,
- Node_assign_minus,
- Node_assign_exp,
- Node_assign_concat,
-
- /* boolean binaries lnode and rnode are expressions */
- Node_and,
- Node_or,
-
- /* binary relationals compares lnode and rnode */
- Node_equal,
- Node_notequal,
- Node_less,
- Node_greater,
- Node_leq,
- Node_geq,
- Node_match,
- Node_nomatch,
-
- /* unary relationals works on subnode */
- Node_not,
-
- /* program structures */
- Node_rule_list, /* lnode is a rule, rnode is rest of list */
- Node_rule_node, /* lnode is pattern, rnode is statement */
- Node_statement_list, /* lnode is statement, rnode is more list */
- Node_switch_body, /* lnode is the case list, rnode is default list */
- Node_case_list, /* lnode is the case, rnode is a statement list */
- Node_if_branches, /* lnode is to run on true, rnode on false */
- Node_expression_list, /* lnode is an exp, rnode is more list */
- Node_param_list, /* lnode is a variable, rnode is more list */
+ Node_val, /* node is a value - type in flags */
+ Node_regex, /* a regexp, text, compiled, flags, etc */
+ Node_dynregex, /* a dynamic regexp */
- /* keywords */
- Node_K_if, /* lnode is conditonal, rnode is if_branches */
- Node_K_switch, /* lnode is switch value, rnode is body of case statements */
- Node_K_case, /* lnode is case value, rnode is stuff to run */
- Node_K_default, /* lnode is empty, rnode is stuff to run */
- Node_K_while, /* lnode is condtional, rnode is stuff to run */
- Node_K_for, /* lnode is for_struct, rnode is stuff to run */
- Node_K_arrayfor, /* lnode is for_struct, rnode is stuff to run */
- Node_K_break, /* no subs */
- Node_K_continue, /* no subs */
- Node_K_print, /* lnode is exp_list, rnode is redirect */
- Node_K_print_rec, /* lnode is NULL, rnode is redirect */
- Node_K_printf, /* lnode is exp_list, rnode is redirect */
- Node_K_next, /* no subs */
- Node_K_exit, /* subnode is return value, or NULL */
- Node_K_do, /* lnode is conditional, rnode stuff to run */
- Node_K_return, /* lnode is return value */
- Node_K_delete, /* lnode is array, rnode is subscript */
- Node_K_delete_loop, /* lnode is array, rnode is subscript */
- Node_K_getline, /* lnode is opt var, rnode is redirection */
- Node_K_function, /* lnode is statement list, rnode is params */
- Node_K_nextfile, /* no subs */
-
- /* I/O redirection for print statements */
- Node_redirect_output, /* subnode is where to redirect */
- Node_redirect_append, /* subnode is where to redirect */
- Node_redirect_pipe, /* subnode is where to redirect */
- Node_redirect_pipein, /* subnode is where to redirect */
- Node_redirect_input, /* subnode is where to redirect */
- Node_redirect_twoway, /* subnode is where to redirect */
-
- /* Variables */
- Node_var_new, /* newly created variable, may become an array */
+ /* symbol table values */
Node_var, /* scalar variable, lnode is value */
Node_var_array, /* array is ptr to elements, table_size num of eles */
- Node_val, /* node is a value - type in flags */
-
- /* Builtins subnode is explist to work on, builtin is func to call */
- Node_builtin,
-
- /*
- * pattern: conditional ',' conditional ; lnode of Node_line_range
- * is the two conditionals (Node_cond_pair), other word (rnode place)
- * is a flag indicating whether or not this range has been entered.
- */
- Node_line_range,
-
- /*
- * boolean test of membership in array
- * lnode is string-valued, expression rnode is array name
- */
- Node_in_array,
-
+ Node_var_new, /* newly created variable, may become an array */
+ Node_param_list, /* lnode is a variable, rnode is more list */
Node_func, /* lnode is param. list, rnode is body */
- Node_func_call, /* lnode is name, rnode is argument list */
- Node_indirect_func_call, /* lnode is name, rnode is argument list */
- Node_cond_exp, /* lnode is conditonal, rnode is if_branches */
- Node_regex, /* a regexp, text, compiled, flags, etc */
- Node_dynregex, /* a dynamic regexp */
Node_hashnode, /* an identifier in the symbol table */
Node_ahash, /* an array element */
Node_array_ref, /* array passed by ref as parameter */
- Node_BINMODE, /* variables recognized in the grammar */
- Node_CONVFMT,
- Node_FIELDWIDTHS,
- Node_FNR,
- Node_FPAT,
- Node_FS,
- Node_IGNORECASE,
- Node_LINT,
- Node_NF,
- Node_NR,
- Node_OFMT,
- Node_OFS,
- Node_ORS,
- Node_RS,
- Node_TEXTDOMAIN,
- Node_SUBSEP,
+ /* program execution -- stack item types */
+ Node_arrayfor,
+ Node_frame,
+ Node_instruction,
+
Node_final /* sentry value, not legal */
} NODETYPE;
+
+struct exp_instruction;
+
/*
* NOTE - this struct is a rather kludgey -- it is packed to minimize
* space usage, at the expense of cleanliness. Alter at own risk.
@@ -461,19 +297,18 @@ typedef struct exp_node {
struct {
union {
struct exp_node *lptr;
- char *param_name;
long ll;
} l;
union {
struct exp_node *rptr;
- struct exp_node *(*pptr) P((struct exp_node *));
Regexp *preg;
- struct for_loop_header *hd;
struct exp_node **av;
- int r_ent; /* range entered */
+ void (*uptr)(void);
+ struct exp_instruction *iptr;
} r;
union {
struct exp_node *extra;
+ void (*aptr)(void);
long xl;
char **param_list;
} x;
@@ -520,51 +355,43 @@ typedef struct exp_node {
NODETYPE type;
unsigned short flags;
# define MALLOC 1 /* can be free'd */
-# define TEMP 2 /* should be free'd */
-# define PERM 4 /* can't be free'd */
-# define STRING 8 /* assigned as string */
-# define STRCUR 16 /* string value is current */
-# define NUMCUR 32 /* numeric value is current */
-# define NUMBER 64 /* assigned as number */
-# define MAYBE_NUM 128 /* user input: if NUMERIC then
+# define PERM 2 /* can't be free'd */
+# define STRING 4 /* assigned as string */
+# define STRCUR 8 /* string value is current */
+# define NUMCUR 16 /* numeric value is current */
+# define NUMBER 32 /* assigned as number */
+# define MAYBE_NUM 64 /* user input: if NUMERIC then
* a NUMBER */
-# define ARRAYMAXED 256 /* array is at max size */
-# define FUNC 512 /* this parameter is really a
+# define ARRAYMAXED 128 /* array is at max size */
+# define FUNC 256 /* this parameter is really a
* function name; see awkgram.y */
-# define FIELD 1024 /* this is a field */
-# define INTLSTR 2048 /* use localized version */
-# define WSTRCUR 4096 /* wide str value is current */
-# define ASSIGNED 8192 /* value assigned, used for function pointer caching */
+# define FIELD 512 /* this is a field */
+# define INTLSTR 1024 /* use localized version */
+# define WSTRCUR 2048 /* wide str value is current */
} NODE;
+
#define vname sub.nodep.name
-#define exec_count sub.nodep.reflags
#define lnode sub.nodep.l.lptr
#define nextp sub.nodep.l.lptr
#define rnode sub.nodep.r.rptr
-#define source_file sub.nodep.name
-#define source_line sub.nodep.number
-#define param_cnt sub.nodep.number
-#define param sub.nodep.l.param_name
-#define parmlist sub.nodep.x.param_list
-#define subnode lnode
-#define builtin sub.nodep.r.pptr
-#define callresult sub.nodep.x.extra
-#define funcbody sub.nodep.x.extra
+#define param_cnt sub.nodep.l.ll
+#define param vname
+
+#define parmlist sub.nodep.x.param_list
+#define code_ptr sub.nodep.r.iptr
#define re_reg sub.nodep.r.preg
#define re_flags sub.nodep.reflags
#define re_text lnode
#define re_exp sub.nodep.x.extra
-#define re_cnt sub.nodep.number
-
-#define forloop rnode->sub.nodep.r.hd
+#define re_cnt flags
#define stptr sub.val.sp
#define stlen sub.val.slen
-#define stref sub.val.sref
+#define valref sub.val.sref
#define stfmt sub.val.idx
#define wstptr sub.val.wsp
@@ -572,8 +399,16 @@ typedef struct exp_node {
#define numbr sub.val.fltnum
+/* Node_frame: */
+#define loop_count sub.nodep.l.ll
+#define stack sub.nodep.r.av
+#define func_node sub.nodep.x.extra
+#define reti sub.nodep.reflags
+
/* Node_var: */
#define var_value lnode
+#define var_update sub.nodep.r.uptr
+#define var_assign sub.nodep.x.aptr
/* Node_var_array: */
#define var_array sub.nodep.r.av
@@ -581,20 +416,306 @@ typedef struct exp_node {
#define table_size sub.nodep.x.xl
/* Node_array_ref: */
-#define orig_array sub.nodep.x.extra
+#define orig_array lnode
#define prev_array rnode
-#define printf_count sub.nodep.x.xl
+/* --------------------------------lint warning types----------------------------*/
+typedef enum lintvals {
+ LINT_illegal,
+ LINT_assign_in_cond,
+ LINT_no_effect
+} LINTTYPE;
+
+/* --------------------------------Instruction ---------------------------------- */
+
+typedef enum opcodeval {
+ /* illegal entry == 0 */
+ Op_illegal,
+
+ /* binary operators */
+ Op_times,
+ Op_times_i,
+ Op_quotient,
+ Op_quotient_i,
+ Op_mod,
+ Op_mod_i,
+ Op_plus,
+ Op_plus_i,
+ Op_minus,
+ Op_minus_i,
+ Op_exp,
+ Op_exp_i,
+ Op_concat,
+
+ /* line range instruction pair */
+ Op_line_range, /* flags for Op_cond_pair */
+ Op_cond_pair, /* conditional pair */
+
+ Op_subscript,
+ Op_sub_array,
+
+ /* unary operators */
+ Op_preincrement,
+ Op_predecrement,
+ Op_postincrement,
+ Op_postdecrement,
+ Op_unary_minus,
+ Op_field_spec,
+
+ /* unary relationals */
+ Op_not,
+
+ /* assignments */
+ Op_assign,
+ Op_store_var, /* simple variable assignment optimization */
+ Op_store_sub, /* array[subscript] assignment optimization */
+ Op_store_field, /* $n assignment optimization */
+ Op_assign_times,
+ Op_assign_quotient,
+ Op_assign_mod,
+ Op_assign_plus,
+ Op_assign_minus,
+ Op_assign_exp,
+ Op_assign_concat,
+
+ /* boolean binaries */
+ Op_and, /* a left subexpression in && */
+ Op_and_final, /* right subexpression of && */
+ Op_or,
+ Op_or_final,
+
+ /* binary relationals */
+ Op_equal,
+ Op_notequal,
+ Op_less,
+ Op_greater,
+ Op_leq,
+ Op_geq,
+ Op_match,
+ Op_match_rec, /* match $0 */
+ Op_nomatch,
+
+ Op_rule,
+
+ /* keywords */
+ Op_K_case,
+ Op_K_default,
+ Op_K_break,
+ Op_K_continue,
+ Op_K_print,
+ Op_K_print_rec,
+ Op_K_printf,
+ Op_K_next,
+ Op_K_exit,
+ Op_K_return,
+ Op_K_delete,
+ Op_K_delete_loop,
+ Op_K_getline_redir,
+ Op_K_getline,
+ Op_K_nextfile,
+
+ Op_builtin,
+ Op_in_array, /* boolean test of membership in array */
+
+ /* function call instruction */
+ Op_func_call,
+ Op_indirect_func_call,
+
+ Op_push, /* variable */
+ Op_push_i, /* number, string */
+ Op_push_re, /* regex */
+ Op_push_array,
+ Op_push_param,
+ Op_push_lhs,
+ Op_subscript_lhs,
+ Op_field_spec_lhs,
+ Op_no_op, /* jump target */
+ Op_pop, /* pop an item from the runtime stack */
+ Op_jmp,
+ Op_jmp_true,
+ Op_jmp_false,
+ Op_push_loop, /* break (continue) target for loop */
+ Op_pop_loop,
+ Op_get_record,
+ Op_newfile,
+ Op_arrayfor_init,
+ Op_arrayfor_incr,
+ Op_arrayfor_final,
+
+ Op_var_update, /* update value of NR, NF or FNR */
+ Op_var_assign,
+ Op_field_assign,
+ Op_after_beginfile,
+ Op_after_endfile,
+
+ Op_ext_func,
+ Op_func,
+
+ Op_exec_count,
+ Op_breakpoint,
+ Op_lint,
+ Op_atexit,
+ Op_stop,
+
+ /* parsing (yylex and yyparse), should never appear in valid compiled code */
+ Op_token,
+ Op_symbol,
+ Op_list,
+ Op_case_list,
+ /* program structures -- for use in the profiler/pretty printer */
+ Op_K_do,
+ Op_K_for,
+ Op_K_arrayfor,
+ Op_K_while,
+ Op_K_switch,
+ Op_K_if,
+ Op_K_else,
+ Op_K_function,
+ Op_cond_exp,
+ Op_final /* sentry value, not legal */
+} OPCODE;
+
+enum redirval {
+ /* I/O redirections */
+ redirect_output = 1,
+ redirect_append,
+ redirect_pipe,
+ redirect_pipein,
+ redirect_input,
+ redirect_twoway
+};
+
+struct break_point;
+
+typedef struct exp_instruction {
+ struct exp_instruction *nexti;
+ union {
+ NODE *dn;
+ struct exp_instruction *di;
+ NODE *(*fptr)(int);
+ long dl;
+ char *name;
+ } d;
+
+ union {
+ long xl;
+ NODE *xn;
+ void (*aptr)(void);
+ struct exp_instruction *xi;
+ struct break_point *bpt;
+ } x;
+
+ short source_line;
+ OPCODE opcode;
+} INSTRUCTION;
+
+#define func_name d.name
+
+#define memory d.dn
+#define builtin d.fptr
+#define builtin_idx d.dl
+
+#define expr_count x.xl
+
+#define target_continue d.di
+#define target_jmp d.di
+#define target_break x.xi
+
+/* Op_newfile, Op_K_getline */
+#define target_endfile x.xi
+
+/* Op_K_getline */
+#define target_beginfile d.di
+
+/* Op_token */
+#define lextok d.name
+
+/* Op_rule */
+#define in_rule x.xl
+#define source_file d.name
+
+/* Op_K_case, Op_K_default */
+#define target_stmt x.xi
+
+/* Op_case_list, Op_K_switch */
+#define case_val d.di
+#define case_stmt x.xi
+#define switch_dflt x.xi
+#define switch_body d.di /* pretty printing and profiling */
+
+/* Op_K_getline, Op_K_getline_redir */
+#define into_var x.xl
+
+/* Op_K_getline_redir, Op_K_print, Op_K_print_rec, Op_K_printf */
+#define redir_type d.dl
+
+/* Op_arrayfor_incr */
+#define array_var x.xn
+
+/* Op_line_range */
+#define triggered x.xl
+
+/* Op_cond_pair */
+#define line_range x.xi
+
+/* Op_func_call, Op_func */
+#define func_body x.xn
+
+/* Op_subscript */
+#define sub_count d.dl
+
+/* Op_push_lhs, Op_subscript_lhs, Op_field_spec_lhs */
+#define do_reference x.xl
+
+/* Op_list, Op_rule, Op_func */
+#define lasti d.di
+#define firsti x.xi
+
+/* Op_rule, Op_func */
+#define last_line x.xl
+#define first_line source_line
-#define condpair lnode
-#define triggered sub.nodep.r.r_ent
+/* Op_lint */
+#define lint_type d.dl
-/* a regular for loop */
-typedef struct for_loop_header {
- NODE *init;
- NODE *cond;
- NODE *incr;
-} FOR_LOOP_HEADER;
+/* Op_field_spec_lhs */
+#define target_assign d.di
+
+/* Op_field_assign */
+#define field_assign x.aptr
+
+/* Op_concat */
+#define concat_flag d.dl
+#define CSUBSEP 1
+#define CSVAR 2
+
+/* Op_breakpoint */
+#define break_pt x.bpt
+
+/*------------------ pretty printing/profiling --------*/
+/* Op_exec_count */
+#define exec_count d.dl
+
+/* Op_K_while */
+#define while_body d.di
+
+/* Op_K_do */
+#define doloop_cond d.di
+
+/* Op_K_for */
+#define forloop_cond d.di
+#define forloop_body x.xi
+
+/* Op_K_if */
+#define branch_if d.di
+#define branch_else x.xi
+
+/* Op_K_else */
+#define branch_end x.xi
+
+/* Op_line_range */
+#define condpair_left d.di
+#define condpair_right x.xi
typedef struct iobuf {
const char *name; /* filename */
@@ -611,19 +732,21 @@ typedef struct iobuf {
size_t scanoff; /* where we were in the buffer when we had
to regrow/refill */
- void *opaque; /* private data for open hooks */
- int (*get_record) P((char **out, struct iobuf *, int *errcode));
- void (*close_func) P((struct iobuf *)); /* open and close hooks */
+ void *opaque; /* private data for open hooks */
+ int (*get_record)(char **out, struct iobuf *, int *errcode);
+ void (*close_func)(struct iobuf *); /* open and close hooks */
+
+ int errcode;
- int flag;
+ int flag;
# define IOP_IS_TTY 1
# define IOP_NOFREE_OBJ 2
-# define IOP_AT_EOF 4
-# define IOP_CLOSED 8
-# define IOP_AT_START 16
+# define IOP_AT_EOF 4
+# define IOP_CLOSED 8
+# define IOP_AT_START 16
} IOBUF;
-typedef void (*Func_ptr) P((void));
+typedef void (*Func_ptr)(void);
/* structure used to dynamically maintain a linked-list of open files/pipes */
struct redirect {
@@ -653,13 +776,43 @@ struct redirect {
/*
* structure for our source, either a command line string or a source file.
- * the same structure is used to remember variable pre-assignments.
*/
-struct src {
- enum srctype { CMDLINE = 1, SOURCEFILE,
- PRE_ASSIGN, PRE_ASSIGN_FS } stype;
- char *val;
-};
+
+typedef struct srcfile {
+ struct srcfile *next;
+ struct srcfile *prev;
+
+ enum srctype { SRC_CMDLINE = 1, SRC_STDIN, SRC_FILE, SRC_INC } stype;
+ char *src; /* name on command line or inclde statement */
+ char *fullpath; /* full path after AWKPATH search */
+ time_t mtime;
+ struct stat sbuf;
+ int srclines; /* no of lines in source */
+ size_t bufsize;
+ char *buf;
+ int *line_offset; /* offset to the beginning of each line */
+ int fd;
+ int maxlen; /* size of the longest line */
+
+ char *lexptr;
+ char *lexend;
+ char *lexeme;
+ char *lexptr_begin;
+ int lasttok;
+} SRCFILE;
+
+
+typedef struct context {
+ INSTRUCTION pools;
+ NODE symbols;
+ INSTRUCTION rule_list;
+ SRCFILE srcfiles;
+ int sourceline;
+ char *source;
+ int level;
+ void (*install_func)(char *);
+ struct context *prev;
+} CONTEXT;
/* for debugging purposes */
struct flagtab {
@@ -667,14 +820,6 @@ struct flagtab {
const char *name;
};
-/* longjmp return codes, must be nonzero */
-/* Continue means either for loop/while continue, or next input record */
-#define TAG_CONTINUE 1
-/* Break means either for/while break, or stop reading input */
-#define TAG_BREAK 2
-/* Return means return from a function call; leave value in ret_node */
-#define TAG_RETURN 3
-
#ifndef LONG_MAX
#define LONG_MAX ((long)(~(1L << (sizeof (long) * 8 - 1))))
#endif
@@ -700,7 +845,7 @@ extern char *ORS;
extern int ORSlen;
extern char *OFMT;
extern char *CONVFMT;
-ATTRIBUTE_EXPORTED extern int CONVFMTidx;
+extern int CONVFMTidx;
extern int OFMTidx;
extern char *TEXTDOMAIN;
extern NODE *BINMODE_node, *CONVFMT_node, *FIELDWIDTHS_node, *FILENAME_node;
@@ -708,22 +853,16 @@ extern NODE *FNR_node, *FS_node, *IGNORECASE_node, *NF_node;
extern NODE *NR_node, *OFMT_node, *OFS_node, *ORS_node, *RLENGTH_node;
extern NODE *RSTART_node, *RS_node, *RT_node, *SUBSEP_node, *PROCINFO_node;
extern NODE *LINT_node, *ERRNO_node, *TEXTDOMAIN_node, *FPAT_node;
-ATTRIBUTE_EXPORTED extern NODE **stack_ptr;
extern NODE *Nnull_string;
extern NODE *Null_field;
extern NODE **fields_arr;
extern int sourceline;
extern char *source;
-extern NODE *expression_value;
#if __GNUC__ < 2
-# if defined(WIN32_EXTENSION)
-static
-# else
-extern
-#endif
-NODE *_t; /* used as temporary in tree_eval */
+extern NODE *_t; /* used as temporary in tree_eval */
#endif
+extern NODE *_r; /* used as temporary in stack macros */
extern NODE *nextfree;
extern int field0_valid;
@@ -732,21 +871,20 @@ extern int do_posix;
extern int do_intervals;
extern int do_intl;
extern int do_non_decimal_data;
+extern int do_profiling;
extern int do_dump_vars;
extern int do_tidy_mem;
extern int do_sandbox;
extern int do_optimize;
extern int use_lc_numeric;
-extern int in_begin_rule;
-extern int in_end_rule;
-extern int in_beginfile_rule;
-extern int in_endfile_rule;
extern int whiny_users;
+extern int exit_val;
+
#ifdef NO_LINT
#define do_lint 0
#define do_lint_old 0
#else
-ATTRIBUTE_EXPORTED extern int do_lint;
+extern int do_lint;
extern int do_lint_old;
#endif
#ifdef MBS_SUPPORT
@@ -772,170 +910,166 @@ extern char envsep;
extern char casetable[]; /* for case-independent regexp matching */
+/*
+ * Provide a way for code to know which program is executing:
+ * gawk vs dgawk vs pgawk.
+ */
+enum exe_mode { exe_normal = 1, exe_debugging, exe_profiling };
+extern enum exe_mode which_gawk; /* (defined in eval.c) */
+
+/* ------------------------- Runtime stack -------------------------------- */
+
+typedef union stack_item {
+ NODE *rptr; /* variable etc. */
+ NODE **lptr; /* address of a variable etc. */
+} STACK_ITEM;
+
+extern STACK_ITEM *stack_ptr;
+extern NODE *frame_ptr;
+extern STACK_ITEM *stack_bottom;
+extern STACK_ITEM *stack_top;
+
+#define decr_sp() (stack_ptr--)
+#define incr_sp() ((stack_ptr < stack_top) ? ++stack_ptr : grow_stack())
+#define stack_adj(n) (stack_ptr += (n))
+#define stack_empty() (stack_ptr < stack_bottom)
+
+#define POP() decr_sp()->rptr
+#define POP_ADDRESS() decr_sp()->lptr
+#define PEEK(n) (stack_ptr - (n))->rptr
+#define TOP() stack_ptr->rptr /* same as PEEK(0) */
+#define TOP_ADDRESS() stack_ptr->lptr
+#define PUSH(r) (void) (incr_sp()->rptr = (r))
+#define PUSH_ADDRESS(l) (void) (incr_sp()->lptr = (l))
+#define REPLACE(r) (void) (stack_ptr->rptr = (r))
+#define REPLACE_ADDRESS(l) (void) (stack_ptr->lptr = (l))
+
+
+/* function param */
+#define GET_PARAM(n) frame_ptr->stack[n]
+
+/*
+ * UPREF and DEREF --- simplified versions of dupnode and unref
+ * UPREF does not handle FIELD node. Most appropriate use is
+ * for elements on the runtime stack. When in doubt, use dupnode.
+ */
+
+#define DEREF(r) ( _r = (r), (!(_r->flags & PERM) && (--_r->valref == 0)) ? unref(_r) : (void)0 )
+
+#if __GNUC__ >= 2
+#define UPREF(r) ({ NODE *_t = (r); !(_t->flags & PERM) && _t->valref++;})
+
+#define POP_ARRAY() ({ NODE *_t = POP(); \
+ _t->type == Node_var_array ? \
+ _t : get_array(_t, TRUE); })
+
+#define POP_PARAM() ({ NODE *_t = POP(); \
+ _t->type == Node_var_array ? \
+ _t : get_array(_t, FALSE); })
+
+#define POP_NUMBER(x) ({ NODE *_t = POP_SCALAR(); \
+ x = force_number(_t); DEREF(_t); })
+#define TOP_NUMBER(x) ({ NODE *_t = TOP_SCALAR(); \
+ x = force_number(_t); DEREF(_t); })
+
+#define POP_SCALAR() ({ NODE *_t = POP(); _t->type != Node_var_array ? _t \
+ : (fatal(_("attempt to use array `%s' in a scalar context"), array_vname(_t)), _t);})
+#define TOP_SCALAR() ({ NODE *_t = TOP(); _t->type != Node_var_array ? _t \
+ : (fatal(_("attempt to use array `%s' in a scalar context"), array_vname(_t)), _t);})
+
+#else /* not __GNUC__ */
+
+#define UPREF(r) (_t = (r), !(_t->flags & PERM) && _t->valref++)
+
+#define POP_ARRAY() (_t = POP(), \
+ _t->type == Node_var_array ? \
+ _t : get_array(_t, TRUE))
+
+#define POP_PARAM() (_t = POP(), \
+ _t->type == Node_var_array ? \
+ _t : get_array(_t, FALSE))
+
+#define POP_NUMBER(x) (_t = POP_SCALAR(), \
+ x = force_number(_t), DEREF(_t))
+#define TOP_NUMBER(x) (_t = TOP_SCALAR(), \
+ x = force_number(_t), DEREF(_t))
+
+#define POP_SCALAR() (_t = POP(), _t->type != Node_var_array ? _t \
+ : (fatal(_("attempt to use array `%s' in a scalar context"), array_vname(_t)), _t))
+#define TOP_SCALAR() (_t = TOP(), _t->type != Node_var_array ? _t \
+ : (fatal(_("attempt to use array `%s' in a scalar context"), array_vname(_t)), _t))
+
+#endif /* __GNUC__ */
+
+
+#define POP_STRING() force_string(POP_SCALAR())
+#define TOP_STRING() force_string(TOP_SCALAR())
+
/* ------------------------- Pseudo-functions ------------------------- */
#define is_identchar(c) (isalnum(c) || (c) == '_')
#define var_uninitialized(n) ((n)->var_value == Nnull_string)
+#define get_lhs(n, r) (n)->type == Node_var && ! var_uninitialized(n) ? \
+ &((n)->var_value) : r_get_lhs((n), (r))
+
#ifdef MPROF
-#define getnode(n) (emalloc((n), NODE *, sizeof(NODE), "getnode"), (n)->flags = 0, (n)->exec_count = 0)
-#define freenode(n) free(n)
+#define getnode(n) emalloc((n), NODE *, sizeof(NODE), "getnode"), \
+ (n)->flags = 0
+#define freenode(n) efree(n)
#else /* not MPROF */
-#define getnode(n) if (nextfree) n = nextfree, nextfree = nextfree->nextp;\
- else n = more_nodes()
-#ifndef NO_PROFILING
-#define freenode(n) ((n)->flags = 0,\
- (n)->exec_count = 0, (n)->nextp = nextfree, nextfree = (n))
-#else /* not PROFILING */
-#define freenode(n) ((n)->flags = 0,\
- (n)->nextp = nextfree, nextfree = (n))
-#endif /* not PROFILING */
+#define getnode(n) (void) (nextfree ? \
+ (n = nextfree, nextfree = nextfree->nextp) \
+ : (n = more_nodes()))
+#define freenode(n) ((n)->flags = 0, (n)->nextp = nextfree, nextfree = (n))
#endif /* not MPROF */
-#ifndef GAWKDEBUG
-#define DUPNODE_MACRO 1
-/*
- * Speed up the path leading to r_dupnode, as well as duplicating TEMP nodes,
- * on expense of slowing down the access to PERM nodes (by two instructions).
- * This is right since PERM nodes are realtively rare.
- *
- * The code also sets MALLOC flag for PERM nodes, which should not matter.
- */
-#define DUPNODE_COMMON (_t->flags & (TEMP|PERM)) != 0 ? \
- (_t->flags &= ~TEMP, _t->flags |= MALLOC, _t) : \
- r_dupnode(_t)
#if __GNUC__ >= 2
-#define dupnode(n) ({NODE * _t = (n); DUPNODE_COMMON;})
+#define ahash_dupnode(n) ({NODE * _t = (n); _t->ahname_ref++; _t;})
#else
-#define dupnode(n) (_t = (n), DUPNODE_COMMON)
+#define ahash_dupnode(n) (_t = (n), _t->ahname_ref++, _t)
#endif
-#else /* GAWKDEBUG */
-#define dupnode(n) r_dupnode(n)
-#endif /* GAWKDEBUG */
-#define get_array(t) get_actual(t, TRUE) /* allowed to die fatally */
-#define get_param(t) get_actual(t, FALSE) /* not allowed */
-#ifdef MEMDEBUG
-#undef freenode
-#define get_lhs(p, a, r) r_get_lhs((p), (a), (r))
-#define m_tree_eval(t, iscond) r_tree_eval(t, iscond)
-#else
-#define get_lhs(p, a, r) ((p)->type == Node_var && \
- ! var_uninitialized(p) ? \
- (&(p)->var_value) : \
- r_get_lhs((p), (a), (r)))
-#define TREE_EVAL_MACRO 1
-#if __GNUC__ >= 2
-#define m_tree_eval(t, iscond) __extension__ \
- ({NODE * _t = (t); \
- if (_t == (NODE*)NULL) \
- cant_happen(); \
- switch(_t->type) { \
- case Node_val: \
- if (_t->flags&INTLSTR) \
- _t = r_force_string(_t); \
- break; \
- case Node_var: \
- if (! var_uninitialized(_t)) { \
- _t = _t->var_value; \
- break; \
- } \
- /*FALLTHROUGH*/ \
- default: \
- _t = r_tree_eval(_t, iscond);\
- break; \
- } \
- _t;})
-#else
-#define m_tree_eval(t, iscond) (_t = (t), _t == (NODE*)NULL ? (cant_happen(), (NODE*)NULL) : \
- (_t->type == Node_param_list ? \
- r_tree_eval(_t, iscond) : \
- ((_t->type == Node_val && (_t->flags&INTLSTR)) ? \
- r_force_string(_t) : \
- (_t->type == Node_val ? _t : \
- (_t->type == Node_var && \
- ! var_uninitialized(_t) ? _t->var_value : \
- r_tree_eval(_t, iscond))))))
-#endif /* __GNUC__ */
-#endif /* not MEMDEBUG */
-#define tree_eval(t) m_tree_eval(t, FALSE)
+#define make_number(x) mk_number((x), (unsigned int)(MALLOC|NUMCUR|NUMBER))
-#define make_number(x) mk_number((x), (unsigned int)(MALLOC|NUMCUR|NUMBER))
-#define tmp_number(x) mk_number((x), (unsigned int)(MALLOC|TEMP|NUMCUR|NUMBER))
+#define make_string(s, l) r_make_str_node((s), (size_t) (l), 0)
+#define make_str_node(s, l, f) r_make_str_node((s), (size_t) (l), (f))
-#define free_temp(n) do { NODE *_n = (n); if (_n->flags&TEMP) unref(_n);} \
- while (FALSE)
-
-#define make_string(s, l) make_str_node((s), (size_t) (l), 0)
#define SCAN 1
#define ALREADY_MALLOCED 2
#define cant_happen() r_fatal("internal error line %d, file: %s", \
__LINE__, __FILE__)
-/*
- * For SunOS 4.1.x which is pre-Standard C, `realloc' doesn't
- * accept NULL. Sigh. The check must be done for both cases,
- * since could be using GCC but with stock C library. Sigh, again.
- */
-#ifdef HAVE_STRINGIZE
#define emalloc(var,ty,x,str) (void)((var=(ty)malloc((MALLOC_ARG_T)(x))) ||\
(fatal(_("%s: %s: can't allocate %ld bytes of memory (%s)"),\
(str), #var, (long) (x), strerror(errno)),0))
-#define erealloc(var,ty,x,str) (void)((var = ((var == NULL) \
- ? (ty)malloc((MALLOC_ARG_T)(x)) \
- : (ty)realloc((char *)var, (MALLOC_ARG_T)(x))) ) \
+#define erealloc(var,ty,x,str) (void)((var = (ty)realloc((char *)var, (MALLOC_ARG_T)(x))) \
||\
(fatal(_("%s: %s: can't allocate %ld bytes of memory (%s)"),\
(str), #var, (long) (x), strerror(errno)),0))
-#else /* HAVE_STRINGIZE */
-#define emalloc(var,ty,x,str) (void)((var=(ty)malloc((MALLOC_ARG_T)(x))) ||\
- (fatal(_("%s: %s: can't allocate %ld bytes of memory (%s)"),\
- (str), "var", (long) (x), strerror(errno)),0))
-#define erealloc(var,ty,x,str) (void)((var = ((var == NULL) \
- ? (ty)malloc((MALLOC_ARG_T)(x)) \
- : (ty)realloc((char *)var, (MALLOC_ARG_T)(x))) ) \
- ||\
- (fatal(_("%s: %s: can't allocate %ld bytes of memory (%s)"),\
- (str), "var", (long) (x), strerror(errno)),0))
-#endif /* HAVE_STRINGIZE */
+
+#define efree(p) free(p)
#ifdef GAWKDEBUG
#define force_number r_force_number
#define force_string r_force_string
#else /* not GAWKDEBUG */
-#ifdef lint
-extern AWKNUM force_number();
-#endif
#if __GNUC__ >= 2
#define force_number(n) __extension__ ({NODE *_tn = (n);\
- (_tn->flags & NUMCUR) ?_tn->numbr : r_force_number(_tn);})
+ (_tn->flags & NUMCUR) ? _tn->numbr : r_force_number(_tn);})
+
#define force_string(s) __extension__ ({NODE *_ts = (s);\
- ((_ts->flags & INTLSTR) ? \
- r_force_string(_ts) : \
- ((_ts->flags & STRCUR) && \
+ ((_ts->flags & STRCUR) && \
(_ts->stfmt == -1 || _ts->stfmt == CONVFMTidx)) ?\
- _ts : r_force_string(_ts));})
-#else
-#ifdef MSDOS
-extern double _msc51bug;
-#define force_number(n) (_msc51bug=(_t = (n),\
- (_t->flags & NUMCUR) ? _t->numbr : r_force_number(_t)))
-#else /* not MSDOS */
-#define force_number(n) (_t = (n),\
- (_t->flags & NUMCUR) ? _t->numbr : r_force_number(_t))
-#endif /* not MSDOS */
-#define force_string(s) (_t = (s),(_t->flags & INTLSTR) ? \
- r_force_string(_t) :\
- ((_t->flags & STRCUR) && \
- (_t->stfmt == -1 || \
- _t->stfmt == CONVFMTidx))? \
- _t : r_force_string(_t))
-
-#endif /* not __GNUC__ */
-#endif /* not GAWKDEBUG */
+ _ts : format_val(CONVFMT, CONVFMTidx, _ts);})
+#else /* not __GNUC__ */
+#define force_number r_force_number
+#define force_string r_force_string
+#endif /* __GNUC__ */
+#endif /* GAWKDEBUG */
#define STREQ(a,b) (*(a) == *(b) && strcmp((a), (b)) == 0)
#define STREQN(a,b,n) ((n) && *(a)== *(b) && \
@@ -943,260 +1077,267 @@ extern double _msc51bug;
#define fatal set_loc(__FILE__, __LINE__), r_fatal
+
+extern jmp_buf fatal_tag;
+extern int fatal_tag_valid;
+
+#define PUSH_BINDING(stack) \
+if (fatal_tag_valid++) \
+ memcpy((char *) (stack), (const char *) fatal_tag, sizeof(jmp_buf))
+#define POP_BINDING(stack) \
+if (--fatal_tag_valid) \
+ memcpy((char *) fatal_tag, (const char *) (stack), sizeof(jmp_buf))
+
/* ------------- Function prototypes or defs (as appropriate) ------------- */
+typedef int (*Func_print)(FILE *, const char *, ...);
/* array.c */
-extern NODE *get_actual P((NODE *symbol, int canfatal));
-extern char *array_vname P((const NODE *symbol));
-extern void array_init P((void));
-extern NODE *concat_exp P((NODE *tree));
-extern void assoc_clear P((NODE *symbol));
-extern NODE *in_array P((NODE *symbol, NODE *subs));
-extern NODE **assoc_lookup P((NODE *symbol, NODE *subs, int reference));
-extern void do_delete P((NODE *symbol, NODE *tree));
-extern void do_delete_loop P((NODE *symbol, NODE *tree));
-extern void set_SUBSEP P((void));
-extern NODE *assoc_dump P((NODE *symbol));
-extern NODE *do_adump P((NODE *tree));
-extern NODE *do_asort P((NODE *tree));
-extern NODE *do_asorti P((NODE *tree));
-extern unsigned long (*hash)P((const char *s, size_t len, unsigned long hsize, size_t *code));
+extern NODE *get_array(NODE *symbol, int canfatal);
+extern char *array_vname(const NODE *symbol);
+extern char *make_aname(NODE *array, NODE *subs);
+extern void array_init(void);
+extern void set_SUBSEP(void);
+extern NODE *concat_exp(int nargs, int do_subsep);
+extern void ahash_unref(NODE *tmp);
+extern void assoc_clear(NODE *symbol);
+extern NODE *in_array(NODE *symbol, NODE *subs);
+extern NODE **assoc_lookup(NODE *symbol, NODE *subs, int reference);
+extern void do_delete(NODE *symbol, int nsubs);
+extern void do_delete_loop(NODE *symbol, NODE **lhs);
+extern NODE *assoc_dump(NODE *symbol, int indent_level);
+extern NODE *do_adump(int nargs);
+extern NODE *do_asort(int nargs);
+extern NODE *do_asorti(int nargs);
+extern unsigned long (*hash)(const char *s, size_t len, unsigned long hsize, size_t *code);
/* awkgram.c */
-extern char *tokexpand P((void));
-extern NODE *node P((NODE *left, NODETYPE op, NODE *right));
-extern NODE *install P((char *name, NODE *value));
-extern NODE *lookup P((const char *name));
-extern NODE *variable P((char *name, int can_free, NODETYPE type));
-extern int yyparse P((void));
-extern void dump_funcs P((void));
-extern void dump_vars P((const char *fname));
-extern void release_all_vars P((void));
-extern const char *getfname P((NODE *(*)(NODE *)));
-extern NODE *stopme P((NODE *tree));
-extern void shadow_funcs P((void));
-extern int check_special P((const char *name));
-extern void register_deferred_variable P((const char *name,
- NODE *(*load_func)(void)));
+extern NODE *mk_symbol(NODETYPE type, NODE *value);
+extern NODE *install_symbol(char *name, NODE *value);
+extern NODE *remove_symbol(char *name);
+extern NODE *lookup(const char *name);
+extern NODE *variable(char *name, NODETYPE type);
+extern int parse_program(INSTRUCTION **pcode);
+extern void dump_funcs(void);
+extern void dump_vars(const char *fname);
+extern void release_all_vars(void);
+extern const char *getfname(NODE *(*)(int));
+extern NODE *stopme(int nargs);
+extern void shadow_funcs(void);
+extern int check_special(const char *name);
+extern int foreach_func(int (*)(INSTRUCTION *, void *), int, void *);
+extern INSTRUCTION *bcalloc(OPCODE op, int size, int srcline);
+extern void bcfree(INSTRUCTION *);
+extern SRCFILE *add_srcfile(int stype, char *src, SRCFILE *curr, int *already_included, int *errcode);
+extern void register_deferred_variable(const char *name, NODE *(*load_func)(void));
+extern int files_are_same(struct stat *f1, struct stat *f2);
+extern void valinfo(NODE *n, Func_print print_func, FILE *fp);
+extern void print_vars(Func_print print_func, FILE *fp);
+extern CONTEXT *new_context(void);
+extern CONTEXT *set_context(CONTEXT *ctxt);
+extern CONTEXT *get_context(void);
+extern void free_context(CONTEXT *ctxt, int );
+extern void append_symbol(char *name);
+
/* builtin.c */
-extern double double_to_int P((double d));
-extern NODE *do_exp P((NODE *tree));
-extern NODE *do_fflush P((NODE *tree));
-extern NODE *do_index P((NODE *tree));
-extern NODE *do_int P((NODE *tree));
-extern NODE *do_length P((NODE *tree));
-extern NODE *do_log P((NODE *tree));
-extern NODE *do_mktime P((NODE *tree));
-extern NODE *do_sprintf P((NODE *tree));
-extern void do_printf P((NODE *tree));
-extern void print_simple P((NODE *tree, FILE *fp));
-extern NODE *do_sqrt P((NODE *tree));
-extern NODE *do_substr P((NODE *tree));
-extern NODE *do_strftime P((NODE *tree));
-extern NODE *do_systime P((NODE *tree));
-extern NODE *do_system P((NODE *tree));
-extern void do_print P((NODE *tree));
-extern void do_print_rec P((NODE *tree));
-extern NODE *do_tolower P((NODE *tree));
-extern NODE *do_toupper P((NODE *tree));
-extern NODE *do_atan2 P((NODE *tree));
-extern NODE *do_sin P((NODE *tree));
-extern NODE *do_cos P((NODE *tree));
-extern NODE *do_rand P((NODE *tree));
-extern NODE *do_srand P((NODE *tree));
-extern NODE *do_match P((NODE *tree));
-extern NODE *do_gsub P((NODE *tree));
-extern NODE *do_sub P((NODE *tree));
-extern NODE *do_gensub P((NODE *tree));
-extern NODE *format_tree P((const char *, size_t, NODE *, long));
-extern NODE *do_lshift P((NODE *tree));
-extern NODE *do_rshift P((NODE *tree));
-extern NODE *do_and P((NODE *tree));
-extern NODE *do_or P((NODE *tree));
-extern NODE *do_xor P((NODE *tree));
-extern NODE *do_compl P((NODE *tree));
-extern NODE *do_strtonum P((NODE *tree));
-extern AWKNUM nondec2awknum P((char *str, size_t len));
-extern NODE *do_dcgettext P((NODE *tree));
-extern NODE *do_dcngettext P((NODE *tree));
-extern NODE *do_bindtextdomain P((NODE *tree));
+extern double double_to_int(double d);
+extern NODE *do_exp(int nargs);
+extern NODE *do_fflush(int nargs);
+extern NODE *do_index(int nargs);
+extern NODE *do_int(int nargs);
+extern NODE *do_length(int nargs);
+extern NODE *do_log(int nargs);
+extern NODE *do_mktime(int nargs);
+extern NODE *do_sprintf(int nargs);
+extern void do_printf(int nargs, int redirtype);
+extern void print_simple(NODE *tree, FILE *fp);
+extern NODE *do_sqrt(int nargs);
+extern NODE *do_substr(int nargs);
+extern NODE *do_strftime(int nargs);
+extern NODE *do_systime(int nargs);
+extern NODE *do_system(int nargs);
+extern void do_print(int nargs, int redirtype);
+extern void do_print_rec(int args, int redirtype);
+extern NODE *do_tolower(int nargs);
+extern NODE *do_toupper(int nargs);
+extern NODE *do_atan2(int nargs);
+extern NODE *do_sin(int nargs);
+extern NODE *do_cos(int nargs);
+extern NODE *do_rand(int nargs);
+extern NODE *do_srand(int nargs);
+extern NODE *do_match(int nargs);
+extern NODE *do_gsub(int nargs);
+extern NODE *do_sub(int nargs);
+extern NODE *do_gensub(int nargs);
+extern NODE *format_tree(const char *, size_t, NODE **, long);
+extern NODE *do_lshift(int nargs);
+extern NODE *do_rshift(int nargs);
+extern NODE *do_and(int nargs);
+extern NODE *do_or(int nargs);
+extern NODE *do_xor(int nargs);
+extern NODE *do_compl(int nargs);
+extern NODE *do_strtonum(int nargs);
+extern AWKNUM nondec2awknum(char *str, size_t len);
+extern NODE *do_dcgettext(int nargs);
+extern NODE *do_dcngettext(int nargs);
+extern NODE *do_bindtextdomain(int nargs);
#ifdef MBS_SUPPORT
-extern int strncasecmpmbs P((const char *, mbstate_t, const char *,
- mbstate_t, size_t));
+extern int strncasecmpmbs(const char *, const char *, size_t);
#endif
/* eval.c */
-extern int interpret P((NODE *volatile tree));
-extern NODE *r_tree_eval P((NODE *tree, int iscond));
-extern int cmp_nodes P((NODE *t1, NODE *t2));
-extern NODE **r_get_lhs P((NODE *ptr, Func_ptr *assign, int reference));
-extern void set_IGNORECASE P((void));
-extern void set_OFS P((void));
-extern void set_ORS P((void));
-extern void set_OFMT P((void));
-extern void set_CONVFMT P((void));
-extern void set_BINMODE P((void));
-extern void set_LINT P((void));
-extern void set_TEXTDOMAIN P((void));
-extern void update_ERRNO P((void));
-extern void update_ERRNO_saved P((int));
-extern const char *redflags2str P((int));
-extern const char *flags2str P((int));
-extern const char *genflags2str P((int flagval, const struct flagtab *tab));
-extern const char *nodetype2str P((NODETYPE type));
-extern NODE *assign_val P((NODE **lhs_p, NODE *rhs));
-extern void load_casetable P((void));
-extern size_t get_curfunc_arg_count P((void));
-extern AWKNUM calc_exp P((AWKNUM x1, AWKNUM x2));
+extern void PUSH_CODE(INSTRUCTION *cp);
+extern INSTRUCTION *POP_CODE(void);
+extern int interpret(INSTRUCTION *);
+extern int cmp_nodes(NODE *, NODE *);
+extern void set_IGNORECASE(void);
+extern void set_OFS(void);
+extern void set_ORS(void);
+extern void set_OFMT(void);
+extern void set_CONVFMT(void);
+extern void set_BINMODE(void);
+extern void set_LINT(void);
+extern void set_TEXTDOMAIN(void);
+extern void update_ERRNO(void);
+extern void update_ERRNO_saved(int);
+extern void update_NR(void);
+extern void update_NF(void);
+extern void update_FNR(void);
+extern const char *redflags2str(int);
+extern const char *flags2str(int);
+extern const char *genflags2str(int flagval, const struct flagtab *tab);
+extern const char *nodetype2str(NODETYPE type);
+extern void load_casetable(void);
+
+extern AWKNUM calc_exp(AWKNUM x1, AWKNUM x2);
+extern const char *opcode2str(OPCODE type);
+extern const char *op2str(OPCODE type);
+extern NODE **r_get_lhs(NODE *n, int reference);
+extern STACK_ITEM *grow_stack(void);
#ifdef PROFILING
-extern void dump_fcall_stack P((FILE *fp));
+extern void dump_fcall_stack(FILE *fp);
#endif
/* ext.c */
-NODE *do_ext P((NODE *));
+NODE *do_ext(int nargs);
#ifdef DYNAMIC
-void make_builtin P((char *, NODE *(*)(NODE *), int));
-NODE *get_argument P((NODE *, int));
-NODE *get_actual_argument P((NODE *, unsigned int, int, int));
-#define get_scalar_argument(t, i, opt) get_actual_argument((t), (i), (opt), FALSE)
-#define get_array_argument(t, i, opt) get_actual_argument((t), (i), (opt), TRUE)
-void set_value P((NODE *));
+void make_builtin(char *, NODE *(*)(int), int);
+size_t get_curfunc_arg_count(void);
+NODE *get_argument(int);
+NODE *get_actual_argument(int, int, int);
+#define get_scalar_argument(i, opt) get_actual_argument((i), (opt), FALSE)
+#define get_array_argument(i, opt) get_actual_argument((i), (opt), TRUE)
#endif
/* field.c */
-extern void init_fields P((void));
-extern void set_record P((const char *buf, int cnt));
-extern void reset_record P((void));
-extern void set_NF P((void));
-extern NODE **get_field P((long num, Func_ptr *assign));
-extern NODE *do_split P((NODE *tree));
-extern NODE *do_patsplit P((NODE *tree));
-extern void set_FS P((void));
-extern void set_RS P((void));
-extern void set_FIELDWIDTHS P((void));
-extern void set_FPAT P((void));
-extern void update_PROCINFO_str P((char *subscript, char *str));
-extern void update_PROCINFO_num P((char *subscript, AWKNUM val));
+extern void init_fields(void);
+extern void set_record(const char *buf, int cnt);
+extern void reset_record(void);
+extern void set_NF(void);
+extern NODE **get_field(long num, Func_ptr *assign);
+extern NODE *do_split(int nargs);
+extern NODE *do_patsplit(int nargs);
+extern void set_FS(void);
+extern void set_RS(void);
+extern void set_FIELDWIDTHS(void);
+extern void set_FPAT(void);
+extern void update_PROCINFO_str(char *subscript, char *str);
+extern void update_PROCINFO_num(char *subscript, AWKNUM val);
typedef enum {
Using_FS,
Using_FIELDWIDTHS,
- Using_FPAT,
+ Using_FPAT
} field_sep_type;
-extern field_sep_type current_field_sep P((void));
-/* gawkmisc.c */
-extern char *gawk_name P((const char *filespec));
-extern void os_arg_fixup P((int *argcp, char ***argvp));
-extern int os_devopen P((const char *name, int flag));
-extern void os_close_on_exec P((int fd, const char *name, const char *what,
- const char *dir));
-extern int os_isdir P((int fd));
-extern int os_is_setuid P((void));
-extern int os_setbinmode P((int fd, int mode));
-extern void os_restore_mode P((int fd));
-extern size_t optimal_bufsize P((int fd, struct stat *sbuf));
-extern int ispath P((const char *file));
-extern int isdirpunct P((int c));
+extern field_sep_type current_field_sep(void);
-#if HAVE_MEMCPY_ULONG
-extern char *memcpy_ulong P((char *dest, const char *src, unsigned long l));
-#define memcpy memcpy_ulong
-#endif
-#if HAVE_MEMSET_ULONG
-extern void *memset_ulong P((void *dest, int val, unsigned long l));
-#define memset memset_ulong
-#endif
+/* gawkmisc.c */
+extern char *gawk_name(const char *filespec);
+extern void os_arg_fixup(int *argcp, char ***argvp);
+extern int os_devopen(const char *name, int flag);
+extern void os_close_on_exec(int fd, const char *name, const char *what, const char *dir);
+extern int os_isdir(int fd);
+extern int os_is_setuid(void);
+extern int os_setbinmode(int fd, int mode);
+extern void os_restore_mode(int fd);
+extern size_t optimal_bufsize(int fd, struct stat *sbuf);
+extern int ispath(const char *file);
+extern int isdirpunct(int c);
/* io.c */
-extern void register_open_hook P((void *(*open_func)(IOBUF *)));
-extern void set_FNR P((void));
-extern void set_NR P((void));
-extern void do_input P((void));
-extern struct redirect *redirect P((NODE *tree, int *errflg));
-extern NODE *do_close P((NODE *tree));
-extern int flush_io P((void));
-extern int close_io P((int *stdio_problem));
-extern int devopen P((const char *name, const char *mode, int *isdir));
-extern int pathopen P((const char *file));
-extern NODE *do_getline P((NODE *tree));
-extern void do_nextfile P((void));
-extern struct redirect *getredirect P((const char *str, int len));
+extern void register_open_hook(void *(*open_func)(IOBUF *));
+extern void set_FNR(void);
+extern void set_NR(void);
+
+extern struct redirect *redirect(NODE *redir_exp, int redirtype, int *errflg);
+extern NODE *do_close(int nargs);
+extern int flush_io(void);
+extern int close_io(int *stdio_problem);
+extern int devopen(const char *name, const char *mode);
+extern int srcopen(SRCFILE *s);
+extern char *find_source(const char *src, struct stat *stb, int *errcode);
+extern NODE *do_getline_redir(int intovar, int redirtype);
+extern NODE *do_getline(int intovar, IOBUF *iop);
+extern struct redirect *getredirect(const char *str, int len);
+extern int inrec(IOBUF *iop);
+extern int nextfile(IOBUF **curfile, int skipping);
/* main.c */
-extern int main P((int argc, char **argv));
-extern int arg_assign P((char *arg, int initing));
-extern int is_std_var P((const char *var));
+extern int arg_assign(char *arg, int initing);
+extern int is_std_var(const char *var);
+extern char *estrdup(const char *str, size_t len);
+extern void update_global_values();
/* msg.c */
-extern void err P((const char *s, const char *emsg, va_list argp)) ATTRIBUTE_PRINTF(2, 0);
-#if _MSC_VER == 510
-extern void msg P((va_list va_alist, ...));
-extern void error P((va_list va_alist, ...));
-extern void warning P((va_list va_alist, ...));
-extern void set_loc P((const char *file, int line));
-extern void r_fatal P((va_list va_alist, ...));
-extern void (*lintfunc) P((va_list va_alist, ...));
-#else
-#if defined(HAVE_STDARG_H) && defined(__STDC__) && __STDC__
+extern void gawk_exit(int status);
+extern void err(const char *s, const char *emsg, va_list argp) ATTRIBUTE_PRINTF(2, 0);
extern void msg (const char *mesg, ...) ATTRIBUTE_PRINTF_1;
extern void error (const char *mesg, ...) ATTRIBUTE_PRINTF_1;
extern void warning (const char *mesg, ...) ATTRIBUTE_PRINTF_1;
extern void set_loc (const char *file, int line);
-extern void r_fatal (const char *mesg, ...) ATTRIBUTE_PRINTF_1 ATTRIBUTE_NORETURN;
-ATTRIBUTE_EXPORTED
+extern void r_fatal (const char *mesg, ...) ATTRIBUTE_PRINTF_1;
#if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 2)
extern void (*lintfunc) (const char *mesg, ...) ATTRIBUTE_PRINTF_1;
#else
extern void (*lintfunc) (const char *mesg, ...);
#endif
-#else
-extern void msg ();
-extern void error ();
-extern void warning ();
-extern void set_loc ();
-extern void r_fatal ();
-extern void (*lintfunc) ();
-#endif
-#endif
/* profile.c */
-extern void init_profiling P((int *flag, const char *def_file));
-extern void init_profiling_signals P((void));
-extern void set_prof_file P((const char *filename));
-extern void dump_prog P((NODE *begin, NODE *beginfile, NODE *prog, NODE *endfile, NODE *end));
-extern void pp_func P((const char *name, size_t namelen, NODE *f));
-extern void pp_string_fp P((FILE *fp, const char *str, size_t namelen,
- int delim, int breaklines));
+extern void init_profiling(int *flag, const char *def_file);
+extern void init_profiling_signals(void);
+extern void set_prof_file(const char *filename);
+extern void dump_prog(INSTRUCTION *code);
+extern char *pp_number(AWKNUM d);
+extern char *pp_string(const char *in_str, size_t len, int delim);
+extern char *pp_node(NODE *n);
+extern int pp_func(INSTRUCTION *pc, void *);
+extern void pp_string_fp(Func_print print_func, FILE *fp, const char *str,
+ size_t namelen, int delim, int breaklines);
/* node.c */
-extern AWKNUM r_force_number P((NODE *n));
-extern NODE *format_val P((const char *format, int index, NODE *s));
-extern NODE *r_force_string P((NODE *s));
-extern NODE *r_dupnode P((NODE *n));
-extern NODE *copynode P((NODE *n));
-extern NODE *mk_number P((AWKNUM x, unsigned int flags));
-extern NODE *make_str_node P((char *s, unsigned long len, int scan ));
-extern NODE *tmp_string P((char *s, size_t len ));
-extern NODE *more_nodes P((void));
-#ifdef MEMDEBUG
-extern void freenode P((NODE *it));
-#endif
-extern void unref P((NODE *tmp));
-extern int parse_escape P((const char **string_ptr));
+extern AWKNUM r_force_number(NODE *n);
+extern NODE *format_val(const char *format, int index, NODE *s);
+extern NODE *r_force_string(NODE *s);
+extern NODE *dupnode(NODE *n);
+extern NODE *mk_number(AWKNUM x, unsigned int flags);
+extern NODE *r_make_str_node(char *s, unsigned long len, int scan);
+extern NODE *more_nodes(void);
+extern void unref(NODE *tmp);
+extern int parse_escape(const char **string_ptr);
#ifdef MBS_SUPPORT
-extern NODE *str2wstr P((NODE *n, size_t **ptr));
+extern NODE *str2wstr(NODE *n, size_t **ptr);
#define force_wstring(n) str2wstr(n, NULL)
-extern const wchar_t *wstrstr P((const wchar_t *haystack, size_t hs_len, const wchar_t *needle, size_t needle_len));
-extern const wchar_t *wcasestrstr P((const wchar_t *haystack, size_t hs_len, const wchar_t *needle, size_t needle_len));
-extern void free_wstr P((NODE *n));
+extern const wchar_t *wstrstr(const wchar_t *haystack, size_t hs_len,
+ const wchar_t *needle, size_t needle_len);
+extern const wchar_t *wcasestrstr(const wchar_t *haystack, size_t hs_len,
+ const wchar_t *needle, size_t needle_len);
+extern void free_wstr(NODE *n);
#else
#define free_wstr(NODE) /* empty */
#endif
/* re.c */
-extern Regexp *make_regexp P((const char *s, size_t len, int ignorecase, int dfa));
-extern int research P((Regexp *rp, char *str, int start,
- size_t len, int flags));
-extern void refree P((Regexp *rp));
-extern void reg_error P((const char *s));
-extern Regexp *re_update P((NODE *t));
-extern void resyntax P((int syntax));
-extern void resetup P((void));
-extern int avoid_dfa P((NODE *re, char *str, size_t len)); /* temporary */
-extern int reisstring P((const char *text, size_t len, Regexp *re, const char *buf));
-extern int remaybelong P((const char *text, size_t len));
-extern int isnondecimal P((const char *str, int use_locale));
+extern Regexp *make_regexp(const char *s, size_t len, int ignorecase, int dfa, int canfatal);
+extern int research(Regexp *rp, char *str, int start, size_t len, int flags);
+extern void refree(Regexp *rp);
+extern void reg_error(const char *s);
+extern Regexp *re_update(NODE *t);
+extern void resyntax(int syntax);
+extern void resetup(void);
+extern int avoid_dfa(NODE *re, char *str, size_t len);
+extern int reisstring(const char *text, size_t len, Regexp *re, const char *buf);
+extern int remaybelong(const char *text, size_t len);
+extern int isnondecimal(const char *str, int use_locale);
/* floatcomp.c */
#ifdef VMS /* VMS linker weirdness? */
@@ -1204,49 +1345,27 @@ extern int isnondecimal P((const char *str, int use_locale));
#define Floor gawk_floor
#endif
-extern AWKNUM Floor P((AWKNUM n));
-extern AWKNUM Ceil P((AWKNUM n));
+extern AWKNUM Floor(AWKNUM n);
+extern AWKNUM Ceil(AWKNUM n);
#ifdef HAVE_UINTMAX_T
-extern uintmax_t adjust_uint P((uintmax_t n));
+extern uintmax_t adjust_uint(uintmax_t n);
#else
#define adjust_uint(n) (n)
#endif
-/* strncasecmp.c */
-#ifndef BROKEN_STRNCASECMP
-extern int strcasecmp P((const char *s1, const char *s2));
-extern int strncasecmp P((const char *s1, const char *s2, register size_t n));
-#endif
-
-#if defined(atarist)
-#if defined(PIPES_SIMULATED)
-/* unsupported/atari/tmpnam.c */
-extern char *tmpnam P((char *buf));
-extern char *tempnam P((const char *path, const char *base));
-#else
-#include <wait.h>
-#endif
-#include <fcntl.h>
-#define INVALID_HANDLE (__SMALLEST_VALID_HANDLE - 1)
-#else
#define INVALID_HANDLE (-1)
-#endif /* atarist */
#ifdef HAVE_SYS_WAIT_H
#include <sys/wait.h>
#endif
#ifndef WEXITSTATUS
-#if defined(_MSC_VER) || defined(VMS)
+#if defined(VMS)
#define WEXITSTATUS(stat_val) (stat_val)
-#else /* ! (defined(_MSC_VER) || defined(VMS)) */
+#else /* ! defined(VMS) */
#define WEXITSTATUS(stat_val) ((((unsigned) (stat_val)) >> 8) & 0xFF)
#endif /* ! (defined(_MSC_VER) || defined(VMS)) */
#endif /* WEXITSTATUS */
-#ifndef STATIC
-#define STATIC static
-#endif
-
/* EXIT_SUCCESS and EXIT_FAILURE normally come from <stdlib.h> */
#ifndef EXIT_SUCCESS
# define EXIT_SUCCESS 0
diff --git a/awkgram.c b/awkgram.c
index b52a6bb3..607247ce 100644
--- a/awkgram.c
+++ b/awkgram.c
@@ -80,64 +80,103 @@
#define signed /**/
#endif
-#define CAN_FREE TRUE
-#define DONT_FREE FALSE
-
-#ifdef CAN_USE_STDARG_H
static void yyerror(const char *m, ...) ATTRIBUTE_PRINTF_1;
-#else
-static void yyerror(); /* va_alist */
-#endif
-static char *get_src_buf P((void));
-static int yylex P((void));
-static NODE *node_common P((NODETYPE op));
-static NODE *snode P((NODE *subn, NODETYPE op, int sindex));
-static NODE *make_for_loop P((NODE *init, NODE *cond, NODE *incr));
-static NODE *append_right P((NODE *list, NODE *new));
-static inline NODE *append_pattern P((NODE **list, NODE *patt));
-static void func_install P((NODE *params, NODE *def));
-static void pop_var P((NODE *np, int freeit));
-static void pop_params P((NODE *params));
-static NODE *make_param P((char *name));
-static NODE *mk_rexp P((NODE *exp));
-static int dup_parms P((NODE *func));
-static void param_sanity P((NODE *arglist));
-static int parms_shadow P((const char *fname, NODE *func));
-static int isnoeffect P((NODETYPE t));
-static int isassignable P((NODE *n));
-static void dumpintlstr P((const char *str, size_t len));
-static void dumpintlstr2 P((const char *str1, size_t len1, const char *str2, size_t len2));
-static void count_args P((NODE *n));
-static int isarray P((NODE *n));
+static char *get_src_buf(void);
+static int yylex(void);
+int yyparse(void);
+static INSTRUCTION *snode(INSTRUCTION *subn, INSTRUCTION *op);
+static int func_install(INSTRUCTION *fp, INSTRUCTION *def);
+static void pop_params(NODE *params);
+static NODE *make_param(char *pname);
+static NODE *mk_rexp(INSTRUCTION *exp);
+static void append_param(char *pname);
+static int dup_parms(NODE *func);
+static void param_sanity(INSTRUCTION *arglist);
+static int parms_shadow(INSTRUCTION *pc, int *shadow);
+static int isnoeffect(OPCODE type);
+static INSTRUCTION *make_assignable(INSTRUCTION *ip);
+static void dumpintlstr(const char *str, size_t len);
+static void dumpintlstr2(const char *str1, size_t len1, const char *str2, size_t len2);
+static int isarray(NODE *n);
+static int include_source(char *src);
+static void next_sourcefile(void);
+static char *tokexpand(void);
+
+#define instruction(t) bcalloc(t, 1, 0)
+
+static INSTRUCTION *mk_program(void);
+static INSTRUCTION *append_rule(INSTRUCTION *pattern, INSTRUCTION *action);
+static INSTRUCTION *mk_condition(INSTRUCTION *cond, INSTRUCTION *ifp, INSTRUCTION *true_branch,
+ INSTRUCTION *elsep, INSTRUCTION *false_branch);
+static INSTRUCTION *mk_expression_list(INSTRUCTION *list, INSTRUCTION *s1);
+static INSTRUCTION *mk_for_loop(INSTRUCTION *forp, INSTRUCTION *init, INSTRUCTION *cond,
+ INSTRUCTION *incr, INSTRUCTION *body);
+static void fix_break_continue(INSTRUCTION *start, INSTRUCTION *end, int check_continue);
+static INSTRUCTION *mk_binary(INSTRUCTION *s1, INSTRUCTION *s2, INSTRUCTION *op);
+static INSTRUCTION *mk_boolean(INSTRUCTION *left, INSTRUCTION *right, INSTRUCTION *op);
+static INSTRUCTION *mk_assignment(INSTRUCTION *lhs, INSTRUCTION *rhs, INSTRUCTION *op);
+static INSTRUCTION *mk_getline(INSTRUCTION *op, INSTRUCTION *opt_var, INSTRUCTION *redir, OPCODE redirtype);
+static NODE *make_regnode(int type, NODE *exp);
+static int count_expressions(INSTRUCTION **list, int isarg);
+static INSTRUCTION *optimize_assignment(INSTRUCTION *exp);
+static void add_lint(INSTRUCTION *list, LINTTYPE linttype);
enum defref { FUNC_DEFINE, FUNC_USE };
-static void func_use P((const char *name, enum defref how));
-static void check_funcs P((void));
+static void func_use(const char *name, enum defref how);
+static void check_funcs(void);
+static void free_bcpool(INSTRUCTION *pl);
-static ssize_t read_one_line P((int fd, void *buffer, size_t count));
-static int one_line_close P((int fd));
+static ssize_t read_one_line(int fd, void *buffer, size_t count);
+static int one_line_close(int fd);
-static NODE *constant_fold P((NODE *left, NODETYPE op, NODE *right));
-static NODE *optimize_concat P((NODE *left, NODETYPE op, NODE *right));
+static void (*install_func)(char *) = NULL;
+static int want_source = FALSE;
static int want_regexp; /* lexical scanning kludge */
static int can_return; /* parsing kludge */
-static int begin_or_end_rule = FALSE; /* parsing kludge */
-static int parsing_end_rule = FALSE; /* for warnings */
-static int beginfile_or_endfile_rule = FALSE; /* parsing kludge */
-static int parsing_endfile_rule = FALSE; /* for warnings */
+static int rule = 0;
+
+const char *const ruletab[] = {
+ "?",
+ "BEGIN",
+ "Rule",
+ "END",
+ "BEGINFILE",
+ "ENDFILE",
+};
+
static int in_print = FALSE; /* lexical scanning kludge for print */
static int in_parens = 0; /* lexical scanning kludge for print */
-static char *lexptr; /* pointer to next char during parsing */
+static int sub_counter = 0; /* array dimension counter for use in delete */
+static char *lexptr = NULL; /* pointer to next char during parsing */
static char *lexend;
static char *lexptr_begin; /* keep track of where we were for error msgs */
static char *lexeme; /* beginning of lexeme for debugging */
+static int lexeof; /* seen EOF for current source? */
static char *thisline = NULL;
+static int in_braces = 0; /* count braces for firstline, lastline in an 'action' */
+static int lastline = 0;
+static int firstline = 0;
+static SRCFILE *sourcefile = NULL; /* current program source */
+static int lasttok = 0;
+static int eof_warned = FALSE; /* GLOBAL: want warning for each file */
+static int break_allowed; /* kludge for break */
+static int continue_allowed; /* kludge for continue */
+
+
+#define END_FILE -1000
+#define END_SRC -2000
+
#define YYDEBUG_LEXER_TEXT (lexeme)
static int param_counter;
+static NODE *func_params; /* list of parameters for the current function */
static char *tokstart = NULL;
static char *tok = NULL;
static char *tokend;
+static int errcount = 0;
+
+static NODE *symbol_list;
+extern void destroy_symbol(char *name);
static long func_count; /* total number of functions */
@@ -147,14 +186,25 @@ static int var_count; /* total number of global variables */
extern char *source;
extern int sourceline;
-extern struct src *srcfiles;
-extern long numfiles;
-extern int errcount;
-extern NODE *begin_block;
-extern NODE *end_block;
-extern NODE *beginfile_block;
-extern NODE *endfile_block;
+extern SRCFILE *srcfiles;
+extern INSTRUCTION *rule_list;
+extern int max_args;
+
+static INSTRUCTION *rule_block[sizeof(ruletab)];
+static INSTRUCTION *ip_rec;
+static INSTRUCTION *ip_newfile;
+static INSTRUCTION *ip_atexit = NULL;
+static INSTRUCTION *ip_end;
+static INSTRUCTION *ip_endfile;
+static INSTRUCTION *ip_beginfile;
+
+static inline INSTRUCTION *list_create(INSTRUCTION *x);
+static inline INSTRUCTION *list_append(INSTRUCTION *l, INSTRUCTION *x);
+static inline INSTRUCTION *list_prepend(INSTRUCTION *l, INSTRUCTION *x);
+static inline INSTRUCTION *list_merge(INSTRUCTION *l1, INSTRUCTION *l2);
+
+extern double fmod(double x, double y);
/*
* This string cannot occur as a real awk identifier.
* Use it as a special token to make function parsing
@@ -166,9 +216,11 @@ extern NODE *endfile_block;
*/
static char builtin_func[] = "@builtin";
+#define YYSTYPE INSTRUCTION *
+
/* Line 189 of yacc.c */
-#line 172 "awkgram.c"
+#line 224 "awkgram.c"
/* Enabling traces. */
#ifndef YYDEBUG
@@ -198,7 +250,7 @@ static char builtin_func[] = "@builtin";
FUNC_CALL = 258,
NAME = 259,
REGEXP = 260,
- ERROR = 261,
+ FILENAME = 261,
YNUMBER = 262,
YSTRING = 263,
RELOP = 264,
@@ -208,46 +260,50 @@ static char builtin_func[] = "@builtin";
ASSIGN = 268,
MATCHOP = 269,
CONCAT_OP = 270,
- LEX_BEGIN = 271,
- LEX_END = 272,
- LEX_IF = 273,
- LEX_ELSE = 274,
- LEX_RETURN = 275,
- LEX_DELETE = 276,
- LEX_BEGINFILE = 277,
- LEX_ENDFILE = 278,
- LEX_SWITCH = 279,
- LEX_CASE = 280,
- LEX_DEFAULT = 281,
- LEX_WHILE = 282,
- LEX_DO = 283,
- LEX_FOR = 284,
- LEX_BREAK = 285,
- LEX_CONTINUE = 286,
- LEX_PRINT = 287,
- LEX_PRINTF = 288,
- LEX_NEXT = 289,
- LEX_EXIT = 290,
- LEX_FUNCTION = 291,
- LEX_GETLINE = 292,
- LEX_NEXTFILE = 293,
- LEX_IN = 294,
- LEX_AND = 295,
- LEX_OR = 296,
- INCREMENT = 297,
- DECREMENT = 298,
- LEX_BUILTIN = 299,
- LEX_LENGTH = 300,
- NEWLINE = 301,
- SLASH_BEFORE_EQUAL = 302,
- UNARY = 303
+ SUBSCRIPT = 271,
+ LEX_BEGIN = 272,
+ LEX_END = 273,
+ LEX_IF = 274,
+ LEX_ELSE = 275,
+ LEX_RETURN = 276,
+ LEX_DELETE = 277,
+ LEX_SWITCH = 278,
+ LEX_CASE = 279,
+ LEX_DEFAULT = 280,
+ LEX_WHILE = 281,
+ LEX_DO = 282,
+ LEX_FOR = 283,
+ LEX_BREAK = 284,
+ LEX_CONTINUE = 285,
+ LEX_PRINT = 286,
+ LEX_PRINTF = 287,
+ LEX_NEXT = 288,
+ LEX_EXIT = 289,
+ LEX_FUNCTION = 290,
+ LEX_BEGINFILE = 291,
+ LEX_ENDFILE = 292,
+ LEX_GETLINE = 293,
+ LEX_NEXTFILE = 294,
+ LEX_IN = 295,
+ LEX_AND = 296,
+ LEX_OR = 297,
+ INCREMENT = 298,
+ DECREMENT = 299,
+ LEX_BUILTIN = 300,
+ LEX_LENGTH = 301,
+ LEX_EOF = 302,
+ LEX_INCLUDE = 303,
+ LEX_EVAL = 304,
+ NEWLINE = 305,
+ SLASH_BEFORE_EQUAL = 306,
+ UNARY = 307
};
#endif
/* Tokens. */
#define FUNC_CALL 258
#define NAME 259
#define REGEXP 260
-#define ERROR 261
+#define FILENAME 261
#define YNUMBER 262
#define YSTRING 263
#define RELOP 264
@@ -257,62 +313,49 @@ static char builtin_func[] = "@builtin";
#define ASSIGN 268
#define MATCHOP 269
#define CONCAT_OP 270
-#define LEX_BEGIN 271
-#define LEX_END 272
-#define LEX_IF 273
-#define LEX_ELSE 274
-#define LEX_RETURN 275
-#define LEX_DELETE 276
-#define LEX_BEGINFILE 277
-#define LEX_ENDFILE 278
-#define LEX_SWITCH 279
-#define LEX_CASE 280
-#define LEX_DEFAULT 281
-#define LEX_WHILE 282
-#define LEX_DO 283
-#define LEX_FOR 284
-#define LEX_BREAK 285
-#define LEX_CONTINUE 286
-#define LEX_PRINT 287
-#define LEX_PRINTF 288
-#define LEX_NEXT 289
-#define LEX_EXIT 290
-#define LEX_FUNCTION 291
-#define LEX_GETLINE 292
-#define LEX_NEXTFILE 293
-#define LEX_IN 294
-#define LEX_AND 295
-#define LEX_OR 296
-#define INCREMENT 297
-#define DECREMENT 298
-#define LEX_BUILTIN 299
-#define LEX_LENGTH 300
-#define NEWLINE 301
-#define SLASH_BEFORE_EQUAL 302
-#define UNARY 303
+#define SUBSCRIPT 271
+#define LEX_BEGIN 272
+#define LEX_END 273
+#define LEX_IF 274
+#define LEX_ELSE 275
+#define LEX_RETURN 276
+#define LEX_DELETE 277
+#define LEX_SWITCH 278
+#define LEX_CASE 279
+#define LEX_DEFAULT 280
+#define LEX_WHILE 281
+#define LEX_DO 282
+#define LEX_FOR 283
+#define LEX_BREAK 284
+#define LEX_CONTINUE 285
+#define LEX_PRINT 286
+#define LEX_PRINTF 287
+#define LEX_NEXT 288
+#define LEX_EXIT 289
+#define LEX_FUNCTION 290
+#define LEX_BEGINFILE 291
+#define LEX_ENDFILE 292
+#define LEX_GETLINE 293
+#define LEX_NEXTFILE 294
+#define LEX_IN 295
+#define LEX_AND 296
+#define LEX_OR 297
+#define INCREMENT 298
+#define DECREMENT 299
+#define LEX_BUILTIN 300
+#define LEX_LENGTH 301
+#define LEX_EOF 302
+#define LEX_INCLUDE 303
+#define LEX_EVAL 304
+#define NEWLINE 305
+#define SLASH_BEFORE_EQUAL 306
+#define UNARY 307
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
-typedef union YYSTYPE
-{
-
-/* Line 214 of yacc.c */
-#line 124 "awkgram.y"
-
- long lval;
- AWKNUM fval;
- NODE *nodeval;
- NODETYPE nodetypeval;
- char *sval;
- NODE *(*ptrval) P((void));
-
-
-
-/* Line 214 of yacc.c */
-#line 315 "awkgram.c"
-} YYSTYPE;
+typedef int YYSTYPE;
# define YYSTYPE_IS_TRIVIAL 1
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
# define YYSTYPE_IS_DECLARED 1
@@ -323,7 +366,7 @@ typedef union YYSTYPE
/* Line 264 of yacc.c */
-#line 327 "awkgram.c"
+#line 370 "awkgram.c"
#ifdef short
# undef short
@@ -395,8 +438,7 @@ typedef short int yytype_int16;
#ifndef lint
# define YYID(n) (n)
#else
-#if (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
+#if (defined __STDC__ || defined __C99__FUNC__ || defined __cplusplus || defined _MSC_VER)
static int
YYID (int yyi)
#else
@@ -479,9 +521,7 @@ void free (void *); /* INFRINGES ON USER NAME SPACE */
#endif /* ! defined yyoverflow || YYERROR_VERBOSE */
-#if (! defined yyoverflow \
- && (! defined __cplusplus \
- || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
+#if (! defined yyoverflow && (! defined __cplusplus || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
/* A type that is properly aligned for any stack member. */
union yyalloc
@@ -536,22 +576,22 @@ union yyalloc
#endif
/* YYFINAL -- State number of the termination state. */
-#define YYFINAL 5
+#define YYFINAL 2
/* YYLAST -- Last index in YYTABLE. */
-#define YYLAST 1105
+#define YYLAST 1142
/* YYNTOKENS -- Number of terminals. */
-#define YYNTOKENS 70
+#define YYNTOKENS 74
/* YYNNTS -- Number of nonterminals. */
-#define YYNNTS 58
+#define YYNNTS 66
/* YYNRULES -- Number of rules. */
-#define YYNRULES 170
+#define YYNRULES 186
/* YYNRULES -- Number of states. */
-#define YYNSTATES 314
+#define YYNSTATES 330
/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
#define YYUNDEFTOK 2
-#define YYMAXUTOK 303
+#define YYMAXUTOK 307
#define YYTRANSLATE(YYX) \
((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
@@ -562,16 +602,16 @@ static const yytype_uint8 yytranslate[] =
0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 58, 2, 2, 61, 57, 2, 2,
- 62, 63, 55, 53, 50, 54, 2, 56, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 49, 69,
- 51, 2, 52, 48, 66, 2, 2, 2, 2, 2,
+ 2, 2, 2, 62, 2, 2, 65, 61, 2, 2,
+ 66, 67, 59, 57, 54, 58, 2, 60, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 53, 73,
+ 55, 2, 56, 52, 68, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 64, 2, 65, 60, 2, 2, 2, 2, 2,
+ 2, 69, 2, 70, 64, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 67, 2, 68, 2, 2, 2, 2,
+ 2, 2, 2, 71, 2, 72, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
@@ -589,7 +629,7 @@ static const yytype_uint8 yytranslate[] =
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, 59
+ 45, 46, 47, 48, 49, 50, 51, 63
};
#if YYDEBUG
@@ -597,106 +637,112 @@ static const yytype_uint8 yytranslate[] =
YYRHS. */
static const yytype_uint16 yyprhs[] =
{
- 0, 0, 3, 7, 8, 11, 14, 17, 20, 23,
- 24, 26, 30, 32, 34, 36, 38, 44, 46, 48,
- 50, 52, 54, 55, 63, 64, 68, 70, 72, 73,
- 76, 79, 81, 84, 87, 91, 93, 103, 110, 119,
- 128, 141, 153, 156, 159, 162, 165, 169, 170, 175,
- 178, 179, 184, 190, 193, 198, 200, 201, 203, 205,
- 206, 209, 212, 218, 223, 225, 228, 231, 233, 235,
- 237, 239, 241, 247, 248, 249, 253, 260, 270, 272,
- 275, 276, 278, 279, 282, 283, 285, 287, 291, 293,
- 296, 300, 301, 303, 304, 306, 308, 312, 314, 317,
- 321, 325, 329, 333, 337, 341, 345, 349, 355, 357,
- 359, 361, 364, 366, 368, 370, 372, 374, 376, 379,
- 381, 385, 389, 393, 397, 401, 405, 409, 412, 415,
- 421, 426, 430, 434, 438, 442, 446, 450, 452, 455,
- 459, 464, 469, 471, 473, 475, 478, 481, 483, 485,
- 488, 491, 493, 496, 501, 502, 504, 506, 511, 513,
- 517, 519, 521, 522, 525, 528, 530, 531, 533, 535,
- 537
+ 0, 0, 3, 4, 7, 10, 13, 16, 19, 22,
+ 25, 30, 32, 35, 37, 38, 40, 44, 46, 48,
+ 50, 52, 58, 60, 62, 64, 67, 69, 71, 72,
+ 80, 81, 85, 87, 89, 90, 93, 96, 98, 101,
+ 104, 108, 110, 120, 127, 136, 145, 158, 170, 172,
+ 175, 178, 181, 184, 188, 189, 194, 197, 198, 203,
+ 204, 209, 214, 216, 217, 219, 221, 222, 225, 228,
+ 234, 239, 241, 244, 247, 249, 251, 253, 255, 257,
+ 261, 262, 263, 267, 274, 284, 286, 289, 290, 292,
+ 293, 296, 297, 299, 301, 305, 307, 310, 314, 315,
+ 317, 318, 320, 322, 326, 328, 331, 335, 339, 343,
+ 347, 351, 355, 359, 363, 369, 371, 373, 375, 378,
+ 380, 382, 384, 386, 388, 390, 393, 395, 399, 403,
+ 407, 411, 415, 419, 423, 426, 429, 435, 440, 444,
+ 448, 452, 456, 460, 464, 466, 469, 473, 478, 483,
+ 485, 487, 489, 492, 495, 497, 499, 502, 505, 507,
+ 510, 515, 516, 518, 519, 522, 524, 527, 529, 533,
+ 535, 538, 541, 543, 546, 548, 552, 554, 556, 557,
+ 560, 563, 565, 566, 568, 570, 572
};
/* YYRHS -- A `-1'-separated list of the rules' RHS. */
-static const yytype_int8 yyrhs[] =
+static const yytype_int16 yyrhs[] =
{
- 71, 0, -1, 100, 72, 100, -1, -1, 72, 73,
- -1, 72, 1, -1, 74, 75, -1, 74, 84, -1,
- 78, 75, -1, -1, 107, -1, 107, 50, 107, -1,
- 16, -1, 17, -1, 22, -1, 23, -1, 121, 83,
- 122, 124, 100, -1, 4, -1, 3, -1, 77, -1,
- 44, -1, 45, -1, -1, 36, 79, 76, 62, 102,
- 123, 100, -1, -1, 82, 81, 5, -1, 56, -1,
- 47, -1, -1, 83, 85, -1, 83, 1, -1, 99,
- -1, 125, 100, -1, 125, 100, -1, 121, 83, 122,
- -1, 98, -1, 24, 62, 107, 123, 100, 121, 90,
- 100, 122, -1, 27, 62, 107, 123, 100, 85, -1,
- 28, 100, 85, 27, 62, 107, 123, 100, -1, 29,
- 62, 4, 39, 4, 123, 100, 85, -1, 29, 62,
- 89, 125, 100, 107, 125, 100, 89, 123, 100, 85,
- -1, 29, 62, 89, 125, 100, 125, 100, 89, 123,
- 100, 85, -1, 30, 84, -1, 31, 84, -1, 34,
- 84, -1, 38, 84, -1, 35, 104, 84, -1, -1,
- 20, 86, 104, 84, -1, 87, 84, -1, -1, 94,
- 88, 95, 96, -1, 21, 4, 64, 106, 65, -1,
- 21, 4, -1, 21, 62, 4, 63, -1, 107, -1,
- -1, 87, -1, 91, -1, -1, 91, 92, -1, 91,
- 1, -1, 25, 93, 126, 100, 83, -1, 26, 126,
- 100, 83, -1, 7, -1, 54, 7, -1, 53, 7,
- -1, 8, -1, 80, -1, 32, -1, 33, -1, 105,
- -1, 62, 107, 127, 106, 123, -1, -1, -1, 10,
- 97, 111, -1, 18, 62, 107, 123, 100, 85, -1,
- 18, 62, 107, 123, 100, 85, 19, 100, 85, -1,
- 46, -1, 99, 46, -1, -1, 99, -1, -1, 51,
- 112, -1, -1, 103, -1, 4, -1, 103, 127, 4,
- -1, 1, -1, 103, 1, -1, 103, 127, 1, -1,
- -1, 107, -1, -1, 106, -1, 107, -1, 106, 127,
- 107, -1, 1, -1, 106, 1, -1, 106, 1, 107,
- -1, 106, 127, 1, -1, 118, 108, 107, -1, 107,
- 40, 107, -1, 107, 41, 107, -1, 107, 14, 107,
- -1, 107, 39, 4, -1, 107, 110, 107, -1, 107,
- 48, 107, 49, 107, -1, 111, -1, 13, -1, 12,
- -1, 47, 13, -1, 9, -1, 51, -1, 109, -1,
- 52, -1, 112, -1, 113, -1, 111, 112, -1, 114,
- -1, 112, 60, 112, -1, 112, 55, 112, -1, 112,
- 56, 112, -1, 112, 57, 112, -1, 112, 53, 112,
- -1, 112, 54, 112, -1, 37, 117, 101, -1, 118,
- 42, -1, 118, 43, -1, 62, 106, 123, 39, 4,
- -1, 111, 11, 37, 117, -1, 113, 60, 112, -1,
- 113, 55, 112, -1, 113, 56, 112, -1, 113, 57,
- 112, -1, 113, 53, 112, -1, 113, 54, 112, -1,
- 80, -1, 58, 112, -1, 62, 107, 123, -1, 44,
- 62, 105, 123, -1, 45, 62, 105, 123, -1, 45,
- -1, 115, -1, 118, -1, 42, 118, -1, 43, 118,
- -1, 7, -1, 8, -1, 54, 112, -1, 53, 112,
- -1, 116, -1, 66, 116, -1, 3, 62, 105, 123,
- -1, -1, 118, -1, 4, -1, 4, 64, 106, 65,
- -1, 119, -1, 61, 114, 120, -1, 42, -1, 43,
- -1, -1, 67, 100, -1, 68, 100, -1, 63, -1,
- -1, 125, -1, 69, -1, 49, -1, 50, 100, -1
+ 75, 0, -1, -1, 75, 76, -1, 75, 105, -1,
+ 75, 47, -1, 75, 1, -1, 78, 79, -1, 78,
+ 88, -1, 82, 79, -1, 68, 48, 77, 88, -1,
+ 6, -1, 6, 1, -1, 1, -1, -1, 113, -1,
+ 113, 54, 113, -1, 17, -1, 18, -1, 36, -1,
+ 37, -1, 133, 87, 134, 136, 106, -1, 4, -1,
+ 3, -1, 81, -1, 68, 49, -1, 45, -1, 46,
+ -1, -1, 35, 83, 80, 66, 108, 135, 106, -1,
+ -1, 86, 85, 5, -1, 60, -1, 51, -1, -1,
+ 87, 89, -1, 87, 1, -1, 105, -1, 137, 106,
+ -1, 137, 106, -1, 133, 87, 134, -1, 104, -1,
+ 23, 66, 113, 135, 106, 133, 96, 106, 134, -1,
+ 26, 66, 113, 135, 106, 89, -1, 27, 106, 89,
+ 26, 66, 113, 135, 106, -1, 28, 66, 4, 40,
+ 130, 135, 106, 89, -1, 28, 66, 95, 137, 106,
+ 113, 137, 106, 95, 135, 106, 89, -1, 28, 66,
+ 95, 137, 106, 137, 106, 95, 135, 106, 89, -1,
+ 90, -1, 29, 88, -1, 30, 88, -1, 33, 88,
+ -1, 39, 88, -1, 34, 110, 88, -1, -1, 21,
+ 91, 110, 88, -1, 92, 88, -1, -1, 100, 93,
+ 101, 102, -1, -1, 22, 4, 94, 124, -1, 22,
+ 66, 4, 67, -1, 113, -1, -1, 92, -1, 97,
+ -1, -1, 97, 98, -1, 97, 1, -1, 24, 99,
+ 138, 106, 87, -1, 25, 138, 106, 87, -1, 7,
+ -1, 58, 7, -1, 57, 7, -1, 8, -1, 84,
+ -1, 31, -1, 32, -1, 111, -1, 66, 112, 135,
+ -1, -1, -1, 10, 103, 117, -1, 19, 66, 113,
+ 135, 106, 89, -1, 19, 66, 113, 135, 106, 89,
+ 20, 106, 89, -1, 50, -1, 105, 50, -1, -1,
+ 105, -1, -1, 55, 118, -1, -1, 109, -1, 4,
+ -1, 109, 139, 4, -1, 1, -1, 109, 1, -1,
+ 109, 139, 1, -1, -1, 113, -1, -1, 112, -1,
+ 113, -1, 112, 139, 113, -1, 1, -1, 112, 1,
+ -1, 112, 1, 113, -1, 112, 139, 1, -1, 131,
+ 114, 113, -1, 113, 41, 113, -1, 113, 42, 113,
+ -1, 113, 14, 113, -1, 113, 40, 130, -1, 113,
+ 116, 113, -1, 113, 52, 113, 53, 113, -1, 117,
+ -1, 13, -1, 12, -1, 51, 13, -1, 9, -1,
+ 55, -1, 115, -1, 56, -1, 118, -1, 119, -1,
+ 117, 118, -1, 120, -1, 118, 64, 118, -1, 118,
+ 59, 118, -1, 118, 60, 118, -1, 118, 61, 118,
+ -1, 118, 57, 118, -1, 118, 58, 118, -1, 38,
+ 123, 107, -1, 131, 43, -1, 131, 44, -1, 66,
+ 112, 135, 40, 130, -1, 117, 11, 38, 123, -1,
+ 119, 64, 118, -1, 119, 59, 118, -1, 119, 60,
+ 118, -1, 119, 61, 118, -1, 119, 57, 118, -1,
+ 119, 58, 118, -1, 84, -1, 62, 118, -1, 66,
+ 113, 135, -1, 45, 66, 111, 135, -1, 46, 66,
+ 111, 135, -1, 46, -1, 121, -1, 131, -1, 43,
+ 131, -1, 44, 131, -1, 7, -1, 8, -1, 58,
+ 118, -1, 57, 118, -1, 122, -1, 68, 122, -1,
+ 3, 66, 111, 135, -1, -1, 131, -1, -1, 125,
+ 16, -1, 126, -1, 125, 126, -1, 127, -1, 69,
+ 112, 70, -1, 127, -1, 128, 127, -1, 128, 16,
+ -1, 4, -1, 4, 129, -1, 130, -1, 65, 120,
+ 132, -1, 43, -1, 44, -1, -1, 71, 106, -1,
+ 72, 106, -1, 67, -1, -1, 137, -1, 73, -1,
+ 53, -1, 54, 106, -1
};
/* YYRLINE[YYN] -- source line where rule number YYN was defined. */
static const yytype_uint16 yyrline[] =
{
- 0, 187, 187, 193, 195, 200, 212, 216, 234, 245,
- 248, 252, 262, 271, 280, 285, 293, 298, 300, 302,
- 313, 314, 319, 318, 342, 341, 367, 368, 373, 374,
- 392, 397, 398, 402, 404, 406, 408, 410, 412, 414,
- 458, 462, 467, 470, 473, 485, 523, 526, 525, 535,
- 547, 547, 578, 580, 598, 620, 626, 627, 632, 685,
- 686, 703, 708, 710, 715, 717, 722, 724, 726, 731,
- 732, 740, 741, 747, 752, 752, 764, 769, 776, 777,
- 780, 782, 787, 788, 794, 795, 800, 802, 804, 806,
- 808, 815, 816, 822, 823, 828, 830, 836, 838, 840,
- 842, 847, 853, 855, 857, 863, 869, 875, 877, 882,
- 884, 886, 891, 893, 897, 898, 903, 905, 907, 912,
- 914, 916, 918, 920, 922, 924, 926, 947, 949, 951,
- 964, 969, 971, 973, 975, 977, 979, 984, 986, 988,
- 990, 993, 995, 1009, 1010, 1011, 1013, 1015, 1017, 1020,
- 1028, 1039, 1044, 1060, 1071, 1072, 1077, 1079, 1094, 1104,
- 1119, 1120, 1121, 1125, 1129, 1133, 1136, 1138, 1142, 1146,
- 1149
+ 0, 215, 215, 217, 222, 223, 227, 239, 243, 254,
+ 262, 270, 279, 281, 287, 288, 290, 316, 326, 336,
+ 342, 351, 361, 363, 365, 376, 381, 382, 387, 386,
+ 416, 415, 446, 448, 453, 454, 467, 472, 473, 477,
+ 479, 481, 488, 509, 555, 598, 708, 715, 722, 732,
+ 741, 750, 757, 782, 797, 796, 808, 820, 820, 916,
+ 916, 944, 970, 976, 977, 982, 1035, 1036, 1048, 1053,
+ 1072, 1090, 1095, 1102, 1108, 1113, 1121, 1123, 1132, 1133,
+ 1141, 1146, 1146, 1157, 1161, 1169, 1170, 1173, 1175, 1180,
+ 1181, 1188, 1190, 1194, 1200, 1207, 1209, 1211, 1218, 1219,
+ 1225, 1226, 1231, 1233, 1238, 1240, 1242, 1244, 1250, 1256,
+ 1258, 1260, 1275, 1284, 1290, 1292, 1297, 1299, 1301, 1309,
+ 1311, 1316, 1318, 1323, 1325, 1327, 1375, 1377, 1379, 1381,
+ 1383, 1385, 1387, 1389, 1410, 1415, 1420, 1443, 1449, 1451,
+ 1453, 1455, 1457, 1459, 1464, 1468, 1508, 1510, 1516, 1522,
+ 1534, 1535, 1536, 1541, 1546, 1550, 1554, 1566, 1579, 1584,
+ 1620, 1638, 1639, 1645, 1646, 1651, 1653, 1660, 1677, 1694,
+ 1696, 1703, 1708, 1716, 1730, 1742, 1751, 1755, 1759, 1763,
+ 1767, 1771, 1774, 1776, 1780, 1784, 1788
};
#endif
@@ -705,29 +751,31 @@ static const yytype_uint16 yyrline[] =
First, the terminals, then, starting at YYNTOKENS, nonterminals. */
static const char *const yytname[] =
{
- "$end", "error", "$undefined", "FUNC_CALL", "NAME", "REGEXP", "ERROR",
- "YNUMBER", "YSTRING", "RELOP", "IO_OUT", "IO_IN", "ASSIGNOP", "ASSIGN",
- "MATCHOP", "CONCAT_OP", "LEX_BEGIN", "LEX_END", "LEX_IF", "LEX_ELSE",
- "LEX_RETURN", "LEX_DELETE", "LEX_BEGINFILE", "LEX_ENDFILE", "LEX_SWITCH",
+ "$end", "error", "$undefined", "FUNC_CALL", "NAME", "REGEXP",
+ "FILENAME", "YNUMBER", "YSTRING", "RELOP", "IO_OUT", "IO_IN", "ASSIGNOP",
+ "ASSIGN", "MATCHOP", "CONCAT_OP", "SUBSCRIPT", "LEX_BEGIN", "LEX_END",
+ "LEX_IF", "LEX_ELSE", "LEX_RETURN", "LEX_DELETE", "LEX_SWITCH",
"LEX_CASE", "LEX_DEFAULT", "LEX_WHILE", "LEX_DO", "LEX_FOR", "LEX_BREAK",
"LEX_CONTINUE", "LEX_PRINT", "LEX_PRINTF", "LEX_NEXT", "LEX_EXIT",
- "LEX_FUNCTION", "LEX_GETLINE", "LEX_NEXTFILE", "LEX_IN", "LEX_AND",
- "LEX_OR", "INCREMENT", "DECREMENT", "LEX_BUILTIN", "LEX_LENGTH",
+ "LEX_FUNCTION", "LEX_BEGINFILE", "LEX_ENDFILE", "LEX_GETLINE",
+ "LEX_NEXTFILE", "LEX_IN", "LEX_AND", "LEX_OR", "INCREMENT", "DECREMENT",
+ "LEX_BUILTIN", "LEX_LENGTH", "LEX_EOF", "LEX_INCLUDE", "LEX_EVAL",
"NEWLINE", "SLASH_BEFORE_EQUAL", "'?'", "':'", "','", "'<'", "'>'",
"'+'", "'-'", "'*'", "'/'", "'%'", "'!'", "UNARY", "'^'", "'$'", "'('",
- "')'", "'['", "']'", "'@'", "'{'", "'}'", "';'", "$accept", "start",
- "program", "rule", "pattern", "action", "func_name", "lex_builtin",
+ "')'", "'@'", "'['", "']'", "'{'", "'}'", "';'", "$accept", "program",
+ "rule", "source", "pattern", "action", "func_name", "lex_builtin",
"function_prologue", "$@1", "regexp", "$@2", "a_slash", "statements",
- "statement_term", "statement", "$@3", "simple_stmt", "$@4",
- "opt_simple_stmt", "switch_body", "case_statements", "case_statement",
- "case_value", "print", "print_expression_list", "output_redir", "$@5",
- "if_statement", "nls", "opt_nls", "input_redir", "opt_param_list",
- "param_list", "opt_exp", "opt_expression_list", "expression_list", "exp",
- "assign_operator", "relop_or_less", "a_relop", "common_exp", "simp_exp",
- "simp_exp_nc", "non_post_simp_exp", "function_call",
- "direct_function_call", "opt_variable", "variable", "field_spec",
- "opt_incdec", "l_brace", "r_brace", "r_paren", "opt_semi", "semi",
- "colon", "comma", 0
+ "statement_term", "statement", "non_compound_stmt", "$@3", "simple_stmt",
+ "$@4", "$@5", "opt_simple_stmt", "switch_body", "case_statements",
+ "case_statement", "case_value", "print", "print_expression_list",
+ "output_redir", "$@6", "if_statement", "nls", "opt_nls", "input_redir",
+ "opt_param_list", "param_list", "opt_exp", "opt_expression_list",
+ "expression_list", "exp", "assign_operator", "relop_or_less", "a_relop",
+ "common_exp", "simp_exp", "simp_exp_nc", "non_post_simp_exp",
+ "func_call", "direct_func_call", "opt_variable", "delete_subscript_list",
+ "delete_subscript", "delete_exp_list", "bracketed_exp_list", "subscript",
+ "subscript_list", "simple_variable", "variable", "opt_incdec", "l_brace",
+ "r_brace", "r_paren", "opt_semi", "semi", "colon", "comma", 0
};
#endif
@@ -740,56 +788,59 @@ static const yytype_uint16 yytoknum[] =
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, 63, 58,
- 44, 60, 62, 43, 45, 42, 47, 37, 33, 303,
- 94, 36, 40, 41, 91, 93, 64, 123, 125, 59
+ 295, 296, 297, 298, 299, 300, 301, 302, 303, 304,
+ 305, 306, 63, 58, 44, 60, 62, 43, 45, 42,
+ 47, 37, 33, 307, 94, 36, 40, 41, 64, 91,
+ 93, 123, 125, 59
};
# endif
/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
static const yytype_uint8 yyr1[] =
{
- 0, 70, 71, 72, 72, 72, 73, 73, 73, 74,
- 74, 74, 74, 74, 74, 74, 75, 76, 76, 76,
- 77, 77, 79, 78, 81, 80, 82, 82, 83, 83,
- 83, 84, 84, 85, 85, 85, 85, 85, 85, 85,
- 85, 85, 85, 85, 85, 85, 85, 86, 85, 85,
- 88, 87, 87, 87, 87, 87, 89, 89, 90, 91,
- 91, 91, 92, 92, 93, 93, 93, 93, 93, 94,
- 94, 95, 95, 96, 97, 96, 98, 98, 99, 99,
- 100, 100, 101, 101, 102, 102, 103, 103, 103, 103,
- 103, 104, 104, 105, 105, 106, 106, 106, 106, 106,
- 106, 107, 107, 107, 107, 107, 107, 107, 107, 108,
- 108, 108, 109, 109, 110, 110, 111, 111, 111, 112,
- 112, 112, 112, 112, 112, 112, 112, 112, 112, 112,
- 113, 113, 113, 113, 113, 113, 113, 114, 114, 114,
- 114, 114, 114, 114, 114, 114, 114, 114, 114, 114,
- 114, 115, 115, 116, 117, 117, 118, 118, 118, 119,
- 120, 120, 120, 121, 122, 123, 124, 124, 125, 126,
- 127
+ 0, 74, 75, 75, 75, 75, 75, 76, 76, 76,
+ 76, 77, 77, 77, 78, 78, 78, 78, 78, 78,
+ 78, 79, 80, 80, 80, 80, 81, 81, 83, 82,
+ 85, 84, 86, 86, 87, 87, 87, 88, 88, 89,
+ 89, 89, 89, 89, 89, 89, 89, 89, 89, 90,
+ 90, 90, 90, 90, 91, 90, 90, 93, 92, 94,
+ 92, 92, 92, 95, 95, 96, 97, 97, 97, 98,
+ 98, 99, 99, 99, 99, 99, 100, 100, 101, 101,
+ 102, 103, 102, 104, 104, 105, 105, 106, 106, 107,
+ 107, 108, 108, 109, 109, 109, 109, 109, 110, 110,
+ 111, 111, 112, 112, 112, 112, 112, 112, 113, 113,
+ 113, 113, 113, 113, 113, 113, 114, 114, 114, 115,
+ 115, 116, 116, 117, 117, 117, 118, 118, 118, 118,
+ 118, 118, 118, 118, 118, 118, 118, 119, 119, 119,
+ 119, 119, 119, 119, 120, 120, 120, 120, 120, 120,
+ 120, 120, 120, 120, 120, 120, 120, 120, 121, 121,
+ 122, 123, 123, 124, 124, 125, 125, 126, 127, 128,
+ 128, 129, 130, 130, 131, 131, 132, 132, 132, 133,
+ 134, 135, 136, 136, 137, 138, 139
};
/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
static const yytype_uint8 yyr2[] =
{
- 0, 2, 3, 0, 2, 2, 2, 2, 2, 0,
- 1, 3, 1, 1, 1, 1, 5, 1, 1, 1,
- 1, 1, 0, 7, 0, 3, 1, 1, 0, 2,
- 2, 1, 2, 2, 3, 1, 9, 6, 8, 8,
- 12, 11, 2, 2, 2, 2, 3, 0, 4, 2,
- 0, 4, 5, 2, 4, 1, 0, 1, 1, 0,
- 2, 2, 5, 4, 1, 2, 2, 1, 1, 1,
- 1, 1, 5, 0, 0, 3, 6, 9, 1, 2,
- 0, 1, 0, 2, 0, 1, 1, 3, 1, 2,
- 3, 0, 1, 0, 1, 1, 3, 1, 2, 3,
- 3, 3, 3, 3, 3, 3, 3, 5, 1, 1,
- 1, 2, 1, 1, 1, 1, 1, 1, 2, 1,
- 3, 3, 3, 3, 3, 3, 3, 2, 2, 5,
- 4, 3, 3, 3, 3, 3, 3, 1, 2, 3,
- 4, 4, 1, 1, 1, 2, 2, 1, 1, 2,
- 2, 1, 2, 4, 0, 1, 1, 4, 1, 3,
- 1, 1, 0, 2, 2, 1, 0, 1, 1, 1,
- 2
+ 0, 2, 0, 2, 2, 2, 2, 2, 2, 2,
+ 4, 1, 2, 1, 0, 1, 3, 1, 1, 1,
+ 1, 5, 1, 1, 1, 2, 1, 1, 0, 7,
+ 0, 3, 1, 1, 0, 2, 2, 1, 2, 2,
+ 3, 1, 9, 6, 8, 8, 12, 11, 1, 2,
+ 2, 2, 2, 3, 0, 4, 2, 0, 4, 0,
+ 4, 4, 1, 0, 1, 1, 0, 2, 2, 5,
+ 4, 1, 2, 2, 1, 1, 1, 1, 1, 3,
+ 0, 0, 3, 6, 9, 1, 2, 0, 1, 0,
+ 2, 0, 1, 1, 3, 1, 2, 3, 0, 1,
+ 0, 1, 1, 3, 1, 2, 3, 3, 3, 3,
+ 3, 3, 3, 3, 5, 1, 1, 1, 2, 1,
+ 1, 1, 1, 1, 1, 2, 1, 3, 3, 3,
+ 3, 3, 3, 3, 2, 2, 5, 4, 3, 3,
+ 3, 3, 3, 3, 1, 2, 3, 4, 4, 1,
+ 1, 1, 2, 2, 1, 1, 2, 2, 1, 2,
+ 4, 0, 1, 0, 2, 1, 2, 1, 3, 1,
+ 2, 2, 1, 2, 1, 3, 1, 1, 0, 2,
+ 2, 1, 0, 1, 1, 1, 2
};
/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
@@ -797,372 +848,385 @@ static const yytype_uint8 yyr2[] =
means the default is an error. */
static const yytype_uint8 yydefact[] =
{
- 80, 78, 0, 81, 3, 1, 79, 0, 5, 0,
- 156, 147, 148, 12, 13, 14, 15, 22, 154, 0,
- 0, 0, 142, 27, 0, 0, 26, 0, 0, 0,
- 0, 4, 0, 0, 137, 24, 2, 10, 108, 116,
- 117, 119, 143, 151, 144, 158, 0, 0, 0, 82,
- 155, 145, 146, 0, 0, 150, 144, 149, 138, 0,
- 162, 144, 97, 0, 95, 152, 80, 168, 6, 7,
- 31, 28, 80, 8, 0, 112, 0, 0, 0, 0,
- 0, 0, 113, 115, 114, 0, 0, 118, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 110, 109, 127, 128, 0, 0, 0, 0, 95, 0,
- 18, 17, 20, 21, 0, 19, 0, 126, 0, 0,
- 0, 160, 161, 159, 98, 80, 165, 0, 0, 139,
- 163, 0, 32, 25, 104, 105, 102, 103, 0, 11,
- 106, 154, 124, 125, 121, 122, 123, 120, 135, 136,
- 132, 133, 134, 131, 111, 101, 153, 157, 0, 83,
- 140, 141, 99, 170, 0, 100, 96, 30, 0, 47,
- 0, 0, 0, 80, 0, 0, 0, 69, 70, 0,
- 91, 0, 80, 29, 0, 50, 35, 55, 28, 166,
- 80, 0, 130, 88, 86, 0, 0, 129, 0, 91,
- 53, 0, 0, 0, 0, 56, 42, 43, 44, 0,
- 92, 45, 164, 49, 0, 0, 80, 167, 33, 107,
- 80, 89, 0, 0, 0, 0, 0, 0, 0, 0,
- 156, 57, 0, 46, 0, 73, 71, 34, 16, 23,
- 90, 87, 80, 48, 0, 54, 80, 80, 0, 0,
- 80, 95, 74, 51, 0, 52, 0, 0, 0, 0,
- 0, 0, 0, 76, 59, 37, 0, 80, 0, 80,
- 0, 75, 80, 80, 0, 80, 0, 80, 56, 72,
- 0, 0, 61, 0, 0, 60, 38, 39, 56, 0,
- 77, 36, 64, 67, 0, 0, 68, 0, 169, 80,
- 0, 80, 66, 65, 80, 28, 80, 0, 28, 0,
- 0, 41, 0, 40
+ 2, 0, 1, 6, 0, 172, 154, 155, 17, 18,
+ 28, 19, 20, 161, 0, 0, 0, 149, 5, 85,
+ 33, 0, 0, 32, 0, 0, 0, 0, 3, 0,
+ 0, 144, 30, 4, 15, 115, 123, 124, 126, 150,
+ 158, 174, 151, 0, 0, 169, 0, 173, 0, 89,
+ 162, 152, 153, 0, 0, 0, 157, 151, 156, 145,
+ 0, 178, 151, 104, 0, 102, 0, 159, 87, 184,
+ 7, 8, 37, 34, 87, 9, 0, 86, 119, 0,
+ 0, 0, 0, 0, 0, 120, 122, 121, 0, 0,
+ 125, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 117, 116, 134, 135, 0, 0, 0,
+ 0, 102, 0, 171, 170, 23, 22, 26, 27, 0,
+ 0, 24, 0, 133, 0, 0, 0, 176, 177, 175,
+ 105, 87, 181, 0, 0, 146, 13, 0, 0, 88,
+ 179, 0, 38, 31, 111, 112, 109, 110, 0, 16,
+ 113, 161, 131, 132, 128, 129, 130, 127, 142, 143,
+ 139, 140, 141, 138, 118, 108, 160, 168, 25, 0,
+ 90, 147, 148, 106, 186, 0, 107, 103, 12, 10,
+ 36, 0, 54, 0, 0, 0, 87, 0, 0, 0,
+ 76, 77, 0, 98, 0, 87, 35, 48, 0, 57,
+ 41, 62, 34, 182, 87, 0, 137, 95, 93, 0,
+ 0, 136, 0, 98, 59, 0, 0, 0, 0, 63,
+ 49, 50, 51, 0, 99, 52, 180, 56, 0, 0,
+ 87, 183, 39, 114, 87, 96, 0, 0, 0, 163,
+ 0, 0, 0, 0, 172, 64, 0, 53, 0, 80,
+ 78, 40, 21, 29, 97, 94, 87, 55, 60, 0,
+ 165, 167, 61, 87, 87, 0, 0, 87, 0, 81,
+ 58, 0, 164, 166, 0, 0, 0, 0, 0, 79,
+ 0, 83, 66, 43, 0, 87, 0, 87, 82, 87,
+ 87, 0, 87, 0, 87, 63, 0, 0, 68, 0,
+ 0, 67, 44, 45, 63, 0, 84, 42, 71, 74,
+ 0, 0, 75, 0, 185, 87, 0, 87, 73, 72,
+ 87, 34, 87, 0, 34, 0, 0, 47, 0, 46
};
/* YYDEFGOTO[NTERM-NUM]. */
static const yytype_int16 yydefgoto[] =
{
- -1, 2, 7, 31, 32, 68, 114, 115, 33, 48,
- 34, 74, 35, 131, 69, 183, 199, 184, 214, 232,
- 273, 274, 285, 297, 185, 235, 253, 262, 186, 3,
- 4, 117, 195, 196, 209, 106, 107, 187, 105, 84,
- 85, 38, 39, 40, 41, 42, 43, 49, 44, 45,
- 123, 188, 189, 129, 216, 190, 299, 128
+ -1, 1, 28, 138, 29, 70, 120, 121, 30, 48,
+ 31, 76, 32, 141, 71, 196, 197, 213, 198, 228,
+ 239, 246, 290, 291, 301, 313, 199, 249, 270, 280,
+ 200, 139, 140, 123, 209, 210, 223, 109, 110, 201,
+ 108, 87, 88, 35, 36, 37, 38, 39, 40, 49,
+ 258, 259, 260, 45, 46, 47, 41, 42, 129, 202,
+ 203, 135, 230, 204, 315, 134
};
/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
STATE-NUM. */
-#define YYPACT_NINF -263
+#define YYPACT_NINF -267
static const yytype_int16 yypact[] =
{
- -27, -263, 29, -23, -263, -263, -263, 365, -263, -21,
- -18, -263, -263, -263, -263, -263, -263, -263, 9, 9,
- 9, -15, -10, -263, 1014, 1014, -263, 1014, 1039, 792,
- 48, -263, -31, -14, -263, -263, -263, 712, 958, 195,
- 274, -263, -263, -263, 176, -263, 764, 792, 126, 3,
- -263, -263, -263, 764, 764, 2, -11, 2, 2, 1014,
- -8, -263, -263, 44, 389, -263, -27, -263, -263, -263,
- -23, -263, -27, -263, 58, -263, 1014, 65, 1014, 1014,
- 1014, 1014, -263, -263, -263, 1014, 31, 195, 1014, 1014,
- 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014,
- -263, -263, -263, -263, 83, 1014, 42, 10, 907, 21,
- -263, -263, -263, -263, 50, -263, 1014, -263, 42, 42,
- 389, -263, -263, -263, 1014, -27, -263, 75, 848, -263,
- -263, 547, -263, -263, 117, -263, 194, 97, 824, 907,
- 52, 9, 181, 181, 2, 2, 2, 2, 181, 181,
- 2, 2, 2, 2, -263, 907, -263, -263, 17, 195,
- -263, -263, 907, -263, 111, -263, 907, -263, 54, -263,
- 4, 55, 59, -27, 61, -29, -29, -263, -263, -29,
- 1014, -29, -27, -263, -29, -263, -263, 907, -263, 56,
- -27, 1014, -263, -263, -263, 42, 47, -263, 1014, 1014,
- 63, 124, 1014, 1014, 680, 875, -263, -263, -263, -29,
- 907, -263, -263, -263, 616, 547, -27, -263, -263, 907,
- -27, -263, 23, 389, -29, 792, 69, 389, 389, 106,
- -25, -263, 56, -263, 792, 125, -263, -263, -263, -263,
- -263, -263, -27, -263, 43, -263, -27, -27, 72, 135,
- -27, 588, -263, -263, 680, -263, -14, 680, 1014, 42,
- 736, 792, 1014, 123, -263, -263, 389, -27, 306, -27,
- 44, 958, -27, -27, 32, -27, 680, -27, 931, -263,
- 680, 82, -263, 91, 102, -263, -263, -263, 931, 42,
- -263, -263, -263, -263, 139, 158, -263, 102, -263, -27,
- 42, -27, -263, -263, -27, -263, -27, 680, -263, 435,
- 680, -263, 491, -263
+ -267, 330, -267, -267, -36, -37, -267, -267, -267, -267,
+ -267, -267, -267, 20, 20, 20, -30, -20, -267, -267,
+ -267, 973, 973, -267, 973, 1018, 799, 6, -267, -15,
+ -21, -267, -267, 10, 1057, 947, 300, 325, -267, -267,
+ -267, -267, 299, 731, 799, -267, 53, -267, 112, 66,
+ -267, -267, -267, 731, 731, 122, 70, -3, 70, 70,
+ 973, 88, -267, -267, 50, 1051, 25, -267, 97, -267,
+ -267, -267, 10, -267, 97, -267, 143, -267, -267, 973,
+ 146, 973, 973, 973, 973, -267, -267, -267, 973, 113,
+ 300, 973, 973, 973, 973, 973, 973, 973, 973, 973,
+ 973, 973, 973, -267, -267, -267, -267, 139, 973, 87,
+ 118, 1086, 7, -267, -267, -267, -267, -267, -267, 121,
+ 96, -267, 973, -267, 87, 87, 1051, -267, -267, -267,
+ 973, 97, -267, 137, 825, -267, -267, 36, -16, 10,
+ -267, 547, -267, -267, 19, -267, 260, 251, 1080, 1086,
+ 105, 20, 115, 115, 70, 70, 70, 70, 115, 115,
+ 70, 70, 70, 70, -267, 1086, -267, -267, -267, 63,
+ 300, -267, -267, 1086, -267, 146, -267, 1086, -267, -267,
+ -267, 116, -267, 45, 120, 124, 97, 129, -16, -16,
+ -267, -267, -16, 973, -16, 97, -267, -267, -16, -267,
+ -267, 1086, -267, 123, 97, 973, -267, -267, -267, 87,
+ 117, -267, 973, 973, -267, 193, 973, 973, 660, 870,
+ -267, -267, -267, -16, 1086, -267, -267, -267, 593, 547,
+ 97, -267, -267, 1086, 97, -267, 72, 1051, -16, -37,
+ 133, 1051, 1051, 175, -22, -267, 123, -267, 799, 192,
+ -267, -267, -267, -267, -267, -267, 97, -267, -267, 90,
+ -267, -267, -267, 97, 97, 141, 146, 97, 50, -267,
+ -267, 660, -267, -267, -21, 660, 973, 87, 705, 137,
+ 973, 183, -267, -267, 1051, 97, 262, 97, 947, 97,
+ 97, 38, 97, 660, 97, 902, 660, 136, -267, 198,
+ 156, -267, -267, -267, 902, 87, -267, -267, -267, -267,
+ 203, 210, -267, 156, -267, 97, 87, 97, -267, -267,
+ 97, -267, 97, 660, -267, 401, 660, -267, 474, -267
};
/* YYPGOTO[NTERM-NUM]. */
static const yytype_int16 yypgoto[] =
{
- -263, -263, -263, -263, -263, 145, -263, -263, -263, -263,
- -111, -263, -263, -186, 114, -167, -263, -193, -263, -262,
- -263, -263, -263, -263, -263, -263, -263, -263, -263, -2,
- -7, -263, -263, -263, -13, -47, -19, -4, -263, -263,
- -263, -81, 187, -263, 157, -263, 160, 51, 64, -263,
- -263, -28, -214, 78, -263, 132, -106, -187
+ -267, -267, -267, -267, -267, 188, -267, -267, -267, -267,
+ -77, -267, -267, -197, 56, -170, -267, -267, -192, -267,
+ -267, -266, -267, -267, -267, -267, -267, -267, -267, -267,
+ -267, 43, 34, -267, -267, -267, 11, -39, -23, -1,
+ -267, -267, -267, -52, 44, -267, 201, -267, -10, 82,
+ -267, -267, -19, -40, -267, -267, -73, -2, -267, -28,
+ -213, -54, -267, -25, -79, 26
};
/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
positive, shift that token. If negative, reduce the rule which
number is the opposite. If zero, do what YYDEFACT says.
If YYTABLE_NINF, syntax error. */
-#define YYTABLE_NINF -95
+#define YYTABLE_NINF -102
static const yytype_int16 yytable[] =
{
- 36, 237, 215, 37, 71, 71, 118, 119, 200, 222,
- 63, 124, 231, 10, 249, 1, 289, 1, 193, 1,
- -94, 194, 124, 6, 240, 64, 300, 241, 109, 5,
- 70, 102, 103, 282, 121, 122, 66, 229, 67, 47,
- 67, 46, 108, 108, 124, 124, 47, 53, 221, 108,
- 108, 9, 54, 66, 116, 120, -94, 283, 284, 130,
- 125, -95, 93, 133, 261, 132, 201, 291, 141, 135,
- 28, 125, 134, -94, 136, 137, 138, 139, -58, -94,
- -84, 140, 50, 51, 52, 231, 157, 263, 56, 56,
- 265, 56, 61, 125, 125, 231, 154, 125, 292, 293,
- -58, 155, 56, -95, -95, 126, 75, 126, 255, 287,
- -85, 76, 158, 290, 164, 197, 198, 202, 163, 309,
- 162, 203, 312, 205, 166, 67, 75, 225, 226, 110,
- 111, -95, 245, 248, 258, 252, 77, 78, 23, 259,
- 311, 127, 272, 313, 294, 295, 302, 26, 82, 83,
- 182, 298, 56, 56, 56, 56, 56, 56, 56, 56,
- 56, 56, 56, 56, 72, 303, 204, 236, 82, 83,
- 112, 113, 296, 70, 70, 212, 210, 70, 73, 70,
- 56, 271, 70, 218, 156, 60, 224, 219, 100, 101,
- 65, 304, 192, 0, 223, 210, 160, 161, 227, 228,
- 0, 0, 0, 75, 0, 50, 244, 70, 76, 238,
- 108, 55, 57, 239, 58, 63, 0, 0, 102, 103,
- 0, 108, 70, 104, 0, 87, 0, 0, 264, 0,
- 251, 0, 0, 77, 0, 254, 90, 91, 92, 256,
- 257, 93, 270, 260, 0, 82, 83, 0, 88, 89,
- 90, 91, 92, 0, 266, 93, 268, 108, 0, 0,
- 276, 0, 278, 0, 0, 280, 281, 0, 286, 0,
- 288, 0, 0, 220, 0, 142, 143, 144, 145, 146,
- 147, 148, 149, 150, 151, 152, 153, 0, 0, 206,
- 207, 0, 305, 208, 307, 211, 0, 308, 213, 310,
- 0, 242, 0, 159, 0, 246, 247, 72, 72, 0,
- 0, 72, 0, 72, 0, 75, 72, 0, 0, 0,
- 76, 217, 0, 233, 0, 0, 56, 94, 95, 96,
- 97, 98, 0, 0, 99, 56, 0, 267, 243, 0,
- 0, 72, 0, 0, 275, 77, 78, 79, 279, 0,
- 0, 0, 0, 0, 80, 0, 72, 82, 83, 0,
- 0, 0, 0, 0, 250, -80, 8, 301, 9, 10,
- 0, 0, 11, 12, 0, 67, 0, 0, 306, 0,
- 0, 13, 14, 0, 0, 0, 0, 15, 16, 0,
- 0, 0, 269, 0, 0, 0, 0, 0, 75, 0,
- 277, 17, 18, 76, 0, 0, 0, 19, 20, 21,
- 22, 1, 23, 0, 0, 0, 0, 0, 24, 25,
- 0, 26, 0, 27, 0, 0, 28, 29, 77, 78,
- 79, 30, -9, 0, -9, 0, 167, 80, 9, 10,
- 82, 83, 11, 12, 0, 0, 0, 0, 0, 0,
- 0, 0, 126, 168, 0, 169, 170, 0, 87, 171,
- -63, -63, 172, 173, 174, 175, 176, 177, 178, 179,
- 180, 0, 18, 181, 0, 0, 0, 19, 20, 21,
- 22, -63, 23, 0, 0, 0, 0, 0, 24, 25,
- 0, 26, 167, 27, 9, 10, 28, 29, 11, 12,
- 0, 30, 66, -63, 67, 0, 0, 0, 0, 168,
- 0, 169, 170, 0, 0, 171, -62, -62, 172, 173,
- 174, 175, 176, 177, 178, 179, 180, 0, 18, 181,
- 0, 0, 0, 19, 20, 21, 22, -62, 23, 0,
- 0, 0, 0, 0, 24, 25, 0, 26, 167, 27,
- 9, 10, 28, 29, 11, 12, 0, 30, 66, -62,
- 67, 0, 0, 0, 0, 168, 0, 169, 170, 0,
- 0, 171, 0, 0, 172, 173, 174, 175, 176, 177,
- 178, 179, 180, 0, 18, 181, 0, 0, 0, 19,
- 20, 21, 22, 0, 23, 0, 0, 75, 0, 0,
- 24, 25, 76, 26, 0, 27, 0, 0, 28, 29,
- 0, 0, 0, 30, 66, 182, 67, 62, 0, 9,
- 10, 0, 0, 11, 12, 0, -93, 77, 78, 79,
- 0, 0, 0, 0, 0, 0, 80, 0, 125, 82,
- 83, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 126, 0, 18, 0, 0, 0, 0, 19, 20,
- 21, 22, -93, 23, 0, 0, 0, 0, 0, 24,
- 25, 0, 26, 0, 27, 0, 0, 28, 234, -93,
- 0, 0, 30, 9, 10, -93, 0, 11, 12, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 168, 0,
- 169, 170, 0, 0, 171, 0, 0, 172, 173, 174,
- 175, 176, 177, 178, 179, 180, 0, 18, 181, 0,
- 0, 75, 19, 20, 21, 22, 76, 23, 0, 0,
- 0, 0, 0, 24, 25, 0, 26, 0, 27, 9,
- 10, 28, 29, 11, 12, 0, 30, 66, 0, 67,
- 0, 77, 78, 79, 0, 0, 0, 0, 0, 0,
- 80, 0, 81, 82, 83, 62, 0, 9, 10, 0,
- 0, 11, 12, 18, 0, 0, 0, 0, 19, 20,
- 21, 22, 0, 23, 0, 0, 0, 0, 0, 24,
- 25, 0, 26, 62, 27, 9, 10, 28, 29, 11,
- 12, 18, 30, 0, 0, 67, 19, 20, 21, 22,
- 0, 23, 0, 0, 0, 0, 0, 24, 25, 0,
- 26, 0, 27, 0, 0, 28, 29, -93, 0, 18,
- 30, 0, 0, 75, 19, 20, 21, 22, 76, 23,
- 0, 0, 0, 0, 0, 24, 25, 0, 26, 165,
- 27, 9, 10, 28, 29, 11, 12, 0, 30, 0,
- 0, 0, 0, 77, 78, 79, 0, 0, 0, 0,
- 0, 0, 80, 191, 0, 82, 83, 0, 9, 230,
- 0, 0, 11, 12, 0, 18, 0, 0, 0, 0,
- 19, 20, 21, 22, 0, 23, 170, 0, 0, 0,
- 0, 24, 25, 0, 26, 0, 27, 177, 178, 28,
- 29, 0, 18, 0, 30, 0, 75, 19, 20, 21,
- 22, 76, 23, 0, 0, 0, 0, 0, 24, 25,
- 0, 26, 0, 27, 9, 10, 28, 29, 11, 12,
- 0, 30, 0, 0, 0, 0, 77, 78, 79, 0,
- 0, 0, 170, 0, 0, 80, 0, 0, 82, 83,
- 0, 9, 10, 177, 178, 11, 12, 0, 18, 86,
- 0, 0, 0, 19, 20, 21, 22, 0, 23, 0,
- 0, 0, 0, 0, 24, 25, 0, 26, 0, 27,
- 0, 0, 28, 29, 0, 18, 0, 30, 0, 0,
- 19, 20, 21, 22, 0, 23, 0, 0, 0, 0,
- 0, 24, 25, 0, 26, 0, 27, 9, 10, 28,
- 29, 11, 12, 0, 30, 0, 0, 0, 0, 0,
+ 34, 73, 73, 64, 74, 229, 114, 145, 130, 4,
+ 133, 50, 51, 52, 124, 125, 251, 67, 266, 57,
+ 57, 112, 57, 62, 5, 65, 136, 245, 78, 305,
+ 43, 137, 44, 57, 19, 19, 53, 178, 316, 298,
+ 105, 106, 111, 111, 33, 67, 54, 44, 243, 214,
+ 68, 130, 111, 111, 66, 166, 68, 69, 69, 126,
+ 77, 131, 299, 300, 207, 56, 58, 208, 59, 113,
+ 171, 172, 72, 254, 85, 86, 255, 167, 144, 90,
+ 146, 147, 148, 149, 307, 25, -11, 150, -65, 57,
+ 57, 57, 57, 57, 57, 57, 57, 57, 57, 57,
+ 57, 281, 211, 245, 131, 283, 272, 165, 142, -11,
+ -65, 215, 245, 74, -102, 115, 116, 132, 235, 130,
+ 57, 122, 44, 303, 325, 4, 306, 328, -101, 173,
+ -91, 127, 128, 177, 96, 152, 153, 154, 155, 156,
+ 157, 158, 159, 160, 161, 162, 163, 19, 143, 50,
+ 5, 151, 164, 327, 132, 234, 329, 117, 118, 44,
+ -102, -102, 169, 74, 74, 174, 170, 74, -101, 74,
+ 168, 131, 131, 74, 93, 94, 95, 175, 231, 96,
+ 119, 72, 212, 256, -92, -101, 216, 263, 264, 250,
+ 217, -101, 224, 277, 179, 219, 69, 240, 74, 261,
+ 262, 265, 269, 289, 233, 308, 309, 276, 195, 314,
+ 318, 237, 224, 74, 279, 241, 242, 319, 75, 261,
+ 218, 267, 312, 285, 238, 268, 61, 111, 288, 226,
+ 292, 72, 72, 206, 320, 72, 236, 72, 232, 0,
+ 273, 72, 0, 0, 220, 221, 282, 65, 222, 20,
+ 225, 317, 0, 287, 227, 310, 311, 0, 23, 0,
+ 78, 294, 322, 0, 252, 79, 72, 0, 253, 78,
+ 0, 78, 0, 0, 79, 284, 79, 286, 57, 247,
+ 0, 72, 0, 0, 0, 0, 57, 0, 0, 0,
+ 271, 80, 81, 0, 257, 0, 0, 274, 275, 0,
+ 80, 278, 80, 81, 82, 0, 85, 86, 0, 0,
+ 0, 103, 104, 0, 83, 85, 86, 85, 86, 293,
+ 0, 295, 0, 296, 297, 0, 302, 0, 304, 0,
+ 2, 3, 90, 4, 5, 69, 0, 6, 7, 0,
+ 0, 0, 105, 106, 0, 0, 0, 8, 9, 321,
+ 107, 323, 0, 0, 324, 0, 326, 91, 92, 93,
+ 94, 95, 0, 0, 96, 10, 11, 12, 13, 0,
+ 0, 0, 0, 14, 15, 16, 17, 18, 0, 0,
+ 19, 20, 97, 98, 99, 100, 101, 21, 22, 102,
+ 23, 0, 24, 0, 0, 25, 26, 0, 27, 0,
+ 0, -14, 180, -14, 4, 5, 0, 0, 6, 7,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 181, 0, 182, 183, 184, -70, -70, 185, 186, 187,
+ 188, 189, 190, 191, 192, 193, 0, 0, 0, 13,
+ 194, 0, 0, 0, 14, 15, 16, 17, 0, 0,
+ 0, -70, 20, 0, 0, 0, 0, 0, 21, 22,
+ 0, 23, 0, 24, 0, 0, 25, 26, 0, 55,
+ 0, 0, 68, -70, 69, 180, 0, 4, 5, 0,
+ 0, 6, 7, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 181, 0, 182, 183, 184, -69, -69,
+ 185, 186, 187, 188, 189, 190, 191, 192, 193, 0,
+ 0, 0, 13, 194, 0, 0, 0, 14, 15, 16,
+ 17, 0, 0, 0, -69, 20, 0, 0, 0, 0,
+ 0, 21, 22, 0, 23, 0, 24, 0, 0, 25,
+ 26, 0, 55, 0, 0, 68, -69, 69, 180, 0,
+ 4, 5, 0, 0, 6, 7, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 181, 0, 182, 183,
+ 184, 0, 0, 185, 186, 187, 188, 189, 190, 191,
+ 192, 193, 0, 0, 0, 13, 194, 0, 0, 0,
+ 14, 15, 16, 17, 63, 0, 4, 5, 20, 0,
+ 6, 7, 0, -100, 21, 22, 0, 23, 0, 24,
+ 0, 0, 25, 26, 0, 55, 0, 0, 68, 195,
+ 69, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 13, 0, 0, 0, 0, 14, 15, 16, 17,
+ 0, 0, 0, -100, 20, 0, 0, 0, 0, 0,
+ 21, 22, 0, 23, 0, 24, 0, 0, 25, 248,
+ -100, 55, 0, 4, 5, 0, -100, 6, 7, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 181,
+ 0, 182, 183, 184, 0, 0, 185, 186, 187, 188,
+ 189, 190, 191, 192, 193, 0, 0, 0, 13, 194,
+ 0, 0, 0, 14, 15, 16, 17, 0, 4, 5,
+ 0, 20, 6, 7, 0, 0, 0, 21, 22, 0,
+ 23, 0, 24, 0, 0, 25, 26, 0, 55, 0,
+ 0, 68, 63, 69, 4, 5, 0, 0, 6, 7,
+ 0, 0, 0, 13, 0, 0, 0, 0, 14, 15,
+ 16, 17, 0, 0, 0, 0, 20, 0, 0, 0,
+ 0, 0, 21, 22, 0, 23, 0, 24, 0, 13,
+ 25, 26, 0, 55, 14, 15, 16, 17, 69, 0,
+ 0, 0, 20, 0, 0, 0, 0, 0, 21, 22,
+ 0, 23, 0, 24, 0, 0, 25, 26, -100, 55,
+ 63, 0, 4, 5, 0, 0, 6, 7, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 176, 0, 4, 5,
+ 0, 0, 6, 7, 0, 0, 0, 13, 0, 0,
+ 0, 0, 14, 15, 16, 17, 0, 0, 0, 0,
+ 20, 0, 0, 0, 0, 0, 21, 22, 0, 23,
+ 0, 24, 0, 13, 25, 26, 0, 55, 14, 15,
+ 16, 17, 0, 4, 244, 0, 20, 6, 7, 0,
+ 0, 0, 21, 22, 0, 23, 0, 24, 0, 0,
+ 25, 26, 183, 55, 0, 0, 0, 0, 0, 0,
+ 0, 190, 191, 0, 0, 4, 5, 0, 13, 6,
+ 7, 0, 0, 14, 15, 16, 17, 0, 0, 0,
+ 0, 20, 0, 0, 183, 0, 0, 21, 22, 0,
+ 23, 0, 24, 190, 191, 25, 26, 0, 55, 0,
+ 13, 0, 0, 0, 0, 14, 15, 16, 17, 0,
+ 4, 5, 0, 20, 6, 7, 0, 0, 89, 21,
+ 22, 0, 23, 0, 24, 0, 0, 25, 26, 0,
+ 55, 0, 0, 0, 0, 0, 4, 5, 0, 0,
+ 6, 7, 0, 0, 0, 13, 0, 0, 0, 0,
+ 14, 15, 16, 17, 0, 0, 0, 0, 20, 0,
+ 0, 0, 0, 0, 21, 22, 0, 23, 0, 24,
+ 0, 13, 25, 26, 0, 55, 14, 15, 16, 17,
+ 0, 4, 5, 0, 20, 6, 7, 0, 0, 0,
+ 21, 22, 0, 23, 0, 24, 0, 0, 25, 26,
+ 0, 55, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 9, 10, 0, 0, 11, 12, 0, 0,
- 0, 18, 0, 0, 0, 0, 19, 20, 21, 22,
- 0, 23, 0, 0, 0, 0, 0, 24, 25, 0,
- 26, 0, 27, 0, 0, 28, 29, 0, 0, 0,
- 30, 19, 20, 21, 22, 0, 23, 0, 0, 0,
- 0, 0, 24, 25, 0, 26, 0, 27, 0, 0,
- 28, 59, 0, 0, 0, 30
+ 78, 14, 15, 16, 17, 79, 78, 0, 0, 20,
+ 0, 79, 0, 0, 0, 21, 22, 0, 23, 0,
+ 24, 0, 0, 25, 60, 0, 55, 0, 0, 78,
+ 0, 80, 81, 82, 79, 78, 0, 80, 81, 82,
+ 79, 0, 0, 83, 0, 0, 85, 86, 0, 83,
+ 0, 84, 85, 86, 0, 0, 0, 0, 132, 0,
+ 80, 81, 82, 0, 0, 0, 80, 81, 82, 0,
+ 0, 0, 83, 205, 0, 85, 86, 0, 83, 0,
+ 0, 85, 86
};
static const yytype_int16 yycheck[] =
{
- 7, 215, 188, 7, 32, 33, 53, 54, 4, 196,
- 29, 1, 205, 4, 39, 46, 278, 46, 1, 46,
- 10, 4, 1, 46, 1, 29, 288, 4, 47, 0,
- 32, 42, 43, 1, 42, 43, 67, 204, 69, 64,
- 69, 62, 46, 47, 1, 1, 64, 62, 1, 53,
- 54, 3, 62, 67, 51, 59, 46, 25, 26, 66,
- 50, 9, 60, 5, 251, 72, 62, 281, 37, 4,
- 61, 50, 76, 63, 78, 79, 80, 81, 46, 69,
- 63, 85, 18, 19, 20, 278, 65, 254, 24, 25,
- 257, 27, 28, 50, 50, 288, 13, 50, 7, 8,
- 68, 105, 38, 51, 52, 63, 9, 63, 65, 276,
- 63, 14, 62, 280, 39, 4, 62, 62, 125, 305,
- 124, 62, 308, 62, 128, 69, 9, 64, 4, 3,
- 4, 14, 63, 27, 62, 10, 39, 40, 47, 4,
- 307, 63, 19, 310, 53, 54, 7, 56, 51, 52,
- 68, 49, 88, 89, 90, 91, 92, 93, 94, 95,
- 96, 97, 98, 99, 32, 7, 173, 214, 51, 52,
- 44, 45, 283, 175, 176, 182, 180, 179, 33, 181,
- 116, 262, 184, 190, 106, 28, 199, 191, 12, 13,
- 30, 297, 141, -1, 198, 199, 118, 119, 202, 203,
- -1, -1, -1, 9, -1, 141, 225, 209, 14, 216,
- 214, 24, 25, 220, 27, 234, -1, -1, 42, 43,
- -1, 225, 224, 47, -1, 38, -1, -1, 256, -1,
- 234, -1, -1, 39, -1, 242, 55, 56, 57, 246,
- 247, 60, 261, 250, -1, 51, 52, -1, 53, 54,
- 55, 56, 57, -1, 258, 60, 260, 261, -1, -1,
- 267, -1, 269, -1, -1, 272, 273, -1, 275, -1,
- 277, -1, -1, 195, -1, 88, 89, 90, 91, 92,
- 93, 94, 95, 96, 97, 98, 99, -1, -1, 175,
- 176, -1, 299, 179, 301, 181, -1, 304, 184, 306,
- -1, 223, -1, 116, -1, 227, 228, 175, 176, -1,
- -1, 179, -1, 181, -1, 9, 184, -1, -1, -1,
- 14, 189, -1, 209, -1, -1, 262, 53, 54, 55,
- 56, 57, -1, -1, 60, 271, -1, 259, 224, -1,
- -1, 209, -1, -1, 266, 39, 40, 41, 270, -1,
- -1, -1, -1, -1, 48, -1, 224, 51, 52, -1,
- -1, -1, -1, -1, 232, 0, 1, 289, 3, 4,
- -1, -1, 7, 8, -1, 69, -1, -1, 300, -1,
- -1, 16, 17, -1, -1, -1, -1, 22, 23, -1,
- -1, -1, 260, -1, -1, -1, -1, -1, 9, -1,
- 268, 36, 37, 14, -1, -1, -1, 42, 43, 44,
- 45, 46, 47, -1, -1, -1, -1, -1, 53, 54,
- -1, 56, -1, 58, -1, -1, 61, 62, 39, 40,
- 41, 66, 67, -1, 69, -1, 1, 48, 3, 4,
- 51, 52, 7, 8, -1, -1, -1, -1, -1, -1,
- -1, -1, 63, 18, -1, 20, 21, -1, 271, 24,
- 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
- 35, -1, 37, 38, -1, -1, -1, 42, 43, 44,
- 45, 46, 47, -1, -1, -1, -1, -1, 53, 54,
- -1, 56, 1, 58, 3, 4, 61, 62, 7, 8,
- -1, 66, 67, 68, 69, -1, -1, -1, -1, 18,
- -1, 20, 21, -1, -1, 24, 25, 26, 27, 28,
- 29, 30, 31, 32, 33, 34, 35, -1, 37, 38,
- -1, -1, -1, 42, 43, 44, 45, 46, 47, -1,
- -1, -1, -1, -1, 53, 54, -1, 56, 1, 58,
- 3, 4, 61, 62, 7, 8, -1, 66, 67, 68,
- 69, -1, -1, -1, -1, 18, -1, 20, 21, -1,
- -1, 24, -1, -1, 27, 28, 29, 30, 31, 32,
- 33, 34, 35, -1, 37, 38, -1, -1, -1, 42,
- 43, 44, 45, -1, 47, -1, -1, 9, -1, -1,
- 53, 54, 14, 56, -1, 58, -1, -1, 61, 62,
- -1, -1, -1, 66, 67, 68, 69, 1, -1, 3,
- 4, -1, -1, 7, 8, -1, 10, 39, 40, 41,
- -1, -1, -1, -1, -1, -1, 48, -1, 50, 51,
- 52, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, 63, -1, 37, -1, -1, -1, -1, 42, 43,
- 44, 45, 46, 47, -1, -1, -1, -1, -1, 53,
- 54, -1, 56, -1, 58, -1, -1, 61, 62, 63,
- -1, -1, 66, 3, 4, 69, -1, 7, 8, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, 18, -1,
- 20, 21, -1, -1, 24, -1, -1, 27, 28, 29,
- 30, 31, 32, 33, 34, 35, -1, 37, 38, -1,
- -1, 9, 42, 43, 44, 45, 14, 47, -1, -1,
- -1, -1, -1, 53, 54, -1, 56, -1, 58, 3,
- 4, 61, 62, 7, 8, -1, 66, 67, -1, 69,
- -1, 39, 40, 41, -1, -1, -1, -1, -1, -1,
- 48, -1, 50, 51, 52, 1, -1, 3, 4, -1,
- -1, 7, 8, 37, -1, -1, -1, -1, 42, 43,
- 44, 45, -1, 47, -1, -1, -1, -1, -1, 53,
- 54, -1, 56, 1, 58, 3, 4, 61, 62, 7,
- 8, 37, 66, -1, -1, 69, 42, 43, 44, 45,
- -1, 47, -1, -1, -1, -1, -1, 53, 54, -1,
- 56, -1, 58, -1, -1, 61, 62, 63, -1, 37,
- 66, -1, -1, 9, 42, 43, 44, 45, 14, 47,
- -1, -1, -1, -1, -1, 53, 54, -1, 56, 1,
- 58, 3, 4, 61, 62, 7, 8, -1, 66, -1,
- -1, -1, -1, 39, 40, 41, -1, -1, -1, -1,
- -1, -1, 48, 49, -1, 51, 52, -1, 3, 4,
- -1, -1, 7, 8, -1, 37, -1, -1, -1, -1,
- 42, 43, 44, 45, -1, 47, 21, -1, -1, -1,
- -1, 53, 54, -1, 56, -1, 58, 32, 33, 61,
- 62, -1, 37, -1, 66, -1, 9, 42, 43, 44,
- 45, 14, 47, -1, -1, -1, -1, -1, 53, 54,
- -1, 56, -1, 58, 3, 4, 61, 62, 7, 8,
- -1, 66, -1, -1, -1, -1, 39, 40, 41, -1,
- -1, -1, 21, -1, -1, 48, -1, -1, 51, 52,
- -1, 3, 4, 32, 33, 7, 8, -1, 37, 11,
- -1, -1, -1, 42, 43, 44, 45, -1, 47, -1,
- -1, -1, -1, -1, 53, 54, -1, 56, -1, 58,
- -1, -1, 61, 62, -1, 37, -1, 66, -1, -1,
- 42, 43, 44, 45, -1, 47, -1, -1, -1, -1,
- -1, 53, 54, -1, 56, -1, 58, 3, 4, 61,
- 62, 7, 8, -1, 66, -1, -1, -1, -1, -1,
+ 1, 29, 30, 26, 29, 202, 46, 80, 1, 3,
+ 64, 13, 14, 15, 53, 54, 229, 27, 40, 21,
+ 22, 44, 24, 25, 4, 26, 1, 219, 9, 295,
+ 66, 6, 69, 35, 50, 50, 66, 1, 304, 1,
+ 43, 44, 43, 44, 1, 55, 66, 69, 218, 4,
+ 71, 1, 53, 54, 48, 109, 71, 73, 73, 60,
+ 50, 54, 24, 25, 1, 21, 22, 4, 24, 16,
+ 124, 125, 29, 1, 55, 56, 4, 70, 79, 35,
+ 81, 82, 83, 84, 297, 65, 50, 88, 50, 91,
+ 92, 93, 94, 95, 96, 97, 98, 99, 100, 101,
+ 102, 271, 175, 295, 54, 275, 16, 108, 74, 73,
+ 72, 66, 304, 138, 9, 3, 4, 67, 1, 1,
+ 122, 55, 69, 293, 321, 3, 296, 324, 10, 130,
+ 67, 43, 44, 134, 64, 91, 92, 93, 94, 95,
+ 96, 97, 98, 99, 100, 101, 102, 50, 5, 151,
+ 4, 38, 13, 323, 67, 209, 326, 45, 46, 69,
+ 55, 56, 66, 188, 189, 131, 122, 192, 50, 194,
+ 49, 54, 54, 198, 59, 60, 61, 40, 203, 64,
+ 68, 138, 66, 237, 67, 67, 66, 241, 242, 228,
+ 66, 73, 193, 266, 138, 66, 73, 4, 223, 239,
+ 67, 26, 10, 20, 205, 7, 8, 66, 72, 53,
+ 7, 212, 213, 238, 268, 216, 217, 7, 30, 259,
+ 186, 246, 299, 277, 213, 248, 25, 228, 280, 195,
+ 284, 188, 189, 151, 313, 192, 210, 194, 204, -1,
+ 259, 198, -1, -1, 188, 189, 274, 248, 192, 51,
+ 194, 305, -1, 278, 198, 57, 58, -1, 60, -1,
+ 9, 286, 316, -1, 230, 14, 223, -1, 234, 9,
+ -1, 9, -1, -1, 14, 276, 14, 278, 280, 223,
+ -1, 238, -1, -1, -1, -1, 288, -1, -1, -1,
+ 256, 40, 41, -1, 238, -1, -1, 263, 264, -1,
+ 40, 267, 40, 41, 42, -1, 55, 56, -1, -1,
+ -1, 12, 13, -1, 52, 55, 56, 55, 56, 285,
+ -1, 287, -1, 289, 290, -1, 292, -1, 294, -1,
+ 0, 1, 288, 3, 4, 73, -1, 7, 8, -1,
+ -1, -1, 43, 44, -1, -1, -1, 17, 18, 315,
+ 51, 317, -1, -1, 320, -1, 322, 57, 58, 59,
+ 60, 61, -1, -1, 64, 35, 36, 37, 38, -1,
+ -1, -1, -1, 43, 44, 45, 46, 47, -1, -1,
+ 50, 51, 57, 58, 59, 60, 61, 57, 58, 64,
+ 60, -1, 62, -1, -1, 65, 66, -1, 68, -1,
+ -1, 71, 1, 73, 3, 4, -1, -1, 7, 8,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 19, -1, 21, 22, 23, 24, 25, 26, 27, 28,
+ 29, 30, 31, 32, 33, 34, -1, -1, -1, 38,
+ 39, -1, -1, -1, 43, 44, 45, 46, -1, -1,
+ -1, 50, 51, -1, -1, -1, -1, -1, 57, 58,
+ -1, 60, -1, 62, -1, -1, 65, 66, -1, 68,
+ -1, -1, 71, 72, 73, 1, -1, 3, 4, -1,
+ -1, 7, 8, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 19, -1, 21, 22, 23, 24, 25,
+ 26, 27, 28, 29, 30, 31, 32, 33, 34, -1,
+ -1, -1, 38, 39, -1, -1, -1, 43, 44, 45,
+ 46, -1, -1, -1, 50, 51, -1, -1, -1, -1,
+ -1, 57, 58, -1, 60, -1, 62, -1, -1, 65,
+ 66, -1, 68, -1, -1, 71, 72, 73, 1, -1,
+ 3, 4, -1, -1, 7, 8, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 19, -1, 21, 22,
+ 23, -1, -1, 26, 27, 28, 29, 30, 31, 32,
+ 33, 34, -1, -1, -1, 38, 39, -1, -1, -1,
+ 43, 44, 45, 46, 1, -1, 3, 4, 51, -1,
+ 7, 8, -1, 10, 57, 58, -1, 60, -1, 62,
+ -1, -1, 65, 66, -1, 68, -1, -1, 71, 72,
+ 73, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 38, -1, -1, -1, -1, 43, 44, 45, 46,
+ -1, -1, -1, 50, 51, -1, -1, -1, -1, -1,
+ 57, 58, -1, 60, -1, 62, -1, -1, 65, 66,
+ 67, 68, -1, 3, 4, -1, 73, 7, 8, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 19,
+ -1, 21, 22, 23, -1, -1, 26, 27, 28, 29,
+ 30, 31, 32, 33, 34, -1, -1, -1, 38, 39,
+ -1, -1, -1, 43, 44, 45, 46, -1, 3, 4,
+ -1, 51, 7, 8, -1, -1, -1, 57, 58, -1,
+ 60, -1, 62, -1, -1, 65, 66, -1, 68, -1,
+ -1, 71, 1, 73, 3, 4, -1, -1, 7, 8,
+ -1, -1, -1, 38, -1, -1, -1, -1, 43, 44,
+ 45, 46, -1, -1, -1, -1, 51, -1, -1, -1,
+ -1, -1, 57, 58, -1, 60, -1, 62, -1, 38,
+ 65, 66, -1, 68, 43, 44, 45, 46, 73, -1,
+ -1, -1, 51, -1, -1, -1, -1, -1, 57, 58,
+ -1, 60, -1, 62, -1, -1, 65, 66, 67, 68,
+ 1, -1, 3, 4, -1, -1, 7, 8, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 1, -1, 3, 4,
+ -1, -1, 7, 8, -1, -1, -1, 38, -1, -1,
+ -1, -1, 43, 44, 45, 46, -1, -1, -1, -1,
+ 51, -1, -1, -1, -1, -1, 57, 58, -1, 60,
+ -1, 62, -1, 38, 65, 66, -1, 68, 43, 44,
+ 45, 46, -1, 3, 4, -1, 51, 7, 8, -1,
+ -1, -1, 57, 58, -1, 60, -1, 62, -1, -1,
+ 65, 66, 22, 68, -1, -1, -1, -1, -1, -1,
+ -1, 31, 32, -1, -1, 3, 4, -1, 38, 7,
+ 8, -1, -1, 43, 44, 45, 46, -1, -1, -1,
+ -1, 51, -1, -1, 22, -1, -1, 57, 58, -1,
+ 60, -1, 62, 31, 32, 65, 66, -1, 68, -1,
+ 38, -1, -1, -1, -1, 43, 44, 45, 46, -1,
+ 3, 4, -1, 51, 7, 8, -1, -1, 11, 57,
+ 58, -1, 60, -1, 62, -1, -1, 65, 66, -1,
+ 68, -1, -1, -1, -1, -1, 3, 4, -1, -1,
+ 7, 8, -1, -1, -1, 38, -1, -1, -1, -1,
+ 43, 44, 45, 46, -1, -1, -1, -1, 51, -1,
+ -1, -1, -1, -1, 57, 58, -1, 60, -1, 62,
+ -1, 38, 65, 66, -1, 68, 43, 44, 45, 46,
+ -1, 3, 4, -1, 51, 7, 8, -1, -1, -1,
+ 57, 58, -1, 60, -1, 62, -1, -1, 65, 66,
+ -1, 68, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, 3, 4, -1, -1, 7, 8, -1, -1,
- -1, 37, -1, -1, -1, -1, 42, 43, 44, 45,
- -1, 47, -1, -1, -1, -1, -1, 53, 54, -1,
- 56, -1, 58, -1, -1, 61, 62, -1, -1, -1,
- 66, 42, 43, 44, 45, -1, 47, -1, -1, -1,
- -1, -1, 53, 54, -1, 56, -1, 58, -1, -1,
- 61, 62, -1, -1, -1, 66
+ 9, 43, 44, 45, 46, 14, 9, -1, -1, 51,
+ -1, 14, -1, -1, -1, 57, 58, -1, 60, -1,
+ 62, -1, -1, 65, 66, -1, 68, -1, -1, 9,
+ -1, 40, 41, 42, 14, 9, -1, 40, 41, 42,
+ 14, -1, -1, 52, -1, -1, 55, 56, -1, 52,
+ -1, 54, 55, 56, -1, -1, -1, -1, 67, -1,
+ 40, 41, 42, -1, -1, -1, 40, 41, 42, -1,
+ -1, -1, 52, 53, -1, 55, 56, -1, 52, -1,
+ -1, 55, 56
};
/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
symbol of state STATE-NUM. */
static const yytype_uint8 yystos[] =
{
- 0, 46, 71, 99, 100, 0, 46, 72, 1, 3,
- 4, 7, 8, 16, 17, 22, 23, 36, 37, 42,
- 43, 44, 45, 47, 53, 54, 56, 58, 61, 62,
- 66, 73, 74, 78, 80, 82, 100, 107, 111, 112,
- 113, 114, 115, 116, 118, 119, 62, 64, 79, 117,
- 118, 118, 118, 62, 62, 112, 118, 112, 112, 62,
- 114, 118, 1, 106, 107, 116, 67, 69, 75, 84,
- 99, 121, 125, 75, 81, 9, 14, 39, 40, 41,
- 48, 50, 51, 52, 109, 110, 11, 112, 53, 54,
- 55, 56, 57, 60, 53, 54, 55, 56, 57, 60,
- 12, 13, 42, 43, 47, 108, 105, 106, 107, 106,
- 3, 4, 44, 45, 76, 77, 51, 101, 105, 105,
- 107, 42, 43, 120, 1, 50, 63, 123, 127, 123,
- 100, 83, 100, 5, 107, 4, 107, 107, 107, 107,
- 107, 37, 112, 112, 112, 112, 112, 112, 112, 112,
- 112, 112, 112, 112, 13, 107, 123, 65, 62, 112,
- 123, 123, 107, 100, 39, 1, 107, 1, 18, 20,
- 21, 24, 27, 28, 29, 30, 31, 32, 33, 34,
- 35, 38, 68, 85, 87, 94, 98, 107, 121, 122,
- 125, 49, 117, 1, 4, 102, 103, 4, 62, 86,
- 4, 62, 62, 62, 100, 62, 84, 84, 84, 104,
- 107, 84, 100, 84, 88, 83, 124, 125, 100, 107,
- 123, 1, 127, 107, 104, 64, 4, 107, 107, 85,
- 4, 87, 89, 84, 62, 95, 105, 122, 100, 100,
- 1, 4, 123, 84, 106, 63, 123, 123, 27, 39,
- 125, 107, 10, 96, 100, 65, 100, 100, 62, 4,
- 100, 127, 97, 85, 121, 85, 107, 123, 107, 125,
- 106, 111, 19, 90, 91, 123, 100, 125, 100, 123,
- 100, 100, 1, 25, 26, 92, 100, 85, 100, 89,
- 85, 122, 7, 8, 53, 54, 80, 93, 49, 126,
- 89, 123, 7, 7, 126, 100, 123, 100, 100, 83,
- 100, 85, 83, 85
+ 0, 75, 0, 1, 3, 4, 7, 8, 17, 18,
+ 35, 36, 37, 38, 43, 44, 45, 46, 47, 50,
+ 51, 57, 58, 60, 62, 65, 66, 68, 76, 78,
+ 82, 84, 86, 105, 113, 117, 118, 119, 120, 121,
+ 122, 130, 131, 66, 69, 127, 128, 129, 83, 123,
+ 131, 131, 131, 66, 66, 68, 118, 131, 118, 118,
+ 66, 120, 131, 1, 112, 113, 48, 122, 71, 73,
+ 79, 88, 105, 133, 137, 79, 85, 50, 9, 14,
+ 40, 41, 42, 52, 54, 55, 56, 115, 116, 11,
+ 118, 57, 58, 59, 60, 61, 64, 57, 58, 59,
+ 60, 61, 64, 12, 13, 43, 44, 51, 114, 111,
+ 112, 113, 112, 16, 127, 3, 4, 45, 46, 68,
+ 80, 81, 55, 107, 111, 111, 113, 43, 44, 132,
+ 1, 54, 67, 135, 139, 135, 1, 6, 77, 105,
+ 106, 87, 106, 5, 113, 130, 113, 113, 113, 113,
+ 113, 38, 118, 118, 118, 118, 118, 118, 118, 118,
+ 118, 118, 118, 118, 13, 113, 135, 70, 49, 66,
+ 118, 135, 135, 113, 106, 40, 1, 113, 1, 88,
+ 1, 19, 21, 22, 23, 26, 27, 28, 29, 30,
+ 31, 32, 33, 34, 39, 72, 89, 90, 92, 100,
+ 104, 113, 133, 134, 137, 53, 123, 1, 4, 108,
+ 109, 130, 66, 91, 4, 66, 66, 66, 106, 66,
+ 88, 88, 88, 110, 113, 88, 106, 88, 93, 87,
+ 136, 137, 106, 113, 135, 1, 139, 113, 110, 94,
+ 4, 113, 113, 89, 4, 92, 95, 88, 66, 101,
+ 111, 134, 106, 106, 1, 4, 135, 88, 124, 125,
+ 126, 127, 67, 135, 135, 26, 40, 137, 112, 10,
+ 102, 106, 16, 126, 106, 106, 66, 130, 106, 135,
+ 103, 89, 133, 89, 113, 135, 113, 137, 117, 20,
+ 96, 97, 135, 106, 137, 106, 106, 106, 1, 24,
+ 25, 98, 106, 89, 106, 95, 89, 134, 7, 8,
+ 57, 58, 84, 99, 53, 138, 95, 135, 7, 7,
+ 138, 106, 135, 106, 106, 87, 106, 89, 87, 89
};
#define yyerrok (yyerrstatus = 0)
@@ -1286,8 +1350,7 @@ do { \
`--------------------------------*/
/*ARGSUSED*/
-#if (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
+#if (defined __STDC__ || defined __C99__FUNC__ || defined __cplusplus || defined _MSC_VER)
static void
yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
#else
@@ -1318,8 +1381,7 @@ yy_symbol_value_print (yyoutput, yytype, yyvaluep)
| Print this symbol on YYOUTPUT. |
`--------------------------------*/
-#if (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
+#if (defined __STDC__ || defined __C99__FUNC__ || defined __cplusplus || defined _MSC_VER)
static void
yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
#else
@@ -1344,8 +1406,7 @@ yy_symbol_print (yyoutput, yytype, yyvaluep)
| TOP (included). |
`------------------------------------------------------------------*/
-#if (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
+#if (defined __STDC__ || defined __C99__FUNC__ || defined __cplusplus || defined _MSC_VER)
static void
yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
#else
@@ -1375,8 +1436,7 @@ do { \
| Report that the YYRULE is going to be reduced. |
`------------------------------------------------*/
-#if (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
+#if (defined __STDC__ || defined __C99__FUNC__ || defined __cplusplus || defined _MSC_VER)
static void
yy_reduce_print (YYSTYPE *yyvsp, int yyrule)
#else
@@ -1444,8 +1504,7 @@ int yydebug;
# define yystrlen strlen
# else
/* Return the length of YYSTR. */
-#if (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
+#if (defined __STDC__ || defined __C99__FUNC__ || defined __cplusplus || defined _MSC_VER)
static YYSIZE_T
yystrlen (const char *yystr)
#else
@@ -1468,8 +1527,7 @@ yystrlen (yystr)
# else
/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
YYDEST. */
-#if (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
+#if (defined __STDC__ || defined __C99__FUNC__ || defined __cplusplus || defined _MSC_VER)
static char *
yystpcpy (char *yydest, const char *yysrc)
#else
@@ -1653,8 +1711,7 @@ yysyntax_error (char *yyresult, int yystate, int yychar)
`-----------------------------------------------*/
/*ARGSUSED*/
-#if (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
+#if (defined __STDC__ || defined __C99__FUNC__ || defined __cplusplus || defined _MSC_VER)
static void
yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep)
#else
@@ -1711,8 +1768,7 @@ int yynerrs;
`-------------------------*/
#ifdef YYPARSE_PARAM
-#if (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
+#if (defined __STDC__ || defined __C99__FUNC__ || defined __cplusplus || defined _MSC_VER)
int
yyparse (void *YYPARSE_PARAM)
#else
@@ -1721,8 +1777,7 @@ yyparse (YYPARSE_PARAM)
void *YYPARSE_PARAM;
#endif
#else /* ! YYPARSE_PARAM */
-#if (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
+#if (defined __STDC__ || defined __C99__FUNC__ || defined __cplusplus || defined _MSC_VER)
int
yyparse (void)
#else
@@ -1973,343 +2028,538 @@ yyreduce:
YY_REDUCE_PRINT (yyn);
switch (yyn)
{
- case 2:
+ case 3:
/* Line 1455 of yacc.c */
-#line 188 "awkgram.y"
+#line 218 "awkgram.y"
{
- check_funcs();
- }
+ rule = 0;
+ yyerrok;
+ }
break;
- case 4:
+ case 5:
/* Line 1455 of yacc.c */
-#line 196 "awkgram.y"
+#line 224 "awkgram.y"
{
- beginfile_or_endfile_rule = begin_or_end_rule = parsing_end_rule = FALSE;
- yyerrok;
+ next_sourcefile();
}
break;
- case 5:
+ case 6:
/* Line 1455 of yacc.c */
-#line 201 "awkgram.y"
+#line 228 "awkgram.y"
{
- beginfile_or_endfile_rule = begin_or_end_rule = parsing_end_rule = FALSE;
+ rule = 0;
/*
* If errors, give up, don't produce an infinite
* stream of syntax error messages.
*/
/* yyerrok; */
- }
+ }
break;
- case 6:
+ case 7:
/* Line 1455 of yacc.c */
-#line 213 "awkgram.y"
+#line 240 "awkgram.y"
{
- (yyvsp[(1) - (2)].nodeval)->rnode = (yyvsp[(2) - (2)].nodeval);
+ (void) append_rule((yyvsp[(1) - (2)]), (yyvsp[(2) - (2)]));
}
break;
- case 7:
+ case 8:
/* Line 1455 of yacc.c */
-#line 217 "awkgram.y"
+#line 244 "awkgram.y"
{
- if ((yyvsp[(1) - (2)].nodeval)->lnode != NULL) {
- /* pattern rule with non-empty pattern */
- (yyvsp[(1) - (2)].nodeval)->rnode = node(NULL, Node_K_print_rec, NULL);
- } else {
- /* an error */
- if (begin_or_end_rule)
- msg(_("%s blocks must have an action part"),
- (parsing_end_rule ? "END" : "BEGIN"));
- else if (beginfile_or_endfile_rule)
- msg(_("%s blocks must have an action part"),
- (parsing_endfile_rule ? "ENDFILE" : "BEGINFILE"));
- else
- msg(_("each rule must have a pattern or an action part"));
+ if (rule != Rule) {
+ msg(_("%s blocks must have an action part"), ruletab[rule]);
errcount++;
- }
+ } else if ((yyvsp[(1) - (2)]) == NULL) {
+ msg(_("each rule must have a pattern or an action part"));
+ errcount++;
+ } else /* pattern rule with non-empty pattern */
+ (void) append_rule((yyvsp[(1) - (2)]), NULL);
}
break;
- case 8:
+ case 9:
/* Line 1455 of yacc.c */
-#line 235 "awkgram.y"
+#line 255 "awkgram.y"
{
can_return = FALSE;
- if ((yyvsp[(1) - (2)].nodeval))
- func_install((yyvsp[(1) - (2)].nodeval), (yyvsp[(2) - (2)].nodeval));
+ if ((yyvsp[(1) - (2)]) && func_install((yyvsp[(1) - (2)]), (yyvsp[(2) - (2)])) < 0)
+ YYABORT;
+ func_params = NULL;
yyerrok;
}
break;
- case 9:
+ case 10:
/* Line 1455 of yacc.c */
-#line 245 "awkgram.y"
+#line 263 "awkgram.y"
{
- (yyval.nodeval) = append_pattern(&expression_value, (NODE *) NULL);
+ want_source = FALSE;
+ yyerrok;
}
break;
- case 10:
+ case 11:
/* Line 1455 of yacc.c */
-#line 249 "awkgram.y"
+#line 271 "awkgram.y"
{
- (yyval.nodeval) = append_pattern(&expression_value, (yyvsp[(1) - (1)].nodeval));
+ char *src = (yyvsp[(1) - (1)])->lextok;
+ if (include_source(src) < 0)
+ YYABORT;
+ efree(src);
+ bcfree((yyvsp[(1) - (1)]));
+ (yyval) = NULL;
}
break;
- case 11:
+ case 12:
/* Line 1455 of yacc.c */
-#line 253 "awkgram.y"
- {
- NODE *r;
+#line 280 "awkgram.y"
+ { (yyval) = NULL; }
+ break;
+
+ case 13:
+
+/* Line 1455 of yacc.c */
+#line 282 "awkgram.y"
+ { (yyval) = NULL; }
+ break;
+
+ case 14:
+
+/* Line 1455 of yacc.c */
+#line 287 "awkgram.y"
+ { (yyval) = NULL; rule = Rule; }
+ break;
+
+ case 15:
+
+/* Line 1455 of yacc.c */
+#line 289 "awkgram.y"
+ { (yyval) = (yyvsp[(1) - (1)]); rule = Rule; }
+ break;
- getnode(r);
- r->type = Node_line_range;
- r->condpair = node((yyvsp[(1) - (3)].nodeval), Node_cond_pair, (yyvsp[(3) - (3)].nodeval));
- r->triggered = FALSE;
- (yyval.nodeval) = append_pattern(&expression_value, r);
+ case 16:
+
+/* Line 1455 of yacc.c */
+#line 291 "awkgram.y"
+ {
+ INSTRUCTION *tp;
+
+ add_lint((yyvsp[(1) - (3)]), LINT_assign_in_cond);
+ add_lint((yyvsp[(3) - (3)]), LINT_assign_in_cond);
+
+ tp = instruction(Op_no_op);
+ list_prepend((yyvsp[(1) - (3)]), bcalloc(Op_line_range, !!do_profiling + 1, 0));
+ (yyvsp[(1) - (3)])->nexti->triggered = FALSE;
+ (yyvsp[(1) - (3)])->nexti->target_jmp = (yyvsp[(3) - (3)])->nexti;
+
+ list_append((yyvsp[(1) - (3)]), instruction(Op_cond_pair));
+ (yyvsp[(1) - (3)])->lasti->line_range = (yyvsp[(1) - (3)])->nexti;
+ (yyvsp[(1) - (3)])->lasti->target_jmp = tp;
+
+ list_append((yyvsp[(3) - (3)]), instruction(Op_cond_pair));
+ (yyvsp[(3) - (3)])->lasti->line_range = (yyvsp[(1) - (3)])->nexti;
+ (yyvsp[(3) - (3)])->lasti->target_jmp = tp;
+ if (do_profiling) {
+ ((yyvsp[(1) - (3)])->nexti + 1)->condpair_left = (yyvsp[(1) - (3)])->lasti;
+ ((yyvsp[(1) - (3)])->nexti + 1)->condpair_right = (yyvsp[(3) - (3)])->lasti;
+ }
+ (yyval) = list_append(list_merge((yyvsp[(1) - (3)]), (yyvsp[(3) - (3)])), tp);
+ rule = Rule;
}
break;
- case 12:
+ case 17:
/* Line 1455 of yacc.c */
-#line 263 "awkgram.y"
+#line 317 "awkgram.y"
{
static int begin_seen = 0;
if (do_lint_old && ++begin_seen == 2)
warning(_("old awk does not support multiple `BEGIN' or `END' rules"));
- begin_or_end_rule = TRUE;
- (yyval.nodeval) = append_pattern(&begin_block, (NODE *) NULL);
+ (yyvsp[(1) - (1)])->in_rule = rule = BEGIN;
+ (yyvsp[(1) - (1)])->source_file = source;
+ (yyval) = (yyvsp[(1) - (1)]);
}
break;
- case 13:
+ case 18:
/* Line 1455 of yacc.c */
-#line 272 "awkgram.y"
+#line 327 "awkgram.y"
{
static int end_seen = 0;
if (do_lint_old && ++end_seen == 2)
warning(_("old awk does not support multiple `BEGIN' or `END' rules"));
- begin_or_end_rule = parsing_end_rule = TRUE;
- (yyval.nodeval) = append_pattern(&end_block, (NODE *) NULL);
+ (yyvsp[(1) - (1)])->in_rule = rule = END;
+ (yyvsp[(1) - (1)])->source_file = source;
+ (yyval) = (yyvsp[(1) - (1)]);
}
break;
- case 14:
+ case 19:
/* Line 1455 of yacc.c */
-#line 281 "awkgram.y"
+#line 337 "awkgram.y"
{
- beginfile_or_endfile_rule = TRUE;
- (yyval.nodeval) = append_pattern(&beginfile_block, (NODE *) NULL);
+ (yyvsp[(1) - (1)])->in_rule = rule = BEGINFILE;
+ (yyvsp[(1) - (1)])->source_file = source;
+ (yyval) = (yyvsp[(1) - (1)]);
}
break;
- case 15:
+ case 20:
/* Line 1455 of yacc.c */
-#line 286 "awkgram.y"
+#line 343 "awkgram.y"
{
- beginfile_or_endfile_rule = parsing_endfile_rule = TRUE;
- (yyval.nodeval) = append_pattern(&endfile_block, (NODE *) NULL);
+ (yyvsp[(1) - (1)])->in_rule = rule = ENDFILE;
+ (yyvsp[(1) - (1)])->source_file = source;
+ (yyval) = (yyvsp[(1) - (1)]);
}
break;
- case 16:
+ case 21:
/* Line 1455 of yacc.c */
-#line 294 "awkgram.y"
- { (yyval.nodeval) = (yyvsp[(2) - (5)].nodeval); }
+#line 352 "awkgram.y"
+ {
+ if ((yyvsp[(2) - (5)]) == NULL)
+ (yyval) = list_create(instruction(Op_no_op));
+ else
+ (yyval) = (yyvsp[(2) - (5)]);
+ }
break;
- case 17:
+ case 22:
/* Line 1455 of yacc.c */
-#line 299 "awkgram.y"
- { (yyval.sval) = (yyvsp[(1) - (1)].sval); }
+#line 362 "awkgram.y"
+ { (yyval) = (yyvsp[(1) - (1)]); }
break;
- case 18:
+ case 23:
/* Line 1455 of yacc.c */
-#line 301 "awkgram.y"
- { (yyval.sval) = (yyvsp[(1) - (1)].sval); }
+#line 364 "awkgram.y"
+ { (yyval) = (yyvsp[(1) - (1)]); }
break;
- case 19:
+ case 24:
/* Line 1455 of yacc.c */
-#line 303 "awkgram.y"
+#line 366 "awkgram.y"
{
yyerror(_("`%s' is a built-in function, it cannot be redefined"),
tokstart);
- errcount++;
- (yyval.sval) = builtin_func;
+ (yyvsp[(1) - (1)])->opcode = Op_symbol; /* Op_symbol instead of Op_token so that
+ * free_bc_internal does not try to free it
+ */
+ (yyvsp[(1) - (1)])->lextok = builtin_func;
+ (yyval) = (yyvsp[(1) - (1)]);
/* yyerrok; */
}
break;
- case 22:
+ case 25:
/* Line 1455 of yacc.c */
-#line 319 "awkgram.y"
+#line 377 "awkgram.y"
+ { (yyval) = (yyvsp[(2) - (2)]); }
+ break;
+
+ case 28:
+
+/* Line 1455 of yacc.c */
+#line 387 "awkgram.y"
{
- param_counter = 0;
- }
+ param_counter = 0;
+ func_params = NULL;
+ }
break;
- case 23:
+ case 29:
/* Line 1455 of yacc.c */
-#line 323 "awkgram.y"
+#line 392 "awkgram.y"
{
NODE *t;
- t = make_param((yyvsp[(3) - (7)].sval));
+ (yyvsp[(1) - (7)])->source_file = source;
+ t = make_param((yyvsp[(3) - (7)])->lextok);
+ (yyvsp[(3) - (7)])->lextok = NULL;
+ bcfree((yyvsp[(3) - (7)]));
t->flags |= FUNC;
- (yyval.nodeval) = append_right(t, (yyvsp[(5) - (7)].nodeval));
+ t->rnode = func_params;
+ func_params = t;
+ (yyval) = (yyvsp[(1) - (7)]);
can_return = TRUE;
/* check for duplicate parameter names */
- if (dup_parms((yyval.nodeval)))
+ if (dup_parms(t))
errcount++;
}
break;
- case 24:
+ case 30:
/* Line 1455 of yacc.c */
-#line 342 "awkgram.y"
+#line 416 "awkgram.y"
{ ++want_regexp; }
break;
- case 25:
+ case 31:
/* Line 1455 of yacc.c */
-#line 344 "awkgram.y"
+#line 418 "awkgram.y"
{
- NODE *n;
- size_t len = strlen((yyvsp[(3) - (3)].sval));
+ NODE *n, *exp;
+ char *re;
+ size_t len;
+ re = (yyvsp[(3) - (3)])->lextok;
+ len = strlen(re);
if (do_lint) {
if (len == 0)
lintwarn(_("regexp constant `//' looks like a C++ comment, but is not"));
- else if (((yyvsp[(3) - (3)].sval))[0] == '*' && ((yyvsp[(3) - (3)].sval))[len-1] == '*')
+ else if ((re)[0] == '*' && (re)[len-1] == '*')
/* possible C comment */
lintwarn(_("regexp constant `/%s/' looks like a C comment, but is not"), tokstart);
}
- getnode(n);
- n->type = Node_regex;
- n->re_exp = make_string((yyvsp[(3) - (3)].sval), len);
- n->re_reg = make_regexp((yyvsp[(3) - (3)].sval), len, FALSE, TRUE);
- n->re_text = NULL;
- n->re_flags = CONSTANT;
- n->re_cnt = 1;
- (yyval.nodeval) = n;
+
+ exp = make_str_node(re, len, ALREADY_MALLOCED);
+ n = make_regnode(Node_regex, exp);
+ if (n == NULL) {
+ unref(exp);
+ YYABORT;
+ }
+ (yyval) = (yyvsp[(3) - (3)]);
+ (yyval)->opcode = Op_match_rec;
+ (yyval)->memory = n;
}
break;
- case 28:
+ case 32:
/* Line 1455 of yacc.c */
-#line 373 "awkgram.y"
- { (yyval.nodeval) = NULL; }
+#line 447 "awkgram.y"
+ { bcfree((yyvsp[(1) - (1)])); }
break;
- case 29:
+ case 34:
/* Line 1455 of yacc.c */
-#line 375 "awkgram.y"
+#line 453 "awkgram.y"
+ { (yyval) = NULL; }
+ break;
+
+ case 35:
+
+/* Line 1455 of yacc.c */
+#line 455 "awkgram.y"
{
- if ((yyvsp[(2) - (2)].nodeval) == NULL)
- (yyval.nodeval) = (yyvsp[(1) - (2)].nodeval);
+ if ((yyvsp[(2) - (2)]) == NULL)
+ (yyval) = (yyvsp[(1) - (2)]);
else {
- if (do_lint && isnoeffect((yyvsp[(2) - (2)].nodeval)->type))
- lintwarn(_("statement may have no effect"));
- if ((yyvsp[(1) - (2)].nodeval) == NULL)
- (yyval.nodeval) = (yyvsp[(2) - (2)].nodeval);
+ add_lint((yyvsp[(2) - (2)]), LINT_no_effect);
+ if ((yyvsp[(1) - (2)]) == NULL)
+ (yyval) = (yyvsp[(2) - (2)]);
else
- (yyval.nodeval) = append_right(
- ((yyvsp[(1) - (2)].nodeval)->type == Node_statement_list ? (yyvsp[(1) - (2)].nodeval)
- : node((yyvsp[(1) - (2)].nodeval), Node_statement_list, (NODE *) NULL)),
- ((yyvsp[(2) - (2)].nodeval)->type == Node_statement_list ? (yyvsp[(2) - (2)].nodeval)
- : node((yyvsp[(2) - (2)].nodeval), Node_statement_list, (NODE *) NULL)));
+ (yyval) = list_merge((yyvsp[(1) - (2)]), (yyvsp[(2) - (2)]));
}
- yyerrok;
+ yyerrok;
}
break;
- case 30:
+ case 36:
/* Line 1455 of yacc.c */
-#line 393 "awkgram.y"
- { (yyval.nodeval) = NULL; }
+#line 468 "awkgram.y"
+ { (yyval) = NULL; }
break;
- case 33:
+ case 39:
/* Line 1455 of yacc.c */
-#line 403 "awkgram.y"
- { (yyval.nodeval) = NULL; }
+#line 478 "awkgram.y"
+ { (yyval) = NULL; }
break;
- case 34:
+ case 40:
/* Line 1455 of yacc.c */
-#line 405 "awkgram.y"
- { (yyval.nodeval) = (yyvsp[(2) - (3)].nodeval); }
+#line 480 "awkgram.y"
+ { (yyval) = (yyvsp[(2) - (3)]); }
break;
- case 35:
+ case 41:
/* Line 1455 of yacc.c */
-#line 407 "awkgram.y"
- { (yyval.nodeval) = (yyvsp[(1) - (1)].nodeval); }
+#line 482 "awkgram.y"
+ {
+ if (do_profiling)
+ (yyval) = list_prepend((yyvsp[(1) - (1)]), instruction(Op_exec_count));
+ else
+ (yyval) = (yyvsp[(1) - (1)]);
+ }
break;
- case 36:
+ case 42:
/* Line 1455 of yacc.c */
-#line 409 "awkgram.y"
- { (yyval.nodeval) = node((yyvsp[(3) - (9)].nodeval), Node_K_switch, (yyvsp[(7) - (9)].nodeval)); }
+#line 489 "awkgram.y"
+ {
+ INSTRUCTION *ip;
+
+ (yyvsp[(1) - (9)])->opcode = Op_push_loop;
+ (yyvsp[(1) - (9)])->target_continue = NULL;
+ ip = list_prepend((yyvsp[(3) - (9)]), (yyvsp[(1) - (9)]));
+ if ((yyvsp[(7) - (9)])->nexti->switch_dflt == NULL)
+ (yyvsp[(7) - (9)])->nexti->switch_dflt = (yyvsp[(1) - (9)]); /* implicit break */
+ if (do_profiling) {
+ (void) list_prepend(ip, instruction(Op_exec_count));
+ ((yyvsp[(1) - (9)]) + 1)->opcode = Op_K_switch;
+ ((yyvsp[(1) - (9)]) + 1)->switch_body = (yyvsp[(7) - (9)])->nexti;
+ }
+ (void) list_merge(ip, (yyvsp[(7) - (9)]));
+ (yyval) = list_append(ip, instruction(Op_pop_loop));
+ (yyvsp[(1) - (9)])->target_break = (yyval)->lasti;
+
+ break_allowed--;
+ fix_break_continue((yyvsp[(1) - (9)]), (yyval)->lasti, FALSE);
+ }
break;
- case 37:
+ case 43:
/* Line 1455 of yacc.c */
-#line 411 "awkgram.y"
- { (yyval.nodeval) = node((yyvsp[(3) - (6)].nodeval), Node_K_while, (yyvsp[(6) - (6)].nodeval)); }
+#line 510 "awkgram.y"
+ {
+ /*
+ * [Op_push_loop| z| y]
+ * -----------------
+ * z:
+ * cond
+ * -----------------
+ * [Op_jmp_false y ]
+ * -----------------
+ * body
+ * -----------------
+ * [Op_jmp z ]
+ * y: [Op_pop_loop ]
+ */
+
+ INSTRUCTION *ip, *tp;
+
+ tp = instruction(Op_pop_loop);
+
+ add_lint((yyvsp[(3) - (6)]), LINT_assign_in_cond);
+ (yyvsp[(1) - (6)])->opcode = Op_push_loop;
+ (yyvsp[(1) - (6)])->target_continue = (yyvsp[(3) - (6)])->nexti;
+ (yyvsp[(1) - (6)])->target_break = tp;
+ ip = list_create((yyvsp[(1) - (6)]));
+
+ (void) list_merge(ip, (yyvsp[(3) - (6)]));
+ (void) list_append(ip, instruction(Op_jmp_false));
+ ip->lasti->target_jmp = tp;
+
+ if (do_profiling) {
+ (void) list_append(ip, instruction(Op_exec_count));
+ ((yyvsp[(1) - (6)]) + 1)->opcode = Op_K_while;
+ ((yyvsp[(1) - (6)]) + 1)->while_body = ip->lasti;
+ }
+
+ if ((yyvsp[(6) - (6)]) != NULL)
+ (void) list_merge(ip, (yyvsp[(6) - (6)]));
+ (void) list_append(ip, instruction(Op_jmp));
+ ip->lasti->target_jmp = (yyvsp[(1) - (6)])->target_continue;
+ (yyval) = list_append(ip, tp);
+
+ break_allowed--;
+ continue_allowed--;
+ fix_break_continue((yyvsp[(1) - (6)]), tp, TRUE);
+ }
break;
- case 38:
+ case 44:
/* Line 1455 of yacc.c */
-#line 413 "awkgram.y"
- { (yyval.nodeval) = node((yyvsp[(6) - (8)].nodeval), Node_K_do, (yyvsp[(3) - (8)].nodeval)); }
+#line 556 "awkgram.y"
+ {
+ /*
+ * [Op_push_loop | x | y]
+ * -----------------
+ * z:
+ * body
+ * -----------------
+ * x:
+ * cond
+ * -----------------
+ * [Op_jmp_true | z ]
+ * y: [Op_pop_loop ]
+ */
+
+ INSTRUCTION *ip;
+
+ (yyvsp[(4) - (8)])->opcode = Op_pop_loop;
+ (yyvsp[(1) - (8)])->opcode = Op_push_loop;
+ (yyvsp[(1) - (8)])->target_continue = (yyvsp[(6) - (8)])->nexti;
+ (yyvsp[(1) - (8)])->target_break = (yyvsp[(4) - (8)]);
+
+ add_lint((yyvsp[(6) - (8)]), LINT_assign_in_cond);
+ if ((yyvsp[(3) - (8)]) != NULL)
+ ip = list_merge((yyvsp[(3) - (8)]), (yyvsp[(6) - (8)]));
+ else
+ ip = list_prepend((yyvsp[(6) - (8)]), instruction(Op_no_op));
+
+ if (do_profiling) {
+ (void) list_prepend(ip, instruction(Op_exec_count));
+ ((yyvsp[(1) - (8)]) + 1)->opcode = Op_K_do;
+ ((yyvsp[(1) - (8)]) + 1)->doloop_cond = (yyvsp[(1) - (8)])->target_continue;
+ }
+
+ (void) list_append(ip, instruction(Op_jmp_true));
+ ip->lasti->target_jmp = ip->nexti;
+ (yyval) = list_prepend(ip, (yyvsp[(1) - (8)]));
+ (void) list_append(ip, (yyvsp[(4) - (8)]));
+
+ break_allowed--;
+ continue_allowed--;
+ fix_break_continue((yyvsp[(1) - (8)]), (yyvsp[(4) - (8)]), TRUE);
+ }
break;
- case 39:
+ case 45:
/* Line 1455 of yacc.c */
-#line 415 "awkgram.y"
+#line 599 "awkgram.y"
{
- /*
- * Efficiency hack. Recognize the special case of
+
+ char *var_name = (yyvsp[(3) - (8)])->lextok;
+
+ if ((yyvsp[(8) - (8)]) != NULL
+ && (yyvsp[(8) - (8)])->lasti->opcode == Op_K_delete
+ && (yyvsp[(8) - (8)])->lasti->expr_count == 1
+ && (yyvsp[(8) - (8)])->nexti->opcode == Op_push
+ && ((yyvsp[(8) - (8)])->nexti->memory->type != Node_var || !((yyvsp[(8) - (8)])->nexti->memory->var_update))
+ && strcmp((yyvsp[(8) - (8)])->nexti->memory->vname, var_name) == 0
+ ) {
+
+ /* Efficiency hack. Recognize the special case of
*
* for (iggy in foo)
* delete foo[iggy]
@@ -2320,1170 +2570,1652 @@ yyreduce:
*
* Check that the body is a `delete a[i]' statement,
* and that both the loop var and array names match.
- */
- if ((yyvsp[(8) - (8)].nodeval) != NULL && (yyvsp[(8) - (8)].nodeval)->type == Node_K_delete && (yyvsp[(8) - (8)].nodeval)->rnode != NULL) {
- NODE *arr, *sub;
-
- assert((yyvsp[(8) - (8)].nodeval)->rnode->type == Node_expression_list);
- arr = (yyvsp[(8) - (8)].nodeval)->lnode; /* array var */
- sub = (yyvsp[(8) - (8)].nodeval)->rnode->lnode; /* index var */
-
- if ( (arr->type == Node_var_new
- || arr->type == Node_var_array
- || arr->type == Node_param_list)
- && (sub->type == Node_var_new
- || sub->type == Node_var
- || sub->type == Node_param_list)
- && strcmp((yyvsp[(3) - (8)].sval), sub->vname) == 0
- && strcmp((yyvsp[(5) - (8)].sval), arr->vname) == 0) {
- (yyvsp[(8) - (8)].nodeval)->type = Node_K_delete_loop;
- (yyval.nodeval) = (yyvsp[(8) - (8)].nodeval);
- free((yyvsp[(3) - (8)].sval)); /* thanks to valgrind for pointing these out */
- free((yyvsp[(5) - (8)].sval));
+ */
+ NODE *arr = NULL;
+ INSTRUCTION *ip = (yyvsp[(8) - (8)])->nexti->nexti;
+
+ if ((yyvsp[(5) - (8)])->nexti->opcode == Op_push && (yyvsp[(5) - (8)])->lasti == (yyvsp[(5) - (8)])->nexti)
+ arr = (yyvsp[(5) - (8)])->nexti->memory;
+ if (arr != NULL
+ && ip->opcode == Op_no_op
+ && ip->nexti->opcode == Op_push_array
+ && strcmp(ip->nexti->memory->vname, arr->vname) == 0
+ && ip->nexti->nexti == (yyvsp[(8) - (8)])->lasti
+ ) {
+ (void) make_assignable((yyvsp[(8) - (8)])->nexti);
+ (yyvsp[(8) - (8)])->lasti->opcode = Op_K_delete_loop;
+ (yyvsp[(8) - (8)])->lasti->expr_count = 0;
+ bcfree((yyvsp[(1) - (8)]));
+ efree(var_name);
+ bcfree((yyvsp[(3) - (8)]));
+ bcfree((yyvsp[(4) - (8)]));
+ bcfree((yyvsp[(5) - (8)]));
+ (yyval) = (yyvsp[(8) - (8)]);
}
- else
- goto regular_loop;
} else {
- regular_loop:
- (yyval.nodeval) = node((yyvsp[(8) - (8)].nodeval), Node_K_arrayfor,
- make_for_loop(variable((yyvsp[(3) - (8)].sval), CAN_FREE, Node_var),
- (NODE *) NULL, variable((yyvsp[(5) - (8)].sval), CAN_FREE, Node_var_array)));
- }
+
+ /* [ Op_push_array a ]
+ * [ Op_arrayfor_init| w ]
+ * [ Op_push_loop | z | y ]
+ * z: [ Op_arrayfor_incr | y ]
+ * [ Op_var_assign if any ]
+ *
+ * body
+ *
+ * [Op_jmp | z ]
+ * y: [Op_pop_loop ]
+ * w: [Op_arrayfor_final ]
+ */
+ INSTRUCTION *ip;
+
+ ip = (yyvsp[(5) - (8)]);
+ ip->nexti->opcode = Op_push_array;
+ (yyvsp[(3) - (8)])->opcode = Op_arrayfor_init;
+ (void) list_append(ip, (yyvsp[(3) - (8)]));
+
+ (yyvsp[(4) - (8)])->opcode = Op_arrayfor_incr;
+ (yyvsp[(4) - (8)])->array_var = variable(var_name, Node_var);
+ (yyvsp[(1) - (8)])->opcode = Op_push_loop;
+ (yyvsp[(1) - (8)])->target_continue = (yyvsp[(4) - (8)]);
+
+ (void) list_append(ip, (yyvsp[(1) - (8)]));
+
+ /* add update_FOO instruction if necessary */
+ if ((yyvsp[(4) - (8)])->array_var->type == Node_var && (yyvsp[(4) - (8)])->array_var->var_update) {
+ (void) list_append(ip, instruction(Op_var_update));
+ ip->lasti->memory = (yyvsp[(4) - (8)])->array_var;
+ }
+ (void) list_append(ip, (yyvsp[(4) - (8)]));
+
+ /* add set_FOO instruction if necessary */
+ if ((yyvsp[(4) - (8)])->array_var->type == Node_var && (yyvsp[(4) - (8)])->array_var->var_assign) {
+ (void) list_append(ip, instruction(Op_var_assign));
+ ip->lasti->memory = (yyvsp[(4) - (8)])->array_var;
+ }
+
+ if (do_profiling) {
+ (void) list_append(ip, instruction(Op_exec_count));
+ ((yyvsp[(1) - (8)]) + 1)->opcode = Op_K_arrayfor;
+ ((yyvsp[(1) - (8)]) + 1)->forloop_cond = (yyvsp[(4) - (8)]);
+ ((yyvsp[(1) - (8)]) + 1)->forloop_body = ip->lasti;
+ }
+
+ if ((yyvsp[(8) - (8)]) != NULL)
+ (void) list_merge(ip, (yyvsp[(8) - (8)]));
+
+ (void) list_append(ip, instruction(Op_jmp));
+ ip->lasti->target_jmp = (yyvsp[(4) - (8)]);
+ (void) list_append(ip, instruction(Op_pop_loop));
+ (yyvsp[(4) - (8)])->target_jmp = (yyvsp[(1) - (8)])->target_break = ip->lasti;
+ (yyval) = list_append(ip, instruction(Op_arrayfor_final));
+ (yyvsp[(3) - (8)])->target_jmp = (yyval)->lasti;
+
+ fix_break_continue((yyvsp[(1) - (8)]), (yyvsp[(4) - (8)])->target_jmp, TRUE);
+ }
+
+ break_allowed--;
+ continue_allowed--;
}
break;
- case 40:
+ case 46:
/* Line 1455 of yacc.c */
-#line 459 "awkgram.y"
+#line 709 "awkgram.y"
{
- (yyval.nodeval) = node((yyvsp[(12) - (12)].nodeval), Node_K_for, (NODE *) make_for_loop((yyvsp[(3) - (12)].nodeval), (yyvsp[(6) - (12)].nodeval), (yyvsp[(9) - (12)].nodeval)));
+ (yyval) = mk_for_loop((yyvsp[(1) - (12)]), (yyvsp[(3) - (12)]), (yyvsp[(6) - (12)]), (yyvsp[(9) - (12)]), (yyvsp[(12) - (12)]));
+
+ break_allowed--;
+ continue_allowed--;
}
break;
- case 41:
+ case 47:
/* Line 1455 of yacc.c */
-#line 463 "awkgram.y"
+#line 716 "awkgram.y"
{
- (yyval.nodeval) = node((yyvsp[(11) - (11)].nodeval), Node_K_for,
- (NODE *) make_for_loop((yyvsp[(3) - (11)].nodeval), (NODE *) NULL, (yyvsp[(8) - (11)].nodeval)));
+ (yyval) = mk_for_loop((yyvsp[(1) - (11)]), (yyvsp[(3) - (11)]), (INSTRUCTION *) NULL, (yyvsp[(8) - (11)]), (yyvsp[(11) - (11)]));
+
+ break_allowed--;
+ continue_allowed--;
}
break;
- case 42:
+ case 48:
/* Line 1455 of yacc.c */
-#line 469 "awkgram.y"
- { (yyval.nodeval) = node((NODE *) NULL, Node_K_break, (NODE *) NULL); }
+#line 723 "awkgram.y"
+ {
+ if (do_profiling)
+ (yyval) = list_prepend((yyvsp[(1) - (1)]), instruction(Op_exec_count));
+ else
+ (yyval) = (yyvsp[(1) - (1)]);
+ }
break;
- case 43:
+ case 49:
/* Line 1455 of yacc.c */
-#line 472 "awkgram.y"
- { (yyval.nodeval) = node((NODE *) NULL, Node_K_continue, (NODE *) NULL); }
+#line 733 "awkgram.y"
+ {
+ if (! break_allowed)
+ yyerror(_("`break' is not allowed outside a loop or switch"));
+
+ (yyvsp[(1) - (2)])->target_jmp = NULL;
+ (yyval) = list_create((yyvsp[(1) - (2)]));
+
+ }
break;
- case 44:
+ case 50:
/* Line 1455 of yacc.c */
-#line 474 "awkgram.y"
- { NODETYPE type;
+#line 742 "awkgram.y"
+ {
+ if (! continue_allowed)
+ yyerror(_("`continue' is not allowed outside a loop"));
- if (begin_or_end_rule)
- yyerror(_("`%s' used in %s action"), "next",
- (parsing_end_rule ? "END" : "BEGIN"));
- else if (beginfile_or_endfile_rule)
- yyerror(_("`%s' used in %s action"), "next",
- (parsing_endfile_rule ? "ENDFILE" : "BEGINFILE"));
- type = Node_K_next;
- (yyval.nodeval) = node((NODE *) NULL, type, (NODE *) NULL);
- }
+ (yyvsp[(1) - (2)])->target_jmp = NULL;
+ (yyval) = list_create((yyvsp[(1) - (2)]));
+
+ }
break;
- case 45:
+ case 51:
/* Line 1455 of yacc.c */
-#line 486 "awkgram.y"
+#line 751 "awkgram.y"
{
- static short warned = FALSE;
+ if (rule != Rule)
+ yyerror(_("`next' used in %s action"), ruletab[rule]);
+ (yyvsp[(1) - (2)])->target_jmp = ip_rec;
+ (yyval) = list_create((yyvsp[(1) - (2)]));
+ }
+ break;
- if (do_traditional) {
- /*
- * can't use yyerror, since may have overshot
- * the source line
- */
+ case 52:
+
+/* Line 1455 of yacc.c */
+#line 758 "awkgram.y"
+ {
+ static short warned = FALSE;
+
+ if (do_traditional) {
+ /*
+ * can't use yyerror, since may have overshot
+ * the source line
+ */
errcount++;
error(_("`nextfile' is a gawk extension"));
- }
- if (do_lint && ! warned) {
- warned = TRUE;
+ }
+ if (do_lint && ! warned) {
+ warned = TRUE;
lintwarn(_("`nextfile' is a gawk extension"));
- }
- if (begin_or_end_rule) {
- /* same thing */
- errcount++;
- error(_("`%s' used in %s action"), "nextfile",
- (parsing_end_rule ? "END" : "BEGIN"));
- }
-#if 0
- else if (beginfile_or_endfile_rule) {
- /* same thing */
- errcount++;
- error(_("`%s' used in %s action"), "nextfile",
- (parsing_endfile_rule ? "END" : "BEGIN"));
- }
-#endif
- else if (parsing_endfile_rule) {
- /* same thing */
+ }
+ if (rule == BEGIN || rule == END || rule == ENDFILE) {
errcount++;
- error(_("`%s' used in %s action"), "nextfile",
- (parsing_endfile_rule ? "ENDFILE" : "BEGINFILE"));
- }
- (yyval.nodeval) = node((NODE *) NULL, Node_K_nextfile, (NODE *) NULL);
+ error(_("`nextfile' used in %s action"), ruletab[rule]);
}
+
+ (yyvsp[(1) - (2)])->target_jmp = ip_newfile;
+ (yyvsp[(1) - (2)])->target_endfile = ip_endfile;
+ (yyval) = list_create((yyvsp[(1) - (2)]));
+ }
break;
- case 46:
+ case 53:
/* Line 1455 of yacc.c */
-#line 524 "awkgram.y"
- { (yyval.nodeval) = node((yyvsp[(2) - (3)].nodeval), Node_K_exit, (NODE *) NULL); }
+#line 783 "awkgram.y"
+ {
+ if (rule == END)
+ (yyvsp[(1) - (3)])->target_jmp = ip_atexit;
+ else
+ (yyvsp[(1) - (3)])->target_jmp = ip_end; /* first instruction (no-op) in end block */
+
+ if ((yyvsp[(2) - (3)]) == NULL) {
+ (yyval) = list_create((yyvsp[(1) - (3)]));
+ (void) list_prepend((yyval), instruction(Op_push_i));
+ (yyval)->nexti->memory = Nnull_string;
+ } else
+ (yyval) = list_append((yyvsp[(2) - (3)]), (yyvsp[(1) - (3)]));
+ }
break;
- case 47:
+ case 54:
/* Line 1455 of yacc.c */
-#line 526 "awkgram.y"
+#line 797 "awkgram.y"
{
- if (! can_return)
+ if (! can_return)
yyerror(_("`return' used outside function context"));
- }
+ }
break;
- case 48:
+ case 55:
/* Line 1455 of yacc.c */
-#line 531 "awkgram.y"
+#line 800 "awkgram.y"
{
- (yyval.nodeval) = node((yyvsp[(3) - (4)].nodeval) == NULL ? Nnull_string : (yyvsp[(3) - (4)].nodeval),
- Node_K_return, (NODE *) NULL);
- }
+ if ((yyvsp[(3) - (4)]) == NULL) {
+ (yyval) = list_create((yyvsp[(1) - (4)]));
+ (void) list_prepend((yyval), instruction(Op_push_i));
+ (yyval)->nexti->memory = Nnull_string;
+ } else
+ (yyval) = list_append((yyvsp[(3) - (4)]), (yyvsp[(1) - (4)]));
+ }
break;
- case 50:
+ case 57:
/* Line 1455 of yacc.c */
-#line 547 "awkgram.y"
+#line 820 "awkgram.y"
{ in_print = TRUE; in_parens = 0; }
break;
- case 51:
+ case 58:
/* Line 1455 of yacc.c */
-#line 548 "awkgram.y"
+#line 821 "awkgram.y"
{
/*
* Optimization: plain `print' has no expression list, so $3 is null.
- * If $3 is an expression list with one element (rnode == null)
- * and lnode is a field spec for field 0, we have `print $0'.
- * For both, use Node_K_print_rec, which is faster for these two cases.
+ * If $3 is NULL or is a bytecode list for $0 use Op_K_print_rec,
+ * which is faster for these two cases.
*/
- if ((yyvsp[(1) - (4)].nodetypeval) == Node_K_print &&
- ((yyvsp[(3) - (4)].nodeval) == NULL
- || ((yyvsp[(3) - (4)].nodeval)->type == Node_expression_list
- && (yyvsp[(3) - (4)].nodeval)->rnode == NULL
- && (yyvsp[(3) - (4)].nodeval)->lnode->type == Node_field_spec
- && (yyvsp[(3) - (4)].nodeval)->lnode->lnode->type == Node_val
- && (yyvsp[(3) - (4)].nodeval)->lnode->lnode->numbr == 0.0))
+
+ if ((yyvsp[(1) - (4)])->opcode == Op_K_print &&
+ ((yyvsp[(3) - (4)]) == NULL
+ || ((yyvsp[(3) - (4)])->lasti->opcode == Op_field_spec
+ && (yyvsp[(3) - (4)])->nexti->nexti->nexti == (yyvsp[(3) - (4)])->lasti
+ && (yyvsp[(3) - (4)])->nexti->nexti->opcode == Op_push_i
+ && (yyvsp[(3) - (4)])->nexti->nexti->memory->type == Node_val
+ && (yyvsp[(3) - (4)])->nexti->nexti->memory->numbr == 0.0)
+ )
) {
static short warned = FALSE;
+ /* -----------------
+ * output_redir
+ * [ redirect exp ]
+ * -----------------
+ * expression_list
+ * ------------------
+ * [Op_K_print_rec | NULL | redir_type | expr_count]
+ */
- (yyval.nodeval) = node(NULL, Node_K_print_rec, (yyvsp[(4) - (4)].nodeval));
+ if ((yyvsp[(3) - (4)]) != NULL) {
+ bcfree((yyvsp[(3) - (4)])->lasti); /* Op_field_spec */
+ (yyvsp[(3) - (4)])->nexti->nexti->memory->flags &= ~PERM;
+ (yyvsp[(3) - (4)])->nexti->nexti->memory->flags |= MALLOC;
+ unref((yyvsp[(3) - (4)])->nexti->nexti->memory); /* Node_val */
+ bcfree((yyvsp[(3) - (4)])->nexti->nexti); /* Op_push_i */
+ bcfree((yyvsp[(3) - (4)])->nexti); /* Op_list */
+ bcfree((yyvsp[(3) - (4)])); /* Op_list */
+ } else {
+ if (do_lint && (rule == BEGIN || rule == END) && ! warned) {
+ warned = TRUE;
+ lintwarn(
+ _("plain `print' in BEGIN or END rule should probably be `print \"\"'"));
+ }
+ }
- if (do_lint && (yyvsp[(3) - (4)].nodeval) == NULL && begin_or_end_rule && ! warned) {
- warned = TRUE;
- lintwarn(
- _("plain `print' in BEGIN or END rule should probably be `print \"\"'"));
+ (yyvsp[(1) - (4)])->expr_count = 0;
+ (yyvsp[(1) - (4)])->opcode = Op_K_print_rec;
+ if ((yyvsp[(4) - (4)]) == NULL) { /* no redircetion */
+ (yyvsp[(1) - (4)])->redir_type = 0;
+ (yyval) = list_create((yyvsp[(1) - (4)]));
+ } else {
+ INSTRUCTION *ip;
+ ip = (yyvsp[(4) - (4)])->nexti;
+ (yyvsp[(1) - (4)])->redir_type = ip->redir_type;
+ (yyvsp[(4) - (4)])->nexti = ip->nexti;
+ bcfree(ip);
+ (yyval) = list_append((yyvsp[(4) - (4)]), (yyvsp[(1) - (4)]));
}
} else {
- (yyval.nodeval) = node((yyvsp[(3) - (4)].nodeval), (yyvsp[(1) - (4)].nodetypeval), (yyvsp[(4) - (4)].nodeval));
- if ((yyval.nodeval)->type == Node_K_printf)
- count_args((yyval.nodeval));
+ /* -----------------
+ * [ output_redir ]
+ * [ redirect exp ]
+ * -----------------
+ * [ expression_list ]
+ * ------------------
+ * [$1 | NULL | redir_type | expr_count]
+ *
+ */
+
+ if ((yyvsp[(4) - (4)]) == NULL) { /* no redirection */
+ if ((yyvsp[(3) - (4)]) == NULL) { /* printf without arg */
+ (yyvsp[(1) - (4)])->expr_count = 0;
+ (yyvsp[(1) - (4)])->redir_type = 0;
+ (yyval) = list_create((yyvsp[(1) - (4)]));
+ } else {
+ INSTRUCTION *t = (yyvsp[(3) - (4)]);
+ (yyvsp[(1) - (4)])->expr_count = count_expressions(&t, FALSE);
+ (yyvsp[(1) - (4)])->redir_type = 0;
+ (yyval) = list_append(t, (yyvsp[(1) - (4)]));
+ }
+ } else {
+ INSTRUCTION *ip;
+ ip = (yyvsp[(4) - (4)])->nexti;
+ (yyvsp[(1) - (4)])->redir_type = ip->redir_type;
+ (yyvsp[(4) - (4)])->nexti = ip->nexti;
+ bcfree(ip);
+ if ((yyvsp[(3) - (4)]) == NULL) {
+ (yyvsp[(1) - (4)])->expr_count = 0;
+ (yyval) = list_append((yyvsp[(4) - (4)]), (yyvsp[(1) - (4)]));
+ } else {
+ INSTRUCTION *t = (yyvsp[(3) - (4)]);
+ (yyvsp[(1) - (4)])->expr_count = count_expressions(&t, FALSE);
+ (yyval) = list_append(list_merge((yyvsp[(4) - (4)]), t), (yyvsp[(1) - (4)]));
+ }
+ }
}
}
break;
- case 52:
+ case 59:
/* Line 1455 of yacc.c */
-#line 579 "awkgram.y"
- { (yyval.nodeval) = node(variable((yyvsp[(2) - (5)].sval), CAN_FREE, Node_var_array), Node_K_delete, (yyvsp[(4) - (5)].nodeval)); }
+#line 916 "awkgram.y"
+ { sub_counter = 0; }
break;
- case 53:
+ case 60:
/* Line 1455 of yacc.c */
-#line 581 "awkgram.y"
+#line 917 "awkgram.y"
{
- static short warned = FALSE;
+ char *arr = (yyvsp[(2) - (4)])->lextok;
- if (do_lint && ! warned) {
- warned = TRUE;
- lintwarn(_("`delete array' is a gawk extension"));
- }
- if (do_traditional) {
- /*
- * can't use yyerror, since may have overshot
- * the source line
- */
- errcount++;
- error(_("`delete array' is a gawk extension"));
- }
- (yyval.nodeval) = node(variable((yyvsp[(2) - (2)].sval), CAN_FREE, Node_var_array), Node_K_delete, (NODE *) NULL);
+ (yyvsp[(2) - (4)])->opcode = Op_push_array;
+ (yyvsp[(2) - (4)])->memory = variable(arr, Node_var_array);
+
+ if ((yyvsp[(4) - (4)]) == NULL) {
+ static short warned = FALSE;
+ if (do_lint && ! warned) {
+ warned = TRUE;
+ lintwarn(_("`delete array' is a gawk extension"));
+ }
+ if (do_traditional) {
+ /*
+ * can't use yyerror, since may have overshot
+ * the source line
+ */
+ errcount++;
+ error(_("`delete array' is a gawk extension"));
+ }
+ (yyvsp[(1) - (4)])->expr_count = 0;
+ (yyval) = list_append(list_create((yyvsp[(2) - (4)])), (yyvsp[(1) - (4)]));
+ } else {
+ (yyvsp[(1) - (4)])->expr_count = sub_counter;
+ (yyval) = list_append(list_append((yyvsp[(4) - (4)]), (yyvsp[(2) - (4)])), (yyvsp[(1) - (4)]));
}
+ }
break;
- case 54:
+ case 61:
/* Line 1455 of yacc.c */
-#line 599 "awkgram.y"
+#line 949 "awkgram.y"
{
- /*
- * this is for tawk compatibility. maybe the warnings
- * should always be done.
- */
- static short warned = FALSE;
+ static short warned = FALSE;
+ char *arr = (yyvsp[(3) - (4)])->lextok;
- if (do_lint && ! warned) {
+ if (do_lint && ! warned) {
warned = TRUE;
lintwarn(_("`delete(array)' is a non-portable tawk extension"));
- }
- if (do_traditional) {
+ }
+ if (do_traditional) {
/*
* can't use yyerror, since may have overshot
- * the source line
+ * the source line.
*/
errcount++;
error(_("`delete(array)' is a non-portable tawk extension"));
- }
- (yyval.nodeval) = node(variable((yyvsp[(3) - (4)].sval), CAN_FREE, Node_var_array), Node_K_delete, (NODE *) NULL);
}
+ (yyvsp[(3) - (4)])->memory = variable(arr, Node_var_array);
+ (yyvsp[(3) - (4)])->opcode = Op_push_array;
+ (yyvsp[(1) - (4)])->expr_count = 0;
+ (yyval) = list_append(list_create((yyvsp[(3) - (4)])), (yyvsp[(1) - (4)]));
+ }
break;
- case 55:
+ case 62:
/* Line 1455 of yacc.c */
-#line 621 "awkgram.y"
- { (yyval.nodeval) = (yyvsp[(1) - (1)].nodeval); }
+#line 971 "awkgram.y"
+ { (yyval) = optimize_assignment((yyvsp[(1) - (1)])); }
break;
- case 56:
+ case 63:
/* Line 1455 of yacc.c */
-#line 626 "awkgram.y"
- { (yyval.nodeval) = NULL; }
+#line 976 "awkgram.y"
+ { (yyval) = NULL; }
break;
- case 57:
+ case 64:
/* Line 1455 of yacc.c */
-#line 628 "awkgram.y"
- { (yyval.nodeval) = (yyvsp[(1) - (1)].nodeval); }
+#line 978 "awkgram.y"
+ { (yyval) = (yyvsp[(1) - (1)]); }
break;
- case 58:
+ case 65:
/* Line 1455 of yacc.c */
-#line 633 "awkgram.y"
+#line 983 "awkgram.y"
{
- if ((yyvsp[(1) - (1)].nodeval) == NULL) {
- (yyval.nodeval) = NULL;
- } else {
- NODE *dflt = NULL;
- NODE *head = (yyvsp[(1) - (1)].nodeval);
- NODE *curr;
-
- const char **case_values = NULL;
-
- int maxcount = 128;
- int case_count = 0;
- int i;
-
- emalloc(case_values, const char **, sizeof(char*) * maxcount, "switch_body");
- for (curr = (yyvsp[(1) - (1)].nodeval); curr != NULL; curr = curr->rnode) {
- /* Assure that case statement values are unique. */
- if (curr->lnode->type == Node_K_case) {
- char *caseval;
-
- if (curr->lnode->lnode->type == Node_regex)
- caseval = curr->lnode->lnode->re_exp->stptr;
- else
- caseval = force_string(tree_eval(curr->lnode->lnode))->stptr;
-
- for (i = 0; i < case_count; i++)
- if (strcmp(caseval, case_values[i]) == 0)
- yyerror(_("duplicate case values in switch body: %s"), caseval);
-
- if (case_count >= maxcount) {
- maxcount += 128;
- erealloc(case_values, const char **, sizeof(char*) * maxcount, "switch_body");
+ INSTRUCTION *dflt = NULL;
+
+ if ((yyvsp[(1) - (1)]) != NULL) {
+ INSTRUCTION *curr;
+ const char **case_values = NULL;
+ int maxcount = 128;
+ int case_count = 0;
+ int i;
+
+ emalloc(case_values, const char **, sizeof(char *) * maxcount, "statement");
+
+ for (curr = (yyvsp[(1) - (1)])->case_val->nexti; curr != NULL; curr = curr->nexti) {
+ if (curr->opcode == Op_K_case) {
+ char *caseval;
+ if (curr->memory->type == Node_regex)
+ caseval = curr->memory->re_exp->stptr;
+ else
+ caseval = force_string(curr->memory)->stptr;
+ for (i = 0; i < case_count; i++)
+ if (strcmp(caseval, case_values[i]) == 0)
+ yyerror(_("duplicate case values in switch body: %s"), caseval);
+
+ if (case_count >= maxcount) {
+ maxcount += 128;
+ erealloc(case_values, const char **, sizeof(char*) * maxcount, "statement");
+ }
+ case_values[case_count++] = caseval;
+ } else {
+ /* Otherwise save a pointer to the default node. */
+ if (dflt != NULL)
+ yyerror(_("duplicate `default' detected in switch body"));
+ dflt = curr;
}
- case_values[case_count++] = caseval;
- } else {
- /* Otherwise save a pointer to the default node. */
- if (dflt != NULL)
- yyerror(_("Duplicate `default' detected in switch body"));
- dflt = curr;
}
+
+ efree(case_values);
+ (yyval) = list_prepend((yyvsp[(1) - (1)])->case_stmt, instruction(Op_K_switch));
+ (yyval)->nexti->case_val = (yyvsp[(1) - (1)])->case_val->nexti;
+ (yyval)->nexti->switch_dflt = dflt;
+ bcfree((yyvsp[(1) - (1)])->case_val); /* Op_list */
+ bcfree((yyvsp[(1) - (1)])); /* Op_case_list */
+ } else {
+ (yyval) = list_create(instruction(Op_K_switch));
+ (yyval)->nexti->case_val = NULL;
+ (yyval)->nexti->switch_dflt = NULL;
}
-
- free(case_values);
-
- /* Create the switch body. */
- (yyval.nodeval) = node(head, Node_switch_body, dflt);
}
- }
break;
- case 59:
+ case 66:
/* Line 1455 of yacc.c */
-#line 685 "awkgram.y"
- { (yyval.nodeval) = NULL; }
+#line 1035 "awkgram.y"
+ { (yyval) = NULL; }
break;
- case 60:
+ case 67:
/* Line 1455 of yacc.c */
-#line 687 "awkgram.y"
+#line 1037 "awkgram.y"
{
- if ((yyvsp[(2) - (2)].nodeval) == NULL)
- (yyval.nodeval) = (yyvsp[(1) - (2)].nodeval);
- else {
- if (do_lint && isnoeffect((yyvsp[(2) - (2)].nodeval)->type))
- lintwarn(_("statement may have no effect"));
- if ((yyvsp[(1) - (2)].nodeval) == NULL)
- (yyval.nodeval) = node((yyvsp[(2) - (2)].nodeval), Node_case_list, (NODE *) NULL);
- else
- (yyval.nodeval) = append_right(
- ((yyvsp[(1) - (2)].nodeval)->type == Node_case_list ? (yyvsp[(1) - (2)].nodeval) : node((yyvsp[(1) - (2)].nodeval), Node_case_list, (NODE *) NULL)),
- ((yyvsp[(2) - (2)].nodeval)->type == Node_case_list ? (yyvsp[(2) - (2)].nodeval) : node((yyvsp[(2) - (2)].nodeval), Node_case_list, (NODE *) NULL))
- );
+ if ((yyvsp[(1) - (2)]) == NULL) {
+ (yyvsp[(2) - (2)])->case_val = list_create((yyvsp[(2) - (2)])->case_val);
+ (yyval) = (yyvsp[(2) - (2)]);
+ } else {
+ (void) list_append((yyvsp[(1) - (2)])->case_val, (yyvsp[(2) - (2)])->case_val);
+ (void) list_merge((yyvsp[(1) - (2)])->case_stmt, (yyvsp[(2) - (2)])->case_stmt);
+ bcfree((yyvsp[(2) - (2)])); /* Op_case_list */
+ (yyval) = (yyvsp[(1) - (2)]);
}
- yyerrok;
}
break;
- case 61:
-
-/* Line 1455 of yacc.c */
-#line 704 "awkgram.y"
- { (yyval.nodeval) = NULL; }
- break;
-
- case 62:
-
-/* Line 1455 of yacc.c */
-#line 709 "awkgram.y"
- { (yyval.nodeval) = node((yyvsp[(2) - (5)].nodeval), Node_K_case, (yyvsp[(5) - (5)].nodeval)); }
- break;
-
- case 63:
-
-/* Line 1455 of yacc.c */
-#line 711 "awkgram.y"
- { (yyval.nodeval) = node((NODE *) NULL, Node_K_default, (yyvsp[(4) - (4)].nodeval)); }
- break;
-
- case 64:
+ case 68:
/* Line 1455 of yacc.c */
-#line 716 "awkgram.y"
- { (yyval.nodeval) = (yyvsp[(1) - (1)].nodeval); }
+#line 1049 "awkgram.y"
+ { (yyval) = NULL; }
break;
- case 65:
+ case 69:
/* Line 1455 of yacc.c */
-#line 718 "awkgram.y"
+#line 1054 "awkgram.y"
{
- (yyvsp[(2) - (2)].nodeval)->numbr = -(force_number((yyvsp[(2) - (2)].nodeval)));
- (yyval.nodeval) = (yyvsp[(2) - (2)].nodeval);
+ INSTRUCTION *casestmt = (yyvsp[(5) - (5)]);
+
+ (yyvsp[(1) - (5)])->memory = (yyvsp[(2) - (5)])->memory;
+ bcfree((yyvsp[(2) - (5)]));
+ if ((yyvsp[(5) - (5)]) == NULL)
+ casestmt = list_create(instruction(Op_no_op));
+ if (do_profiling)
+ (void) list_prepend(casestmt, instruction(Op_exec_count));
+
+ (yyvsp[(1) - (5)])->target_stmt = casestmt->nexti;
+
+ /* recycle $3 as Op_case_list */
+ (yyvsp[(3) - (5)])->opcode = Op_case_list;
+ (yyvsp[(3) - (5)])->case_val = (yyvsp[(1) - (5)]); /* Op_K_case */
+ (yyvsp[(3) - (5)])->case_stmt = casestmt; /* Op_list */
+ (yyval) = (yyvsp[(3) - (5)]);
}
break;
- case 66:
-
-/* Line 1455 of yacc.c */
-#line 723 "awkgram.y"
- { (yyval.nodeval) = (yyvsp[(2) - (2)].nodeval); }
- break;
-
- case 67:
+ case 70:
/* Line 1455 of yacc.c */
-#line 725 "awkgram.y"
- { (yyval.nodeval) = (yyvsp[(1) - (1)].nodeval); }
+#line 1073 "awkgram.y"
+ {
+ INSTRUCTION *casestmt = (yyvsp[(4) - (4)]);
+
+ if ((yyvsp[(4) - (4)]) == NULL)
+ casestmt = list_create(instruction(Op_no_op));
+ if (do_profiling)
+ (void) list_prepend(casestmt, instruction(Op_exec_count));
+
+ (yyvsp[(1) - (4)])->target_stmt = casestmt->nexti;
+ (yyvsp[(2) - (4)])->opcode = Op_case_list;
+ (yyvsp[(2) - (4)])->case_val = (yyvsp[(1) - (4)]); /* Op_K_default */
+ (yyvsp[(2) - (4)])->case_stmt = casestmt; /* Op_list */
+ (yyval) = (yyvsp[(2) - (4)]);
+ }
break;
- case 68:
+ case 71:
/* Line 1455 of yacc.c */
-#line 727 "awkgram.y"
- { (yyval.nodeval) = (yyvsp[(1) - (1)].nodeval); }
+#line 1091 "awkgram.y"
+ {
+ (yyvsp[(1) - (1)])->opcode = Op_K_case;
+ (yyval) = (yyvsp[(1) - (1)]);
+ }
break;
case 72:
/* Line 1455 of yacc.c */
-#line 742 "awkgram.y"
- { (yyval.nodeval) = node((yyvsp[(2) - (5)].nodeval), Node_expression_list, (yyvsp[(4) - (5)].nodeval)); }
+#line 1096 "awkgram.y"
+ {
+ (yyvsp[(2) - (2)])->memory->numbr = -(force_number((yyvsp[(2) - (2)])->memory));
+ bcfree((yyvsp[(1) - (2)]));
+ (yyvsp[(2) - (2)])->opcode = Op_K_case;
+ (yyval) = (yyvsp[(2) - (2)]);
+ }
break;
case 73:
/* Line 1455 of yacc.c */
-#line 747 "awkgram.y"
+#line 1103 "awkgram.y"
{
- in_print = FALSE;
- in_parens = 0;
- (yyval.nodeval) = NULL;
+ bcfree((yyvsp[(1) - (2)]));
+ (yyvsp[(2) - (2)])->opcode = Op_K_case;
+ (yyval) = (yyvsp[(2) - (2)]);
}
break;
case 74:
/* Line 1455 of yacc.c */
-#line 752 "awkgram.y"
- { in_print = FALSE; in_parens = 0; }
+#line 1109 "awkgram.y"
+ {
+ (yyvsp[(1) - (1)])->opcode = Op_K_case;
+ (yyval) = (yyvsp[(1) - (1)]);
+ }
break;
case 75:
/* Line 1455 of yacc.c */
-#line 753 "awkgram.y"
+#line 1114 "awkgram.y"
{
- (yyval.nodeval) = node((yyvsp[(3) - (3)].nodeval), (yyvsp[(1) - (3)].nodetypeval), (NODE *) NULL);
- if ((yyvsp[(1) - (3)].nodetypeval) == Node_redirect_twoway
- && (yyvsp[(3) - (3)].nodeval)->type == Node_K_getline
- && (yyvsp[(3) - (3)].nodeval)->rnode != NULL
- && (yyvsp[(3) - (3)].nodeval)->rnode->type == Node_redirect_twoway)
- yyerror(_("multistage two-way pipelines don't work"));
+ (yyvsp[(1) - (1)])->opcode = Op_K_case;
+ (yyval) = (yyvsp[(1) - (1)]);
}
break;
case 76:
/* Line 1455 of yacc.c */
-#line 765 "awkgram.y"
- {
- (yyval.nodeval) = node((yyvsp[(3) - (6)].nodeval), Node_K_if,
- node((yyvsp[(6) - (6)].nodeval), Node_if_branches, (NODE *) NULL));
- }
+#line 1122 "awkgram.y"
+ { (yyval) = (yyvsp[(1) - (1)]); }
break;
case 77:
/* Line 1455 of yacc.c */
-#line 771 "awkgram.y"
- { (yyval.nodeval) = node((yyvsp[(3) - (9)].nodeval), Node_K_if,
- node((yyvsp[(6) - (9)].nodeval), Node_if_branches, (yyvsp[(9) - (9)].nodeval))); }
+#line 1124 "awkgram.y"
+ { (yyval) = (yyvsp[(1) - (1)]); }
break;
- case 82:
+ case 79:
/* Line 1455 of yacc.c */
-#line 787 "awkgram.y"
- { (yyval.nodeval) = NULL; }
- break;
-
- case 83:
-
-/* Line 1455 of yacc.c */
-#line 789 "awkgram.y"
- { (yyval.nodeval) = node((yyvsp[(2) - (2)].nodeval), Node_redirect_input, (NODE *) NULL); }
+#line 1134 "awkgram.y"
+ {
+ (yyval) = (yyvsp[(2) - (3)]);
+ }
break;
- case 84:
+ case 80:
/* Line 1455 of yacc.c */
-#line 794 "awkgram.y"
- { (yyval.nodeval) = NULL; }
+#line 1141 "awkgram.y"
+ {
+ in_print = FALSE;
+ in_parens = 0;
+ (yyval) = NULL;
+ }
break;
- case 85:
+ case 81:
/* Line 1455 of yacc.c */
-#line 796 "awkgram.y"
- { (yyval.nodeval) = (yyvsp[(1) - (1)].nodeval); }
+#line 1146 "awkgram.y"
+ { in_print = FALSE; in_parens = 0; }
break;
- case 86:
+ case 82:
/* Line 1455 of yacc.c */
-#line 801 "awkgram.y"
- { (yyval.nodeval) = make_param((yyvsp[(1) - (1)].sval)); }
+#line 1147 "awkgram.y"
+ {
+ if ((yyvsp[(1) - (3)])->redir_type == redirect_twoway
+ && (yyvsp[(3) - (3)])->lasti->opcode == Op_K_getline_redir
+ && (yyvsp[(3) - (3)])->lasti->redir_type == redirect_twoway)
+ yyerror(_("multistage two-way pipelines don't work"));
+ (yyval) = list_prepend((yyvsp[(3) - (3)]), (yyvsp[(1) - (3)]));
+ }
break;
- case 87:
+ case 83:
/* Line 1455 of yacc.c */
-#line 803 "awkgram.y"
- { (yyval.nodeval) = append_right((yyvsp[(1) - (3)].nodeval), make_param((yyvsp[(3) - (3)].sval))); yyerrok; }
+#line 1158 "awkgram.y"
+ {
+ (yyval) = mk_condition((yyvsp[(3) - (6)]), (yyvsp[(1) - (6)]), (yyvsp[(6) - (6)]), NULL, NULL);
+ }
break;
- case 88:
+ case 84:
/* Line 1455 of yacc.c */
-#line 805 "awkgram.y"
- { (yyval.nodeval) = NULL; }
+#line 1163 "awkgram.y"
+ {
+ (yyval) = mk_condition((yyvsp[(3) - (9)]), (yyvsp[(1) - (9)]), (yyvsp[(6) - (9)]), (yyvsp[(7) - (9)]), (yyvsp[(9) - (9)]));
+ }
break;
case 89:
/* Line 1455 of yacc.c */
-#line 807 "awkgram.y"
- { (yyval.nodeval) = NULL; }
+#line 1180 "awkgram.y"
+ { (yyval) = NULL; }
break;
case 90:
/* Line 1455 of yacc.c */
-#line 809 "awkgram.y"
- { (yyval.nodeval) = NULL; }
- break;
-
- case 91:
-
-/* Line 1455 of yacc.c */
-#line 815 "awkgram.y"
- { (yyval.nodeval) = NULL; }
- break;
-
- case 92:
-
-/* Line 1455 of yacc.c */
-#line 817 "awkgram.y"
- { (yyval.nodeval) = (yyvsp[(1) - (1)].nodeval); }
+#line 1182 "awkgram.y"
+ {
+ bcfree((yyvsp[(1) - (2)]));
+ (yyval) = (yyvsp[(2) - (2)]);
+ }
break;
case 93:
/* Line 1455 of yacc.c */
-#line 822 "awkgram.y"
- { (yyval.nodeval) = NULL; }
+#line 1195 "awkgram.y"
+ {
+ append_param((yyvsp[(1) - (1)])->lextok);
+ (yyvsp[(1) - (1)])->lextok = NULL;
+ bcfree((yyvsp[(1) - (1)]));
+ }
break;
case 94:
/* Line 1455 of yacc.c */
-#line 824 "awkgram.y"
- { (yyval.nodeval) = (yyvsp[(1) - (1)].nodeval); }
+#line 1201 "awkgram.y"
+ {
+ append_param((yyvsp[(3) - (3)])->lextok);
+ (yyvsp[(3) - (3)])->lextok = NULL;
+ bcfree((yyvsp[(3) - (3)]));
+ yyerrok;
+ }
break;
case 95:
/* Line 1455 of yacc.c */
-#line 829 "awkgram.y"
- { (yyval.nodeval) = node((yyvsp[(1) - (1)].nodeval), Node_expression_list, (NODE *) NULL); }
+#line 1208 "awkgram.y"
+ { /* func_params = NULL; */ }
break;
case 96:
/* Line 1455 of yacc.c */
-#line 831 "awkgram.y"
- {
- (yyval.nodeval) = append_right((yyvsp[(1) - (3)].nodeval),
- node((yyvsp[(3) - (3)].nodeval), Node_expression_list, (NODE *) NULL));
- yyerrok;
- }
+#line 1210 "awkgram.y"
+ { /* func_params = NULL; */ }
break;
case 97:
/* Line 1455 of yacc.c */
-#line 837 "awkgram.y"
- { (yyval.nodeval) = NULL; }
+#line 1212 "awkgram.y"
+ { /* func_params = NULL; */ }
break;
case 98:
/* Line 1455 of yacc.c */
-#line 839 "awkgram.y"
- { (yyval.nodeval) = NULL; }
+#line 1218 "awkgram.y"
+ { (yyval) = NULL; }
break;
case 99:
/* Line 1455 of yacc.c */
-#line 841 "awkgram.y"
- { (yyval.nodeval) = NULL; }
+#line 1220 "awkgram.y"
+ { (yyval) = (yyvsp[(1) - (1)]); }
break;
case 100:
/* Line 1455 of yacc.c */
-#line 843 "awkgram.y"
- { (yyval.nodeval) = NULL; }
+#line 1225 "awkgram.y"
+ { (yyval) = NULL; }
break;
case 101:
/* Line 1455 of yacc.c */
-#line 848 "awkgram.y"
- {
- if (do_lint && (yyvsp[(3) - (3)].nodeval)->type == Node_regex)
- lintwarn(_("regular expression on right of assignment"));
- (yyval.nodeval) = optimize_concat((yyvsp[(1) - (3)].nodeval), (yyvsp[(2) - (3)].nodetypeval), (yyvsp[(3) - (3)].nodeval));
- }
+#line 1227 "awkgram.y"
+ { (yyval) = (yyvsp[(1) - (1)]); }
break;
case 102:
/* Line 1455 of yacc.c */
-#line 854 "awkgram.y"
- { (yyval.nodeval) = node((yyvsp[(1) - (3)].nodeval), Node_and, (yyvsp[(3) - (3)].nodeval)); }
+#line 1232 "awkgram.y"
+ { (yyval) = mk_expression_list(NULL, (yyvsp[(1) - (1)])); }
break;
case 103:
/* Line 1455 of yacc.c */
-#line 856 "awkgram.y"
- { (yyval.nodeval) = node((yyvsp[(1) - (3)].nodeval), Node_or, (yyvsp[(3) - (3)].nodeval)); }
+#line 1234 "awkgram.y"
+ {
+ (yyval) = mk_expression_list((yyvsp[(1) - (3)]), (yyvsp[(3) - (3)]));
+ yyerrok;
+ }
break;
case 104:
/* Line 1455 of yacc.c */
-#line 858 "awkgram.y"
- {
- if ((yyvsp[(1) - (3)].nodeval)->type == Node_regex)
- warning(_("regular expression on left of `~' or `!~' operator"));
- (yyval.nodeval) = node((yyvsp[(1) - (3)].nodeval), (yyvsp[(2) - (3)].nodetypeval), mk_rexp((yyvsp[(3) - (3)].nodeval)));
- }
+#line 1239 "awkgram.y"
+ { (yyval) = NULL; }
break;
case 105:
/* Line 1455 of yacc.c */
-#line 864 "awkgram.y"
- {
- if (do_lint_old)
- warning(_("old awk does not support the keyword `in' except after `for'"));
- (yyval.nodeval) = node(variable((yyvsp[(3) - (3)].sval), CAN_FREE, Node_var_array), Node_in_array, (yyvsp[(1) - (3)].nodeval));
- }
+#line 1241 "awkgram.y"
+ { (yyval) = NULL; }
break;
case 106:
/* Line 1455 of yacc.c */
-#line 870 "awkgram.y"
- {
- if (do_lint && (yyvsp[(3) - (3)].nodeval)->type == Node_regex)
- lintwarn(_("regular expression on right of comparison"));
- (yyval.nodeval) = node((yyvsp[(1) - (3)].nodeval), (yyvsp[(2) - (3)].nodetypeval), (yyvsp[(3) - (3)].nodeval));
- }
+#line 1243 "awkgram.y"
+ { (yyval) = NULL; }
break;
case 107:
/* Line 1455 of yacc.c */
-#line 876 "awkgram.y"
- { (yyval.nodeval) = node((yyvsp[(1) - (5)].nodeval), Node_cond_exp, node((yyvsp[(3) - (5)].nodeval), Node_if_branches, (yyvsp[(5) - (5)].nodeval)));}
+#line 1245 "awkgram.y"
+ { (yyval) = NULL; }
break;
case 108:
/* Line 1455 of yacc.c */
-#line 878 "awkgram.y"
- { (yyval.nodeval) = (yyvsp[(1) - (1)].nodeval); }
+#line 1251 "awkgram.y"
+ {
+ if (do_lint && (yyvsp[(3) - (3)])->lasti->opcode == Op_match_rec)
+ lintwarn(_("regular expression on right of assignment"));
+ (yyval) = mk_assignment((yyvsp[(1) - (3)]), (yyvsp[(3) - (3)]), (yyvsp[(2) - (3)]));
+ }
break;
case 109:
/* Line 1455 of yacc.c */
-#line 883 "awkgram.y"
- { (yyval.nodetypeval) = (yyvsp[(1) - (1)].nodetypeval); }
+#line 1257 "awkgram.y"
+ { (yyval) = mk_boolean((yyvsp[(1) - (3)]), (yyvsp[(3) - (3)]), (yyvsp[(2) - (3)])); }
break;
case 110:
/* Line 1455 of yacc.c */
-#line 885 "awkgram.y"
- { (yyval.nodetypeval) = (yyvsp[(1) - (1)].nodetypeval); }
+#line 1259 "awkgram.y"
+ { (yyval) = mk_boolean((yyvsp[(1) - (3)]), (yyvsp[(3) - (3)]), (yyvsp[(2) - (3)])); }
break;
case 111:
/* Line 1455 of yacc.c */
-#line 887 "awkgram.y"
- { (yyval.nodetypeval) = Node_assign_quotient; }
+#line 1261 "awkgram.y"
+ {
+ if ((yyvsp[(1) - (3)])->lasti->opcode == Op_match_rec)
+ warning(_("regular expression on left of `~' or `!~' operator"));
+
+ if ((yyvsp[(3) - (3)])->lasti == (yyvsp[(3) - (3)])->nexti && (yyvsp[(3) - (3)])->nexti->opcode == Op_match_rec) {
+ (yyvsp[(2) - (3)])->memory = (yyvsp[(3) - (3)])->nexti->memory;
+ bcfree((yyvsp[(3) - (3)])->nexti); /* Op_match_rec */
+ bcfree((yyvsp[(3) - (3)])); /* Op_list */
+ (yyval) = list_append((yyvsp[(1) - (3)]), (yyvsp[(2) - (3)]));
+ } else {
+ (yyvsp[(2) - (3)])->memory = make_regnode(Node_dynregex, NULL);
+ (yyval) = list_append(list_merge((yyvsp[(1) - (3)]), (yyvsp[(3) - (3)])), (yyvsp[(2) - (3)]));
+ }
+ }
break;
case 112:
/* Line 1455 of yacc.c */
-#line 892 "awkgram.y"
- { (yyval.nodetypeval) = (yyvsp[(1) - (1)].nodetypeval); }
+#line 1276 "awkgram.y"
+ {
+ if (do_lint_old)
+ warning(_("old awk does not support the keyword `in' except after `for'"));
+ (yyvsp[(3) - (3)])->nexti->opcode = Op_push_array;
+ (yyvsp[(2) - (3)])->opcode = Op_in_array;
+ (yyvsp[(2) - (3)])->expr_count = 1;
+ (yyval) = list_append(list_merge((yyvsp[(1) - (3)]), (yyvsp[(3) - (3)])), (yyvsp[(2) - (3)]));
+ }
break;
case 113:
/* Line 1455 of yacc.c */
-#line 894 "awkgram.y"
- { (yyval.nodetypeval) = Node_less; }
+#line 1285 "awkgram.y"
+ {
+ if (do_lint && (yyvsp[(3) - (3)])->lasti->opcode == Op_match_rec)
+ lintwarn(_("regular expression on right of comparison"));
+ (yyval) = list_append(list_merge((yyvsp[(1) - (3)]), (yyvsp[(3) - (3)])), (yyvsp[(2) - (3)]));
+ }
+ break;
+
+ case 114:
+
+/* Line 1455 of yacc.c */
+#line 1291 "awkgram.y"
+ { (yyval) = mk_condition((yyvsp[(1) - (5)]), (yyvsp[(2) - (5)]), (yyvsp[(3) - (5)]), (yyvsp[(4) - (5)]), (yyvsp[(5) - (5)])); }
break;
case 115:
/* Line 1455 of yacc.c */
-#line 899 "awkgram.y"
- { (yyval.nodetypeval) = Node_greater; }
+#line 1293 "awkgram.y"
+ { (yyval) = (yyvsp[(1) - (1)]); }
break;
case 116:
/* Line 1455 of yacc.c */
-#line 904 "awkgram.y"
- { (yyval.nodeval) = (yyvsp[(1) - (1)].nodeval); }
+#line 1298 "awkgram.y"
+ { (yyval) = (yyvsp[(1) - (1)]); }
break;
case 117:
/* Line 1455 of yacc.c */
-#line 906 "awkgram.y"
- { (yyval.nodeval) = (yyvsp[(1) - (1)].nodeval); }
+#line 1300 "awkgram.y"
+ { (yyval) = (yyvsp[(1) - (1)]); }
break;
case 118:
/* Line 1455 of yacc.c */
-#line 908 "awkgram.y"
- { (yyval.nodeval) = constant_fold((yyvsp[(1) - (2)].nodeval), Node_concat, (yyvsp[(2) - (2)].nodeval)); }
+#line 1302 "awkgram.y"
+ {
+ (yyvsp[(2) - (2)])->opcode = Op_assign_quotient;
+ (yyval) = (yyvsp[(2) - (2)]);
+ }
+ break;
+
+ case 119:
+
+/* Line 1455 of yacc.c */
+#line 1310 "awkgram.y"
+ { (yyval) = (yyvsp[(1) - (1)]); }
break;
case 120:
/* Line 1455 of yacc.c */
-#line 915 "awkgram.y"
- { (yyval.nodeval) = constant_fold((yyvsp[(1) - (3)].nodeval), Node_exp, (yyvsp[(3) - (3)].nodeval)); }
+#line 1312 "awkgram.y"
+ { (yyval) = (yyvsp[(1) - (1)]); }
break;
case 121:
/* Line 1455 of yacc.c */
-#line 917 "awkgram.y"
- { (yyval.nodeval) = constant_fold((yyvsp[(1) - (3)].nodeval), Node_times, (yyvsp[(3) - (3)].nodeval)); }
+#line 1317 "awkgram.y"
+ { (yyval) = (yyvsp[(1) - (1)]); }
break;
case 122:
/* Line 1455 of yacc.c */
-#line 919 "awkgram.y"
- { (yyval.nodeval) = constant_fold((yyvsp[(1) - (3)].nodeval), Node_quotient, (yyvsp[(3) - (3)].nodeval)); }
+#line 1319 "awkgram.y"
+ { (yyval) = (yyvsp[(1) - (1)]); }
break;
case 123:
/* Line 1455 of yacc.c */
-#line 921 "awkgram.y"
- { (yyval.nodeval) = constant_fold((yyvsp[(1) - (3)].nodeval), Node_mod, (yyvsp[(3) - (3)].nodeval)); }
+#line 1324 "awkgram.y"
+ { (yyval) = (yyvsp[(1) - (1)]); }
break;
case 124:
/* Line 1455 of yacc.c */
-#line 923 "awkgram.y"
- { (yyval.nodeval) = constant_fold((yyvsp[(1) - (3)].nodeval), Node_plus, (yyvsp[(3) - (3)].nodeval)); }
+#line 1326 "awkgram.y"
+ { (yyval) = (yyvsp[(1) - (1)]); }
break;
case 125:
/* Line 1455 of yacc.c */
-#line 925 "awkgram.y"
- { (yyval.nodeval) = constant_fold((yyvsp[(1) - (3)].nodeval), Node_minus, (yyvsp[(3) - (3)].nodeval)); }
- break;
-
- case 126:
-
-/* Line 1455 of yacc.c */
-#line 927 "awkgram.y"
+#line 1328 "awkgram.y"
{
- /*
- * In BEGINFILE/ENDFILE, allow `getline var < file'
- */
- if (beginfile_or_endfile_rule) {
- if ((yyvsp[(2) - (3)].nodeval) != NULL && (yyvsp[(3) - (3)].nodeval) != NULL)
- ; /* all ok */
- else {
- if ((yyvsp[(2) - (3)].nodeval) != NULL)
- fatal(_("`getline var' invalid inside %s rule"),
- parsing_endfile_rule ? "ENDFILE" : "BEGINFILE");
- else
- fatal(_("`getline' invalid inside %s rule"),
- parsing_endfile_rule ? "ENDFILE" : "BEGINFILE");
- }
- }
- if (do_lint && parsing_end_rule && (yyvsp[(3) - (3)].nodeval) == NULL)
- lintwarn(_("non-redirected `getline' undefined inside END action"));
- (yyval.nodeval) = node((yyvsp[(2) - (3)].nodeval), Node_K_getline, (yyvsp[(3) - (3)].nodeval));
+ int count = 2;
+ int is_simple_var = FALSE;
+ INSTRUCTION *ip1, *ip2;
+
+ if ((yyvsp[(1) - (2)])->lasti->opcode == Op_concat) {
+ /* multiple (> 2) adjacent strings optimization */
+ is_simple_var = ((yyvsp[(1) - (2)])->lasti->concat_flag & CSVAR);
+ count = (yyvsp[(1) - (2)])->lasti->expr_count + 1;
+ (yyvsp[(1) - (2)])->lasti->opcode = Op_no_op;
+ } else {
+ is_simple_var = ((yyvsp[(1) - (2)])->nexti->opcode == Op_push
+ && (yyvsp[(1) - (2)])->lasti == (yyvsp[(1) - (2)])->nexti); /* first exp. is a simple
+ * variable?; kludge for use
+ * in Op_assign_concat.
+ */
+ }
+ ip1 = (yyvsp[(1) - (2)])->nexti;
+ ip2 = (yyvsp[(2) - (2)])->nexti;
+ if (ip1->memory != NULL && ip1->memory->type == Node_val && ip1 == (yyvsp[(1) - (2)])->lasti
+ && ip2->memory != NULL && ip2->memory->type == Node_val && ip2 == (yyvsp[(2) - (2)])->lasti && do_optimize > 1){
+ size_t nlen;
+
+ ip1->memory = force_string(ip1->memory);
+ ip2->memory = force_string(ip2->memory);
+ nlen = ip1->memory->stlen + ip2->memory->stlen;
+ erealloc(ip1->memory->stptr, char *, nlen + 2, "constant fold");
+ memcpy(ip1->memory->stptr + ip1->memory->stlen, ip2->memory->stptr, ip2->memory->stlen);
+ ip1->memory->stlen = nlen;
+ ip1->memory->stptr[nlen] = '\0';
+ ip1->memory->flags &= ~(NUMCUR|NUMBER);
+ ip1->memory->flags |= (STRING|STRCUR);
+ bcfree((yyvsp[(2) - (2)]));
+ bcfree(ip2);
+ (yyvsp[(1) - (2)])->opcode = Op_push_i;
+ (yyval) = (yyvsp[(1) - (2)]);
+ } else {
+ (yyval) = list_append(list_merge((yyvsp[(1) - (2)]), (yyvsp[(2) - (2)])), instruction(Op_concat));
+ (yyval)->lasti->concat_flag = (is_simple_var ? CSVAR : 0);
+ (yyval)->lasti->expr_count = count;
+ if (count > max_args)
+ max_args = count;
}
+ }
break;
case 127:
/* Line 1455 of yacc.c */
-#line 948 "awkgram.y"
- { (yyval.nodeval) = node((yyvsp[(1) - (2)].nodeval), Node_postincrement, (NODE *) NULL); }
+#line 1378 "awkgram.y"
+ { (yyval) = mk_binary((yyvsp[(1) - (3)]), (yyvsp[(3) - (3)]), (yyvsp[(2) - (3)])); }
break;
case 128:
/* Line 1455 of yacc.c */
-#line 950 "awkgram.y"
- { (yyval.nodeval) = node((yyvsp[(1) - (2)].nodeval), Node_postdecrement, (NODE *) NULL); }
+#line 1380 "awkgram.y"
+ { (yyval) = mk_binary((yyvsp[(1) - (3)]), (yyvsp[(3) - (3)]), (yyvsp[(2) - (3)])); }
break;
case 129:
/* Line 1455 of yacc.c */
-#line 952 "awkgram.y"
- {
- if (do_lint_old) {
- warning(_("old awk does not support the keyword `in' except after `for'"));
- warning(_("old awk does not support multidimensional arrays"));
- }
- (yyval.nodeval) = node(variable((yyvsp[(5) - (5)].sval), CAN_FREE, Node_var_array), Node_in_array, (yyvsp[(2) - (5)].nodeval));
- }
+#line 1382 "awkgram.y"
+ { (yyval) = mk_binary((yyvsp[(1) - (3)]), (yyvsp[(3) - (3)]), (yyvsp[(2) - (3)])); }
break;
case 130:
/* Line 1455 of yacc.c */
-#line 965 "awkgram.y"
- {
- (yyval.nodeval) = node((yyvsp[(4) - (4)].nodeval), Node_K_getline,
- node((yyvsp[(1) - (4)].nodeval), (yyvsp[(2) - (4)].nodetypeval), (NODE *) NULL));
- }
+#line 1384 "awkgram.y"
+ { (yyval) = mk_binary((yyvsp[(1) - (3)]), (yyvsp[(3) - (3)]), (yyvsp[(2) - (3)])); }
break;
case 131:
/* Line 1455 of yacc.c */
-#line 970 "awkgram.y"
- { (yyval.nodeval) = node((yyvsp[(1) - (3)].nodeval), Node_exp, (yyvsp[(3) - (3)].nodeval)); }
+#line 1386 "awkgram.y"
+ { (yyval) = mk_binary((yyvsp[(1) - (3)]), (yyvsp[(3) - (3)]), (yyvsp[(2) - (3)])); }
break;
case 132:
/* Line 1455 of yacc.c */
-#line 972 "awkgram.y"
- { (yyval.nodeval) = node((yyvsp[(1) - (3)].nodeval), Node_times, (yyvsp[(3) - (3)].nodeval)); }
+#line 1388 "awkgram.y"
+ { (yyval) = mk_binary((yyvsp[(1) - (3)]), (yyvsp[(3) - (3)]), (yyvsp[(2) - (3)])); }
break;
case 133:
/* Line 1455 of yacc.c */
-#line 974 "awkgram.y"
- { (yyval.nodeval) = node((yyvsp[(1) - (3)].nodeval), Node_quotient, (yyvsp[(3) - (3)].nodeval)); }
+#line 1390 "awkgram.y"
+ {
+ /*
+ * In BEGINFILE/ENDFILE, allow `getline var < file'
+ */
+ if (rule == BEGINFILE || rule == ENDFILE) {
+ if ((yyvsp[(2) - (3)]) != NULL && (yyvsp[(3) - (3)]) != NULL)
+ ; /* all ok */
+ else {
+ if ((yyvsp[(2) - (3)]) != NULL)
+ yyerror(_("`getline var' invalid inside `%s' rule"), ruletab[rule]);
+ else
+ yyerror(_("`getline' invalid inside `%s' rule"), ruletab[rule]);
+ YYABORT;
+ }
+ }
+
+ if (do_lint && rule == END && (yyvsp[(3) - (3)]) == NULL)
+ lintwarn(_("non-redirected `getline' undefined inside END action"));
+ (yyval) = mk_getline((yyvsp[(1) - (3)]), (yyvsp[(2) - (3)]), (yyvsp[(3) - (3)]), redirect_input);
+ }
break;
case 134:
/* Line 1455 of yacc.c */
-#line 976 "awkgram.y"
- { (yyval.nodeval) = node((yyvsp[(1) - (3)].nodeval), Node_mod, (yyvsp[(3) - (3)].nodeval)); }
+#line 1411 "awkgram.y"
+ {
+ (yyvsp[(2) - (2)])->opcode = Op_postincrement;
+ (yyval) = mk_assignment((yyvsp[(1) - (2)]), NULL, (yyvsp[(2) - (2)]));
+ }
break;
case 135:
/* Line 1455 of yacc.c */
-#line 978 "awkgram.y"
- { (yyval.nodeval) = node((yyvsp[(1) - (3)].nodeval), Node_plus, (yyvsp[(3) - (3)].nodeval)); }
+#line 1416 "awkgram.y"
+ {
+ (yyvsp[(2) - (2)])->opcode = Op_postdecrement;
+ (yyval) = mk_assignment((yyvsp[(1) - (2)]), NULL, (yyvsp[(2) - (2)]));
+ }
break;
case 136:
/* Line 1455 of yacc.c */
-#line 980 "awkgram.y"
- { (yyval.nodeval) = node((yyvsp[(1) - (3)].nodeval), Node_minus, (yyvsp[(3) - (3)].nodeval)); }
+#line 1421 "awkgram.y"
+ {
+ if (do_lint_old) {
+ warning(_("old awk does not support the keyword `in' except after `for'"));
+ warning(_("old awk does not support multidimensional arrays"));
+ }
+ (yyvsp[(5) - (5)])->nexti->opcode = Op_push_array;
+ (yyvsp[(4) - (5)])->opcode = Op_in_array;
+ if ((yyvsp[(2) - (5)]) == NULL) { /* error */
+ errcount++;
+ (yyvsp[(4) - (5)])->expr_count = 0;
+ (yyval) = list_merge((yyvsp[(5) - (5)]), (yyvsp[(4) - (5)]));
+ } else {
+ INSTRUCTION *t = (yyvsp[(2) - (5)]);
+ (yyvsp[(4) - (5)])->expr_count = count_expressions(&t, FALSE);
+ (yyval) = list_append(list_merge(t, (yyvsp[(5) - (5)])), (yyvsp[(4) - (5)]));
+ }
+ }
break;
case 137:
/* Line 1455 of yacc.c */
-#line 985 "awkgram.y"
- { (yyval.nodeval) = (yyvsp[(1) - (1)].nodeval); }
+#line 1444 "awkgram.y"
+ {
+ (yyval) = mk_getline((yyvsp[(3) - (4)]), (yyvsp[(4) - (4)]), (yyvsp[(1) - (4)]), (yyvsp[(2) - (4)])->redir_type);
+ bcfree((yyvsp[(2) - (4)]));
+ }
break;
case 138:
/* Line 1455 of yacc.c */
-#line 987 "awkgram.y"
- { (yyval.nodeval) = constant_fold((yyvsp[(2) - (2)].nodeval), Node_not, (NODE *) NULL); }
+#line 1450 "awkgram.y"
+ { (yyval) = mk_binary((yyvsp[(1) - (3)]), (yyvsp[(3) - (3)]), (yyvsp[(2) - (3)])); }
break;
case 139:
/* Line 1455 of yacc.c */
-#line 989 "awkgram.y"
- { (yyval.nodeval) = (yyvsp[(2) - (3)].nodeval); }
+#line 1452 "awkgram.y"
+ { (yyval) = mk_binary((yyvsp[(1) - (3)]), (yyvsp[(3) - (3)]), (yyvsp[(2) - (3)])); }
break;
case 140:
/* Line 1455 of yacc.c */
-#line 992 "awkgram.y"
- { (yyval.nodeval) = snode((yyvsp[(3) - (4)].nodeval), Node_builtin, (int) (yyvsp[(1) - (4)].lval)); }
+#line 1454 "awkgram.y"
+ { (yyval) = mk_binary((yyvsp[(1) - (3)]), (yyvsp[(3) - (3)]), (yyvsp[(2) - (3)])); }
break;
case 141:
/* Line 1455 of yacc.c */
-#line 994 "awkgram.y"
- { (yyval.nodeval) = snode((yyvsp[(3) - (4)].nodeval), Node_builtin, (int) (yyvsp[(1) - (4)].lval)); }
+#line 1456 "awkgram.y"
+ { (yyval) = mk_binary((yyvsp[(1) - (3)]), (yyvsp[(3) - (3)]), (yyvsp[(2) - (3)])); }
break;
case 142:
/* Line 1455 of yacc.c */
-#line 996 "awkgram.y"
- {
- static short warned1 = FALSE, warned2 = FALSE;
+#line 1458 "awkgram.y"
+ { (yyval) = mk_binary((yyvsp[(1) - (3)]), (yyvsp[(3) - (3)]), (yyvsp[(2) - (3)])); }
+ break;
- if (do_lint && ! warned1) {
- warned1 = TRUE;
- lintwarn(_("call of `length' without parentheses is not portable"));
- }
- (yyval.nodeval) = snode((NODE *) NULL, Node_builtin, (int) (yyvsp[(1) - (1)].lval));
- if (do_posix && ! warned2) {
- warned2 = TRUE;
- warning(_("call of `length' without parentheses is deprecated by POSIX"));
- }
+ case 143:
+
+/* Line 1455 of yacc.c */
+#line 1460 "awkgram.y"
+ { (yyval) = mk_binary((yyvsp[(1) - (3)]), (yyvsp[(3) - (3)]), (yyvsp[(2) - (3)])); }
+ break;
+
+ case 144:
+
+/* Line 1455 of yacc.c */
+#line 1465 "awkgram.y"
+ {
+ (yyval) = list_create((yyvsp[(1) - (1)]));
}
break;
case 145:
/* Line 1455 of yacc.c */
-#line 1012 "awkgram.y"
- { (yyval.nodeval) = node((yyvsp[(2) - (2)].nodeval), Node_preincrement, (NODE *) NULL); }
+#line 1469 "awkgram.y"
+ {
+ if ((yyvsp[(2) - (2)])->opcode == Op_match_rec) {
+ (yyvsp[(2) - (2)])->opcode = Op_nomatch;
+ (yyvsp[(1) - (2)])->opcode = Op_push_i;
+ (yyvsp[(1) - (2)])->memory = mk_number(0.0, (PERM|NUMCUR|NUMBER));
+ (yyval) = list_append(list_append(list_create((yyvsp[(1) - (2)])),
+ instruction(Op_field_spec)), (yyvsp[(2) - (2)]));
+ } else {
+ INSTRUCTION *ip;
+ ip = (yyvsp[(2) - (2)])->nexti;
+ if (ip->memory->type == Node_val && (yyvsp[(2) - (2)])->lasti == ip && do_optimize > 1) {
+ NODE *ret;
+ if ((ip->memory->flags & (STRCUR|STRING)) != 0) {
+ if (ip->memory->stlen == 0) {
+ ret = make_number((AWKNUM) 1.0);
+ } else {
+ ret = make_number((AWKNUM) 0.0);
+ }
+ } else {
+ if (ip->memory->numbr == 0) {
+ ret = make_number((AWKNUM) 1.0);
+ } else {
+ ret = make_number((AWKNUM) 0.0);
+ }
+ }
+ ret->flags &= ~MALLOC;
+ ret->flags |= PERM;
+ (yyvsp[(1) - (2)])->memory = ret;
+ (yyvsp[(1) - (2)])->opcode = Op_push_i;
+ bcfree(ip);
+ bcfree((yyvsp[(2) - (2)]));
+ (yyval) = list_create((yyvsp[(1) - (2)]));
+ } else {
+ (yyvsp[(1) - (2)])->opcode = Op_not;
+ add_lint((yyvsp[(2) - (2)]), LINT_assign_in_cond);
+ (yyval) = list_append((yyvsp[(2) - (2)]), (yyvsp[(1) - (2)]));
+ }
+ }
+ }
break;
case 146:
/* Line 1455 of yacc.c */
-#line 1014 "awkgram.y"
- { (yyval.nodeval) = node((yyvsp[(2) - (2)].nodeval), Node_predecrement, (NODE *) NULL); }
+#line 1509 "awkgram.y"
+ { (yyval) = (yyvsp[(2) - (3)]); }
break;
case 147:
/* Line 1455 of yacc.c */
-#line 1016 "awkgram.y"
- { (yyval.nodeval) = (yyvsp[(1) - (1)].nodeval); }
+#line 1511 "awkgram.y"
+ {
+ (yyval) = snode((yyvsp[(3) - (4)]), (yyvsp[(1) - (4)]));
+ if ((yyval) == NULL)
+ YYABORT;
+ }
break;
case 148:
/* Line 1455 of yacc.c */
-#line 1018 "awkgram.y"
- { (yyval.nodeval) = (yyvsp[(1) - (1)].nodeval); }
+#line 1517 "awkgram.y"
+ {
+ (yyval) = snode((yyvsp[(3) - (4)]), (yyvsp[(1) - (4)]));
+ if ((yyval) == NULL)
+ YYABORT;
+ }
break;
case 149:
/* Line 1455 of yacc.c */
-#line 1021 "awkgram.y"
+#line 1523 "awkgram.y"
{
- if ((yyvsp[(2) - (2)].nodeval)->type == Node_val && ((yyvsp[(2) - (2)].nodeval)->flags & (STRCUR|STRING)) == 0) {
- (yyvsp[(2) - (2)].nodeval)->numbr = -(force_number((yyvsp[(2) - (2)].nodeval)));
- (yyval.nodeval) = (yyvsp[(2) - (2)].nodeval);
- } else
- (yyval.nodeval) = node((yyvsp[(2) - (2)].nodeval), Node_unary_minus, (NODE *) NULL);
+ static short warned1 = FALSE;
+
+ if (do_lint && ! warned1) {
+ warned1 = TRUE;
+ lintwarn(_("call of `length' without parentheses is not portable"));
}
+ (yyval) = snode(NULL, (yyvsp[(1) - (1)]));
+ if ((yyval) == NULL)
+ YYABORT;
+ }
break;
- case 150:
+ case 152:
+
+/* Line 1455 of yacc.c */
+#line 1537 "awkgram.y"
+ {
+ (yyvsp[(1) - (2)])->opcode = Op_preincrement;
+ (yyval) = mk_assignment((yyvsp[(2) - (2)]), NULL, (yyvsp[(1) - (2)]));
+ }
+ break;
+
+ case 153:
+
+/* Line 1455 of yacc.c */
+#line 1542 "awkgram.y"
+ {
+ (yyvsp[(1) - (2)])->opcode = Op_predecrement;
+ (yyval) = mk_assignment((yyvsp[(2) - (2)]), NULL, (yyvsp[(1) - (2)]));
+ }
+ break;
+
+ case 154:
/* Line 1455 of yacc.c */
-#line 1029 "awkgram.y"
+#line 1547 "awkgram.y"
{
- /*
- * was: $$ = $2
- * POSIX semantics: force a conversion to numeric type
- */
- (yyval.nodeval) = node (make_number(0.0), Node_plus, (yyvsp[(2) - (2)].nodeval));
+ (yyval) = list_create((yyvsp[(1) - (1)]));
+ }
+ break;
+
+ case 155:
+
+/* Line 1455 of yacc.c */
+#line 1551 "awkgram.y"
+ {
+ (yyval) = list_create((yyvsp[(1) - (1)]));
+ }
+ break;
+
+ case 156:
+
+/* Line 1455 of yacc.c */
+#line 1555 "awkgram.y"
+ {
+ if ((yyvsp[(2) - (2)])->lasti->opcode == Op_push_i
+ && ((yyvsp[(2) - (2)])->lasti->memory->flags & (STRCUR|STRING)) == 0) {
+ (yyvsp[(2) - (2)])->lasti->memory->numbr = -(force_number((yyvsp[(2) - (2)])->lasti->memory));
+ (yyval) = (yyvsp[(2) - (2)]);
+ bcfree((yyvsp[(1) - (2)]));
+ } else {
+ (yyvsp[(1) - (2)])->opcode = Op_unary_minus;
+ (yyval) = list_append((yyvsp[(2) - (2)]), (yyvsp[(1) - (2)]));
}
+ }
break;
- case 151:
+ case 157:
/* Line 1455 of yacc.c */
-#line 1040 "awkgram.y"
+#line 1567 "awkgram.y"
{
- func_use((yyvsp[(1) - (1)].nodeval)->rnode->stptr, FUNC_USE);
- (yyval.nodeval) = (yyvsp[(1) - (1)].nodeval);
+ /*
+ * was: $$ = $2
+ * POSIX semantics: force a conversion to numeric type
+ */
+ (yyvsp[(1) - (2)])->opcode = Op_plus_i;
+ (yyvsp[(1) - (2)])->memory = mk_number((AWKNUM) 0.0, (PERM|NUMCUR|NUMBER));
+ (yyval) = list_append((yyvsp[(2) - (2)]), (yyvsp[(1) - (2)]));
}
break;
- case 152:
+ case 158:
+
+/* Line 1455 of yacc.c */
+#line 1580 "awkgram.y"
+ {
+ func_use((yyvsp[(1) - (1)])->lasti->func_name, FUNC_USE);
+ (yyval) = (yyvsp[(1) - (1)]);
+ }
+ break;
+
+ case 159:
/* Line 1455 of yacc.c */
-#line 1045 "awkgram.y"
+#line 1585 "awkgram.y"
{
/* indirect function call */
+ INSTRUCTION *f, *t;
+ char *name;
+ NODE *indirect_var;
static short warned = FALSE;
+ const char *msg = _("indirect function calls are a gawk extension");
- if (do_lint && ! warned) {
+ if (do_traditional || do_posix)
+ yyerror("%s", msg);
+ else if (do_lint && ! warned) {
warned = TRUE;
- lintwarn(_("indirect function calls are a gawk extension"));
+ lintwarn("%s", msg);
}
+
+ f = (yyvsp[(2) - (2)])->lasti;
+ f->opcode = Op_indirect_func_call;
+ name = estrdup(f->func_name, strlen(f->func_name));
+ indirect_var = variable(name, Node_var_new);
+ if (is_std_var(name))
+ yyerror(_("can not use special variable `%s' for indirect function call"), name);
+ t = instruction(Op_push);
+ t->memory = indirect_var;
+
+ /* prepend indirect var instead of appending to arguments (opt_expression_list),
+ * and pop it off in setup_frame (eval.c) (left to right evaluation order); Test case:
+ * f = "fun"
+ * @f(f="real_fun")
+ */
- (yyval.nodeval) = (yyvsp[(2) - (2)].nodeval);
- (yyval.nodeval)->type = Node_indirect_func_call;
+ (yyval) = list_prepend((yyvsp[(2) - (2)]), t);
}
break;
- case 153:
+ case 160:
/* Line 1455 of yacc.c */
-#line 1061 "awkgram.y"
+#line 1621 "awkgram.y"
{
- (yyval.nodeval) = node((yyvsp[(3) - (4)].nodeval), Node_func_call, make_string((yyvsp[(1) - (4)].sval), strlen((yyvsp[(1) - (4)].sval))));
- (yyval.nodeval)->funcbody = NULL;
- param_sanity((yyvsp[(3) - (4)].nodeval));
- free((yyvsp[(1) - (4)].sval));
+ param_sanity((yyvsp[(3) - (4)]));
+ (yyvsp[(1) - (4)])->opcode = Op_func_call;
+ (yyvsp[(1) - (4)])->func_body = NULL;
+ if ((yyvsp[(3) - (4)]) == NULL) { /* no argument or error */
+ ((yyvsp[(1) - (4)]) + 1)->expr_count = 0;
+ (yyval) = list_create((yyvsp[(1) - (4)]));
+ } else {
+ INSTRUCTION *t = (yyvsp[(3) - (4)]);
+ ((yyvsp[(1) - (4)]) + 1)->expr_count = count_expressions(&t, TRUE);
+ (yyval) = list_append(t, (yyvsp[(1) - (4)]));
+ }
}
break;
- case 154:
+ case 161:
/* Line 1455 of yacc.c */
-#line 1071 "awkgram.y"
- { (yyval.nodeval) = NULL; }
+#line 1638 "awkgram.y"
+ { (yyval) = NULL; }
break;
- case 155:
+ case 162:
/* Line 1455 of yacc.c */
-#line 1073 "awkgram.y"
- { (yyval.nodeval) = (yyvsp[(1) - (1)].nodeval); }
+#line 1640 "awkgram.y"
+ { (yyval) = (yyvsp[(1) - (1)]); }
break;
- case 156:
+ case 163:
/* Line 1455 of yacc.c */
-#line 1078 "awkgram.y"
- { (yyval.nodeval) = variable((yyvsp[(1) - (1)].sval), CAN_FREE, Node_var_new); }
+#line 1645 "awkgram.y"
+ { (yyval) = NULL; }
break;
- case 157:
+ case 164:
/* Line 1455 of yacc.c */
-#line 1080 "awkgram.y"
+#line 1647 "awkgram.y"
+ { (yyval) = (yyvsp[(1) - (2)]); }
+ break;
+
+ case 165:
+
+/* Line 1455 of yacc.c */
+#line 1652 "awkgram.y"
+ { (yyval) = (yyvsp[(1) - (1)]); }
+ break;
+
+ case 166:
+
+/* Line 1455 of yacc.c */
+#line 1654 "awkgram.y"
+ {
+ (yyval) = list_merge((yyvsp[(1) - (2)]), (yyvsp[(2) - (2)]));
+ }
+ break;
+
+ case 167:
+
+/* Line 1455 of yacc.c */
+#line 1661 "awkgram.y"
+ {
+ INSTRUCTION *ip = (yyvsp[(1) - (1)])->lasti;
+ int count = ip->sub_count; /* # of SUBSEP-seperated expressions */
+ if (count > 1) {
+ /* change Op_subscript or Op_sub_array to Op_concat */
+ ip->opcode = Op_concat;
+ ip->concat_flag = CSUBSEP;
+ ip->expr_count = count;
+ } else
+ ip->opcode = Op_no_op;
+ sub_counter++; /* count # of dimensions */
+ (yyval) = (yyvsp[(1) - (1)]);
+ }
+ break;
+
+ case 168:
+
+/* Line 1455 of yacc.c */
+#line 1678 "awkgram.y"
+ {
+ INSTRUCTION *t = (yyvsp[(2) - (3)]);
+ if ((yyvsp[(2) - (3)]) == NULL) {
+ errcount++;
+ error(_("invalid subscript expression"));
+ /* install Null string as subscript. */
+ t = list_create(instruction(Op_push_i));
+ t->nexti->memory = Nnull_string;
+ (yyvsp[(3) - (3)])->sub_count = 1;
+ } else
+ (yyvsp[(3) - (3)])->sub_count = count_expressions(&t, FALSE);
+ (yyval) = list_append(t, (yyvsp[(3) - (3)]));
+ }
+ break;
+
+ case 169:
+
+/* Line 1455 of yacc.c */
+#line 1695 "awkgram.y"
+ { (yyval) = (yyvsp[(1) - (1)]); }
+ break;
+
+ case 170:
+
+/* Line 1455 of yacc.c */
+#line 1697 "awkgram.y"
+ {
+ (yyval) = list_merge((yyvsp[(1) - (2)]), (yyvsp[(2) - (2)]));
+ }
+ break;
+
+ case 171:
+
+/* Line 1455 of yacc.c */
+#line 1704 "awkgram.y"
+ { (yyval) = (yyvsp[(1) - (2)]); }
+ break;
+
+ case 172:
+
+/* Line 1455 of yacc.c */
+#line 1709 "awkgram.y"
+ {
+ char *var_name = (yyvsp[(1) - (1)])->lextok;
+
+ (yyvsp[(1) - (1)])->opcode = Op_push;
+ (yyvsp[(1) - (1)])->memory = variable(var_name, Node_var_new);
+ (yyval) = list_create((yyvsp[(1) - (1)]));
+ }
+ break;
+
+ case 173:
+
+/* Line 1455 of yacc.c */
+#line 1717 "awkgram.y"
{
NODE *n;
- if ((n = lookup((yyvsp[(1) - (4)].sval))) != NULL && ! isarray(n)) {
+ char *arr = (yyvsp[(1) - (2)])->lextok;
+ if ((n = lookup(arr)) != NULL && ! isarray(n))
yyerror(_("use of non-array as array"));
- (yyval.nodeval) = node(variable((yyvsp[(1) - (4)].sval), CAN_FREE, Node_var_array), Node_subscript, (yyvsp[(3) - (4)].nodeval));
- } else if ((yyvsp[(3) - (4)].nodeval) == NULL) {
- fatal(_("invalid subscript expression"));
- } else if ((yyvsp[(3) - (4)].nodeval)->rnode == NULL) {
- (yyval.nodeval) = node(variable((yyvsp[(1) - (4)].sval), CAN_FREE, Node_var_array), Node_subscript, (yyvsp[(3) - (4)].nodeval)->lnode);
- freenode((yyvsp[(3) - (4)].nodeval));
- } else
- (yyval.nodeval) = node(variable((yyvsp[(1) - (4)].sval), CAN_FREE, Node_var_array), Node_subscript, (yyvsp[(3) - (4)].nodeval));
+ (yyvsp[(1) - (2)])->memory = variable(arr, Node_var_array);
+ (yyvsp[(1) - (2)])->opcode = Op_push_array;
+ (yyval) = list_prepend((yyvsp[(2) - (2)]), (yyvsp[(1) - (2)]));
}
break;
- case 158:
+ case 174:
/* Line 1455 of yacc.c */
-#line 1094 "awkgram.y"
- { (yyval.nodeval) = (yyvsp[(1) - (1)].nodeval); }
+#line 1731 "awkgram.y"
+ {
+ INSTRUCTION *ip = (yyvsp[(1) - (1)])->nexti;
+ if (ip->opcode == Op_push
+ && ip->memory->type == Node_var
+ && ip->memory->var_update
+ ) {
+ (yyval) = list_prepend((yyvsp[(1) - (1)]), instruction(Op_var_update));
+ (yyval)->nexti->memory = ip->memory;
+ } else
+ (yyval) = (yyvsp[(1) - (1)]);
+ }
break;
- case 159:
+ case 175:
/* Line 1455 of yacc.c */
-#line 1105 "awkgram.y"
+#line 1743 "awkgram.y"
{
- NODE *n = node((yyvsp[(2) - (3)].nodeval), Node_field_spec, (NODE *) NULL);
- if ((yyvsp[(3) - (3)].sval) != NULL) {
- if ((yyvsp[(3) - (3)].sval)[0] == '+')
- (yyval.nodeval) = node(n, Node_postincrement, (NODE *) NULL);
- else
- (yyval.nodeval) = node(n, Node_postdecrement, (NODE *) NULL);
- } else {
- (yyval.nodeval) = n;
- }
+ (yyval) = list_append((yyvsp[(2) - (3)]), (yyvsp[(1) - (3)]));
+ if ((yyvsp[(3) - (3)]) != NULL)
+ mk_assignment((yyvsp[(2) - (3)]), NULL, (yyvsp[(3) - (3)]));
}
break;
- case 160:
+ case 176:
/* Line 1455 of yacc.c */
-#line 1119 "awkgram.y"
- { (yyval.sval) = "+"; }
+#line 1752 "awkgram.y"
+ {
+ (yyvsp[(1) - (1)])->opcode = Op_postincrement;
+ }
break;
- case 161:
+ case 177:
/* Line 1455 of yacc.c */
-#line 1120 "awkgram.y"
- { (yyval.sval) = "-"; }
+#line 1756 "awkgram.y"
+ {
+ (yyvsp[(1) - (1)])->opcode = Op_postdecrement;
+ }
break;
- case 162:
+ case 178:
/* Line 1455 of yacc.c */
-#line 1121 "awkgram.y"
- { (yyval.sval) = NULL; }
+#line 1759 "awkgram.y"
+ { (yyval) = NULL; }
break;
- case 164:
+ case 180:
/* Line 1455 of yacc.c */
-#line 1129 "awkgram.y"
+#line 1767 "awkgram.y"
{ yyerrok; }
break;
- case 165:
+ case 181:
/* Line 1455 of yacc.c */
-#line 1133 "awkgram.y"
+#line 1771 "awkgram.y"
{ yyerrok; }
break;
- case 168:
+ case 184:
/* Line 1455 of yacc.c */
-#line 1142 "awkgram.y"
+#line 1780 "awkgram.y"
{ yyerrok; }
break;
- case 169:
+ case 185:
/* Line 1455 of yacc.c */
-#line 1146 "awkgram.y"
- { yyerrok; }
+#line 1784 "awkgram.y"
+ { (yyval) = (yyvsp[(1) - (1)]); yyerrok; }
break;
- case 170:
+ case 186:
/* Line 1455 of yacc.c */
-#line 1149 "awkgram.y"
+#line 1788 "awkgram.y"
{ yyerrok; }
break;
/* Line 1455 of yacc.c */
-#line 3487 "awkgram.c"
+#line 4231 "awkgram.c"
default: break;
}
YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
@@ -3695,14 +4427,14 @@ yyreturn:
/* Line 1675 of yacc.c */
-#line 1152 "awkgram.y"
+#line 1790 "awkgram.y"
struct token {
- const char *operator; /* text to match */
- NODETYPE value; /* node type */
- int class; /* lexical class */
- unsigned flags; /* # of args. allowed and compatability */
+ const char *operator; /* text to match */
+ OPCODE value; /* type */
+ int class; /* lexical class */
+ unsigned flags; /* # of args. allowed and compatability */
# define ARGS 0xFF /* 0, 1, 2, 3 args allowed (any combination */
# define A(n) (1<<(n))
# define VERSION_MASK 0xFF00 /* old awk is zero */
@@ -3710,7 +4442,9 @@ struct token {
# define NOT_POSIX 0x0200 /* feature not in POSIX */
# define GAWKX 0x0400 /* gawk extension */
# define RESX 0x0800 /* Bell Labs Research extension */
- NODE *(*ptr) P((NODE *)); /* function that implements this keyword */
+# define BREAK 0x1000 /* break allowed inside */
+# define CONTINUE 0x2000 /* continue allowed inside */
+ NODE *(*ptr)(int); /* function that implements this keyword */
};
#if 'a' == 0x81 /* it's EBCDIC */
@@ -3735,77 +4469,79 @@ tokcompare(void *l, void *r)
*/
static const struct token tokentab[] = {
-{"BEGIN", Node_illegal, LEX_BEGIN, 0, 0},
-{"BEGINFILE", Node_illegal, LEX_BEGINFILE, GAWKX, 0},
-{"END", Node_illegal, LEX_END, 0, 0},
-{"ENDFILE", Node_illegal, LEX_ENDFILE, GAWKX, 0},
+{"BEGIN", Op_rule, LEX_BEGIN, 0, 0},
+{"BEGINFILE", Op_rule, LEX_BEGINFILE, GAWKX, 0},
+{"END", Op_rule, LEX_END, 0, 0},
+{"ENDFILE", Op_rule, LEX_ENDFILE, GAWKX, 0},
#ifdef ARRAYDEBUG
-{"adump", Node_builtin, LEX_BUILTIN, GAWKX|A(1), do_adump},
+{"adump", Op_builtin, LEX_BUILTIN, GAWKX|A(1), do_adump},
#endif
-{"and", Node_builtin, LEX_BUILTIN, GAWKX|A(2), do_and},
-{"asort", Node_builtin, LEX_BUILTIN, GAWKX|A(1)|A(2), do_asort},
-{"asorti", Node_builtin, LEX_BUILTIN, GAWKX|A(1)|A(2), do_asorti},
-{"atan2", Node_builtin, LEX_BUILTIN, NOT_OLD|A(2), do_atan2},
-{"bindtextdomain", Node_builtin, LEX_BUILTIN, GAWKX|A(1)|A(2), do_bindtextdomain},
-{"break", Node_K_break, LEX_BREAK, 0, 0},
-{"case", Node_K_case, LEX_CASE, GAWKX, 0},
-{"close", Node_builtin, LEX_BUILTIN, NOT_OLD|A(1)|A(2), do_close},
-{"compl", Node_builtin, LEX_BUILTIN, GAWKX|A(1), do_compl},
-{"continue", Node_K_continue, LEX_CONTINUE, 0, 0},
-{"cos", Node_builtin, LEX_BUILTIN, NOT_OLD|A(1), do_cos},
-{"dcgettext", Node_builtin, LEX_BUILTIN, GAWKX|A(1)|A(2)|A(3), do_dcgettext},
-{"dcngettext", Node_builtin, LEX_BUILTIN, GAWKX|A(1)|A(2)|A(3)|A(4)|A(5), do_dcngettext},
-{"default", Node_K_default, LEX_DEFAULT, GAWKX, 0},
-{"delete", Node_K_delete, LEX_DELETE, NOT_OLD, 0},
-{"do", Node_K_do, LEX_DO, NOT_OLD, 0},
-{"else", Node_illegal, LEX_ELSE, 0, 0},
-{"exit", Node_K_exit, LEX_EXIT, 0, 0},
-{"exp", Node_builtin, LEX_BUILTIN, A(1), do_exp},
-{"extension", Node_builtin, LEX_BUILTIN, GAWKX|A(2), do_ext},
-{"fflush", Node_builtin, LEX_BUILTIN, RESX|A(0)|A(1), do_fflush},
-{"for", Node_K_for, LEX_FOR, 0, 0},
-{"func", Node_K_function, LEX_FUNCTION, NOT_POSIX|NOT_OLD, 0},
-{"function", Node_K_function, LEX_FUNCTION, NOT_OLD, 0},
-{"gensub", Node_builtin, LEX_BUILTIN, GAWKX|A(3)|A(4), do_gensub},
-{"getline", Node_K_getline, LEX_GETLINE, NOT_OLD, 0},
-{"gsub", Node_builtin, LEX_BUILTIN, NOT_OLD|A(2)|A(3), do_gsub},
-{"if", Node_K_if, LEX_IF, 0, 0},
-{"in", Node_illegal, LEX_IN, 0, 0},
-{"index", Node_builtin, LEX_BUILTIN, A(2), do_index},
-{"int", Node_builtin, LEX_BUILTIN, A(1), do_int},
-{"length", Node_builtin, LEX_LENGTH, A(0)|A(1), do_length},
-{"log", Node_builtin, LEX_BUILTIN, A(1), do_log},
-{"lshift", Node_builtin, LEX_BUILTIN, GAWKX|A(2), do_lshift},
-{"match", Node_builtin, LEX_BUILTIN, NOT_OLD|A(2)|A(3), do_match},
-{"mktime", Node_builtin, LEX_BUILTIN, GAWKX|A(1), do_mktime},
-{"next", Node_K_next, LEX_NEXT, 0, 0},
-{"nextfile", Node_K_nextfile, LEX_NEXTFILE, GAWKX, 0},
-{"or", Node_builtin, LEX_BUILTIN, GAWKX|A(2), do_or},
-{"patsplit", Node_builtin, LEX_BUILTIN, GAWKX|A(2)|A(3)|A(4), do_patsplit},
-{"print", Node_K_print, LEX_PRINT, 0, 0},
-{"printf", Node_K_printf, LEX_PRINTF, 0, 0},
-{"rand", Node_builtin, LEX_BUILTIN, NOT_OLD|A(0), do_rand},
-{"return", Node_K_return, LEX_RETURN, NOT_OLD, 0},
-{"rshift", Node_builtin, LEX_BUILTIN, GAWKX|A(2), do_rshift},
-{"sin", Node_builtin, LEX_BUILTIN, NOT_OLD|A(1), do_sin},
-{"split", Node_builtin, LEX_BUILTIN, A(2)|A(3)|A(4), do_split},
-{"sprintf", Node_builtin, LEX_BUILTIN, 0, do_sprintf},
-{"sqrt", Node_builtin, LEX_BUILTIN, A(1), do_sqrt},
-{"srand", Node_builtin, LEX_BUILTIN, NOT_OLD|A(0)|A(1), do_srand},
+{"and", Op_builtin, LEX_BUILTIN, GAWKX|A(2), do_and},
+{"asort", Op_builtin, LEX_BUILTIN, GAWKX|A(1)|A(2), do_asort},
+{"asorti", Op_builtin, LEX_BUILTIN, GAWKX|A(1)|A(2), do_asorti},
+{"atan2", Op_builtin, LEX_BUILTIN, NOT_OLD|A(2), do_atan2},
+{"bindtextdomain", Op_builtin, LEX_BUILTIN, GAWKX|A(1)|A(2), do_bindtextdomain},
+{"break", Op_K_break, LEX_BREAK, 0, 0},
+{"case", Op_K_case, LEX_CASE, GAWKX, 0},
+{"close", Op_builtin, LEX_BUILTIN, NOT_OLD|A(1)|A(2), do_close},
+{"compl", Op_builtin, LEX_BUILTIN, GAWKX|A(1), do_compl},
+{"continue", Op_K_continue, LEX_CONTINUE, 0, 0},
+{"cos", Op_builtin, LEX_BUILTIN, NOT_OLD|A(1), do_cos},
+{"dcgettext", Op_builtin, LEX_BUILTIN, GAWKX|A(1)|A(2)|A(3), do_dcgettext},
+{"dcngettext", Op_builtin, LEX_BUILTIN, GAWKX|A(1)|A(2)|A(3)|A(4)|A(5), do_dcngettext},
+{"default", Op_K_default, LEX_DEFAULT, GAWKX, 0},
+{"delete", Op_K_delete, LEX_DELETE, NOT_OLD, 0},
+{"do", Op_symbol, LEX_DO, NOT_OLD|BREAK|CONTINUE, 0},
+{"else", Op_K_else, LEX_ELSE, 0, 0},
+{"eval", Op_symbol, LEX_EVAL, 0, 0},
+{"exit", Op_K_exit, LEX_EXIT, 0, 0},
+{"exp", Op_builtin, LEX_BUILTIN, A(1), do_exp},
+{"extension", Op_builtin, LEX_BUILTIN, GAWKX|A(2), do_ext},
+{"fflush", Op_builtin, LEX_BUILTIN, RESX|A(0)|A(1), do_fflush},
+{"for", Op_symbol, LEX_FOR, BREAK|CONTINUE, 0},
+{"func", Op_func, LEX_FUNCTION, NOT_POSIX|NOT_OLD, 0},
+{"function",Op_func, LEX_FUNCTION, NOT_OLD, 0},
+{"gensub", Op_builtin, LEX_BUILTIN, GAWKX|A(3)|A(4), do_gensub},
+{"getline", Op_K_getline_redir, LEX_GETLINE, NOT_OLD, 0},
+{"gsub", Op_builtin, LEX_BUILTIN, NOT_OLD|A(2)|A(3), do_gsub},
+{"if", Op_K_if, LEX_IF, 0, 0},
+{"in", Op_symbol, LEX_IN, 0, 0},
+{"include", Op_symbol, LEX_INCLUDE, GAWKX, 0},
+{"index", Op_builtin, LEX_BUILTIN, A(2), do_index},
+{"int", Op_builtin, LEX_BUILTIN, A(1), do_int},
+{"length", Op_builtin, LEX_LENGTH, A(0)|A(1), do_length},
+{"log", Op_builtin, LEX_BUILTIN, A(1), do_log},
+{"lshift", Op_builtin, LEX_BUILTIN, GAWKX|A(2), do_lshift},
+{"match", Op_builtin, LEX_BUILTIN, NOT_OLD|A(2)|A(3), do_match},
+{"mktime", Op_builtin, LEX_BUILTIN, GAWKX|A(1), do_mktime},
+{"next", Op_K_next, LEX_NEXT, 0, 0},
+{"nextfile", Op_K_nextfile, LEX_NEXTFILE, GAWKX, 0},
+{"or", Op_builtin, LEX_BUILTIN, GAWKX|A(2), do_or},
+{"patsplit", Op_builtin, LEX_BUILTIN, GAWKX|A(2)|A(3)|A(4), do_patsplit},
+{"print", Op_K_print, LEX_PRINT, 0, 0},
+{"printf", Op_K_printf, LEX_PRINTF, 0, 0},
+{"rand", Op_builtin, LEX_BUILTIN, NOT_OLD|A(0), do_rand},
+{"return", Op_K_return, LEX_RETURN, NOT_OLD, 0},
+{"rshift", Op_builtin, LEX_BUILTIN, GAWKX|A(2), do_rshift},
+{"sin", Op_builtin, LEX_BUILTIN, NOT_OLD|A(1), do_sin},
+{"split", Op_builtin, LEX_BUILTIN, A(2)|A(3)|A(4), do_split},
+{"sprintf", Op_builtin, LEX_BUILTIN, 0, do_sprintf},
+{"sqrt", Op_builtin, LEX_BUILTIN, A(1), do_sqrt},
+{"srand", Op_builtin, LEX_BUILTIN, NOT_OLD|A(0)|A(1), do_srand},
#if defined(GAWKDEBUG) || defined(ARRAYDEBUG) /* || ... */
-{"stopme", Node_builtin, LEX_BUILTIN, GAWKX|A(0), stopme},
+{"stopme", Op_builtin, LEX_BUILTIN, GAWKX|A(0), stopme},
#endif
-{"strftime", Node_builtin, LEX_BUILTIN, GAWKX|A(0)|A(1)|A(2)|A(3), do_strftime},
-{"strtonum", Node_builtin, LEX_BUILTIN, GAWKX|A(1), do_strtonum},
-{"sub", Node_builtin, LEX_BUILTIN, NOT_OLD|A(2)|A(3), do_sub},
-{"substr", Node_builtin, LEX_BUILTIN, A(2)|A(3), do_substr},
-{"switch", Node_K_switch, LEX_SWITCH, GAWKX, 0},
-{"system", Node_builtin, LEX_BUILTIN, NOT_OLD|A(1), do_system},
-{"systime", Node_builtin, LEX_BUILTIN, GAWKX|A(0), do_systime},
-{"tolower", Node_builtin, LEX_BUILTIN, NOT_OLD|A(1), do_tolower},
-{"toupper", Node_builtin, LEX_BUILTIN, NOT_OLD|A(1), do_toupper},
-{"while", Node_K_while, LEX_WHILE, 0, 0},
-{"xor", Node_builtin, LEX_BUILTIN, GAWKX|A(2), do_xor},
+{"strftime", Op_builtin, LEX_BUILTIN, GAWKX|A(0)|A(1)|A(2)|A(3), do_strftime},
+{"strtonum", Op_builtin, LEX_BUILTIN, GAWKX|A(1), do_strtonum},
+{"sub", Op_builtin, LEX_BUILTIN, NOT_OLD|A(2)|A(3), do_sub},
+{"substr", Op_builtin, LEX_BUILTIN, A(2)|A(3), do_substr},
+{"switch", Op_symbol, LEX_SWITCH, GAWKX|BREAK, 0},
+{"system", Op_builtin, LEX_BUILTIN, NOT_OLD|A(1), do_system},
+{"systime", Op_builtin, LEX_BUILTIN, GAWKX|A(0), do_systime},
+{"tolower", Op_builtin, LEX_BUILTIN, NOT_OLD|A(1), do_tolower},
+{"toupper", Op_builtin, LEX_BUILTIN, NOT_OLD|A(1), do_toupper},
+{"while", Op_symbol, LEX_WHILE, BREAK|CONTINUE, 0},
+{"xor", Op_builtin, LEX_BUILTIN, GAWKX|A(2), do_xor},
};
#ifdef MBS_SUPPORT
@@ -3828,9 +4564,9 @@ static int cur_ring_idx;
/* getfname --- return name of a builtin function (for pretty printing) */
const char *
-getfname(register NODE *(*fptr)(NODE *))
+getfname(NODE *(*fptr)(int))
{
- register int i, j;
+ int i, j;
j = sizeof(tokentab) / sizeof(tokentab[0]);
/* linear search, no other way to do it */
@@ -3849,22 +4585,44 @@ getfname(register NODE *(*fptr)(NODE *))
*/
static void
-#ifdef CAN_USE_STDARG_H
- yyerror(const char *m, ...)
-#else
-/* VARARGS0 */
- yyerror(va_alist)
- va_dcl
-#endif
+yyerror(const char *m, ...)
{
va_list args;
const char *mesg = NULL;
- register char *bp, *cp;
+ char *bp, *cp;
char *scan;
char *buf;
int count;
static char end_of_file_line[] = "(END OF FILE)";
char save;
+ int saveline;
+ SRCFILE *s;
+
+ /* suppress current file name, line # from `.. included from ..' msgs */
+ saveline = sourceline;
+ sourceline = 0;
+
+ for (s = sourcefile; s->stype == SRC_INC; ) {
+ int line;
+ s = s->next;
+ if (s->fd <= INVALID_HANDLE)
+ continue;
+
+ line = s->srclines;
+ /* if last token is NEWLINE, line number is off by 1. */
+ if (s->lasttok == NEWLINE)
+ line--;
+
+ msg("%s %s:%d%c",
+ s->prev == sourcefile ? "In file included from"
+ : " from",
+ (s->stype == SRC_INC ||
+ s->stype == SRC_FILE) ? s->src : "cmd. line",
+ line,
+ s->stype == SRC_INC ? ',' : ':'
+ );
+ }
+ sourceline = saveline;
errcount++;
/* Find the current line in the input file */
@@ -3904,15 +4662,9 @@ static void
*bp = save;
-#ifdef CAN_USE_STDARG_H
va_start(args, m);
if (mesg == NULL)
mesg = m;
-#else
- va_start(args);
- if (mesg == NULL)
- mesg = va_arg(args, char *);
-#endif
count = (bp - thisline) + strlen(mesg) + 2 + 1;
emalloc(buf, char *, count, "yyerror");
@@ -3931,7 +4683,333 @@ static void
strcpy(bp, mesg);
err("", buf, args);
va_end(args);
- free(buf);
+ efree(buf);
+}
+
+/* mk_program --- create a single list of instructions */
+
+static INSTRUCTION *
+mk_program()
+{
+ INSTRUCTION *cp, *tmp;
+
+#define begin_block rule_block[BEGIN]
+#define end_block rule_block[END]
+#define prog_block rule_block[Rule]
+#define beginfile_block rule_block[BEGINFILE]
+#define endfile_block rule_block[ENDFILE]
+
+ if (end_block == NULL)
+ end_block = list_create(ip_end);
+ else
+ (void) list_prepend(end_block, ip_end);
+
+ if (get_context()->level > 0) {
+ if (begin_block != NULL && prog_block != NULL)
+ cp = list_merge(begin_block, prog_block);
+ else
+ cp = (begin_block != NULL) ? begin_block : prog_block;
+
+ if (cp != NULL)
+ (void) list_merge(cp, end_block);
+ else
+ cp = end_block;
+
+ (void) list_append(cp, instruction(Op_stop));
+ goto out;
+ }
+
+ if (endfile_block == NULL)
+ endfile_block = list_create(ip_endfile);
+ else {
+ extern int has_endfile; /* kludge for use in inrec (io.c) */
+ has_endfile = TRUE;
+ (void) list_prepend(endfile_block, ip_endfile);
+ }
+
+ if (beginfile_block == NULL)
+ beginfile_block = list_create(ip_beginfile);
+ else
+ (void) list_prepend(beginfile_block, ip_beginfile);
+
+ if (prog_block == NULL) {
+ if (end_block->nexti == end_block->lasti
+ && beginfile_block->nexti == beginfile_block->lasti
+ && endfile_block->nexti == endfile_block->lasti
+ ) {
+ /* no pattern-action and (real) end, beginfile or endfile blocks */
+ bcfree(ip_rec);
+ bcfree(ip_newfile);
+ ip_rec = ip_newfile = NULL;
+
+ list_append(beginfile_block, instruction(Op_after_beginfile));
+ (void) list_append(endfile_block, instruction(Op_after_endfile));
+
+ if (begin_block == NULL) /* no program at all */
+ cp = end_block;
+ else
+ cp = list_merge(begin_block, end_block);
+ (void) list_append(cp, ip_atexit);
+ (void) list_append(cp, instruction(Op_stop));
+
+ /* append beginfile_block and endfile_block for sole use
+ * in getline without redirection (Op_K_getline).
+ */
+
+ (void) list_merge(cp, beginfile_block);
+ (void) list_merge(cp, endfile_block);
+
+ goto out;
+
+ } else {
+ /* install a do-nothing prog block */
+ prog_block = list_create(instruction(Op_no_op));
+ }
+ }
+
+ (void) list_append(endfile_block, instruction(Op_after_endfile));
+ (void) list_prepend(prog_block, ip_rec);
+ (void) list_append(prog_block, instruction(Op_jmp));
+ prog_block->lasti->target_jmp = ip_rec;
+
+ list_append(beginfile_block, instruction(Op_after_beginfile));
+
+ cp = list_merge(beginfile_block, prog_block);
+ (void) list_prepend(cp, ip_newfile);
+ (void) list_merge(cp, endfile_block);
+ (void) list_merge(cp, end_block);
+ if (begin_block != NULL)
+ cp = list_merge(begin_block, cp);
+
+ (void) list_append(cp, ip_atexit);
+ (void) list_append(cp, instruction(Op_stop));
+
+out:
+ /* delete the Op_list, not needed */
+ tmp = cp->nexti;
+ bcfree(cp);
+ return tmp;
+
+#undef begin_block
+#undef end_block
+#undef prog_block
+#undef beginfile_block
+#undef endfile_block
+}
+
+/* parse_program --- read in the program and convert into a list of instructions */
+
+int
+parse_program(INSTRUCTION **pcode)
+{
+ int ret;
+
+ /* pre-create non-local jump targets
+ * ip_end (Op_no_op) -- used as jump target for `exit'
+ * outside an END block.
+ */
+ ip_end = instruction(Op_no_op);
+
+ if (get_context()->level > 0)
+ ip_newfile = ip_rec = ip_atexit = ip_beginfile = ip_endfile = NULL;
+ else {
+ ip_endfile = instruction(Op_no_op);
+ ip_beginfile = instruction(Op_no_op);
+ ip_newfile = instruction(Op_newfile); /* target for `nextfile' */
+ ip_newfile->target_jmp = ip_end;
+ ip_newfile->target_endfile = ip_endfile;
+ ip_rec = instruction(Op_get_record); /* target for `next' */
+ ip_atexit = instruction(Op_atexit); /* target for `exit' in END block */
+ }
+
+ sourcefile = srcfiles->next;
+ lexeof = FALSE;
+ lexptr = NULL;
+ lasttok = 0;
+ memset(rule_block, 0, sizeof(ruletab) * sizeof(INSTRUCTION *));
+ errcount = 0;
+ tok = tokstart != NULL ? tokstart : tokexpand();
+
+ ret = yyparse();
+ *pcode = mk_program();
+
+ /* avoid false source indications */
+ source = NULL;
+ sourceline = 0;
+
+ check_funcs();
+ return (ret || errcount);
+}
+
+/* do_add_srcfile --- add one item to srcfiles */
+
+static SRCFILE *
+do_add_srcfile(int stype, char *src, char *path, SRCFILE *thisfile)
+{
+ SRCFILE *s;
+
+ emalloc(s, SRCFILE *, sizeof(SRCFILE), "do_add_srcfile");
+ memset(s, 0, sizeof(SRCFILE));
+ s->src = estrdup(src, strlen(src));
+ s->fullpath = path;
+ s->stype = stype;
+ s->fd = INVALID_HANDLE;
+ s->next = thisfile;
+ s->prev = thisfile->prev;
+ thisfile->prev->next = s;
+ thisfile->prev = s;
+ return s;
+}
+
+/* add_srcfile --- add one item to srcfiles after checking if
+ * a source file exists and not already in list.
+ */
+
+SRCFILE *
+add_srcfile(int stype, char *src, SRCFILE *thisfile, int *already_included, int *errcode)
+{
+ SRCFILE *s;
+ struct stat sbuf;
+ char *path;
+ int errno_val = 0;
+
+ if (already_included)
+ *already_included = FALSE;
+ if (errcode)
+ *errcode = 0;
+ if (stype == SRC_CMDLINE || stype == SRC_STDIN)
+ return do_add_srcfile(stype, src, NULL, thisfile);
+
+ path = find_source(src, &sbuf, &errno_val);
+ if (path == NULL) {
+ if (errcode) {
+ *errcode = errno_val;
+ return NULL;
+ }
+ fatal(_("can't open source file `%s' for reading (%s)"),
+ src, errno_val ? strerror(errno_val) : _("reason unknown"));
+ }
+
+ for (s = srcfiles->next; s != srcfiles; s = s->next) {
+ if ((s->stype == SRC_FILE || s->stype == SRC_INC)
+ && files_are_same(& sbuf, & s->sbuf)
+ ) {
+ if (do_lint)
+ lintwarn(_("already included source file `%s'"), src);
+ efree(path);
+ if (already_included)
+ *already_included = TRUE;
+ return NULL;
+ }
+ }
+
+ s = do_add_srcfile(stype, src, path, thisfile);
+ s->sbuf = sbuf;
+ s->mtime = sbuf.st_mtime;
+ return s;
+}
+
+/* include_source --- read program from source included using `@include' */
+
+static int
+include_source(char *src)
+{
+ SRCFILE *s;
+ int errcode;
+ int already_included;
+
+ if (do_traditional || do_posix) {
+ error(_("@include is a gawk extension"));
+ errcount++;
+ return -1;
+ }
+
+ if (strlen(src) == 0) {
+ if (do_lint)
+ lintwarn(_("empty filename after @include"));
+ return 0;
+ }
+
+ s = add_srcfile(SRC_INC, src, sourcefile, &already_included, &errcode);
+ if (s == NULL) {
+ if (already_included)
+ return 0;
+ error(_("can't open source file `%s' for reading (%s)"),
+ src, errcode ? strerror(errcode) : _("reason unknown"));
+ errcount++;
+ return -1;
+ }
+
+ /* save scanner state for the current sourcefile */
+ sourcefile->srclines = sourceline;
+ sourcefile->lexptr = lexptr;
+ sourcefile->lexend = lexend;
+ sourcefile->lexptr_begin = lexptr_begin;
+ sourcefile->lexeme = lexeme;
+ sourcefile->lasttok = lasttok;
+
+ /* included file becomes the current source */
+ sourcefile = s;
+ lexptr = NULL;
+ sourceline = 0;
+ source = NULL;
+ lasttok = 0;
+ lexeof = FALSE;
+ eof_warned = FALSE;
+ return 0;
+}
+
+/* next_sourcefile --- read program from the next source in srcfiles */
+
+static void
+next_sourcefile()
+{
+ static int (*closefunc)(int fd) = NULL;
+
+ if (closefunc == NULL) {
+ char *cp = getenv("AWKREADFUNC");
+
+ /* If necessary, one day, test value for different functions. */
+ if (cp == NULL)
+ closefunc = close;
+ else
+ closefunc = one_line_close;
+ }
+
+ assert(lexeof == TRUE);
+ lexeof = FALSE;
+ eof_warned = FALSE;
+ sourcefile->srclines = sourceline; /* total no of lines in current file */
+ if (sourcefile->fd > INVALID_HANDLE) {
+ if (sourcefile->fd != fileno(stdin)) /* safety */
+ (*closefunc)(sourcefile->fd);
+ sourcefile->fd = INVALID_HANDLE;
+ }
+ if (sourcefile->buf != NULL) {
+ efree(sourcefile->buf);
+ sourcefile->buf = NULL;
+ sourcefile->lexptr_begin = NULL;
+ }
+
+ sourcefile = sourcefile->next;
+ if (sourcefile == srcfiles)
+ return;
+
+ if (sourcefile->lexptr_begin != NULL) {
+ /* resume reading from already opened file (postponed to process '@include') */
+ lexptr = sourcefile->lexptr;
+ lexend = sourcefile->lexend;
+ lasttok = sourcefile->lasttok;
+ lexptr_begin = sourcefile->lexptr_begin;
+ lexeme = sourcefile->lexeme;
+ sourceline = sourcefile->srclines;
+ source = sourcefile->src;
+ } else {
+ lexptr = NULL;
+ sourceline = 0;
+ source = NULL;
+ lasttok = 0;
+ }
}
/* get_src_buf --- read the next buffer of source program */
@@ -3939,11 +5017,11 @@ static void
static char *
get_src_buf()
{
- static int samefile = FALSE;
- static int nextfile = 0;
- static char *buf = NULL;
- static size_t buflen = 0;
- static int fd;
+ int n;
+ char *scan;
+ int newfile;
+ int savelen;
+ struct stat sbuf;
/*
* No argument prototype on readfunc on purpose,
@@ -3951,105 +5029,94 @@ get_src_buf()
* the types of arguments to read() aren't up to date.
*/
static ssize_t (*readfunc)() = 0;
- static int (*closefunc)P((int fd)) = NULL;
-
- int n;
- register char *scan;
- int newfile;
- struct stat sbuf;
- int readcount = 0;
- int l;
- char *readloc;
if (readfunc == NULL) {
char *cp = getenv("AWKREADFUNC");
/* If necessary, one day, test value for different functions. */
- if (cp == NULL) {
+ if (cp == NULL)
readfunc = read;
- closefunc = close;
- } else {
+ else
readfunc = read_one_line;
- closefunc = one_line_close;
- }
}
-again:
newfile = FALSE;
- if (nextfile > numfiles)
+ if (sourcefile == srcfiles)
return NULL;
- if (srcfiles[nextfile].stype == CMDLINE) {
- if ((l = strlen(srcfiles[nextfile].val)) == 0) {
+ if (sourcefile->stype == SRC_CMDLINE) {
+ if (sourcefile->bufsize == 0) {
+ sourcefile->bufsize = strlen(sourcefile->src);
+ lexptr = lexptr_begin = lexeme = sourcefile->src;
+ lexend = lexptr + sourcefile->bufsize;
+ sourceline = 1;
+ if (sourcefile->bufsize == 0) {
+ /*
+ * Yet Another Special case:
+ * gawk '' /path/name
+ * Sigh.
+ */
+ static short warned = FALSE;
+
+ if (do_lint && ! warned) {
+ warned = TRUE;
+ lintwarn(_("empty program text on command line"));
+ }
+ lexeof = TRUE;
+ }
+ } else if (sourcefile->buf == NULL && *(lexptr-1) != '\n') {
/*
- * Yet Another Special case:
- * gawk '' /path/name
- * Sigh.
+ * The following goop is to ensure that the source
+ * ends with a newline and that the entire current
+ * line is available for error messages.
*/
- static short warned = FALSE;
+ int offset;
+ char *buf;
- if (do_lint && ! warned) {
- warned = TRUE;
- lintwarn(_("empty program text on command line"));
- }
- ++nextfile;
- goto again;
- }
- if (srcfiles[nextfile].val[l-1] == '\n') {
- /* has terminating newline, can use it directly */
- sourceline = 1;
- source = NULL;
- lexptr = lexptr_begin = srcfiles[nextfile].val;
- /* fall through to pointer adjustment and return, below */
- } else {
- /* copy it into static buffer */
-
- /* make sure buffer exists and has room */
- if (buflen == 0) {
- emalloc(buf, char *, l+2, "get_src_buf");
- buflen = l + 2;
- } else if (l+2 > buflen) {
- erealloc(buf, char *, l+2, "get_src_buf");
- buflen = l + 2;
- } /* else
- buffer has room, just use it */
-
- /* copy in data */
- memcpy(buf, srcfiles[nextfile].val, l);
- buf[l] = '\n';
- buf[++l] = '\0';
-
- /* set vars and return */
- sourceline = 0;
- source = NULL;
- lexptr = lexptr_begin = buf;
- }
- lexend = lexptr + l;
- nextfile++; /* for next entry to this routine */
+ offset = lexptr - lexeme;
+ for (scan = lexeme; scan > lexptr_begin; scan--)
+ if (*scan == '\n') {
+ scan++;
+ break;
+ }
+ savelen = lexptr - scan;
+ emalloc(buf, char *, savelen + 1, "get_src_buf");
+ memcpy(buf, scan, savelen);
+ thisline = buf;
+ lexptr = buf + savelen;
+ *lexptr = '\n';
+ lexeme = lexptr - offset;
+ lexptr_begin = buf;
+ lexend = lexptr + 1;
+ sourcefile->buf = buf;
+ } else
+ lexeof = TRUE;
return lexptr;
}
- if (! samefile) {
- source = srcfiles[nextfile].val;
- if (source == NULL) { /* read all the source files, all done */
- if (buf != NULL) {
- free(buf);
- buf = NULL;
- }
- buflen = 0;
- return lexeme = lexptr = lexptr_begin = NULL;
- }
- fd = pathopen(source);
+ if (sourcefile->fd <= INVALID_HANDLE) {
+ int fd;
+ int l;
+
+ source = sourcefile->src;
+ if (source == NULL)
+ return NULL;
+ fd = srcopen(sourcefile);
if (fd <= INVALID_HANDLE) {
char *in;
/* suppress file name and line no. in error mesg */
in = source;
source = NULL;
- fatal(_("can't open source file `%s' for reading (%s)"),
+ error(_("can't open source file `%s' for reading (%s)"),
in, strerror(errno));
+ errcount++;
+ lexeof = TRUE;
+ return sourcefile->src;
}
- l = optimal_bufsize(fd, & sbuf);
+
+ sourcefile->fd = fd;
+ l = optimal_bufsize(fd, &sbuf);
/*
* Make sure that something silly like
* AWKBUFSIZE=8 make check
@@ -4059,110 +5126,71 @@ again:
if (l < A_DECENT_BUFFER_SIZE)
l = A_DECENT_BUFFER_SIZE;
#undef A_DECENT_BUFFER_SIZE
-
+ sourcefile->bufsize = l;
newfile = TRUE;
-
- /* make sure buffer exists and has room */
- if (buflen == 0) {
- emalloc(buf, char *, l+2, "get_src_buf");
- buflen = l + 2;
- } else if (l+2 > buflen) {
- erealloc(buf, char *, l+2, "get_src_buf");
- buflen = l + 2;
- } /* else
- buffer has room, just use it */
-
- readcount = l;
- readloc = lexeme = lexptr = lexptr_begin = buf;
- samefile = TRUE;
+ emalloc(sourcefile->buf, char *, sourcefile->bufsize, "get_src_buf");
+ lexptr = lexptr_begin = lexeme = sourcefile->buf;
+ savelen = 0;
sourceline = 1;
+ thisline = NULL;
} else {
/*
- * In same file, ran off edge of buffer.
- * Shift current line down to front, adjust
- * pointers and fill in the rest of the buffer.
+ * Here, we retain the current source line in the beginning of the buffer.
*/
-
- int lexeme_offset = lexeme - lexptr_begin;
- int lexptr_offset = lexptr - lexptr_begin;
- int lexend_offset = lexend - lexptr_begin;
-
- /* find beginning of current line */
- for (scan = lexeme; scan >= lexptr_begin; scan--) {
+ int offset;
+ for (scan = lexeme; scan > lexptr_begin; scan--)
if (*scan == '\n') {
scan++;
break;
}
- }
- /*
- * This condition can be read as follows: IF
- * 1. The beginning of the line is at the beginning of the
- * buffer (no newline was found: scan <= buf)
- * AND:
- * 2. The start of valid lexical data is into the buffer
- * (lexptr_begin > buf)
- * OR:
- * 3. We have scanned past the end of the last data read
- * (lexptr == lexend)
- * AND:
- * 4. There's no room left in the buffer
- * (lexptr_offset >= buflen - 2)
- *
- * If all that's true, grow the buffer to add more to
- * the current line.
- */
+ savelen = lexptr - scan;
+ offset = lexptr - lexeme;
- if (scan <= buf
- && (lexptr_begin > buf
- || (lexptr == lexend
- && lexptr_offset >= buflen - 2))) {
- /* have to grow the buffer */
- buflen *= 2;
- erealloc(buf, char *, buflen, "get_src_buf");
- } else if (scan > buf) {
- /* Line starts in middle of the buffer, shift things down. */
- memmove(buf, scan, lexend - scan);
+ if (savelen > 0) {
/*
- * make offsets relative to start of line,
- * not start of buffer.
+ * Need to make sure we have room left for reading new text;
+ * grow the buffer (by doubling, an arbitrary choice), if the retained line
+ * takes up more than a certain percentage (50%, again an arbitrary figure)
+ * of the available space.
*/
- lexend_offset = lexend - scan;
- lexeme_offset = lexeme - scan;
- lexptr_offset = lexptr - scan;
- }
- /* adjust pointers */
- lexeme = buf + lexeme_offset;
- lexptr = buf + lexptr_offset;
- lexend = buf + lexend_offset;
- lexptr_begin = buf;
- readcount = buflen - (lexend - buf);
- readloc = lexend;
+ if (savelen > sourcefile->bufsize / 2) { /* long line or token */
+ sourcefile->bufsize *= 2;
+ erealloc(sourcefile->buf, char *, sourcefile->bufsize, "get_src_buf");
+ scan = sourcefile->buf + (scan - lexptr_begin);
+ lexptr_begin = sourcefile->buf;
+ }
+
+ thisline = lexptr_begin;
+ memmove(thisline, scan, savelen);
+ lexptr = thisline + savelen;
+ lexeme = lexptr - offset;
+ } else {
+ savelen = 0;
+ lexptr = lexeme = lexptr_begin;
+ thisline = NULL;
+ }
}
- /* add more data to buffer */
- n = (*readfunc)(fd, readloc, readcount);
- if (n == -1)
- fatal(_("can't read sourcefile `%s' (%s)"),
- source, strerror(errno));
- if (n == 0) {
- if (newfile) {
+ n = (*readfunc)(sourcefile->fd, lexptr, sourcefile->bufsize - savelen);
+ if (n == -1) {
+ error(_("can't read sourcefile `%s' (%s)"),
+ source, strerror(errno));
+ errcount++;
+ lexeof = TRUE;
+ } else {
+ lexend = lexptr + n;
+ if (n == 0) {
static short warned = FALSE;
-
- if (do_lint && ! warned) {
+ if (do_lint && newfile && ! warned){
warned = TRUE;
lintwarn(_("source file `%s' is empty"), source);
}
+ lexeof = TRUE;
}
- if (fd != fileno(stdin)) /* safety */
- (*closefunc)(fd);
- samefile = FALSE;
- nextfile++;
- goto again;
}
- lexend = lexptr + n;
- return lexptr;
+ return sourcefile->buf;
}
/* tokadd --- add a character to the token buffer */
@@ -4171,20 +5199,23 @@ again:
/* tokexpand --- grow the token buffer */
-char *
+static char *
tokexpand()
{
- static int toksize = 60;
+ static int toksize;
int tokoffset;
-
- tokoffset = tok - tokstart;
- toksize *= 2;
- if (tokstart != NULL)
+
+ if (tokstart != NULL) {
+ tokoffset = tok - tokstart;
+ toksize *= 2;
erealloc(tokstart, char *, toksize, "tokexpand");
- else
+ tok = tokstart + tokoffset;
+ } else {
+ toksize = 60;
emalloc(tokstart, char *, toksize, "tokexpand");
+ tok = tokstart;
+ }
tokend = tokstart + toksize;
- tok = tokstart + tokoffset;
return tok;
}
@@ -4196,9 +5227,13 @@ static int
nextc(void)
{
if (gawk_mb_cur_max > 1) {
- if (!lexptr || lexptr >= lexend) {
- if (! get_src_buf())
- return EOF;
+again:
+ if (lexeof)
+ return END_FILE;
+ if (lexptr == NULL || lexptr >= lexend) {
+ if (get_src_buf())
+ goto again;
+ return END_SRC;
}
/* Update the buffer index. */
@@ -4211,7 +5246,7 @@ nextc(void)
int idx, work_ring_idx = cur_ring_idx;
mbstate_t tmp_state;
size_t mbclen;
-
+
for (idx = 0 ; lexptr + idx < lexend ; idx++) {
tmp_state = cur_mbstate;
mbclen = mbrlen(lexptr, idx + 1, &tmp_state);
@@ -4242,44 +5277,30 @@ nextc(void)
}
return (int) (unsigned char) *lexptr++;
- }
- else {
- int c;
-
- if (lexptr && lexptr < lexend)
- c = (int) (unsigned char) *lexptr++;
- else if (get_src_buf())
- c = (int) (unsigned char) *lexptr++;
- else
- c = EOF;
-
- return c;
+ } else {
+ do {
+ if (lexeof)
+ return END_FILE;
+ if (lexptr && lexptr < lexend)
+ return ((int) (unsigned char) *lexptr++);
+ } while (get_src_buf());
+ return END_SRC;
}
}
#else /* MBS_SUPPORT */
-#if GAWKDEBUG
int
-nextc(void)
+nextc()
{
- int c;
-
- if (lexptr && lexptr < lexend)
- c = (int) (unsigned char) *lexptr++;
- else if (get_src_buf())
- c = (int) (unsigned char) *lexptr++;
- else
- c = EOF;
-
- return c;
+ do {
+ if (lexeof)
+ return END_FILE;
+ if (lexptr && lexptr < lexend)
+ return ((int) (unsigned char) *lexptr++);
+ } while (get_src_buf());
+ return END_SRC;
}
-#else
-#define nextc() ((lexptr && lexptr < lexend) ? \
- ((int) (unsigned char) *lexptr++) : \
- (get_src_buf() ? ((int) (unsigned char) *lexptr++) : EOF) \
- )
-#endif
#endif /* MBS_SUPPORT */
@@ -4293,7 +5314,7 @@ pushback(void)
cur_ring_idx = (cur_ring_idx == 0)? RING_BUFFER_SIZE - 1 :
cur_ring_idx - 1;
#endif
- (lexptr && lexptr > lexptr_begin ? lexptr-- : lexptr);
+ (! lexeof && lexptr && lexptr > lexptr_begin ? lexptr-- : lexptr);
}
@@ -4306,13 +5327,17 @@ allow_newline(void)
for (;;) {
c = nextc();
- if (c == EOF)
+ if (c == END_FILE) {
+ pushback();
break;
+ }
if (c == '#') {
- while ((c = nextc()) != '\n' && c != EOF)
+ while ((c = nextc()) != '\n' && c != END_FILE)
continue;
- if (c == EOF)
+ if (c == END_FILE) {
+ pushback();
break;
+ }
}
if (c == '\n')
sourceline++;
@@ -4328,30 +5353,44 @@ allow_newline(void)
static int
yylex(void)
{
- register int c;
+ int c;
int seen_e = FALSE; /* These are for numbers */
int seen_point = FALSE;
int esc_seen; /* for literal strings */
int mid;
static int did_newline = FALSE;
char *tokkey;
- static int lasttok = 0;
- static short eof_warned = FALSE;
int inhex = FALSE;
int intlstr = FALSE;
- if (nextc() == EOF) {
- if (lasttok != NEWLINE) {
- lasttok = NEWLINE;
- if (do_lint && ! eof_warned) {
- lintwarn(_("source file does not end in newline"));
- eof_warned = TRUE;
- }
- return NEWLINE; /* fake it */
- }
- return 0;
+#define GET_INSTRUCTION(op) bcalloc(op, 1, sourceline)
+
+ /* NB: a newline at end does not start a source line. */
+
+#define NEWLINE_EOF \
+ (lasttok != NEWLINE ? \
+ (pushback(), do_lint && ! eof_warned && \
+ (lintwarn(_("source file does not end in newline")), \
+ eof_warned = TRUE), sourceline++, NEWLINE) : \
+ (sourceline--, eof_warned = FALSE, LEX_EOF))
+
+
+ yylval = (INSTRUCTION *) NULL;
+ if (lasttok == SUBSCRIPT) {
+ lasttok = 0;
+ return SUBSCRIPT;
}
+
+ if (lasttok == LEX_EOF) /* error earlier in current source, must give up !! */
+ return 0;
+
+ c = nextc();
+ if (c == END_SRC)
+ return 0;
+ if (c == END_FILE)
+ return lasttok = NEWLINE_EOF;
pushback();
+
#if defined OS2 || defined __EMX__
/*
* added for OS/2's extproc feature of cmd.exe
@@ -4362,6 +5401,7 @@ yylex(void)
lexptr++;
}
#endif
+
lexeme = lexptr;
thisline = NULL;
if (want_regexp) {
@@ -4405,7 +5445,8 @@ yylex(void)
in_brack--;
break;
case '\\':
- if ((c = nextc()) == EOF) {
+ if ((c = nextc()) == END_FILE) {
+ pushback();
yyerror(_("unterminated regexp ends with `\\' at end of file"));
goto end_regexp; /* kludge */
} else if (c == '\n') {
@@ -4421,8 +5462,8 @@ yylex(void)
if (in_brack > 0)
break;
end_regexp:
- tokadd('\0');
- yylval.sval = tokstart;
+ yylval = GET_INSTRUCTION(Op_token);
+ yylval->lextok = estrdup(tokstart, tok - tokstart);
if (do_lint) {
int peek = nextc();
@@ -4443,7 +5484,8 @@ end_regexp:
pushback();
yyerror(_("unterminated regexp"));
goto end_regexp; /* kludge */
- case EOF:
+ case END_FILE:
+ pushback();
yyerror(_("unterminated regexp at end of file"));
goto end_regexp; /* kludge */
}
@@ -4459,42 +5501,32 @@ retry:
lexeme = lexptr ? lexptr - 1 : lexptr;
thisline = NULL;
tok = tokstart;
- yylval.nodetypeval = Node_illegal;
-
- if (gawk_mb_cur_max == 1 || nextc_is_1stbyte) switch (c) {
- case EOF:
- if (lasttok != NEWLINE) {
- lasttok = NEWLINE;
- if (do_lint && ! eof_warned) {
- lintwarn(_("source file does not end in newline"));
- eof_warned = TRUE;
- }
- return NEWLINE; /* fake it */
- }
+
+#ifdef MBS_SUPPORT
+ if (gawk_mb_cur_max == 1 || nextc_is_1stbyte)
+#endif
+ switch (c) {
+ case END_SRC:
return 0;
+ case END_FILE:
+ return lasttok = NEWLINE_EOF;
+
case '\n':
sourceline++;
return lasttok = NEWLINE;
case '#': /* it's a comment */
while ((c = nextc()) != '\n') {
- if (c == EOF) {
- if (lasttok != NEWLINE) {
- lasttok = NEWLINE;
- if (do_lint && ! eof_warned) {
- lintwarn(
- _("source file does not end in newline"));
- eof_warned = TRUE;
- }
- return NEWLINE; /* fake it */
- }
- return 0;
- }
+ if (c == END_FILE)
+ return lasttok = NEWLINE_EOF;
}
sourceline++;
return lasttok = NEWLINE;
+ case '@':
+ return lasttok = '@';
+
case '\\':
#ifdef RELAXED_CONTINUATION
/*
@@ -4516,23 +5548,27 @@ retry:
_("use of `\\ #...' line continuation is not portable"));
}
while ((c = nextc()) != '\n')
- if (c == EOF)
+ if (c == END_FILE)
break;
}
pushback();
}
#endif /* RELAXED_CONTINUATION */
- if (nextc() == '\n') {
+ c = nextc();
+ if (c == '\r') /* allow MS-DOS files. bleah */
+ c = nextc();
+ if (c == '\n') {
sourceline++;
goto retry;
} else {
yyerror(_("backslash not last character on line"));
- exit(EXIT_FAILURE);
+ return lasttok = LEX_EOF;
}
break;
case ':':
case '?':
+ yylval = GET_INSTRUCTION(Op_cond_exp);
if (! do_posix)
allow_newline();
return lasttok = c;
@@ -4547,21 +5583,36 @@ retry:
case '(':
in_parens++;
- /* FALL THROUGH */
+ return lasttok = c;
case '$':
- case ';':
+ yylval = GET_INSTRUCTION(Op_field_spec);
+ return lasttok = c;
case '{':
+ if (++in_braces == 1)
+ firstline = sourceline;
+ case ';':
case ',':
case '[':
+ return lasttok = c;
case ']':
- return lasttok = c;
+ c = nextc();
+ pushback();
+ if (c == '[') {
+ yylval = GET_INSTRUCTION(Op_sub_array);
+ lasttok = ']';
+ } else {
+ yylval = GET_INSTRUCTION(Op_subscript);
+ lasttok = SUBSCRIPT; /* end of subscripts */
+ }
+ return ']';
case '*':
if ((c = nextc()) == '=') {
- yylval.nodetypeval = Node_assign_times;
+ yylval = GET_INSTRUCTION(Op_assign_times);
return lasttok = ASSIGNOP;
} else if (do_posix) {
pushback();
+ yylval = GET_INSTRUCTION(Op_times);
return lasttok = '*';
} else if (c == '*') {
/* make ** and **= aliases for ^ and ^= */
@@ -4575,7 +5626,7 @@ retry:
if (do_lint_old)
warning(_("old awk does not support operator `**='"));
}
- yylval.nodetypeval = Node_assign_exp;
+ yylval = GET_INSTRUCTION(Op_assign_exp);
return ASSIGNOP;
} else {
pushback();
@@ -4586,10 +5637,12 @@ retry:
if (do_lint_old)
warning(_("old awk does not support operator `**'"));
}
+ yylval = GET_INSTRUCTION(Op_exp);
return lasttok = '^';
}
}
pushback();
+ yylval = GET_INSTRUCTION(Op_times);
return lasttok = '*';
case '/':
@@ -4598,14 +5651,16 @@ retry:
return lasttok = SLASH_BEFORE_EQUAL;
}
pushback();
+ yylval = GET_INSTRUCTION(Op_quotient);
return lasttok = '/';
case '%':
if (nextc() == '=') {
- yylval.nodetypeval = Node_assign_mod;
+ yylval = GET_INSTRUCTION(Op_assign_mod);
return lasttok = ASSIGNOP;
}
pushback();
+ yylval = GET_INSTRUCTION(Op_mod);
return lasttok = '%';
case '^':
@@ -4617,7 +5672,7 @@ retry:
did_warn_assgn = TRUE;
warning(_("operator `^=' is not supported in old awk"));
}
- yylval.nodetypeval = Node_assign_exp;
+ yylval = GET_INSTRUCTION(Op_assign_exp);
return lasttok = ASSIGNOP;
}
pushback();
@@ -4625,67 +5680,74 @@ retry:
did_warn_op = TRUE;
warning(_("operator `^' is not supported in old awk"));
}
+ yylval = GET_INSTRUCTION(Op_exp);
return lasttok = '^';
}
case '+':
if ((c = nextc()) == '=') {
- yylval.nodetypeval = Node_assign_plus;
+ yylval = GET_INSTRUCTION(Op_assign_plus);
return lasttok = ASSIGNOP;
}
- if (c == '+')
+ if (c == '+') {
+ yylval = GET_INSTRUCTION(Op_symbol);
return lasttok = INCREMENT;
+ }
pushback();
+ yylval = GET_INSTRUCTION(Op_plus);
return lasttok = '+';
case '!':
if ((c = nextc()) == '=') {
- yylval.nodetypeval = Node_notequal;
+ yylval = GET_INSTRUCTION(Op_notequal);
return lasttok = RELOP;
}
if (c == '~') {
- yylval.nodetypeval = Node_nomatch;
+ yylval = GET_INSTRUCTION(Op_nomatch);
return lasttok = MATCHOP;
}
pushback();
+ yylval = GET_INSTRUCTION(Op_symbol);
return lasttok = '!';
case '<':
if (nextc() == '=') {
- yylval.nodetypeval = Node_leq;
+ yylval = GET_INSTRUCTION(Op_leq);
return lasttok = RELOP;
}
- yylval.nodetypeval = Node_less;
+ yylval = GET_INSTRUCTION(Op_less);
pushback();
return lasttok = '<';
case '=':
if (nextc() == '=') {
- yylval.nodetypeval = Node_equal;
+ yylval = GET_INSTRUCTION(Op_equal);
return lasttok = RELOP;
}
- yylval.nodetypeval = Node_assign;
+ yylval = GET_INSTRUCTION(Op_assign);
pushback();
return lasttok = ASSIGN;
case '>':
if ((c = nextc()) == '=') {
- yylval.nodetypeval = Node_geq;
+ yylval = GET_INSTRUCTION(Op_geq);
return lasttok = RELOP;
} else if (c == '>') {
- yylval.nodetypeval = Node_redirect_append;
+ yylval = GET_INSTRUCTION(Op_symbol);
+ yylval->redir_type = redirect_append;
return lasttok = IO_OUT;
}
pushback();
if (in_print && in_parens == 0) {
- yylval.nodetypeval = Node_redirect_output;
+ yylval = GET_INSTRUCTION(Op_symbol);
+ yylval->redir_type = redirect_output;
return lasttok = IO_OUT;
}
- yylval.nodetypeval = Node_greater;
+ yylval = GET_INSTRUCTION(Op_greater);
return lasttok = '>';
case '~':
- yylval.nodetypeval = Node_match;
+ yylval = GET_INSTRUCTION(Op_match);
return lasttok = MATCHOP;
case '}':
@@ -4695,6 +5757,8 @@ retry:
*/
if (did_newline) {
did_newline = FALSE;
+ if (--in_braces == 0)
+ lastline = sourceline;
return lasttok = c;
}
did_newline++;
@@ -4708,7 +5772,7 @@ retry:
if (c == '\n') {
pushback();
yyerror(_("unterminated string"));
- exit(EXIT_FAILURE);
+ return lasttok = LEX_EOF;
}
if ((gawk_mb_cur_max == 1 || nextc_is_1stbyte) &&
c == '\\') {
@@ -4718,35 +5782,46 @@ retry:
continue;
}
esc_seen = TRUE;
- tokadd('\\');
+ if (! want_source || c != '"')
+ tokadd('\\');
}
- if (c == EOF) {
+ if (c == END_FILE) {
pushback();
yyerror(_("unterminated string"));
- exit(EXIT_FAILURE);
+ return lasttok = LEX_EOF;
}
tokadd(c);
}
- yylval.nodeval = make_str_node(tokstart,
- tok - tokstart, esc_seen ? SCAN : 0);
- yylval.nodeval->flags |= PERM;
+ yylval = GET_INSTRUCTION(Op_token);
+ if (want_source) {
+ yylval->lextok = estrdup(tokstart, tok - tokstart);
+ return lasttok = FILENAME;
+ }
+
+ yylval->opcode = Op_push_i;
+ yylval->memory = make_str_node(tokstart,
+ tok - tokstart, esc_seen ? SCAN : 0);
+ yylval->memory->flags &= ~MALLOC;
+ yylval->memory->flags |= PERM;
if (intlstr) {
- yylval.nodeval->flags |= INTLSTR;
+ yylval->memory->flags |= INTLSTR;
intlstr = FALSE;
if (do_intl)
- dumpintlstr(yylval.nodeval->stptr,
- yylval.nodeval->stlen);
- }
+ dumpintlstr(yylval->memory->stptr, yylval->memory->stlen);
+ }
return lasttok = YSTRING;
case '-':
if ((c = nextc()) == '=') {
- yylval.nodetypeval = Node_assign_minus;
+ yylval = GET_INSTRUCTION(Op_assign_minus);
return lasttok = ASSIGNOP;
}
- if (c == '-')
+ if (c == '-') {
+ yylval = GET_INSTRUCTION(Op_symbol);
return lasttok = DECREMENT;
+ }
pushback();
+ yylval = GET_INSTRUCTION(Op_minus);
return lasttok = '-';
case '.':
@@ -4856,13 +5931,10 @@ retry:
break;
c = nextc();
}
- if (c != EOF)
- pushback();
- else if (do_lint && ! eof_warned) {
- lintwarn(_("source file does not end in newline"));
- eof_warned = TRUE;
- }
+ pushback();
+
tokadd('\0');
+ yylval = GET_INSTRUCTION(Op_push_i);
if (! do_traditional && isnondecimal(tokstart, FALSE)) {
if (do_lint) {
if (isdigit(tokstart[1])) /* not an 'x' or 'X' */
@@ -4872,48 +5944,47 @@ retry:
lintwarn("numeric constant `%.*s' treated as hexadecimal",
(int) strlen(tokstart)-1, tokstart);
}
- yylval.nodeval = make_number(nondec2awknum(tokstart, strlen(tokstart)));
+ yylval->memory = mk_number(nondec2awknum(tokstart, strlen(tokstart)),
+ PERM|NUMCUR|NUMBER);
} else
- yylval.nodeval = make_number(atof(tokstart));
- yylval.nodeval->flags |= PERM;
+ yylval->memory = mk_number(atof(tokstart), PERM|NUMCUR|NUMBER);
return lasttok = YNUMBER;
case '&':
if ((c = nextc()) == '&') {
- yylval.nodetypeval = Node_and;
+ yylval = GET_INSTRUCTION(Op_and);
allow_newline();
return lasttok = LEX_AND;
}
pushback();
+ yylval = GET_INSTRUCTION(Op_symbol);
return lasttok = '&';
case '|':
if ((c = nextc()) == '|') {
- yylval.nodetypeval = Node_or;
+ yylval = GET_INSTRUCTION(Op_or);
allow_newline();
return lasttok = LEX_OR;
} else if (! do_traditional && c == '&') {
- yylval.nodetypeval = Node_redirect_twoway;
+ yylval = GET_INSTRUCTION(Op_symbol);
+ yylval->redir_type = redirect_twoway;
return lasttok = (in_print && in_parens == 0 ? IO_OUT : IO_IN);
}
pushback();
if (in_print && in_parens == 0) {
- yylval.nodetypeval = Node_redirect_pipe;
+ yylval = GET_INSTRUCTION(Op_symbol);
+ yylval->redir_type = redirect_pipe;
return lasttok = IO_OUT;
} else {
- yylval.nodetypeval = Node_redirect_pipein;
+ yylval = GET_INSTRUCTION(Op_symbol);
+ yylval->redir_type = redirect_pipein;
return lasttok = IO_IN;
}
-
- case '@': /* indirect function call */
- if (do_posix || do_traditional)
- break;
- return lasttok = c;
}
if (c != '_' && ! isalpha(c)) {
yyerror(_("invalid char '%c' in expression"), c);
- exit(EXIT_FAILURE);
+ return lasttok = LEX_EOF;
}
/*
@@ -4941,23 +6012,21 @@ retry:
/* it's some type of name-type-thing. Find its length. */
tok = tokstart;
- while (is_identchar(c)) {
+ while (c != END_FILE && is_identchar(c)) {
tokadd(c);
c = nextc();
}
tokadd('\0');
- emalloc(tokkey, char *, tok - tokstart, "yylex");
- memcpy(tokkey, tokstart, tok - tokstart);
- if (c != EOF)
- pushback();
- else if (do_lint && ! eof_warned) {
- lintwarn(_("source file does not end in newline"));
- eof_warned = TRUE;
- }
+ pushback();
/* See if it is a special token. */
-
if ((mid = check_special(tokstart)) >= 0) {
+ int class = tokentab[mid].class;
+
+ if ((class == LEX_INCLUDE || class == LEX_EVAL)
+ && lasttok != '@')
+ goto out;
+
if (do_lint) {
if (tokentab[mid].flags & GAWKX)
lintwarn(_("`%s' is a gawk extension"),
@@ -4972,26 +6041,64 @@ retry:
if (do_lint_old && (tokentab[mid].flags & NOT_OLD))
warning(_("`%s' is not supported in old awk"),
tokentab[mid].operator);
+ if (tokentab[mid].flags & BREAK)
+ break_allowed++;
+ if (tokentab[mid].flags & CONTINUE)
+ continue_allowed++;
if ((do_traditional && (tokentab[mid].flags & GAWKX))
|| (do_posix && (tokentab[mid].flags & NOT_POSIX)))
- ;
- else {
- if (tokentab[mid].class == LEX_BUILTIN
- || tokentab[mid].class == LEX_LENGTH)
- yylval.lval = mid;
- else
- yylval.nodetypeval = tokentab[mid].value;
- free(tokkey);
- return lasttok = tokentab[mid].class;
+ goto out;
+
+ switch (class) {
+ case LEX_INCLUDE:
+ want_source = TRUE;
+ break;
+ case LEX_EVAL:
+ if (get_context()->level == 0)
+ goto out;
+ emalloc(tokkey, char *, tok - tokstart + 1, "yylex");
+ tokkey[0] = '@';
+ memcpy(tokkey + 1, tokstart, tok - tokstart);
+ yylval = GET_INSTRUCTION(Op_token);
+ yylval->lextok = tokkey;
+ break;
+
+ case LEX_FUNCTION:
+ case LEX_BEGIN:
+ case LEX_END:
+ case LEX_BEGINFILE:
+ case LEX_ENDFILE:
+ yylval = bcalloc(tokentab[mid].value, 3, sourceline);
+ break;
+
+ case LEX_WHILE:
+ case LEX_DO:
+ case LEX_FOR:
+ case LEX_SWITCH:
+ yylval = bcalloc(tokentab[mid].value,
+ !!do_profiling + 1, sourceline);
+ break;
+
+ default:
+ yylval = GET_INSTRUCTION(tokentab[mid].value);
+ if (class == LEX_BUILTIN || class == LEX_LENGTH)
+ yylval->builtin_idx = mid;
+ break;
}
+ return lasttok = class;
}
-
- yylval.sval = tokkey;
- if (*lexptr == '(')
+out:
+ tokkey = estrdup(tokstart, tok - tokstart);
+ if (*lexptr == '(') {
+ yylval = bcalloc(Op_token, 2, sourceline);
+ yylval->lextok = tokkey;
return lasttok = FUNC_CALL;
- else {
+ } else {
static short goto_warned = FALSE;
+ yylval = GET_INSTRUCTION(Op_token);
+ yylval->lextok = tokkey;
+
#define SMART_ALECK 1
if (SMART_ALECK && do_lint
&& ! goto_warned && strcasecmp(tokkey, "goto") == 0) {
@@ -5000,147 +6107,215 @@ retry:
}
return lasttok = NAME;
}
-}
-
-/* node_common --- common code for allocating a new node */
-static NODE *
-node_common(NODETYPE op)
-{
- register NODE *r;
-
- getnode(r);
- r->type = op;
- r->flags = MALLOC;
- /* if lookahead is a NL, lineno is 1 too high */
- if (lexeme && lexeme >= lexptr_begin && *lexeme == '\n')
- r->source_line = sourceline - 1;
- else
- r->source_line = sourceline;
- r->source_file = source;
- return r;
+#undef GET_INSTRUCTION
+#undef NEWLINE_EOF
}
-/* node --- allocates a node with defined lnode and rnode. */
+/* mk_symbol --- allocates a symbol for the symbol table. */
NODE *
-node(NODE *left, NODETYPE op, NODE *right)
+mk_symbol(NODETYPE type, NODE *value)
{
- register NODE *r;
+ NODE *r;
- r = node_common(op);
- r->lnode = left;
- r->rnode = right;
+ getnode(r);
+ r->type = type;
+ r->flags = MALLOC;
+ r->lnode = value;
+ r->rnode = NULL;
+ r->var_assign = (Func_ptr) 0;
return r;
}
-/* snode --- allocate a node with defined subnode and builtin for builtin
- functions. Checks for arg. count and supplies defaults where
- possible. */
+/* snode --- instructions for builtin functions. Checks for arg. count
+ and supplies defaults where possible. */
-static NODE *
-snode(NODE *subn, NODETYPE op, int idx)
+static INSTRUCTION *
+snode(INSTRUCTION *subn, INSTRUCTION *r)
{
- register NODE *r;
- register NODE *n;
+ INSTRUCTION *arg;
+ INSTRUCTION *ip;
+ NODE *n;
int nexp = 0;
int args_allowed;
+ int idx = r->builtin_idx;
+
+ if (subn != NULL) {
+ INSTRUCTION *tp;
+ for (tp = subn->nexti; tp; tp = tp->nexti) {
+ /* assert(tp->opcode == Op_list); */
+ tp = tp->lasti;
+ nexp++;
+ }
+ assert(nexp > 0);
+ }
- r = node_common(op);
-
- /* traverse expression list to see how many args. given */
- for (n = subn; n != NULL; n = n->rnode) {
- nexp++;
- if (nexp > 5)
- break;
- }
+ r->builtin = tokentab[idx].ptr;
/* check against how many args. are allowed for this builtin */
args_allowed = tokentab[idx].flags & ARGS;
- if (args_allowed && (args_allowed & A(nexp)) == 0)
- fatal(_("%d is invalid as number of arguments for %s"),
+ if (args_allowed && (args_allowed & A(nexp)) == 0) {
+ yyerror(_("%d is invalid as number of arguments for %s"),
nexp, tokentab[idx].operator);
-
- r->builtin = tokentab[idx].ptr;
+ return NULL;
+ }
/* special case processing for a few builtins */
- if (nexp == 0 && r->builtin == do_length) {
- subn = node(node(make_number(0.0), Node_field_spec, (NODE *) NULL),
- Node_expression_list,
- (NODE *) NULL);
+ if (r->builtin == do_length) {
+ if (nexp == 0) {
+ INSTRUCTION *list; /* no args. Use $0 */
+
+ r->expr_count = 1;
+ list = list_create(r);
+ (void) list_prepend(list, instruction(Op_field_spec));
+ (void) list_prepend(list, instruction(Op_push_i));
+ list->nexti->memory = mk_number((AWKNUM) 0.0, (PERM|NUMCUR|NUMBER));
+ return list;
+ }
} else if (r->builtin == do_match) {
static short warned = FALSE;
- if (subn->rnode->lnode->type != Node_regex)
- subn->rnode->lnode = mk_rexp(subn->rnode->lnode);
+ arg = subn->nexti->lasti->nexti; /* 2nd arg list */
+ (void) mk_rexp(arg);
- if (subn->rnode->rnode != NULL) { /* 3rd argument there */
+ if (nexp == 3) { /* 3rd argument there */
if (do_lint && ! warned) {
warned = TRUE;
lintwarn(_("match: third argument is a gawk extension"));
}
- if (do_traditional)
- fatal(_("match: third argument is a gawk extension"));
+ if (do_traditional) {
+ yyerror(_("match: third argument is a gawk extension"));
+ return NULL;
+ }
+
+ arg = arg->lasti->nexti; /* third arg list */
+ ip = arg->lasti;
+ if (/*ip == arg->nexti && */ ip->opcode == Op_push)
+ ip->opcode = Op_push_array;
}
} else if (r->builtin == do_sub || r->builtin == do_gsub) {
- if (subn->lnode->type != Node_regex)
- subn->lnode = mk_rexp(subn->lnode);
- if (nexp == 2)
- append_right(subn, node(node(make_number(0.0),
- Node_field_spec,
- (NODE *) NULL),
- Node_expression_list,
- (NODE *) NULL));
- else if (subn->rnode->rnode->lnode->type == Node_val) {
+ int literal = FALSE;
+
+ arg = subn->nexti; /* first arg list */
+ (void) mk_rexp(arg);
+
+ arg = arg->lasti->nexti; /* 2nd arg list */
+ if (nexp == 2) {
+ INSTRUCTION *expr;
+ expr = list_create(instruction(Op_push_i));
+ expr->nexti->memory = mk_number((AWKNUM) 0.0, (PERM|NUMCUR|NUMBER));
+ (void) mk_expression_list(subn,
+ list_append(expr, instruction(Op_field_spec)));
+ }
+
+ arg = arg->lasti->nexti; /* third arg list */
+ ip = arg->lasti;
+ if (ip->opcode == Op_push_i) {
if (do_lint)
lintwarn(_("%s: string literal as last arg of substitute has no effect"),
(r->builtin == do_sub) ? "sub" : "gsub");
- } else if (! isassignable(subn->rnode->rnode->lnode)) {
- yyerror(_("%s third parameter is not a changeable object"),
- (r->builtin == do_sub) ? "sub" : "gsub");
+ literal = TRUE;
+ } else {
+ if (make_assignable(ip) == NULL)
+ yyerror(_("%s third parameter is not a changeable object"),
+ (r->builtin == do_sub) ? "sub" : "gsub");
+ else
+ ip->do_reference = TRUE;
}
+
+ /* kludge: This is one of the few cases
+ * when we need to know the type of item on stack.
+ * In case of string literal as the last argument,
+ * pass 4 as # of args (See sub_common code in builtin.c).
+ * Other cases like length(array or scalar) seem
+ * to work out ok.
+ */
+
+ r->expr_count = count_expressions(&subn, FALSE) + !!literal;
+ ip = subn->lasti;
+
+ (void) list_append(subn, r);
+
+ /* add after_assign bytecode(s) */
+ if (ip->opcode == Op_push_lhs && ip->memory->type == Node_var && ip->memory->var_assign) {
+ (void) list_append(subn, instruction(Op_var_assign));
+ subn->lasti->memory = ip->memory;
+ } else if (ip->opcode == Op_field_spec_lhs) {
+ (void) list_append(subn, instruction(Op_field_assign));
+ subn->lasti->field_assign = (Func_ptr) 0;
+ ip->target_assign = subn->lasti;
+ }
+ return subn;
} else if (r->builtin == do_gensub) {
- if (subn->lnode->type != Node_regex)
- subn->lnode = mk_rexp(subn->lnode);
- if (nexp == 3)
- append_right(subn, node(node(make_number(0.0),
- Node_field_spec,
- (NODE *) NULL),
- Node_expression_list,
- (NODE *) NULL));
+ if (nexp == 3) {
+ arg = subn->nexti->lasti->nexti->lasti->nexti; /* 3rd arg list */
+ ip = instruction(Op_push_i);
+ ip->memory = mk_number((AWKNUM) 0.0, (PERM|NUMCUR|NUMBER));
+ (void) mk_expression_list(subn,
+ list_append(list_create(ip),
+ instruction(Op_field_spec)));
+ }
+ arg = subn->nexti; /* first arg list */
+ (void) mk_rexp(arg);
} else if (r->builtin == do_split) {
+ arg = subn->nexti->lasti->nexti; /* 2nd arg list */
+ ip = arg->lasti;
+ if (ip->opcode == Op_push)
+ ip->opcode = Op_push_array;
+ if (nexp == 2) {
+ INSTRUCTION *expr;
+ expr = list_create(instruction(Op_push));
+ expr->nexti->memory = FS_node;
+ (void) mk_expression_list(subn, expr);
+ }
+ arg = arg->lasti->nexti;
+ n = mk_rexp(arg);
if (nexp == 2)
- append_right(subn,
- node(FS_node, Node_expression_list, (NODE *) NULL));
- n = subn->rnode->rnode->lnode;
- if (n->type != Node_regex)
- subn->rnode->rnode->lnode = mk_rexp(n);
- if (nexp == 2)
- subn->rnode->rnode->lnode->re_flags |= FS_DFLT;
+ n->re_flags |= FS_DFLT;
+ if (nexp == 4) {
+ arg = arg->lasti->nexti;
+ ip = arg->lasti;
+ if (ip->opcode == Op_push)
+ ip->opcode = Op_push_array;
+ }
} else if (r->builtin == do_patsplit) {
- if (nexp == 2)
- append_right(subn,
- node(FPAT_node, Node_expression_list, (NODE *) NULL));
- n = subn->rnode->rnode->lnode;
- if (n->type != Node_regex)
- subn->rnode->rnode->lnode = mk_rexp(n);
+ arg = subn->nexti->lasti->nexti; /* 2nd arg list */
+ ip = arg->lasti;
+ if (ip->opcode == Op_push)
+ ip->opcode = Op_push_array;
+ if (nexp == 2) {
+ INSTRUCTION *expr;
+ expr = list_create(instruction(Op_push));
+ expr->nexti->memory = FPAT_node;
+ (void) mk_expression_list(subn, expr);
+ }
+ arg = arg->lasti->nexti;
+ n = mk_rexp(arg);
+ if (nexp == 4) {
+ arg = arg->lasti->nexti;
+ ip = arg->lasti;
+ if (ip->opcode == Op_push)
+ ip->opcode = Op_push_array;
+ }
} else if (r->builtin == do_close) {
static short warned = FALSE;
-
- if ( nexp == 2) {
- if (do_lint && nexp == 2 && ! warned) {
+ if (nexp == 2) {
+ if (do_lint && ! warned) {
warned = TRUE;
lintwarn(_("close: second argument is a gawk extension"));
}
- if (do_traditional)
- fatal(_("close: second argument is a gawk extension"));
+ if (do_traditional) {
+ yyerror(_("close: second argument is a gawk extension"));
+ return NULL;
+ }
}
} else if (do_intl /* --gen-po */
&& r->builtin == do_dcgettext /* dcgettext(...) */
- && subn->lnode->type == Node_val /* 1st arg is constant */
- && (subn->lnode->flags & STRCUR) != 0) { /* it's a string constant */
+ && subn->nexti->lasti->opcode == Op_push_i /* 1st arg is constant */
+ && (subn->nexti->lasti->memory->flags & STRCUR) != 0) { /* it's a string constant */
/* ala xgettext, dcgettext("some string" ...) dumps the string */
- NODE *str = subn->lnode;
+ NODE *str = subn->nexti->lasti->memory;
if ((str->flags & INTLSTR) != 0)
warning(_("use of dcgettext(_\"...\") is incorrect: remove leading underscore"));
@@ -5149,45 +6324,65 @@ snode(NODE *subn, NODETYPE op, int idx)
dumpintlstr(str->stptr, str->stlen);
} else if (do_intl /* --gen-po */
&& r->builtin == do_dcngettext /* dcngettext(...) */
- && subn->lnode->type == Node_val /* 1st arg is constant */
- && (subn->lnode->flags & STRCUR) != 0 /* it's a string constant */
- && subn->rnode->lnode->type == Node_val /* 2nd arg is constant too */
- && (subn->rnode->lnode->flags & STRCUR) != 0) { /* it's a string constant */
+ && subn->nexti->lasti->opcode == Op_push_i /* 1st arg is constant */
+ && (subn->nexti->lasti->memory->flags & STRCUR) != 0 /* it's a string constant */
+ && subn->nexti->lasti->nexti->lasti->opcode == Op_push_i /* 2nd arg is constant too */
+ && (subn->nexti->lasti->nexti->lasti->memory->flags & STRCUR) != 0) { /* it's a string constant */
/* ala xgettext, dcngettext("some string", "some plural" ...) dumps the string */
- NODE *str1 = subn->lnode;
- NODE *str2 = subn->rnode->lnode;
+ NODE *str1 = subn->nexti->lasti->memory;
+ NODE *str2 = subn->nexti->lasti->nexti->lasti->memory;
if (((str1->flags | str2->flags) & INTLSTR) != 0)
warning(_("use of dcngettext(_\"...\") is incorrect: remove leading underscore"));
else
dumpintlstr2(str1->stptr, str1->stlen, str2->stptr, str2->stlen);
+ } else if (r->builtin == do_asort || r->builtin == do_asorti) {
+ arg = subn->nexti; /* 1st arg list */
+ ip = arg->lasti;
+ if (/* ip == arg->nexti && */ ip->opcode == Op_push)
+ ip->opcode = Op_push_array;
+ if (nexp == 2) {
+ arg = ip->nexti;
+ ip = arg->lasti;
+ if (/* ip == arg->nexti && */ ip->opcode == Op_push)
+ ip->opcode = Op_push_array;
+ }
}
+#ifdef ARRAYDEBUG
+ else if (r->builtin == do_adump) {
+ ip = subn->nexti->lasti;
+ if (ip->opcode == Op_push)
+ ip->opcode = Op_push_array;
+ }
+#endif
- r->subnode = subn;
- if (r->builtin == do_sprintf) {
- count_args(r);
- if (r->lnode != NULL) /* r->lnode set from subn. guard against syntax errors & check it's valid */
- r->lnode->printf_count = r->printf_count; /* hack */
+ if (subn != NULL) {
+ r->expr_count = count_expressions(&subn, FALSE);
+ return list_append(subn, r);
}
- return r;
+
+ r->expr_count = 0;
+ return list_create(r);
}
-/* make_for_loop --- build a for loop */
+/* append_param --- append PNAME to the list of parameters
+ * for the current function.
+ */
-static NODE *
-make_for_loop(NODE *init, NODE *cond, NODE *incr)
+static void
+append_param(char *pname)
{
- register FOR_LOOP_HEADER *r;
- NODE *n;
+ static NODE *savetail = NULL;
+ NODE *p;
- emalloc(r, FOR_LOOP_HEADER *, sizeof(FOR_LOOP_HEADER), "make_for_loop");
- getnode(n);
- n->type = Node_illegal;
- r->init = init;
- r->cond = cond;
- r->incr = incr;
- n->sub.nodep.r.hd = r;
- return n;
+ p = make_param(pname);
+ if (func_params == NULL) {
+ func_params = p;
+ savetail = p;
+ } else if (savetail != NULL) {
+ savetail->rnode = p;
+ savetail = p;
+ }
}
/* dup_parms --- return TRUE if there are duplicate parameters */
@@ -5195,7 +6390,7 @@ make_for_loop(NODE *init, NODE *cond, NODE *incr)
static int
dup_parms(NODE *func)
{
- register NODE *np;
+ NODE *np;
const char *fname, **names;
int count, i, j, dups;
NODE *params;
@@ -5218,7 +6413,7 @@ dup_parms(NODE *func)
i = 0;
for (np = params; np != NULL; np = np->rnode) {
if (np->param == NULL) { /* error earlier, give up, go home */
- free(names);
+ efree(names);
return TRUE;
}
names[i++] = np->param;
@@ -5231,36 +6426,45 @@ dup_parms(NODE *func)
dups++;
error(
_("function `%s': parameter #%d, `%s', duplicates parameter #%d"),
- fname, i+1, names[j], j+1);
+ fname, i + 1, names[j], j+1);
}
}
}
- free(names);
+ efree(names);
return (dups > 0 ? TRUE : FALSE);
}
/* parms_shadow --- check if parameters shadow globals */
static int
-parms_shadow(const char *fname, NODE *func)
+parms_shadow(INSTRUCTION *pc, int *shadow)
{
- int count, i;
+ int pcount, i;
int ret = FALSE;
+ NODE *func;
+ char *fname;
+ func = pc->func_body;
+ fname = func->lnode->param;
+
+#if 0 /* can't happen, already exited if error ? */
if (fname == NULL || func == NULL) /* error earlier */
return FALSE;
+#endif
- count = func->lnode->param_cnt;
+ pcount = func->lnode->param_cnt;
- if (count == 0) /* no args, no problem */
- return FALSE;
+ if (pcount == 0) /* no args, no problem */
+ return 0;
+ source = pc->source_file;
+ sourceline = pc->source_line;
/*
* Use warning() and not lintwarn() so that can warn
* about all shadowed parameters.
*/
- for (i = 0; i < count; i++) {
+ for (i = 0; i < pcount; i++) {
if (lookup(func->parmlist[i]) != NULL) {
warning(
_("function `%s': parameter `%s' shadows global variable"),
@@ -5269,21 +6473,27 @@ parms_shadow(const char *fname, NODE *func)
}
}
- return ret;
+ *shadow |= ret;
+ return 0;
}
+
/*
- * install:
+ * install_symbol:
* Install a name in the symbol table, even if it is already there.
* Caller must check against redefinition if that is desired.
*/
+
NODE *
-install(char *name, NODE *value)
+install_symbol(char *name, NODE *value)
{
- register NODE *hp;
- register size_t len;
- register int bucket;
+ NODE *hp;
+ size_t len;
+ int bucket;
+
+ if (install_func)
+ (*install_func)(name);
var_count++;
len = strlen(name);
@@ -5299,27 +6509,26 @@ install(char *name, NODE *value)
return hp->hvalue;
}
-/* lookup --- find the most recent hash node for name installed by install */
+/* lookup --- find the most recent hash node for name installed by install_symbol */
NODE *
lookup(const char *name)
{
- register NODE *bucket;
- register size_t len;
+ NODE *bucket;
+ size_t len;
len = strlen(name);
for (bucket = variables[hash(name, len, (unsigned long) HASHSIZE, NULL)];
bucket != NULL; bucket = bucket->hnext)
if (bucket->hlength == len && STREQN(bucket->hname, name, len))
return bucket->hvalue;
-
return NULL;
}
-/* var_comp --- compare two variable names */
+/* sym_comp --- compare two symbol (variable or function) names */
static int
-var_comp(const void *v1, const void *v2)
+sym_comp(const void *v1, const void *v2)
{
const NODE *const *npp1, *const *npp2;
const NODE *n1, *n2;
@@ -5340,77 +6549,90 @@ var_comp(const void *v1, const void *v2)
/* valinfo --- dump var info */
-static void
-valinfo(NODE *n, FILE *fp)
+void
+valinfo(NODE *n, int (*print_func)(FILE *, const char *, ...), FILE *fp)
{
- if (n->flags & STRING) {
- fprintf(fp, "string (");
- pp_string_fp(fp, n->stptr, n->stlen, '"', FALSE);
- fprintf(fp, ")\n");
+ if (n == Nnull_string)
+ print_func(fp, "uninitialized scalar\n");
+ else if (n->flags & STRING) {
+ pp_string_fp(print_func, fp, n->stptr, n->stlen, '"', FALSE);
+ print_func(fp, "\n");
} else if (n->flags & NUMBER)
- fprintf(fp, "number (%.17g)\n", n->numbr);
+ print_func(fp, "%.17g\n", n->numbr);
else if (n->flags & STRCUR) {
- fprintf(fp, "string value (");
- pp_string_fp(fp, n->stptr, n->stlen, '"', FALSE);
- fprintf(fp, ")\n");
+ pp_string_fp(print_func, fp, n->stptr, n->stlen, '"', FALSE);
+ print_func(fp, "\n");
} else if (n->flags & NUMCUR)
- fprintf(fp, "number value (%.17g)\n", n->numbr);
+ print_func(fp, "%.17g\n", n->numbr);
else
- fprintf(fp, "?? flags %s\n", flags2str(n->flags));
+ print_func(fp, "?? flags %s\n", flags2str(n->flags));
}
+/* get_varlist --- list of global variables */
-/* dump_vars --- dump the symbol table */
-
-void
-dump_vars(const char *fname)
+NODE **
+get_varlist()
{
int i, j;
NODE **table;
NODE *p;
- FILE *fp;
-
- emalloc(table, NODE **, var_count * sizeof(NODE *), "dump_vars");
-
- if (fname == NULL)
- fp = stderr;
- else if ((fp = fopen(fname, "w")) == NULL) {
- warning(_("could not open `%s' for writing (%s)"), fname, strerror(errno));
- warning(_("sending profile to standard error"));
- fp = stderr;
- }
+ emalloc(table, NODE **, (var_count + 1) * sizeof(NODE *), "get_varlist");
+ update_global_values();
for (i = j = 0; i < HASHSIZE; i++)
for (p = variables[i]; p != NULL; p = p->hnext)
table[j++] = p;
-
assert(j == var_count);
/* Shazzam! */
- qsort(table, j, sizeof(NODE *), var_comp);
+ qsort(table, j, sizeof(NODE *), sym_comp);
+
+ table[j] = NULL;
+ return table;
+}
- for (i = 0; i < j; i++) {
- p = table[i];
+/* print_vars --- print names and values of global variables */
+
+void
+print_vars(int (*print_func)(FILE *, const char *, ...), FILE *fp)
+{
+ int i;
+ NODE **table;
+ NODE *p;
+
+ table = get_varlist();
+ for (i = 0; (p = table[i]) != NULL; i++) {
if (p->hvalue->type == Node_func)
continue;
- fprintf(fp, "%.*s: ", (int) p->hlength, p->hname);
+ print_func(fp, "%.*s: ", (int) p->hlength, p->hname);
if (p->hvalue->type == Node_var_array)
- fprintf(fp, "array, %ld elements\n", p->hvalue->table_size);
+ print_func(fp, "array, %ld elements\n", p->hvalue->table_size);
else if (p->hvalue->type == Node_var_new)
- fprintf(fp, "unused variable\n");
+ print_func(fp, "untyped variable\n");
else if (p->hvalue->type == Node_var)
- valinfo(p->hvalue->var_value, fp);
- else {
- NODE **lhs = get_lhs(p->hvalue, NULL, FALSE);
+ valinfo(p->hvalue->var_value, print_func, fp);
+ }
+ efree(table);
+}
- valinfo(*lhs, fp);
- }
+/* dump_vars --- dump the symbol table */
+
+void
+dump_vars(const char *fname)
+{
+ FILE *fp;
+
+ if (fname == NULL)
+ fp = stderr;
+ else if ((fp = fopen(fname, "w")) == NULL) {
+ warning(_("could not open `%s' for writing (%s)"), fname, strerror(errno));
+ warning(_("sending profile to standard error"));
+ fp = stderr;
}
+ print_vars(fprintf, fp);
if (fp != stderr && fclose(fp) != 0)
warning(_("%s: close failed (%s)"), fname, strerror(errno));
-
- free(table);
}
/* release_all_vars --- free all variable memory */
@@ -5420,8 +6642,8 @@ release_all_vars()
{
int i;
NODE *p, *next;
-
- for (i = 0; i < HASHSIZE; i++)
+
+ for (i = 0; i < HASHSIZE; i++) {
for (p = variables[i]; p != NULL; p = next) {
next = p->hnext;
@@ -5429,40 +6651,14 @@ release_all_vars()
continue;
else if (p->hvalue->type == Node_var_array)
assoc_clear(p->hvalue);
- else if (p->hvalue->type != Node_var_new) {
- NODE **lhs = get_lhs(p->hvalue, NULL, FALSE);
-
- unref(*lhs);
- }
- unref(p);
- }
-}
-
-/* finfo --- for use in comparison and sorting of function names */
-
-struct finfo {
- const char *name;
- size_t nlen;
- NODE *func;
-};
-
-/* fcompare --- comparison function for qsort */
-
-static int
-fcompare(const void *p1, const void *p2)
-{
- const struct finfo *f1, *f2;
- int minlen;
-
- f1 = (const struct finfo *) p1;
- f2 = (const struct finfo *) p2;
+ else if (p->hvalue->type != Node_var_new)
+ unref(p->hvalue->var_value);
- if (f1->nlen > f2->nlen)
- minlen = f2->nlen;
- else
- minlen = f1->nlen;
-
- return strncmp(f1->name, f2->name, minlen);
+ efree(p->hname);
+ freenode(p->hvalue);
+ freenode(p);
+ }
+ }
}
/* dump_funcs --- print all functions */
@@ -5470,48 +6666,10 @@ fcompare(const void *p1, const void *p2)
void
dump_funcs()
{
- int i, j;
- NODE *p;
- struct finfo *tab = NULL;
-
- /*
- * Walk through symbol table countng functions.
- * Could be more than func_count if there are
- * extension functions.
- */
- for (i = j = 0; i < HASHSIZE; i++) {
- for (p = variables[i]; p != NULL; p = p->hnext) {
- if (p->hvalue->type == Node_func) {
- j++;
- }
- }
- }
-
- if (j == 0)
+ if (func_count <= 0)
return;
- emalloc(tab, struct finfo *, j * sizeof(struct finfo), "dump_funcs");
-
- /* now walk again, copying info */
- for (i = j = 0; i < HASHSIZE; i++) {
- for (p = variables[i]; p != NULL; p = p->hnext) {
- if (p->hvalue->type == Node_func) {
- tab[j].name = p->hname;
- tab[j].nlen = p->hlength;
- tab[j].func = p->hvalue;
- j++;
- }
- }
- }
-
-
- /* Shazzam! */
- qsort(tab, j, sizeof(struct finfo), fcompare);
-
- for (i = 0; i < j; i++)
- pp_func(tab[i].name, tab[i].nlen, tab[i].func);
-
- free(tab);
+ (void) foreach_func((int (*)(INSTRUCTION *, void *)) pp_func, TRUE, (void *) 0);
}
/* shadow_funcs --- check all functions for parameters that shadow globals */
@@ -5519,40 +6677,16 @@ dump_funcs()
void
shadow_funcs()
{
- int i, j;
- NODE *p;
- struct finfo *tab;
static int calls = 0;
int shadow = FALSE;
- if (func_count == 0)
+ if (func_count <= 0)
return;
if (calls++ != 0)
fatal(_("shadow_funcs() called twice!"));
- emalloc(tab, struct finfo *, func_count * sizeof(struct finfo), "shadow_funcs");
-
- for (i = j = 0; i < HASHSIZE; i++) {
- for (p = variables[i]; p != NULL; p = p->hnext) {
- if (p->hvalue->type == Node_func) {
- tab[j].name = p->hname;
- tab[j].nlen = p->hlength;
- tab[j].func = p->hvalue;
- j++;
- }
- }
- }
-
- assert(j == func_count);
-
- /* Shazzam! */
- qsort(tab, func_count, sizeof(struct finfo), fcompare);
-
- for (i = 0; i < j; i++)
- shadow |= parms_shadow(tab[i].name, tab[i].func);
-
- free(tab);
+ (void) foreach_func((int (*)(INSTRUCTION *, void *)) parms_shadow, TRUE, &shadow);
/* End with fatal if the user requested it. */
if (shadow && lintfunc != warning)
@@ -5560,54 +6694,6 @@ shadow_funcs()
}
/*
- * append_right:
- * Add new to the rightmost branch of LIST. This uses n^2 time, so we make
- * a simple attempt at optimizing it.
- */
-
-static NODE *
-append_right(NODE *list, NODE *new)
-{
- register NODE *oldlist;
- static NODE *savefront = NULL, *savetail = NULL;
-
- if (list == NULL || new == NULL)
- return list;
-
- oldlist = list;
- if (savefront == oldlist)
- list = savetail; /* Be careful: maybe list->rnode != NULL */
- else
- savefront = oldlist;
-
- while (list->rnode != NULL)
- list = list->rnode;
- savetail = list->rnode = new;
- return oldlist;
-}
-
-/*
- * append_pattern:
- * A wrapper around append_right, used for rule lists.
- */
-static inline NODE *
-append_pattern(NODE **list, NODE *patt)
-{
- NODE *n = node(patt, Node_rule_node, (NODE *) NULL);
-
- if (*list == NULL)
- *list = n;
- else {
- NODE *n1 = node(n, Node_rule_list, (NODE *) NULL);
- if ((*list)->type != Node_rule_list)
- *list = node(*list, Node_rule_list, n1);
- else
- (void) append_right(*list, n1);
- }
- return n;
-}
-
-/*
* func_install:
* check if name is already installed; if so, it had better have Null value,
* in which case def is added as the value. Otherwise, install name with def
@@ -5618,92 +6704,117 @@ append_pattern(NODE **list, NODE *patt)
* of each function parameter during a function call. See eval.c.
*/
-static void
-func_install(NODE *params, NODE *def)
+static int
+func_install(INSTRUCTION *func, INSTRUCTION *def)
{
- NODE *r, *n, *thisfunc;
- char **pnames, *names, *sp;
- size_t pcount = 0, space = 0;
+ NODE *params;
+ NODE *r, *n, *thisfunc, *hp;
+ char **pnames = NULL;
+ char *fname;
+ int pcount = 0;
int i;
+ params = func_params;
+
/* check for function foo(foo) { ... }. bleah. */
for (n = params->rnode; n != NULL; n = n->rnode) {
- if (strcmp(n->param, params->param) == 0)
- fatal(_("function `%s': can't use function name as parameter name"),
- params->param);
- else if (is_std_var(n->param))
- fatal(_("function `%s': can't use special variable `%s' as a function parameter"),
+ if (strcmp(n->param, params->param) == 0) {
+ error(_("function `%s': can't use function name as parameter name"),
+ params->param);
+ errcount++;
+ return -1;
+ } else if (is_std_var(n->param)) {
+ error(_("function `%s': can't use special variable `%s' as a function parameter"),
params->param, n->param);
+ errcount++;
+ return -1;
+ }
}
- thisfunc = NULL; /* turn off warnings */
+ thisfunc = NULL; /* turn off warnings */
- /* symbol table managment */
- pop_var(params, FALSE);
- r = lookup(params->param);
+ fname = params->param;
+ /* symbol table management */
+ hp = remove_symbol(params->param); /* remove function name out of symbol table */
+ if (hp != NULL)
+ freenode(hp);
+ r = lookup(fname);
if (r != NULL) {
- fatal(_("function name `%s' previously defined"), params->param);
- } else if (params->param == builtin_func) /* not a valid function name */
+ error(_("function name `%s' previously defined"), fname);
+ errcount++;
+ return -1;
+ } else if (fname == builtin_func) /* not a valid function name */
goto remove_params;
+ /* add an implicit return at end;
+ * also used by 'return' command in debugger
+ */
+
+ (void) list_append(def, instruction(Op_push_i));
+ def->lasti->memory = Nnull_string;
+ (void) list_append(def, instruction(Op_K_return));
+
+ if (do_profiling)
+ (void) list_prepend(def, instruction(Op_exec_count));
+
+ /* func->opcode is Op_func */
+ (func + 1)->firsti = def->nexti;
+ (func + 1)->lasti = def->lasti;
+ (func + 2)->first_line = func->source_line;
+ (func + 2)->last_line = lastline;
+
+ func->nexti = def->nexti;
+ bcfree(def);
+
+ (void) list_append(rule_list, func + 1); /* debugging */
+
/* install the function */
- thisfunc = node(params, Node_func, def);
- (void) install(params->param, thisfunc);
+ thisfunc = mk_symbol(Node_func, params);
+ (void) install_symbol(fname, thisfunc);
+ thisfunc->code_ptr = func;
+ func->func_body = thisfunc;
- /* figure out amount of space to allocate for variable names */
- for (n = params->rnode; n != NULL; n = n->rnode) {
+ for (n = params->rnode; n != NULL; n = n->rnode)
pcount++;
- space += strlen(n->param) + 1;
- }
- /* allocate it and fill it in */
if (pcount != 0) {
- emalloc(names, char *, space, "func_install");
- emalloc(pnames, char **, pcount * sizeof(char *), "func_install");
- sp = names;
- for (i = 0, n = params->rnode; i < pcount; i++, n = n->rnode) {
- pnames[i] = sp;
- strcpy(sp, n->param);
- sp += strlen(n->param) + 1;
- }
- thisfunc->parmlist = pnames;
- } else {
- thisfunc->parmlist = NULL;
+ emalloc(pnames, char **, (pcount + 1) * sizeof(char *), "func_install");
+ for (i = 0, n = params->rnode; i < pcount; i++, n = n->rnode)
+ pnames[i] = n->param;
+ pnames[pcount] = NULL;
}
+ thisfunc->parmlist = pnames;
/* update lint table info */
- func_use(params->param, FUNC_DEFINE);
+ func_use(fname, FUNC_DEFINE);
- func_count++; /* used by profiling / pretty printer */
+ func_count++; /* used in profiler / pretty printer */
remove_params:
/* remove params from symbol table */
pop_params(params->rnode);
+ return 0;
}
-/* pop_var --- remove a variable from the symbol table */
+/* remove_symbol --- remove a variable from the symbol table */
-static void
-pop_var(NODE *np, int freeit)
+NODE *
+remove_symbol(char *name)
{
- register NODE *bucket, **save;
- register size_t len;
- char *name;
+ NODE *bucket, **save;
+ size_t len;
- name = np->param;
len = strlen(name);
save = &(variables[hash(name, len, (unsigned long) HASHSIZE, NULL)]);
for (bucket = *save; bucket != NULL; bucket = bucket->hnext) {
if (len == bucket->hlength && STREQN(bucket->hname, name, len)) {
var_count--;
*save = bucket->hnext;
- freenode(bucket);
- if (freeit)
- free(np->param);
- return;
+ return bucket;
}
save = &(bucket->hnext);
}
+ return NULL;
}
/* pop_params --- remove list of function parameters from symbol table */
@@ -5715,10 +6826,13 @@ pop_var(NODE *np, int freeit)
static void
pop_params(NODE *params)
{
+ NODE *hp;
if (params == NULL)
return;
pop_params(params->rnode);
- pop_var(params, TRUE);
+ hp = remove_symbol(params->param);
+ if (hp != NULL)
+ freenode(hp);
}
/* make_param --- make NAME into a function parameter */
@@ -5731,9 +6845,8 @@ make_param(char *name)
getnode(r);
r->type = Node_param_list;
r->rnode = NULL;
- r->param = name;
r->param_cnt = param_counter++;
- return (install(name, r));
+ return (install_symbol(name, r));
}
static struct fdesc {
@@ -5787,6 +6900,9 @@ check_funcs()
struct fdesc *fp, *next;
int i;
+ if (get_context()->level > 0)
+ goto free_mem;
+
for (i = 0; i < HASHSIZE; i++) {
for (fp = ftable[i]; fp != NULL; fp = fp->next) {
#ifdef REALLYMEAN
@@ -5808,29 +6924,98 @@ check_funcs()
}
}
+free_mem:
/* now let's free all the memory */
for (i = 0; i < HASHSIZE; i++) {
for (fp = ftable[i]; fp != NULL; fp = next) {
next = fp->next;
- free(fp->name);
- free(fp);
+ efree(fp->name);
+ efree(fp);
}
+ ftable[i] = NULL;
}
}
/* param_sanity --- look for parameters that are regexp constants */
static void
-param_sanity(NODE *arglist)
+param_sanity(INSTRUCTION *arglist)
{
- NODE *argp, *arg;
- int i;
+ INSTRUCTION *argl, *arg;
+ int i = 1;
- for (i = 1, argp = arglist; argp != NULL; argp = argp->rnode, i++) {
- arg = argp->lnode;
- if (arg->type == Node_regex)
+ if (arglist == NULL)
+ return;
+ for (argl = arglist->nexti; argl; ) {
+ arg = argl->lasti;
+ if (arg->opcode == Op_match_rec)
warning(_("regexp constant for parameter #%d yields boolean value"), i);
+ argl = arg->nexti;
+ i++;
+ }
+}
+
+/* foreach_func --- execute given function for each awk function in symbol table. */
+
+int
+foreach_func(int (*pfunc)(INSTRUCTION *, void *), int sort, void *data)
+{
+ int i, j;
+ NODE *p;
+ int ret = 0;
+
+ if (sort) {
+ NODE **tab;
+
+ /*
+ * Walk through symbol table counting functions.
+ * Could be more than func_count if there are
+ * extension functions.
+ */
+ for (i = j = 0; i < HASHSIZE; i++) {
+ for (p = variables[i]; p != NULL; p = p->hnext) {
+ if (p->hvalue->type == Node_func) {
+ j++;
+ }
+ }
+ }
+
+ if (j == 0)
+ return 0;
+
+ emalloc(tab, NODE **, j * sizeof(NODE *), "foreach_func");
+
+ /* now walk again, copying info */
+ for (i = j = 0; i < HASHSIZE; i++) {
+ for (p = variables[i]; p != NULL; p = p->hnext) {
+ if (p->hvalue->type == Node_func) {
+ tab[j] = p;
+ j++;
+ }
+ }
+ }
+
+ /* Shazzam! */
+ qsort(tab, j, sizeof(NODE *), sym_comp);
+
+ for (i = 0; i < j; i++) {
+ if ((ret = pfunc(tab[i]->hvalue->code_ptr, data)) != 0)
+ break;
+ }
+
+ efree(tab);
+ return ret;
}
+
+ /* unsorted */
+ for (i = 0; i < HASHSIZE; i++) {
+ for (p = variables[i]; p != NULL; p = p->hnext) {
+ if (p->hvalue->type == Node_func
+ && (ret = pfunc(p->hvalue->code_ptr, data)) != 0)
+ return ret;
+ }
+ }
+ return 0;
}
/* deferred variables --- those that are only defined if needed. */
@@ -5867,33 +7052,31 @@ register_deferred_variable(const char *name, NODE *(*load_func)(void))
/* variable --- make sure NAME is in the symbol table */
NODE *
-variable(char *name, int can_free, NODETYPE type)
+variable(char *name, NODETYPE type)
{
- register NODE *r;
+ NODE *r;
if ((r = lookup(name)) != NULL) {
- if (r->type == Node_func)
- fatal(_("function `%s' called with space between name and `(',\nor used as a variable or an array"),
+ if (r->type == Node_func) {
+ error(_("function `%s' called with space between name and `(',\nor used as a variable or an array"),
r->vname);
-
+ errcount++;
+ r->type = Node_var_new; /* continue parsing instead of exiting */
+ }
} else {
/* not found */
struct deferred_variable *dv;
for (dv = deferred_variables; TRUE; dv = dv->next) {
if (dv == NULL) {
- /*
- * This is the only case in which we may not
- * free the string.
- */
- NODE *n;
-
- if (type == Node_var_array)
- n = node(NULL, type, NULL);
+ /*
+ * This is the only case in which we may not free the string.
+ */
+ if (type == Node_var)
+ r = mk_symbol(type, Nnull_string);
else
- n = node(Nnull_string, type, NULL);
-
- return install(name, n);
+ r = mk_symbol(type, (NODE *) NULL);
+ return install_symbol(name, r);
}
if (STREQ(name, dv->name)) {
r = (*dv->load_func)();
@@ -5901,31 +7084,55 @@ variable(char *name, int can_free, NODETYPE type)
}
}
}
- if (can_free)
- free(name);
+ efree(name);
return r;
}
-/* mk_rexp --- make a regular expression constant */
+/* make_regnode --- make a regular expression node */
static NODE *
-mk_rexp(NODE *exp)
+make_regnode(int type, NODE *exp)
{
NODE *n;
- if (exp->type == Node_regex)
- return exp;
-
getnode(n);
- n->type = Node_dynregex;
- n->re_exp = exp;
- n->re_text = NULL;
- n->re_reg = NULL;
- n->re_flags = 0;
+ memset(n, 0, sizeof(NODE));
+ n->type = type;
n->re_cnt = 1;
+
+ if (type == Node_regex) {
+ n->re_reg = make_regexp(exp->stptr, exp->stlen, FALSE, TRUE, FALSE);
+ if (n->re_reg == NULL) {
+ freenode(n);
+ return NULL;
+ }
+ n->re_exp = exp;
+ n->re_flags = CONSTANT;
+ }
return n;
}
+
+/* mk_rexp --- make a regular expression constant */
+
+static NODE *
+mk_rexp(INSTRUCTION *list)
+{
+ INSTRUCTION *ip;
+
+ ip = list->nexti;
+ if (ip == list->lasti && ip->opcode == Op_match_rec)
+ ip->opcode = Op_push_re;
+ else {
+ ip = instruction(Op_push_re);
+ ip->memory = make_regnode(Node_dynregex, NULL);
+ ip->nexti = list->lasti->nexti;
+ list->lasti->nexti = ip;
+ list->lasti = ip;
+ }
+ return ip->memory;
+}
+
/* isnoeffect --- when used as a statement, has no side effects */
/*
@@ -5936,48 +7143,38 @@ mk_rexp(NODE *exp)
*/
static int
-isnoeffect(NODETYPE type)
+isnoeffect(OPCODE type)
{
switch (type) {
- case Node_times:
- case Node_quotient:
- case Node_mod:
- case Node_plus:
- case Node_minus:
- case Node_subscript:
- case Node_concat:
- case Node_exp:
- case Node_unary_minus:
- case Node_field_spec:
- case Node_and:
- case Node_or:
- case Node_equal:
- case Node_notequal:
- case Node_less:
- case Node_greater:
- case Node_leq:
- case Node_geq:
- case Node_match:
- case Node_nomatch:
- case Node_not:
- case Node_val:
- case Node_in_array:
- case Node_NF:
- case Node_NR:
- case Node_FNR:
- case Node_FPAT:
- case Node_FS:
- case Node_RS:
- case Node_FIELDWIDTHS:
- case Node_IGNORECASE:
- case Node_OFS:
- case Node_ORS:
- case Node_OFMT:
- case Node_CONVFMT:
- case Node_BINMODE:
- case Node_LINT:
- case Node_SUBSEP:
- case Node_TEXTDOMAIN:
+ case Op_times:
+ case Op_times_i:
+ case Op_quotient:
+ case Op_quotient_i:
+ case Op_mod:
+ case Op_mod_i:
+ case Op_plus:
+ case Op_plus_i:
+ case Op_minus:
+ case Op_minus_i:
+ case Op_subscript:
+ case Op_concat:
+ case Op_exp:
+ case Op_exp_i:
+ case Op_unary_minus:
+ case Op_field_spec:
+ case Op_and_final:
+ case Op_or_final:
+ case Op_equal:
+ case Op_notequal:
+ case Op_less:
+ case Op_greater:
+ case Op_leq:
+ case Op_geq:
+ case Op_match:
+ case Op_nomatch:
+ case Op_match_rec:
+ case Op_not:
+ case Op_in_array:
return TRUE;
default:
break; /* keeps gcc -Wall happy */
@@ -5986,45 +7183,34 @@ isnoeffect(NODETYPE type)
return FALSE;
}
-/* isassignable --- can this node be assigned to? */
+/* make_assignable --- make this operand an assignable one if posiible */
-static int
-isassignable(register NODE *n)
+static INSTRUCTION *
+make_assignable(INSTRUCTION *ip)
{
- switch (n->type) {
- case Node_var_new:
- case Node_var:
- case Node_FIELDWIDTHS:
- case Node_RS:
- case Node_FS:
- case Node_FNR:
- case Node_FPAT:
- case Node_NR:
- case Node_NF:
- case Node_IGNORECASE:
- case Node_OFMT:
- case Node_CONVFMT:
- case Node_ORS:
- case Node_OFS:
- case Node_LINT:
- case Node_BINMODE:
- case Node_SUBSEP:
- case Node_TEXTDOMAIN:
- case Node_field_spec:
- case Node_subscript:
- return TRUE;
- case Node_param_list:
- return ((n->flags & FUNC) == 0); /* ok if not func name */
+ switch (ip->opcode) {
+ case Op_push:
+ if (ip->memory->type == Node_param_list
+ && (ip->memory->flags & FUNC) != 0)
+ return NULL;
+ ip->opcode = Op_push_lhs;
+ return ip;
+ case Op_field_spec:
+ ip->opcode = Op_field_spec_lhs;
+ return ip;
+ case Op_subscript:
+ ip->opcode = Op_subscript_lhs;
+ return ip;
default:
break; /* keeps gcc -Wall happy */
}
- return FALSE;
+ return NULL;
}
/* stopme --- for debugging */
NODE *
-stopme(NODE *tree ATTRIBUTE_UNUSED)
+stopme(int nargs ATTRIBUTE_UNUSED)
{
return (NODE *) 0;
}
@@ -6046,7 +7232,7 @@ dumpintlstr(const char *str, size_t len)
}
printf("msgid ");
- pp_string_fp(stdout, str, len, '"', TRUE);
+ pp_string_fp(fprintf, stdout, str, len, '"', TRUE);
putchar('\n');
printf("msgstr \"\"\n\n");
fflush(stdout);
@@ -6069,35 +7255,15 @@ dumpintlstr2(const char *str1, size_t len1, const char *str2, size_t len2)
}
printf("msgid ");
- pp_string_fp(stdout, str1, len1, '"', TRUE);
+ pp_string_fp(fprintf, stdout, str1, len1, '"', TRUE);
putchar('\n');
printf("msgid_plural ");
- pp_string_fp(stdout, str2, len2, '"', TRUE);
+ pp_string_fp(fprintf, stdout, str2, len2, '"', TRUE);
putchar('\n');
printf("msgstr[0] \"\"\nmsgstr[1] \"\"\n\n");
fflush(stdout);
}
-/* count_args --- count the number of printf arguments */
-
-static void
-count_args(NODE *tree)
-{
- size_t count = 0;
- NODE *save_tree;
-
- assert(tree->type == Node_K_printf
- || (tree->type == Node_builtin && tree->builtin == do_sprintf));
- save_tree = tree;
-
- tree = tree->lnode; /* printf format string */
-
- for (count = 0; tree != NULL; tree = tree->rnode)
- count++;
-
- save_tree->printf_count = count;
-}
-
/* isarray --- can this type be subscripted? */
static int
@@ -6119,6 +7285,1194 @@ isarray(NODE *n)
return FALSE;
}
+
+static INSTRUCTION *
+mk_binary(INSTRUCTION *s1, INSTRUCTION *s2, INSTRUCTION *op)
+{
+ INSTRUCTION *ip,*ip1;
+ AWKNUM res;
+
+ ip = s2->nexti;
+ if (s2->lasti == ip && ip->opcode == Op_push_i) {
+ /* do any numeric constant folding */
+ ip1 = s1->nexti;
+ if (ip1->memory != NULL && ip1->memory->type == Node_val
+ && (ip1->memory->flags & (STRCUR|STRING)) == 0
+ && ip->memory != NULL && ip->memory->type == Node_val
+ && (ip->memory->flags & (STRCUR|STRING)) == 0
+ && ip1 == s1->lasti && do_optimize > 1) {
+ ip1->memory->numbr = force_number(ip1->memory);
+ ip->memory->numbr = force_number(ip->memory);
+ res = ip1->memory->numbr;
+ switch (op->opcode) {
+ case Op_times:
+ res *= ip->memory->numbr;
+ break;
+ case Op_quotient:
+ if (ip->memory->numbr == 0) {
+ /* don't fatalize, allow parsing rest of the input */
+ yyerror(_("division by zero attempted"));
+ goto regular;
+ }
+
+ res /= ip->memory->numbr;
+ break;
+ case Op_mod:
+ if (ip->memory->numbr == 0) {
+ /* don't fatalize, allow parsing rest of the input */
+ yyerror(_("division by zero attempted in `%%'"));
+ goto regular;
+ }
+#ifdef HAVE_FMOD
+ res = fmod(res, ip->memory->numbr);
+#else /* ! HAVE_FMOD */
+ (void) modf(res / ip->memory->numbr, &res);
+ res = ip1->memory->numbr - res * ip->memory->numbr;
+#endif /* ! HAVE_FMOD */
+ break;
+ case Op_plus:
+ res += ip->memory->numbr;
+ break;
+ case Op_minus:
+ res -= ip->memory->numbr;
+ break;
+ case Op_exp:
+ res = calc_exp(res, ip->memory->numbr);
+ break;
+ default:
+ goto regular;
+ }
+
+ op->opcode = Op_push_i;
+ op->memory = mk_number(res, (PERM|NUMCUR|NUMBER));
+ bcfree(ip1);
+ bcfree(ip);
+ bcfree(s1);
+ bcfree(s2);
+ return list_create(op);
+ } else {
+ /* do basic arithmetic optimisation */
+ /* convert (Op_push_i Node_val) + (Op_plus) to (Op_plus_i Node_val) */
+ switch (op->opcode) {
+ case Op_times:
+ op->opcode = Op_times_i;
+ break;
+ case Op_quotient:
+ op->opcode = Op_quotient_i;
+ break;
+ case Op_mod:
+ op->opcode = Op_mod_i;
+ break;
+ case Op_plus:
+ op->opcode = Op_plus_i;
+ break;
+ case Op_minus:
+ op->opcode = Op_minus_i;
+ break;
+ case Op_exp:
+ op->opcode = Op_exp_i;
+ break;
+ default:
+ goto regular;
+ }
+
+ op->memory = ip->memory;
+ bcfree(ip);
+ bcfree(s2); /* Op_list */
+ return list_append(s1, op);
+ }
+ }
+
+regular:
+ /* append lists s1, s2 and add `op' bytecode */
+ (void) list_merge(s1, s2);
+ return list_append(s1, op);
+}
+
+/* mk_boolean --- instructions for boolean and, or */
+
+static INSTRUCTION *
+mk_boolean(INSTRUCTION *left, INSTRUCTION *right, INSTRUCTION *op)
+{
+ INSTRUCTION *tp;
+ OPCODE opc, final_opc;
+
+ opc = op->opcode; /* Op_and or Op_or */
+ final_opc = (opc == Op_or) ? Op_or_final : Op_and_final;
+
+ add_lint(right, LINT_assign_in_cond);
+
+ tp = left->lasti;
+
+ if (tp->opcode != final_opc) { /* x || y */
+ list_append(right, instruction(final_opc));
+ add_lint(left, LINT_assign_in_cond);
+ (void) list_append(left, op);
+ left->lasti->target_jmp = right->lasti;
+
+ /* NB: target_stmt points to previous Op_and(Op_or) in a chain;
+ * target_stmt only used in the parser (see below).
+ */
+
+ left->lasti->target_stmt = left->lasti;
+ right->lasti->target_stmt = left->lasti;
+ } else { /* optimization for x || y || z || ... */
+ INSTRUCTION *ip;
+
+ op->opcode = final_opc;
+ (void) list_append(right, op);
+ op->target_stmt = tp;
+ tp->opcode = opc;
+ tp->target_jmp = op;
+
+ /* update jump targets */
+ for (ip = tp->target_stmt; ; ip = ip->target_stmt) {
+ assert(ip->opcode == opc);
+ assert(ip->target_jmp == tp);
+ /* if (ip->opcode == opc && ip->target_jmp == tp) */
+ ip->target_jmp = op;
+ if (ip->target_stmt == ip)
+ break;
+ }
+ }
+
+ return list_merge(left, right);
+}
+
+/* mk_condition --- if-else and conditional */
+
+static INSTRUCTION *
+mk_condition(INSTRUCTION *cond, INSTRUCTION *ifp, INSTRUCTION *true_branch,
+ INSTRUCTION *elsep, INSTRUCTION *false_branch)
+{
+ /*
+ * ----------------
+ * cond
+ * ----------------
+ * t: [Op_jmp_false f ]
+ * ----------------
+ * true_branch
+ *
+ * ----------------
+ * [Op_jmp y]
+ * ----------------
+ * f:
+ * false_branch
+ * ----------------
+ * y: [Op_no_op]
+ * ----------------
+ */
+
+ INSTRUCTION *ip;
+
+ /* FIXME else { } -- add elsep */
+
+ if (false_branch == NULL) {
+ if (elsep != NULL) /* else { } */
+ false_branch = list_append(list_create(elsep), instruction(Op_no_op));
+ else
+ false_branch = list_create(instruction(Op_no_op));
+ } else {
+ /* assert(elsep != NULL); */
+
+ /* avoid a series of no_op's: if .. else if .. else if .. */
+ if (false_branch->lasti->opcode != Op_no_op)
+ (void) list_append(false_branch, instruction(Op_no_op));
+ (void) list_prepend(false_branch, elsep);
+ false_branch->nexti->branch_end = false_branch->lasti;
+ if (do_profiling)
+ (void) list_prepend(false_branch, instruction(Op_exec_count));
+ }
+
+ (void) list_prepend(false_branch, instruction(Op_jmp));
+ false_branch->nexti->target_jmp = false_branch->lasti;
+
+ add_lint(cond, LINT_assign_in_cond);
+ ip = list_append(cond, instruction(Op_jmp_false));
+ ip->lasti->target_jmp = false_branch->nexti->nexti;
+
+ (void) list_prepend(ip, ifp);
+ if (do_profiling) {
+ (void) list_append(ip, instruction(Op_exec_count));
+ ip->nexti->branch_if = ip->lasti;
+ ip->nexti->branch_else = false_branch->nexti;
+ }
+
+ if (true_branch != NULL)
+ list_merge(ip, true_branch);
+ return list_merge(ip, false_branch);
+}
+
+enum defline { FIRST_LINE, LAST_LINE };
+
+/* find_line -- find the first(last) line in a list of (pattern) instructions */
+
+static int
+find_line(INSTRUCTION *pattern, enum defline what)
+{
+ INSTRUCTION *ip;
+ int lineno = 0;
+
+ for (ip = pattern->nexti; ip; ip = ip->nexti) {
+ if (what == LAST_LINE) {
+ if (ip->source_line > lineno)
+ lineno = ip->source_line;
+ } else { /* FIRST_LINE */
+ if (ip->source_line > 0
+ && (lineno == 0 || ip->source_line < lineno))
+ lineno = ip->source_line;
+ }
+ if (ip == pattern->lasti)
+ break;
+ }
+ assert(lineno > 0);
+ return lineno;
+}
+
+/* append_rule --- pattern-action instructions */
+
+static INSTRUCTION *
+append_rule(INSTRUCTION *pattern, INSTRUCTION *action)
+{
+ /*
+ * ----------------
+ * pattern
+ * ----------------
+ * [Op_jmp_false f ]
+ * ----------------
+ * action
+ * ----------------
+ * f: [Op_no_op ]
+ * ----------------
+ */
+
+ INSTRUCTION *rp;
+ INSTRUCTION *tp;
+ INSTRUCTION *ip;
+
+ if (rule != Rule) {
+ rp = pattern;
+ if (do_profiling)
+ (void) list_append(action, instruction(Op_no_op));
+ (rp + 1)->firsti = action->nexti;
+ (rp + 1)->lasti = action->lasti;
+ (rp + 2)->first_line = pattern->source_line;
+ (rp + 2)->last_line = lastline;
+ ip = list_prepend(action, rp);
+
+ } else {
+ rp = bcalloc(Op_rule, 3, 0);
+ rp->in_rule = Rule;
+ rp->source_file = source;
+ tp = instruction(Op_no_op);
+
+ if (pattern == NULL) {
+ /* assert(action != NULL); */
+ if (do_profiling)
+ (void) list_prepend(action, instruction(Op_exec_count));
+ (rp + 1)->firsti = action->nexti;
+ (rp + 1)->lasti = tp;
+ (rp + 2)->first_line = firstline;
+ (rp + 2)->last_line = lastline;
+ rp->source_line = firstline;
+ ip = list_prepend(list_append(action, tp), rp);
+ } else {
+ (void) list_append(pattern, instruction(Op_jmp_false));
+ pattern->lasti->target_jmp = tp;
+ (rp + 2)->first_line = find_line(pattern, FIRST_LINE);
+ rp->source_line = (rp + 2)->first_line;
+ if (action == NULL) {
+ (rp + 2)->last_line = find_line(pattern, LAST_LINE);
+ action = list_create(instruction(Op_K_print_rec));
+ if (do_profiling)
+ (void) list_prepend(action, instruction(Op_exec_count));
+ } else
+ (rp + 2)->last_line = lastline;
+
+ if (do_profiling) {
+ (void) list_prepend(pattern, instruction(Op_exec_count));
+ (void) list_prepend(action, instruction(Op_exec_count));
+ }
+ (rp + 1)->firsti = action->nexti;
+ (rp + 1)->lasti = tp;
+ ip = list_append(
+ list_merge(list_prepend(pattern, rp),
+ action),
+ tp);
+ }
+
+ }
+
+ list_append(rule_list, rp + 1);
+
+ if (rule_block[rule] == NULL)
+ rule_block[rule] = ip;
+ else
+ (void) list_merge(rule_block[rule], ip);
+
+ return rule_block[rule];
+}
+
+/* mk_assignment --- assignment bytecodes */
+
+static INSTRUCTION *
+mk_assignment(INSTRUCTION *lhs, INSTRUCTION *rhs, INSTRUCTION *op)
+{
+ INSTRUCTION *tp;
+ INSTRUCTION *ip;
+
+ tp = lhs->lasti;
+ switch (tp->opcode) {
+ case Op_field_spec:
+ tp->opcode = Op_field_spec_lhs;
+ break;
+ case Op_subscript:
+ tp->opcode = Op_subscript_lhs;
+ break;
+ case Op_push:
+ case Op_push_array:
+ tp->opcode = Op_push_lhs;
+ break;
+ default:
+ cant_happen();
+ }
+
+ tp->do_reference = (op->opcode != Op_assign); /* check for uninitialized reference */
+
+ if (rhs != NULL)
+ ip = list_merge(rhs, lhs);
+ else
+ ip = lhs;
+
+ (void) list_append(ip, op);
+
+ if (tp->opcode == Op_push_lhs
+ && tp->memory->type == Node_var
+ && tp->memory->var_assign
+ ) {
+ tp->do_reference = FALSE; /* no uninitialized reference checking
+ * for a special variable.
+ */
+ (void) list_append(ip, instruction(Op_var_assign));
+ ip->lasti->memory = tp->memory;
+ } else if (tp->opcode == Op_field_spec_lhs) {
+ (void) list_append(ip, instruction(Op_field_assign));
+ ip->lasti->field_assign = (Func_ptr) 0;
+ tp->target_assign = ip->lasti;
+ }
+
+ return ip;
+}
+
+/* optimize_assignment --- peephole optimization for assignment */
+
+static INSTRUCTION *
+optimize_assignment(INSTRUCTION *exp)
+{
+ INSTRUCTION *i1;
+ INSTRUCTION *i2;
+ INSTRUCTION *i3;
+
+ /*
+ * Optimize assignment statements array[subs] = x; var = x; $n = x;
+ * string concatenation of the form s = s t.
+ *
+ * 1) Array element assignment array[subs] = x:
+ * Replaces Op_push_array + Op_subscript_lhs + Op_assign + Op_pop
+ * with single instruction Op_store_sub.
+ * Limitation (FIXME): 1 dimension and sub is simple var/value.
+ *
+ * 2) Simple variable assignment var = x:
+ * Replaces Op_push_lhs + Op_assign + Op_pop with Op_store_var.
+ *
+ * 3) Field assignment $n = x:
+ * Replaces Op_field_spec_lhs + Op_assign + Op_field_assign + Op_pop
+ * with Op_store_field.
+ *
+ * 4) Optimization for string concatenation:
+ * For cases like x = x y, uses realloc to include y in x;
+ * also eliminates instructions Op_push_lhs and Op_pop.
+ */
+
+ /*
+ * N.B.: do not append Op_pop instruction to the returned
+ * instruction list if optimized. None of these
+ * optimized instructions push the r-value of assignment
+ * onto the runtime stack.
+ */
+
+ i2 = NULL;
+ i1 = exp->lasti;
+
+ if ( ! do_optimize
+ || ( i1->opcode != Op_assign
+ && i1->opcode != Op_field_assign)
+ )
+ return list_append(exp, instruction(Op_pop));
+
+ for (i2 = exp->nexti; i2 != i1; i2 = i2->nexti) {
+ switch (i2->opcode) {
+ case Op_concat:
+ if (i2->nexti->opcode == Op_push_lhs /* l.h.s is a simple variable */
+ && (i2->concat_flag & CSVAR) /* 1st exp in r.h.s is a simple variable;
+ * see Op_concat in the grammer above.
+ */
+ && i2->nexti->memory == exp->nexti->memory /* and the same as in l.h.s */
+ && i2->nexti->nexti == i1
+ && i1->opcode == Op_assign
+ ) {
+ /* s = s ... optimization */
+
+ /* avoid stuff like x = x (x = y) or x = x gsub(/./, "b", x);
+ * check for l-value reference to this variable in the r.h.s.
+ * Also avoid function calls in general, to guard against
+ * global variable assignment.
+ */
+
+ for (i3 = exp->nexti->nexti; i3 != i2; i3 = i3->nexti) {
+ if ((i3->opcode == Op_push_lhs && i3->memory == i2->nexti->memory)
+ || i3->opcode == Op_func_call)
+ return list_append(exp, instruction(Op_pop)); /* no optimization */
+ }
+
+ /* remove the variable from r.h.s */
+ i3 = exp->nexti;
+ exp->nexti = i3->nexti;
+ bcfree(i3);
+
+ if (--i2->expr_count == 1) /* one less expression in Op_concat */
+ i2->opcode = Op_no_op;
+
+ i3 = i2->nexti;
+ assert(i3->opcode == Op_push_lhs);
+ i3->opcode = Op_assign_concat; /* change Op_push_lhs to Op_assign_concat */
+ i3->nexti = NULL;
+ bcfree(i1); /* Op_assign */
+ exp->lasti = i3; /* update Op_list */
+ return exp;
+ }
+ break;
+
+ case Op_field_spec_lhs:
+ if (i2->nexti->opcode == Op_assign
+ && i2->nexti->nexti == i1
+ && i1->opcode == Op_field_assign
+ ) {
+ /* $n = .. */
+ i2->opcode = Op_store_field;
+ bcfree(i2->nexti); /* Op_assign */
+ i2->nexti = NULL;
+ bcfree(i1); /* Op_field_assign */
+ exp->lasti = i2; /* update Op_list */
+ return exp;
+ }
+ break;
+
+ case Op_push_array:
+ if (i2->nexti->nexti->opcode == Op_subscript_lhs) {
+ i3 = i2->nexti->nexti;
+ if (i3->sub_count == 1
+ && i3->nexti == i1
+ && i1->opcode == Op_assign
+ ) {
+ /* array[sub] = .. */
+ i3->opcode = Op_store_sub;
+ i3->memory = i2->memory;
+ i3->expr_count = 1; /* sub_count shadows memory,
+ * so use expr_count instead.
+ */
+ i3->nexti = NULL;
+ i2->opcode = Op_no_op;
+ bcfree(i1); /* Op_assign */
+ exp->lasti = i3; /* update Op_list */
+ return exp;
+ }
+ }
+ break;
+
+ case Op_push_lhs:
+ if (i2->nexti == i1
+ && i1->opcode == Op_assign
+ ) {
+ /* var = .. */
+ i2->opcode = Op_store_var;
+ i2->nexti = NULL;
+ bcfree(i1); /* Op_assign */
+ exp->lasti = i2; /* update Op_list */
+ return exp;
+ }
+ break;
+
+ default:
+ break;
+ }
+ }
+
+ /* no optimization */
+ return list_append(exp, instruction(Op_pop));
+}
+
+
+/* mk_getline --- make instructions for getline */
+
+static INSTRUCTION *
+mk_getline(INSTRUCTION *op, INSTRUCTION *var, INSTRUCTION *redir, OPCODE redirtype)
+{
+ INSTRUCTION *ip;
+ INSTRUCTION *tp;
+ INSTRUCTION *asgn = NULL;
+
+ /*
+ * getline [var] < [file]
+ *
+ * [ file (simp_exp)]
+ * [ [ var ] ]
+ * [ Op_K_getline_redir|NULL|redir_type|into_var]
+ * [ [var_assign] ]
+ *
+ */
+
+ if (redir == NULL) {
+ int sline = op->source_line;
+ bcfree(op);
+ op = bcalloc(Op_K_getline, 2, sline);
+ (op + 1)->target_endfile = ip_endfile;
+ (op + 1)->target_beginfile = ip_beginfile;
+ }
+
+ if (var != NULL) {
+ tp = make_assignable(var->lasti);
+ assert(tp != NULL);
+
+ /* check if we need after_assign bytecode */
+ if (tp->opcode == Op_push_lhs
+ && tp->memory->type == Node_var
+ && tp->memory->var_assign
+ ) {
+ asgn = instruction(Op_var_assign);
+ asgn->memory = tp->memory;
+ } else if (tp->opcode == Op_field_spec_lhs) {
+ asgn = instruction(Op_field_assign);
+ asgn->field_assign = (Func_ptr) 0; /* determined at run time */
+ tp->target_assign = asgn;
+ }
+ if (redir != NULL) {
+ ip = list_merge(redir, var);
+ (void) list_append(ip, op);
+ } else
+ ip = list_append(var, op);
+ } else if (redir != NULL)
+ ip = list_append(redir, op);
+ else
+ ip = list_create(op);
+ op->into_var = (var != NULL);
+ op->redir_type = (redir != NULL) ? redirtype : 0;
+
+ return (asgn == NULL ? ip : list_append(ip, asgn));
+}
+
+
+/* mk_for_loop --- for loop bytecodes */
+
+static INSTRUCTION *
+mk_for_loop(INSTRUCTION *forp, INSTRUCTION *init, INSTRUCTION *cond,
+ INSTRUCTION *incr, INSTRUCTION *body)
+{
+ /*
+ * [ Op_push_loop | z| y] <-- continue | break
+ * ------------------------
+ * init (may be NULL)
+ * ------------------------
+ * x:
+ * cond (Op_no_op if NULL)
+ * ------------------------
+ * [ Op_jmp_false y ]
+ * ------------------------
+ * body (may be NULL)
+ * ------------------------
+ * z:
+ * incr (may be NULL)
+ * [ Op_jmp x ]
+ * ------------------------
+ * y:[ Op_pop_loop ]
+ */
+
+ INSTRUCTION *ip;
+ INSTRUCTION *cp;
+ INSTRUCTION *jmp;
+ INSTRUCTION *pp_cond;
+ INSTRUCTION *ret;
+
+ cp = instruction(Op_pop_loop);
+
+ forp->opcode = Op_push_loop;
+ forp->target_break = cp;
+ ip = list_create(forp);
+
+ if (init != NULL)
+ (void) list_merge(ip, init);
+
+ if (cond != NULL) {
+ add_lint(cond, LINT_assign_in_cond);
+ pp_cond = cond->nexti;
+ (void) list_merge(ip, cond);
+ (void) list_append(ip, instruction(Op_jmp_false));
+ ip->lasti->target_jmp = cp;
+ } else {
+ pp_cond = instruction(Op_no_op);
+ (void) list_append(ip, pp_cond);
+ }
+
+ if (do_profiling) {
+ (void) list_append(ip, instruction(Op_exec_count));
+ (forp + 1)->opcode = Op_K_for;
+ (forp + 1)->forloop_cond = pp_cond;
+ (forp + 1)->forloop_body = ip->lasti;
+ }
+
+ if (body != NULL)
+ (void) list_merge(ip, body);
+
+ if (incr != NULL) {
+ forp->target_continue = incr->nexti;
+ (void) list_merge(ip, incr);
+ }
+ jmp = instruction(Op_jmp);
+ jmp->target_jmp = pp_cond;
+ if (incr == NULL)
+ forp->target_continue = jmp;
+ (void) list_append(ip, jmp);
+
+ ret = list_append(ip, cp);
+
+ fix_break_continue(forp, cp, TRUE);
+
+ return ret;
+}
+
+/* add_lint --- add lint warning bytecode if needed */
+
+static void
+add_lint(INSTRUCTION *list, LINTTYPE linttype)
+{
+#ifndef NO_LINT
+ INSTRUCTION *ip;
+
+ switch (linttype) {
+ case LINT_assign_in_cond:
+ ip = list->lasti;
+ if (ip->opcode == Op_var_assign || ip->opcode == Op_field_assign) {
+ assert(ip != list->nexti);
+ for (ip = list->nexti; ip->nexti != list->lasti; ip = ip->nexti)
+ ;
+ }
+
+ if (ip->opcode == Op_assign || ip->opcode == Op_assign_concat) {
+ list_append(list, instruction(Op_lint));
+ list->lasti->lint_type = linttype;
+ }
+ break;
+
+ case LINT_no_effect:
+ if (list->lasti->opcode == Op_pop && list->nexti != list->lasti) {
+ for (ip = list->nexti; ip->nexti != list->lasti; ip = ip->nexti)
+ ;
+
+ if (do_lint) { /* compile-time warning */
+ if (isnoeffect(ip->opcode))
+ lintwarn(_("statement may have no effect"));
+ }
+
+ if (ip->opcode == Op_push) { /* run-time warning */
+ list_append(list, instruction(Op_lint));
+ list->lasti->lint_type = linttype;
+ }
+ }
+ break;
+
+ default:
+ break;
+ }
+#endif
+}
+
+/* mk_expression_list --- list of bytecode lists */
+
+static INSTRUCTION *
+mk_expression_list(INSTRUCTION *list, INSTRUCTION *s1)
+{
+ INSTRUCTION *r;
+
+ /* we can't just combine all bytecodes, since we need to
+ * process individual expressions for a few builtins in snode() (-:
+ */
+
+ /* -- list of lists */
+ /* [Op_list| ... ]------
+ * |
+ * [Op_list| ... ] -- |
+ * ... | |
+ * ... <------- |
+ * [Op_list| ... ] -- |
+ * ... | |
+ * ... | |
+ * ... <------- --
+ */
+
+ assert(s1 != NULL && s1->opcode == Op_list);
+ if (list == NULL) {
+ list = instruction(Op_list);
+ list->nexti = s1;
+ list->lasti = s1->lasti;
+ return list;
+ }
+
+ /* append expression to the end of the list */
+
+ r = list->lasti;
+ r->nexti = s1;
+ list->lasti = s1->lasti;
+ return list;
+}
+
+/* count_expressions --- fixup expression_list from mk_expression_list.
+ * returns no of expressions in list. isarg is true
+ * for function arguments.
+ */
+
+static int
+count_expressions(INSTRUCTION **list, int isarg)
+{
+ INSTRUCTION *expr;
+ INSTRUCTION *r = NULL;
+ int count = 0;
+
+ if (*list == NULL) /* error earlier */
+ return 0;
+
+ for (expr = (*list)->nexti; expr; ) {
+ INSTRUCTION *t1, *t2;
+ t1 = expr->nexti;
+ t2 = expr->lasti;
+ if (isarg && t1 == t2 && t1->opcode == Op_push)
+ t1->opcode = Op_push_param;
+ if (++count == 1)
+ r = expr;
+ else
+ (void) list_merge(r, expr);
+ expr = t2->nexti;
+ }
+
+ assert(count > 0);
+ if (! isarg && count > max_args)
+ max_args = count;
+ bcfree(*list);
+ *list = r;
+ return count;
+}
+
+/* fix_break_continue --- fix up break & continue nodes in loop bodies */
+
+static void
+fix_break_continue(INSTRUCTION *start, INSTRUCTION *end, int check_continue)
+{
+ INSTRUCTION *ip, *b_target, *c_target;
+
+ assert(start->opcode == Op_push_loop);
+ assert(end->opcode == Op_pop_loop);
+
+ b_target = start->target_break;
+ c_target = start->target_continue;
+
+ for (ip = start; ip != end; ip = ip->nexti) {
+ switch (ip->opcode) {
+ case Op_K_break:
+ if (ip->target_jmp == NULL)
+ ip->target_jmp = b_target;
+ break;
+
+ case Op_K_continue:
+ if (check_continue && ip->target_jmp == NULL)
+ ip->target_jmp = c_target;
+ break;
+
+ default:
+ /* this is to keep the compiler happy. sheesh. */
+ break;
+ }
+ }
+}
+
+
+/* append_symbol --- append symbol to the list of symbols
+ * installed in the symbol table.
+ */
+
+void
+append_symbol(char *name)
+{
+ NODE *hp;
+
+ /* N.B.: func_install removes func name and reinstalls it;
+ * and we get two entries for it here!. destroy_symbol()
+ * will find and destroy the Node_func which is what we want.
+ */
+
+ getnode(hp);
+ hp->hname = name; /* shallow copy */
+ hp->hnext = symbol_list->hnext;
+ symbol_list->hnext = hp;
+}
+
+void
+release_symbols(NODE *symlist, int keep_globals)
+{
+ NODE *hp, *n;
+
+ for (hp = symlist->hnext; hp != NULL; hp = n) {
+ if (! keep_globals) {
+ /* destroys globals, function, and params
+ * if still in symbol table and not removed by func_install
+ * due to syntax error.
+ */
+ destroy_symbol(hp->hname);
+ }
+ n = hp->hnext;
+ freenode(hp);
+ }
+ symlist->hnext = NULL;
+}
+
+/* destroy_symbol --- remove a symbol from symbol table
+* and free all associated memory.
+*/
+
+
+void
+destroy_symbol(char *name)
+{
+ NODE *symbol, *hp;
+
+ symbol = lookup(name);
+ if (symbol == NULL)
+ return;
+
+ if (symbol->type == Node_func) {
+ char **varnames;
+ NODE *func, *n;
+
+ func = symbol;
+ varnames = func->parmlist;
+ if (varnames != NULL)
+ efree(varnames);
+
+ /* function parameters of type Node_param_list */
+ for (n = func->lnode->rnode; n != NULL; ) {
+ NODE *np;
+ np = n->rnode;
+ efree(n->param);
+ freenode(n);
+ n = np;
+ }
+ freenode(func->lnode);
+ func_count--;
+
+ } else if (symbol->type == Node_var_array)
+ assoc_clear(symbol);
+ else if (symbol->type == Node_var)
+ unref(symbol->var_value);
+
+ /* remove from symbol table */
+ hp = remove_symbol(name);
+ efree(hp->hname);
+ freenode(hp->hvalue);
+ freenode(hp);
+}
+
+#define pool_size d.dl
+#define freei x.xi
+static INSTRUCTION *pool_list;
+static CONTEXT *curr_ctxt = NULL;
+
+
+CONTEXT *
+new_context()
+{
+ CONTEXT *ctxt;
+
+ emalloc(ctxt, CONTEXT *, sizeof(CONTEXT), "new_context");
+ memset(ctxt, 0, sizeof(CONTEXT));
+ ctxt->srcfiles.next = ctxt->srcfiles.prev = &ctxt->srcfiles;
+ ctxt->rule_list.opcode = Op_list;
+ ctxt->rule_list.lasti = &ctxt->rule_list;
+ if (curr_ctxt == NULL) {
+ ctxt->level = 0;
+ pool_list = &ctxt->pools;
+ symbol_list = &ctxt->symbols;
+ srcfiles = &ctxt->srcfiles;
+ rule_list = &ctxt->rule_list;
+ install_func = ctxt->install_func;
+ curr_ctxt = ctxt;
+ } else
+ ctxt->level = curr_ctxt->level + 1; /* this assumes contexts don't overlap each other ? */
+
+ return ctxt;
+}
+
+
+/* N.B.: new context (level > 0) inherits all command line options;
+ * probably should restore defaults for lint etc.
+ */
+
+CONTEXT *
+set_context(CONTEXT *ctxt)
+{
+ assert(curr_ctxt != NULL);
+ if (curr_ctxt == ctxt)
+ goto update;
+
+ /* save current source and sourceline */
+ curr_ctxt->sourceline = sourceline;
+ curr_ctxt->source = source;
+
+ if (ctxt == NULL) {
+ assert(curr_ctxt->prev != NULL);
+ ctxt = curr_ctxt->prev;
+ } else
+ ctxt->prev = curr_ctxt;
+
+ /* restore source and sourceline */
+ sourceline = ctxt->sourceline;
+ source = ctxt->source;
+
+update:
+ pool_list = &ctxt->pools;
+ symbol_list = &ctxt->symbols;
+ srcfiles = &ctxt->srcfiles;
+ rule_list = &ctxt->rule_list;
+ install_func = ctxt->install_func;
+ curr_ctxt = ctxt;
+ return curr_ctxt;
+}
+
+CONTEXT *
+get_context()
+{
+ assert(curr_ctxt != NULL);
+ return curr_ctxt;
+}
+
+void
+free_context(CONTEXT *ctxt, int keep_globals)
+{
+ SRCFILE *s, *sn;
+
+ if (ctxt == NULL)
+ return;
+
+ assert(curr_ctxt != ctxt);
+
+ /* free all code including function codes */
+ free_bcpool(&ctxt->pools);
+ /* free symbols */
+ release_symbols(&ctxt->symbols, keep_globals);
+ /* free srcfiles */
+ for (s = &ctxt->srcfiles; s != &ctxt->srcfiles; s = sn) {
+ sn = s->next;
+ if (s->stype != SRC_CMDLINE && s->stype != SRC_STDIN)
+ efree(s->fullpath);
+ efree(s->src);
+ efree(s);
+ }
+ efree(ctxt);
+}
+
+static void
+free_bc_internal(INSTRUCTION *cp)
+{
+ INSTRUCTION *curr;
+ NODE *m;
+
+ switch(cp->opcode) {
+ case Op_func_call:
+ if (cp->func_name != NULL
+ && cp->func_name != builtin_func
+ )
+ efree(cp->func_name);
+ break;
+ case Op_K_switch:
+ for (curr = cp->case_val; curr != NULL; curr = curr->nexti) {
+ if (curr->opcode == Op_K_case &&
+ curr->memory->type != Node_val
+ ) {
+ m = curr->memory;
+ if (m->re_text != NULL)
+ unref(m->re_text);
+ if (m->re_reg != NULL)
+ refree(m->re_reg);
+ if (m->re_exp != NULL)
+ unref(m->re_exp);
+ freenode(m);
+ }
+ }
+ break;
+ case Op_push_re:
+ case Op_match_rec:
+ case Op_match:
+ case Op_nomatch:
+ m = cp->memory;
+ if (m->re_reg != NULL)
+ refree(m->re_reg);
+ if (m->re_exp != NULL)
+ unref(m->re_exp);
+ if (m->re_text != NULL)
+ unref(m->re_text);
+ freenode(m);
+ break;
+ case Op_token: /* token lost during error recovery in yyparse */
+ if (cp->lextok != NULL)
+ efree(cp->lextok);
+ break;
+ case Op_illegal:
+ cant_happen();
+ default:
+ break;
+ }
+}
+
+
+/* INSTR_CHUNK must be > largest code size (3) */
+#define INSTR_CHUNK 127
+
+/* bcfree --- deallocate instruction */
+
+void
+bcfree(INSTRUCTION *cp)
+{
+ cp->opcode = 0;
+ cp->nexti = pool_list->freei;
+ pool_list->freei = cp;
+}
+
+
+/* bcalloc --- allocate a new instruction */
+
+INSTRUCTION *
+bcalloc(OPCODE op, int size, int srcline)
+{
+ INSTRUCTION *cp;
+
+ if (size > 1) {
+ /* wide instructions Op_rule, Op_func_call .. */
+ emalloc(cp, INSTRUCTION *, (size + 1) * sizeof(INSTRUCTION), "bcalloc");
+ cp->pool_size = size;
+ cp->nexti = pool_list->nexti;
+ pool_list->nexti = cp++;
+ } else {
+ INSTRUCTION *pool;
+
+ pool = pool_list->freei;
+ if (pool == NULL) {
+ INSTRUCTION *last;
+ emalloc(cp, INSTRUCTION *, (INSTR_CHUNK + 1) * sizeof(INSTRUCTION), "bcalloc");
+
+ cp->pool_size = INSTR_CHUNK;
+ cp->nexti = pool_list->nexti;
+ pool_list->nexti = cp;
+ pool = ++cp;
+ last = &pool[INSTR_CHUNK - 1];
+ for (; cp <= last; cp++) {
+ cp->opcode = 0;
+ cp->nexti = cp + 1;
+ }
+ --cp;
+ cp->nexti = NULL;
+ }
+ cp = pool;
+ pool_list->freei = cp->nexti;
+ }
+
+ memset(cp, 0, size * sizeof(INSTRUCTION));
+ cp->opcode = op;
+ cp->source_line = srcline;
+ return cp;
+}
+
+
+static void
+free_bcpool(INSTRUCTION *pl)
+{
+ INSTRUCTION *pool, *tmp;
+
+ for (pool = pl->nexti; pool != NULL; pool = tmp) {
+ INSTRUCTION *cp, *last;
+ long psiz;
+ psiz = pool->pool_size;
+ if (psiz == INSTR_CHUNK)
+ last = pool + psiz;
+ else
+ last = pool + 1;
+ for (cp = pool + 1; cp <= last ; cp++) {
+ if (cp->opcode != 0)
+ free_bc_internal(cp);
+ }
+ tmp = pool->nexti;
+ efree(pool);
+ }
+ memset(pl, 0, sizeof(INSTRUCTION));
+}
+
+
+static inline INSTRUCTION *
+list_create(INSTRUCTION *x)
+{
+ INSTRUCTION *l;
+
+ l = instruction(Op_list);
+ l->nexti = x;
+ l->lasti = x;
+ return l;
+}
+
+static inline INSTRUCTION *
+list_append(INSTRUCTION *l, INSTRUCTION *x)
+{
+#ifdef GAWKDEBUG
+ if (l->opcode != Op_list)
+ cant_happen();
+#endif
+ l->lasti->nexti = x;
+ l->lasti = x;
+ return l;
+}
+
+static inline INSTRUCTION *
+list_prepend(INSTRUCTION *l, INSTRUCTION *x)
+{
+#ifdef GAWKDEBUG
+ if (l->opcode != Op_list)
+ cant_happen();
+#endif
+ x->nexti = l->nexti;
+ l->nexti = x;
+ return l;
+}
+
+static inline INSTRUCTION *
+list_merge(INSTRUCTION *l1, INSTRUCTION *l2)
+{
+#ifdef GAWKDEBUG
+ if (l1->opcode != Op_list)
+ cant_happen();
+ if (l2->opcode != Op_list)
+ cant_happen();
+#endif
+ l1->lasti->nexti = l2->nexti;
+ l1->lasti = l2->lasti;
+ bcfree(l2);
+ return l1;
+}
+
/* See if name is a special token. */
int
@@ -6136,7 +8490,6 @@ check_special(const char *name)
}
#endif
-
low = 0;
high = (sizeof(tokentab) / sizeof(tokentab[0])) - 1;
while (low <= high) {
@@ -6175,7 +8528,7 @@ read_one_line(int fd, void *buffer, size_t count)
fp = fdopen(fd, "r");
if (fp == NULL) {
fprintf(stderr, "ugh. fdopen: %s\n", strerror(errno));
- exit(EXIT_FAILURE);
+ gawk_exit(EXIT_FAILURE);
}
}
@@ -6201,162 +8554,4 @@ one_line_close(int fd)
return ret;
}
-/* constant_fold --- try to fold constant operations */
-
-static NODE *
-constant_fold(NODE *left, NODETYPE op, NODE *right)
-{
- AWKNUM result;
- extern double fmod P((double x, double y));
-
- if (! do_optimize)
- return node(left, op, right);
-
- /* Unary not */
- if (right == NULL) {
- if (op == Node_not && left->type == Node_val) {
- if ((left->flags & (STRCUR|STRING)) != 0) {
- NODE *ret;
- if (left->stlen == 0) {
- ret = make_number((AWKNUM) 1.0);
- } else {
- ret = make_number((AWKNUM) 0.0);
- }
- unref(left);
-
- return ret;
- } else {
- if (left->numbr == 0) {
- left->numbr = 1.0;
- } else {
- left->numbr = 0.0;
- }
-
- return left;
- }
- }
-
- return node(left, op, right);
- }
-
- /* String concatentation of two string constants */
- if (op == Node_concat
- && left->type == Node_val
- && (left->flags & (STRCUR|STRING)) != 0
- && right->type == Node_val
- && (right->flags & (STRCUR|STRING)) != 0) {
- size_t newlen = left->stlen + right->stlen + 2;
-
- erealloc(left->stptr, char *, newlen, "constant_fold");
- memcpy(left->stptr + left->stlen, right->stptr, right->stlen);
- left->stptr[left->stlen + right->stlen] = '\0';
- left->stlen += right->stlen;
-
- unref(right);
- return left;
- }
-
- /*
- * From here down, numeric operations.
- * Check for string and bail out if have them.
- */
- if (left->type != Node_val
- || (left->flags & (STRCUR|STRING)) != 0
- || right->type != Node_val
- || (right->flags & (STRCUR|STRING)) != 0) {
- return node(left, op, right);
- }
-
- /* Numeric operations: */
- switch (op) {
- case Node_not:
- case Node_exp:
- case Node_times:
- case Node_quotient:
- case Node_mod:
- case Node_plus:
- case Node_minus:
- break;
- default:
- return node(left, op, right);
- }
-
- left->numbr = force_number(left);
- right->numbr = force_number(right);
-
- result = left->numbr;
- switch (op) {
- case Node_exp:
- result = calc_exp(left->numbr, right->numbr);
- break;
- case Node_times:
- result *= right->numbr;
- break;
- case Node_quotient:
- if (right->numbr == 0)
- fatal(_("division by zero attempted in `/'"));
- result /= right->numbr;
- break;
- case Node_mod:
- if (right->numbr == 0)
- fatal(_("division by zero attempted in `%%'"));
-#ifdef HAVE_FMOD
- result = fmod(result, right->numbr);
-#else /* ! HAVE_FMOD */
- (void) modf(left->numbr / right->numbr, &result);
- result = left->numbr - result * right->numbr;
-#endif /* ! HAVE_FMOD */
- break;
- case Node_plus:
- result += right->numbr;
- break;
- case Node_minus:
- result -= right->numbr;
- break;
- default:
- /* Shut up compiler warnings */
- fatal("can't happen");
- break;
- }
-
- unref(right);
- left->numbr = result;
-
- return left;
-}
-
-/* optimize_concat --- optimize the general "x = x y z a" case */
-
-static NODE *
-optimize_concat(NODE *left, NODETYPE op, NODE *right)
-{
- NODE *top, *leftmost;
-
- if (op != Node_assign)
- return node(left, op, right);
-
- /*
- * optimization of `x = x y'. can save lots of time
- * if done a lot.
- */
- if (( left->type == Node_var
- || left->type == Node_var_new
- || left->type == Node_param_list)
- && right->type == Node_concat) {
- /* find bottom of tree, save it */
- for (top = right; top->lnode != NULL && top->type == Node_concat; top = top->lnode) {
- leftmost = top->lnode;
- if (leftmost->type == Node_concat)
- continue;
-
- /* at this point, we've run out of concatentation */
- if (leftmost != left)
- return node(left, op, right);
-
- top->lnode = Nnull_string;
- return node(left, Node_assign_concat, right);
- }
- }
- return node(left, op, right);
-}
diff --git a/awkgram.y b/awkgram.y
index f58e0d5b..1247cfd9 100644
--- a/awkgram.y
+++ b/awkgram.y
@@ -34,64 +34,103 @@
#define signed /**/
#endif
-#define CAN_FREE TRUE
-#define DONT_FREE FALSE
-
-#ifdef CAN_USE_STDARG_H
static void yyerror(const char *m, ...) ATTRIBUTE_PRINTF_1;
-#else
-static void yyerror(); /* va_alist */
-#endif
-static char *get_src_buf P((void));
-static int yylex P((void));
-static NODE *node_common P((NODETYPE op));
-static NODE *snode P((NODE *subn, NODETYPE op, int sindex));
-static NODE *make_for_loop P((NODE *init, NODE *cond, NODE *incr));
-static NODE *append_right P((NODE *list, NODE *new));
-static inline NODE *append_pattern P((NODE **list, NODE *patt));
-static void func_install P((NODE *params, NODE *def));
-static void pop_var P((NODE *np, int freeit));
-static void pop_params P((NODE *params));
-static NODE *make_param P((char *name));
-static NODE *mk_rexp P((NODE *exp));
-static int dup_parms P((NODE *func));
-static void param_sanity P((NODE *arglist));
-static int parms_shadow P((const char *fname, NODE *func));
-static int isnoeffect P((NODETYPE t));
-static int isassignable P((NODE *n));
-static void dumpintlstr P((const char *str, size_t len));
-static void dumpintlstr2 P((const char *str1, size_t len1, const char *str2, size_t len2));
-static void count_args P((NODE *n));
-static int isarray P((NODE *n));
+static char *get_src_buf(void);
+static int yylex(void);
+int yyparse(void);
+static INSTRUCTION *snode(INSTRUCTION *subn, INSTRUCTION *op);
+static int func_install(INSTRUCTION *fp, INSTRUCTION *def);
+static void pop_params(NODE *params);
+static NODE *make_param(char *pname);
+static NODE *mk_rexp(INSTRUCTION *exp);
+static void append_param(char *pname);
+static int dup_parms(NODE *func);
+static void param_sanity(INSTRUCTION *arglist);
+static int parms_shadow(INSTRUCTION *pc, int *shadow);
+static int isnoeffect(OPCODE type);
+static INSTRUCTION *make_assignable(INSTRUCTION *ip);
+static void dumpintlstr(const char *str, size_t len);
+static void dumpintlstr2(const char *str1, size_t len1, const char *str2, size_t len2);
+static int isarray(NODE *n);
+static int include_source(char *src);
+static void next_sourcefile(void);
+static char *tokexpand(void);
+
+#define instruction(t) bcalloc(t, 1, 0)
+
+static INSTRUCTION *mk_program(void);
+static INSTRUCTION *append_rule(INSTRUCTION *pattern, INSTRUCTION *action);
+static INSTRUCTION *mk_condition(INSTRUCTION *cond, INSTRUCTION *ifp, INSTRUCTION *true_branch,
+ INSTRUCTION *elsep, INSTRUCTION *false_branch);
+static INSTRUCTION *mk_expression_list(INSTRUCTION *list, INSTRUCTION *s1);
+static INSTRUCTION *mk_for_loop(INSTRUCTION *forp, INSTRUCTION *init, INSTRUCTION *cond,
+ INSTRUCTION *incr, INSTRUCTION *body);
+static void fix_break_continue(INSTRUCTION *start, INSTRUCTION *end, int check_continue);
+static INSTRUCTION *mk_binary(INSTRUCTION *s1, INSTRUCTION *s2, INSTRUCTION *op);
+static INSTRUCTION *mk_boolean(INSTRUCTION *left, INSTRUCTION *right, INSTRUCTION *op);
+static INSTRUCTION *mk_assignment(INSTRUCTION *lhs, INSTRUCTION *rhs, INSTRUCTION *op);
+static INSTRUCTION *mk_getline(INSTRUCTION *op, INSTRUCTION *opt_var, INSTRUCTION *redir, OPCODE redirtype);
+static NODE *make_regnode(int type, NODE *exp);
+static int count_expressions(INSTRUCTION **list, int isarg);
+static INSTRUCTION *optimize_assignment(INSTRUCTION *exp);
+static void add_lint(INSTRUCTION *list, LINTTYPE linttype);
enum defref { FUNC_DEFINE, FUNC_USE };
-static void func_use P((const char *name, enum defref how));
-static void check_funcs P((void));
+static void func_use(const char *name, enum defref how);
+static void check_funcs(void);
+static void free_bcpool(INSTRUCTION *pl);
-static ssize_t read_one_line P((int fd, void *buffer, size_t count));
-static int one_line_close P((int fd));
+static ssize_t read_one_line(int fd, void *buffer, size_t count);
+static int one_line_close(int fd);
-static NODE *constant_fold P((NODE *left, NODETYPE op, NODE *right));
-static NODE *optimize_concat P((NODE *left, NODETYPE op, NODE *right));
+static void (*install_func)(char *) = NULL;
+static int want_source = FALSE;
static int want_regexp; /* lexical scanning kludge */
static int can_return; /* parsing kludge */
-static int begin_or_end_rule = FALSE; /* parsing kludge */
-static int parsing_end_rule = FALSE; /* for warnings */
-static int beginfile_or_endfile_rule = FALSE; /* parsing kludge */
-static int parsing_endfile_rule = FALSE; /* for warnings */
+static int rule = 0;
+
+const char *const ruletab[] = {
+ "?",
+ "BEGIN",
+ "Rule",
+ "END",
+ "BEGINFILE",
+ "ENDFILE",
+};
+
static int in_print = FALSE; /* lexical scanning kludge for print */
static int in_parens = 0; /* lexical scanning kludge for print */
-static char *lexptr; /* pointer to next char during parsing */
+static int sub_counter = 0; /* array dimension counter for use in delete */
+static char *lexptr = NULL; /* pointer to next char during parsing */
static char *lexend;
static char *lexptr_begin; /* keep track of where we were for error msgs */
static char *lexeme; /* beginning of lexeme for debugging */
+static int lexeof; /* seen EOF for current source? */
static char *thisline = NULL;
+static int in_braces = 0; /* count braces for firstline, lastline in an 'action' */
+static int lastline = 0;
+static int firstline = 0;
+static SRCFILE *sourcefile = NULL; /* current program source */
+static int lasttok = 0;
+static int eof_warned = FALSE; /* GLOBAL: want warning for each file */
+static int break_allowed; /* kludge for break */
+static int continue_allowed; /* kludge for continue */
+
+
+#define END_FILE -1000
+#define END_SRC -2000
+
#define YYDEBUG_LEXER_TEXT (lexeme)
static int param_counter;
+static NODE *func_params; /* list of parameters for the current function */
static char *tokstart = NULL;
static char *tok = NULL;
static char *tokend;
+static int errcount = 0;
+
+static NODE *symbol_list;
+extern void destroy_symbol(char *name);
static long func_count; /* total number of functions */
@@ -101,14 +140,25 @@ static int var_count; /* total number of global variables */
extern char *source;
extern int sourceline;
-extern struct src *srcfiles;
-extern long numfiles;
-extern int errcount;
-extern NODE *begin_block;
-extern NODE *end_block;
-extern NODE *beginfile_block;
-extern NODE *endfile_block;
+extern SRCFILE *srcfiles;
+extern INSTRUCTION *rule_list;
+extern int max_args;
+
+static INSTRUCTION *rule_block[sizeof(ruletab)];
+
+static INSTRUCTION *ip_rec;
+static INSTRUCTION *ip_newfile;
+static INSTRUCTION *ip_atexit = NULL;
+static INSTRUCTION *ip_end;
+static INSTRUCTION *ip_endfile;
+static INSTRUCTION *ip_beginfile;
+static inline INSTRUCTION *list_create(INSTRUCTION *x);
+static inline INSTRUCTION *list_append(INSTRUCTION *l, INSTRUCTION *x);
+static inline INSTRUCTION *list_prepend(INSTRUCTION *l, INSTRUCTION *x);
+static inline INSTRUCTION *list_merge(INSTRUCTION *l1, INSTRUCTION *l2);
+
+extern double fmod(double x, double y);
/*
* This string cannot occur as a real awk identifier.
* Use it as a special token to make function parsing
@@ -119,48 +169,27 @@ extern NODE *endfile_block;
* should only produce one error message, and not core dump.
*/
static char builtin_func[] = "@builtin";
+
+#define YYSTYPE INSTRUCTION *
%}
-%union {
- long lval;
- AWKNUM fval;
- NODE *nodeval;
- NODETYPE nodetypeval;
- char *sval;
- NODE *(*ptrval) P((void));
-}
-
-%type <nodeval> function_prologue pattern action variable param_list
-%type <nodeval> exp common_exp
-%type <nodeval> simp_exp simp_exp_nc non_post_simp_exp
-%type <nodeval> expression_list opt_expression_list print_expression_list
-%type <nodeval> statements statement if_statement switch_body case_statements case_statement case_value opt_param_list
-%type <nodeval> simple_stmt opt_simple_stmt
-%type <nodeval> opt_exp opt_variable regexp
-%type <nodeval> input_redir output_redir field_spec
-%type <nodeval> function_call direct_function_call
-%type <nodetypeval> print
-%type <nodetypeval> assign_operator a_relop relop_or_less
-%type <sval> func_name opt_incdec
-%type <lval> lex_builtin
-
-%token <sval> FUNC_CALL NAME REGEXP
-%token <lval> ERROR
-%token <nodeval> YNUMBER YSTRING
-%token <nodetypeval> RELOP IO_OUT IO_IN
-%token <nodetypeval> ASSIGNOP ASSIGN MATCHOP CONCAT_OP
-%token <nodetypeval> LEX_BEGIN LEX_END LEX_IF LEX_ELSE LEX_RETURN LEX_DELETE
-%token <nodetypeval> LEX_BEGINFILE LEX_ENDFILE
-%token <nodetypeval> LEX_SWITCH LEX_CASE LEX_DEFAULT LEX_WHILE LEX_DO LEX_FOR LEX_BREAK LEX_CONTINUE
-%token <nodetypeval> LEX_PRINT LEX_PRINTF LEX_NEXT LEX_EXIT LEX_FUNCTION
-%token <nodetypeval> LEX_GETLINE LEX_NEXTFILE
-%token <nodetypeval> LEX_IN
-%token <lval> LEX_AND LEX_OR INCREMENT DECREMENT
-%token <lval> LEX_BUILTIN LEX_LENGTH
+%token FUNC_CALL NAME REGEXP FILENAME
+%token YNUMBER YSTRING
+%token RELOP IO_OUT IO_IN
+%token ASSIGNOP ASSIGN MATCHOP CONCAT_OP
+%token SUBSCRIPT
+%token LEX_BEGIN LEX_END LEX_IF LEX_ELSE LEX_RETURN LEX_DELETE
+%token LEX_SWITCH LEX_CASE LEX_DEFAULT LEX_WHILE LEX_DO LEX_FOR LEX_BREAK LEX_CONTINUE
+%token LEX_PRINT LEX_PRINTF LEX_NEXT LEX_EXIT LEX_FUNCTION
+%token LEX_BEGINFILE LEX_ENDFILE
+%token LEX_GETLINE LEX_NEXTFILE
+%token LEX_IN
+%token LEX_AND LEX_OR INCREMENT DECREMENT
+%token LEX_BUILTIN LEX_LENGTH
+%token LEX_EOF
+%token LEX_INCLUDE LEX_EVAL
%token NEWLINE
-/* these are just yylval numbers */
-
/* Lowest to highest */
%right ASSIGNOP ASSIGN SLASH_BEFORE_EQUAL
%right '?' ':'
@@ -170,7 +199,7 @@ static char builtin_func[] = "@builtin";
%nonassoc LEX_IN
%left FUNC_CALL LEX_BUILTIN LEX_LENGTH
%nonassoc ','
-%nonassoc MATCHOP
+%left MATCHOP
%nonassoc RELOP '<' '>' IO_IN IO_OUT
%left CONCAT_OP
%left YSTRING YNUMBER
@@ -183,81 +212,106 @@ static char builtin_func[] = "@builtin";
%left '(' ')'
%%
-start
- : opt_nls program opt_nls
- {
- check_funcs();
- }
- ;
-
program
: /* empty */
| program rule
{
- beginfile_or_endfile_rule = begin_or_end_rule = parsing_end_rule = FALSE;
+ rule = 0;
yyerrok;
}
+ | program nls
+ | program LEX_EOF
+ {
+ next_sourcefile();
+ }
| program error
- {
- beginfile_or_endfile_rule = begin_or_end_rule = parsing_end_rule = FALSE;
+ {
+ rule = 0;
/*
* If errors, give up, don't produce an infinite
* stream of syntax error messages.
*/
/* yyerrok; */
- }
+ }
;
rule
: pattern action
{
- $1->rnode = $2;
+ (void) append_rule($1, $2);
}
| pattern statement_term
{
- if ($1->lnode != NULL) {
- /* pattern rule with non-empty pattern */
- $1->rnode = node(NULL, Node_K_print_rec, NULL);
- } else {
- /* an error */
- if (begin_or_end_rule)
- msg(_("%s blocks must have an action part"),
- (parsing_end_rule ? "END" : "BEGIN"));
- else if (beginfile_or_endfile_rule)
- msg(_("%s blocks must have an action part"),
- (parsing_endfile_rule ? "ENDFILE" : "BEGINFILE"));
- else
- msg(_("each rule must have a pattern or an action part"));
+ if (rule != Rule) {
+ msg(_("%s blocks must have an action part"), ruletab[rule]);
errcount++;
- }
+ } else if ($1 == NULL) {
+ msg(_("each rule must have a pattern or an action part"));
+ errcount++;
+ } else /* pattern rule with non-empty pattern */
+ (void) append_rule($1, NULL);
}
| function_prologue action
{
can_return = FALSE;
- if ($1)
- func_install($1, $2);
+ if ($1 && func_install($1, $2) < 0)
+ YYABORT;
+ func_params = NULL;
+ yyerrok;
+ }
+ | '@' LEX_INCLUDE source statement_term
+ {
+ want_source = FALSE;
yyerrok;
}
;
-pattern
- : /* empty */
+source
+ : FILENAME
{
- $$ = append_pattern(&expression_value, (NODE *) NULL);
+ char *src = $1->lextok;
+ if (include_source(src) < 0)
+ YYABORT;
+ efree(src);
+ bcfree($1);
+ $$ = NULL;
}
+ | FILENAME error
+ { $$ = NULL; }
+ | error
+ { $$ = NULL; }
+ ;
+
+pattern
+ : /* empty */
+ { $$ = NULL; rule = Rule; }
| exp
- {
- $$ = append_pattern(&expression_value, $1);
- }
+ { $$ = $1; rule = Rule; }
| exp ',' exp
{
- NODE *r;
-
- getnode(r);
- r->type = Node_line_range;
- r->condpair = node($1, Node_cond_pair, $3);
- r->triggered = FALSE;
- $$ = append_pattern(&expression_value, r);
+ INSTRUCTION *tp;
+
+ add_lint($1, LINT_assign_in_cond);
+ add_lint($3, LINT_assign_in_cond);
+
+ tp = instruction(Op_no_op);
+ list_prepend($1, bcalloc(Op_line_range, !!do_profiling + 1, 0));
+ $1->nexti->triggered = FALSE;
+ $1->nexti->target_jmp = $3->nexti;
+
+ list_append($1, instruction(Op_cond_pair));
+ $1->lasti->line_range = $1->nexti;
+ $1->lasti->target_jmp = tp;
+
+ list_append($3, instruction(Op_cond_pair));
+ $3->lasti->line_range = $1->nexti;
+ $3->lasti->target_jmp = tp;
+ if (do_profiling) {
+ ($1->nexti + 1)->condpair_left = $1->lasti;
+ ($1->nexti + 1)->condpair_right = $3->lasti;
+ }
+ $$ = list_append(list_merge($1, $3), tp);
+ rule = Rule;
}
| LEX_BEGIN
{
@@ -265,8 +319,9 @@ pattern
if (do_lint_old && ++begin_seen == 2)
warning(_("old awk does not support multiple `BEGIN' or `END' rules"));
- begin_or_end_rule = TRUE;
- $$ = append_pattern(&begin_block, (NODE *) NULL);
+ $1->in_rule = rule = BEGIN;
+ $1->source_file = source;
+ $$ = $1;
}
| LEX_END
{
@@ -274,39 +329,52 @@ pattern
if (do_lint_old && ++end_seen == 2)
warning(_("old awk does not support multiple `BEGIN' or `END' rules"));
- begin_or_end_rule = parsing_end_rule = TRUE;
- $$ = append_pattern(&end_block, (NODE *) NULL);
+ $1->in_rule = rule = END;
+ $1->source_file = source;
+ $$ = $1;
}
| LEX_BEGINFILE
{
- beginfile_or_endfile_rule = TRUE;
- $$ = append_pattern(&beginfile_block, (NODE *) NULL);
+ $1->in_rule = rule = BEGINFILE;
+ $1->source_file = source;
+ $$ = $1;
}
| LEX_ENDFILE
{
- beginfile_or_endfile_rule = parsing_endfile_rule = TRUE;
- $$ = append_pattern(&endfile_block, (NODE *) NULL);
+ $1->in_rule = rule = ENDFILE;
+ $1->source_file = source;
+ $$ = $1;
}
;
action
: l_brace statements r_brace opt_semi opt_nls
- { $$ = $2; }
+ {
+ if ($2 == NULL)
+ $$ = list_create(instruction(Op_no_op));
+ else
+ $$ = $2;
+ }
;
func_name
: NAME
- { $$ = $1; }
+ { $$ = $1; }
| FUNC_CALL
- { $$ = $1; }
+ { $$ = $1; }
| lex_builtin
{
yyerror(_("`%s' is a built-in function, it cannot be redefined"),
tokstart);
- errcount++;
- $$ = builtin_func;
+ $1->opcode = Op_symbol; /* Op_symbol instead of Op_token so that
+ * free_bc_internal does not try to free it
+ */
+ $1->lextok = builtin_func;
+ $$ = $1;
/* yyerrok; */
}
+ | '@' LEX_EVAL
+ { $$ = $2; }
;
lex_builtin
@@ -315,20 +383,26 @@ lex_builtin
;
function_prologue
- : LEX_FUNCTION
- {
- param_counter = 0;
- }
- func_name '(' opt_param_list r_paren opt_nls
- {
+ : LEX_FUNCTION
+ {
+ param_counter = 0;
+ func_params = NULL;
+ }
+ func_name '(' opt_param_list r_paren opt_nls
+ {
NODE *t;
- t = make_param($3);
+ $1->source_file = source;
+ t = make_param($3->lextok);
+ $3->lextok = NULL;
+ bcfree($3);
t->flags |= FUNC;
- $$ = append_right(t, $5);
+ t->rnode = func_params;
+ func_params = t;
+ $$ = $1;
can_return = TRUE;
/* check for duplicate parameter names */
- if (dup_parms($$))
+ if (dup_parms(t))
errcount++;
}
;
@@ -342,55 +416,56 @@ regexp
{ ++want_regexp; }
REGEXP /* The terminating '/' is consumed by yylex(). */
{
- NODE *n;
- size_t len = strlen($3);
+ NODE *n, *exp;
+ char *re;
+ size_t len;
+ re = $3->lextok;
+ len = strlen(re);
if (do_lint) {
if (len == 0)
lintwarn(_("regexp constant `//' looks like a C++ comment, but is not"));
- else if (($3)[0] == '*' && ($3)[len-1] == '*')
+ else if ((re)[0] == '*' && (re)[len-1] == '*')
/* possible C comment */
lintwarn(_("regexp constant `/%s/' looks like a C comment, but is not"), tokstart);
}
- getnode(n);
- n->type = Node_regex;
- n->re_exp = make_string($3, len);
- n->re_reg = make_regexp($3, len, FALSE, TRUE);
- n->re_text = NULL;
- n->re_flags = CONSTANT;
- n->re_cnt = 1;
- $$ = n;
+
+ exp = make_str_node(re, len, ALREADY_MALLOCED);
+ n = make_regnode(Node_regex, exp);
+ if (n == NULL) {
+ unref(exp);
+ YYABORT;
+ }
+ $$ = $3;
+ $$->opcode = Op_match_rec;
+ $$->memory = n;
}
;
a_slash
: '/'
+ { bcfree($1); }
| SLASH_BEFORE_EQUAL
;
statements
: /* empty */
- { $$ = NULL; }
+ { $$ = NULL; }
| statements statement
{
if ($2 == NULL)
$$ = $1;
else {
- if (do_lint && isnoeffect($2->type))
- lintwarn(_("statement may have no effect"));
+ add_lint($2, LINT_no_effect);
if ($1 == NULL)
$$ = $2;
else
- $$ = append_right(
- ($1->type == Node_statement_list ? $1
- : node($1, Node_statement_list, (NODE *) NULL)),
- ($2->type == Node_statement_list ? $2
- : node($2, Node_statement_list, (NODE *) NULL)));
+ $$ = list_merge($1, $2);
}
- yyerrok;
+ yyerrok;
}
| statements error
- { $$ = NULL; }
+ { $$ = NULL; }
;
statement_term
@@ -400,21 +475,140 @@ statement_term
statement
: semi opt_nls
- { $$ = NULL; }
+ { $$ = NULL; }
| l_brace statements r_brace
- { $$ = $2; }
+ { $$ = $2; }
| if_statement
- { $$ = $1; }
+ {
+ if (do_profiling)
+ $$ = list_prepend($1, instruction(Op_exec_count));
+ else
+ $$ = $1;
+ }
| LEX_SWITCH '(' exp r_paren opt_nls l_brace switch_body opt_nls r_brace
- { $$ = node($3, Node_K_switch, $7); }
+ {
+ INSTRUCTION *ip;
+
+ $1->opcode = Op_push_loop;
+ $1->target_continue = NULL;
+ ip = list_prepend($3, $1);
+ if ($7->nexti->switch_dflt == NULL)
+ $7->nexti->switch_dflt = $1; /* implicit break */
+ if (do_profiling) {
+ (void) list_prepend(ip, instruction(Op_exec_count));
+ ($1 + 1)->opcode = Op_K_switch;
+ ($1 + 1)->switch_body = $7->nexti;
+ }
+ (void) list_merge(ip, $7);
+ $$ = list_append(ip, instruction(Op_pop_loop));
+ $1->target_break = $$->lasti;
+
+ break_allowed--;
+ fix_break_continue($1, $$->lasti, FALSE);
+ }
| LEX_WHILE '(' exp r_paren opt_nls statement
- { $$ = node($3, Node_K_while, $6); }
+ {
+ /*
+ * [Op_push_loop| z| y]
+ * -----------------
+ * z:
+ * cond
+ * -----------------
+ * [Op_jmp_false y ]
+ * -----------------
+ * body
+ * -----------------
+ * [Op_jmp z ]
+ * y: [Op_pop_loop ]
+ */
+
+ INSTRUCTION *ip, *tp;
+
+ tp = instruction(Op_pop_loop);
+
+ add_lint($3, LINT_assign_in_cond);
+ $1->opcode = Op_push_loop;
+ $1->target_continue = $3->nexti;
+ $1->target_break = tp;
+ ip = list_create($1);
+
+ (void) list_merge(ip, $3);
+ (void) list_append(ip, instruction(Op_jmp_false));
+ ip->lasti->target_jmp = tp;
+
+ if (do_profiling) {
+ (void) list_append(ip, instruction(Op_exec_count));
+ ($1 + 1)->opcode = Op_K_while;
+ ($1 + 1)->while_body = ip->lasti;
+ }
+
+ if ($6 != NULL)
+ (void) list_merge(ip, $6);
+ (void) list_append(ip, instruction(Op_jmp));
+ ip->lasti->target_jmp = $1->target_continue;
+ $$ = list_append(ip, tp);
+
+ break_allowed--;
+ continue_allowed--;
+ fix_break_continue($1, tp, TRUE);
+ }
| LEX_DO opt_nls statement LEX_WHILE '(' exp r_paren opt_nls
- { $$ = node($6, Node_K_do, $3); }
- | LEX_FOR '(' NAME LEX_IN NAME r_paren opt_nls statement
{
- /*
- * Efficiency hack. Recognize the special case of
+ /*
+ * [Op_push_loop | x | y]
+ * -----------------
+ * z:
+ * body
+ * -----------------
+ * x:
+ * cond
+ * -----------------
+ * [Op_jmp_true | z ]
+ * y: [Op_pop_loop ]
+ */
+
+ INSTRUCTION *ip;
+
+ $4->opcode = Op_pop_loop;
+ $1->opcode = Op_push_loop;
+ $1->target_continue = $6->nexti;
+ $1->target_break = $4;
+
+ add_lint($6, LINT_assign_in_cond);
+ if ($3 != NULL)
+ ip = list_merge($3, $6);
+ else
+ ip = list_prepend($6, instruction(Op_no_op));
+
+ if (do_profiling) {
+ (void) list_prepend(ip, instruction(Op_exec_count));
+ ($1 + 1)->opcode = Op_K_do;
+ ($1 + 1)->doloop_cond = $1->target_continue;
+ }
+
+ (void) list_append(ip, instruction(Op_jmp_true));
+ ip->lasti->target_jmp = ip->nexti;
+ $$ = list_prepend(ip, $1);
+ (void) list_append(ip, $4);
+
+ break_allowed--;
+ continue_allowed--;
+ fix_break_continue($1, $4, TRUE);
+ }
+ | LEX_FOR '(' NAME LEX_IN simple_variable r_paren opt_nls statement
+ {
+
+ char *var_name = $3->lextok;
+
+ if ($8 != NULL
+ && $8->lasti->opcode == Op_K_delete
+ && $8->lasti->expr_count == 1
+ && $8->nexti->opcode == Op_push
+ && ($8->nexti->memory->type != Node_var || !($8->nexti->memory->var_update))
+ && strcmp($8->nexti->memory->vname, var_name) == 0
+ ) {
+
+ /* Efficiency hack. Recognize the special case of
*
* for (iggy in foo)
* delete foo[iggy]
@@ -425,113 +619,192 @@ statement
*
* Check that the body is a `delete a[i]' statement,
* and that both the loop var and array names match.
- */
- if ($8 != NULL && $8->type == Node_K_delete && $8->rnode != NULL) {
- NODE *arr, *sub;
-
- assert($8->rnode->type == Node_expression_list);
- arr = $8->lnode; /* array var */
- sub = $8->rnode->lnode; /* index var */
-
- if ( (arr->type == Node_var_new
- || arr->type == Node_var_array
- || arr->type == Node_param_list)
- && (sub->type == Node_var_new
- || sub->type == Node_var
- || sub->type == Node_param_list)
- && strcmp($3, sub->vname) == 0
- && strcmp($5, arr->vname) == 0) {
- $8->type = Node_K_delete_loop;
+ */
+ NODE *arr = NULL;
+ INSTRUCTION *ip = $8->nexti->nexti;
+
+ if ($5->nexti->opcode == Op_push && $5->lasti == $5->nexti)
+ arr = $5->nexti->memory;
+ if (arr != NULL
+ && ip->opcode == Op_no_op
+ && ip->nexti->opcode == Op_push_array
+ && strcmp(ip->nexti->memory->vname, arr->vname) == 0
+ && ip->nexti->nexti == $8->lasti
+ ) {
+ (void) make_assignable($8->nexti);
+ $8->lasti->opcode = Op_K_delete_loop;
+ $8->lasti->expr_count = 0;
+ bcfree($1);
+ efree(var_name);
+ bcfree($3);
+ bcfree($4);
+ bcfree($5);
$$ = $8;
- free($3); /* thanks to valgrind for pointing these out */
- free($5);
}
- else
- goto regular_loop;
} else {
- regular_loop:
- $$ = node($8, Node_K_arrayfor,
- make_for_loop(variable($3, CAN_FREE, Node_var),
- (NODE *) NULL, variable($5, CAN_FREE, Node_var_array)));
- }
+
+ /* [ Op_push_array a ]
+ * [ Op_arrayfor_init| w ]
+ * [ Op_push_loop | z | y ]
+ * z: [ Op_arrayfor_incr | y ]
+ * [ Op_var_assign if any ]
+ *
+ * body
+ *
+ * [Op_jmp | z ]
+ * y: [Op_pop_loop ]
+ * w: [Op_arrayfor_final ]
+ */
+ INSTRUCTION *ip;
+
+ ip = $5;
+ ip->nexti->opcode = Op_push_array;
+ $3->opcode = Op_arrayfor_init;
+ (void) list_append(ip, $3);
+
+ $4->opcode = Op_arrayfor_incr;
+ $4->array_var = variable(var_name, Node_var);
+ $1->opcode = Op_push_loop;
+ $1->target_continue = $4;
+
+ (void) list_append(ip, $1);
+
+ /* add update_FOO instruction if necessary */
+ if ($4->array_var->type == Node_var && $4->array_var->var_update) {
+ (void) list_append(ip, instruction(Op_var_update));
+ ip->lasti->memory = $4->array_var;
+ }
+ (void) list_append(ip, $4);
+
+ /* add set_FOO instruction if necessary */
+ if ($4->array_var->type == Node_var && $4->array_var->var_assign) {
+ (void) list_append(ip, instruction(Op_var_assign));
+ ip->lasti->memory = $4->array_var;
+ }
+
+ if (do_profiling) {
+ (void) list_append(ip, instruction(Op_exec_count));
+ ($1 + 1)->opcode = Op_K_arrayfor;
+ ($1 + 1)->forloop_cond = $4;
+ ($1 + 1)->forloop_body = ip->lasti;
+ }
+
+ if ($8 != NULL)
+ (void) list_merge(ip, $8);
+
+ (void) list_append(ip, instruction(Op_jmp));
+ ip->lasti->target_jmp = $4;
+ (void) list_append(ip, instruction(Op_pop_loop));
+ $4->target_jmp = $1->target_break = ip->lasti;
+ $$ = list_append(ip, instruction(Op_arrayfor_final));
+ $3->target_jmp = $$->lasti;
+
+ fix_break_continue($1, $4->target_jmp, TRUE);
+ }
+
+ break_allowed--;
+ continue_allowed--;
}
| LEX_FOR '(' opt_simple_stmt semi opt_nls exp semi opt_nls opt_simple_stmt r_paren opt_nls statement
{
- $$ = node($12, Node_K_for, (NODE *) make_for_loop($3, $6, $9));
+ $$ = mk_for_loop($1, $3, $6, $9, $12);
+
+ break_allowed--;
+ continue_allowed--;
}
| LEX_FOR '(' opt_simple_stmt semi opt_nls semi opt_nls opt_simple_stmt r_paren opt_nls statement
{
- $$ = node($11, Node_K_for,
- (NODE *) make_for_loop($3, (NODE *) NULL, $8));
+ $$ = mk_for_loop($1, $3, (INSTRUCTION *) NULL, $8, $11);
+
+ break_allowed--;
+ continue_allowed--;
+ }
+ | non_compound_stmt
+ {
+ if (do_profiling)
+ $$ = list_prepend($1, instruction(Op_exec_count));
+ else
+ $$ = $1;
+ }
+ ;
+
+non_compound_stmt
+ : LEX_BREAK statement_term
+ {
+ if (! break_allowed)
+ yyerror(_("`break' is not allowed outside a loop or switch"));
+
+ $1->target_jmp = NULL;
+ $$ = list_create($1);
+
}
- | LEX_BREAK statement_term
- /* for break, maybe we'll have to remember where to break to */
- { $$ = node((NODE *) NULL, Node_K_break, (NODE *) NULL); }
| LEX_CONTINUE statement_term
- /* similarly */
- { $$ = node((NODE *) NULL, Node_K_continue, (NODE *) NULL); }
- | LEX_NEXT statement_term
- { NODETYPE type;
+ {
+ if (! continue_allowed)
+ yyerror(_("`continue' is not allowed outside a loop"));
- if (begin_or_end_rule)
- yyerror(_("`%s' used in %s action"), "next",
- (parsing_end_rule ? "END" : "BEGIN"));
- else if (beginfile_or_endfile_rule)
- yyerror(_("`%s' used in %s action"), "next",
- (parsing_endfile_rule ? "ENDFILE" : "BEGINFILE"));
- type = Node_K_next;
- $$ = node((NODE *) NULL, type, (NODE *) NULL);
- }
+ $1->target_jmp = NULL;
+ $$ = list_create($1);
+
+ }
+ | LEX_NEXT statement_term
+ {
+ if (rule != Rule)
+ yyerror(_("`next' used in %s action"), ruletab[rule]);
+ $1->target_jmp = ip_rec;
+ $$ = list_create($1);
+ }
| LEX_NEXTFILE statement_term
- {
- static short warned = FALSE;
+ {
+ static short warned = FALSE;
- if (do_traditional) {
- /*
- * can't use yyerror, since may have overshot
- * the source line
- */
+ if (do_traditional) {
+ /*
+ * can't use yyerror, since may have overshot
+ * the source line
+ */
errcount++;
error(_("`nextfile' is a gawk extension"));
- }
- if (do_lint && ! warned) {
- warned = TRUE;
+ }
+ if (do_lint && ! warned) {
+ warned = TRUE;
lintwarn(_("`nextfile' is a gawk extension"));
- }
- if (begin_or_end_rule) {
- /* same thing */
- errcount++;
- error(_("`%s' used in %s action"), "nextfile",
- (parsing_end_rule ? "END" : "BEGIN"));
- }
-#if 0
- else if (beginfile_or_endfile_rule) {
- /* same thing */
- errcount++;
- error(_("`%s' used in %s action"), "nextfile",
- (parsing_endfile_rule ? "END" : "BEGIN"));
- }
-#endif
- else if (parsing_endfile_rule) {
- /* same thing */
+ }
+ if (rule == BEGIN || rule == END || rule == ENDFILE) {
errcount++;
- error(_("`%s' used in %s action"), "nextfile",
- (parsing_endfile_rule ? "ENDFILE" : "BEGINFILE"));
- }
- $$ = node((NODE *) NULL, Node_K_nextfile, (NODE *) NULL);
+ error(_("`nextfile' used in %s action"), ruletab[rule]);
}
+
+ $1->target_jmp = ip_newfile;
+ $1->target_endfile = ip_endfile;
+ $$ = list_create($1);
+ }
| LEX_EXIT opt_exp statement_term
- { $$ = node($2, Node_K_exit, (NODE *) NULL); }
+ {
+ if (rule == END)
+ $1->target_jmp = ip_atexit;
+ else
+ $1->target_jmp = ip_end; /* first instruction (no-op) in end block */
+
+ if ($2 == NULL) {
+ $$ = list_create($1);
+ (void) list_prepend($$, instruction(Op_push_i));
+ $$->nexti->memory = Nnull_string;
+ } else
+ $$ = list_append($2, $1);
+ }
| LEX_RETURN
- {
- if (! can_return)
+ {
+ if (! can_return)
yyerror(_("`return' used outside function context"));
- }
- opt_exp statement_term
- {
- $$ = node($3 == NULL ? Nnull_string : $3,
- Node_K_return, (NODE *) NULL);
- }
+ } opt_exp statement_term {
+ if ($3 == NULL) {
+ $$ = list_create($1);
+ (void) list_prepend($$, instruction(Op_push_i));
+ $$->nexti->memory = Nnull_string;
+ } else
+ $$ = list_append($3, $1);
+ }
| simple_stmt statement_term
;
@@ -548,136 +821,213 @@ simple_stmt
{
/*
* Optimization: plain `print' has no expression list, so $3 is null.
- * If $3 is an expression list with one element (rnode == null)
- * and lnode is a field spec for field 0, we have `print $0'.
- * For both, use Node_K_print_rec, which is faster for these two cases.
+ * If $3 is NULL or is a bytecode list for $0 use Op_K_print_rec,
+ * which is faster for these two cases.
*/
- if ($1 == Node_K_print &&
- ($3 == NULL
- || ($3->type == Node_expression_list
- && $3->rnode == NULL
- && $3->lnode->type == Node_field_spec
- && $3->lnode->lnode->type == Node_val
- && $3->lnode->lnode->numbr == 0.0))
+
+ if ($1->opcode == Op_K_print &&
+ ($3 == NULL
+ || ($3->lasti->opcode == Op_field_spec
+ && $3->nexti->nexti->nexti == $3->lasti
+ && $3->nexti->nexti->opcode == Op_push_i
+ && $3->nexti->nexti->memory->type == Node_val
+ && $3->nexti->nexti->memory->numbr == 0.0)
+ )
) {
static short warned = FALSE;
+ /* -----------------
+ * output_redir
+ * [ redirect exp ]
+ * -----------------
+ * expression_list
+ * ------------------
+ * [Op_K_print_rec | NULL | redir_type | expr_count]
+ */
- $$ = node(NULL, Node_K_print_rec, $4);
+ if ($3 != NULL) {
+ bcfree($3->lasti); /* Op_field_spec */
+ $3->nexti->nexti->memory->flags &= ~PERM;
+ $3->nexti->nexti->memory->flags |= MALLOC;
+ unref($3->nexti->nexti->memory); /* Node_val */
+ bcfree($3->nexti->nexti); /* Op_push_i */
+ bcfree($3->nexti); /* Op_list */
+ bcfree($3); /* Op_list */
+ } else {
+ if (do_lint && (rule == BEGIN || rule == END) && ! warned) {
+ warned = TRUE;
+ lintwarn(
+ _("plain `print' in BEGIN or END rule should probably be `print \"\"'"));
+ }
+ }
- if (do_lint && $3 == NULL && begin_or_end_rule && ! warned) {
- warned = TRUE;
- lintwarn(
- _("plain `print' in BEGIN or END rule should probably be `print \"\"'"));
+ $1->expr_count = 0;
+ $1->opcode = Op_K_print_rec;
+ if ($4 == NULL) { /* no redircetion */
+ $1->redir_type = 0;
+ $$ = list_create($1);
+ } else {
+ INSTRUCTION *ip;
+ ip = $4->nexti;
+ $1->redir_type = ip->redir_type;
+ $4->nexti = ip->nexti;
+ bcfree(ip);
+ $$ = list_append($4, $1);
}
} else {
- $$ = node($3, $1, $4);
- if ($$->type == Node_K_printf)
- count_args($$);
+ /* -----------------
+ * [ output_redir ]
+ * [ redirect exp ]
+ * -----------------
+ * [ expression_list ]
+ * ------------------
+ * [$1 | NULL | redir_type | expr_count]
+ *
+ */
+
+ if ($4 == NULL) { /* no redirection */
+ if ($3 == NULL) { /* printf without arg */
+ $1->expr_count = 0;
+ $1->redir_type = 0;
+ $$ = list_create($1);
+ } else {
+ INSTRUCTION *t = $3;
+ $1->expr_count = count_expressions(&t, FALSE);
+ $1->redir_type = 0;
+ $$ = list_append(t, $1);
+ }
+ } else {
+ INSTRUCTION *ip;
+ ip = $4->nexti;
+ $1->redir_type = ip->redir_type;
+ $4->nexti = ip->nexti;
+ bcfree(ip);
+ if ($3 == NULL) {
+ $1->expr_count = 0;
+ $$ = list_append($4, $1);
+ } else {
+ INSTRUCTION *t = $3;
+ $1->expr_count = count_expressions(&t, FALSE);
+ $$ = list_append(list_merge($4, t), $1);
+ }
+ }
}
}
- | LEX_DELETE NAME '[' expression_list ']'
- { $$ = node(variable($2, CAN_FREE, Node_var_array), Node_K_delete, $4); }
- | LEX_DELETE NAME
- {
- static short warned = FALSE;
- if (do_lint && ! warned) {
- warned = TRUE;
- lintwarn(_("`delete array' is a gawk extension"));
- }
- if (do_traditional) {
- /*
- * can't use yyerror, since may have overshot
- * the source line
- */
- errcount++;
- error(_("`delete array' is a gawk extension"));
- }
- $$ = node(variable($2, CAN_FREE, Node_var_array), Node_K_delete, (NODE *) NULL);
+ | LEX_DELETE NAME { sub_counter = 0; } delete_subscript_list
+ {
+ char *arr = $2->lextok;
+
+ $2->opcode = Op_push_array;
+ $2->memory = variable(arr, Node_var_array);
+
+ if ($4 == NULL) {
+ static short warned = FALSE;
+ if (do_lint && ! warned) {
+ warned = TRUE;
+ lintwarn(_("`delete array' is a gawk extension"));
+ }
+ if (do_traditional) {
+ /*
+ * can't use yyerror, since may have overshot
+ * the source line
+ */
+ errcount++;
+ error(_("`delete array' is a gawk extension"));
+ }
+ $1->expr_count = 0;
+ $$ = list_append(list_create($2), $1);
+ } else {
+ $1->expr_count = sub_counter;
+ $$ = list_append(list_append($4, $2), $1);
}
+ }
| LEX_DELETE '(' NAME ')'
- {
/*
* this is for tawk compatibility. maybe the warnings
* should always be done.
*/
- static short warned = FALSE;
+ {
+ static short warned = FALSE;
+ char *arr = $3->lextok;
- if (do_lint && ! warned) {
+ if (do_lint && ! warned) {
warned = TRUE;
lintwarn(_("`delete(array)' is a non-portable tawk extension"));
- }
- if (do_traditional) {
+ }
+ if (do_traditional) {
/*
* can't use yyerror, since may have overshot
- * the source line
+ * the source line.
*/
errcount++;
error(_("`delete(array)' is a non-portable tawk extension"));
- }
- $$ = node(variable($3, CAN_FREE, Node_var_array), Node_K_delete, (NODE *) NULL);
}
+ $3->memory = variable(arr, Node_var_array);
+ $3->opcode = Op_push_array;
+ $1->expr_count = 0;
+ $$ = list_append(list_create($3), $1);
+ }
| exp
- { $$ = $1; }
+ { $$ = optimize_assignment($1); }
;
opt_simple_stmt
: /* empty */
- { $$ = NULL; }
+ { $$ = NULL; }
| simple_stmt
- { $$ = $1; }
+ { $$ = $1; }
;
switch_body
: case_statements
- {
- if ($1 == NULL) {
- $$ = NULL;
- } else {
- NODE *dflt = NULL;
- NODE *head = $1;
- NODE *curr;
-
- const char **case_values = NULL;
-
- int maxcount = 128;
- int case_count = 0;
- int i;
-
- emalloc(case_values, const char **, sizeof(char*) * maxcount, "switch_body");
- for (curr = $1; curr != NULL; curr = curr->rnode) {
- /* Assure that case statement values are unique. */
- if (curr->lnode->type == Node_K_case) {
- char *caseval;
-
- if (curr->lnode->lnode->type == Node_regex)
- caseval = curr->lnode->lnode->re_exp->stptr;
- else
- caseval = force_string(tree_eval(curr->lnode->lnode))->stptr;
-
- for (i = 0; i < case_count; i++)
- if (strcmp(caseval, case_values[i]) == 0)
- yyerror(_("duplicate case values in switch body: %s"), caseval);
-
- if (case_count >= maxcount) {
- maxcount += 128;
- erealloc(case_values, const char **, sizeof(char*) * maxcount, "switch_body");
+ {
+ INSTRUCTION *dflt = NULL;
+
+ if ($1 != NULL) {
+ INSTRUCTION *curr;
+ const char **case_values = NULL;
+ int maxcount = 128;
+ int case_count = 0;
+ int i;
+
+ emalloc(case_values, const char **, sizeof(char *) * maxcount, "statement");
+
+ for (curr = $1->case_val->nexti; curr != NULL; curr = curr->nexti) {
+ if (curr->opcode == Op_K_case) {
+ char *caseval;
+ if (curr->memory->type == Node_regex)
+ caseval = curr->memory->re_exp->stptr;
+ else
+ caseval = force_string(curr->memory)->stptr;
+ for (i = 0; i < case_count; i++)
+ if (strcmp(caseval, case_values[i]) == 0)
+ yyerror(_("duplicate case values in switch body: %s"), caseval);
+
+ if (case_count >= maxcount) {
+ maxcount += 128;
+ erealloc(case_values, const char **, sizeof(char*) * maxcount, "statement");
+ }
+ case_values[case_count++] = caseval;
+ } else {
+ /* Otherwise save a pointer to the default node. */
+ if (dflt != NULL)
+ yyerror(_("duplicate `default' detected in switch body"));
+ dflt = curr;
}
- case_values[case_count++] = caseval;
- } else {
- /* Otherwise save a pointer to the default node. */
- if (dflt != NULL)
- yyerror(_("Duplicate `default' detected in switch body"));
- dflt = curr;
}
+
+ efree(case_values);
+ $$ = list_prepend($1->case_stmt, instruction(Op_K_switch));
+ $$->nexti->case_val = $1->case_val->nexti;
+ $$->nexti->switch_dflt = dflt;
+ bcfree($1->case_val); /* Op_list */
+ bcfree($1); /* Op_case_list */
+ } else {
+ $$ = list_create(instruction(Op_K_switch));
+ $$->nexti->case_val = NULL;
+ $$->nexti->switch_dflt = NULL;
}
-
- free(case_values);
-
- /* Create the switch body. */
- $$ = node(head, Node_switch_body, dflt);
}
- }
;
case_statements
@@ -685,20 +1035,15 @@ case_statements
{ $$ = NULL; }
| case_statements case_statement
{
- if ($2 == NULL)
+ if ($1 == NULL) {
+ $2->case_val = list_create($2->case_val);
+ $$ = $2;
+ } else {
+ (void) list_append($1->case_val, $2->case_val);
+ (void) list_merge($1->case_stmt, $2->case_stmt);
+ bcfree($2); /* Op_case_list */
$$ = $1;
- else {
- if (do_lint && isnoeffect($2->type))
- lintwarn(_("statement may have no effect"));
- if ($1 == NULL)
- $$ = node($2, Node_case_list, (NODE *) NULL);
- else
- $$ = append_right(
- ($1->type == Node_case_list ? $1 : node($1, Node_case_list, (NODE *) NULL)),
- ($2->type == Node_case_list ? $2 : node($2, Node_case_list, (NODE *) NULL))
- );
}
- yyerrok;
}
| case_statements error
{ $$ = NULL; }
@@ -706,30 +1051,77 @@ case_statements
case_statement
: LEX_CASE case_value colon opt_nls statements
- { $$ = node($2, Node_K_case, $5); }
+ {
+ INSTRUCTION *casestmt = $5;
+
+ $1->memory = $2->memory;
+ bcfree($2);
+ if ($5 == NULL)
+ casestmt = list_create(instruction(Op_no_op));
+ if (do_profiling)
+ (void) list_prepend(casestmt, instruction(Op_exec_count));
+
+ $1->target_stmt = casestmt->nexti;
+
+ /* recycle $3 as Op_case_list */
+ $3->opcode = Op_case_list;
+ $3->case_val = $1; /* Op_K_case */
+ $3->case_stmt = casestmt; /* Op_list */
+ $$ = $3;
+ }
| LEX_DEFAULT colon opt_nls statements
- { $$ = node((NODE *) NULL, Node_K_default, $4); }
+ {
+ INSTRUCTION *casestmt = $4;
+
+ if ($4 == NULL)
+ casestmt = list_create(instruction(Op_no_op));
+ if (do_profiling)
+ (void) list_prepend(casestmt, instruction(Op_exec_count));
+
+ $1->target_stmt = casestmt->nexti;
+ $2->opcode = Op_case_list;
+ $2->case_val = $1; /* Op_K_default */
+ $2->case_stmt = casestmt; /* Op_list */
+ $$ = $2;
+ }
;
case_value
: YNUMBER
- { $$ = $1; }
- | '-' YNUMBER %prec UNARY
{
- $2->numbr = -(force_number($2));
+ $1->opcode = Op_K_case;
+ $$ = $1;
+ }
+ | '-' YNUMBER %prec UNARY
+ {
+ $2->memory->numbr = -(force_number($2->memory));
+ bcfree($1);
+ $2->opcode = Op_K_case;
$$ = $2;
}
| '+' YNUMBER %prec UNARY
- { $$ = $2; }
- | YSTRING
- { $$ = $1; }
- | regexp
- { $$ = $1; }
+ {
+ bcfree($1);
+ $2->opcode = Op_K_case;
+ $$ = $2;
+ }
+ | YSTRING
+ {
+ $1->opcode = Op_K_case;
+ $$ = $1;
+ }
+ | regexp
+ {
+ $1->opcode = Op_K_case;
+ $$ = $1;
+ }
;
print
: LEX_PRINT
+ { $$ = $1; }
| LEX_PRINTF
+ { $$ = $1; }
;
/*
@@ -738,8 +1130,10 @@ print
*/
print_expression_list
: opt_expression_list
- | '(' exp comma expression_list r_paren
- { $$ = node($2, Node_expression_list, $4); }
+ | '(' expression_list r_paren
+ {
+ $$ = $2;
+ }
;
output_redir
@@ -751,25 +1145,24 @@ output_redir
}
| IO_OUT { in_print = FALSE; in_parens = 0; } common_exp
{
- $$ = node($3, $1, (NODE *) NULL);
- if ($1 == Node_redirect_twoway
- && $3->type == Node_K_getline
- && $3->rnode != NULL
- && $3->rnode->type == Node_redirect_twoway)
+ if ($1->redir_type == redirect_twoway
+ && $3->lasti->opcode == Op_K_getline_redir
+ && $3->lasti->redir_type == redirect_twoway)
yyerror(_("multistage two-way pipelines don't work"));
+ $$ = list_prepend($3, $1);
}
;
if_statement
: LEX_IF '(' exp r_paren opt_nls statement
{
- $$ = node($3, Node_K_if,
- node($6, Node_if_branches, (NODE *) NULL));
+ $$ = mk_condition($3, $1, $6, NULL, NULL);
}
| LEX_IF '(' exp r_paren opt_nls statement
LEX_ELSE opt_nls statement
- { $$ = node($3, Node_K_if,
- node($6, Node_if_branches, $9)); }
+ {
+ $$ = mk_condition($3, $1, $6, $7, $9);
+ }
;
nls
@@ -784,178 +1177,264 @@ opt_nls
input_redir
: /* empty */
- { $$ = NULL; }
+ { $$ = NULL; }
| '<' simp_exp
- { $$ = node($2, Node_redirect_input, (NODE *) NULL); }
+ {
+ bcfree($1);
+ $$ = $2;
+ }
;
opt_param_list
: /* empty */
- { $$ = NULL; }
| param_list
- { $$ = $1; }
;
param_list
: NAME
- { $$ = make_param($1); }
+ {
+ append_param($1->lextok);
+ $1->lextok = NULL;
+ bcfree($1);
+ }
| param_list comma NAME
- { $$ = append_right($1, make_param($3)); yyerrok; }
+ {
+ append_param($3->lextok);
+ $3->lextok = NULL;
+ bcfree($3);
+ yyerrok;
+ }
| error
- { $$ = NULL; }
+ { /* func_params = NULL; */ }
| param_list error
- { $$ = NULL; }
+ { /* func_params = NULL; */ }
| param_list comma error
- { $$ = NULL; }
+ { /* func_params = NULL; */ }
;
/* optional expression, as in for loop */
opt_exp
: /* empty */
- { $$ = NULL; }
+ { $$ = NULL; }
| exp
- { $$ = $1; }
+ { $$ = $1; }
;
opt_expression_list
: /* empty */
- { $$ = NULL; }
+ { $$ = NULL; }
| expression_list
- { $$ = $1; }
+ { $$ = $1; }
;
expression_list
: exp
- { $$ = node($1, Node_expression_list, (NODE *) NULL); }
+ { $$ = mk_expression_list(NULL, $1); }
| expression_list comma exp
- {
- $$ = append_right($1,
- node($3, Node_expression_list, (NODE *) NULL));
- yyerrok;
- }
+ {
+ $$ = mk_expression_list($1, $3);
+ yyerrok;
+ }
| error
- { $$ = NULL; }
+ { $$ = NULL; }
| expression_list error
- { $$ = NULL; }
+ { $$ = NULL; }
| expression_list error exp
- { $$ = NULL; }
+ { $$ = NULL; }
| expression_list comma error
- { $$ = NULL; }
+ { $$ = NULL; }
;
/* Expressions, not including the comma operator. */
-exp : variable assign_operator exp %prec ASSIGNOP
- {
- if (do_lint && $3->type == Node_regex)
+exp
+ : variable assign_operator exp %prec ASSIGNOP
+ {
+ if (do_lint && $3->lasti->opcode == Op_match_rec)
lintwarn(_("regular expression on right of assignment"));
- $$ = optimize_concat($1, $2, $3);
- }
+ $$ = mk_assignment($1, $3, $2);
+ }
| exp LEX_AND exp
- { $$ = node($1, Node_and, $3); }
+ { $$ = mk_boolean($1, $3, $2); }
| exp LEX_OR exp
- { $$ = node($1, Node_or, $3); }
+ { $$ = mk_boolean($1, $3, $2); }
| exp MATCHOP exp
- {
- if ($1->type == Node_regex)
+ {
+ if ($1->lasti->opcode == Op_match_rec)
warning(_("regular expression on left of `~' or `!~' operator"));
- $$ = node($1, $2, mk_rexp($3));
- }
- | exp LEX_IN NAME
- {
- if (do_lint_old)
- warning(_("old awk does not support the keyword `in' except after `for'"));
- $$ = node(variable($3, CAN_FREE, Node_var_array), Node_in_array, $1);
+
+ if ($3->lasti == $3->nexti && $3->nexti->opcode == Op_match_rec) {
+ $2->memory = $3->nexti->memory;
+ bcfree($3->nexti); /* Op_match_rec */
+ bcfree($3); /* Op_list */
+ $$ = list_append($1, $2);
+ } else {
+ $2->memory = make_regnode(Node_dynregex, NULL);
+ $$ = list_append(list_merge($1, $3), $2);
}
+ }
+ | exp LEX_IN simple_variable
+ {
+ if (do_lint_old)
+ warning(_("old awk does not support the keyword `in' except after `for'"));
+ $3->nexti->opcode = Op_push_array;
+ $2->opcode = Op_in_array;
+ $2->expr_count = 1;
+ $$ = list_append(list_merge($1, $3), $2);
+ }
| exp a_relop exp %prec RELOP
- {
- if (do_lint && $3->type == Node_regex)
+ {
+ if (do_lint && $3->lasti->opcode == Op_match_rec)
lintwarn(_("regular expression on right of comparison"));
- $$ = node($1, $2, $3);
- }
+ $$ = list_append(list_merge($1, $3), $2);
+ }
| exp '?' exp ':' exp
- { $$ = node($1, Node_cond_exp, node($3, Node_if_branches, $5));}
+ { $$ = mk_condition($1, $2, $3, $4, $5); }
| common_exp
- { $$ = $1; }
+ { $$ = $1; }
;
assign_operator
: ASSIGN
- { $$ = $1; }
+ { $$ = $1; }
| ASSIGNOP
- { $$ = $1; }
+ { $$ = $1; }
| SLASH_BEFORE_EQUAL ASSIGN /* `/=' */
- { $$ = Node_assign_quotient; }
+ {
+ $2->opcode = Op_assign_quotient;
+ $$ = $2;
+ }
;
relop_or_less
: RELOP
- { $$ = $1; }
+ { $$ = $1; }
| '<'
- { $$ = Node_less; }
+ { $$ = $1; }
;
+
a_relop
: relop_or_less
+ { $$ = $1; }
| '>'
- { $$ = Node_greater; }
+ { $$ = $1; }
;
common_exp
: simp_exp
- { $$ = $1; }
+ { $$ = $1; }
| simp_exp_nc
- { $$ = $1; }
+ { $$ = $1; }
| common_exp simp_exp %prec CONCAT_OP
- { $$ = constant_fold($1, Node_concat, $2); }
+ {
+ int count = 2;
+ int is_simple_var = FALSE;
+ INSTRUCTION *ip1, *ip2;
+
+ if ($1->lasti->opcode == Op_concat) {
+ /* multiple (> 2) adjacent strings optimization */
+ is_simple_var = ($1->lasti->concat_flag & CSVAR);
+ count = $1->lasti->expr_count + 1;
+ $1->lasti->opcode = Op_no_op;
+ } else {
+ is_simple_var = ($1->nexti->opcode == Op_push
+ && $1->lasti == $1->nexti); /* first exp. is a simple
+ * variable?; kludge for use
+ * in Op_assign_concat.
+ */
+ }
+ ip1 = $1->nexti;
+ ip2 = $2->nexti;
+ if (ip1->memory != NULL && ip1->memory->type == Node_val && ip1 == $1->lasti
+ && ip2->memory != NULL && ip2->memory->type == Node_val && ip2 == $2->lasti && do_optimize > 1){
+ size_t nlen;
+
+ ip1->memory = force_string(ip1->memory);
+ ip2->memory = force_string(ip2->memory);
+ nlen = ip1->memory->stlen + ip2->memory->stlen;
+ erealloc(ip1->memory->stptr, char *, nlen + 2, "constant fold");
+ memcpy(ip1->memory->stptr + ip1->memory->stlen, ip2->memory->stptr, ip2->memory->stlen);
+ ip1->memory->stlen = nlen;
+ ip1->memory->stptr[nlen] = '\0';
+ ip1->memory->flags &= ~(NUMCUR|NUMBER);
+ ip1->memory->flags |= (STRING|STRCUR);
+ bcfree($2);
+ bcfree(ip2);
+ $1->opcode = Op_push_i;
+ $$ = $1;
+ } else {
+ $$ = list_append(list_merge($1, $2), instruction(Op_concat));
+ $$->lasti->concat_flag = (is_simple_var ? CSVAR : 0);
+ $$->lasti->expr_count = count;
+ if (count > max_args)
+ max_args = count;
+ }
+ }
;
simp_exp
: non_post_simp_exp
/* Binary operators in order of decreasing precedence. */
| simp_exp '^' simp_exp
- { $$ = constant_fold($1, Node_exp, $3); }
+ { $$ = mk_binary($1, $3, $2); }
| simp_exp '*' simp_exp
- { $$ = constant_fold($1, Node_times, $3); }
+ { $$ = mk_binary($1, $3, $2); }
| simp_exp '/' simp_exp
- { $$ = constant_fold($1, Node_quotient, $3); }
+ { $$ = mk_binary($1, $3, $2); }
| simp_exp '%' simp_exp
- { $$ = constant_fold($1, Node_mod, $3); }
+ { $$ = mk_binary($1, $3, $2); }
| simp_exp '+' simp_exp
- { $$ = constant_fold($1, Node_plus, $3); }
+ { $$ = mk_binary($1, $3, $2); }
| simp_exp '-' simp_exp
- { $$ = constant_fold($1, Node_minus, $3); }
+ { $$ = mk_binary($1, $3, $2); }
| LEX_GETLINE opt_variable input_redir
- {
- /*
- * In BEGINFILE/ENDFILE, allow `getline var < file'
- */
- if (beginfile_or_endfile_rule) {
- if ($2 != NULL && $3 != NULL)
- ; /* all ok */
- else {
- if ($2 != NULL)
- fatal(_("`getline var' invalid inside %s rule"),
- parsing_endfile_rule ? "ENDFILE" : "BEGINFILE");
- else
- fatal(_("`getline' invalid inside %s rule"),
- parsing_endfile_rule ? "ENDFILE" : "BEGINFILE");
- }
- }
- if (do_lint && parsing_end_rule && $3 == NULL)
- lintwarn(_("non-redirected `getline' undefined inside END action"));
- $$ = node($2, Node_K_getline, $3);
+ {
+ /*
+ * In BEGINFILE/ENDFILE, allow `getline var < file'
+ */
+ if (rule == BEGINFILE || rule == ENDFILE) {
+ if ($2 != NULL && $3 != NULL)
+ ; /* all ok */
+ else {
+ if ($2 != NULL)
+ yyerror(_("`getline var' invalid inside `%s' rule"), ruletab[rule]);
+ else
+ yyerror(_("`getline' invalid inside `%s' rule"), ruletab[rule]);
+ YYABORT;
+ }
}
+
+ if (do_lint && rule == END && $3 == NULL)
+ lintwarn(_("non-redirected `getline' undefined inside END action"));
+ $$ = mk_getline($1, $2, $3, redirect_input);
+ }
| variable INCREMENT
- { $$ = node($1, Node_postincrement, (NODE *) NULL); }
+ {
+ $2->opcode = Op_postincrement;
+ $$ = mk_assignment($1, NULL, $2);
+ }
| variable DECREMENT
- { $$ = node($1, Node_postdecrement, (NODE *) NULL); }
- | '(' expression_list r_paren LEX_IN NAME
- {
- if (do_lint_old) {
+ {
+ $2->opcode = Op_postdecrement;
+ $$ = mk_assignment($1, NULL, $2);
+ }
+ | '(' expression_list r_paren LEX_IN simple_variable
+ {
+ if (do_lint_old) {
warning(_("old awk does not support the keyword `in' except after `for'"));
warning(_("old awk does not support multidimensional arrays"));
- }
- $$ = node(variable($5, CAN_FREE, Node_var_array), Node_in_array, $2);
}
+ $5->nexti->opcode = Op_push_array;
+ $4->opcode = Op_in_array;
+ if ($2 == NULL) { /* error */
+ errcount++;
+ $4->expr_count = 0;
+ $$ = list_merge($5, $4);
+ } else {
+ INSTRUCTION *t = $2;
+ $4->expr_count = count_expressions(&t, FALSE);
+ $$ = list_append(list_merge(t, $5), $4);
+ }
+ }
;
/* Expressions containing "| getline" lose the ability to be on the
@@ -963,161 +1442,320 @@ simp_exp
simp_exp_nc
: common_exp IO_IN LEX_GETLINE opt_variable
{
- $$ = node($4, Node_K_getline,
- node($1, $2, (NODE *) NULL));
+ $$ = mk_getline($3, $4, $1, $2->redir_type);
+ bcfree($2);
}
+ /* Binary operators in order of decreasing precedence. */
| simp_exp_nc '^' simp_exp
- { $$ = node($1, Node_exp, $3); }
+ { $$ = mk_binary($1, $3, $2); }
| simp_exp_nc '*' simp_exp
- { $$ = node($1, Node_times, $3); }
+ { $$ = mk_binary($1, $3, $2); }
| simp_exp_nc '/' simp_exp
- { $$ = node($1, Node_quotient, $3); }
+ { $$ = mk_binary($1, $3, $2); }
| simp_exp_nc '%' simp_exp
- { $$ = node($1, Node_mod, $3); }
+ { $$ = mk_binary($1, $3, $2); }
| simp_exp_nc '+' simp_exp
- { $$ = node($1, Node_plus, $3); }
+ { $$ = mk_binary($1, $3, $2); }
| simp_exp_nc '-' simp_exp
- { $$ = node($1, Node_minus, $3); }
+ { $$ = mk_binary($1, $3, $2); }
;
non_post_simp_exp
: regexp
- { $$ = $1; }
+ {
+ $$ = list_create($1);
+ }
| '!' simp_exp %prec UNARY
- { $$ = constant_fold($2, Node_not, (NODE *) NULL); }
+ {
+ if ($2->opcode == Op_match_rec) {
+ $2->opcode = Op_nomatch;
+ $1->opcode = Op_push_i;
+ $1->memory = mk_number(0.0, (PERM|NUMCUR|NUMBER));
+ $$ = list_append(list_append(list_create($1),
+ instruction(Op_field_spec)), $2);
+ } else {
+ INSTRUCTION *ip;
+ ip = $2->nexti;
+ if (ip->memory->type == Node_val && $2->lasti == ip && do_optimize > 1) {
+ NODE *ret;
+ if ((ip->memory->flags & (STRCUR|STRING)) != 0) {
+ if (ip->memory->stlen == 0) {
+ ret = make_number((AWKNUM) 1.0);
+ } else {
+ ret = make_number((AWKNUM) 0.0);
+ }
+ } else {
+ if (ip->memory->numbr == 0) {
+ ret = make_number((AWKNUM) 1.0);
+ } else {
+ ret = make_number((AWKNUM) 0.0);
+ }
+ }
+ ret->flags &= ~MALLOC;
+ ret->flags |= PERM;
+ $1->memory = ret;
+ $1->opcode = Op_push_i;
+ bcfree(ip);
+ bcfree($2);
+ $$ = list_create($1);
+ } else {
+ $1->opcode = Op_not;
+ add_lint($2, LINT_assign_in_cond);
+ $$ = list_append($2, $1);
+ }
+ }
+ }
| '(' exp r_paren
- { $$ = $2; }
- | LEX_BUILTIN
- '(' opt_expression_list r_paren
- { $$ = snode($3, Node_builtin, (int) $1); }
+ { $$ = $2; }
+ | LEX_BUILTIN '(' opt_expression_list r_paren
+ {
+ $$ = snode($3, $1);
+ if ($$ == NULL)
+ YYABORT;
+ }
| LEX_LENGTH '(' opt_expression_list r_paren
- { $$ = snode($3, Node_builtin, (int) $1); }
+ {
+ $$ = snode($3, $1);
+ if ($$ == NULL)
+ YYABORT;
+ }
| LEX_LENGTH
{
- static short warned1 = FALSE, warned2 = FALSE;
+ static short warned1 = FALSE;
if (do_lint && ! warned1) {
warned1 = TRUE;
lintwarn(_("call of `length' without parentheses is not portable"));
}
- $$ = snode((NODE *) NULL, Node_builtin, (int) $1);
- if (do_posix && ! warned2) {
- warned2 = TRUE;
- warning(_("call of `length' without parentheses is deprecated by POSIX"));
- }
+ $$ = snode(NULL, $1);
+ if ($$ == NULL)
+ YYABORT;
}
- | function_call
+ | func_call
| variable
| INCREMENT variable
- { $$ = node($2, Node_preincrement, (NODE *) NULL); }
+ {
+ $1->opcode = Op_preincrement;
+ $$ = mk_assignment($2, NULL, $1);
+ }
| DECREMENT variable
- { $$ = node($2, Node_predecrement, (NODE *) NULL); }
+ {
+ $1->opcode = Op_predecrement;
+ $$ = mk_assignment($2, NULL, $1);
+ }
| YNUMBER
- { $$ = $1; }
+ {
+ $$ = list_create($1);
+ }
| YSTRING
- { $$ = $1; }
-
+ {
+ $$ = list_create($1);
+ }
| '-' simp_exp %prec UNARY
- {
- if ($2->type == Node_val && ($2->flags & (STRCUR|STRING)) == 0) {
- $2->numbr = -(force_number($2));
+ {
+ if ($2->lasti->opcode == Op_push_i
+ && ($2->lasti->memory->flags & (STRCUR|STRING)) == 0) {
+ $2->lasti->memory->numbr = -(force_number($2->lasti->memory));
$$ = $2;
- } else
- $$ = node($2, Node_unary_minus, (NODE *) NULL);
+ bcfree($1);
+ } else {
+ $1->opcode = Op_unary_minus;
+ $$ = list_append($2, $1);
}
+ }
| '+' simp_exp %prec UNARY
- {
- /*
- * was: $$ = $2
- * POSIX semantics: force a conversion to numeric type
- */
- $$ = node (make_number(0.0), Node_plus, $2);
- }
+ {
+ /*
+ * was: $$ = $2
+ * POSIX semantics: force a conversion to numeric type
+ */
+ $1->opcode = Op_plus_i;
+ $1->memory = mk_number((AWKNUM) 0.0, (PERM|NUMCUR|NUMBER));
+ $$ = list_append($2, $1);
+ }
;
-function_call
- : direct_function_call
+func_call
+ : direct_func_call
{
- func_use($1->rnode->stptr, FUNC_USE);
+ func_use($1->lasti->func_name, FUNC_USE);
$$ = $1;
}
- | '@' direct_function_call
+ | '@' direct_func_call
{
/* indirect function call */
+ INSTRUCTION *f, *t;
+ char *name;
+ NODE *indirect_var;
static short warned = FALSE;
+ const char *msg = _("indirect function calls are a gawk extension");
- if (do_lint && ! warned) {
+ if (do_traditional || do_posix)
+ yyerror("%s", msg);
+ else if (do_lint && ! warned) {
warned = TRUE;
- lintwarn(_("indirect function calls are a gawk extension"));
+ lintwarn("%s", msg);
}
+
+ f = $2->lasti;
+ f->opcode = Op_indirect_func_call;
+ name = estrdup(f->func_name, strlen(f->func_name));
+ indirect_var = variable(name, Node_var_new);
+ if (is_std_var(name))
+ yyerror(_("can not use special variable `%s' for indirect function call"), name);
+ t = instruction(Op_push);
+ t->memory = indirect_var;
+
+ /* prepend indirect var instead of appending to arguments (opt_expression_list),
+ * and pop it off in setup_frame (eval.c) (left to right evaluation order); Test case:
+ * f = "fun"
+ * @f(f="real_fun")
+ */
- $$ = $2;
- $$->type = Node_indirect_func_call;
+ $$ = list_prepend($2, t);
}
;
-direct_function_call
+direct_func_call
: FUNC_CALL '(' opt_expression_list r_paren
{
- $$ = node($3, Node_func_call, make_string($1, strlen($1)));
- $$->funcbody = NULL;
param_sanity($3);
- free($1);
+ $1->opcode = Op_func_call;
+ $1->func_body = NULL;
+ if ($3 == NULL) { /* no argument or error */
+ ($1 + 1)->expr_count = 0;
+ $$ = list_create($1);
+ } else {
+ INSTRUCTION *t = $3;
+ ($1 + 1)->expr_count = count_expressions(&t, TRUE);
+ $$ = list_append(t, $1);
+ }
}
;
opt_variable
: /* empty */
- { $$ = NULL; }
+ { $$ = NULL; }
| variable
- { $$ = $1; }
+ { $$ = $1; }
;
-variable
+delete_subscript_list
+ : /* empty */
+ { $$ = NULL; }
+ | delete_subscript SUBSCRIPT
+ { $$ = $1; }
+ ;
+
+delete_subscript
+ : delete_exp_list
+ { $$ = $1; }
+ | delete_subscript delete_exp_list
+ {
+ $$ = list_merge($1, $2);
+ }
+ ;
+
+delete_exp_list
+ : bracketed_exp_list
+ {
+ INSTRUCTION *ip = $1->lasti;
+ int count = ip->sub_count; /* # of SUBSEP-seperated expressions */
+ if (count > 1) {
+ /* change Op_subscript or Op_sub_array to Op_concat */
+ ip->opcode = Op_concat;
+ ip->concat_flag = CSUBSEP;
+ ip->expr_count = count;
+ } else
+ ip->opcode = Op_no_op;
+ sub_counter++; /* count # of dimensions */
+ $$ = $1;
+ }
+ ;
+
+bracketed_exp_list
+ : '[' expression_list ']'
+ {
+ INSTRUCTION *t = $2;
+ if ($2 == NULL) {
+ errcount++;
+ error(_("invalid subscript expression"));
+ /* install Null string as subscript. */
+ t = list_create(instruction(Op_push_i));
+ t->nexti->memory = Nnull_string;
+ $3->sub_count = 1;
+ } else
+ $3->sub_count = count_expressions(&t, FALSE);
+ $$ = list_append(t, $3);
+ }
+ ;
+
+subscript
+ : bracketed_exp_list
+ { $$ = $1; }
+ | subscript bracketed_exp_list
+ {
+ $$ = list_merge($1, $2);
+ }
+ ;
+
+subscript_list
+ : subscript SUBSCRIPT
+ { $$ = $1; }
+ ;
+
+simple_variable
: NAME
- { $$ = variable($1, CAN_FREE, Node_var_new); }
- | NAME '[' expression_list ']'
+ {
+ char *var_name = $1->lextok;
+
+ $1->opcode = Op_push;
+ $1->memory = variable(var_name, Node_var_new);
+ $$ = list_create($1);
+ }
+ | NAME subscript_list
{
NODE *n;
- if ((n = lookup($1)) != NULL && ! isarray(n)) {
+ char *arr = $1->lextok;
+ if ((n = lookup(arr)) != NULL && ! isarray(n))
yyerror(_("use of non-array as array"));
- $$ = node(variable($1, CAN_FREE, Node_var_array), Node_subscript, $3);
- } else if ($3 == NULL) {
- fatal(_("invalid subscript expression"));
- } else if ($3->rnode == NULL) {
- $$ = node(variable($1, CAN_FREE, Node_var_array), Node_subscript, $3->lnode);
- freenode($3);
- } else
- $$ = node(variable($1, CAN_FREE, Node_var_array), Node_subscript, $3);
+ $1->memory = variable(arr, Node_var_array);
+ $1->opcode = Op_push_array;
+ $$ = list_prepend($2, $1);
}
- | field_spec { $$ = $1; }
-/*
-#if 0
- | lex_builtin
- { fatal(_("can't use built-in function `%s' as a variable"), tokstart); }
-#endif
-*/
;
-field_spec
- : '$' non_post_simp_exp opt_incdec
+variable
+ : simple_variable
{
- NODE *n = node($2, Node_field_spec, (NODE *) NULL);
- if ($3 != NULL) {
- if ($3[0] == '+')
- $$ = node(n, Node_postincrement, (NODE *) NULL);
- else
- $$ = node(n, Node_postdecrement, (NODE *) NULL);
- } else {
- $$ = n;
- }
+ INSTRUCTION *ip = $1->nexti;
+ if (ip->opcode == Op_push
+ && ip->memory->type == Node_var
+ && ip->memory->var_update
+ ) {
+ $$ = list_prepend($1, instruction(Op_var_update));
+ $$->nexti->memory = ip->memory;
+ } else
+ $$ = $1;
+ }
+ | '$' non_post_simp_exp opt_incdec
+ {
+ $$ = list_append($2, $1);
+ if ($3 != NULL)
+ mk_assignment($2, NULL, $3);
}
;
opt_incdec
- : INCREMENT { $$ = "+"; }
- | DECREMENT { $$ = "-"; }
+ : INCREMENT
+ {
+ $1->opcode = Op_postincrement;
+ }
+ | DECREMENT
+ {
+ $1->opcode = Op_postdecrement;
+ }
| /* empty */ { $$ = NULL; }
;
@@ -1143,19 +1781,19 @@ semi
;
colon
- : ':' { yyerrok; }
+ : ':' { $$ = $1; yyerrok; }
;
-comma : ',' opt_nls { yyerrok; }
+comma
+ : ',' opt_nls { yyerrok; }
;
-
%%
struct token {
- const char *operator; /* text to match */
- NODETYPE value; /* node type */
- int class; /* lexical class */
- unsigned flags; /* # of args. allowed and compatability */
+ const char *operator; /* text to match */
+ OPCODE value; /* type */
+ int class; /* lexical class */
+ unsigned flags; /* # of args. allowed and compatability */
# define ARGS 0xFF /* 0, 1, 2, 3 args allowed (any combination */
# define A(n) (1<<(n))
# define VERSION_MASK 0xFF00 /* old awk is zero */
@@ -1163,7 +1801,9 @@ struct token {
# define NOT_POSIX 0x0200 /* feature not in POSIX */
# define GAWKX 0x0400 /* gawk extension */
# define RESX 0x0800 /* Bell Labs Research extension */
- NODE *(*ptr) P((NODE *)); /* function that implements this keyword */
+# define BREAK 0x1000 /* break allowed inside */
+# define CONTINUE 0x2000 /* continue allowed inside */
+ NODE *(*ptr)(int); /* function that implements this keyword */
};
#if 'a' == 0x81 /* it's EBCDIC */
@@ -1188,77 +1828,79 @@ tokcompare(void *l, void *r)
*/
static const struct token tokentab[] = {
-{"BEGIN", Node_illegal, LEX_BEGIN, 0, 0},
-{"BEGINFILE", Node_illegal, LEX_BEGINFILE, GAWKX, 0},
-{"END", Node_illegal, LEX_END, 0, 0},
-{"ENDFILE", Node_illegal, LEX_ENDFILE, GAWKX, 0},
+{"BEGIN", Op_rule, LEX_BEGIN, 0, 0},
+{"BEGINFILE", Op_rule, LEX_BEGINFILE, GAWKX, 0},
+{"END", Op_rule, LEX_END, 0, 0},
+{"ENDFILE", Op_rule, LEX_ENDFILE, GAWKX, 0},
#ifdef ARRAYDEBUG
-{"adump", Node_builtin, LEX_BUILTIN, GAWKX|A(1), do_adump},
+{"adump", Op_builtin, LEX_BUILTIN, GAWKX|A(1), do_adump},
#endif
-{"and", Node_builtin, LEX_BUILTIN, GAWKX|A(2), do_and},
-{"asort", Node_builtin, LEX_BUILTIN, GAWKX|A(1)|A(2), do_asort},
-{"asorti", Node_builtin, LEX_BUILTIN, GAWKX|A(1)|A(2), do_asorti},
-{"atan2", Node_builtin, LEX_BUILTIN, NOT_OLD|A(2), do_atan2},
-{"bindtextdomain", Node_builtin, LEX_BUILTIN, GAWKX|A(1)|A(2), do_bindtextdomain},
-{"break", Node_K_break, LEX_BREAK, 0, 0},
-{"case", Node_K_case, LEX_CASE, GAWKX, 0},
-{"close", Node_builtin, LEX_BUILTIN, NOT_OLD|A(1)|A(2), do_close},
-{"compl", Node_builtin, LEX_BUILTIN, GAWKX|A(1), do_compl},
-{"continue", Node_K_continue, LEX_CONTINUE, 0, 0},
-{"cos", Node_builtin, LEX_BUILTIN, NOT_OLD|A(1), do_cos},
-{"dcgettext", Node_builtin, LEX_BUILTIN, GAWKX|A(1)|A(2)|A(3), do_dcgettext},
-{"dcngettext", Node_builtin, LEX_BUILTIN, GAWKX|A(1)|A(2)|A(3)|A(4)|A(5), do_dcngettext},
-{"default", Node_K_default, LEX_DEFAULT, GAWKX, 0},
-{"delete", Node_K_delete, LEX_DELETE, NOT_OLD, 0},
-{"do", Node_K_do, LEX_DO, NOT_OLD, 0},
-{"else", Node_illegal, LEX_ELSE, 0, 0},
-{"exit", Node_K_exit, LEX_EXIT, 0, 0},
-{"exp", Node_builtin, LEX_BUILTIN, A(1), do_exp},
-{"extension", Node_builtin, LEX_BUILTIN, GAWKX|A(2), do_ext},
-{"fflush", Node_builtin, LEX_BUILTIN, RESX|A(0)|A(1), do_fflush},
-{"for", Node_K_for, LEX_FOR, 0, 0},
-{"func", Node_K_function, LEX_FUNCTION, NOT_POSIX|NOT_OLD, 0},
-{"function", Node_K_function, LEX_FUNCTION, NOT_OLD, 0},
-{"gensub", Node_builtin, LEX_BUILTIN, GAWKX|A(3)|A(4), do_gensub},
-{"getline", Node_K_getline, LEX_GETLINE, NOT_OLD, 0},
-{"gsub", Node_builtin, LEX_BUILTIN, NOT_OLD|A(2)|A(3), do_gsub},
-{"if", Node_K_if, LEX_IF, 0, 0},
-{"in", Node_illegal, LEX_IN, 0, 0},
-{"index", Node_builtin, LEX_BUILTIN, A(2), do_index},
-{"int", Node_builtin, LEX_BUILTIN, A(1), do_int},
-{"length", Node_builtin, LEX_LENGTH, A(0)|A(1), do_length},
-{"log", Node_builtin, LEX_BUILTIN, A(1), do_log},
-{"lshift", Node_builtin, LEX_BUILTIN, GAWKX|A(2), do_lshift},
-{"match", Node_builtin, LEX_BUILTIN, NOT_OLD|A(2)|A(3), do_match},
-{"mktime", Node_builtin, LEX_BUILTIN, GAWKX|A(1), do_mktime},
-{"next", Node_K_next, LEX_NEXT, 0, 0},
-{"nextfile", Node_K_nextfile, LEX_NEXTFILE, GAWKX, 0},
-{"or", Node_builtin, LEX_BUILTIN, GAWKX|A(2), do_or},
-{"patsplit", Node_builtin, LEX_BUILTIN, GAWKX|A(2)|A(3)|A(4), do_patsplit},
-{"print", Node_K_print, LEX_PRINT, 0, 0},
-{"printf", Node_K_printf, LEX_PRINTF, 0, 0},
-{"rand", Node_builtin, LEX_BUILTIN, NOT_OLD|A(0), do_rand},
-{"return", Node_K_return, LEX_RETURN, NOT_OLD, 0},
-{"rshift", Node_builtin, LEX_BUILTIN, GAWKX|A(2), do_rshift},
-{"sin", Node_builtin, LEX_BUILTIN, NOT_OLD|A(1), do_sin},
-{"split", Node_builtin, LEX_BUILTIN, A(2)|A(3)|A(4), do_split},
-{"sprintf", Node_builtin, LEX_BUILTIN, 0, do_sprintf},
-{"sqrt", Node_builtin, LEX_BUILTIN, A(1), do_sqrt},
-{"srand", Node_builtin, LEX_BUILTIN, NOT_OLD|A(0)|A(1), do_srand},
+{"and", Op_builtin, LEX_BUILTIN, GAWKX|A(2), do_and},
+{"asort", Op_builtin, LEX_BUILTIN, GAWKX|A(1)|A(2), do_asort},
+{"asorti", Op_builtin, LEX_BUILTIN, GAWKX|A(1)|A(2), do_asorti},
+{"atan2", Op_builtin, LEX_BUILTIN, NOT_OLD|A(2), do_atan2},
+{"bindtextdomain", Op_builtin, LEX_BUILTIN, GAWKX|A(1)|A(2), do_bindtextdomain},
+{"break", Op_K_break, LEX_BREAK, 0, 0},
+{"case", Op_K_case, LEX_CASE, GAWKX, 0},
+{"close", Op_builtin, LEX_BUILTIN, NOT_OLD|A(1)|A(2), do_close},
+{"compl", Op_builtin, LEX_BUILTIN, GAWKX|A(1), do_compl},
+{"continue", Op_K_continue, LEX_CONTINUE, 0, 0},
+{"cos", Op_builtin, LEX_BUILTIN, NOT_OLD|A(1), do_cos},
+{"dcgettext", Op_builtin, LEX_BUILTIN, GAWKX|A(1)|A(2)|A(3), do_dcgettext},
+{"dcngettext", Op_builtin, LEX_BUILTIN, GAWKX|A(1)|A(2)|A(3)|A(4)|A(5), do_dcngettext},
+{"default", Op_K_default, LEX_DEFAULT, GAWKX, 0},
+{"delete", Op_K_delete, LEX_DELETE, NOT_OLD, 0},
+{"do", Op_symbol, LEX_DO, NOT_OLD|BREAK|CONTINUE, 0},
+{"else", Op_K_else, LEX_ELSE, 0, 0},
+{"eval", Op_symbol, LEX_EVAL, 0, 0},
+{"exit", Op_K_exit, LEX_EXIT, 0, 0},
+{"exp", Op_builtin, LEX_BUILTIN, A(1), do_exp},
+{"extension", Op_builtin, LEX_BUILTIN, GAWKX|A(2), do_ext},
+{"fflush", Op_builtin, LEX_BUILTIN, RESX|A(0)|A(1), do_fflush},
+{"for", Op_symbol, LEX_FOR, BREAK|CONTINUE, 0},
+{"func", Op_func, LEX_FUNCTION, NOT_POSIX|NOT_OLD, 0},
+{"function",Op_func, LEX_FUNCTION, NOT_OLD, 0},
+{"gensub", Op_builtin, LEX_BUILTIN, GAWKX|A(3)|A(4), do_gensub},
+{"getline", Op_K_getline_redir, LEX_GETLINE, NOT_OLD, 0},
+{"gsub", Op_builtin, LEX_BUILTIN, NOT_OLD|A(2)|A(3), do_gsub},
+{"if", Op_K_if, LEX_IF, 0, 0},
+{"in", Op_symbol, LEX_IN, 0, 0},
+{"include", Op_symbol, LEX_INCLUDE, GAWKX, 0},
+{"index", Op_builtin, LEX_BUILTIN, A(2), do_index},
+{"int", Op_builtin, LEX_BUILTIN, A(1), do_int},
+{"length", Op_builtin, LEX_LENGTH, A(0)|A(1), do_length},
+{"log", Op_builtin, LEX_BUILTIN, A(1), do_log},
+{"lshift", Op_builtin, LEX_BUILTIN, GAWKX|A(2), do_lshift},
+{"match", Op_builtin, LEX_BUILTIN, NOT_OLD|A(2)|A(3), do_match},
+{"mktime", Op_builtin, LEX_BUILTIN, GAWKX|A(1), do_mktime},
+{"next", Op_K_next, LEX_NEXT, 0, 0},
+{"nextfile", Op_K_nextfile, LEX_NEXTFILE, GAWKX, 0},
+{"or", Op_builtin, LEX_BUILTIN, GAWKX|A(2), do_or},
+{"patsplit", Op_builtin, LEX_BUILTIN, GAWKX|A(2)|A(3)|A(4), do_patsplit},
+{"print", Op_K_print, LEX_PRINT, 0, 0},
+{"printf", Op_K_printf, LEX_PRINTF, 0, 0},
+{"rand", Op_builtin, LEX_BUILTIN, NOT_OLD|A(0), do_rand},
+{"return", Op_K_return, LEX_RETURN, NOT_OLD, 0},
+{"rshift", Op_builtin, LEX_BUILTIN, GAWKX|A(2), do_rshift},
+{"sin", Op_builtin, LEX_BUILTIN, NOT_OLD|A(1), do_sin},
+{"split", Op_builtin, LEX_BUILTIN, A(2)|A(3)|A(4), do_split},
+{"sprintf", Op_builtin, LEX_BUILTIN, 0, do_sprintf},
+{"sqrt", Op_builtin, LEX_BUILTIN, A(1), do_sqrt},
+{"srand", Op_builtin, LEX_BUILTIN, NOT_OLD|A(0)|A(1), do_srand},
#if defined(GAWKDEBUG) || defined(ARRAYDEBUG) /* || ... */
-{"stopme", Node_builtin, LEX_BUILTIN, GAWKX|A(0), stopme},
+{"stopme", Op_builtin, LEX_BUILTIN, GAWKX|A(0), stopme},
#endif
-{"strftime", Node_builtin, LEX_BUILTIN, GAWKX|A(0)|A(1)|A(2)|A(3), do_strftime},
-{"strtonum", Node_builtin, LEX_BUILTIN, GAWKX|A(1), do_strtonum},
-{"sub", Node_builtin, LEX_BUILTIN, NOT_OLD|A(2)|A(3), do_sub},
-{"substr", Node_builtin, LEX_BUILTIN, A(2)|A(3), do_substr},
-{"switch", Node_K_switch, LEX_SWITCH, GAWKX, 0},
-{"system", Node_builtin, LEX_BUILTIN, NOT_OLD|A(1), do_system},
-{"systime", Node_builtin, LEX_BUILTIN, GAWKX|A(0), do_systime},
-{"tolower", Node_builtin, LEX_BUILTIN, NOT_OLD|A(1), do_tolower},
-{"toupper", Node_builtin, LEX_BUILTIN, NOT_OLD|A(1), do_toupper},
-{"while", Node_K_while, LEX_WHILE, 0, 0},
-{"xor", Node_builtin, LEX_BUILTIN, GAWKX|A(2), do_xor},
+{"strftime", Op_builtin, LEX_BUILTIN, GAWKX|A(0)|A(1)|A(2)|A(3), do_strftime},
+{"strtonum", Op_builtin, LEX_BUILTIN, GAWKX|A(1), do_strtonum},
+{"sub", Op_builtin, LEX_BUILTIN, NOT_OLD|A(2)|A(3), do_sub},
+{"substr", Op_builtin, LEX_BUILTIN, A(2)|A(3), do_substr},
+{"switch", Op_symbol, LEX_SWITCH, GAWKX|BREAK, 0},
+{"system", Op_builtin, LEX_BUILTIN, NOT_OLD|A(1), do_system},
+{"systime", Op_builtin, LEX_BUILTIN, GAWKX|A(0), do_systime},
+{"tolower", Op_builtin, LEX_BUILTIN, NOT_OLD|A(1), do_tolower},
+{"toupper", Op_builtin, LEX_BUILTIN, NOT_OLD|A(1), do_toupper},
+{"while", Op_symbol, LEX_WHILE, BREAK|CONTINUE, 0},
+{"xor", Op_builtin, LEX_BUILTIN, GAWKX|A(2), do_xor},
};
#ifdef MBS_SUPPORT
@@ -1281,9 +1923,9 @@ static int cur_ring_idx;
/* getfname --- return name of a builtin function (for pretty printing) */
const char *
-getfname(register NODE *(*fptr)(NODE *))
+getfname(NODE *(*fptr)(int))
{
- register int i, j;
+ int i, j;
j = sizeof(tokentab) / sizeof(tokentab[0]);
/* linear search, no other way to do it */
@@ -1302,22 +1944,44 @@ getfname(register NODE *(*fptr)(NODE *))
*/
static void
-#ifdef CAN_USE_STDARG_H
- yyerror(const char *m, ...)
-#else
-/* VARARGS0 */
- yyerror(va_alist)
- va_dcl
-#endif
+yyerror(const char *m, ...)
{
va_list args;
const char *mesg = NULL;
- register char *bp, *cp;
+ char *bp, *cp;
char *scan;
char *buf;
int count;
static char end_of_file_line[] = "(END OF FILE)";
char save;
+ int saveline;
+ SRCFILE *s;
+
+ /* suppress current file name, line # from `.. included from ..' msgs */
+ saveline = sourceline;
+ sourceline = 0;
+
+ for (s = sourcefile; s->stype == SRC_INC; ) {
+ int line;
+ s = s->next;
+ if (s->fd <= INVALID_HANDLE)
+ continue;
+
+ line = s->srclines;
+ /* if last token is NEWLINE, line number is off by 1. */
+ if (s->lasttok == NEWLINE)
+ line--;
+
+ msg("%s %s:%d%c",
+ s->prev == sourcefile ? "In file included from"
+ : " from",
+ (s->stype == SRC_INC ||
+ s->stype == SRC_FILE) ? s->src : "cmd. line",
+ line,
+ s->stype == SRC_INC ? ',' : ':'
+ );
+ }
+ sourceline = saveline;
errcount++;
/* Find the current line in the input file */
@@ -1357,15 +2021,9 @@ static void
*bp = save;
-#ifdef CAN_USE_STDARG_H
va_start(args, m);
if (mesg == NULL)
mesg = m;
-#else
- va_start(args);
- if (mesg == NULL)
- mesg = va_arg(args, char *);
-#endif
count = (bp - thisline) + strlen(mesg) + 2 + 1;
emalloc(buf, char *, count, "yyerror");
@@ -1384,7 +2042,333 @@ static void
strcpy(bp, mesg);
err("", buf, args);
va_end(args);
- free(buf);
+ efree(buf);
+}
+
+/* mk_program --- create a single list of instructions */
+
+static INSTRUCTION *
+mk_program()
+{
+ INSTRUCTION *cp, *tmp;
+
+#define begin_block rule_block[BEGIN]
+#define end_block rule_block[END]
+#define prog_block rule_block[Rule]
+#define beginfile_block rule_block[BEGINFILE]
+#define endfile_block rule_block[ENDFILE]
+
+ if (end_block == NULL)
+ end_block = list_create(ip_end);
+ else
+ (void) list_prepend(end_block, ip_end);
+
+ if (get_context()->level > 0) {
+ if (begin_block != NULL && prog_block != NULL)
+ cp = list_merge(begin_block, prog_block);
+ else
+ cp = (begin_block != NULL) ? begin_block : prog_block;
+
+ if (cp != NULL)
+ (void) list_merge(cp, end_block);
+ else
+ cp = end_block;
+
+ (void) list_append(cp, instruction(Op_stop));
+ goto out;
+ }
+
+ if (endfile_block == NULL)
+ endfile_block = list_create(ip_endfile);
+ else {
+ extern int has_endfile; /* kludge for use in inrec (io.c) */
+ has_endfile = TRUE;
+ (void) list_prepend(endfile_block, ip_endfile);
+ }
+
+ if (beginfile_block == NULL)
+ beginfile_block = list_create(ip_beginfile);
+ else
+ (void) list_prepend(beginfile_block, ip_beginfile);
+
+ if (prog_block == NULL) {
+ if (end_block->nexti == end_block->lasti
+ && beginfile_block->nexti == beginfile_block->lasti
+ && endfile_block->nexti == endfile_block->lasti
+ ) {
+ /* no pattern-action and (real) end, beginfile or endfile blocks */
+ bcfree(ip_rec);
+ bcfree(ip_newfile);
+ ip_rec = ip_newfile = NULL;
+
+ list_append(beginfile_block, instruction(Op_after_beginfile));
+ (void) list_append(endfile_block, instruction(Op_after_endfile));
+
+ if (begin_block == NULL) /* no program at all */
+ cp = end_block;
+ else
+ cp = list_merge(begin_block, end_block);
+ (void) list_append(cp, ip_atexit);
+ (void) list_append(cp, instruction(Op_stop));
+
+ /* append beginfile_block and endfile_block for sole use
+ * in getline without redirection (Op_K_getline).
+ */
+
+ (void) list_merge(cp, beginfile_block);
+ (void) list_merge(cp, endfile_block);
+
+ goto out;
+
+ } else {
+ /* install a do-nothing prog block */
+ prog_block = list_create(instruction(Op_no_op));
+ }
+ }
+
+ (void) list_append(endfile_block, instruction(Op_after_endfile));
+ (void) list_prepend(prog_block, ip_rec);
+ (void) list_append(prog_block, instruction(Op_jmp));
+ prog_block->lasti->target_jmp = ip_rec;
+
+ list_append(beginfile_block, instruction(Op_after_beginfile));
+
+ cp = list_merge(beginfile_block, prog_block);
+ (void) list_prepend(cp, ip_newfile);
+ (void) list_merge(cp, endfile_block);
+ (void) list_merge(cp, end_block);
+ if (begin_block != NULL)
+ cp = list_merge(begin_block, cp);
+
+ (void) list_append(cp, ip_atexit);
+ (void) list_append(cp, instruction(Op_stop));
+
+out:
+ /* delete the Op_list, not needed */
+ tmp = cp->nexti;
+ bcfree(cp);
+ return tmp;
+
+#undef begin_block
+#undef end_block
+#undef prog_block
+#undef beginfile_block
+#undef endfile_block
+}
+
+/* parse_program --- read in the program and convert into a list of instructions */
+
+int
+parse_program(INSTRUCTION **pcode)
+{
+ int ret;
+
+ /* pre-create non-local jump targets
+ * ip_end (Op_no_op) -- used as jump target for `exit'
+ * outside an END block.
+ */
+ ip_end = instruction(Op_no_op);
+
+ if (get_context()->level > 0)
+ ip_newfile = ip_rec = ip_atexit = ip_beginfile = ip_endfile = NULL;
+ else {
+ ip_endfile = instruction(Op_no_op);
+ ip_beginfile = instruction(Op_no_op);
+ ip_newfile = instruction(Op_newfile); /* target for `nextfile' */
+ ip_newfile->target_jmp = ip_end;
+ ip_newfile->target_endfile = ip_endfile;
+ ip_rec = instruction(Op_get_record); /* target for `next' */
+ ip_atexit = instruction(Op_atexit); /* target for `exit' in END block */
+ }
+
+ sourcefile = srcfiles->next;
+ lexeof = FALSE;
+ lexptr = NULL;
+ lasttok = 0;
+ memset(rule_block, 0, sizeof(ruletab) * sizeof(INSTRUCTION *));
+ errcount = 0;
+ tok = tokstart != NULL ? tokstart : tokexpand();
+
+ ret = yyparse();
+ *pcode = mk_program();
+
+ /* avoid false source indications */
+ source = NULL;
+ sourceline = 0;
+
+ check_funcs();
+ return (ret || errcount);
+}
+
+/* do_add_srcfile --- add one item to srcfiles */
+
+static SRCFILE *
+do_add_srcfile(int stype, char *src, char *path, SRCFILE *thisfile)
+{
+ SRCFILE *s;
+
+ emalloc(s, SRCFILE *, sizeof(SRCFILE), "do_add_srcfile");
+ memset(s, 0, sizeof(SRCFILE));
+ s->src = estrdup(src, strlen(src));
+ s->fullpath = path;
+ s->stype = stype;
+ s->fd = INVALID_HANDLE;
+ s->next = thisfile;
+ s->prev = thisfile->prev;
+ thisfile->prev->next = s;
+ thisfile->prev = s;
+ return s;
+}
+
+/* add_srcfile --- add one item to srcfiles after checking if
+ * a source file exists and not already in list.
+ */
+
+SRCFILE *
+add_srcfile(int stype, char *src, SRCFILE *thisfile, int *already_included, int *errcode)
+{
+ SRCFILE *s;
+ struct stat sbuf;
+ char *path;
+ int errno_val = 0;
+
+ if (already_included)
+ *already_included = FALSE;
+ if (errcode)
+ *errcode = 0;
+ if (stype == SRC_CMDLINE || stype == SRC_STDIN)
+ return do_add_srcfile(stype, src, NULL, thisfile);
+
+ path = find_source(src, &sbuf, &errno_val);
+ if (path == NULL) {
+ if (errcode) {
+ *errcode = errno_val;
+ return NULL;
+ }
+ fatal(_("can't open source file `%s' for reading (%s)"),
+ src, errno_val ? strerror(errno_val) : _("reason unknown"));
+ }
+
+ for (s = srcfiles->next; s != srcfiles; s = s->next) {
+ if ((s->stype == SRC_FILE || s->stype == SRC_INC)
+ && files_are_same(& sbuf, & s->sbuf)
+ ) {
+ if (do_lint)
+ lintwarn(_("already included source file `%s'"), src);
+ efree(path);
+ if (already_included)
+ *already_included = TRUE;
+ return NULL;
+ }
+ }
+
+ s = do_add_srcfile(stype, src, path, thisfile);
+ s->sbuf = sbuf;
+ s->mtime = sbuf.st_mtime;
+ return s;
+}
+
+/* include_source --- read program from source included using `@include' */
+
+static int
+include_source(char *src)
+{
+ SRCFILE *s;
+ int errcode;
+ int already_included;
+
+ if (do_traditional || do_posix) {
+ error(_("@include is a gawk extension"));
+ errcount++;
+ return -1;
+ }
+
+ if (strlen(src) == 0) {
+ if (do_lint)
+ lintwarn(_("empty filename after @include"));
+ return 0;
+ }
+
+ s = add_srcfile(SRC_INC, src, sourcefile, &already_included, &errcode);
+ if (s == NULL) {
+ if (already_included)
+ return 0;
+ error(_("can't open source file `%s' for reading (%s)"),
+ src, errcode ? strerror(errcode) : _("reason unknown"));
+ errcount++;
+ return -1;
+ }
+
+ /* save scanner state for the current sourcefile */
+ sourcefile->srclines = sourceline;
+ sourcefile->lexptr = lexptr;
+ sourcefile->lexend = lexend;
+ sourcefile->lexptr_begin = lexptr_begin;
+ sourcefile->lexeme = lexeme;
+ sourcefile->lasttok = lasttok;
+
+ /* included file becomes the current source */
+ sourcefile = s;
+ lexptr = NULL;
+ sourceline = 0;
+ source = NULL;
+ lasttok = 0;
+ lexeof = FALSE;
+ eof_warned = FALSE;
+ return 0;
+}
+
+/* next_sourcefile --- read program from the next source in srcfiles */
+
+static void
+next_sourcefile()
+{
+ static int (*closefunc)(int fd) = NULL;
+
+ if (closefunc == NULL) {
+ char *cp = getenv("AWKREADFUNC");
+
+ /* If necessary, one day, test value for different functions. */
+ if (cp == NULL)
+ closefunc = close;
+ else
+ closefunc = one_line_close;
+ }
+
+ assert(lexeof == TRUE);
+ lexeof = FALSE;
+ eof_warned = FALSE;
+ sourcefile->srclines = sourceline; /* total no of lines in current file */
+ if (sourcefile->fd > INVALID_HANDLE) {
+ if (sourcefile->fd != fileno(stdin)) /* safety */
+ (*closefunc)(sourcefile->fd);
+ sourcefile->fd = INVALID_HANDLE;
+ }
+ if (sourcefile->buf != NULL) {
+ efree(sourcefile->buf);
+ sourcefile->buf = NULL;
+ sourcefile->lexptr_begin = NULL;
+ }
+
+ sourcefile = sourcefile->next;
+ if (sourcefile == srcfiles)
+ return;
+
+ if (sourcefile->lexptr_begin != NULL) {
+ /* resume reading from already opened file (postponed to process '@include') */
+ lexptr = sourcefile->lexptr;
+ lexend = sourcefile->lexend;
+ lasttok = sourcefile->lasttok;
+ lexptr_begin = sourcefile->lexptr_begin;
+ lexeme = sourcefile->lexeme;
+ sourceline = sourcefile->srclines;
+ source = sourcefile->src;
+ } else {
+ lexptr = NULL;
+ sourceline = 0;
+ source = NULL;
+ lasttok = 0;
+ }
}
/* get_src_buf --- read the next buffer of source program */
@@ -1392,11 +2376,11 @@ static void
static char *
get_src_buf()
{
- static int samefile = FALSE;
- static int nextfile = 0;
- static char *buf = NULL;
- static size_t buflen = 0;
- static int fd;
+ int n;
+ char *scan;
+ int newfile;
+ int savelen;
+ struct stat sbuf;
/*
* No argument prototype on readfunc on purpose,
@@ -1404,105 +2388,94 @@ get_src_buf()
* the types of arguments to read() aren't up to date.
*/
static ssize_t (*readfunc)() = 0;
- static int (*closefunc)P((int fd)) = NULL;
-
- int n;
- register char *scan;
- int newfile;
- struct stat sbuf;
- int readcount = 0;
- int l;
- char *readloc;
if (readfunc == NULL) {
char *cp = getenv("AWKREADFUNC");
/* If necessary, one day, test value for different functions. */
- if (cp == NULL) {
+ if (cp == NULL)
readfunc = read;
- closefunc = close;
- } else {
+ else
readfunc = read_one_line;
- closefunc = one_line_close;
- }
}
-again:
newfile = FALSE;
- if (nextfile > numfiles)
+ if (sourcefile == srcfiles)
return NULL;
- if (srcfiles[nextfile].stype == CMDLINE) {
- if ((l = strlen(srcfiles[nextfile].val)) == 0) {
+ if (sourcefile->stype == SRC_CMDLINE) {
+ if (sourcefile->bufsize == 0) {
+ sourcefile->bufsize = strlen(sourcefile->src);
+ lexptr = lexptr_begin = lexeme = sourcefile->src;
+ lexend = lexptr + sourcefile->bufsize;
+ sourceline = 1;
+ if (sourcefile->bufsize == 0) {
+ /*
+ * Yet Another Special case:
+ * gawk '' /path/name
+ * Sigh.
+ */
+ static short warned = FALSE;
+
+ if (do_lint && ! warned) {
+ warned = TRUE;
+ lintwarn(_("empty program text on command line"));
+ }
+ lexeof = TRUE;
+ }
+ } else if (sourcefile->buf == NULL && *(lexptr-1) != '\n') {
/*
- * Yet Another Special case:
- * gawk '' /path/name
- * Sigh.
+ * The following goop is to ensure that the source
+ * ends with a newline and that the entire current
+ * line is available for error messages.
*/
- static short warned = FALSE;
+ int offset;
+ char *buf;
- if (do_lint && ! warned) {
- warned = TRUE;
- lintwarn(_("empty program text on command line"));
- }
- ++nextfile;
- goto again;
- }
- if (srcfiles[nextfile].val[l-1] == '\n') {
- /* has terminating newline, can use it directly */
- sourceline = 1;
- source = NULL;
- lexptr = lexptr_begin = srcfiles[nextfile].val;
- /* fall through to pointer adjustment and return, below */
- } else {
- /* copy it into static buffer */
-
- /* make sure buffer exists and has room */
- if (buflen == 0) {
- emalloc(buf, char *, l+2, "get_src_buf");
- buflen = l + 2;
- } else if (l+2 > buflen) {
- erealloc(buf, char *, l+2, "get_src_buf");
- buflen = l + 2;
- } /* else
- buffer has room, just use it */
-
- /* copy in data */
- memcpy(buf, srcfiles[nextfile].val, l);
- buf[l] = '\n';
- buf[++l] = '\0';
-
- /* set vars and return */
- sourceline = 0;
- source = NULL;
- lexptr = lexptr_begin = buf;
- }
- lexend = lexptr + l;
- nextfile++; /* for next entry to this routine */
+ offset = lexptr - lexeme;
+ for (scan = lexeme; scan > lexptr_begin; scan--)
+ if (*scan == '\n') {
+ scan++;
+ break;
+ }
+ savelen = lexptr - scan;
+ emalloc(buf, char *, savelen + 1, "get_src_buf");
+ memcpy(buf, scan, savelen);
+ thisline = buf;
+ lexptr = buf + savelen;
+ *lexptr = '\n';
+ lexeme = lexptr - offset;
+ lexptr_begin = buf;
+ lexend = lexptr + 1;
+ sourcefile->buf = buf;
+ } else
+ lexeof = TRUE;
return lexptr;
}
- if (! samefile) {
- source = srcfiles[nextfile].val;
- if (source == NULL) { /* read all the source files, all done */
- if (buf != NULL) {
- free(buf);
- buf = NULL;
- }
- buflen = 0;
- return lexeme = lexptr = lexptr_begin = NULL;
- }
- fd = pathopen(source);
+ if (sourcefile->fd <= INVALID_HANDLE) {
+ int fd;
+ int l;
+
+ source = sourcefile->src;
+ if (source == NULL)
+ return NULL;
+ fd = srcopen(sourcefile);
if (fd <= INVALID_HANDLE) {
char *in;
/* suppress file name and line no. in error mesg */
in = source;
source = NULL;
- fatal(_("can't open source file `%s' for reading (%s)"),
+ error(_("can't open source file `%s' for reading (%s)"),
in, strerror(errno));
+ errcount++;
+ lexeof = TRUE;
+ return sourcefile->src;
}
- l = optimal_bufsize(fd, & sbuf);
+
+ sourcefile->fd = fd;
+ l = optimal_bufsize(fd, &sbuf);
/*
* Make sure that something silly like
* AWKBUFSIZE=8 make check
@@ -1512,110 +2485,71 @@ again:
if (l < A_DECENT_BUFFER_SIZE)
l = A_DECENT_BUFFER_SIZE;
#undef A_DECENT_BUFFER_SIZE
-
+ sourcefile->bufsize = l;
newfile = TRUE;
-
- /* make sure buffer exists and has room */
- if (buflen == 0) {
- emalloc(buf, char *, l+2, "get_src_buf");
- buflen = l + 2;
- } else if (l+2 > buflen) {
- erealloc(buf, char *, l+2, "get_src_buf");
- buflen = l + 2;
- } /* else
- buffer has room, just use it */
-
- readcount = l;
- readloc = lexeme = lexptr = lexptr_begin = buf;
- samefile = TRUE;
+ emalloc(sourcefile->buf, char *, sourcefile->bufsize, "get_src_buf");
+ lexptr = lexptr_begin = lexeme = sourcefile->buf;
+ savelen = 0;
sourceline = 1;
+ thisline = NULL;
} else {
/*
- * In same file, ran off edge of buffer.
- * Shift current line down to front, adjust
- * pointers and fill in the rest of the buffer.
+ * Here, we retain the current source line in the beginning of the buffer.
*/
-
- int lexeme_offset = lexeme - lexptr_begin;
- int lexptr_offset = lexptr - lexptr_begin;
- int lexend_offset = lexend - lexptr_begin;
-
- /* find beginning of current line */
- for (scan = lexeme; scan >= lexptr_begin; scan--) {
+ int offset;
+ for (scan = lexeme; scan > lexptr_begin; scan--)
if (*scan == '\n') {
scan++;
break;
}
- }
- /*
- * This condition can be read as follows: IF
- * 1. The beginning of the line is at the beginning of the
- * buffer (no newline was found: scan <= buf)
- * AND:
- * 2. The start of valid lexical data is into the buffer
- * (lexptr_begin > buf)
- * OR:
- * 3. We have scanned past the end of the last data read
- * (lexptr == lexend)
- * AND:
- * 4. There's no room left in the buffer
- * (lexptr_offset >= buflen - 2)
- *
- * If all that's true, grow the buffer to add more to
- * the current line.
- */
+ savelen = lexptr - scan;
+ offset = lexptr - lexeme;
- if (scan <= buf
- && (lexptr_begin > buf
- || (lexptr == lexend
- && lexptr_offset >= buflen - 2))) {
- /* have to grow the buffer */
- buflen *= 2;
- erealloc(buf, char *, buflen, "get_src_buf");
- } else if (scan > buf) {
- /* Line starts in middle of the buffer, shift things down. */
- memmove(buf, scan, lexend - scan);
+ if (savelen > 0) {
/*
- * make offsets relative to start of line,
- * not start of buffer.
+ * Need to make sure we have room left for reading new text;
+ * grow the buffer (by doubling, an arbitrary choice), if the retained line
+ * takes up more than a certain percentage (50%, again an arbitrary figure)
+ * of the available space.
*/
- lexend_offset = lexend - scan;
- lexeme_offset = lexeme - scan;
- lexptr_offset = lexptr - scan;
- }
-
- /* adjust pointers */
- lexeme = buf + lexeme_offset;
- lexptr = buf + lexptr_offset;
- lexend = buf + lexend_offset;
- lexptr_begin = buf;
- readcount = buflen - (lexend - buf);
- readloc = lexend;
- }
-
- /* add more data to buffer */
- n = (*readfunc)(fd, readloc, readcount);
- if (n == -1)
- fatal(_("can't read sourcefile `%s' (%s)"),
- source, strerror(errno));
- if (n == 0) {
- if (newfile) {
- static short warned = FALSE;
- if (do_lint && ! warned) {
+ if (savelen > sourcefile->bufsize / 2) { /* long line or token */
+ sourcefile->bufsize *= 2;
+ erealloc(sourcefile->buf, char *, sourcefile->bufsize, "get_src_buf");
+ scan = sourcefile->buf + (scan - lexptr_begin);
+ lexptr_begin = sourcefile->buf;
+ }
+
+ thisline = lexptr_begin;
+ memmove(thisline, scan, savelen);
+ lexptr = thisline + savelen;
+ lexeme = lexptr - offset;
+ } else {
+ savelen = 0;
+ lexptr = lexeme = lexptr_begin;
+ thisline = NULL;
+ }
+ }
+
+ n = (*readfunc)(sourcefile->fd, lexptr, sourcefile->bufsize - savelen);
+ if (n == -1) {
+ error(_("can't read sourcefile `%s' (%s)"),
+ source, strerror(errno));
+ errcount++;
+ lexeof = TRUE;
+ } else {
+ lexend = lexptr + n;
+ if (n == 0) {
+ static short warned = FALSE;
+ if (do_lint && newfile && ! warned){
warned = TRUE;
lintwarn(_("source file `%s' is empty"), source);
}
+ lexeof = TRUE;
}
- if (fd != fileno(stdin)) /* safety */
- (*closefunc)(fd);
- samefile = FALSE;
- nextfile++;
- goto again;
}
- lexend = lexptr + n;
- return lexptr;
+ return sourcefile->buf;
}
/* tokadd --- add a character to the token buffer */
@@ -1624,20 +2558,23 @@ again:
/* tokexpand --- grow the token buffer */
-char *
+static char *
tokexpand()
{
- static int toksize = 60;
+ static int toksize;
int tokoffset;
-
- tokoffset = tok - tokstart;
- toksize *= 2;
- if (tokstart != NULL)
+
+ if (tokstart != NULL) {
+ tokoffset = tok - tokstart;
+ toksize *= 2;
erealloc(tokstart, char *, toksize, "tokexpand");
- else
+ tok = tokstart + tokoffset;
+ } else {
+ toksize = 60;
emalloc(tokstart, char *, toksize, "tokexpand");
+ tok = tokstart;
+ }
tokend = tokstart + toksize;
- tok = tokstart + tokoffset;
return tok;
}
@@ -1649,9 +2586,13 @@ static int
nextc(void)
{
if (gawk_mb_cur_max > 1) {
- if (!lexptr || lexptr >= lexend) {
- if (! get_src_buf())
- return EOF;
+again:
+ if (lexeof)
+ return END_FILE;
+ if (lexptr == NULL || lexptr >= lexend) {
+ if (get_src_buf())
+ goto again;
+ return END_SRC;
}
/* Update the buffer index. */
@@ -1664,7 +2605,7 @@ nextc(void)
int idx, work_ring_idx = cur_ring_idx;
mbstate_t tmp_state;
size_t mbclen;
-
+
for (idx = 0 ; lexptr + idx < lexend ; idx++) {
tmp_state = cur_mbstate;
mbclen = mbrlen(lexptr, idx + 1, &tmp_state);
@@ -1695,44 +2636,30 @@ nextc(void)
}
return (int) (unsigned char) *lexptr++;
- }
- else {
- int c;
-
- if (lexptr && lexptr < lexend)
- c = (int) (unsigned char) *lexptr++;
- else if (get_src_buf())
- c = (int) (unsigned char) *lexptr++;
- else
- c = EOF;
-
- return c;
+ } else {
+ do {
+ if (lexeof)
+ return END_FILE;
+ if (lexptr && lexptr < lexend)
+ return ((int) (unsigned char) *lexptr++);
+ } while (get_src_buf());
+ return END_SRC;
}
}
#else /* MBS_SUPPORT */
-#if GAWKDEBUG
int
-nextc(void)
+nextc()
{
- int c;
-
- if (lexptr && lexptr < lexend)
- c = (int) (unsigned char) *lexptr++;
- else if (get_src_buf())
- c = (int) (unsigned char) *lexptr++;
- else
- c = EOF;
-
- return c;
+ do {
+ if (lexeof)
+ return END_FILE;
+ if (lexptr && lexptr < lexend)
+ return ((int) (unsigned char) *lexptr++);
+ } while (get_src_buf());
+ return END_SRC;
}
-#else
-#define nextc() ((lexptr && lexptr < lexend) ? \
- ((int) (unsigned char) *lexptr++) : \
- (get_src_buf() ? ((int) (unsigned char) *lexptr++) : EOF) \
- )
-#endif
#endif /* MBS_SUPPORT */
@@ -1746,7 +2673,7 @@ pushback(void)
cur_ring_idx = (cur_ring_idx == 0)? RING_BUFFER_SIZE - 1 :
cur_ring_idx - 1;
#endif
- (lexptr && lexptr > lexptr_begin ? lexptr-- : lexptr);
+ (! lexeof && lexptr && lexptr > lexptr_begin ? lexptr-- : lexptr);
}
@@ -1759,13 +2686,17 @@ allow_newline(void)
for (;;) {
c = nextc();
- if (c == EOF)
+ if (c == END_FILE) {
+ pushback();
break;
+ }
if (c == '#') {
- while ((c = nextc()) != '\n' && c != EOF)
+ while ((c = nextc()) != '\n' && c != END_FILE)
continue;
- if (c == EOF)
+ if (c == END_FILE) {
+ pushback();
break;
+ }
}
if (c == '\n')
sourceline++;
@@ -1781,30 +2712,44 @@ allow_newline(void)
static int
yylex(void)
{
- register int c;
+ int c;
int seen_e = FALSE; /* These are for numbers */
int seen_point = FALSE;
int esc_seen; /* for literal strings */
int mid;
static int did_newline = FALSE;
char *tokkey;
- static int lasttok = 0;
- static short eof_warned = FALSE;
int inhex = FALSE;
int intlstr = FALSE;
- if (nextc() == EOF) {
- if (lasttok != NEWLINE) {
- lasttok = NEWLINE;
- if (do_lint && ! eof_warned) {
- lintwarn(_("source file does not end in newline"));
- eof_warned = TRUE;
- }
- return NEWLINE; /* fake it */
- }
- return 0;
+#define GET_INSTRUCTION(op) bcalloc(op, 1, sourceline)
+
+ /* NB: a newline at end does not start a source line. */
+
+#define NEWLINE_EOF \
+ (lasttok != NEWLINE ? \
+ (pushback(), do_lint && ! eof_warned && \
+ (lintwarn(_("source file does not end in newline")), \
+ eof_warned = TRUE), sourceline++, NEWLINE) : \
+ (sourceline--, eof_warned = FALSE, LEX_EOF))
+
+
+ yylval = (INSTRUCTION *) NULL;
+ if (lasttok == SUBSCRIPT) {
+ lasttok = 0;
+ return SUBSCRIPT;
}
+
+ if (lasttok == LEX_EOF) /* error earlier in current source, must give up !! */
+ return 0;
+
+ c = nextc();
+ if (c == END_SRC)
+ return 0;
+ if (c == END_FILE)
+ return lasttok = NEWLINE_EOF;
pushback();
+
#if defined OS2 || defined __EMX__
/*
* added for OS/2's extproc feature of cmd.exe
@@ -1815,6 +2760,7 @@ yylex(void)
lexptr++;
}
#endif
+
lexeme = lexptr;
thisline = NULL;
if (want_regexp) {
@@ -1858,7 +2804,8 @@ yylex(void)
in_brack--;
break;
case '\\':
- if ((c = nextc()) == EOF) {
+ if ((c = nextc()) == END_FILE) {
+ pushback();
yyerror(_("unterminated regexp ends with `\\' at end of file"));
goto end_regexp; /* kludge */
} else if (c == '\n') {
@@ -1874,8 +2821,8 @@ yylex(void)
if (in_brack > 0)
break;
end_regexp:
- tokadd('\0');
- yylval.sval = tokstart;
+ yylval = GET_INSTRUCTION(Op_token);
+ yylval->lextok = estrdup(tokstart, tok - tokstart);
if (do_lint) {
int peek = nextc();
@@ -1896,7 +2843,8 @@ end_regexp:
pushback();
yyerror(_("unterminated regexp"));
goto end_regexp; /* kludge */
- case EOF:
+ case END_FILE:
+ pushback();
yyerror(_("unterminated regexp at end of file"));
goto end_regexp; /* kludge */
}
@@ -1912,42 +2860,32 @@ retry:
lexeme = lexptr ? lexptr - 1 : lexptr;
thisline = NULL;
tok = tokstart;
- yylval.nodetypeval = Node_illegal;
-
- if (gawk_mb_cur_max == 1 || nextc_is_1stbyte) switch (c) {
- case EOF:
- if (lasttok != NEWLINE) {
- lasttok = NEWLINE;
- if (do_lint && ! eof_warned) {
- lintwarn(_("source file does not end in newline"));
- eof_warned = TRUE;
- }
- return NEWLINE; /* fake it */
- }
+
+#ifdef MBS_SUPPORT
+ if (gawk_mb_cur_max == 1 || nextc_is_1stbyte)
+#endif
+ switch (c) {
+ case END_SRC:
return 0;
+ case END_FILE:
+ return lasttok = NEWLINE_EOF;
+
case '\n':
sourceline++;
return lasttok = NEWLINE;
case '#': /* it's a comment */
while ((c = nextc()) != '\n') {
- if (c == EOF) {
- if (lasttok != NEWLINE) {
- lasttok = NEWLINE;
- if (do_lint && ! eof_warned) {
- lintwarn(
- _("source file does not end in newline"));
- eof_warned = TRUE;
- }
- return NEWLINE; /* fake it */
- }
- return 0;
- }
+ if (c == END_FILE)
+ return lasttok = NEWLINE_EOF;
}
sourceline++;
return lasttok = NEWLINE;
+ case '@':
+ return lasttok = '@';
+
case '\\':
#ifdef RELAXED_CONTINUATION
/*
@@ -1969,23 +2907,27 @@ retry:
_("use of `\\ #...' line continuation is not portable"));
}
while ((c = nextc()) != '\n')
- if (c == EOF)
+ if (c == END_FILE)
break;
}
pushback();
}
#endif /* RELAXED_CONTINUATION */
- if (nextc() == '\n') {
+ c = nextc();
+ if (c == '\r') /* allow MS-DOS files. bleah */
+ c = nextc();
+ if (c == '\n') {
sourceline++;
goto retry;
} else {
yyerror(_("backslash not last character on line"));
- exit(EXIT_FAILURE);
+ return lasttok = LEX_EOF;
}
break;
case ':':
case '?':
+ yylval = GET_INSTRUCTION(Op_cond_exp);
if (! do_posix)
allow_newline();
return lasttok = c;
@@ -2000,21 +2942,36 @@ retry:
case '(':
in_parens++;
- /* FALL THROUGH */
+ return lasttok = c;
case '$':
- case ';':
+ yylval = GET_INSTRUCTION(Op_field_spec);
+ return lasttok = c;
case '{':
+ if (++in_braces == 1)
+ firstline = sourceline;
+ case ';':
case ',':
case '[':
+ return lasttok = c;
case ']':
- return lasttok = c;
+ c = nextc();
+ pushback();
+ if (c == '[') {
+ yylval = GET_INSTRUCTION(Op_sub_array);
+ lasttok = ']';
+ } else {
+ yylval = GET_INSTRUCTION(Op_subscript);
+ lasttok = SUBSCRIPT; /* end of subscripts */
+ }
+ return ']';
case '*':
if ((c = nextc()) == '=') {
- yylval.nodetypeval = Node_assign_times;
+ yylval = GET_INSTRUCTION(Op_assign_times);
return lasttok = ASSIGNOP;
} else if (do_posix) {
pushback();
+ yylval = GET_INSTRUCTION(Op_times);
return lasttok = '*';
} else if (c == '*') {
/* make ** and **= aliases for ^ and ^= */
@@ -2028,7 +2985,7 @@ retry:
if (do_lint_old)
warning(_("old awk does not support operator `**='"));
}
- yylval.nodetypeval = Node_assign_exp;
+ yylval = GET_INSTRUCTION(Op_assign_exp);
return ASSIGNOP;
} else {
pushback();
@@ -2039,10 +2996,12 @@ retry:
if (do_lint_old)
warning(_("old awk does not support operator `**'"));
}
+ yylval = GET_INSTRUCTION(Op_exp);
return lasttok = '^';
}
}
pushback();
+ yylval = GET_INSTRUCTION(Op_times);
return lasttok = '*';
case '/':
@@ -2051,14 +3010,16 @@ retry:
return lasttok = SLASH_BEFORE_EQUAL;
}
pushback();
+ yylval = GET_INSTRUCTION(Op_quotient);
return lasttok = '/';
case '%':
if (nextc() == '=') {
- yylval.nodetypeval = Node_assign_mod;
+ yylval = GET_INSTRUCTION(Op_assign_mod);
return lasttok = ASSIGNOP;
}
pushback();
+ yylval = GET_INSTRUCTION(Op_mod);
return lasttok = '%';
case '^':
@@ -2070,7 +3031,7 @@ retry:
did_warn_assgn = TRUE;
warning(_("operator `^=' is not supported in old awk"));
}
- yylval.nodetypeval = Node_assign_exp;
+ yylval = GET_INSTRUCTION(Op_assign_exp);
return lasttok = ASSIGNOP;
}
pushback();
@@ -2078,67 +3039,74 @@ retry:
did_warn_op = TRUE;
warning(_("operator `^' is not supported in old awk"));
}
+ yylval = GET_INSTRUCTION(Op_exp);
return lasttok = '^';
}
case '+':
if ((c = nextc()) == '=') {
- yylval.nodetypeval = Node_assign_plus;
+ yylval = GET_INSTRUCTION(Op_assign_plus);
return lasttok = ASSIGNOP;
}
- if (c == '+')
+ if (c == '+') {
+ yylval = GET_INSTRUCTION(Op_symbol);
return lasttok = INCREMENT;
+ }
pushback();
+ yylval = GET_INSTRUCTION(Op_plus);
return lasttok = '+';
case '!':
if ((c = nextc()) == '=') {
- yylval.nodetypeval = Node_notequal;
+ yylval = GET_INSTRUCTION(Op_notequal);
return lasttok = RELOP;
}
if (c == '~') {
- yylval.nodetypeval = Node_nomatch;
+ yylval = GET_INSTRUCTION(Op_nomatch);
return lasttok = MATCHOP;
}
pushback();
+ yylval = GET_INSTRUCTION(Op_symbol);
return lasttok = '!';
case '<':
if (nextc() == '=') {
- yylval.nodetypeval = Node_leq;
+ yylval = GET_INSTRUCTION(Op_leq);
return lasttok = RELOP;
}
- yylval.nodetypeval = Node_less;
+ yylval = GET_INSTRUCTION(Op_less);
pushback();
return lasttok = '<';
case '=':
if (nextc() == '=') {
- yylval.nodetypeval = Node_equal;
+ yylval = GET_INSTRUCTION(Op_equal);
return lasttok = RELOP;
}
- yylval.nodetypeval = Node_assign;
+ yylval = GET_INSTRUCTION(Op_assign);
pushback();
return lasttok = ASSIGN;
case '>':
if ((c = nextc()) == '=') {
- yylval.nodetypeval = Node_geq;
+ yylval = GET_INSTRUCTION(Op_geq);
return lasttok = RELOP;
} else if (c == '>') {
- yylval.nodetypeval = Node_redirect_append;
+ yylval = GET_INSTRUCTION(Op_symbol);
+ yylval->redir_type = redirect_append;
return lasttok = IO_OUT;
}
pushback();
if (in_print && in_parens == 0) {
- yylval.nodetypeval = Node_redirect_output;
+ yylval = GET_INSTRUCTION(Op_symbol);
+ yylval->redir_type = redirect_output;
return lasttok = IO_OUT;
}
- yylval.nodetypeval = Node_greater;
+ yylval = GET_INSTRUCTION(Op_greater);
return lasttok = '>';
case '~':
- yylval.nodetypeval = Node_match;
+ yylval = GET_INSTRUCTION(Op_match);
return lasttok = MATCHOP;
case '}':
@@ -2148,6 +3116,8 @@ retry:
*/
if (did_newline) {
did_newline = FALSE;
+ if (--in_braces == 0)
+ lastline = sourceline;
return lasttok = c;
}
did_newline++;
@@ -2161,7 +3131,7 @@ retry:
if (c == '\n') {
pushback();
yyerror(_("unterminated string"));
- exit(EXIT_FAILURE);
+ return lasttok = LEX_EOF;
}
if ((gawk_mb_cur_max == 1 || nextc_is_1stbyte) &&
c == '\\') {
@@ -2171,35 +3141,46 @@ retry:
continue;
}
esc_seen = TRUE;
- tokadd('\\');
+ if (! want_source || c != '"')
+ tokadd('\\');
}
- if (c == EOF) {
+ if (c == END_FILE) {
pushback();
yyerror(_("unterminated string"));
- exit(EXIT_FAILURE);
+ return lasttok = LEX_EOF;
}
tokadd(c);
}
- yylval.nodeval = make_str_node(tokstart,
- tok - tokstart, esc_seen ? SCAN : 0);
- yylval.nodeval->flags |= PERM;
+ yylval = GET_INSTRUCTION(Op_token);
+ if (want_source) {
+ yylval->lextok = estrdup(tokstart, tok - tokstart);
+ return lasttok = FILENAME;
+ }
+
+ yylval->opcode = Op_push_i;
+ yylval->memory = make_str_node(tokstart,
+ tok - tokstart, esc_seen ? SCAN : 0);
+ yylval->memory->flags &= ~MALLOC;
+ yylval->memory->flags |= PERM;
if (intlstr) {
- yylval.nodeval->flags |= INTLSTR;
+ yylval->memory->flags |= INTLSTR;
intlstr = FALSE;
if (do_intl)
- dumpintlstr(yylval.nodeval->stptr,
- yylval.nodeval->stlen);
- }
+ dumpintlstr(yylval->memory->stptr, yylval->memory->stlen);
+ }
return lasttok = YSTRING;
case '-':
if ((c = nextc()) == '=') {
- yylval.nodetypeval = Node_assign_minus;
+ yylval = GET_INSTRUCTION(Op_assign_minus);
return lasttok = ASSIGNOP;
}
- if (c == '-')
+ if (c == '-') {
+ yylval = GET_INSTRUCTION(Op_symbol);
return lasttok = DECREMENT;
+ }
pushback();
+ yylval = GET_INSTRUCTION(Op_minus);
return lasttok = '-';
case '.':
@@ -2309,13 +3290,10 @@ retry:
break;
c = nextc();
}
- if (c != EOF)
- pushback();
- else if (do_lint && ! eof_warned) {
- lintwarn(_("source file does not end in newline"));
- eof_warned = TRUE;
- }
+ pushback();
+
tokadd('\0');
+ yylval = GET_INSTRUCTION(Op_push_i);
if (! do_traditional && isnondecimal(tokstart, FALSE)) {
if (do_lint) {
if (isdigit(tokstart[1])) /* not an 'x' or 'X' */
@@ -2325,48 +3303,47 @@ retry:
lintwarn("numeric constant `%.*s' treated as hexadecimal",
(int) strlen(tokstart)-1, tokstart);
}
- yylval.nodeval = make_number(nondec2awknum(tokstart, strlen(tokstart)));
+ yylval->memory = mk_number(nondec2awknum(tokstart, strlen(tokstart)),
+ PERM|NUMCUR|NUMBER);
} else
- yylval.nodeval = make_number(atof(tokstart));
- yylval.nodeval->flags |= PERM;
+ yylval->memory = mk_number(atof(tokstart), PERM|NUMCUR|NUMBER);
return lasttok = YNUMBER;
case '&':
if ((c = nextc()) == '&') {
- yylval.nodetypeval = Node_and;
+ yylval = GET_INSTRUCTION(Op_and);
allow_newline();
return lasttok = LEX_AND;
}
pushback();
+ yylval = GET_INSTRUCTION(Op_symbol);
return lasttok = '&';
case '|':
if ((c = nextc()) == '|') {
- yylval.nodetypeval = Node_or;
+ yylval = GET_INSTRUCTION(Op_or);
allow_newline();
return lasttok = LEX_OR;
} else if (! do_traditional && c == '&') {
- yylval.nodetypeval = Node_redirect_twoway;
+ yylval = GET_INSTRUCTION(Op_symbol);
+ yylval->redir_type = redirect_twoway;
return lasttok = (in_print && in_parens == 0 ? IO_OUT : IO_IN);
}
pushback();
if (in_print && in_parens == 0) {
- yylval.nodetypeval = Node_redirect_pipe;
+ yylval = GET_INSTRUCTION(Op_symbol);
+ yylval->redir_type = redirect_pipe;
return lasttok = IO_OUT;
} else {
- yylval.nodetypeval = Node_redirect_pipein;
+ yylval = GET_INSTRUCTION(Op_symbol);
+ yylval->redir_type = redirect_pipein;
return lasttok = IO_IN;
}
-
- case '@': /* indirect function call */
- if (do_posix || do_traditional)
- break;
- return lasttok = c;
}
if (c != '_' && ! isalpha(c)) {
yyerror(_("invalid char '%c' in expression"), c);
- exit(EXIT_FAILURE);
+ return lasttok = LEX_EOF;
}
/*
@@ -2394,23 +3371,21 @@ retry:
/* it's some type of name-type-thing. Find its length. */
tok = tokstart;
- while (is_identchar(c)) {
+ while (c != END_FILE && is_identchar(c)) {
tokadd(c);
c = nextc();
}
tokadd('\0');
- emalloc(tokkey, char *, tok - tokstart, "yylex");
- memcpy(tokkey, tokstart, tok - tokstart);
- if (c != EOF)
- pushback();
- else if (do_lint && ! eof_warned) {
- lintwarn(_("source file does not end in newline"));
- eof_warned = TRUE;
- }
+ pushback();
/* See if it is a special token. */
-
if ((mid = check_special(tokstart)) >= 0) {
+ int class = tokentab[mid].class;
+
+ if ((class == LEX_INCLUDE || class == LEX_EVAL)
+ && lasttok != '@')
+ goto out;
+
if (do_lint) {
if (tokentab[mid].flags & GAWKX)
lintwarn(_("`%s' is a gawk extension"),
@@ -2425,26 +3400,64 @@ retry:
if (do_lint_old && (tokentab[mid].flags & NOT_OLD))
warning(_("`%s' is not supported in old awk"),
tokentab[mid].operator);
+ if (tokentab[mid].flags & BREAK)
+ break_allowed++;
+ if (tokentab[mid].flags & CONTINUE)
+ continue_allowed++;
if ((do_traditional && (tokentab[mid].flags & GAWKX))
|| (do_posix && (tokentab[mid].flags & NOT_POSIX)))
- ;
- else {
- if (tokentab[mid].class == LEX_BUILTIN
- || tokentab[mid].class == LEX_LENGTH)
- yylval.lval = mid;
- else
- yylval.nodetypeval = tokentab[mid].value;
- free(tokkey);
- return lasttok = tokentab[mid].class;
+ goto out;
+
+ switch (class) {
+ case LEX_INCLUDE:
+ want_source = TRUE;
+ break;
+ case LEX_EVAL:
+ if (get_context()->level == 0)
+ goto out;
+ emalloc(tokkey, char *, tok - tokstart + 1, "yylex");
+ tokkey[0] = '@';
+ memcpy(tokkey + 1, tokstart, tok - tokstart);
+ yylval = GET_INSTRUCTION(Op_token);
+ yylval->lextok = tokkey;
+ break;
+
+ case LEX_FUNCTION:
+ case LEX_BEGIN:
+ case LEX_END:
+ case LEX_BEGINFILE:
+ case LEX_ENDFILE:
+ yylval = bcalloc(tokentab[mid].value, 3, sourceline);
+ break;
+
+ case LEX_WHILE:
+ case LEX_DO:
+ case LEX_FOR:
+ case LEX_SWITCH:
+ yylval = bcalloc(tokentab[mid].value,
+ !!do_profiling + 1, sourceline);
+ break;
+
+ default:
+ yylval = GET_INSTRUCTION(tokentab[mid].value);
+ if (class == LEX_BUILTIN || class == LEX_LENGTH)
+ yylval->builtin_idx = mid;
+ break;
}
+ return lasttok = class;
}
-
- yylval.sval = tokkey;
- if (*lexptr == '(')
+out:
+ tokkey = estrdup(tokstart, tok - tokstart);
+ if (*lexptr == '(') {
+ yylval = bcalloc(Op_token, 2, sourceline);
+ yylval->lextok = tokkey;
return lasttok = FUNC_CALL;
- else {
+ } else {
static short goto_warned = FALSE;
+ yylval = GET_INSTRUCTION(Op_token);
+ yylval->lextok = tokkey;
+
#define SMART_ALECK 1
if (SMART_ALECK && do_lint
&& ! goto_warned && strcasecmp(tokkey, "goto") == 0) {
@@ -2453,147 +3466,215 @@ retry:
}
return lasttok = NAME;
}
-}
-
-/* node_common --- common code for allocating a new node */
-
-static NODE *
-node_common(NODETYPE op)
-{
- register NODE *r;
- getnode(r);
- r->type = op;
- r->flags = MALLOC;
- /* if lookahead is a NL, lineno is 1 too high */
- if (lexeme && lexeme >= lexptr_begin && *lexeme == '\n')
- r->source_line = sourceline - 1;
- else
- r->source_line = sourceline;
- r->source_file = source;
- return r;
+#undef GET_INSTRUCTION
+#undef NEWLINE_EOF
}
-/* node --- allocates a node with defined lnode and rnode. */
+/* mk_symbol --- allocates a symbol for the symbol table. */
NODE *
-node(NODE *left, NODETYPE op, NODE *right)
+mk_symbol(NODETYPE type, NODE *value)
{
- register NODE *r;
+ NODE *r;
- r = node_common(op);
- r->lnode = left;
- r->rnode = right;
+ getnode(r);
+ r->type = type;
+ r->flags = MALLOC;
+ r->lnode = value;
+ r->rnode = NULL;
+ r->var_assign = (Func_ptr) 0;
return r;
}
-/* snode --- allocate a node with defined subnode and builtin for builtin
- functions. Checks for arg. count and supplies defaults where
- possible. */
+/* snode --- instructions for builtin functions. Checks for arg. count
+ and supplies defaults where possible. */
-static NODE *
-snode(NODE *subn, NODETYPE op, int idx)
+static INSTRUCTION *
+snode(INSTRUCTION *subn, INSTRUCTION *r)
{
- register NODE *r;
- register NODE *n;
+ INSTRUCTION *arg;
+ INSTRUCTION *ip;
+ NODE *n;
int nexp = 0;
int args_allowed;
+ int idx = r->builtin_idx;
+
+ if (subn != NULL) {
+ INSTRUCTION *tp;
+ for (tp = subn->nexti; tp; tp = tp->nexti) {
+ /* assert(tp->opcode == Op_list); */
+ tp = tp->lasti;
+ nexp++;
+ }
+ assert(nexp > 0);
+ }
- r = node_common(op);
-
- /* traverse expression list to see how many args. given */
- for (n = subn; n != NULL; n = n->rnode) {
- nexp++;
- if (nexp > 5)
- break;
- }
+ r->builtin = tokentab[idx].ptr;
/* check against how many args. are allowed for this builtin */
args_allowed = tokentab[idx].flags & ARGS;
- if (args_allowed && (args_allowed & A(nexp)) == 0)
- fatal(_("%d is invalid as number of arguments for %s"),
+ if (args_allowed && (args_allowed & A(nexp)) == 0) {
+ yyerror(_("%d is invalid as number of arguments for %s"),
nexp, tokentab[idx].operator);
-
- r->builtin = tokentab[idx].ptr;
+ return NULL;
+ }
/* special case processing for a few builtins */
- if (nexp == 0 && r->builtin == do_length) {
- subn = node(node(make_number(0.0), Node_field_spec, (NODE *) NULL),
- Node_expression_list,
- (NODE *) NULL);
+ if (r->builtin == do_length) {
+ if (nexp == 0) {
+ INSTRUCTION *list; /* no args. Use $0 */
+
+ r->expr_count = 1;
+ list = list_create(r);
+ (void) list_prepend(list, instruction(Op_field_spec));
+ (void) list_prepend(list, instruction(Op_push_i));
+ list->nexti->memory = mk_number((AWKNUM) 0.0, (PERM|NUMCUR|NUMBER));
+ return list;
+ }
} else if (r->builtin == do_match) {
static short warned = FALSE;
- if (subn->rnode->lnode->type != Node_regex)
- subn->rnode->lnode = mk_rexp(subn->rnode->lnode);
+ arg = subn->nexti->lasti->nexti; /* 2nd arg list */
+ (void) mk_rexp(arg);
- if (subn->rnode->rnode != NULL) { /* 3rd argument there */
+ if (nexp == 3) { /* 3rd argument there */
if (do_lint && ! warned) {
warned = TRUE;
lintwarn(_("match: third argument is a gawk extension"));
}
- if (do_traditional)
- fatal(_("match: third argument is a gawk extension"));
+ if (do_traditional) {
+ yyerror(_("match: third argument is a gawk extension"));
+ return NULL;
+ }
+
+ arg = arg->lasti->nexti; /* third arg list */
+ ip = arg->lasti;
+ if (/*ip == arg->nexti && */ ip->opcode == Op_push)
+ ip->opcode = Op_push_array;
}
} else if (r->builtin == do_sub || r->builtin == do_gsub) {
- if (subn->lnode->type != Node_regex)
- subn->lnode = mk_rexp(subn->lnode);
- if (nexp == 2)
- append_right(subn, node(node(make_number(0.0),
- Node_field_spec,
- (NODE *) NULL),
- Node_expression_list,
- (NODE *) NULL));
- else if (subn->rnode->rnode->lnode->type == Node_val) {
+ int literal = FALSE;
+
+ arg = subn->nexti; /* first arg list */
+ (void) mk_rexp(arg);
+
+ arg = arg->lasti->nexti; /* 2nd arg list */
+ if (nexp == 2) {
+ INSTRUCTION *expr;
+ expr = list_create(instruction(Op_push_i));
+ expr->nexti->memory = mk_number((AWKNUM) 0.0, (PERM|NUMCUR|NUMBER));
+ (void) mk_expression_list(subn,
+ list_append(expr, instruction(Op_field_spec)));
+ }
+
+ arg = arg->lasti->nexti; /* third arg list */
+ ip = arg->lasti;
+ if (ip->opcode == Op_push_i) {
if (do_lint)
lintwarn(_("%s: string literal as last arg of substitute has no effect"),
(r->builtin == do_sub) ? "sub" : "gsub");
- } else if (! isassignable(subn->rnode->rnode->lnode)) {
- yyerror(_("%s third parameter is not a changeable object"),
- (r->builtin == do_sub) ? "sub" : "gsub");
+ literal = TRUE;
+ } else {
+ if (make_assignable(ip) == NULL)
+ yyerror(_("%s third parameter is not a changeable object"),
+ (r->builtin == do_sub) ? "sub" : "gsub");
+ else
+ ip->do_reference = TRUE;
+ }
+
+ /* kludge: This is one of the few cases
+ * when we need to know the type of item on stack.
+ * In case of string literal as the last argument,
+ * pass 4 as # of args (See sub_common code in builtin.c).
+ * Other cases like length(array or scalar) seem
+ * to work out ok.
+ */
+
+ r->expr_count = count_expressions(&subn, FALSE) + !!literal;
+ ip = subn->lasti;
+
+ (void) list_append(subn, r);
+
+ /* add after_assign bytecode(s) */
+ if (ip->opcode == Op_push_lhs && ip->memory->type == Node_var && ip->memory->var_assign) {
+ (void) list_append(subn, instruction(Op_var_assign));
+ subn->lasti->memory = ip->memory;
+ } else if (ip->opcode == Op_field_spec_lhs) {
+ (void) list_append(subn, instruction(Op_field_assign));
+ subn->lasti->field_assign = (Func_ptr) 0;
+ ip->target_assign = subn->lasti;
}
+ return subn;
} else if (r->builtin == do_gensub) {
- if (subn->lnode->type != Node_regex)
- subn->lnode = mk_rexp(subn->lnode);
- if (nexp == 3)
- append_right(subn, node(node(make_number(0.0),
- Node_field_spec,
- (NODE *) NULL),
- Node_expression_list,
- (NODE *) NULL));
+ if (nexp == 3) {
+ arg = subn->nexti->lasti->nexti->lasti->nexti; /* 3rd arg list */
+ ip = instruction(Op_push_i);
+ ip->memory = mk_number((AWKNUM) 0.0, (PERM|NUMCUR|NUMBER));
+ (void) mk_expression_list(subn,
+ list_append(list_create(ip),
+ instruction(Op_field_spec)));
+ }
+ arg = subn->nexti; /* first arg list */
+ (void) mk_rexp(arg);
} else if (r->builtin == do_split) {
+ arg = subn->nexti->lasti->nexti; /* 2nd arg list */
+ ip = arg->lasti;
+ if (ip->opcode == Op_push)
+ ip->opcode = Op_push_array;
+ if (nexp == 2) {
+ INSTRUCTION *expr;
+ expr = list_create(instruction(Op_push));
+ expr->nexti->memory = FS_node;
+ (void) mk_expression_list(subn, expr);
+ }
+ arg = arg->lasti->nexti;
+ n = mk_rexp(arg);
if (nexp == 2)
- append_right(subn,
- node(FS_node, Node_expression_list, (NODE *) NULL));
- n = subn->rnode->rnode->lnode;
- if (n->type != Node_regex)
- subn->rnode->rnode->lnode = mk_rexp(n);
- if (nexp == 2)
- subn->rnode->rnode->lnode->re_flags |= FS_DFLT;
+ n->re_flags |= FS_DFLT;
+ if (nexp == 4) {
+ arg = arg->lasti->nexti;
+ ip = arg->lasti;
+ if (ip->opcode == Op_push)
+ ip->opcode = Op_push_array;
+ }
} else if (r->builtin == do_patsplit) {
- if (nexp == 2)
- append_right(subn,
- node(FPAT_node, Node_expression_list, (NODE *) NULL));
- n = subn->rnode->rnode->lnode;
- if (n->type != Node_regex)
- subn->rnode->rnode->lnode = mk_rexp(n);
+ arg = subn->nexti->lasti->nexti; /* 2nd arg list */
+ ip = arg->lasti;
+ if (ip->opcode == Op_push)
+ ip->opcode = Op_push_array;
+ if (nexp == 2) {
+ INSTRUCTION *expr;
+ expr = list_create(instruction(Op_push));
+ expr->nexti->memory = FPAT_node;
+ (void) mk_expression_list(subn, expr);
+ }
+ arg = arg->lasti->nexti;
+ n = mk_rexp(arg);
+ if (nexp == 4) {
+ arg = arg->lasti->nexti;
+ ip = arg->lasti;
+ if (ip->opcode == Op_push)
+ ip->opcode = Op_push_array;
+ }
} else if (r->builtin == do_close) {
static short warned = FALSE;
-
- if ( nexp == 2) {
- if (do_lint && nexp == 2 && ! warned) {
+ if (nexp == 2) {
+ if (do_lint && ! warned) {
warned = TRUE;
lintwarn(_("close: second argument is a gawk extension"));
}
- if (do_traditional)
- fatal(_("close: second argument is a gawk extension"));
+ if (do_traditional) {
+ yyerror(_("close: second argument is a gawk extension"));
+ return NULL;
+ }
}
} else if (do_intl /* --gen-po */
&& r->builtin == do_dcgettext /* dcgettext(...) */
- && subn->lnode->type == Node_val /* 1st arg is constant */
- && (subn->lnode->flags & STRCUR) != 0) { /* it's a string constant */
+ && subn->nexti->lasti->opcode == Op_push_i /* 1st arg is constant */
+ && (subn->nexti->lasti->memory->flags & STRCUR) != 0) { /* it's a string constant */
/* ala xgettext, dcgettext("some string" ...) dumps the string */
- NODE *str = subn->lnode;
+ NODE *str = subn->nexti->lasti->memory;
if ((str->flags & INTLSTR) != 0)
warning(_("use of dcgettext(_\"...\") is incorrect: remove leading underscore"));
@@ -2602,45 +3683,65 @@ snode(NODE *subn, NODETYPE op, int idx)
dumpintlstr(str->stptr, str->stlen);
} else if (do_intl /* --gen-po */
&& r->builtin == do_dcngettext /* dcngettext(...) */
- && subn->lnode->type == Node_val /* 1st arg is constant */
- && (subn->lnode->flags & STRCUR) != 0 /* it's a string constant */
- && subn->rnode->lnode->type == Node_val /* 2nd arg is constant too */
- && (subn->rnode->lnode->flags & STRCUR) != 0) { /* it's a string constant */
+ && subn->nexti->lasti->opcode == Op_push_i /* 1st arg is constant */
+ && (subn->nexti->lasti->memory->flags & STRCUR) != 0 /* it's a string constant */
+ && subn->nexti->lasti->nexti->lasti->opcode == Op_push_i /* 2nd arg is constant too */
+ && (subn->nexti->lasti->nexti->lasti->memory->flags & STRCUR) != 0) { /* it's a string constant */
/* ala xgettext, dcngettext("some string", "some plural" ...) dumps the string */
- NODE *str1 = subn->lnode;
- NODE *str2 = subn->rnode->lnode;
+ NODE *str1 = subn->nexti->lasti->memory;
+ NODE *str2 = subn->nexti->lasti->nexti->lasti->memory;
if (((str1->flags | str2->flags) & INTLSTR) != 0)
warning(_("use of dcngettext(_\"...\") is incorrect: remove leading underscore"));
else
dumpintlstr2(str1->stptr, str1->stlen, str2->stptr, str2->stlen);
+ } else if (r->builtin == do_asort || r->builtin == do_asorti) {
+ arg = subn->nexti; /* 1st arg list */
+ ip = arg->lasti;
+ if (/* ip == arg->nexti && */ ip->opcode == Op_push)
+ ip->opcode = Op_push_array;
+ if (nexp == 2) {
+ arg = ip->nexti;
+ ip = arg->lasti;
+ if (/* ip == arg->nexti && */ ip->opcode == Op_push)
+ ip->opcode = Op_push_array;
+ }
}
+#ifdef ARRAYDEBUG
+ else if (r->builtin == do_adump) {
+ ip = subn->nexti->lasti;
+ if (ip->opcode == Op_push)
+ ip->opcode = Op_push_array;
+ }
+#endif
- r->subnode = subn;
- if (r->builtin == do_sprintf) {
- count_args(r);
- if (r->lnode != NULL) /* r->lnode set from subn. guard against syntax errors & check it's valid */
- r->lnode->printf_count = r->printf_count; /* hack */
+ if (subn != NULL) {
+ r->expr_count = count_expressions(&subn, FALSE);
+ return list_append(subn, r);
}
- return r;
+
+ r->expr_count = 0;
+ return list_create(r);
}
-/* make_for_loop --- build a for loop */
+/* append_param --- append PNAME to the list of parameters
+ * for the current function.
+ */
-static NODE *
-make_for_loop(NODE *init, NODE *cond, NODE *incr)
+static void
+append_param(char *pname)
{
- register FOR_LOOP_HEADER *r;
- NODE *n;
+ static NODE *savetail = NULL;
+ NODE *p;
- emalloc(r, FOR_LOOP_HEADER *, sizeof(FOR_LOOP_HEADER), "make_for_loop");
- getnode(n);
- n->type = Node_illegal;
- r->init = init;
- r->cond = cond;
- r->incr = incr;
- n->sub.nodep.r.hd = r;
- return n;
+ p = make_param(pname);
+ if (func_params == NULL) {
+ func_params = p;
+ savetail = p;
+ } else if (savetail != NULL) {
+ savetail->rnode = p;
+ savetail = p;
+ }
}
/* dup_parms --- return TRUE if there are duplicate parameters */
@@ -2648,7 +3749,7 @@ make_for_loop(NODE *init, NODE *cond, NODE *incr)
static int
dup_parms(NODE *func)
{
- register NODE *np;
+ NODE *np;
const char *fname, **names;
int count, i, j, dups;
NODE *params;
@@ -2671,7 +3772,7 @@ dup_parms(NODE *func)
i = 0;
for (np = params; np != NULL; np = np->rnode) {
if (np->param == NULL) { /* error earlier, give up, go home */
- free(names);
+ efree(names);
return TRUE;
}
names[i++] = np->param;
@@ -2684,36 +3785,45 @@ dup_parms(NODE *func)
dups++;
error(
_("function `%s': parameter #%d, `%s', duplicates parameter #%d"),
- fname, i+1, names[j], j+1);
+ fname, i + 1, names[j], j+1);
}
}
}
- free(names);
+ efree(names);
return (dups > 0 ? TRUE : FALSE);
}
/* parms_shadow --- check if parameters shadow globals */
static int
-parms_shadow(const char *fname, NODE *func)
+parms_shadow(INSTRUCTION *pc, int *shadow)
{
- int count, i;
+ int pcount, i;
int ret = FALSE;
+ NODE *func;
+ char *fname;
+ func = pc->func_body;
+ fname = func->lnode->param;
+
+#if 0 /* can't happen, already exited if error ? */
if (fname == NULL || func == NULL) /* error earlier */
return FALSE;
+#endif
- count = func->lnode->param_cnt;
+ pcount = func->lnode->param_cnt;
- if (count == 0) /* no args, no problem */
- return FALSE;
+ if (pcount == 0) /* no args, no problem */
+ return 0;
+ source = pc->source_file;
+ sourceline = pc->source_line;
/*
* Use warning() and not lintwarn() so that can warn
* about all shadowed parameters.
*/
- for (i = 0; i < count; i++) {
+ for (i = 0; i < pcount; i++) {
if (lookup(func->parmlist[i]) != NULL) {
warning(
_("function `%s': parameter `%s' shadows global variable"),
@@ -2722,21 +3832,27 @@ parms_shadow(const char *fname, NODE *func)
}
}
- return ret;
+ *shadow |= ret;
+ return 0;
}
+
/*
- * install:
+ * install_symbol:
* Install a name in the symbol table, even if it is already there.
* Caller must check against redefinition if that is desired.
*/
+
NODE *
-install(char *name, NODE *value)
+install_symbol(char *name, NODE *value)
{
- register NODE *hp;
- register size_t len;
- register int bucket;
+ NODE *hp;
+ size_t len;
+ int bucket;
+
+ if (install_func)
+ (*install_func)(name);
var_count++;
len = strlen(name);
@@ -2752,27 +3868,26 @@ install(char *name, NODE *value)
return hp->hvalue;
}
-/* lookup --- find the most recent hash node for name installed by install */
+/* lookup --- find the most recent hash node for name installed by install_symbol */
NODE *
lookup(const char *name)
{
- register NODE *bucket;
- register size_t len;
+ NODE *bucket;
+ size_t len;
len = strlen(name);
for (bucket = variables[hash(name, len, (unsigned long) HASHSIZE, NULL)];
bucket != NULL; bucket = bucket->hnext)
if (bucket->hlength == len && STREQN(bucket->hname, name, len))
return bucket->hvalue;
-
return NULL;
}
-/* var_comp --- compare two variable names */
+/* sym_comp --- compare two symbol (variable or function) names */
static int
-var_comp(const void *v1, const void *v2)
+sym_comp(const void *v1, const void *v2)
{
const NODE *const *npp1, *const *npp2;
const NODE *n1, *n2;
@@ -2793,77 +3908,90 @@ var_comp(const void *v1, const void *v2)
/* valinfo --- dump var info */
-static void
-valinfo(NODE *n, FILE *fp)
+void
+valinfo(NODE *n, int (*print_func)(FILE *, const char *, ...), FILE *fp)
{
- if (n->flags & STRING) {
- fprintf(fp, "string (");
- pp_string_fp(fp, n->stptr, n->stlen, '"', FALSE);
- fprintf(fp, ")\n");
+ if (n == Nnull_string)
+ print_func(fp, "uninitialized scalar\n");
+ else if (n->flags & STRING) {
+ pp_string_fp(print_func, fp, n->stptr, n->stlen, '"', FALSE);
+ print_func(fp, "\n");
} else if (n->flags & NUMBER)
- fprintf(fp, "number (%.17g)\n", n->numbr);
+ print_func(fp, "%.17g\n", n->numbr);
else if (n->flags & STRCUR) {
- fprintf(fp, "string value (");
- pp_string_fp(fp, n->stptr, n->stlen, '"', FALSE);
- fprintf(fp, ")\n");
+ pp_string_fp(print_func, fp, n->stptr, n->stlen, '"', FALSE);
+ print_func(fp, "\n");
} else if (n->flags & NUMCUR)
- fprintf(fp, "number value (%.17g)\n", n->numbr);
+ print_func(fp, "%.17g\n", n->numbr);
else
- fprintf(fp, "?? flags %s\n", flags2str(n->flags));
+ print_func(fp, "?? flags %s\n", flags2str(n->flags));
}
+/* get_varlist --- list of global variables */
-/* dump_vars --- dump the symbol table */
-
-void
-dump_vars(const char *fname)
+NODE **
+get_varlist()
{
int i, j;
NODE **table;
NODE *p;
- FILE *fp;
-
- emalloc(table, NODE **, var_count * sizeof(NODE *), "dump_vars");
-
- if (fname == NULL)
- fp = stderr;
- else if ((fp = fopen(fname, "w")) == NULL) {
- warning(_("could not open `%s' for writing (%s)"), fname, strerror(errno));
- warning(_("sending profile to standard error"));
- fp = stderr;
- }
+ emalloc(table, NODE **, (var_count + 1) * sizeof(NODE *), "get_varlist");
+ update_global_values();
for (i = j = 0; i < HASHSIZE; i++)
for (p = variables[i]; p != NULL; p = p->hnext)
table[j++] = p;
-
assert(j == var_count);
/* Shazzam! */
- qsort(table, j, sizeof(NODE *), var_comp);
+ qsort(table, j, sizeof(NODE *), sym_comp);
+
+ table[j] = NULL;
+ return table;
+}
- for (i = 0; i < j; i++) {
- p = table[i];
+/* print_vars --- print names and values of global variables */
+
+void
+print_vars(int (*print_func)(FILE *, const char *, ...), FILE *fp)
+{
+ int i;
+ NODE **table;
+ NODE *p;
+
+ table = get_varlist();
+ for (i = 0; (p = table[i]) != NULL; i++) {
if (p->hvalue->type == Node_func)
continue;
- fprintf(fp, "%.*s: ", (int) p->hlength, p->hname);
+ print_func(fp, "%.*s: ", (int) p->hlength, p->hname);
if (p->hvalue->type == Node_var_array)
- fprintf(fp, "array, %ld elements\n", p->hvalue->table_size);
+ print_func(fp, "array, %ld elements\n", p->hvalue->table_size);
else if (p->hvalue->type == Node_var_new)
- fprintf(fp, "unused variable\n");
+ print_func(fp, "untyped variable\n");
else if (p->hvalue->type == Node_var)
- valinfo(p->hvalue->var_value, fp);
- else {
- NODE **lhs = get_lhs(p->hvalue, NULL, FALSE);
+ valinfo(p->hvalue->var_value, print_func, fp);
+ }
+ efree(table);
+}
- valinfo(*lhs, fp);
- }
+/* dump_vars --- dump the symbol table */
+
+void
+dump_vars(const char *fname)
+{
+ FILE *fp;
+
+ if (fname == NULL)
+ fp = stderr;
+ else if ((fp = fopen(fname, "w")) == NULL) {
+ warning(_("could not open `%s' for writing (%s)"), fname, strerror(errno));
+ warning(_("sending profile to standard error"));
+ fp = stderr;
}
+ print_vars(fprintf, fp);
if (fp != stderr && fclose(fp) != 0)
warning(_("%s: close failed (%s)"), fname, strerror(errno));
-
- free(table);
}
/* release_all_vars --- free all variable memory */
@@ -2873,8 +4001,8 @@ release_all_vars()
{
int i;
NODE *p, *next;
-
- for (i = 0; i < HASHSIZE; i++)
+
+ for (i = 0; i < HASHSIZE; i++) {
for (p = variables[i]; p != NULL; p = next) {
next = p->hnext;
@@ -2882,40 +4010,14 @@ release_all_vars()
continue;
else if (p->hvalue->type == Node_var_array)
assoc_clear(p->hvalue);
- else if (p->hvalue->type != Node_var_new) {
- NODE **lhs = get_lhs(p->hvalue, NULL, FALSE);
-
- unref(*lhs);
- }
- unref(p);
- }
-}
-
-/* finfo --- for use in comparison and sorting of function names */
-
-struct finfo {
- const char *name;
- size_t nlen;
- NODE *func;
-};
-
-/* fcompare --- comparison function for qsort */
-
-static int
-fcompare(const void *p1, const void *p2)
-{
- const struct finfo *f1, *f2;
- int minlen;
+ else if (p->hvalue->type != Node_var_new)
+ unref(p->hvalue->var_value);
- f1 = (const struct finfo *) p1;
- f2 = (const struct finfo *) p2;
-
- if (f1->nlen > f2->nlen)
- minlen = f2->nlen;
- else
- minlen = f1->nlen;
-
- return strncmp(f1->name, f2->name, minlen);
+ efree(p->hname);
+ freenode(p->hvalue);
+ freenode(p);
+ }
+ }
}
/* dump_funcs --- print all functions */
@@ -2923,48 +4025,10 @@ fcompare(const void *p1, const void *p2)
void
dump_funcs()
{
- int i, j;
- NODE *p;
- struct finfo *tab = NULL;
-
- /*
- * Walk through symbol table countng functions.
- * Could be more than func_count if there are
- * extension functions.
- */
- for (i = j = 0; i < HASHSIZE; i++) {
- for (p = variables[i]; p != NULL; p = p->hnext) {
- if (p->hvalue->type == Node_func) {
- j++;
- }
- }
- }
-
- if (j == 0)
+ if (func_count <= 0)
return;
- emalloc(tab, struct finfo *, j * sizeof(struct finfo), "dump_funcs");
-
- /* now walk again, copying info */
- for (i = j = 0; i < HASHSIZE; i++) {
- for (p = variables[i]; p != NULL; p = p->hnext) {
- if (p->hvalue->type == Node_func) {
- tab[j].name = p->hname;
- tab[j].nlen = p->hlength;
- tab[j].func = p->hvalue;
- j++;
- }
- }
- }
-
-
- /* Shazzam! */
- qsort(tab, j, sizeof(struct finfo), fcompare);
-
- for (i = 0; i < j; i++)
- pp_func(tab[i].name, tab[i].nlen, tab[i].func);
-
- free(tab);
+ (void) foreach_func((int (*)(INSTRUCTION *, void *)) pp_func, TRUE, (void *) 0);
}
/* shadow_funcs --- check all functions for parameters that shadow globals */
@@ -2972,40 +4036,16 @@ dump_funcs()
void
shadow_funcs()
{
- int i, j;
- NODE *p;
- struct finfo *tab;
static int calls = 0;
int shadow = FALSE;
- if (func_count == 0)
+ if (func_count <= 0)
return;
if (calls++ != 0)
fatal(_("shadow_funcs() called twice!"));
- emalloc(tab, struct finfo *, func_count * sizeof(struct finfo), "shadow_funcs");
-
- for (i = j = 0; i < HASHSIZE; i++) {
- for (p = variables[i]; p != NULL; p = p->hnext) {
- if (p->hvalue->type == Node_func) {
- tab[j].name = p->hname;
- tab[j].nlen = p->hlength;
- tab[j].func = p->hvalue;
- j++;
- }
- }
- }
-
- assert(j == func_count);
-
- /* Shazzam! */
- qsort(tab, func_count, sizeof(struct finfo), fcompare);
-
- for (i = 0; i < j; i++)
- shadow |= parms_shadow(tab[i].name, tab[i].func);
-
- free(tab);
+ (void) foreach_func((int (*)(INSTRUCTION *, void *)) parms_shadow, TRUE, &shadow);
/* End with fatal if the user requested it. */
if (shadow && lintfunc != warning)
@@ -3013,54 +4053,6 @@ shadow_funcs()
}
/*
- * append_right:
- * Add new to the rightmost branch of LIST. This uses n^2 time, so we make
- * a simple attempt at optimizing it.
- */
-
-static NODE *
-append_right(NODE *list, NODE *new)
-{
- register NODE *oldlist;
- static NODE *savefront = NULL, *savetail = NULL;
-
- if (list == NULL || new == NULL)
- return list;
-
- oldlist = list;
- if (savefront == oldlist)
- list = savetail; /* Be careful: maybe list->rnode != NULL */
- else
- savefront = oldlist;
-
- while (list->rnode != NULL)
- list = list->rnode;
- savetail = list->rnode = new;
- return oldlist;
-}
-
-/*
- * append_pattern:
- * A wrapper around append_right, used for rule lists.
- */
-static inline NODE *
-append_pattern(NODE **list, NODE *patt)
-{
- NODE *n = node(patt, Node_rule_node, (NODE *) NULL);
-
- if (*list == NULL)
- *list = n;
- else {
- NODE *n1 = node(n, Node_rule_list, (NODE *) NULL);
- if ((*list)->type != Node_rule_list)
- *list = node(*list, Node_rule_list, n1);
- else
- (void) append_right(*list, n1);
- }
- return n;
-}
-
-/*
* func_install:
* check if name is already installed; if so, it had better have Null value,
* in which case def is added as the value. Otherwise, install name with def
@@ -3071,92 +4063,117 @@ append_pattern(NODE **list, NODE *patt)
* of each function parameter during a function call. See eval.c.
*/
-static void
-func_install(NODE *params, NODE *def)
+static int
+func_install(INSTRUCTION *func, INSTRUCTION *def)
{
- NODE *r, *n, *thisfunc;
- char **pnames, *names, *sp;
- size_t pcount = 0, space = 0;
+ NODE *params;
+ NODE *r, *n, *thisfunc, *hp;
+ char **pnames = NULL;
+ char *fname;
+ int pcount = 0;
int i;
+ params = func_params;
+
/* check for function foo(foo) { ... }. bleah. */
for (n = params->rnode; n != NULL; n = n->rnode) {
- if (strcmp(n->param, params->param) == 0)
- fatal(_("function `%s': can't use function name as parameter name"),
- params->param);
- else if (is_std_var(n->param))
- fatal(_("function `%s': can't use special variable `%s' as a function parameter"),
+ if (strcmp(n->param, params->param) == 0) {
+ error(_("function `%s': can't use function name as parameter name"),
+ params->param);
+ errcount++;
+ return -1;
+ } else if (is_std_var(n->param)) {
+ error(_("function `%s': can't use special variable `%s' as a function parameter"),
params->param, n->param);
+ errcount++;
+ return -1;
+ }
}
- thisfunc = NULL; /* turn off warnings */
+ thisfunc = NULL; /* turn off warnings */
- /* symbol table managment */
- pop_var(params, FALSE);
- r = lookup(params->param);
+ fname = params->param;
+ /* symbol table management */
+ hp = remove_symbol(params->param); /* remove function name out of symbol table */
+ if (hp != NULL)
+ freenode(hp);
+ r = lookup(fname);
if (r != NULL) {
- fatal(_("function name `%s' previously defined"), params->param);
- } else if (params->param == builtin_func) /* not a valid function name */
+ error(_("function name `%s' previously defined"), fname);
+ errcount++;
+ return -1;
+ } else if (fname == builtin_func) /* not a valid function name */
goto remove_params;
+ /* add an implicit return at end;
+ * also used by 'return' command in debugger
+ */
+
+ (void) list_append(def, instruction(Op_push_i));
+ def->lasti->memory = Nnull_string;
+ (void) list_append(def, instruction(Op_K_return));
+
+ if (do_profiling)
+ (void) list_prepend(def, instruction(Op_exec_count));
+
+ /* func->opcode is Op_func */
+ (func + 1)->firsti = def->nexti;
+ (func + 1)->lasti = def->lasti;
+ (func + 2)->first_line = func->source_line;
+ (func + 2)->last_line = lastline;
+
+ func->nexti = def->nexti;
+ bcfree(def);
+
+ (void) list_append(rule_list, func + 1); /* debugging */
+
/* install the function */
- thisfunc = node(params, Node_func, def);
- (void) install(params->param, thisfunc);
+ thisfunc = mk_symbol(Node_func, params);
+ (void) install_symbol(fname, thisfunc);
+ thisfunc->code_ptr = func;
+ func->func_body = thisfunc;
- /* figure out amount of space to allocate for variable names */
- for (n = params->rnode; n != NULL; n = n->rnode) {
+ for (n = params->rnode; n != NULL; n = n->rnode)
pcount++;
- space += strlen(n->param) + 1;
- }
- /* allocate it and fill it in */
if (pcount != 0) {
- emalloc(names, char *, space, "func_install");
- emalloc(pnames, char **, pcount * sizeof(char *), "func_install");
- sp = names;
- for (i = 0, n = params->rnode; i < pcount; i++, n = n->rnode) {
- pnames[i] = sp;
- strcpy(sp, n->param);
- sp += strlen(n->param) + 1;
- }
- thisfunc->parmlist = pnames;
- } else {
- thisfunc->parmlist = NULL;
+ emalloc(pnames, char **, (pcount + 1) * sizeof(char *), "func_install");
+ for (i = 0, n = params->rnode; i < pcount; i++, n = n->rnode)
+ pnames[i] = n->param;
+ pnames[pcount] = NULL;
}
+ thisfunc->parmlist = pnames;
/* update lint table info */
- func_use(params->param, FUNC_DEFINE);
+ func_use(fname, FUNC_DEFINE);
- func_count++; /* used by profiling / pretty printer */
+ func_count++; /* used in profiler / pretty printer */
remove_params:
/* remove params from symbol table */
pop_params(params->rnode);
+ return 0;
}
-/* pop_var --- remove a variable from the symbol table */
+/* remove_symbol --- remove a variable from the symbol table */
-static void
-pop_var(NODE *np, int freeit)
+NODE *
+remove_symbol(char *name)
{
- register NODE *bucket, **save;
- register size_t len;
- char *name;
+ NODE *bucket, **save;
+ size_t len;
- name = np->param;
len = strlen(name);
save = &(variables[hash(name, len, (unsigned long) HASHSIZE, NULL)]);
for (bucket = *save; bucket != NULL; bucket = bucket->hnext) {
if (len == bucket->hlength && STREQN(bucket->hname, name, len)) {
var_count--;
*save = bucket->hnext;
- freenode(bucket);
- if (freeit)
- free(np->param);
- return;
+ return bucket;
}
save = &(bucket->hnext);
}
+ return NULL;
}
/* pop_params --- remove list of function parameters from symbol table */
@@ -3168,10 +4185,13 @@ pop_var(NODE *np, int freeit)
static void
pop_params(NODE *params)
{
+ NODE *hp;
if (params == NULL)
return;
pop_params(params->rnode);
- pop_var(params, TRUE);
+ hp = remove_symbol(params->param);
+ if (hp != NULL)
+ freenode(hp);
}
/* make_param --- make NAME into a function parameter */
@@ -3184,9 +4204,8 @@ make_param(char *name)
getnode(r);
r->type = Node_param_list;
r->rnode = NULL;
- r->param = name;
r->param_cnt = param_counter++;
- return (install(name, r));
+ return (install_symbol(name, r));
}
static struct fdesc {
@@ -3240,6 +4259,9 @@ check_funcs()
struct fdesc *fp, *next;
int i;
+ if (get_context()->level > 0)
+ goto free_mem;
+
for (i = 0; i < HASHSIZE; i++) {
for (fp = ftable[i]; fp != NULL; fp = fp->next) {
#ifdef REALLYMEAN
@@ -3261,29 +4283,98 @@ check_funcs()
}
}
+free_mem:
/* now let's free all the memory */
for (i = 0; i < HASHSIZE; i++) {
for (fp = ftable[i]; fp != NULL; fp = next) {
next = fp->next;
- free(fp->name);
- free(fp);
+ efree(fp->name);
+ efree(fp);
}
+ ftable[i] = NULL;
}
}
/* param_sanity --- look for parameters that are regexp constants */
static void
-param_sanity(NODE *arglist)
+param_sanity(INSTRUCTION *arglist)
{
- NODE *argp, *arg;
- int i;
+ INSTRUCTION *argl, *arg;
+ int i = 1;
- for (i = 1, argp = arglist; argp != NULL; argp = argp->rnode, i++) {
- arg = argp->lnode;
- if (arg->type == Node_regex)
+ if (arglist == NULL)
+ return;
+ for (argl = arglist->nexti; argl; ) {
+ arg = argl->lasti;
+ if (arg->opcode == Op_match_rec)
warning(_("regexp constant for parameter #%d yields boolean value"), i);
+ argl = arg->nexti;
+ i++;
+ }
+}
+
+/* foreach_func --- execute given function for each awk function in symbol table. */
+
+int
+foreach_func(int (*pfunc)(INSTRUCTION *, void *), int sort, void *data)
+{
+ int i, j;
+ NODE *p;
+ int ret = 0;
+
+ if (sort) {
+ NODE **tab;
+
+ /*
+ * Walk through symbol table counting functions.
+ * Could be more than func_count if there are
+ * extension functions.
+ */
+ for (i = j = 0; i < HASHSIZE; i++) {
+ for (p = variables[i]; p != NULL; p = p->hnext) {
+ if (p->hvalue->type == Node_func) {
+ j++;
+ }
+ }
+ }
+
+ if (j == 0)
+ return 0;
+
+ emalloc(tab, NODE **, j * sizeof(NODE *), "foreach_func");
+
+ /* now walk again, copying info */
+ for (i = j = 0; i < HASHSIZE; i++) {
+ for (p = variables[i]; p != NULL; p = p->hnext) {
+ if (p->hvalue->type == Node_func) {
+ tab[j] = p;
+ j++;
+ }
+ }
+ }
+
+ /* Shazzam! */
+ qsort(tab, j, sizeof(NODE *), sym_comp);
+
+ for (i = 0; i < j; i++) {
+ if ((ret = pfunc(tab[i]->hvalue->code_ptr, data)) != 0)
+ break;
+ }
+
+ efree(tab);
+ return ret;
+ }
+
+ /* unsorted */
+ for (i = 0; i < HASHSIZE; i++) {
+ for (p = variables[i]; p != NULL; p = p->hnext) {
+ if (p->hvalue->type == Node_func
+ && (ret = pfunc(p->hvalue->code_ptr, data)) != 0)
+ return ret;
+ }
}
+ return 0;
}
/* deferred variables --- those that are only defined if needed. */
@@ -3320,33 +4411,31 @@ register_deferred_variable(const char *name, NODE *(*load_func)(void))
/* variable --- make sure NAME is in the symbol table */
NODE *
-variable(char *name, int can_free, NODETYPE type)
+variable(char *name, NODETYPE type)
{
- register NODE *r;
+ NODE *r;
if ((r = lookup(name)) != NULL) {
- if (r->type == Node_func)
- fatal(_("function `%s' called with space between name and `(',\nor used as a variable or an array"),
+ if (r->type == Node_func) {
+ error(_("function `%s' called with space between name and `(',\nor used as a variable or an array"),
r->vname);
-
+ errcount++;
+ r->type = Node_var_new; /* continue parsing instead of exiting */
+ }
} else {
/* not found */
struct deferred_variable *dv;
for (dv = deferred_variables; TRUE; dv = dv->next) {
if (dv == NULL) {
- /*
- * This is the only case in which we may not
- * free the string.
- */
- NODE *n;
-
- if (type == Node_var_array)
- n = node(NULL, type, NULL);
+ /*
+ * This is the only case in which we may not free the string.
+ */
+ if (type == Node_var)
+ r = mk_symbol(type, Nnull_string);
else
- n = node(Nnull_string, type, NULL);
-
- return install(name, n);
+ r = mk_symbol(type, (NODE *) NULL);
+ return install_symbol(name, r);
}
if (STREQ(name, dv->name)) {
r = (*dv->load_func)();
@@ -3354,31 +4443,55 @@ variable(char *name, int can_free, NODETYPE type)
}
}
}
- if (can_free)
- free(name);
+ efree(name);
return r;
}
-/* mk_rexp --- make a regular expression constant */
+/* make_regnode --- make a regular expression node */
static NODE *
-mk_rexp(NODE *exp)
+make_regnode(int type, NODE *exp)
{
NODE *n;
- if (exp->type == Node_regex)
- return exp;
-
getnode(n);
- n->type = Node_dynregex;
- n->re_exp = exp;
- n->re_text = NULL;
- n->re_reg = NULL;
- n->re_flags = 0;
+ memset(n, 0, sizeof(NODE));
+ n->type = type;
n->re_cnt = 1;
+
+ if (type == Node_regex) {
+ n->re_reg = make_regexp(exp->stptr, exp->stlen, FALSE, TRUE, FALSE);
+ if (n->re_reg == NULL) {
+ freenode(n);
+ return NULL;
+ }
+ n->re_exp = exp;
+ n->re_flags = CONSTANT;
+ }
return n;
}
+
+/* mk_rexp --- make a regular expression constant */
+
+static NODE *
+mk_rexp(INSTRUCTION *list)
+{
+ INSTRUCTION *ip;
+
+ ip = list->nexti;
+ if (ip == list->lasti && ip->opcode == Op_match_rec)
+ ip->opcode = Op_push_re;
+ else {
+ ip = instruction(Op_push_re);
+ ip->memory = make_regnode(Node_dynregex, NULL);
+ ip->nexti = list->lasti->nexti;
+ list->lasti->nexti = ip;
+ list->lasti = ip;
+ }
+ return ip->memory;
+}
+
/* isnoeffect --- when used as a statement, has no side effects */
/*
@@ -3389,48 +4502,38 @@ mk_rexp(NODE *exp)
*/
static int
-isnoeffect(NODETYPE type)
+isnoeffect(OPCODE type)
{
switch (type) {
- case Node_times:
- case Node_quotient:
- case Node_mod:
- case Node_plus:
- case Node_minus:
- case Node_subscript:
- case Node_concat:
- case Node_exp:
- case Node_unary_minus:
- case Node_field_spec:
- case Node_and:
- case Node_or:
- case Node_equal:
- case Node_notequal:
- case Node_less:
- case Node_greater:
- case Node_leq:
- case Node_geq:
- case Node_match:
- case Node_nomatch:
- case Node_not:
- case Node_val:
- case Node_in_array:
- case Node_NF:
- case Node_NR:
- case Node_FNR:
- case Node_FPAT:
- case Node_FS:
- case Node_RS:
- case Node_FIELDWIDTHS:
- case Node_IGNORECASE:
- case Node_OFS:
- case Node_ORS:
- case Node_OFMT:
- case Node_CONVFMT:
- case Node_BINMODE:
- case Node_LINT:
- case Node_SUBSEP:
- case Node_TEXTDOMAIN:
+ case Op_times:
+ case Op_times_i:
+ case Op_quotient:
+ case Op_quotient_i:
+ case Op_mod:
+ case Op_mod_i:
+ case Op_plus:
+ case Op_plus_i:
+ case Op_minus:
+ case Op_minus_i:
+ case Op_subscript:
+ case Op_concat:
+ case Op_exp:
+ case Op_exp_i:
+ case Op_unary_minus:
+ case Op_field_spec:
+ case Op_and_final:
+ case Op_or_final:
+ case Op_equal:
+ case Op_notequal:
+ case Op_less:
+ case Op_greater:
+ case Op_leq:
+ case Op_geq:
+ case Op_match:
+ case Op_nomatch:
+ case Op_match_rec:
+ case Op_not:
+ case Op_in_array:
return TRUE;
default:
break; /* keeps gcc -Wall happy */
@@ -3439,45 +4542,34 @@ isnoeffect(NODETYPE type)
return FALSE;
}
-/* isassignable --- can this node be assigned to? */
+/* make_assignable --- make this operand an assignable one if posiible */
-static int
-isassignable(register NODE *n)
+static INSTRUCTION *
+make_assignable(INSTRUCTION *ip)
{
- switch (n->type) {
- case Node_var_new:
- case Node_var:
- case Node_FIELDWIDTHS:
- case Node_RS:
- case Node_FS:
- case Node_FNR:
- case Node_FPAT:
- case Node_NR:
- case Node_NF:
- case Node_IGNORECASE:
- case Node_OFMT:
- case Node_CONVFMT:
- case Node_ORS:
- case Node_OFS:
- case Node_LINT:
- case Node_BINMODE:
- case Node_SUBSEP:
- case Node_TEXTDOMAIN:
- case Node_field_spec:
- case Node_subscript:
- return TRUE;
- case Node_param_list:
- return ((n->flags & FUNC) == 0); /* ok if not func name */
+ switch (ip->opcode) {
+ case Op_push:
+ if (ip->memory->type == Node_param_list
+ && (ip->memory->flags & FUNC) != 0)
+ return NULL;
+ ip->opcode = Op_push_lhs;
+ return ip;
+ case Op_field_spec:
+ ip->opcode = Op_field_spec_lhs;
+ return ip;
+ case Op_subscript:
+ ip->opcode = Op_subscript_lhs;
+ return ip;
default:
break; /* keeps gcc -Wall happy */
}
- return FALSE;
+ return NULL;
}
/* stopme --- for debugging */
NODE *
-stopme(NODE *tree ATTRIBUTE_UNUSED)
+stopme(int nargs ATTRIBUTE_UNUSED)
{
return (NODE *) 0;
}
@@ -3499,7 +4591,7 @@ dumpintlstr(const char *str, size_t len)
}
printf("msgid ");
- pp_string_fp(stdout, str, len, '"', TRUE);
+ pp_string_fp(fprintf, stdout, str, len, '"', TRUE);
putchar('\n');
printf("msgstr \"\"\n\n");
fflush(stdout);
@@ -3522,35 +4614,15 @@ dumpintlstr2(const char *str1, size_t len1, const char *str2, size_t len2)
}
printf("msgid ");
- pp_string_fp(stdout, str1, len1, '"', TRUE);
+ pp_string_fp(fprintf, stdout, str1, len1, '"', TRUE);
putchar('\n');
printf("msgid_plural ");
- pp_string_fp(stdout, str2, len2, '"', TRUE);
+ pp_string_fp(fprintf, stdout, str2, len2, '"', TRUE);
putchar('\n');
printf("msgstr[0] \"\"\nmsgstr[1] \"\"\n\n");
fflush(stdout);
}
-/* count_args --- count the number of printf arguments */
-
-static void
-count_args(NODE *tree)
-{
- size_t count = 0;
- NODE *save_tree;
-
- assert(tree->type == Node_K_printf
- || (tree->type == Node_builtin && tree->builtin == do_sprintf));
- save_tree = tree;
-
- tree = tree->lnode; /* printf format string */
-
- for (count = 0; tree != NULL; tree = tree->rnode)
- count++;
-
- save_tree->printf_count = count;
-}
-
/* isarray --- can this type be subscripted? */
static int
@@ -3572,6 +4644,1194 @@ isarray(NODE *n)
return FALSE;
}
+
+static INSTRUCTION *
+mk_binary(INSTRUCTION *s1, INSTRUCTION *s2, INSTRUCTION *op)
+{
+ INSTRUCTION *ip,*ip1;
+ AWKNUM res;
+
+ ip = s2->nexti;
+ if (s2->lasti == ip && ip->opcode == Op_push_i) {
+ /* do any numeric constant folding */
+ ip1 = s1->nexti;
+ if (ip1->memory != NULL && ip1->memory->type == Node_val
+ && (ip1->memory->flags & (STRCUR|STRING)) == 0
+ && ip->memory != NULL && ip->memory->type == Node_val
+ && (ip->memory->flags & (STRCUR|STRING)) == 0
+ && ip1 == s1->lasti && do_optimize > 1) {
+ ip1->memory->numbr = force_number(ip1->memory);
+ ip->memory->numbr = force_number(ip->memory);
+ res = ip1->memory->numbr;
+ switch (op->opcode) {
+ case Op_times:
+ res *= ip->memory->numbr;
+ break;
+ case Op_quotient:
+ if (ip->memory->numbr == 0) {
+ /* don't fatalize, allow parsing rest of the input */
+ yyerror(_("division by zero attempted"));
+ goto regular;
+ }
+
+ res /= ip->memory->numbr;
+ break;
+ case Op_mod:
+ if (ip->memory->numbr == 0) {
+ /* don't fatalize, allow parsing rest of the input */
+ yyerror(_("division by zero attempted in `%%'"));
+ goto regular;
+ }
+#ifdef HAVE_FMOD
+ res = fmod(res, ip->memory->numbr);
+#else /* ! HAVE_FMOD */
+ (void) modf(res / ip->memory->numbr, &res);
+ res = ip1->memory->numbr - res * ip->memory->numbr;
+#endif /* ! HAVE_FMOD */
+ break;
+ case Op_plus:
+ res += ip->memory->numbr;
+ break;
+ case Op_minus:
+ res -= ip->memory->numbr;
+ break;
+ case Op_exp:
+ res = calc_exp(res, ip->memory->numbr);
+ break;
+ default:
+ goto regular;
+ }
+
+ op->opcode = Op_push_i;
+ op->memory = mk_number(res, (PERM|NUMCUR|NUMBER));
+ bcfree(ip1);
+ bcfree(ip);
+ bcfree(s1);
+ bcfree(s2);
+ return list_create(op);
+ } else {
+ /* do basic arithmetic optimisation */
+ /* convert (Op_push_i Node_val) + (Op_plus) to (Op_plus_i Node_val) */
+ switch (op->opcode) {
+ case Op_times:
+ op->opcode = Op_times_i;
+ break;
+ case Op_quotient:
+ op->opcode = Op_quotient_i;
+ break;
+ case Op_mod:
+ op->opcode = Op_mod_i;
+ break;
+ case Op_plus:
+ op->opcode = Op_plus_i;
+ break;
+ case Op_minus:
+ op->opcode = Op_minus_i;
+ break;
+ case Op_exp:
+ op->opcode = Op_exp_i;
+ break;
+ default:
+ goto regular;
+ }
+
+ op->memory = ip->memory;
+ bcfree(ip);
+ bcfree(s2); /* Op_list */
+ return list_append(s1, op);
+ }
+ }
+
+regular:
+ /* append lists s1, s2 and add `op' bytecode */
+ (void) list_merge(s1, s2);
+ return list_append(s1, op);
+}
+
+/* mk_boolean --- instructions for boolean and, or */
+
+static INSTRUCTION *
+mk_boolean(INSTRUCTION *left, INSTRUCTION *right, INSTRUCTION *op)
+{
+ INSTRUCTION *tp;
+ OPCODE opc, final_opc;
+
+ opc = op->opcode; /* Op_and or Op_or */
+ final_opc = (opc == Op_or) ? Op_or_final : Op_and_final;
+
+ add_lint(right, LINT_assign_in_cond);
+
+ tp = left->lasti;
+
+ if (tp->opcode != final_opc) { /* x || y */
+ list_append(right, instruction(final_opc));
+ add_lint(left, LINT_assign_in_cond);
+ (void) list_append(left, op);
+ left->lasti->target_jmp = right->lasti;
+
+ /* NB: target_stmt points to previous Op_and(Op_or) in a chain;
+ * target_stmt only used in the parser (see below).
+ */
+
+ left->lasti->target_stmt = left->lasti;
+ right->lasti->target_stmt = left->lasti;
+ } else { /* optimization for x || y || z || ... */
+ INSTRUCTION *ip;
+
+ op->opcode = final_opc;
+ (void) list_append(right, op);
+ op->target_stmt = tp;
+ tp->opcode = opc;
+ tp->target_jmp = op;
+
+ /* update jump targets */
+ for (ip = tp->target_stmt; ; ip = ip->target_stmt) {
+ assert(ip->opcode == opc);
+ assert(ip->target_jmp == tp);
+ /* if (ip->opcode == opc && ip->target_jmp == tp) */
+ ip->target_jmp = op;
+ if (ip->target_stmt == ip)
+ break;
+ }
+ }
+
+ return list_merge(left, right);
+}
+
+/* mk_condition --- if-else and conditional */
+
+static INSTRUCTION *
+mk_condition(INSTRUCTION *cond, INSTRUCTION *ifp, INSTRUCTION *true_branch,
+ INSTRUCTION *elsep, INSTRUCTION *false_branch)
+{
+ /*
+ * ----------------
+ * cond
+ * ----------------
+ * t: [Op_jmp_false f ]
+ * ----------------
+ * true_branch
+ *
+ * ----------------
+ * [Op_jmp y]
+ * ----------------
+ * f:
+ * false_branch
+ * ----------------
+ * y: [Op_no_op]
+ * ----------------
+ */
+
+ INSTRUCTION *ip;
+
+ /* FIXME else { } -- add elsep */
+
+ if (false_branch == NULL) {
+ if (elsep != NULL) /* else { } */
+ false_branch = list_append(list_create(elsep), instruction(Op_no_op));
+ else
+ false_branch = list_create(instruction(Op_no_op));
+ } else {
+ /* assert(elsep != NULL); */
+
+ /* avoid a series of no_op's: if .. else if .. else if .. */
+ if (false_branch->lasti->opcode != Op_no_op)
+ (void) list_append(false_branch, instruction(Op_no_op));
+ (void) list_prepend(false_branch, elsep);
+ false_branch->nexti->branch_end = false_branch->lasti;
+ if (do_profiling)
+ (void) list_prepend(false_branch, instruction(Op_exec_count));
+ }
+
+ (void) list_prepend(false_branch, instruction(Op_jmp));
+ false_branch->nexti->target_jmp = false_branch->lasti;
+
+ add_lint(cond, LINT_assign_in_cond);
+ ip = list_append(cond, instruction(Op_jmp_false));
+ ip->lasti->target_jmp = false_branch->nexti->nexti;
+
+ (void) list_prepend(ip, ifp);
+ if (do_profiling) {
+ (void) list_append(ip, instruction(Op_exec_count));
+ ip->nexti->branch_if = ip->lasti;
+ ip->nexti->branch_else = false_branch->nexti;
+ }
+
+ if (true_branch != NULL)
+ list_merge(ip, true_branch);
+ return list_merge(ip, false_branch);
+}
+
+enum defline { FIRST_LINE, LAST_LINE };
+
+/* find_line -- find the first(last) line in a list of (pattern) instructions */
+
+static int
+find_line(INSTRUCTION *pattern, enum defline what)
+{
+ INSTRUCTION *ip;
+ int lineno = 0;
+
+ for (ip = pattern->nexti; ip; ip = ip->nexti) {
+ if (what == LAST_LINE) {
+ if (ip->source_line > lineno)
+ lineno = ip->source_line;
+ } else { /* FIRST_LINE */
+ if (ip->source_line > 0
+ && (lineno == 0 || ip->source_line < lineno))
+ lineno = ip->source_line;
+ }
+ if (ip == pattern->lasti)
+ break;
+ }
+ assert(lineno > 0);
+ return lineno;
+}
+
+/* append_rule --- pattern-action instructions */
+
+static INSTRUCTION *
+append_rule(INSTRUCTION *pattern, INSTRUCTION *action)
+{
+ /*
+ * ----------------
+ * pattern
+ * ----------------
+ * [Op_jmp_false f ]
+ * ----------------
+ * action
+ * ----------------
+ * f: [Op_no_op ]
+ * ----------------
+ */
+
+ INSTRUCTION *rp;
+ INSTRUCTION *tp;
+ INSTRUCTION *ip;
+
+ if (rule != Rule) {
+ rp = pattern;
+ if (do_profiling)
+ (void) list_append(action, instruction(Op_no_op));
+ (rp + 1)->firsti = action->nexti;
+ (rp + 1)->lasti = action->lasti;
+ (rp + 2)->first_line = pattern->source_line;
+ (rp + 2)->last_line = lastline;
+ ip = list_prepend(action, rp);
+
+ } else {
+ rp = bcalloc(Op_rule, 3, 0);
+ rp->in_rule = Rule;
+ rp->source_file = source;
+ tp = instruction(Op_no_op);
+
+ if (pattern == NULL) {
+ /* assert(action != NULL); */
+ if (do_profiling)
+ (void) list_prepend(action, instruction(Op_exec_count));
+ (rp + 1)->firsti = action->nexti;
+ (rp + 1)->lasti = tp;
+ (rp + 2)->first_line = firstline;
+ (rp + 2)->last_line = lastline;
+ rp->source_line = firstline;
+ ip = list_prepend(list_append(action, tp), rp);
+ } else {
+ (void) list_append(pattern, instruction(Op_jmp_false));
+ pattern->lasti->target_jmp = tp;
+ (rp + 2)->first_line = find_line(pattern, FIRST_LINE);
+ rp->source_line = (rp + 2)->first_line;
+ if (action == NULL) {
+ (rp + 2)->last_line = find_line(pattern, LAST_LINE);
+ action = list_create(instruction(Op_K_print_rec));
+ if (do_profiling)
+ (void) list_prepend(action, instruction(Op_exec_count));
+ } else
+ (rp + 2)->last_line = lastline;
+
+ if (do_profiling) {
+ (void) list_prepend(pattern, instruction(Op_exec_count));
+ (void) list_prepend(action, instruction(Op_exec_count));
+ }
+ (rp + 1)->firsti = action->nexti;
+ (rp + 1)->lasti = tp;
+ ip = list_append(
+ list_merge(list_prepend(pattern, rp),
+ action),
+ tp);
+ }
+
+ }
+
+ list_append(rule_list, rp + 1);
+
+ if (rule_block[rule] == NULL)
+ rule_block[rule] = ip;
+ else
+ (void) list_merge(rule_block[rule], ip);
+
+ return rule_block[rule];
+}
+
+/* mk_assignment --- assignment bytecodes */
+
+static INSTRUCTION *
+mk_assignment(INSTRUCTION *lhs, INSTRUCTION *rhs, INSTRUCTION *op)
+{
+ INSTRUCTION *tp;
+ INSTRUCTION *ip;
+
+ tp = lhs->lasti;
+ switch (tp->opcode) {
+ case Op_field_spec:
+ tp->opcode = Op_field_spec_lhs;
+ break;
+ case Op_subscript:
+ tp->opcode = Op_subscript_lhs;
+ break;
+ case Op_push:
+ case Op_push_array:
+ tp->opcode = Op_push_lhs;
+ break;
+ default:
+ cant_happen();
+ }
+
+ tp->do_reference = (op->opcode != Op_assign); /* check for uninitialized reference */
+
+ if (rhs != NULL)
+ ip = list_merge(rhs, lhs);
+ else
+ ip = lhs;
+
+ (void) list_append(ip, op);
+
+ if (tp->opcode == Op_push_lhs
+ && tp->memory->type == Node_var
+ && tp->memory->var_assign
+ ) {
+ tp->do_reference = FALSE; /* no uninitialized reference checking
+ * for a special variable.
+ */
+ (void) list_append(ip, instruction(Op_var_assign));
+ ip->lasti->memory = tp->memory;
+ } else if (tp->opcode == Op_field_spec_lhs) {
+ (void) list_append(ip, instruction(Op_field_assign));
+ ip->lasti->field_assign = (Func_ptr) 0;
+ tp->target_assign = ip->lasti;
+ }
+
+ return ip;
+}
+
+/* optimize_assignment --- peephole optimization for assignment */
+
+static INSTRUCTION *
+optimize_assignment(INSTRUCTION *exp)
+{
+ INSTRUCTION *i1;
+ INSTRUCTION *i2;
+ INSTRUCTION *i3;
+
+ /*
+ * Optimize assignment statements array[subs] = x; var = x; $n = x;
+ * string concatenation of the form s = s t.
+ *
+ * 1) Array element assignment array[subs] = x:
+ * Replaces Op_push_array + Op_subscript_lhs + Op_assign + Op_pop
+ * with single instruction Op_store_sub.
+ * Limitation (FIXME): 1 dimension and sub is simple var/value.
+ *
+ * 2) Simple variable assignment var = x:
+ * Replaces Op_push_lhs + Op_assign + Op_pop with Op_store_var.
+ *
+ * 3) Field assignment $n = x:
+ * Replaces Op_field_spec_lhs + Op_assign + Op_field_assign + Op_pop
+ * with Op_store_field.
+ *
+ * 4) Optimization for string concatenation:
+ * For cases like x = x y, uses realloc to include y in x;
+ * also eliminates instructions Op_push_lhs and Op_pop.
+ */
+
+ /*
+ * N.B.: do not append Op_pop instruction to the returned
+ * instruction list if optimized. None of these
+ * optimized instructions push the r-value of assignment
+ * onto the runtime stack.
+ */
+
+ i2 = NULL;
+ i1 = exp->lasti;
+
+ if ( ! do_optimize
+ || ( i1->opcode != Op_assign
+ && i1->opcode != Op_field_assign)
+ )
+ return list_append(exp, instruction(Op_pop));
+
+ for (i2 = exp->nexti; i2 != i1; i2 = i2->nexti) {
+ switch (i2->opcode) {
+ case Op_concat:
+ if (i2->nexti->opcode == Op_push_lhs /* l.h.s is a simple variable */
+ && (i2->concat_flag & CSVAR) /* 1st exp in r.h.s is a simple variable;
+ * see Op_concat in the grammer above.
+ */
+ && i2->nexti->memory == exp->nexti->memory /* and the same as in l.h.s */
+ && i2->nexti->nexti == i1
+ && i1->opcode == Op_assign
+ ) {
+ /* s = s ... optimization */
+
+ /* avoid stuff like x = x (x = y) or x = x gsub(/./, "b", x);
+ * check for l-value reference to this variable in the r.h.s.
+ * Also avoid function calls in general, to guard against
+ * global variable assignment.
+ */
+
+ for (i3 = exp->nexti->nexti; i3 != i2; i3 = i3->nexti) {
+ if ((i3->opcode == Op_push_lhs && i3->memory == i2->nexti->memory)
+ || i3->opcode == Op_func_call)
+ return list_append(exp, instruction(Op_pop)); /* no optimization */
+ }
+
+ /* remove the variable from r.h.s */
+ i3 = exp->nexti;
+ exp->nexti = i3->nexti;
+ bcfree(i3);
+
+ if (--i2->expr_count == 1) /* one less expression in Op_concat */
+ i2->opcode = Op_no_op;
+
+ i3 = i2->nexti;
+ assert(i3->opcode == Op_push_lhs);
+ i3->opcode = Op_assign_concat; /* change Op_push_lhs to Op_assign_concat */
+ i3->nexti = NULL;
+ bcfree(i1); /* Op_assign */
+ exp->lasti = i3; /* update Op_list */
+ return exp;
+ }
+ break;
+
+ case Op_field_spec_lhs:
+ if (i2->nexti->opcode == Op_assign
+ && i2->nexti->nexti == i1
+ && i1->opcode == Op_field_assign
+ ) {
+ /* $n = .. */
+ i2->opcode = Op_store_field;
+ bcfree(i2->nexti); /* Op_assign */
+ i2->nexti = NULL;
+ bcfree(i1); /* Op_field_assign */
+ exp->lasti = i2; /* update Op_list */
+ return exp;
+ }
+ break;
+
+ case Op_push_array:
+ if (i2->nexti->nexti->opcode == Op_subscript_lhs) {
+ i3 = i2->nexti->nexti;
+ if (i3->sub_count == 1
+ && i3->nexti == i1
+ && i1->opcode == Op_assign
+ ) {
+ /* array[sub] = .. */
+ i3->opcode = Op_store_sub;
+ i3->memory = i2->memory;
+ i3->expr_count = 1; /* sub_count shadows memory,
+ * so use expr_count instead.
+ */
+ i3->nexti = NULL;
+ i2->opcode = Op_no_op;
+ bcfree(i1); /* Op_assign */
+ exp->lasti = i3; /* update Op_list */
+ return exp;
+ }
+ }
+ break;
+
+ case Op_push_lhs:
+ if (i2->nexti == i1
+ && i1->opcode == Op_assign
+ ) {
+ /* var = .. */
+ i2->opcode = Op_store_var;
+ i2->nexti = NULL;
+ bcfree(i1); /* Op_assign */
+ exp->lasti = i2; /* update Op_list */
+ return exp;
+ }
+ break;
+
+ default:
+ break;
+ }
+ }
+
+ /* no optimization */
+ return list_append(exp, instruction(Op_pop));
+}
+
+
+/* mk_getline --- make instructions for getline */
+
+static INSTRUCTION *
+mk_getline(INSTRUCTION *op, INSTRUCTION *var, INSTRUCTION *redir, OPCODE redirtype)
+{
+ INSTRUCTION *ip;
+ INSTRUCTION *tp;
+ INSTRUCTION *asgn = NULL;
+
+ /*
+ * getline [var] < [file]
+ *
+ * [ file (simp_exp)]
+ * [ [ var ] ]
+ * [ Op_K_getline_redir|NULL|redir_type|into_var]
+ * [ [var_assign] ]
+ *
+ */
+
+ if (redir == NULL) {
+ int sline = op->source_line;
+ bcfree(op);
+ op = bcalloc(Op_K_getline, 2, sline);
+ (op + 1)->target_endfile = ip_endfile;
+ (op + 1)->target_beginfile = ip_beginfile;
+ }
+
+ if (var != NULL) {
+ tp = make_assignable(var->lasti);
+ assert(tp != NULL);
+
+ /* check if we need after_assign bytecode */
+ if (tp->opcode == Op_push_lhs
+ && tp->memory->type == Node_var
+ && tp->memory->var_assign
+ ) {
+ asgn = instruction(Op_var_assign);
+ asgn->memory = tp->memory;
+ } else if (tp->opcode == Op_field_spec_lhs) {
+ asgn = instruction(Op_field_assign);
+ asgn->field_assign = (Func_ptr) 0; /* determined at run time */
+ tp->target_assign = asgn;
+ }
+ if (redir != NULL) {
+ ip = list_merge(redir, var);
+ (void) list_append(ip, op);
+ } else
+ ip = list_append(var, op);
+ } else if (redir != NULL)
+ ip = list_append(redir, op);
+ else
+ ip = list_create(op);
+ op->into_var = (var != NULL);
+ op->redir_type = (redir != NULL) ? redirtype : 0;
+
+ return (asgn == NULL ? ip : list_append(ip, asgn));
+}
+
+
+/* mk_for_loop --- for loop bytecodes */
+
+static INSTRUCTION *
+mk_for_loop(INSTRUCTION *forp, INSTRUCTION *init, INSTRUCTION *cond,
+ INSTRUCTION *incr, INSTRUCTION *body)
+{
+ /*
+ * [ Op_push_loop | z| y] <-- continue | break
+ * ------------------------
+ * init (may be NULL)
+ * ------------------------
+ * x:
+ * cond (Op_no_op if NULL)
+ * ------------------------
+ * [ Op_jmp_false y ]
+ * ------------------------
+ * body (may be NULL)
+ * ------------------------
+ * z:
+ * incr (may be NULL)
+ * [ Op_jmp x ]
+ * ------------------------
+ * y:[ Op_pop_loop ]
+ */
+
+ INSTRUCTION *ip;
+ INSTRUCTION *cp;
+ INSTRUCTION *jmp;
+ INSTRUCTION *pp_cond;
+ INSTRUCTION *ret;
+
+ cp = instruction(Op_pop_loop);
+
+ forp->opcode = Op_push_loop;
+ forp->target_break = cp;
+ ip = list_create(forp);
+
+ if (init != NULL)
+ (void) list_merge(ip, init);
+
+ if (cond != NULL) {
+ add_lint(cond, LINT_assign_in_cond);
+ pp_cond = cond->nexti;
+ (void) list_merge(ip, cond);
+ (void) list_append(ip, instruction(Op_jmp_false));
+ ip->lasti->target_jmp = cp;
+ } else {
+ pp_cond = instruction(Op_no_op);
+ (void) list_append(ip, pp_cond);
+ }
+
+ if (do_profiling) {
+ (void) list_append(ip, instruction(Op_exec_count));
+ (forp + 1)->opcode = Op_K_for;
+ (forp + 1)->forloop_cond = pp_cond;
+ (forp + 1)->forloop_body = ip->lasti;
+ }
+
+ if (body != NULL)
+ (void) list_merge(ip, body);
+
+ if (incr != NULL) {
+ forp->target_continue = incr->nexti;
+ (void) list_merge(ip, incr);
+ }
+ jmp = instruction(Op_jmp);
+ jmp->target_jmp = pp_cond;
+ if (incr == NULL)
+ forp->target_continue = jmp;
+ (void) list_append(ip, jmp);
+
+ ret = list_append(ip, cp);
+
+ fix_break_continue(forp, cp, TRUE);
+
+ return ret;
+}
+
+/* add_lint --- add lint warning bytecode if needed */
+
+static void
+add_lint(INSTRUCTION *list, LINTTYPE linttype)
+{
+#ifndef NO_LINT
+ INSTRUCTION *ip;
+
+ switch (linttype) {
+ case LINT_assign_in_cond:
+ ip = list->lasti;
+ if (ip->opcode == Op_var_assign || ip->opcode == Op_field_assign) {
+ assert(ip != list->nexti);
+ for (ip = list->nexti; ip->nexti != list->lasti; ip = ip->nexti)
+ ;
+ }
+
+ if (ip->opcode == Op_assign || ip->opcode == Op_assign_concat) {
+ list_append(list, instruction(Op_lint));
+ list->lasti->lint_type = linttype;
+ }
+ break;
+
+ case LINT_no_effect:
+ if (list->lasti->opcode == Op_pop && list->nexti != list->lasti) {
+ for (ip = list->nexti; ip->nexti != list->lasti; ip = ip->nexti)
+ ;
+
+ if (do_lint) { /* compile-time warning */
+ if (isnoeffect(ip->opcode))
+ lintwarn(_("statement may have no effect"));
+ }
+
+ if (ip->opcode == Op_push) { /* run-time warning */
+ list_append(list, instruction(Op_lint));
+ list->lasti->lint_type = linttype;
+ }
+ }
+ break;
+
+ default:
+ break;
+ }
+#endif
+}
+
+/* mk_expression_list --- list of bytecode lists */
+
+static INSTRUCTION *
+mk_expression_list(INSTRUCTION *list, INSTRUCTION *s1)
+{
+ INSTRUCTION *r;
+
+ /* we can't just combine all bytecodes, since we need to
+ * process individual expressions for a few builtins in snode() (-:
+ */
+
+ /* -- list of lists */
+ /* [Op_list| ... ]------
+ * |
+ * [Op_list| ... ] -- |
+ * ... | |
+ * ... <------- |
+ * [Op_list| ... ] -- |
+ * ... | |
+ * ... | |
+ * ... <------- --
+ */
+
+ assert(s1 != NULL && s1->opcode == Op_list);
+ if (list == NULL) {
+ list = instruction(Op_list);
+ list->nexti = s1;
+ list->lasti = s1->lasti;
+ return list;
+ }
+
+ /* append expression to the end of the list */
+
+ r = list->lasti;
+ r->nexti = s1;
+ list->lasti = s1->lasti;
+ return list;
+}
+
+/* count_expressions --- fixup expression_list from mk_expression_list.
+ * returns no of expressions in list. isarg is true
+ * for function arguments.
+ */
+
+static int
+count_expressions(INSTRUCTION **list, int isarg)
+{
+ INSTRUCTION *expr;
+ INSTRUCTION *r = NULL;
+ int count = 0;
+
+ if (*list == NULL) /* error earlier */
+ return 0;
+
+ for (expr = (*list)->nexti; expr; ) {
+ INSTRUCTION *t1, *t2;
+ t1 = expr->nexti;
+ t2 = expr->lasti;
+ if (isarg && t1 == t2 && t1->opcode == Op_push)
+ t1->opcode = Op_push_param;
+ if (++count == 1)
+ r = expr;
+ else
+ (void) list_merge(r, expr);
+ expr = t2->nexti;
+ }
+
+ assert(count > 0);
+ if (! isarg && count > max_args)
+ max_args = count;
+ bcfree(*list);
+ *list = r;
+ return count;
+}
+
+/* fix_break_continue --- fix up break & continue nodes in loop bodies */
+
+static void
+fix_break_continue(INSTRUCTION *start, INSTRUCTION *end, int check_continue)
+{
+ INSTRUCTION *ip, *b_target, *c_target;
+
+ assert(start->opcode == Op_push_loop);
+ assert(end->opcode == Op_pop_loop);
+
+ b_target = start->target_break;
+ c_target = start->target_continue;
+
+ for (ip = start; ip != end; ip = ip->nexti) {
+ switch (ip->opcode) {
+ case Op_K_break:
+ if (ip->target_jmp == NULL)
+ ip->target_jmp = b_target;
+ break;
+
+ case Op_K_continue:
+ if (check_continue && ip->target_jmp == NULL)
+ ip->target_jmp = c_target;
+ break;
+
+ default:
+ /* this is to keep the compiler happy. sheesh. */
+ break;
+ }
+ }
+}
+
+
+/* append_symbol --- append symbol to the list of symbols
+ * installed in the symbol table.
+ */
+
+void
+append_symbol(char *name)
+{
+ NODE *hp;
+
+ /* N.B.: func_install removes func name and reinstalls it;
+ * and we get two entries for it here!. destroy_symbol()
+ * will find and destroy the Node_func which is what we want.
+ */
+
+ getnode(hp);
+ hp->hname = name; /* shallow copy */
+ hp->hnext = symbol_list->hnext;
+ symbol_list->hnext = hp;
+}
+
+void
+release_symbols(NODE *symlist, int keep_globals)
+{
+ NODE *hp, *n;
+
+ for (hp = symlist->hnext; hp != NULL; hp = n) {
+ if (! keep_globals) {
+ /* destroys globals, function, and params
+ * if still in symbol table and not removed by func_install
+ * due to parse error.
+ */
+ destroy_symbol(hp->hname);
+ }
+ n = hp->hnext;
+ freenode(hp);
+ }
+ symlist->hnext = NULL;
+}
+
+/* destroy_symbol --- remove a symbol from symbol table
+* and free all associated memory.
+*/
+
+
+void
+destroy_symbol(char *name)
+{
+ NODE *symbol, *hp;
+
+ symbol = lookup(name);
+ if (symbol == NULL)
+ return;
+
+ if (symbol->type == Node_func) {
+ char **varnames;
+ NODE *func, *n;
+
+ func = symbol;
+ varnames = func->parmlist;
+ if (varnames != NULL)
+ efree(varnames);
+
+ /* function parameters of type Node_param_list */
+ for (n = func->lnode->rnode; n != NULL; ) {
+ NODE *np;
+ np = n->rnode;
+ efree(n->param);
+ freenode(n);
+ n = np;
+ }
+ freenode(func->lnode);
+ func_count--;
+
+ } else if (symbol->type == Node_var_array)
+ assoc_clear(symbol);
+ else if (symbol->type == Node_var)
+ unref(symbol->var_value);
+
+ /* remove from symbol table */
+ hp = remove_symbol(name);
+ efree(hp->hname);
+ freenode(hp->hvalue);
+ freenode(hp);
+}
+
+#define pool_size d.dl
+#define freei x.xi
+static INSTRUCTION *pool_list;
+static CONTEXT *curr_ctxt = NULL;
+
+
+CONTEXT *
+new_context()
+{
+ CONTEXT *ctxt;
+
+ emalloc(ctxt, CONTEXT *, sizeof(CONTEXT), "new_context");
+ memset(ctxt, 0, sizeof(CONTEXT));
+ ctxt->srcfiles.next = ctxt->srcfiles.prev = &ctxt->srcfiles;
+ ctxt->rule_list.opcode = Op_list;
+ ctxt->rule_list.lasti = &ctxt->rule_list;
+ if (curr_ctxt == NULL) {
+ ctxt->level = 0;
+ pool_list = &ctxt->pools;
+ symbol_list = &ctxt->symbols;
+ srcfiles = &ctxt->srcfiles;
+ rule_list = &ctxt->rule_list;
+ install_func = ctxt->install_func;
+ curr_ctxt = ctxt;
+ } else
+ ctxt->level = curr_ctxt->level + 1; /* this assumes contexts don't overlap each other ? */
+
+ return ctxt;
+}
+
+
+/* N.B.: new context (level > 0) inherits all command line options;
+ * probably should restore defaults for lint etc.
+ */
+
+CONTEXT *
+set_context(CONTEXT *ctxt)
+{
+ assert(curr_ctxt != NULL);
+ if (curr_ctxt == ctxt)
+ goto update;
+
+ /* save current source and sourceline */
+ curr_ctxt->sourceline = sourceline;
+ curr_ctxt->source = source;
+
+ if (ctxt == NULL) {
+ assert(curr_ctxt->prev != NULL);
+ ctxt = curr_ctxt->prev;
+ } else
+ ctxt->prev = curr_ctxt;
+
+ /* restore source and sourceline */
+ sourceline = ctxt->sourceline;
+ source = ctxt->source;
+
+update:
+ pool_list = &ctxt->pools;
+ symbol_list = &ctxt->symbols;
+ srcfiles = &ctxt->srcfiles;
+ rule_list = &ctxt->rule_list;
+ install_func = ctxt->install_func;
+ curr_ctxt = ctxt;
+ return curr_ctxt;
+}
+
+CONTEXT *
+get_context()
+{
+ assert(curr_ctxt != NULL);
+ return curr_ctxt;
+}
+
+void
+free_context(CONTEXT *ctxt, int keep_globals)
+{
+ SRCFILE *s, *sn;
+
+ if (ctxt == NULL)
+ return;
+
+ assert(curr_ctxt != ctxt);
+
+ /* free all code including function codes */
+ free_bcpool(&ctxt->pools);
+ /* free symbols */
+ release_symbols(&ctxt->symbols, keep_globals);
+ /* free srcfiles */
+ for (s = &ctxt->srcfiles; s != &ctxt->srcfiles; s = sn) {
+ sn = s->next;
+ if (s->stype != SRC_CMDLINE && s->stype != SRC_STDIN)
+ efree(s->fullpath);
+ efree(s->src);
+ efree(s);
+ }
+ efree(ctxt);
+}
+
+static void
+free_bc_internal(INSTRUCTION *cp)
+{
+ INSTRUCTION *curr;
+ NODE *m;
+
+ switch(cp->opcode) {
+ case Op_func_call:
+ if (cp->func_name != NULL
+ && cp->func_name != builtin_func
+ )
+ efree(cp->func_name);
+ break;
+ case Op_K_switch:
+ for (curr = cp->case_val; curr != NULL; curr = curr->nexti) {
+ if (curr->opcode == Op_K_case &&
+ curr->memory->type != Node_val
+ ) {
+ m = curr->memory;
+ if (m->re_text != NULL)
+ unref(m->re_text);
+ if (m->re_reg != NULL)
+ refree(m->re_reg);
+ if (m->re_exp != NULL)
+ unref(m->re_exp);
+ freenode(m);
+ }
+ }
+ break;
+ case Op_push_re:
+ case Op_match_rec:
+ case Op_match:
+ case Op_nomatch:
+ m = cp->memory;
+ if (m->re_reg != NULL)
+ refree(m->re_reg);
+ if (m->re_exp != NULL)
+ unref(m->re_exp);
+ if (m->re_text != NULL)
+ unref(m->re_text);
+ freenode(m);
+ break;
+ case Op_token: /* token lost during error recovery in yyparse */
+ if (cp->lextok != NULL)
+ efree(cp->lextok);
+ break;
+ case Op_illegal:
+ cant_happen();
+ default:
+ break;
+ }
+}
+
+
+/* INSTR_CHUNK must be > largest code size (3) */
+#define INSTR_CHUNK 127
+
+/* bcfree --- deallocate instruction */
+
+void
+bcfree(INSTRUCTION *cp)
+{
+ cp->opcode = 0;
+ cp->nexti = pool_list->freei;
+ pool_list->freei = cp;
+}
+
+
+/* bcalloc --- allocate a new instruction */
+
+INSTRUCTION *
+bcalloc(OPCODE op, int size, int srcline)
+{
+ INSTRUCTION *cp;
+
+ if (size > 1) {
+ /* wide instructions Op_rule, Op_func_call .. */
+ emalloc(cp, INSTRUCTION *, (size + 1) * sizeof(INSTRUCTION), "bcalloc");
+ cp->pool_size = size;
+ cp->nexti = pool_list->nexti;
+ pool_list->nexti = cp++;
+ } else {
+ INSTRUCTION *pool;
+
+ pool = pool_list->freei;
+ if (pool == NULL) {
+ INSTRUCTION *last;
+ emalloc(cp, INSTRUCTION *, (INSTR_CHUNK + 1) * sizeof(INSTRUCTION), "bcalloc");
+
+ cp->pool_size = INSTR_CHUNK;
+ cp->nexti = pool_list->nexti;
+ pool_list->nexti = cp;
+ pool = ++cp;
+ last = &pool[INSTR_CHUNK - 1];
+ for (; cp <= last; cp++) {
+ cp->opcode = 0;
+ cp->nexti = cp + 1;
+ }
+ --cp;
+ cp->nexti = NULL;
+ }
+ cp = pool;
+ pool_list->freei = cp->nexti;
+ }
+
+ memset(cp, 0, size * sizeof(INSTRUCTION));
+ cp->opcode = op;
+ cp->source_line = srcline;
+ return cp;
+}
+
+
+static void
+free_bcpool(INSTRUCTION *pl)
+{
+ INSTRUCTION *pool, *tmp;
+
+ for (pool = pl->nexti; pool != NULL; pool = tmp) {
+ INSTRUCTION *cp, *last;
+ long psiz;
+ psiz = pool->pool_size;
+ if (psiz == INSTR_CHUNK)
+ last = pool + psiz;
+ else
+ last = pool + 1;
+ for (cp = pool + 1; cp <= last ; cp++) {
+ if (cp->opcode != 0)
+ free_bc_internal(cp);
+ }
+ tmp = pool->nexti;
+ efree(pool);
+ }
+ memset(pl, 0, sizeof(INSTRUCTION));
+}
+
+
+static inline INSTRUCTION *
+list_create(INSTRUCTION *x)
+{
+ INSTRUCTION *l;
+
+ l = instruction(Op_list);
+ l->nexti = x;
+ l->lasti = x;
+ return l;
+}
+
+static inline INSTRUCTION *
+list_append(INSTRUCTION *l, INSTRUCTION *x)
+{
+#ifdef GAWKDEBUG
+ if (l->opcode != Op_list)
+ cant_happen();
+#endif
+ l->lasti->nexti = x;
+ l->lasti = x;
+ return l;
+}
+
+static inline INSTRUCTION *
+list_prepend(INSTRUCTION *l, INSTRUCTION *x)
+{
+#ifdef GAWKDEBUG
+ if (l->opcode != Op_list)
+ cant_happen();
+#endif
+ x->nexti = l->nexti;
+ l->nexti = x;
+ return l;
+}
+
+static inline INSTRUCTION *
+list_merge(INSTRUCTION *l1, INSTRUCTION *l2)
+{
+#ifdef GAWKDEBUG
+ if (l1->opcode != Op_list)
+ cant_happen();
+ if (l2->opcode != Op_list)
+ cant_happen();
+#endif
+ l1->lasti->nexti = l2->nexti;
+ l1->lasti = l2->lasti;
+ bcfree(l2);
+ return l1;
+}
+
/* See if name is a special token. */
int
@@ -3589,7 +5849,6 @@ check_special(const char *name)
}
#endif
-
low = 0;
high = (sizeof(tokentab) / sizeof(tokentab[0])) - 1;
while (low <= high) {
@@ -3628,7 +5887,7 @@ read_one_line(int fd, void *buffer, size_t count)
fp = fdopen(fd, "r");
if (fp == NULL) {
fprintf(stderr, "ugh. fdopen: %s\n", strerror(errno));
- exit(EXIT_FAILURE);
+ gawk_exit(EXIT_FAILURE);
}
}
@@ -3654,161 +5913,3 @@ one_line_close(int fd)
return ret;
}
-/* constant_fold --- try to fold constant operations */
-
-static NODE *
-constant_fold(NODE *left, NODETYPE op, NODE *right)
-{
- AWKNUM result;
- extern double fmod P((double x, double y));
-
- if (! do_optimize)
- return node(left, op, right);
-
- /* Unary not */
- if (right == NULL) {
- if (op == Node_not && left->type == Node_val) {
- if ((left->flags & (STRCUR|STRING)) != 0) {
- NODE *ret;
- if (left->stlen == 0) {
- ret = make_number((AWKNUM) 1.0);
- } else {
- ret = make_number((AWKNUM) 0.0);
- }
- unref(left);
-
- return ret;
- } else {
- if (left->numbr == 0) {
- left->numbr = 1.0;
- } else {
- left->numbr = 0.0;
- }
-
- return left;
- }
- }
-
- return node(left, op, right);
- }
-
- /* String concatentation of two string constants */
- if (op == Node_concat
- && left->type == Node_val
- && (left->flags & (STRCUR|STRING)) != 0
- && right->type == Node_val
- && (right->flags & (STRCUR|STRING)) != 0) {
- size_t newlen = left->stlen + right->stlen + 2;
-
- erealloc(left->stptr, char *, newlen, "constant_fold");
- memcpy(left->stptr + left->stlen, right->stptr, right->stlen);
- left->stptr[left->stlen + right->stlen] = '\0';
- left->stlen += right->stlen;
-
- unref(right);
- return left;
- }
-
- /*
- * From here down, numeric operations.
- * Check for string and bail out if have them.
- */
- if (left->type != Node_val
- || (left->flags & (STRCUR|STRING)) != 0
- || right->type != Node_val
- || (right->flags & (STRCUR|STRING)) != 0) {
- return node(left, op, right);
- }
-
- /* Numeric operations: */
- switch (op) {
- case Node_not:
- case Node_exp:
- case Node_times:
- case Node_quotient:
- case Node_mod:
- case Node_plus:
- case Node_minus:
- break;
- default:
- return node(left, op, right);
- }
-
- left->numbr = force_number(left);
- right->numbr = force_number(right);
-
- result = left->numbr;
- switch (op) {
- case Node_exp:
- result = calc_exp(left->numbr, right->numbr);
- break;
- case Node_times:
- result *= right->numbr;
- break;
- case Node_quotient:
- if (right->numbr == 0)
- fatal(_("division by zero attempted in `/'"));
- result /= right->numbr;
- break;
- case Node_mod:
- if (right->numbr == 0)
- fatal(_("division by zero attempted in `%%'"));
-#ifdef HAVE_FMOD
- result = fmod(result, right->numbr);
-#else /* ! HAVE_FMOD */
- (void) modf(left->numbr / right->numbr, &result);
- result = left->numbr - result * right->numbr;
-#endif /* ! HAVE_FMOD */
- break;
- case Node_plus:
- result += right->numbr;
- break;
- case Node_minus:
- result -= right->numbr;
- break;
- default:
- /* Shut up compiler warnings */
- fatal("can't happen");
- break;
- }
-
- unref(right);
- left->numbr = result;
-
- return left;
-}
-
-/* optimize_concat --- optimize the general "x = x y z a" case */
-
-static NODE *
-optimize_concat(NODE *left, NODETYPE op, NODE *right)
-{
- NODE *top, *leftmost;
-
- if (op != Node_assign)
- return node(left, op, right);
-
- /*
- * optimization of `x = x y'. can save lots of time
- * if done a lot.
- */
- if (( left->type == Node_var
- || left->type == Node_var_new
- || left->type == Node_param_list)
- && right->type == Node_concat) {
- /* find bottom of tree, save it */
- for (top = right; top->lnode != NULL && top->type == Node_concat; top = top->lnode) {
- leftmost = top->lnode;
- if (leftmost->type == Node_concat)
- continue;
-
- /* at this point, we've run out of concatentation */
- if (leftmost != left)
- return node(left, op, right);
-
- top->lnode = Nnull_string;
- return node(left, Node_assign_concat, right);
- }
- }
- return node(left, op, right);
-}
diff --git a/awklib/Makefile.in b/awklib/Makefile.in
index 8a5cdf75..45b9deba 100644
--- a/awklib/Makefile.in
+++ b/awklib/Makefile.in
@@ -69,9 +69,9 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/arch.m4 \
$(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libsigsegv.m4 \
$(top_srcdir)/m4/longlong.m4 $(top_srcdir)/m4/nls.m4 \
$(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \
- $(top_srcdir)/m4/socket.m4 $(top_srcdir)/m4/stdint_h.m4 \
- $(top_srcdir)/m4/uintmax_t.m4 $(top_srcdir)/m4/ulonglong.m4 \
- $(top_srcdir)/configure.ac
+ $(top_srcdir)/m4/readline.m4 $(top_srcdir)/m4/socket.m4 \
+ $(top_srcdir)/m4/stdint_h.m4 $(top_srcdir)/m4/uintmax_t.m4 \
+ $(top_srcdir)/m4/ulonglong.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
@@ -158,6 +158,7 @@ LDFLAGS = @LDFLAGS@
LIBICONV = @LIBICONV@
LIBINTL = @LIBINTL@
LIBOBJS = @LIBOBJS@
+LIBREADLINE = @LIBREADLINE@
LIBS = @LIBS@
LIBSIGSEGV = @LIBSIGSEGV@
LIBSIGSEGV_PREFIX = @LIBSIGSEGV_PREFIX@
diff --git a/awkprintf.h b/awkprintf.h
new file mode 100644
index 00000000..aa094857
--- /dev/null
+++ b/awkprintf.h
@@ -0,0 +1,1019 @@
+/*
+ * awkprintf.h -- Formatting code for gawk, used in debug.c and builtin.c.
+ */
+
+/*
+ * Copyright (C) 1986, 1988, 1989, 1991-2010 the Free Software Foundation, Inc.
+ *
+ * This file is part of GAWK, the GNU implementation of the
+ * AWK Programming Language.
+ *
+ * GAWK is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GAWK is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+#include "floatmagic.h"
+
+#define DEFAULT_G_PRECISION 6
+
+#ifdef GFMT_WORKAROUND
+/* semi-temporary hack, mostly to gracefully handle VMS */
+static void sgfmt(char *buf, const char *format, int alt,
+ int fwidth, int precision, double value);
+#endif /* GFMT_WORKAROUND */
+static size_t mbc_byte_count(const char *ptr, size_t numchars);
+static size_t mbc_char_count(const char *ptr, size_t numbytes);
+
+/*
+ * r_format_arg() formats arguments of sprintf,
+ * and accordingly to a fmt_string providing a format like in
+ * printf family from C library. Returns a string node which value
+ * is a formatted string. Called by sprintf function.
+ *
+ * It is one of the uglier parts of gawk. Thanks to Michal Jaegermann
+ * for taming this beast and making it compatible with ANSI C.
+ */
+
+r_format_arg(
+ const char *fmt_string,
+ size_t n0,
+ NODE **the_args,
+ long num_args)
+{
+/* copy 'l' bytes from 's' to 'obufout' checking for space in the process */
+/* difference of pointers should be of ptrdiff_t type, but let us be kind */
+#define bchunk(s, l) if (l) { \
+ while ((l) > ofre) { \
+ size_t olen = obufout - obuf; \
+ erealloc(obuf, char *, osiz * 2, "format_tree"); \
+ ofre += osiz; \
+ osiz *= 2; \
+ obufout = obuf + olen; \
+ } \
+ memcpy(obufout, s, (size_t) (l)); \
+ obufout += (l); \
+ ofre -= (l); \
+}
+
+/* copy one byte from 's' to 'obufout' checking for space in the process */
+#define bchunk_one(s) { \
+ if (ofre < 1) { \
+ size_t olen = obufout - obuf; \
+ erealloc(obuf, char *, osiz * 2, "format_tree"); \
+ ofre += osiz; \
+ osiz *= 2; \
+ obufout = obuf + olen; \
+ } \
+ *obufout++ = *s; \
+ --ofre; \
+}
+
+/* Is there space for something L big in the buffer? */
+#define chksize(l) if ((l) >= ofre) { \
+ size_t olen = obufout - obuf; \
+ size_t delta = osiz+l-ofre; \
+ erealloc(obuf, char *, osiz + delta, "format_tree"); \
+ obufout = obuf + olen; \
+ ofre += delta; \
+ osiz += delta; \
+}
+
+ size_t cur_arg = 0;
+ NODE *r = NULL;
+ int i;
+ int toofew = FALSE;
+ char *obuf, *obufout;
+ size_t osiz, ofre;
+ const char *chbuf;
+ const char *s0, *s1;
+ int cs1;
+ NODE *arg;
+ long fw, prec, argnum;
+ int used_dollar;
+ int lj, alt, big, bigbig, small, have_prec, need_format;
+ long *cur = NULL;
+ uintmax_t uval;
+ int sgn;
+ int base = 0;
+ /*
+ * Although this is an array, the elements serve two different
+ * purposes. The first element is the general buffer meant
+ * to hold the entire result string. The second one is a
+ * temporary buffer for large floating point values. They
+ * could just as easily be separate variables, and the
+ * code might arguably be clearer.
+ */
+ struct {
+ char *buf;
+ size_t bufsize;
+ char stackbuf[30];
+ } cpbufs[2];
+#define cpbuf cpbufs[0].buf
+ char *cend = &cpbufs[0].stackbuf[sizeof(cpbufs[0].stackbuf)];
+ char *cp;
+ const char *fill;
+ AWKNUM tmpval;
+ char signchar = FALSE;
+ size_t len;
+ int zero_flag = FALSE;
+ int quote_flag = FALSE;
+ int ii, jj;
+ char *chp;
+ size_t copy_count, char_count;
+ static const char sp[] = " ";
+ static const char zero_string[] = "0";
+ static const char lchbuf[] = "0123456789abcdef";
+ static const char Uchbuf[] = "0123456789ABCDEF";
+
+#define INITIAL_OUT_SIZE 512
+ emalloc(obuf, char *, INITIAL_OUT_SIZE, "format_tree");
+ obufout = obuf;
+ osiz = INITIAL_OUT_SIZE;
+ ofre = osiz - 2;
+
+ cur_arg = 1;
+
+ {
+ size_t k;
+ for (k = 0; k < sizeof(cpbufs)/sizeof(cpbufs[0]); k++) {
+ cpbufs[k].bufsize = sizeof(cpbufs[k].stackbuf);
+ cpbufs[k].buf = cpbufs[k].stackbuf;
+ }
+ }
+
+ /*
+ * The point of this goop is to grow the buffer
+ * holding the converted number, so that large
+ * values don't overflow a fixed length buffer.
+ */
+#define PREPEND(CH) do { \
+ if (cp == cpbufs[0].buf) { \
+ char *prev = cpbufs[0].buf; \
+ emalloc(cpbufs[0].buf, char *, 2*cpbufs[0].bufsize, \
+ "format_tree"); \
+ memcpy((cp = cpbufs[0].buf+cpbufs[0].bufsize), prev, \
+ cpbufs[0].bufsize); \
+ cpbufs[0].bufsize *= 2; \
+ if (prev != cpbufs[0].stackbuf) \
+ efree(prev); \
+ cend = cpbufs[0].buf+cpbufs[0].bufsize; \
+ } \
+ *--cp = (CH); \
+} while(0)
+
+ /*
+ * Check first for use of `count$'.
+ * If plain argument retrieval was used earlier, choke.
+ * Otherwise, return the requested argument.
+ * If not `count$' now, but it was used earlier, choke.
+ * If this format is more than total number of args, choke.
+ * Otherwise, return the current argument.
+ */
+#define parse_next_arg() { \
+ if (argnum > 0) { \
+ if (cur_arg > 1) { \
+ fmt_msg(_("fatal: must use `count$' on all formats or none")); \
+ goto out; \
+ } \
+ arg = the_args[argnum]; \
+ } else if (used_dollar) { \
+ fmt_msg(_("fatal: must use `count$' on all formats or none")); \
+ arg = 0; /* shutup the compiler */ \
+ goto out; \
+ } else if (cur_arg >= num_args) { \
+ arg = 0; /* shutup the compiler */ \
+ toofew = TRUE; \
+ break; \
+ } else { \
+ arg = the_args[cur_arg]; \
+ cur_arg++; \
+ } \
+}
+
+ need_format = FALSE;
+ used_dollar = FALSE;
+
+ s0 = s1 = fmt_string;
+ while (n0-- > 0) {
+ if (*s1 != '%') {
+ s1++;
+ continue;
+ }
+ need_format = TRUE;
+ bchunk(s0, s1 - s0);
+ s0 = s1;
+ cur = &fw;
+ fw = 0;
+ prec = 0;
+ argnum = 0;
+ have_prec = FALSE;
+ signchar = FALSE;
+ zero_flag = FALSE;
+ quote_flag = FALSE;
+ lj = alt = big = bigbig = small = FALSE;
+ fill = sp;
+ cp = cend;
+ chbuf = lchbuf;
+ s1++;
+
+retry:
+ if (n0-- == 0) /* ran out early! */
+ break;
+
+ switch (cs1 = *s1++) {
+ case (-1): /* dummy case to allow for checking */
+check_pos:
+ if (cur != &fw)
+ break; /* reject as a valid format */
+ goto retry;
+ case '%':
+ need_format = FALSE;
+ /*
+ * 29 Oct. 2002:
+ * The C99 standard pages 274 and 279 seem to imply that
+ * since there's no arg converted, the field width doesn't
+ * apply. The code already was that way, but this
+ * comment documents it, at least in the code.
+ */
+ if (do_lint) {
+ const char *msg = NULL;
+
+ if (fw && ! have_prec)
+ msg = _("field width is ignored for `%%' specifier");
+ else if (fw == 0 && have_prec)
+ msg = _("precision is ignored for `%%' specifier");
+ else if (fw && have_prec)
+ msg = _("field width and precision are ignored for `%%' specifier");
+
+ if (msg != NULL)
+ lintwarn("%s", msg);
+ }
+ bchunk_one("%");
+ s0 = s1;
+ break;
+
+ case '0':
+ /*
+ * Only turn on zero_flag if we haven't seen
+ * the field width or precision yet. Otherwise,
+ * screws up floating point formatting.
+ */
+ if (cur == & fw)
+ zero_flag = TRUE;
+ if (lj)
+ goto retry;
+ /* FALL through */
+ case '1':
+ case '2':
+ case '3':
+ case '4':
+ case '5':
+ case '6':
+ case '7':
+ case '8':
+ case '9':
+ if (cur == NULL)
+ break;
+ if (prec >= 0)
+ *cur = cs1 - '0';
+ /*
+ * with a negative precision *cur is already set
+ * to -1, so it will remain negative, but we have
+ * to "eat" precision digits in any case
+ */
+ while (n0 > 0 && *s1 >= '0' && *s1 <= '9') {
+ --n0;
+ *cur = *cur * 10 + *s1++ - '0';
+ }
+ if (prec < 0) /* negative precision is discarded */
+ have_prec = FALSE;
+ if (cur == &prec)
+ cur = NULL;
+ if (n0 == 0) /* badly formatted control string */
+ continue;
+ goto retry;
+ case '$':
+ if (do_traditional) {
+ fmt_msg(_("fatal: `$' is not permitted in awk formats"));
+ goto out;
+ }
+
+ if (cur == &fw) {
+ argnum = fw;
+ fw = 0;
+ used_dollar = TRUE;
+ if (argnum <= 0) {
+ fmt_msg(_("fatal: arg count with `$' must be > 0"));
+ goto out;
+ }
+ if (argnum >= num_args) {
+ fmt_msg(_("fatal: arg count %ld greater than total number of supplied arguments"), argnum);
+ goto out;
+ }
+ } else {
+ fmt_msg(_("fatal: `$' not permitted after period in format"));
+ goto out;
+ }
+
+ goto retry;
+ case '*':
+ if (cur == NULL)
+ break;
+ if (! do_traditional && isdigit(*s1)) {
+ int val = 0;
+
+ for (; n0 > 0 && *s1 && isdigit(*s1); s1++, n0--) {
+ val *= 10;
+ val += *s1 - '0';
+ }
+ if (*s1 != '$') {
+ fmt_msg(_("fatal: no `$' supplied for positional field width or precision"));
+ goto out;
+ } else {
+ s1++;
+ n0--;
+ }
+ if (val >= num_args) {
+ toofew = TRUE;
+ break;
+ }
+ arg = the_args[val];
+ } else {
+ parse_next_arg();
+ }
+ *cur = force_number(arg);
+ if (*cur < 0 && cur == &fw) {
+ *cur = -*cur;
+ lj++;
+ }
+ if (cur == &prec) {
+ if (*cur >= 0)
+ have_prec = TRUE;
+ else
+ have_prec = FALSE;
+ cur = NULL;
+ }
+ goto retry;
+ case ' ': /* print ' ' or '-' */
+ /* 'space' flag is ignored */
+ /* if '+' already present */
+ if (signchar != FALSE)
+ goto check_pos;
+ /* FALL THROUGH */
+ case '+': /* print '+' or '-' */
+ signchar = cs1;
+ goto check_pos;
+ case '-':
+ if (prec < 0)
+ break;
+ if (cur == &prec) {
+ prec = -1;
+ goto retry;
+ }
+ fill = sp; /* if left justified then other */
+ lj++; /* filling is ignored */
+ goto check_pos;
+ case '.':
+ if (cur != &fw)
+ break;
+ cur = &prec;
+ have_prec = TRUE;
+ goto retry;
+ case '#':
+ alt = TRUE;
+ goto check_pos;
+ case '\'':
+#if defined(HAVE_LOCALE_H)
+ /* allow quote_flag if there is a thousands separator. */
+ if (loc.thousands_sep[0] != '\0')
+ quote_flag = TRUE;
+ goto check_pos;
+#else
+ goto retry;
+#endif
+ case 'l':
+ if (big)
+ break;
+ else {
+ static short warned = FALSE;
+
+ if (do_lint && ! warned) {
+ lintwarn(_("`l' is meaningless in awk formats; ignored"));
+ warned = TRUE;
+ }
+ if (do_posix) {
+ fmt_msg(_("fatal: `l' is not permitted in POSIX awk formats"));
+ goto out;
+ }
+ }
+ big = TRUE;
+ goto retry;
+ case 'L':
+ if (bigbig)
+ break;
+ else {
+ static short warned = FALSE;
+
+ if (do_lint && ! warned) {
+ lintwarn(_("`L' is meaningless in awk formats; ignored"));
+ warned = TRUE;
+ }
+ if (do_posix) {
+ fmt_msg(_("fatal: `L' is not permitted in POSIX awk formats"));
+ goto out;
+ }
+ }
+ bigbig = TRUE;
+ goto retry;
+ case 'h':
+ if (small)
+ break;
+ else {
+ static short warned = FALSE;
+
+ if (do_lint && ! warned) {
+ lintwarn(_("`h' is meaningless in awk formats; ignored"));
+ warned = TRUE;
+ }
+ if (do_posix) {
+ fmt_msg(_("fatal: `h' is not permitted in POSIX awk formats"));
+ goto out;
+ }
+ }
+ small = TRUE;
+ goto retry;
+ case 'c':
+ need_format = FALSE;
+ parse_next_arg();
+ /* user input that looks numeric is numeric */
+ if ((arg->flags & (MAYBE_NUM|NUMBER)) == MAYBE_NUM)
+ (void) force_number(arg);
+ if (arg->flags & NUMBER) {
+ uval = (uintmax_t) arg->numbr;
+#if MBS_SUPPORT
+ if (gawk_mb_cur_max > 1) {
+ char buf[100];
+ wchar_t wc;
+ mbstate_t mbs;
+ size_t count;
+
+ memset(& mbs, 0, sizeof(mbs));
+ wc = uval;
+
+ count = wcrtomb(buf, wc, & mbs);
+ if (count == 0
+ || count == (size_t)-1
+ || count == (size_t)-2)
+ goto out0;
+
+ memcpy(cpbuf, buf, count);
+ prec = count;
+ cp = cpbuf;
+ goto pr_tail;
+ }
+out0:
+ ;
+ /* else,
+ fall through */
+#endif
+ if (do_lint && uval > 255) {
+ lintwarn("[s]printf: value %g is too big for %%c format",
+ arg->numbr);
+ }
+ cpbuf[0] = uval;
+ prec = 1;
+ cp = cpbuf;
+ goto pr_tail;
+ }
+ /*
+ * As per POSIX, only output first character of a
+ * string value. Thus, we ignore any provided
+ * precision, forcing it to 1. (Didn't this
+ * used to work? 6/2003.)
+ */
+ cp = arg->stptr;
+#ifdef MBS_SUPPORT
+ /*
+ * First character can be multiple bytes if
+ * it's a multibyte character. Grr.
+ */
+ if (gawk_mb_cur_max > 1) {
+ mbstate_t state;
+ size_t count;
+
+ memset(& state, 0, sizeof(state));
+ count = mbrlen(cp, arg->stlen, & state);
+ if (count == 0
+ || count == (size_t)-1
+ || count == (size_t)-2)
+ goto out2;
+ prec = count;
+ goto pr_tail;
+ }
+out2:
+ ;
+#endif
+ prec = 1;
+ goto pr_tail;
+ case 's':
+ need_format = FALSE;
+ parse_next_arg();
+ arg = force_string(arg);
+ if (fw == 0 && ! have_prec)
+ prec = arg->stlen;
+ else {
+ char_count = mbc_char_count(arg->stptr, arg->stlen);
+ if (! have_prec || prec > char_count)
+ prec = char_count;
+ }
+ cp = arg->stptr;
+ goto pr_tail;
+ case 'd':
+ case 'i':
+ need_format = FALSE;
+ parse_next_arg();
+ tmpval = force_number(arg);
+ /*
+ * Check for Nan or Inf.
+ */
+ if (isnan(tmpval) || isinf(tmpval))
+ goto out_of_range;
+ else
+ tmpval = double_to_int(tmpval);
+
+ /*
+ * ``The result of converting a zero value with a
+ * precision of zero is no characters.''
+ */
+ if (have_prec && prec == 0 && tmpval == 0)
+ goto pr_tail;
+
+ if (tmpval < 0) {
+ tmpval = -tmpval;
+ sgn = TRUE;
+ } else {
+ if (tmpval == -0.0)
+ /* avoid printing -0 */
+ tmpval = 0.0;
+ sgn = FALSE;
+ }
+ /*
+ * Use snprintf return value to tell if there
+ * is enough room in the buffer or not.
+ */
+ while ((i = snprintf(cpbufs[1].buf,
+ cpbufs[1].bufsize, "%.0f",
+ tmpval)) >=
+ cpbufs[1].bufsize) {
+ if (cpbufs[1].buf == cpbufs[1].stackbuf)
+ cpbufs[1].buf = NULL;
+ if (i > 0) {
+ cpbufs[1].bufsize += ((i > cpbufs[1].bufsize) ?
+ i : cpbufs[1].bufsize);
+ }
+ else
+ cpbufs[1].bufsize *= 2;
+ assert(cpbufs[1].bufsize > 0);
+ erealloc(cpbufs[1].buf, char *,
+ cpbufs[1].bufsize, "format_tree");
+ }
+ if (i < 1)
+ goto out_of_range;
+ chp = &cpbufs[1].buf[i-1];
+ ii = jj = 0;
+ do {
+ PREPEND(*chp);
+ chp--; i--;
+#if defined(HAVE_LOCALE_H)
+ if (quote_flag && loc.grouping[ii] && ++jj == loc.grouping[ii]) {
+ if (i) /* only add if more digits coming */
+ PREPEND(loc.thousands_sep[0]); /* XXX - assumption it's one char */
+ if (loc.grouping[ii+1] == 0)
+ jj = 0; /* keep using current val in loc.grouping[ii] */
+ else if (loc.grouping[ii+1] == CHAR_MAX)
+ quote_flag = FALSE;
+ else {
+ ii++;
+ jj = 0;
+ }
+ }
+#endif
+ } while (i > 0);
+
+ /* add more output digits to match the precision */
+ if (have_prec) {
+ while (cend - cp < prec)
+ PREPEND('0');
+ }
+
+ if (sgn)
+ PREPEND('-');
+ else if (signchar)
+ PREPEND(signchar);
+ /*
+ * When to fill with zeroes is of course not simple.
+ * First: No zero fill if left-justifying.
+ * Next: There seem to be two cases:
+ * A '0' without a precision, e.g. %06d
+ * A precision with no field width, e.g. %.10d
+ * Any other case, we don't want to fill with zeroes.
+ */
+ if (! lj
+ && ((zero_flag && ! have_prec)
+ || (fw == 0 && have_prec)))
+ fill = zero_string;
+ if (prec > fw)
+ fw = prec;
+ prec = cend - cp;
+ if (fw > prec && ! lj && fill != sp
+ && (*cp == '-' || signchar)) {
+ bchunk_one(cp);
+ cp++;
+ prec--;
+ fw--;
+ }
+ goto pr_tail;
+ case 'X':
+ chbuf = Uchbuf; /* FALL THROUGH */
+ case 'x':
+ base += 6; /* FALL THROUGH */
+ case 'u':
+ base += 2; /* FALL THROUGH */
+ case 'o':
+ base += 8;
+ need_format = FALSE;
+ parse_next_arg();
+ tmpval = force_number(arg);
+
+ /*
+ * ``The result of converting a zero value with a
+ * precision of zero is no characters.''
+ *
+ * If I remember the ANSI C standard, though,
+ * it says that for octal conversions
+ * the precision is artificially increased
+ * to add an extra 0 if # is supplied.
+ * Indeed, in C,
+ * printf("%#.0o\n", 0);
+ * prints a single 0.
+ */
+ if (! alt && have_prec && prec == 0 && tmpval == 0)
+ goto pr_tail;
+
+ if (tmpval < 0) {
+ uval = (uintmax_t) (intmax_t) tmpval;
+ if ((AWKNUM)(intmax_t)uval !=
+ double_to_int(tmpval))
+ goto out_of_range;
+ } else {
+ uval = (uintmax_t) tmpval;
+ if ((AWKNUM)uval != double_to_int(tmpval))
+ goto out_of_range;
+ }
+ /*
+ * When to fill with zeroes is of course not simple.
+ * First: No zero fill if left-justifying.
+ * Next: There seem to be two cases:
+ * A '0' without a precision, e.g. %06d
+ * A precision with no field width, e.g. %.10d
+ * Any other case, we don't want to fill with zeroes.
+ */
+ if (! lj
+ && ((zero_flag && ! have_prec)
+ || (fw == 0 && have_prec)))
+ fill = zero_string;
+ ii = jj = 0;
+ do {
+ PREPEND(chbuf[uval % base]);
+ uval /= base;
+#if defined(HAVE_LOCALE_H)
+ if (base == 10 && quote_flag && loc.grouping[ii] && ++jj == loc.grouping[ii]) {
+ if (uval) /* only add if more digits coming */
+ PREPEND(loc.thousands_sep[0]); /* XXX --- assumption it's one char */
+ if (loc.grouping[ii+1] == 0)
+ jj = 0; /* keep using current val in loc.grouping[ii] */
+ else if (loc.grouping[ii+1] == CHAR_MAX)
+ quote_flag = FALSE;
+ else {
+ ii++;
+ jj = 0;
+ }
+ }
+#endif
+ } while (uval > 0);
+
+ /* add more output digits to match the precision */
+ if (have_prec) {
+ while (cend - cp < prec)
+ PREPEND('0');
+ }
+
+ if (alt && tmpval != 0) {
+ if (base == 16) {
+ PREPEND(cs1);
+ PREPEND('0');
+ if (fill != sp) {
+ bchunk(cp, 2);
+ cp += 2;
+ fw -= 2;
+ }
+ } else if (base == 8)
+ PREPEND('0');
+ }
+ base = 0;
+ if (prec > fw)
+ fw = prec;
+ prec = cend - cp;
+ pr_tail:
+ if (! lj) {
+ while (fw > prec) {
+ bchunk_one(fill);
+ fw--;
+ }
+ }
+ copy_count = prec;
+ if (fw == 0 && ! have_prec)
+ ;
+ else if (gawk_mb_cur_max > 1 && (cs1 == 's' || cs1 == 'c')) {
+ assert(cp == arg->stptr || cp == cpbuf);
+ copy_count = mbc_byte_count(arg->stptr, prec);
+ }
+ bchunk(cp, copy_count);
+ while (fw > prec) {
+ bchunk_one(fill);
+ fw--;
+ }
+ s0 = s1;
+ break;
+
+ out_of_range:
+ /* out of range - emergency use of %g format */
+ if (do_lint)
+ lintwarn(_("[s]printf: value %g is out of range for `%%%c' format"),
+ (double) tmpval, cs1);
+ cs1 = 'g';
+ goto format_float;
+
+ case 'F':
+#if ! defined(PRINTF_HAS_F_FORMAT) || PRINTF_HAS_F_FORMAT != 1
+ cs1 = 'f';
+ /* FALL THROUGH */
+#endif
+ case 'g':
+ case 'G':
+ case 'e':
+ case 'f':
+ case 'E':
+ need_format = FALSE;
+ parse_next_arg();
+ tmpval = force_number(arg);
+ format_float:
+ if (! have_prec)
+ prec = DEFAULT_G_PRECISION;
+ chksize(fw + prec + 9); /* 9 == slop */
+#ifdef VAXCRTL
+ /* pre-ANSI library doesn't handle '0' flag
+ correctly in many cases; reject it */
+ if (zero_flag
+ && (lj || (signchar && signchar != '+')))
+ zero_flag = FALSE;
+#endif
+ cp = cpbuf;
+ *cp++ = '%';
+ if (lj)
+ *cp++ = '-';
+ if (signchar)
+ *cp++ = signchar;
+ if (alt)
+ *cp++ = '#';
+ if (zero_flag)
+ *cp++ = '0';
+ if (quote_flag)
+ *cp++ = '\'';
+ strcpy(cp, "*.*");
+ cp += 3;
+ *cp++ = cs1;
+ *cp = '\0';
+#ifndef GFMT_WORKAROUND
+#if defined(LC_NUMERIC)
+ if (quote_flag && ! use_lc_numeric)
+ setlocale(LC_NUMERIC, "");
+#endif
+ {
+ int n;
+ while ((n = snprintf(obufout, ofre, cpbuf,
+ (int) fw, (int) prec,
+ (double) tmpval)) >= ofre)
+ chksize(n)
+ }
+#if defined(LC_NUMERIC)
+ if (quote_flag && ! use_lc_numeric)
+ setlocale(LC_NUMERIC, "C");
+#endif
+#else /* GFMT_WORKAROUND */
+ if (cs1 == 'g' || cs1 == 'G')
+ sgfmt(obufout, cpbuf, (int) alt,
+ (int) fw, (int) prec, (double) tmpval);
+ else {
+ int n;
+ while ((n = snprintf(obufout, ofre, cpbuf,
+ (int) fw, (int) prec,
+ (double) tmpval)) >= ofre)
+ chksize(n)
+ }
+#endif /* GFMT_WORKAROUND */
+ len = strlen(obufout);
+ ofre -= len;
+ obufout += len;
+ s0 = s1;
+ break;
+ default:
+ if (do_lint && isalpha(cs1))
+ lintwarn(_("ignoring unknown format specifier character `%c': no argument converted"), cs1);
+ break;
+ }
+ if (toofew) {
+ fmt_msg("%s\n\t`%s'\n\t%*s%s",
+ _("fatal: not enough arguments to satisfy format string"),
+ fmt_string, (int) (s1 - fmt_string - 1), "",
+ _("^ ran out for this one"));
+ goto out;
+ }
+ }
+ if (do_lint) {
+ if (need_format)
+ lintwarn(
+ _("[s]printf: format specifier does not have control letter"));
+ if (cur_arg < num_args)
+ lintwarn(
+ _("too many arguments supplied for format string"));
+ }
+ bchunk(s0, s1 - s0);
+ r = make_str_node(obuf, obufout - obuf, ALREADY_MALLOCED);
+ obuf = NULL;
+out:
+ {
+ size_t k;
+ size_t count = sizeof(cpbufs)/sizeof(cpbufs[0]);
+ for (k = 0; k < count; k++) {
+ if (cpbufs[k].buf != cpbufs[k].stackbuf)
+ efree(cpbufs[k].buf);
+ }
+ if (obuf != NULL)
+ efree(obuf);
+ }
+ return r;
+}
+
+
+#ifdef GFMT_WORKAROUND
+/*
+ * printf's %g format [can't rely on gcvt()]
+ * caveat: don't use as argument to *printf()!
+ * 'format' string HAS to be of "<flags>*.*g" kind, or we bomb!
+ */
+static void
+sgfmt(char *buf, /* return buffer; assumed big enough to hold result */
+ const char *format,
+ int alt, /* use alternate form flag */
+ int fwidth, /* field width in a format */
+ int prec, /* indicates desired significant digits, not decimal places */
+ double g) /* value to format */
+{
+ char dform[40];
+ char *gpos;
+ char *d, *e, *p;
+ int again = FALSE;
+
+ strncpy(dform, format, sizeof dform - 1);
+ dform[sizeof dform - 1] = '\0';
+ gpos = strrchr(dform, '.');
+
+ if (g == 0.0 && ! alt) { /* easy special case */
+ *gpos++ = 'd';
+ *gpos = '\0';
+ (void) sprintf(buf, dform, fwidth, 0);
+ return;
+ }
+
+ /* advance to location of 'g' in the format */
+ while (*gpos && *gpos != 'g' && *gpos != 'G')
+ gpos++;
+
+ if (prec <= 0) /* negative precision is ignored */
+ prec = (prec < 0 ? DEFAULT_G_PRECISION : 1);
+
+ if (*gpos == 'G')
+ again = TRUE;
+ /* start with 'e' format (it'll provide nice exponent) */
+ *gpos = 'e';
+ prec--;
+ (void) sprintf(buf, dform, fwidth, prec, g);
+ if ((e = strrchr(buf, 'e')) != NULL) { /* find exponent */
+ int expn = atoi(e+1); /* fetch exponent */
+ if (expn >= -4 && expn <= prec) { /* per K&R2, B1.2 */
+ /* switch to 'f' format and re-do */
+ *gpos = 'f';
+ prec -= expn; /* decimal precision */
+ (void) sprintf(buf, dform, fwidth, prec, g);
+ e = buf + strlen(buf);
+ while (*--e == ' ')
+ continue;
+ e++;
+ }
+ else if (again)
+ *gpos = 'E';
+
+ /* if 'alt' in force, then trailing zeros are not removed */
+ if (! alt && (d = strrchr(buf, '.')) != NULL) {
+ /* throw away an excess of precision */
+ for (p = e; p > d && *--p == '0'; )
+ prec--;
+ if (d == p)
+ prec--;
+ if (prec < 0)
+ prec = 0;
+ /* and do that once again */
+ again = TRUE;
+ }
+ if (again)
+ (void) sprintf(buf, dform, fwidth, prec, g);
+ }
+}
+#endif /* GFMT_WORKAROUND */
+
+
+/* mbc_byte_count --- return number of bytes for corresponding numchars multibyte characters */
+
+static size_t
+mbc_byte_count(const char *ptr, size_t numchars)
+{
+#ifdef MBS_SUPPORT
+ mbstate_t cur_state;
+ size_t sum = 0;
+ int mb_len;
+
+ memset(& cur_state, 0, sizeof(cur_state));
+
+ assert(gawk_mb_cur_max > 1);
+ mb_len = mbrlen(ptr, numchars * gawk_mb_cur_max, &cur_state);
+ if (mb_len <= 0)
+ return numchars; /* no valid m.b. char */
+
+ for (; numchars > 0; numchars--) {
+ mb_len = mbrlen(ptr, numchars * gawk_mb_cur_max, &cur_state);
+ if (mb_len <= 0)
+ break;
+ sum += mb_len;
+ ptr += mb_len;
+ }
+
+ return sum;
+#else
+ return numchars;
+#endif
+}
+
+/* mbc_char_count --- return number of m.b. chars in string, up to numbytes bytes */
+
+static size_t
+mbc_char_count(const char *ptr, size_t numbytes)
+{
+#ifdef MBS_SUPPORT
+ mbstate_t cur_state;
+ size_t sum = 0;
+ int mb_len;
+
+ if (gawk_mb_cur_max == 1)
+ return numbytes;
+
+ memset(& cur_state, 0, sizeof(cur_state));
+
+ mb_len = mbrlen(ptr, numbytes * gawk_mb_cur_max, &cur_state);
+ if (mb_len <= 0)
+ return numbytes; /* no valid m.b. char */
+
+ for (; numbytes > 0; numbytes--) {
+ mb_len = mbrlen(ptr, numbytes * gawk_mb_cur_max, &cur_state);
+ if (mb_len <= 0)
+ break;
+ sum++;
+ ptr += mb_len;
+ }
+
+ return sum;
+#else
+ return numbytes;
+#endif
+}
diff --git a/bisonfix.awk b/bisonfix.awk
index ba071ef4..a759d25b 100644
--- a/bisonfix.awk
+++ b/bisonfix.awk
@@ -19,18 +19,24 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
-/^#if \(! defined \(yyoverflow\) \\/ {
+BEGIN { sfile = ARGV[1] ; delete ARGV[1] }
+
+/^#if.*\\$/ {
line = $0
sub(/\\$/, "", line)
getline line2
- sub(/\\$/, "", line2)
- getline line3
-
- line = line line2 line3
+ while (line2 ~ /\\$/) {
+ line = line line2
+ sub(/\\$/, "", line)
+ getline line2
+ }
+ line = line line2
+ sub(/\\$/, "", line)
print line
next
}
-/^#line.*y\.tab\.c/ { sub(/y.tab.c/, "awkgram.c") }
+/^#line.*y\.tab\.c/ { sub(/y.tab/, sfile) }
{ print }
+
diff --git a/builtin.c b/builtin.c
index 3903dd8a..acd5e0bb 100644
--- a/builtin.c
+++ b/builtin.c
@@ -1,5 +1,5 @@
/*
- * builtin.c - Builtin functions and various utility procedures
+ * builtin.c - Builtin functions and various utility procedures.
*/
/*
@@ -30,7 +30,6 @@
#endif
#include <math.h>
#include "random.h"
-#include "floatmagic.h"
#ifndef CHAR_BIT
# define CHAR_BIT 8
@@ -55,45 +54,44 @@
#define SIZE_MAX ((size_t) -1)
#endif
-/* can declare these, since we always use the random shipped with gawk */
-extern char *initstate P((unsigned long seed, char *state, long n));
-extern char *setstate P((char *state));
-extern long random P((void));
-extern void srandom P((unsigned long seed));
+/* Can declare these, since we always use the random shipped with gawk */
+extern char *initstate(unsigned long seed, char *state, long n);
+extern char *setstate(char *state);
+extern long random(void);
+extern void srandom(unsigned long seed);
+extern NODE **args_array;
+extern int max_args;
extern NODE **fields_arr;
extern int output_is_tty;
+extern FILE *output_fp;
-static NODE *sub_common P((NODE *tree, long how_many, int backdigs));
+static NODE *sub_common(int nargs, long how_many, int backdigs);
#ifdef _CRAY
/* Force the standard C compiler to use the library math functions. */
extern double exp(double);
-double (*Exp)() = exp;
+double (*Exp)(double) = exp;
#define exp(x) (*Exp)(x)
extern double log(double);
-double (*Log)() = log;
+double (*Log)(double) = log;
#define log(x) (*Log)(x)
#endif
-#define DEFAULT_G_PRECISION 6
-
-#ifdef GFMT_WORKAROUND
-/* semi-temporary hack, mostly to gracefully handle VMS */
-static void sgfmt P((char *buf, const char *format, int alt,
- int fwidth, int precision, double value));
-#endif /* GFMT_WORKAROUND */
-
/*
* Since we supply the version of random(), we know what
* value to use here.
*/
#define GAWK_RANDOM_MAX 0x7fffffffL
-static void efwrite P((const void *ptr, size_t size, size_t count, FILE *fp,
- const char *from, struct redirect *rp, int flush));
-static size_t mbc_byte_count P((const char *ptr, size_t numchars));
-static size_t mbc_char_count P((const char *ptr, size_t numbytes));
+static void efwrite(const void *ptr, size_t size, size_t count, FILE *fp,
+ const char *from, struct redirect *rp, int flush);
+
+#define r_format_arg NODE * format_tree
+#define fmt_msg msg
+#include "awkprintf.h"
+#undef fmt_msg
+#undef r_format_arg
/* efwrite --- like fwrite, but with error checking */
@@ -110,8 +108,8 @@ efwrite(const void *ptr,
if (fwrite(ptr, size, count, fp) != count)
goto wrerror;
if (flush
- && ((fp == stdout && output_is_tty)
- || (rp != NULL && (rp->flag & RED_NOBUF)))) {
+ && (output_is_tty
+ || (rp != NULL && (rp->flag & RED_NOBUF)))) {
fflush(fp);
if (ferror(fp))
goto wrerror;
@@ -127,21 +125,21 @@ wrerror:
/* do_exp --- exponential function */
NODE *
-do_exp(NODE *tree)
+do_exp(int nargs)
{
NODE *tmp;
double d, res;
- tmp = tree_eval(tree->lnode);
+ tmp = POP_SCALAR();
if (do_lint && (tmp->flags & (NUMCUR|NUMBER)) == 0)
lintwarn(_("exp: received non-numeric argument"));
d = force_number(tmp);
- free_temp(tmp);
+ DEREF(tmp);
errno = 0;
res = exp(d);
if (errno == ERANGE)
warning(_("exp: argument %g is out of range"), d);
- return tmp_number((AWKNUM) res);
+ return make_number((AWKNUM) res);
}
/* stdfile --- return fp for a standard file */
@@ -168,7 +166,7 @@ stdfile(const char *name, size_t len)
/* do_fflush --- flush output, either named file or pipe or everything */
NODE *
-do_fflush(NODE *tree)
+do_fflush(int nargs)
{
struct redirect *rp;
NODE *tmp;
@@ -177,20 +175,21 @@ do_fflush(NODE *tree)
const char *file;
/* fflush() --- flush stdout */
- if (tree == NULL) {
+ if (nargs == 0) {
+ if (output_fp != stdout)
+ (void) fflush(output_fp);
status = fflush(stdout);
- return tmp_number((AWKNUM) status);
+ return make_number((AWKNUM) status);
}
- tmp = tree_eval(tree->lnode);
- tmp = force_string(tmp);
+ tmp = POP_STRING();
file = tmp->stptr;
/* fflush("") --- flush all */
if (tmp->stlen == 0) {
status = flush_io();
- free_temp(tmp);
- return tmp_number((AWKNUM) status);
+ DEREF(tmp);
+ return make_number((AWKNUM) status);
}
rp = getredirect(tmp->stptr, tmp->stlen);
@@ -203,8 +202,8 @@ do_fflush(NODE *tree)
else
warning(_("fflush: cannot flush: file `%s' opened for reading, not writing"),
file);
- free_temp(tmp);
- return tmp_number((AWKNUM) status);
+ DEREF(tmp);
+ return make_number((AWKNUM) status);
}
fp = rp->fp;
if (fp != NULL)
@@ -215,37 +214,41 @@ do_fflush(NODE *tree)
status = -1;
warning(_("fflush: `%s' is not an open file, pipe or co-process"), file);
}
- free_temp(tmp);
- return tmp_number((AWKNUM) status);
+ DEREF(tmp);
+ return make_number((AWKNUM) status);
}
#ifdef MBS_SUPPORT
-/* strncasecmpmbs --- like strncasecmp(multibyte string version) */
+/* strncasecmpmbs --- like strncasecmp (multibyte string version) */
+
int
-strncasecmpmbs(const char *s1, mbstate_t mbs1, const char *s2,
- mbstate_t mbs2, size_t n)
+strncasecmpmbs(const char *s1, const char *s2, size_t n)
{
- int i1, i2, mbclen1, mbclen2, gap;
+ size_t i1, i2, mbclen1, mbclen2, gap;
wchar_t wc1, wc2;
+ mbstate_t mbs1, mbs2;
+
+ memset(& mbs1, 0, sizeof(mbs1));
+ memset(& mbs2, 0, sizeof(mbs2));
for (i1 = i2 = 0 ; i1 < n && i2 < n ;i1 += mbclen1, i2 += mbclen2) {
- mbclen1 = mbrtowc(&wc1, s1 + i1, n - i1, &mbs1);
+ mbclen1 = mbrtowc(& wc1, s1 + i1, n - i1, & mbs1);
if (mbclen1 == (size_t) -1 || mbclen1 == (size_t) -2 || mbclen1 == 0) {
- /* We treat it as a singlebyte character. */
+ /* We treat it as a singlebyte character. */
mbclen1 = 1;
wc1 = s1[i1];
}
- mbclen2 = mbrtowc(&wc2, s2 + i2, n - i2, &mbs2);
+ mbclen2 = mbrtowc(& wc2, s2 + i2, n - i2, & mbs2);
if (mbclen2 == (size_t) -1 || mbclen2 == (size_t) -2 || mbclen2 == 0) {
- /* We treat it as a singlebyte character. */
+ /* We treat it as a singlebyte character. */
mbclen2 = 1;
wc2 = s2[i2];
}
if ((gap = towlower(wc1) - towlower(wc2)) != 0)
- /* s1 and s2 are not equivalent. */
+ /* s1 and s2 are not equivalent. */
return gap;
}
- /* s1 and s2 are equivalent. */
+ /* s1 and s2 are equivalent. */
return 0;
}
@@ -260,12 +263,12 @@ index_multibyte_buffer(char* src, char* dest, int len)
{
int idx, prev_idx;
mbstate_t mbs, prevs;
- memset(&prevs, 0, sizeof(mbstate_t));
+ memset(& prevs, 0, sizeof(mbstate_t));
for (idx = prev_idx = 0 ; idx < len ; idx++) {
size_t mbclen;
mbs = prevs;
- mbclen = mbrlen(src + prev_idx, idx - prev_idx + 1, &mbs);
+ mbclen = mbrlen(src + prev_idx, idx - prev_idx + 1, & mbs);
if (mbclen == (size_t) -1 || mbclen == 1 || mbclen == 0) {
/* singlebyte character. */
mbclen = 1;
@@ -295,16 +298,25 @@ index_multibyte_buffer(char* src ATTRIBUTE_UNUSED, char* dest ATTRIBUTE_UNUSED,
/* do_index --- find index of a string */
NODE *
-do_index(NODE *tree)
+do_index(int nargs)
{
NODE *s1, *s2;
- register const char *p1, *p2;
- register size_t l1, l2;
+ const char *p1, *p2;
+ size_t l1, l2;
long ret;
int do_single_byte = FALSE;
+#ifdef MBS_SUPPORT
+ mbstate_t mbs1, mbs2;
+
+ if (gawk_mb_cur_max > 1) {
+ memset(& mbs1, 0, sizeof(mbstate_t));
+ memset(& mbs2, 0, sizeof(mbstate_t));
+ }
+#endif
- s1 = tree_eval(tree->lnode);
- s2 = tree_eval(tree->rnode->lnode);
+ s2 = POP_SCALAR();
+ s1 = POP_SCALAR();
+
if (do_lint) {
if ((s1->flags & (STRING|STRCUR)) == 0)
lintwarn(_("index: received non-string first argument"));
@@ -360,8 +372,8 @@ do_index(NODE *tree)
} else {
#endif
/*
- * Could use tolower(*p1) == tolower(*p2) here. See discussion
- * in eval.c as to why not.
+ * Could use tolower(*p1) == tolower(*p2) here.
+ * See discussion in eval.c as to why not.
*/
if (casetable[(unsigned char)*p1] == casetable[(unsigned char)*p2]
&& (l2 == 1 || strncasecmp(p1, p2, l2) == 0)) {
@@ -404,9 +416,9 @@ do_index(NODE *tree)
}
}
out:
- free_temp(s1);
- free_temp(s2);
- return tmp_number((AWKNUM) ret);
+ DEREF(s1);
+ DEREF(s2);
+ return make_number((AWKNUM) ret);
}
/* double_to_int --- convert double to int, used several places */
@@ -424,1054 +436,238 @@ double_to_int(double d)
/* do_int --- convert double to int for awk */
NODE *
-do_int(NODE *tree)
+do_int(int nargs)
{
NODE *tmp;
double d;
- tmp = tree_eval(tree->lnode);
+ tmp = POP_SCALAR();
if (do_lint && (tmp->flags & (NUMCUR|NUMBER)) == 0)
lintwarn(_("int: received non-numeric argument"));
d = force_number(tmp);
d = double_to_int(d);
- free_temp(tmp);
- return tmp_number((AWKNUM) d);
+ DEREF(tmp);
+ return make_number((AWKNUM) d);
}
-/* do_length --- length of a string or $0 */
+
+/* do_length --- length of a string, array or $0 */
NODE *
-do_length(NODE *tree)
+do_length(int nargs)
{
NODE *tmp;
size_t len;
- NODE *n;
- n = tree->lnode;
- if (n->type == Node_param_list)
- n = stack_ptr[n->param_cnt];
+ tmp = POP();
- if (n->type == Node_var_array
- || n->type == Node_array_ref) {
- NODE *array_var = n;
+ if (tmp->type == Node_var_array) {
static short warned = FALSE;
- if (array_var->type == Node_array_ref)
- array_var = array_var->orig_array;
-
- if (do_lint && ! warned) {
+ if (do_lint && ! warned) {
warned = TRUE;
lintwarn(_("`length(array)' is a gawk extension"));
}
- if (do_posix)
- goto normal; /* will die as fatal error */
-
- if (array_var->type == Node_var_new) {
- if (do_lint)
- lintwarn(_("length: untyped parameter argument will be forced to scalar"));
+ return make_number((AWKNUM) tmp->table_size);
+ }
- return tmp_number(0.0);
- }
+ assert(tmp->type == Node_val);
- return tmp_number((AWKNUM) array_var->table_size);
- } else {
-normal:
- if (do_lint && n->type == Node_var_new)
- lintwarn(_("length: untyped argument will be forced to scalar"));
+ if (do_lint && (tmp->flags & (STRING|STRCUR)) == 0)
+ lintwarn(_("length: received non-string argument"));
+ (void) force_string(tmp);
- tmp = tree_eval(n);
- if (do_lint && (tmp->flags & (STRING|STRCUR)) == 0)
- lintwarn(_("length: received non-string argument"));
- tmp = force_string(tmp);
#ifdef MBS_SUPPORT
- if (gawk_mb_cur_max > 1) {
- tmp = force_wstring(tmp);
- len = tmp->wstlen;
- /*
- * If the bytes don't make a valid wide character
- * string, fall back to the bytes themselves.
- */
- if (len == 0 && tmp->stlen > 0)
- len = tmp->stlen;
- } else
+ if (gawk_mb_cur_max > 1) {
+ tmp = force_wstring(tmp);
+ len = tmp->wstlen;
+ /*
+ * If the bytes don't make a valid wide character
+ * string, fall back to the bytes themselves.
+ */
+ if (len == 0 && tmp->stlen > 0)
+ len = tmp->stlen;
+ } else
#endif
- len = tmp->stlen;
+ len = tmp->stlen;
- free_temp(tmp);
- return tmp_number((AWKNUM) len);
- }
+ DEREF(tmp);
+ return make_number((AWKNUM) len);
}
/* do_log --- the log function */
NODE *
-do_log(NODE *tree)
+do_log(int nargs)
{
NODE *tmp;
double d, arg;
- tmp = tree_eval(tree->lnode);
+ tmp = POP_SCALAR();
if (do_lint && (tmp->flags & (NUMCUR|NUMBER)) == 0)
lintwarn(_("log: received non-numeric argument"));
arg = (double) force_number(tmp);
if (arg < 0.0)
warning(_("log: received negative argument %g"), arg);
d = log(arg);
- free_temp(tmp);
- return tmp_number((AWKNUM) d);
+ DEREF(tmp);
+ return make_number((AWKNUM) d);
}
-/*
- * format_tree() formats nodes of a tree, starting with a left node,
- * and accordingly to a fmt_string providing a format like in
- * printf family from C library. Returns a string node which value
- * is a formatted string. Called by sprintf function.
- *
- * It is one of the uglier parts of gawk. Thanks to Michal Jaegermann
- * for taming this beast and making it compatible with ANSI C.
- */
+/* printf_common --- common code for sprintf and printf */
-NODE *
-format_tree(
- const char *fmt_string,
- size_t n0,
- register NODE *carg,
- long num_args)
+static NODE *
+printf_common(int nargs)
{
-/* copy 'l' bytes from 's' to 'obufout' checking for space in the process */
-/* difference of pointers should be of ptrdiff_t type, but let us be kind */
-#define bchunk(s, l) if (l) { \
- while ((l) > ofre) { \
- size_t olen = obufout - obuf; \
- erealloc(obuf, char *, osiz * 2, "format_tree"); \
- ofre += osiz; \
- osiz *= 2; \
- obufout = obuf + olen; \
- } \
- memcpy(obufout, s, (size_t) (l)); \
- obufout += (l); \
- ofre -= (l); \
-}
-
-/* copy one byte from 's' to 'obufout' checking for space in the process */
-#define bchunk_one(s) { \
- if (ofre < 1) { \
- size_t olen = obufout - obuf; \
- erealloc(obuf, char *, osiz * 2, "format_tree"); \
- ofre += osiz; \
- osiz *= 2; \
- obufout = obuf + olen; \
- } \
- *obufout++ = *s; \
- --ofre; \
-}
-
-/* Is there space for something L big in the buffer? */
-#define chksize(l) if ((l) >= ofre) { \
- size_t olen = obufout - obuf; \
- size_t delta = osiz+l-ofre; \
- erealloc(obuf, char *, osiz + delta, "format_tree"); \
- obufout = obuf + olen; \
- ofre += delta; \
- osiz += delta; \
-}
-
- static NODE **the_args = 0;
- static size_t args_size = 0;
- size_t cur_arg = 0;
-
- auto NODE **save_args = 0;
- auto size_t save_args_size = 0;
- static int call_level = 0;
-
- NODE *r;
int i;
- int toofew = FALSE;
- char *obuf, *obufout;
- size_t osiz, ofre;
- const char *chbuf;
- const char *s0, *s1;
- int cs1;
- NODE *arg;
- long fw, prec, argnum;
- int used_dollar;
- int lj, alt, big, bigbig, small, have_prec, need_format;
- long *cur = NULL;
-#ifdef sun386 /* Can't cast unsigned (int/long) from ptr->value */
- long tmp_uval; /* on 386i 4.0.1 C compiler -- it just hangs */
-#endif
- uintmax_t uval;
- int sgn;
- int base = 0;
- /*
- * Although this is an array, the elements serve two different
- * purposes. The first element is the general buffer meant
- * to hold the entire result string. The second one is a
- * temporary buffer for large floating point values. They
- * could just as easily be separate variables, and the
- * code might arguably be clearer.
- */
- struct {
- char *buf;
- size_t bufsize;
- char stackbuf[30];
- } cpbufs[2];
-#define cpbuf cpbufs[0].buf
- char *cend = &cpbufs[0].stackbuf[sizeof(cpbufs[0].stackbuf)];
- char *cp;
- const char *fill;
- AWKNUM tmpval;
- char signchar = FALSE;
- size_t len;
- int zero_flag = FALSE;
- int quote_flag = FALSE;
- int ii, jj;
- char *chp;
- size_t copy_count, char_count;
- static const char sp[] = " ";
- static const char zero_string[] = "0";
- static const char lchbuf[] = "0123456789abcdef";
- static const char Uchbuf[] = "0123456789ABCDEF";
-
-#define INITIAL_OUT_SIZE 512
- emalloc(obuf, char *, INITIAL_OUT_SIZE, "format_tree");
- obufout = obuf;
- osiz = INITIAL_OUT_SIZE;
- ofre = osiz - 2;
-
- {
- size_t k;
- for (k = 0; k < sizeof(cpbufs)/sizeof(cpbufs[0]); k++) {
- cpbufs[k].bufsize = sizeof(cpbufs[k].stackbuf);
- cpbufs[k].buf = cpbufs[k].stackbuf;
- }
- }
-
- /*
- * The point of this goop is to grow the buffer
- * holding the converted number, so that large
- * values don't overflow a fixed length buffer.
- */
-#define PREPEND(CH) do { \
- if (cp == cpbufs[0].buf) { \
- char *prev = cpbufs[0].buf; \
- emalloc(cpbufs[0].buf, char *, 2*cpbufs[0].bufsize, \
- "format_tree"); \
- memcpy((cp = cpbufs[0].buf+cpbufs[0].bufsize), prev, \
- cpbufs[0].bufsize); \
- cpbufs[0].bufsize *= 2; \
- if (prev != cpbufs[0].stackbuf) \
- free(prev); \
- cend = cpbufs[0].buf+cpbufs[0].bufsize; \
- } \
- *--cp = (CH); \
-} while(0)
-
- /*
- * Icky problem. If the args make a nested call to printf/sprintf,
- * we end up clobbering the static variable `the_args'. Not good.
- * We don't just malloc and free the_args each time, since most of the
- * time there aren't nested calls. But if this is a nested call,
- * save the memory pointed to by the_args and allocate a fresh
- * array. Then free it on end.
- */
- if (++call_level > 1) { /* nested */
- save_args = the_args;
- save_args_size = args_size;
-
- args_size = 0; /* force fresh allocation */
- }
-
- if (args_size == 0) {
- /* allocate array */
- emalloc(the_args, NODE **, (num_args+1) * sizeof(NODE *), "format_tree");
- args_size = num_args + 1;
- } else if (num_args + 1 > args_size) {
- /* grow it */
- erealloc(the_args, NODE **, (num_args+1) * sizeof(NODE *), "format_tree");
- args_size = num_args + 1;
- }
-
-
- /* fill it in */
- /*
- * We ignore the_args[0] since format strings use
- * 1-based numbers to indicate the arguments. It's
- * easiest to just convert to int and index, without
- * having to remember to subtract 1.
- */
- memset(the_args, '\0', num_args * sizeof(NODE *));
- for (i = 1; carg != NULL; i++, carg = carg->rnode) {
- NODE *tmp;
-
- /* Here lies the wumpus's other brother. R.I.P. */
- tmp = tree_eval(carg->lnode);
- the_args[i] = dupnode(tmp);
- free_temp(tmp);
- }
- assert(i == num_args);
- cur_arg = 1;
-
- /*
- * Check first for use of `count$'.
- * If plain argument retrieval was used earlier, choke.
- * Otherwise, return the requested argument.
- * If not `count$' now, but it was used earlier, choke.
- * If this format is more than total number of args, choke.
- * Otherwise, return the current argument.
- */
-#define parse_next_arg() { \
- if (argnum > 0) { \
- if (cur_arg > 1) \
- fatal(_("must use `count$' on all formats or none")); \
- arg = the_args[argnum]; \
- } else if (used_dollar) { \
- fatal(_("must use `count$' on all formats or none")); \
- arg = 0; /* shutup the compiler */ \
- } else if (cur_arg >= num_args) { \
- arg = 0; /* shutup the compiler */ \
- toofew = TRUE; \
- break; \
- } else { \
- arg = the_args[cur_arg]; \
- cur_arg++; \
- } \
-}
-
- need_format = FALSE;
- used_dollar = FALSE;
-
- s0 = s1 = fmt_string;
- while (n0-- > 0) {
- if (*s1 != '%') {
- s1++;
- continue;
- }
- need_format = TRUE;
- bchunk(s0, s1 - s0);
- s0 = s1;
- cur = &fw;
- fw = 0;
- prec = 0;
- argnum = 0;
- have_prec = FALSE;
- signchar = FALSE;
- zero_flag = FALSE;
- quote_flag = FALSE;
- lj = alt = big = bigbig = small = FALSE;
- fill = sp;
- cp = cend;
- chbuf = lchbuf;
- s1++;
-
-retry:
- if (n0-- == 0) /* ran out early! */
- break;
-
- switch (cs1 = *s1++) {
- case (-1): /* dummy case to allow for checking */
-check_pos:
- if (cur != &fw)
- break; /* reject as a valid format */
- goto retry;
- case '%':
- need_format = FALSE;
- /*
- * 29 Oct. 2002:
- * The C99 standard pages 274 and 279 seem to imply that
- * since there's no arg converted, the field width doesn't
- * apply. The code already was that way, but this
- * comment documents it, at least in the code.
- */
- if (do_lint) {
- const char *msg = NULL;
-
- if (fw && ! have_prec)
- msg = _("field width is ignored for `%%%%' specifier");
- else if (fw == 0 && have_prec)
- msg = _("precision is ignored for `%%%%' specifier");
- else if (fw && have_prec)
- msg = _("field width and precision are ignored for `%%%%' specifier");
-
- if (msg != NULL)
- lintwarn(msg);
- }
- bchunk_one("%");
- s0 = s1;
- break;
-
- case '0':
- /*
- * Only turn on zero_flag if we haven't seen
- * the field width or precision yet. Otherwise,
- * screws up floating point formatting.
- */
- if (cur == & fw)
- zero_flag = TRUE;
- if (lj)
- goto retry;
- /* FALL through */
- case '1':
- case '2':
- case '3':
- case '4':
- case '5':
- case '6':
- case '7':
- case '8':
- case '9':
- if (cur == NULL)
- break;
- if (prec >= 0)
- *cur = cs1 - '0';
- /*
- * with a negative precision *cur is already set
- * to -1, so it will remain negative, but we have
- * to "eat" precision digits in any case
- */
- while (n0 > 0 && *s1 >= '0' && *s1 <= '9') {
- --n0;
- *cur = *cur * 10 + *s1++ - '0';
- }
- if (prec < 0) /* negative precision is discarded */
- have_prec = FALSE;
- if (cur == &prec)
- cur = NULL;
- if (n0 == 0) /* badly formatted control string */
- continue;
- goto retry;
- case '$':
- if (do_traditional)
- fatal(_("`$' is not permitted in awk formats"));
- if (cur == &fw) {
- argnum = fw;
- fw = 0;
- used_dollar = TRUE;
- if (argnum <= 0)
- fatal(_("arg count with `$' must be > 0"));
- if (argnum >= num_args)
- fatal(_("arg count %ld greater than total number of supplied arguments"), argnum);
- } else
- fatal(_("`$' not permitted after period in format"));
- goto retry;
- case '*':
- if (cur == NULL)
- break;
- if (! do_traditional && isdigit(*s1)) {
- int val = 0;
-
- for (; n0 > 0 && *s1 && isdigit(*s1); s1++, n0--) {
- val *= 10;
- val += *s1 - '0';
- }
- if (*s1 != '$') {
- fatal(_("no `$' supplied for positional field width or precision"));
- } else {
- s1++;
- n0--;
- }
- if (val >= num_args) {
- toofew = TRUE;
- break;
- }
- arg = the_args[val];
- } else {
- parse_next_arg();
- }
- *cur = force_number(arg);
- if (*cur < 0 && cur == &fw) {
- *cur = -*cur;
- lj++;
- }
- if (cur == &prec) {
- if (*cur >= 0)
- have_prec = TRUE;
- else
- have_prec = FALSE;
- cur = NULL;
- }
- goto retry;
- case ' ': /* print ' ' or '-' */
- /* 'space' flag is ignored */
- /* if '+' already present */
- if (signchar != FALSE)
- goto check_pos;
- /* FALL THROUGH */
- case '+': /* print '+' or '-' */
- signchar = cs1;
- goto check_pos;
- case '-':
- if (prec < 0)
- break;
- if (cur == &prec) {
- prec = -1;
- goto retry;
- }
- fill = sp; /* if left justified then other */
- lj++; /* filling is ignored */
- goto check_pos;
- case '.':
- if (cur != &fw)
- break;
- cur = &prec;
- have_prec = TRUE;
- goto retry;
- case '#':
- alt = TRUE;
- goto check_pos;
- case '\'':
-#if defined(HAVE_LOCALE_H)
- /* allow quote_flag if there is a thousands separator. */
- if (loc.thousands_sep[0] != '\0')
- quote_flag = TRUE;
- goto check_pos;
-#else
- goto retry;
-#endif
- case 'l':
- if (big)
- break;
- else {
- static short warned = FALSE;
-
- if (do_lint && ! warned) {
- lintwarn(_("`l' is meaningless in awk formats; ignored"));
- warned = TRUE;
- }
- if (do_posix)
- fatal(_("`l' is not permitted in POSIX awk formats"));
- }
- big = TRUE;
- goto retry;
- case 'L':
- if (bigbig)
- break;
- else {
- static short warned = FALSE;
-
- if (do_lint && ! warned) {
- lintwarn(_("`L' is meaningless in awk formats; ignored"));
- warned = TRUE;
- }
- if (do_posix)
- fatal(_("`L' is not permitted in POSIX awk formats"));
- }
- bigbig = TRUE;
- goto retry;
- case 'h':
- if (small)
- break;
- else {
- static short warned = FALSE;
-
- if (do_lint && ! warned) {
- lintwarn(_("`h' is meaningless in awk formats; ignored"));
- warned = TRUE;
- }
- if (do_posix)
- fatal(_("`h' is not permitted in POSIX awk formats"));
- }
- small = TRUE;
- goto retry;
- case 'c':
- need_format = FALSE;
- parse_next_arg();
- /* user input that looks numeric is numeric */
- if ((arg->flags & (MAYBE_NUM|NUMBER)) == MAYBE_NUM)
- (void) force_number(arg);
- if (arg->flags & NUMBER) {
-#ifdef sun386
- tmp_uval = arg->numbr;
- uval = (unsigned long) tmp_uval;
-#else
- uval = (uintmax_t) arg->numbr;
-#endif
- if (do_lint && uval > 255) {
- lintwarn("[s]printf: value %g is too big for %%c format",
- arg->numbr);
- }
- cpbuf[0] = uval;
- prec = 1;
- cp = cpbuf;
- goto pr_tail;
- }
- /*
- * As per POSIX, only output first character of a
- * string value. Thus, we ignore any provided
- * precision, forcing it to 1. (Didn't this
- * used to work? 6/2003.)
- */
- prec = 1;
- cp = arg->stptr;
- goto pr_tail;
- case 's':
- need_format = FALSE;
- parse_next_arg();
- arg = force_string(arg);
- if (fw == 0 && ! have_prec)
- prec = arg->stlen;
- else {
- char_count = mbc_char_count(arg->stptr, arg->stlen);
- if (! have_prec || prec > char_count)
- prec = char_count;
- }
- cp = arg->stptr;
- goto pr_tail;
- case 'd':
- case 'i':
- need_format = FALSE;
- parse_next_arg();
- tmpval = force_number(arg);
- /*
- * Check for Nan or Inf.
- */
- if (isnan(tmpval) || isinf(tmpval))
- goto out_of_range;
- else
- tmpval = double_to_int(tmpval);
-
- /*
- * ``The result of converting a zero value with a
- * precision of zero is no characters.''
- */
- if (have_prec && prec == 0 && tmpval == 0)
- goto pr_tail;
-
- if (tmpval < 0) {
- tmpval = -tmpval;
- sgn = TRUE;
- } else {
- if (tmpval == -0.0)
- /* avoid printing -0 */
- tmpval = 0.0;
- sgn = FALSE;
- }
- /*
- * Use snprintf return value to tell if there
- * is enough room in the buffer or not.
- */
- while ((i = snprintf(cpbufs[1].buf,
- cpbufs[1].bufsize, "%.0f",
- tmpval)) >=
- cpbufs[1].bufsize) {
- if (cpbufs[1].buf == cpbufs[1].stackbuf)
- cpbufs[1].buf = NULL;
- if (i > 0) {
- cpbufs[1].bufsize += ((i > cpbufs[1].bufsize) ?
- i : cpbufs[1].bufsize);
- }
- else
- cpbufs[1].bufsize *= 2;
- assert(cpbufs[1].bufsize > 0);
- erealloc(cpbufs[1].buf, char *,
- cpbufs[1].bufsize, "format_tree");
- }
- if (i < 1)
- goto out_of_range;
- chp = &cpbufs[1].buf[i-1];
- ii = jj = 0;
- do {
- PREPEND(*chp);
- chp--; i--;
-#if defined(HAVE_LOCALE_H)
- if (quote_flag && loc.grouping[ii] && ++jj == loc.grouping[ii]) {
- if (i) /* only add if more digits coming */
- PREPEND(loc.thousands_sep[0]); /* XXX - assumption it's one char */
- if (loc.grouping[ii+1] == 0)
- jj = 0; /* keep using current val in loc.grouping[ii] */
- else if (loc.grouping[ii+1] == CHAR_MAX)
- quote_flag = FALSE;
- else {
- ii++;
- jj = 0;
- }
- }
-#endif
- } while (i > 0);
-
- /* add more output digits to match the precision */
- if (have_prec) {
- while (cend - cp < prec)
- PREPEND('0');
- }
-
- if (sgn)
- PREPEND('-');
- else if (signchar)
- PREPEND(signchar);
- /*
- * When to fill with zeroes is of course not simple.
- * First: No zero fill if left-justifying.
- * Next: There seem to be two cases:
- * A '0' without a precision, e.g. %06d
- * A precision with no field width, e.g. %.10d
- * Any other case, we don't want to fill with zeroes.
- */
- if (! lj
- && ((zero_flag && ! have_prec)
- || (fw == 0 && have_prec)))
- fill = zero_string;
- if (prec > fw)
- fw = prec;
- prec = cend - cp;
- if (fw > prec && ! lj && fill != sp
- && (*cp == '-' || signchar)) {
- bchunk_one(cp);
- cp++;
- prec--;
- fw--;
- }
- goto pr_tail;
- case 'X':
- chbuf = Uchbuf; /* FALL THROUGH */
- case 'x':
- base += 6; /* FALL THROUGH */
- case 'u':
- base += 2; /* FALL THROUGH */
- case 'o':
- base += 8;
- need_format = FALSE;
- parse_next_arg();
- tmpval = force_number(arg);
-
- /*
- * ``The result of converting a zero value with a
- * precision of zero is no characters.''
- *
- * If I remember the ANSI C standard, though,
- * it says that for octal conversions
- * the precision is artificially increased
- * to add an extra 0 if # is supplied.
- * Indeed, in C,
- * printf("%#.0o\n", 0);
- * prints a single 0.
- */
- if (! alt && have_prec && prec == 0 && tmpval == 0)
- goto pr_tail;
-
- if (tmpval < 0) {
- uval = (uintmax_t) (intmax_t) tmpval;
- if ((AWKNUM)(intmax_t)uval !=
- double_to_int(tmpval))
- goto out_of_range;
- } else {
- uval = (uintmax_t) tmpval;
- if ((AWKNUM)uval != double_to_int(tmpval))
- goto out_of_range;
- }
- /*
- * When to fill with zeroes is of course not simple.
- * First: No zero fill if left-justifying.
- * Next: There seem to be two cases:
- * A '0' without a precision, e.g. %06d
- * A precision with no field width, e.g. %.10d
- * Any other case, we don't want to fill with zeroes.
- */
- if (! lj
- && ((zero_flag && ! have_prec)
- || (fw == 0 && have_prec)))
- fill = zero_string;
-
- ii = jj = 0;
- do {
- PREPEND(chbuf[uval % base]);
- uval /= base;
-#if defined(HAVE_LOCALE_H)
- if (base == 10 && quote_flag && loc.grouping[ii] && ++jj == loc.grouping[ii]) {
- if (uval) /* only add if more digits coming */
- PREPEND(loc.thousands_sep[0]); /* XXX --- assumption it's one char */
- if (loc.grouping[ii+1] == 0)
- jj = 0; /* keep using current val in loc.grouping[ii] */
- else if (loc.grouping[ii+1] == CHAR_MAX)
- quote_flag = FALSE;
- else {
- ii++;
- jj = 0;
- }
- }
-#endif
- } while (uval > 0);
-
- /* add more output digits to match the precision */
- if (have_prec) {
- while (cend - cp < prec)
- PREPEND('0');
- }
-
- if (alt && tmpval != 0) {
- if (base == 16) {
- PREPEND(cs1);
- PREPEND('0');
- if (fill != sp) {
- bchunk(cp, 2);
- cp += 2;
- fw -= 2;
- }
- } else if (base == 8)
- PREPEND('0');
- }
- base = 0;
- if (prec > fw)
- fw = prec;
- prec = cend - cp;
- pr_tail:
- if (! lj) {
- while (fw > prec) {
- bchunk_one(fill);
- fw--;
- }
- }
- copy_count = prec;
- if (fw == 0 && ! have_prec)
- ;
- else if (gawk_mb_cur_max > 1 && (cs1 == 's' || cs1 == 'c')) {
- int nchars_needed = 0;
-
- assert(cp == arg->stptr || cp == cpbuf);
-
- if (cs1 == 'c')
- nchars_needed = 1;
- else if (have_prec)
- nchars_needed = prec;
- else
- nchars_needed = arg->stlen;
-
- copy_count = mbc_byte_count(arg->stptr, nchars_needed);
- }
- bchunk(cp, copy_count);
- while (fw > prec) {
- bchunk_one(fill);
- fw--;
- }
- s0 = s1;
- break;
-
- out_of_range:
- /* out of range - emergency use of %g format */
- if (do_lint)
- lintwarn(_("[s]printf: value %g is out of range for `%%%c' format"),
- (double) tmpval, cs1);
- cs1 = 'g';
- goto format_float;
-
- case 'F':
-#if ! defined(PRINTF_HAS_F_FORMAT) || PRINTF_HAS_F_FORMAT != 1
- cs1 = 'f';
- /* FALL THROUGH */
-#endif
- case 'g':
- case 'G':
- case 'e':
- case 'f':
- case 'E':
- need_format = FALSE;
- parse_next_arg();
- tmpval = force_number(arg);
- format_float:
- if (! have_prec)
- prec = DEFAULT_G_PRECISION;
- chksize(fw + prec + 9); /* 9 == slop */
-#ifdef VAXCRTL
- /* pre-ANSI library doesn't handle '0' flag
- correctly in many cases; reject it */
- if (zero_flag
- && (lj || (signchar && signchar != '+')))
- zero_flag = FALSE;
-#endif
- cp = cpbuf;
- *cp++ = '%';
- if (lj)
- *cp++ = '-';
- if (signchar)
- *cp++ = signchar;
- if (alt)
- *cp++ = '#';
- if (zero_flag)
- *cp++ = '0';
- if (quote_flag)
- *cp++ = '\'';
- strcpy(cp, "*.*");
- cp += 3;
- *cp++ = cs1;
- *cp = '\0';
-#ifndef GFMT_WORKAROUND
-#if defined(LC_NUMERIC)
- if (quote_flag && ! use_lc_numeric)
- setlocale(LC_NUMERIC, "");
-#endif
- {
- int n;
- while ((n = snprintf(obufout, ofre, cpbuf,
- (int) fw, (int) prec,
- (double) tmpval)) >= ofre)
- chksize(n)
- }
-#if defined(LC_NUMERIC)
- if (quote_flag && ! use_lc_numeric)
- setlocale(LC_NUMERIC, "C");
-#endif
-#else /* GFMT_WORKAROUND */
- if (cs1 == 'g' || cs1 == 'G')
- sgfmt(obufout, cpbuf, (int) alt,
- (int) fw, (int) prec, (double) tmpval);
- else {
- int n;
- while ((n = snprintf(obufout, ofre, cpbuf,
- (int) fw, (int) prec,
- (double) tmpval)) >= ofre)
- chksize(n)
- }
-#endif /* GFMT_WORKAROUND */
- len = strlen(obufout);
- ofre -= len;
- obufout += len;
- s0 = s1;
- break;
- default:
- if (do_lint && isalpha(cs1))
- lintwarn(_("ignoring unknown format specifier character `%c': no argument converted"), cs1);
- break;
- }
- if (toofew) {
- free(obuf); /* silence valgrind */
- fatal("%s\n\t`%s'\n\t%*s%s",
- _("not enough arguments to satisfy format string"),
- fmt_string, (int) (s1 - fmt_string - 1), "",
- _("^ ran out for this one"));
- }
- }
- if (do_lint) {
- if (need_format)
- lintwarn(
- _("[s]printf: format specifier does not have control letter"));
- if (cur_arg < num_args)
- lintwarn(
- _("too many arguments supplied for format string"));
- }
- bchunk(s0, s1 - s0);
- r = make_str_node(obuf, obufout - obuf, ALREADY_MALLOCED);
- r->flags |= TEMP;
-
- for (i = 1; i < num_args; i++) {
- unref(the_args[i]);
- }
-
- if (call_level-- > 1) {
- free(the_args);
- the_args = save_args;
- args_size = save_args_size;
- }
-
- {
- size_t k;
- size_t count = sizeof(cpbufs)/sizeof(cpbufs[0]);
- for (k = 0; k < count; k++) {
- if (cpbufs[k].buf != cpbufs[k].stackbuf)
- free(cpbufs[k].buf);
+ NODE *r, *tmp;
+
+ assert(nargs <= max_args);
+ for (i = 1; i <= nargs; i++) {
+ tmp = args_array[nargs - i] = POP();
+ if (tmp->type == Node_var_array) {
+ while (--i > 0)
+ DEREF(args_array[nargs - i]);
+ fatal(_("attempt to use array `%s' in scalar context"), array_vname(tmp));
}
}
+ force_string(args_array[0]);
+ r = format_tree(args_array[0]->stptr, args_array[0]->stlen, args_array, nargs);
+ for (i = 0; i < nargs; i++)
+ DEREF(args_array[i]);
return r;
}
/* do_sprintf --- perform sprintf */
NODE *
-do_sprintf(NODE *tree)
+do_sprintf(int nargs)
{
NODE *r;
- NODE *sfmt = force_string(tree_eval(tree->lnode));
-
- r = format_tree(sfmt->stptr, sfmt->stlen, tree->rnode, tree->printf_count);
- free_temp(sfmt);
+ r = printf_common(nargs);
+ if (r == NULL)
+ gawk_exit(EXIT_FATAL);
return r;
}
-/*
- * redirect_to_fp --- return fp for redirection, NULL on failure
- * or stdout if no redirection, used by all print routines
- */
-
-static inline FILE *
-redirect_to_fp(NODE *tree, struct redirect **rpp)
-{
- int errflg; /* not used, sigh */
- struct redirect *rp;
-
- if (tree == NULL)
- return stdout;
-
- rp = redirect(tree, &errflg);
- if (rp != NULL) {
- *rpp = rp;
- return rp->fp;
- }
-
- return NULL;
-}
/* do_printf --- perform printf, including redirection */
void
-do_printf(NODE *tree)
+do_printf(int nargs, int redirtype)
{
+ FILE *fp = NULL;
+ NODE *tmp;
struct redirect *rp = NULL;
- register FILE *fp;
+ int errflg; /* not used, sigh */
+ NODE *redir_exp = NULL;
- if (tree->lnode == NULL) {
+ if (nargs == 0) {
if (do_traditional) {
if (do_lint)
lintwarn(_("printf: no arguments"));
+ if (redirtype != 0) {
+ redir_exp = TOP();
+ if (redir_exp->type != Node_val)
+ fatal(_("attempt to use array `%s' in scalar context"), array_vname(redir_exp));
+ rp = redirect(redir_exp, redirtype, & errflg);
+ DEREF(redir_exp);
+ decr_sp();
+ }
return; /* bwk accepts it silently */
}
fatal(_("printf: no arguments"));
}
- fp = redirect_to_fp(tree->rnode, & rp);
- if (fp == NULL)
- return;
- tree->lnode->printf_count = tree->printf_count;
- tree = do_sprintf(tree->lnode);
- efwrite(tree->stptr, sizeof(char), tree->stlen, fp, "printf", rp, TRUE);
- if (rp != NULL && (rp->flag & RED_TWOWAY) != 0)
- fflush(rp->fp);
- free_temp(tree);
+ if (redirtype != 0) {
+ redir_exp = PEEK(nargs);
+ if (redir_exp->type != Node_val)
+ fatal(_("attempt to use array `%s' in scalar context"), array_vname(redir_exp));
+ rp = redirect(redir_exp, redirtype, & errflg);
+ if (rp != NULL)
+ fp = rp->fp;
+ } else
+ fp = output_fp;
+
+ tmp = printf_common(nargs);
+ if (redir_exp != NULL) {
+ DEREF(redir_exp);
+ decr_sp();
+ }
+ if (tmp != NULL) {
+ if (fp == NULL) {
+ DEREF(tmp);
+ return;
+ }
+ efwrite(tmp->stptr, sizeof(char), tmp->stlen, fp, "printf", rp, TRUE);
+ if (rp != NULL && (rp->flag & RED_TWOWAY) != 0)
+ fflush(rp->fp);
+ DEREF(tmp);
+ } else
+ gawk_exit(EXIT_FATAL);
}
/* do_sqrt --- do the sqrt function */
NODE *
-do_sqrt(NODE *tree)
+do_sqrt(int nargs)
{
NODE *tmp;
double arg;
- tmp = tree_eval(tree->lnode);
+ tmp = POP_SCALAR();
if (do_lint && (tmp->flags & (NUMCUR|NUMBER)) == 0)
lintwarn(_("sqrt: received non-numeric argument"));
arg = (double) force_number(tmp);
- free_temp(tmp);
+ DEREF(tmp);
if (arg < 0.0)
warning(_("sqrt: called with negative argument %g"), arg);
- return tmp_number((AWKNUM) sqrt(arg));
+ return make_number((AWKNUM) sqrt(arg));
}
/* do_substr --- do the substr function */
NODE *
-do_substr(NODE *tree)
+do_substr(int nargs)
{
- NODE *t1, *t2, *t3;
+ NODE *t1;
NODE *r;
- register size_t indx;
- size_t length;
- double d_index, d_length;
+ size_t indx;
+ size_t length = 0;
+ double d_index = 0, d_length = 0;
size_t src_len;
- t1 = force_string(tree_eval(tree->lnode));
- t2 = tree_eval(tree->rnode->lnode);
- d_index = force_number(t2);
- free_temp(t2);
+ if (nargs == 3)
+ POP_NUMBER(d_length);
+ POP_NUMBER(d_index);
+ t1 = POP_STRING();
+
+ if (nargs == 3) {
+ if (! (d_length >= 1)) {
+ if (do_lint == LINT_ALL)
+ lintwarn(_("substr: length %g is not >= 1"), d_length);
+ else if (do_lint == LINT_INVALID && ! (d_length >= 0))
+ lintwarn(_("substr: length %g is not >= 0"), d_length);
+ DEREF(t1);
+ return Nnull_string;
+ }
+ if (do_lint) {
+ if (double_to_int(d_length) != d_length)
+ lintwarn(
+ _("substr: non-integer length %g will be truncated"),
+ d_length);
+
+ if (d_length > SIZE_MAX)
+ lintwarn(
+ _("substr: length %g too big for string indexing, truncating to %g"),
+ d_length, (double) SIZE_MAX);
+ }
+ if (d_length < SIZE_MAX)
+ length = d_length;
+ else
+ length = SIZE_MAX;
+ }
/* the weird `! (foo)' tests help catch NaN values. */
if (! (d_index >= 1)) {
@@ -1490,7 +686,7 @@ do_substr(NODE *tree)
else
indx = SIZE_MAX;
- if (tree->rnode->rnode == NULL) { /* third arg. missing */
+ if (nargs == 2) { /* third arg. missing */
/* use remainder of string */
length = t1->stlen - indx; /* default to bytes */
#ifdef MBS_SUPPORT
@@ -1501,40 +697,13 @@ do_substr(NODE *tree)
}
#endif
d_length = length; /* set here in case used in diagnostics, below */
- } else {
- t3 = tree_eval(tree->rnode->rnode->lnode);
- d_length = force_number(t3);
- free_temp(t3);
- if (! (d_length >= 1)) {
- if (do_lint == LINT_ALL)
- lintwarn(_("substr: length %g is not >= 1"), d_length);
- else if (do_lint == LINT_INVALID && ! (d_length >= 0))
- lintwarn(_("substr: length %g is not >= 0"), d_length);
- free_temp(t1);
- return Nnull_string;
- }
- if (do_lint) {
- if (double_to_int(d_length) != d_length)
- lintwarn(
- _("substr: non-integer length %g will be truncated"),
- d_length);
-
- if (d_length > SIZE_MAX)
- lintwarn(
- _("substr: length %g too big for string indexing, truncating to %g"),
- d_length, (double) SIZE_MAX);
- }
- if (d_length < SIZE_MAX)
- length = d_length;
- else
- length = SIZE_MAX;
}
if (t1->stlen == 0) {
/* substr("", 1, 0) produces a warning only if LINT_ALL */
if (do_lint && (do_lint == LINT_ALL || ((indx | length) != 0)))
lintwarn(_("substr: source string is zero length"));
- free_temp(t1);
+ DEREF(t1);
return Nnull_string;
}
@@ -1551,7 +720,7 @@ do_substr(NODE *tree)
if (do_lint)
lintwarn(_("substr: start index %g is past end of string"),
d_index);
- free_temp(t1);
+ DEREF(t1);
return Nnull_string;
}
if (length > src_len - indx) {
@@ -1592,24 +761,23 @@ do_substr(NODE *tree)
}
*cp = '\0';
r = make_str_node(substr, cp - substr, ALREADY_MALLOCED);
- r->flags |= TEMP;
} else {
/* single byte case, easy */
single_byte_case:
- r = tmp_string(t1->stptr + indx, length);
+ r = make_string(t1->stptr + indx, length);
}
#else
- r = tmp_string(t1->stptr + indx, length);
+ r = make_string(t1->stptr + indx, length);
#endif
- free_temp(t1);
+ DEREF(t1);
return r;
}
/* do_strftime --- format a time stamp */
NODE *
-do_strftime(NODE *tree)
+do_strftime(int nargs)
{
NODE *t1, *t2, *t3, *ret;
struct tm *tm;
@@ -1617,8 +785,7 @@ do_strftime(NODE *tree)
char *bufp;
size_t buflen, bufsize;
char buf[BUFSIZ];
- /* FIXME: One day make %d be %e, after C 99 is common. */
- static const char def_format[] = "%a %b %d %H:%M:%S %Z %Y";
+ static const char def_format[] = "%a %b %e %H:%M:%S %Z %Y";
const char *format;
int formatlen;
int do_gmt;
@@ -1626,50 +793,39 @@ do_strftime(NODE *tree)
/* set defaults first */
format = def_format; /* traditional date format */
formatlen = strlen(format);
- (void) time(&fclock); /* current time of day */
+ (void) time(& fclock); /* current time of day */
do_gmt = FALSE;
t1 = t2 = t3 = NULL;
- if (tree != NULL) { /* have args */
- if (tree->lnode != NULL) {
- NODE *tmp = tree_eval(tree->lnode);
- if (do_lint && (tmp->flags & (STRING|STRCUR)) == 0)
- lintwarn(_("strftime: received non-string first argument"));
- t1 = force_string(tmp);
- format = t1->stptr;
- formatlen = t1->stlen;
- if (formatlen == 0) {
- if (do_lint)
- lintwarn(_("strftime: received empty format string"));
- free_temp(t1);
- return tmp_string("", 0);
- }
- }
-
- if (tree->rnode != NULL) {
- t2 = tree_eval(tree->rnode->lnode);
+ if (nargs > 0) { /* have args */
+ NODE *tmp;
+
+ if (nargs == 2) {
+ t2 = POP_SCALAR();
if (do_lint && (t2->flags & (NUMCUR|NUMBER)) == 0)
lintwarn(_("strftime: received non-numeric second argument"));
fclock = (time_t) force_number(t2);
- free_temp(t2);
-
- if (tree->rnode->rnode != NULL) {
- tree = tree->rnode->rnode;
- t3 = tree_eval(tree->lnode);
- if ((t3->flags & (NUMCUR|NUMBER)) != 0)
- do_gmt = (t3->numbr != 0);
- else
- do_gmt = (t3->stlen > 0);
+ DEREF(t2);
+ }
- free_temp(t3);
- }
+ tmp = POP_SCALAR();
+ if (do_lint && (tmp->flags & (STRING|STRCUR)) == 0)
+ lintwarn(_("strftime: received non-string first argument"));
+ t1 = force_string(tmp);
+ format = t1->stptr;
+ formatlen = t1->stlen;
+ if (formatlen == 0) {
+ if (do_lint)
+ lintwarn(_("strftime: received empty format string"));
+ DEREF(t1);
+ return make_string("", 0);
}
}
if (do_gmt)
- tm = gmtime(&fclock);
+ tm = gmtime(& fclock);
else
- tm = localtime(&fclock);
+ tm = localtime(& fclock);
bufp = buf;
bufsize = sizeof(buf);
@@ -1692,29 +848,29 @@ do_strftime(NODE *tree)
else
erealloc(bufp, char *, bufsize, "do_strftime");
}
- ret = tmp_string(bufp, buflen);
+ ret = make_string(bufp, buflen);
if (bufp != buf)
- free(bufp);
+ efree(bufp);
if (t1)
- free_temp(t1);
+ DEREF(t1);
return ret;
}
/* do_systime --- get the time of day */
NODE *
-do_systime(NODE *tree ATTRIBUTE_UNUSED)
+do_systime(int nargs ATTRIBUTE_UNUSED)
{
time_t lclock;
- (void) time(&lclock);
- return tmp_number((AWKNUM) lclock);
+ (void) time(& lclock);
+ return make_number((AWKNUM) lclock);
}
/* do_mktime --- turn a time string into a timestamp */
NODE *
-do_mktime(NODE *tree)
+do_mktime(int nargs)
{
NODE *t1;
struct tm then;
@@ -1724,7 +880,7 @@ do_mktime(NODE *tree)
time_t then_stamp;
char save;
- t1 = tree_eval(tree->lnode);
+ t1 = POP_SCALAR();
if (do_lint && (t1->flags & (STRING|STRCUR)) == 0)
lintwarn(_("mktime: received non-string argument"));
t1 = force_string(t1);
@@ -1737,22 +893,22 @@ do_mktime(NODE *tree)
& hour, & minute, & second,
& dst);
- if (do_lint /* Ready? Set! Go: */
- && ( (second < 0 || second > 60)
- || (minute < 0 || minute > 60)
- || (hour < 0 || hour > 23)
- || (day < 1 || day > 31)
- || (month < 1 || month > 12) ))
- lintwarn(_("mktime: at least one of the values is out of the default range"));
+ if (do_lint /* Ready? Set! Go: */
+ && ( (second < 0 || second > 60)
+ || (minute < 0 || minute > 60)
+ || (hour < 0 || hour > 23)
+ || (day < 1 || day > 31)
+ || (month < 1 || month > 12) ))
+ lintwarn(_("mktime: at least one of the values is out of the default range"));
t1->stptr[t1->stlen] = save;
- free_temp(t1);
+ DEREF(t1);
if (count < 6
|| month == INT_MIN
|| year < INT_MIN + 1900
|| year - 1900 > INT_MAX)
- return tmp_number((AWKNUM) -1);
+ return make_number((AWKNUM) -1);
memset(& then, '\0', sizeof(then));
then.tm_sec = second;
@@ -1764,13 +920,13 @@ do_mktime(NODE *tree)
then.tm_isdst = dst;
then_stamp = mktime(& then);
- return tmp_number((AWKNUM) then_stamp);
+ return make_number((AWKNUM) then_stamp);
}
/* do_system --- run an external command */
NODE *
-do_system(NODE *tree)
+do_system(int nargs)
{
NODE *tmp;
int ret = 0;
@@ -1781,28 +937,13 @@ do_system(NODE *tree)
fatal(_("'system' function not allowed in sandbox mode"));
(void) flush_io(); /* so output is synchronous with gawk's */
- tmp = tree_eval(tree->lnode);
+ tmp = POP_SCALAR();
if (do_lint && (tmp->flags & (STRING|STRCUR)) == 0)
lintwarn(_("system: received non-string argument"));
cmd = force_string(tmp)->stptr;
if (cmd && *cmd) {
/* insure arg to system is zero-terminated */
-
- /*
- * From: David Trueman <david@cs.dal.ca>
- * To: arnold@cc.gatech.edu (Arnold Robbins)
- * Date: Wed, 3 Nov 1993 12:49:41 -0400
- *
- * It may not be necessary to save the character, but
- * I'm not sure. It would normally be the field
- * separator. If the parse has not yet gone beyond
- * that, it could mess up (although I doubt it). If
- * FIELDWIDTHS is being used, it might be the first
- * character of the next field. Unless someone wants
- * to check it out exhaustively, I suggest saving it
- * for now...
- */
save = cmd[tmp->stlen];
cmd[tmp->stlen] = '\0';
@@ -1815,8 +956,8 @@ do_system(NODE *tree)
cmd[tmp->stlen] = save;
}
- free_temp(tmp);
- return tmp_number((AWKNUM) ret);
+ DEREF(tmp);
+ return make_number((AWKNUM) ret);
}
extern NODE **fmt_list; /* declared in eval.c */
@@ -1824,54 +965,60 @@ extern NODE **fmt_list; /* declared in eval.c */
/* do_print --- print items, separated by OFS, terminated with ORS */
void
-do_print(register NODE *tree)
+do_print(int nargs, int redirtype)
{
- register NODE **t;
struct redirect *rp = NULL;
- register FILE *fp;
- int numnodes, i;
- NODE *save;
- NODE *tval;
-
- fp = redirect_to_fp(tree->rnode, & rp);
- if (fp == NULL)
- return;
-
- /*
- * General idea is to evaluate all the expressions first and
- * then print them, otherwise you get suprising behavior.
- * See test/prtoeval.awk for an example program.
- */
- save = tree = tree->lnode;
- for (numnodes = 0; tree != NULL; tree = tree->rnode)
- numnodes++;
- emalloc(t, NODE **, numnodes * sizeof(NODE *), "do_print");
-
- tree = save;
- for (i = 0; tree != NULL; i++, tree = tree->rnode) {
- NODE *n;
+ int errflg; /* not used, sigh */
+ FILE *fp = NULL;
+ int i;
+ NODE *redir_exp = NULL;
+ NODE *tmp;
- /* Here lies the wumpus. R.I.P. */
- n = tree_eval(tree->lnode);
- t[i] = dupnode(n);
- free_temp(n);
+ assert(nargs <= max_args);
- if ((t[i]->flags & (NUMBER|STRING)) == NUMBER) {
+ if (redirtype != 0) {
+ redir_exp = PEEK(nargs);
+ if (redir_exp->type != Node_val)
+ fatal(_("attempt to use array `%s' in scalar context"), array_vname(redir_exp));
+ rp = redirect(redir_exp, redirtype, & errflg);
+ if (rp != NULL)
+ fp = rp->fp;
+ } else
+ fp = output_fp;
+
+ for (i = 1; i <= nargs; i++) {
+ tmp = args_array[i] = POP();
+ if (tmp->type == Node_var_array) {
+ while (--i > 0)
+ DEREF(args_array[i]);
+ fatal(_("attempt to use array `%s' in scalar context"), array_vname(tmp));
+ }
+ if (do_lint && tmp->type == Node_var_new)
+ lintwarn(_("reference to uninitialized variable `%s'"),
+ tmp->vname);
+ if ((tmp->flags & (NUMBER|STRING)) == NUMBER) {
if (OFMTidx == CONVFMTidx)
- (void) force_string(t[i]);
- else {
- tval = tmp_number(t[i]->numbr);
- unref(t[i]);
- t[i] = format_val(OFMT, OFMTidx, tval);
- }
+ (void) force_string(tmp);
+ else
+ args_array[i] = format_val(OFMT, OFMTidx, tmp);
}
}
- for (i = 0; i < numnodes; i++) {
- efwrite(t[i]->stptr, sizeof(char), t[i]->stlen, fp, "print", rp, FALSE);
- unref(t[i]);
+ if (redir_exp != NULL) {
+ DEREF(redir_exp);
+ decr_sp();
+ }
- if (i != numnodes - 1 && OFSlen > 0)
+ if (fp == NULL) {
+ for (i = nargs; i > 0; i--)
+ DEREF(args_array[i]);
+ return;
+ }
+
+ for (i = nargs; i > 0; i--) {
+ efwrite(args_array[i]->stptr, sizeof(char), args_array[i]->stlen, fp, "print", rp, FALSE);
+ DEREF(args_array[i]);
+ if (i != 1 && OFSlen > 0)
efwrite(OFS, sizeof(char), (size_t) OFSlen,
fp, "print", rp, FALSE);
@@ -1881,20 +1028,30 @@ do_print(register NODE *tree)
if (rp != NULL && (rp->flag & RED_TWOWAY) != 0)
fflush(rp->fp);
-
- free(t);
}
/* do_print_rec --- special case printing of $0, for speed */
void
-do_print_rec(register NODE *tree)
+do_print_rec(int nargs, int redirtype)
{
+ FILE *fp = NULL;
+ NODE *f0;
struct redirect *rp = NULL;
- register FILE *fp;
- register NODE *f0;
+ int errflg; /* not used, sigh */
+ NODE *redir_exp = NULL;
+
+ assert(nargs == 0);
+ if (redirtype != 0) {
+ redir_exp = TOP();
+ rp = redirect(redir_exp, redirtype, & errflg);
+ if (rp != NULL)
+ fp = rp->fp;
+ DEREF(redir_exp);
+ decr_sp();
+ } else
+ fp = output_fp;
- fp = redirect_to_fp(tree->rnode, & rp);
if (fp == NULL)
return;
@@ -1915,161 +1072,128 @@ do_print_rec(register NODE *tree)
fflush(rp->fp);
}
-#ifdef MBS_SUPPORT
-/* wide_tolower_toupper --- lower- or uppercase a multibyte string */
-
-typedef int (*isw_func)(wint_t);
-typedef wint_t (*tow_func)(wint_t);
-
-static NODE *
-wide_tolower_toupper(NODE *t1, isw_func iswu, tow_func towl)
-{
- register unsigned char *cp, *cpe;
- register unsigned char *cp2;
- size_t mbclen;
- mbstate_t mbs, prev_mbs;
- wchar_t wc;
- NODE *t2;
- /*
- * Since the lowercase char and its uppercase equivalent may occupy
- * different number of bytes (Turkish `i'), we cannot say the length
- * of the output string.
- * This approach is adapted from format_tree().
- */
- unsigned char *obuf;
- size_t osiz, ofre;
-
- /*
- * Better 2 spare bytes than 1, consistently with make_str_node().
- * And we need gawk_mb_cur_max free bytes before we convert the last
- * char, so we add (gawk_mb_cur_max - 1).
- */
- osiz = t1->stlen + 2 + (gawk_mb_cur_max - 1);
- ofre = osiz - 2;
- emalloc(obuf, unsigned char *, osiz, "wide_tolower_toupper");
-
- memset(&mbs, 0, sizeof(mbstate_t));
- cp = (unsigned char *)t1->stptr;
- cpe = (unsigned char *)(t1->stptr + t1->stlen);
- cp2 = obuf;
- while (cp < cpe) {
- if (ofre < gawk_mb_cur_max) {
- size_t olen = cp2 - obuf;
- ofre += osiz;
- osiz *= 2;
- erealloc(obuf, unsigned char *, osiz, "wide_tolower_toupper");
- cp2 = obuf + olen;
- }
- prev_mbs = mbs;
- mbclen = (size_t) mbrtowc(&wc, (char *) cp, cpe - cp,
- &mbs);
- if (mbclen == 0 || mbclen == (size_t) -1 || mbclen == (size_t) -2) {
- /* Null wide char, or a problem appeared. */
- *cp2++ = *cp++;
- ofre--;
- continue;
- }
-
- /* If the character doesn't need change, copy it. */
- if (!(*iswu)(wc)) {
- ofre -= mbclen;
- while (mbclen--)
- *cp2++ = *cp++;
- continue;
- }
-
- /* Increment the input pointer. */
- cp += mbclen;
-
- /* Write the modified wide character. */
- mbclen = wcrtomb((char *) cp2, (*towl)(wc), &prev_mbs);
-
- if (mbclen > 0 && mbclen < (size_t) -2) {
- /* Increment the output pointer. */
- cp2 += mbclen;
- ofre -= mbclen;
- } else {
- /* A problem appeared. */
- cp2++;
- ofre--;
- }
- }
- t2 = make_str_node((char *) obuf, cp2 - obuf, ALREADY_MALLOCED);
- t2->flags |= TEMP;
- return t2;
-}
-#endif
+/*
+ * 11/2010: FIXME: Consider converting the whole string to wide
+ * characters, running through and converting to wide lower case
+ * and then coverting back. Might be more straightforward code.
+ */
/* do_tolower --- lower case a string */
NODE *
-do_tolower(NODE *tree)
+do_tolower(int nargs)
{
NODE *t1, *t2;
+ unsigned char *cp, *cp2;
+#ifdef MBS_SUPPORT
+ size_t mbclen = 0;
+ mbstate_t mbs, prev_mbs;
+
+ if (gawk_mb_cur_max > 1)
+ memset(& mbs, 0, sizeof(mbstate_t));
+#endif
- t1 = tree_eval(tree->lnode);
+ t1 = POP_SCALAR();
if (do_lint && (t1->flags & (STRING|STRCUR)) == 0)
lintwarn(_("tolower: received non-string argument"));
t1 = force_string(t1);
-
+ t2 = make_string(t1->stptr, t1->stlen);
+ for (cp = (unsigned char *)t2->stptr,
+ cp2 = (unsigned char *)(t2->stptr + t2->stlen); cp < cp2; cp++)
#ifdef MBS_SUPPORT
- if (gawk_mb_cur_max > 1)
- t2 = wide_tolower_toupper(t1, iswupper, towlower);
- else
+ if (gawk_mb_cur_max > 1) {
+ wchar_t wc;
+
+ prev_mbs = mbs;
+ mbclen = (size_t) mbrtowc(& wc, (char *) cp, cp2 - cp,
+ & mbs);
+ if ((mbclen != 1) && (mbclen != (size_t) -1) &&
+ (mbclen != (size_t) -2) && (mbclen != 0)) {
+ /* a multibyte character. */
+ if (iswupper(wc)) {
+ wint_t junk;
+
+ wc = towlower(wc);
+ junk = wcrtomb((char *) cp, wc, & prev_mbs);
+ }
+ /* Adjust the pointer. */
+ cp += mbclen - 1;
+ } else {
+ /* Otherwise we treat it as a singlebyte character. */
+ if (isupper(*cp))
+ *cp = tolower(*cp);
+ }
+ } else
#endif
- {
- register unsigned char *cp, *cpe;
-
- t2 = tmp_string(t1->stptr, t1->stlen);
- for (cp = (unsigned char *)t2->stptr,
- cpe = (unsigned char *)(t2->stptr + t2->stlen); cp < cpe; cp++)
- if (isupper(*cp))
- *cp = tolower(*cp);
- }
- free_temp(t1);
+ if (isupper(*cp))
+ *cp = tolower(*cp);
+ DEREF(t1);
return t2;
}
/* do_toupper --- upper case a string */
NODE *
-do_toupper(NODE *tree)
+do_toupper(int nargs)
{
NODE *t1, *t2;
+ unsigned char *cp, *cp2;
+#ifdef MBS_SUPPORT
+ size_t mbclen = 0;
+ mbstate_t mbs, prev_mbs;
- t1 = tree_eval(tree->lnode);
+ if (gawk_mb_cur_max > 1)
+ memset(& mbs, 0, sizeof(mbstate_t));
+#endif
+
+ t1 = POP_SCALAR();
if (do_lint && (t1->flags & (STRING|STRCUR)) == 0)
lintwarn(_("toupper: received non-string argument"));
t1 = force_string(t1);
-
+ t2 = make_string(t1->stptr, t1->stlen);
+ for (cp = (unsigned char *)t2->stptr,
+ cp2 = (unsigned char *)(t2->stptr + t2->stlen); cp < cp2; cp++)
#ifdef MBS_SUPPORT
- if (gawk_mb_cur_max > 1)
- t2 = wide_tolower_toupper(t1, iswlower, towupper);
- else
+ if (gawk_mb_cur_max > 1) {
+ wchar_t wc;
+
+ prev_mbs = mbs;
+ mbclen = (size_t) mbrtowc(& wc, (char *) cp, cp2 - cp,
+ & mbs);
+ if ((mbclen != 1) && (mbclen != (size_t) -1) &&
+ (mbclen != (size_t) -2) && (mbclen != 0)) {
+ /* a multibyte character. */
+ if (iswlower(wc)) {
+ wint_t junk;
+
+ wc = towupper(wc);
+ junk = wcrtomb((char *) cp, wc, & prev_mbs);
+ }
+ /* Adjust the pointer. */
+ cp += mbclen - 1;
+ } else {
+ /* Otherwise we treat it as a singlebyte character. */
+ if (islower(*cp))
+ *cp = toupper(*cp);
+ }
+ } else
#endif
- {
- register unsigned char *cp, *cpe;
-
- t2 = tmp_string(t1->stptr, t1->stlen);
- for (cp = (unsigned char *)t2->stptr,
- cpe = (unsigned char *)(t2->stptr + t2->stlen); cp < cpe; cp++)
- if (islower(*cp))
- *cp = toupper(*cp);
- }
- free_temp(t1);
+ if (islower(*cp))
+ *cp = toupper(*cp);
+ DEREF(t1);
return t2;
}
/* do_atan2 --- do the atan2 function */
NODE *
-do_atan2(NODE *tree)
+do_atan2(int nargs)
{
NODE *t1, *t2;
double d1, d2;
- t1 = tree_eval(tree->lnode);
- t2 = tree_eval(tree->rnode->lnode);
+ t2 = POP_SCALAR();
+ t1 = POP_SCALAR();
if (do_lint) {
if ((t1->flags & (NUMCUR|NUMBER)) == 0)
lintwarn(_("atan2: received non-numeric first argument"));
@@ -2078,41 +1202,41 @@ do_atan2(NODE *tree)
}
d1 = force_number(t1);
d2 = force_number(t2);
- free_temp(t1);
- free_temp(t2);
- return tmp_number((AWKNUM) atan2(d1, d2));
+ DEREF(t1);
+ DEREF(t2);
+ return make_number((AWKNUM) atan2(d1, d2));
}
/* do_sin --- do the sin function */
NODE *
-do_sin(NODE *tree)
+do_sin(int nargs)
{
NODE *tmp;
double d;
- tmp = tree_eval(tree->lnode);
+ tmp = POP_SCALAR();
if (do_lint && (tmp->flags & (NUMCUR|NUMBER)) == 0)
lintwarn(_("sin: received non-numeric argument"));
d = sin((double) force_number(tmp));
- free_temp(tmp);
- return tmp_number((AWKNUM) d);
+ DEREF(tmp);
+ return make_number((AWKNUM) d);
}
/* do_cos --- do the cos function */
NODE *
-do_cos(NODE *tree)
+do_cos(int nargs)
{
NODE *tmp;
double d;
- tmp = tree_eval(tree->lnode);
+ tmp = POP_SCALAR();
if (do_lint && (tmp->flags & (NUMCUR|NUMBER)) == 0)
lintwarn(_("cos: received non-numeric argument"));
d = cos((double) force_number(tmp));
- free_temp(tmp);
- return tmp_number((AWKNUM) d);
+ DEREF(tmp);
+ return make_number((AWKNUM) d);
}
/* do_rand --- do the rand function */
@@ -2125,7 +1249,7 @@ static char *const state = (char *const) istate;
/* ARGSUSED */
NODE *
-do_rand(NODE *tree ATTRIBUTE_UNUSED)
+do_rand(int nargs ATTRIBUTE_UNUSED)
{
if (firstrand) {
(void) initstate((unsigned) 1, state, SIZEOF_STATE);
@@ -2138,13 +1262,13 @@ do_rand(NODE *tree ATTRIBUTE_UNUSED)
*
* 0 <= n < 1
*/
- return tmp_number((AWKNUM) (random() % GAWK_RANDOM_MAX) / GAWK_RANDOM_MAX);
+ return make_number((AWKNUM) (random() % GAWK_RANDOM_MAX) / GAWK_RANDOM_MAX);
}
/* do_srand --- seed the random number generator */
NODE *
-do_srand(NODE *tree)
+do_srand(int nargs)
{
NODE *tmp;
static long save_seed = 1;
@@ -2157,16 +1281,16 @@ do_srand(NODE *tree)
(void) setstate(state);
}
- if (tree == NULL)
+ if (nargs == 0)
srandom((unsigned int) (save_seed = (long) time((time_t *) 0)));
else {
- tmp = tree_eval(tree->lnode);
+ tmp = POP_SCALAR();
if (do_lint && (tmp->flags & (NUMCUR|NUMBER)) == 0)
lintwarn(_("srand: received non-numeric argument"));
srandom((unsigned int) (save_seed = (long) force_number(tmp)));
- free_temp(tmp);
+ DEREF(tmp);
}
- return tmp_number((AWKNUM) ret);
+ return make_number((AWKNUM) ret);
}
/* do_match --- match a regexp, set RSTART and RLENGTH,
@@ -2175,9 +1299,9 @@ do_srand(NODE *tree)
*/
NODE *
-do_match(NODE *tree)
+do_match(int nargs)
{
- NODE *t1, *dest, *it;
+ NODE *tre, *t1, *dest, *it;
int rstart, len, ii;
int rlength;
Regexp *rp;
@@ -2189,18 +1313,16 @@ do_match(NODE *tree)
char *subsepstr;
size_t subseplen;
- t1 = force_string(tree_eval(tree->lnode));
- tree = tree->rnode;
- rp = re_update(tree->lnode);
-
dest = NULL;
- if (tree->rnode != NULL) { /* 3rd optional arg for the subpatterns */
- dest = get_param(tree->rnode->lnode);
+ if (nargs == 3) { /* 3rd optional arg for the subpatterns */
+ dest = POP_PARAM();
if (dest->type != Node_var_array)
fatal(_("match: third argument is not an array"));
-
assoc_clear(dest);
}
+ tre = POP();
+ rp = re_update(tre);
+ t1 = POP_STRING();
rstart = research(rp, t1->stptr, 0, t1->stlen, RE_NEED_START);
if (rstart >= 0) { /* match succeded */
@@ -2229,7 +1351,9 @@ do_match(NODE *tree)
if ((s = SUBPATSTART(rp, t1->stptr, ii)) != -1) {
size_t subpat_start;
size_t subpat_len;
-
+ NODE **lhs;
+ NODE *sub;
+
start = t1->stptr + s;
subpat_start = s;
subpat_len = len = SUBPATEND(rp, t1->stptr, ii) - s;
@@ -2242,11 +1366,13 @@ do_match(NODE *tree)
it = make_string(start, len);
it->flags |= MAYBE_NUM; /* user input */
- /*
- * assoc_lookup() does free_temp() on 2nd arg.
- */
- *assoc_lookup(dest, tmp_number((AWKNUM) (ii)), FALSE) = it;
-
+
+ sub = make_number((AWKNUM) (ii));
+ lhs = assoc_lookup(dest, sub, FALSE);
+ unref(*lhs);
+ *lhs = it;
+ unref(sub);
+
sprintf(buff, "%d", ii);
ilen = strlen(buff);
amt = ilen + subseplen + strlen("length") + 2;
@@ -2264,7 +1390,11 @@ do_match(NODE *tree)
slen = ilen + subseplen + 5;
it = make_number((AWKNUM) subpat_start + 1);
- *assoc_lookup(dest, tmp_string(buf, slen), FALSE) = it;
+ sub = make_string(buf, slen);
+ lhs = assoc_lookup(dest, sub, FALSE);
+ unref(*lhs);
+ *lhs = it;
+ unref(sub);
memcpy(buf, buff, ilen);
memcpy(buf + ilen, subsepstr, subseplen);
@@ -2273,24 +1403,29 @@ do_match(NODE *tree)
slen = ilen + subseplen + 6;
it = make_number((AWKNUM) subpat_len);
- *assoc_lookup(dest, tmp_string(buf, slen), FALSE) = it;
+ sub = make_string(buf, slen);
+ lhs = assoc_lookup(dest, sub, FALSE);
+ unref(*lhs);
+ *lhs = it;
+ unref(sub);
}
}
- free(buf);
+ efree(buf);
}
if (wc_indices != NULL)
- free(wc_indices);
+ efree(wc_indices);
} else { /* match failed */
rstart = 0;
rlength = -1;
}
- free_temp(t1);
+
+ DEREF(t1);
unref(RSTART_node->var_value);
RSTART_node->var_value = make_number((AWKNUM) rstart);
unref(RLENGTH_node->var_value);
RLENGTH_node->var_value = make_number((AWKNUM) rlength);
- return tmp_number((AWKNUM) rstart);
+ return make_number((AWKNUM) rstart);
}
/* sub_common --- the common code (does the work) for sub, gsub, and gensub */
@@ -2363,22 +1498,23 @@ do_match(NODE *tree)
* 2001 standard:
*
* sub(ere, repl[, in ])
- * Substitute the string repl in place of the first instance of the extended regular
- * expression ERE in string in and return the number of substitutions. An ampersand
- * ('&') appearing in the string repl shall be replaced by the string from in that
- * matches the ERE. An ampersand preceded with a backslash ('\') shall be
- * interpreted as the literal ampersand character. An occurrence of two consecutive
- * backslashes shall be interpreted as just a single literal backslash character. Any
- * other occurrence of a backslash (for example, preceding any other character) shall
- * be treated as a literal backslash character. Note that if repl is a string literal (the
- * lexical token STRING; see Grammar (on page 170)), the handling of the
- * ampersand character occurs after any lexical processing, including any lexical
- * backslash escape sequence processing. If in is specified and it is not an lvalue (see
- * Expressions in awk (on page 156)), the behavior is undefined. If in is omitted, awk
- * shall use the current record ($0) in its place.
+ * Substitute the string repl in place of the first instance of the extended regular
+ * expression ERE in string in and return the number of substitutions. An ampersand
+ * ('&') appearing in the string repl shall be replaced by the string from in that
+ * matches the ERE. An ampersand preceded with a backslash ('\') shall be
+ * interpreted as the literal ampersand character. An occurrence of two consecutive
+ * backslashes shall be interpreted as just a single literal backslash character. Any
+ * other occurrence of a backslash (for example, preceding any other character) shall
+ * be treated as a literal backslash character. Note that if repl is a string literal (the
+ * lexical token STRING; see Grammar (on page 170)), the handling of the
+ * ampersand character occurs after any lexical processing, including any lexical
+ * backslash escape sequence processing. If in is specified and it is not an lvalue (see
+ * Expressions in awk (on page 156)), the behavior is undefined. If in is omitted, awk
+ * shall use the current record ($0) in its place.
*
- * Because gawk has had its behavior for 7+ years, that behavior is remaining as
- * the default, with the POSIX behavior available for do_posix. Fun, fun, fun.
+ * 11/2010: The text in the 2008 standard is the same as just quoted. However, POSIX behavior
+ * is now the default. This can change the behavior of awk programs. The old behavior
+ * is not available.
*/
/*
@@ -2386,14 +1522,14 @@ do_match(NODE *tree)
*/
static NODE *
-sub_common(NODE *tree, long how_many, int backdigs)
+sub_common(int nargs, long how_many, int backdigs)
{
- register char *scan;
- register char *bp, *cp;
+ char *scan;
+ char *bp, *cp;
char *buf;
size_t buflen;
- register char *matchend;
- register size_t len;
+ char *matchend;
+ size_t len;
char *matchstart;
char *text;
size_t textlen;
@@ -2407,47 +1543,41 @@ sub_common(NODE *tree, long how_many, int backdigs)
NODE *s; /* subst. pattern */
NODE *t; /* string to make sub. in; $0 if none given */
NODE *tmp;
- NODE **lhs = &tree; /* value not used -- just different from NULL */
- int priv = FALSE;
- Func_ptr after_assign = NULL;
-
+ NODE **lhs;
int global = (how_many == -1);
long current;
int lastmatchnonzero;
char *mb_indices = NULL;
- tmp = tree->lnode; /* regexp */
+ tmp = PEEK(2); /* take care of regexp early, in case re_update is fatal */
rp = re_update(tmp);
+
+ /* original string */
+ if (nargs == 4) { /* kludge: no of items on stack is really 3,
+ * See snode(..) in awkgram.y
+ */
+ lhs = NULL;
+ t = POP_STRING();
+ } else {
+ lhs = POP_ADDRESS();
+ t = force_string(*lhs);
+ }
- tree = tree->rnode; /* replacement text */
- s = tree->lnode;
- s = force_string(tree_eval(s));
- tree = tree->rnode; /* original string */
- tmp = tree->lnode;
- t = force_string(tree_eval(tmp));
+ s = POP_STRING(); /* replacement text */
+ decr_sp(); /* regexp, already updated above */
/* do the search early to avoid work on non-match */
if (research(rp, t->stptr, 0, t->stlen, RE_NEED_START) == -1 ||
RESTART(rp, t->stptr) > t->stlen) {
- free_temp(t);
- free_temp(s);
- return tmp_number((AWKNUM) 0.0);
+ if (lhs == NULL)
+ DEREF(t);
+ DEREF(s);
+ return make_number((AWKNUM) 0.0);
}
- if (tmp->type == Node_val)
- lhs = NULL;
- else
- lhs = get_lhs(tmp, &after_assign, FALSE);
t->flags |= STRING;
- /*
- * create a private copy of the string
- */
- if (t->stref > 1 || (t->flags & (PERM|FIELD)) != 0) {
- tmp = copynode(t);
- t = tmp;
- priv = TRUE;
- }
+
text = t->stptr;
textlen = t->stlen;
buflen = textlen + 2;
@@ -2487,7 +1617,7 @@ sub_common(NODE *tree, long how_many, int backdigs)
repllen--;
scan++;
}
- } else { /* was under if (do_posix) */
+ } else {
/* \& --> &, \\ --> \ */
if (scan[1] == '&' || scan[1] == '\\') {
repllen--;
@@ -2495,26 +1625,6 @@ sub_common(NODE *tree, long how_many, int backdigs)
} /* else
leave alone, it goes into the output */
}
-#if 0
- else {
- /* gawk default behavior since 1996 */
- if (strncmp(scan, "\\\\\\&", 4) == 0) {
- /* \\\& --> \& */
- repllen -= 2;
- scan += 3;
- } else if (strncmp(scan, "\\\\&", 3) == 0) {
- /* \\& --> \<string> */
- ampersands++;
- repllen--;
- scan += 2;
- } else if (scan[1] == '&') {
- /* \& --> & */
- repllen--;
- scan++;
- } /* else
- leave alone, it goes into the output */
- }
-#endif
}
}
@@ -2561,18 +1671,18 @@ sub_common(NODE *tree, long how_many, int backdigs)
*/
for (scan = repl; scan < replend; scan++)
if (*scan == '&'
- /*
- * Don't test repllen here. A simple "&" could
- * end up with repllen == 0.
- */
- && (gawk_mb_cur_max == 1
- || mb_indices[scan - repl] == 1)
+ /*
+ * Don't test repllen here. A simple "&" could
+ * end up with repllen == 0.
+ */
+ && (gawk_mb_cur_max == 1
+ || mb_indices[scan - repl] == 1)
) {
- for (cp = matchstart; cp < matchend; cp++)
- *bp++ = *cp;
+ for (cp = matchstart; cp < matchend; cp++)
+ *bp++ = *cp;
} else if (*scan == '\\'
- && (gawk_mb_cur_max == 1
- || (repllen > 0 && mb_indices[scan - repl] == 1))
+ && (gawk_mb_cur_max == 1
+ || (repllen > 0 && mb_indices[scan - repl] == 1))
) {
if (backdigs) { /* gensub, behave sanely */
if (isdigit(scan[1])) {
@@ -2591,30 +1701,11 @@ sub_common(NODE *tree, long how_many, int backdigs)
scan++;
} else /* \q for any q --> q */
*bp++ = *++scan;
- } else if (do_posix) {
+ } else {
/* \& --> &, \\ --> \ */
if (scan[1] == '&' || scan[1] == '\\')
scan++;
*bp++ = *scan;
- } else {
- /* gawk default behavior since 1996 */
- if (strncmp(scan, "\\\\\\&", 4) == 0) {
- /* \\\& --> \& */
- *bp++ = '\\';
- *bp++ = '&';
- scan += 3;
- } else if (strncmp(scan, "\\\\&", 3) == 0) {
- /* \\& --> \<string> */
- *bp++ = '\\';
- for (cp = matchstart; cp < matchend; cp++)
- *bp++ = *cp;
- scan += 2;
- } else if (scan[1] == '&') {
- /* \& --> & */
- *bp++ = '&';
- scan++;
- } else
- *bp++ = *scan;
}
} else
*bp++ = *scan;
@@ -2653,65 +1744,53 @@ sub_common(NODE *tree, long how_many, int backdigs)
*bp++ = *scan;
*bp = '\0';
textlen = bp - buf;
- free(t->stptr);
- t->stptr = buf;
- t->stlen = textlen;
- free_wstr(t);
- t->flags &= ~(NUMCUR|NUMBER);
-
- free_temp(s);
- if (matches > 0 && lhs) {
- if (priv) {
+
+ DEREF(s);
+
+ if (lhs != NULL) {
+ if (matches > 0) {
unref(*lhs);
- *lhs = t;
- }
- if (after_assign != NULL)
- (*after_assign)();
+ *lhs = make_str_node(buf, textlen, ALREADY_MALLOCED);
+ } else
+ efree(buf);
+ } else {
+ efree(buf);
+ DEREF(t);
}
+
if (mb_indices != NULL)
- free(mb_indices);
+ efree(mb_indices);
- return tmp_number((AWKNUM) matches);
+ return make_number((AWKNUM) matches);
}
/* do_gsub --- global substitution */
NODE *
-do_gsub(NODE *tree)
+do_gsub(int nargs)
{
- return sub_common(tree, -1, FALSE);
+ return sub_common(nargs, -1, FALSE);
}
/* do_sub --- single substitution */
NODE *
-do_sub(NODE *tree)
+do_sub(int nargs)
{
- return sub_common(tree, 1, FALSE);
+ return sub_common(nargs, 1, FALSE);
}
/* do_gensub --- fix up the tree for sub_common for the gensub function */
NODE *
-do_gensub(NODE *tree)
+do_gensub(int nargs)
{
- NODE n1, n2, n3, *t, *tmp, *target, *ret;
+ NODE *t, *tmp, *target, *ret;
long how_many = 1; /* default is one substitution */
double d;
- /*
- * We have to pull out the value of the global flag, and
- * build up a tree without the flag in it, turning it into the
- * kind of tree that sub_common() expects. It helps to draw
- * a picture of this ...
- */
- n1 = *tree;
- n2 = *(tree->rnode);
- n1.rnode = & n2;
-
- t = tree_eval(n2.rnode->lnode); /* value of global flag */
-
- tmp = force_string(tree_eval(n2.rnode->rnode->lnode)); /* target */
+ tmp = POP_STRING(); /* target */
+ t = POP_SCALAR(); /* value of global flag */
/*
* We make copy of the original target string, and pass that
@@ -2719,12 +1798,10 @@ do_gensub(NODE *tree)
* We will then return the result string as the return value of
* this function.
*/
- target = make_string(tmp->stptr, tmp->stlen);
- free_temp(tmp);
- n3 = *(n2.rnode->rnode);
- n3.lnode = target;
- n2.rnode = & n3;
+ target = make_string(tmp->stptr, tmp->stlen);
+ DEREF(tmp);
+ PUSH_ADDRESS(& target);
if ((t->flags & (STRCUR|STRING)) != 0) {
if (t->stlen > 0 && (t->stptr[0] == 'g' || t->stptr[0] == 'G'))
@@ -2750,117 +1827,43 @@ set_how_many:
warning(_("gensub: third argument of 0 treated as 1"));
}
- free_temp(t);
+ DEREF(t);
- ret = sub_common(&n1, how_many, TRUE);
- free_temp(ret);
+ ret = sub_common(3, how_many, TRUE);
+ unref(ret);
/*
* Note that we don't care what sub_common() returns, since the
* easiest thing for the programmer is to return the string, even
* if no substitutions were done.
*/
- target->flags |= TEMP;
+
return target;
}
-#ifdef GFMT_WORKAROUND
-/*
- * printf's %g format [can't rely on gcvt()]
- * caveat: don't use as argument to *printf()!
- * 'format' string HAS to be of "<flags>*.*g" kind, or we bomb!
- */
-static void
-sgfmt(char *buf, /* return buffer; assumed big enough to hold result */
- const char *format,
- int alt, /* use alternate form flag */
- int fwidth, /* field width in a format */
- int prec, /* indicates desired significant digits, not decimal places */
- double g) /* value to format */
-{
- char dform[40];
- register char *gpos;
- register char *d, *e, *p;
- int again = FALSE;
-
- strncpy(dform, format, sizeof dform - 1);
- dform[sizeof dform - 1] = '\0';
- gpos = strrchr(dform, '.');
-
- if (g == 0.0 && ! alt) { /* easy special case */
- *gpos++ = 'd';
- *gpos = '\0';
- (void) sprintf(buf, dform, fwidth, 0);
- return;
- }
-
- /* advance to location of 'g' in the format */
- while (*gpos && *gpos != 'g' && *gpos != 'G')
- gpos++;
-
- if (prec <= 0) /* negative precision is ignored */
- prec = (prec < 0 ? DEFAULT_G_PRECISION : 1);
-
- if (*gpos == 'G')
- again = TRUE;
- /* start with 'e' format (it'll provide nice exponent) */
- *gpos = 'e';
- prec--;
- (void) sprintf(buf, dform, fwidth, prec, g);
- if ((e = strrchr(buf, 'e')) != NULL) { /* find exponent */
- int expn = atoi(e+1); /* fetch exponent */
- if (expn >= -4 && expn <= prec) { /* per K&R2, B1.2 */
- /* switch to 'f' format and re-do */
- *gpos = 'f';
- prec -= expn; /* decimal precision */
- (void) sprintf(buf, dform, fwidth, prec, g);
- e = buf + strlen(buf);
- while (*--e == ' ')
- continue;
- e++;
- }
- else if (again)
- *gpos = 'E';
-
- /* if 'alt' in force, then trailing zeros are not removed */
- if (! alt && (d = strrchr(buf, '.')) != NULL) {
- /* throw away an excess of precision */
- for (p = e; p > d && *--p == '0'; )
- prec--;
- if (d == p)
- prec--;
- if (prec < 0)
- prec = 0;
- /* and do that once again */
- again = TRUE;
- }
- if (again)
- (void) sprintf(buf, dform, fwidth, prec, g);
- }
-}
-#endif /* GFMT_WORKAROUND */
-/* tmp_integer - Convert an integer to a temporary number node. */
+/* make_integer - Convert an integer to a number node. */
static NODE *
-tmp_integer(uintmax_t n)
+make_integer(uintmax_t n)
{
n = adjust_uint(n);
- return tmp_number((AWKNUM) n);
+ return make_number((AWKNUM) n);
}
/* do_lshift --- perform a << operation */
NODE *
-do_lshift(NODE *tree)
+do_lshift(int nargs)
{
NODE *s1, *s2;
uintmax_t uval, ushift, res;
AWKNUM val, shift;
- s1 = tree_eval(tree->lnode);
- s2 = tree_eval(tree->rnode->lnode);
+ s2 = POP_SCALAR();
+ s1 = POP_SCALAR();
+
if (do_lint) {
if ((s1->flags & (NUMCUR|NUMBER)) == 0)
lintwarn(_("lshift: received non-numeric first argument"));
@@ -2878,27 +1881,28 @@ do_lshift(NODE *tree)
lintwarn(_("lshift(%lf, %lf): too large shift value will give strange results"), val, shift);
}
- free_temp(s1);
- free_temp(s2);
+ DEREF(s1);
+ DEREF(s2);
uval = (uintmax_t) val;
ushift = (uintmax_t) shift;
res = uval << ushift;
- return tmp_integer(res);
+ return make_integer(res);
}
/* do_rshift --- perform a >> operation */
NODE *
-do_rshift(NODE *tree)
+do_rshift(int nargs)
{
NODE *s1, *s2;
uintmax_t uval, ushift, res;
AWKNUM val, shift;
- s1 = tree_eval(tree->lnode);
- s2 = tree_eval(tree->rnode->lnode);
+ s2 = POP_SCALAR();
+ s1 = POP_SCALAR();
+
if (do_lint) {
if ((s1->flags & (NUMCUR|NUMBER)) == 0)
lintwarn(_("rshift: received non-numeric first argument"));
@@ -2916,27 +1920,28 @@ do_rshift(NODE *tree)
lintwarn(_("rshift(%lf, %lf): too large shift value will give strange results"), val, shift);
}
- free_temp(s1);
- free_temp(s2);
+ DEREF(s1);
+ DEREF(s2);
uval = (uintmax_t) val;
ushift = (uintmax_t) shift;
res = uval >> ushift;
- return tmp_integer(res);
+ return make_integer(res);
}
/* do_and --- perform an & operation */
NODE *
-do_and(NODE *tree)
+do_and(int nargs)
{
NODE *s1, *s2;
uintmax_t uleft, uright, res;
AWKNUM left, right;
- s1 = tree_eval(tree->lnode);
- s2 = tree_eval(tree->rnode->lnode);
+ s2 = POP_SCALAR();
+ s1 = POP_SCALAR();
+
if (do_lint) {
if ((s1->flags & (NUMCUR|NUMBER)) == 0)
lintwarn(_("and: received non-numeric first argument"));
@@ -2952,27 +1957,28 @@ do_and(NODE *tree)
lintwarn(_("and(%lf, %lf): fractional values will be truncated"), left, right);
}
- free_temp(s1);
- free_temp(s2);
+ DEREF(s1);
+ DEREF(s2);
uleft = (uintmax_t) left;
uright = (uintmax_t) right;
res = uleft & uright;
- return tmp_integer(res);
+ return make_integer(res);
}
/* do_or --- perform an | operation */
NODE *
-do_or(NODE *tree)
+do_or(int nargs)
{
NODE *s1, *s2;
uintmax_t uleft, uright, res;
AWKNUM left, right;
- s1 = tree_eval(tree->lnode);
- s2 = tree_eval(tree->rnode->lnode);
+ s2 = POP_SCALAR();
+ s1 = POP_SCALAR();
+
if (do_lint) {
if ((s1->flags & (NUMCUR|NUMBER)) == 0)
lintwarn(_("or: received non-numeric first argument"));
@@ -2988,27 +1994,30 @@ do_or(NODE *tree)
lintwarn(_("or(%lf, %lf): fractional values will be truncated"), left, right);
}
- free_temp(s1);
- free_temp(s2);
+ DEREF(s1);
+ DEREF(s2);
uleft = (uintmax_t) left;
uright = (uintmax_t) right;
res = uleft | uright;
- return tmp_integer(res);
+ return make_integer(res);
}
/* do_xor --- perform an ^ operation */
NODE *
-do_xor(NODE *tree)
+do_xor(int nargs)
{
NODE *s1, *s2;
uintmax_t uleft, uright, res;
AWKNUM left, right;
- s1 = tree_eval(tree->lnode);
- s2 = tree_eval(tree->rnode->lnode);
+ s2 = POP_SCALAR();
+ s1 = POP_SCALAR();
+ left = force_number(s1);
+ right = force_number(s2);
+
if (do_lint) {
if ((s1->flags & (NUMCUR|NUMBER)) == 0)
lintwarn(_("xor: received non-numeric first argument"));
@@ -3024,32 +2033,34 @@ do_xor(NODE *tree)
lintwarn(_("xor(%lf, %lf): fractional values will be truncated"), left, right);
}
- free_temp(s1);
- free_temp(s2);
+ DEREF(s1);
+ DEREF(s2);
uleft = (uintmax_t) left;
uright = (uintmax_t) right;
res = uleft ^ uright;
- return tmp_integer(res);
+ return make_integer(res);
}
/* do_compl --- perform a ~ operation */
NODE *
-do_compl(NODE *tree)
+do_compl(int nargs)
{
NODE *tmp;
double d;
uintmax_t uval;
- tmp = tree_eval(tree->lnode);
+ tmp = POP_SCALAR();
if (do_lint && (tmp->flags & (NUMCUR|NUMBER)) == 0)
lintwarn(_("compl: received non-numeric argument"));
d = force_number(tmp);
- free_temp(tmp);
+ DEREF(tmp);
if (do_lint) {
+ if ((tmp->flags & (NUMCUR|NUMBER)) == 0)
+ lintwarn(_("compl: received non-numeric argument"));
if (d < 0)
lintwarn(_("compl(%lf): negative value will give strange results"), d);
if (double_to_int(d) != d)
@@ -3058,18 +2069,18 @@ do_compl(NODE *tree)
uval = (uintmax_t) d;
uval = ~ uval;
- return tmp_integer(uval);
+ return make_integer(uval);
}
/* do_strtonum --- the strtonum function */
NODE *
-do_strtonum(NODE *tree)
+do_strtonum(int nargs)
{
NODE *tmp;
AWKNUM d;
- tmp = tree_eval(tree->lnode);
+ tmp = POP_SCALAR();
if ((tmp->flags & (NUMBER|NUMCUR)) != 0)
d = (AWKNUM) force_number(tmp);
@@ -3078,8 +2089,8 @@ do_strtonum(NODE *tree)
else
d = (AWKNUM) force_number(tmp);
- free_temp(tmp);
- return tmp_number((AWKNUM) d);
+ DEREF(tmp);
+ return make_number((AWKNUM) d);
}
/* nondec2awknum --- convert octal or hex value to double */
@@ -3167,7 +2178,7 @@ done:
#if ENABLE_NLS && defined(LC_MESSAGES) && HAVE_DCGETTEXT
static int
-localecategory_from_argument(NODE *tree)
+localecategory_from_argument(NODE *t)
{
static const struct category_table {
int val;
@@ -3199,14 +2210,11 @@ localecategory_from_argument(NODE *tree)
#endif /* LC_TIME */
};
- if (tree != NULL) {
+ if (t != NULL) {
int low, high, i, mid;
- NODE *tmp, *t;
char *category;
int lc_cat = -1;
- tmp = tree->lnode;
- t = force_string(tree_eval(tmp));
category = t->stptr;
/* binary search the table */
@@ -3228,7 +2236,6 @@ localecategory_from_argument(NODE *tree)
if (lc_cat == -1) /* not there */
fatal(_("dcgettext: `%s' is not a valid locale category"), category);
- free_temp(t);
return lc_cat;
} else
return LC_MESSAGES;
@@ -3246,94 +2253,108 @@ localecategory_from_argument(NODE *tree)
*/
NODE *
-do_dcgettext(NODE *tree)
+do_dcgettext(int nargs)
{
- NODE *tmp, *t1, *t2;
+ NODE *tmp, *t1, *t2 = NULL;
char *string;
char *the_result;
#if ENABLE_NLS && defined(LC_MESSAGES) && HAVE_DCGETTEXT
int lc_cat;
char *domain;
-#endif /* ENABLE_NLS */
- tmp = tree->lnode; /* first argument */
- t1 = force_string(tree_eval(tmp));
- string = t1->stptr;
+ if (nargs == 3) { /* third argument */
+ tmp = POP_STRING();
+ lc_cat = localecategory_from_argument(tmp);
+ DEREF(tmp);
+ } else
+ lc_cat = LC_MESSAGES;
- t2 = NULL;
-#if ENABLE_NLS && defined(LC_MESSAGES) && HAVE_DCGETTEXT
- tree = tree->rnode; /* second argument */
- if (tree != NULL) {
- tmp = tree->lnode;
- t2 = force_string(tree_eval(tmp));
+ if (nargs >= 2) { /* second argument */
+ t2 = POP_STRING();
domain = t2->stptr;
} else
domain = TEXTDOMAIN;
+#else
+ if (nargs == 3) {
+ tmp = POP_STRING();
+ DEREF(tmp);
+ }
+ if (nargs >= 2) {
+ t2 = POP_STRING();
+ DEREF(t2);
+ }
+#endif
- if (tree && tree->rnode != NULL) { /* third argument */
- lc_cat = localecategory_from_argument(tree->rnode);
- } else
- lc_cat = LC_MESSAGES;
+ t1 = POP_STRING(); /* first argument */
+ string = t1->stptr;
+#if ENABLE_NLS && defined(LC_MESSAGES) && HAVE_DCGETTEXT
the_result = dcgettext(domain, string, lc_cat);
+ if (t2 != NULL)
+ DEREF(t2);
#else
the_result = string;
#endif
- free_temp(t1);
- if (t2 != NULL)
- free_temp(t2);
-
- return tmp_string(the_result, strlen(the_result));
+ DEREF(t1);
+ return make_string(the_result, strlen(the_result));
}
+
NODE *
-do_dcngettext(NODE *tree)
+do_dcngettext(int nargs)
{
NODE *tmp, *t1, *t2, *t3;
char *string1, *string2;
unsigned long number;
+ AWKNUM d;
char *the_result;
+
#if ENABLE_NLS && defined(LC_MESSAGES) && HAVE_DCGETTEXT
int lc_cat;
char *domain;
-#endif /* ENABLE_NLS */
-
- tmp = tree->lnode; /* first argument */
- t1 = force_string(tree_eval(tmp));
- string1 = t1->stptr;
-
- tmp = tree->rnode->lnode; /* second argument */
- t2 = force_string(tree_eval(tmp));
- string2 = t2->stptr;
- tmp = tree->rnode->rnode->lnode; /* third argument */
- number = (unsigned long) double_to_int(force_number(tree_eval(tmp)));
+ if (nargs == 5) { /* fifth argument */
+ tmp = POP_STRING();
+ lc_cat = localecategory_from_argument(tmp);
+ DEREF(tmp);
+ } else
+ lc_cat = LC_MESSAGES;
t3 = NULL;
-#if ENABLE_NLS && defined(LC_MESSAGES) && HAVE_DCGETTEXT
- tree = tree->rnode->rnode->rnode; /* fourth argument */
- if (tree != NULL) {
- tmp = tree->lnode;
- t3 = force_string(tree_eval(tmp));
+ if (nargs >= 4) { /* fourth argument */
+ t3 = POP_STRING();
domain = t3->stptr;
} else
domain = TEXTDOMAIN;
+#else
+ if (nargs == 5) {
+ tmp = POP_STRING();
+ DEREF(tmp);
+ }
+ if (nargs >= 4) {
+ t3 = POP_STRING();
+ DEREF(t3);
+ }
+#endif
- if (tree && tree->rnode != NULL) { /* fifth argument */
- lc_cat = localecategory_from_argument(tree->rnode);
- } else
- lc_cat = LC_MESSAGES;
+ POP_NUMBER(d); /* third argument */
+ number = (unsigned long) double_to_int(d);
+ t2 = POP_STRING(); /* second argument */
+ string2 = t2->stptr;
+ t1 = POP_STRING(); /* first argument */
+ string1 = t1->stptr;
+
+#if ENABLE_NLS && defined(LC_MESSAGES) && HAVE_DCGETTEXT
the_result = dcngettext(domain, string1, string2, number, lc_cat);
+ if (t3 != NULL)
+ DEREF(t3);
#else
the_result = (number == 1 ? string1 : string2);
#endif
- free_temp(t1);
- free_temp(t2);
- if (t3 != NULL)
- free_temp(t3);
-
- return tmp_string(the_result, strlen(the_result));
+ DEREF(t1);
+ DEREF(t2);
+ return make_string(the_result, strlen(the_result));
}
/* do_bindtextdomain --- set the directory for a text domain */
@@ -3348,9 +2369,9 @@ do_dcngettext(NODE *tree)
*/
NODE *
-do_bindtextdomain(NODE *tree)
+do_bindtextdomain(int nargs)
{
- NODE *tmp, *t1, *t2;
+ NODE *t1, *t2;
char *directory, *domain;
char *the_result;
@@ -3359,87 +2380,21 @@ do_bindtextdomain(NODE *tree)
directory = NULL;
domain = TEXTDOMAIN;
- tmp = tree->lnode; /* first argument */
- t1 = force_string(tree_eval(tmp));
- if (t1->stlen > 0)
- directory = t1->stptr;
-
- tree = tree->rnode; /* second argument */
- if (tree != NULL) {
- tmp = tree->lnode;
- t2 = force_string(tree_eval(tmp));
+ if (nargs == 2) { /* second argument */
+ t2 = POP_STRING();
domain = t2->stptr;
}
+ /* first argument */
+ t1 = POP_STRING();
+ if (t1->stlen > 0)
+ directory = t1->stptr;
+
the_result = bindtextdomain(domain, directory);
- free_temp(t1);
+ DEREF(t1);
if (t2 != NULL)
- free_temp(t2);
-
- return tmp_string(the_result, strlen(the_result));
-}
-
-/* mbc_byte_count --- return number of bytes for corresponding numchars multibyte characters */
-
-static size_t
-mbc_byte_count(const char *ptr, size_t numchars)
-{
-#ifdef MBS_SUPPORT
- mbstate_t cur_state;
- size_t sum = 0;
- int mb_len;
-
- memset(& cur_state, 0, sizeof(cur_state));
-
- assert(gawk_mb_cur_max > 1);
- mb_len = mbrlen(ptr, numchars * gawk_mb_cur_max, &cur_state);
- if (mb_len <= 0)
- return numchars; /* no valid m.b. char */
-
- for (; numchars > 0; numchars--) {
- mb_len = mbrlen(ptr, numchars * gawk_mb_cur_max, &cur_state);
- if (mb_len <= 0)
- break;
- sum += mb_len;
- ptr += mb_len;
- }
-
- return sum;
-#else
- return numchars;
-#endif
-}
-
-/* mbc_char_count --- return number of m.b. chars in string, up to numbytes bytes */
-
-static size_t
-mbc_char_count(const char *ptr, size_t numbytes)
-{
-#ifdef MBS_SUPPORT
- mbstate_t cur_state;
- size_t sum = 0;
- int mb_len;
-
- memset(& cur_state, 0, sizeof(cur_state));
+ DEREF(t2);
- if (gawk_mb_cur_max == 1)
- return numbytes;
-
- mb_len = mbrlen(ptr, numbytes * gawk_mb_cur_max, &cur_state);
- if (mb_len <= 0)
- return numbytes; /* no valid m.b. char */
-
- for (; numbytes > 0; numbytes--) {
- mb_len = mbrlen(ptr, numbytes * gawk_mb_cur_max, &cur_state);
- if (mb_len <= 0)
- break;
- sum++;
- ptr += mb_len;
- }
-
- return sum;
-#else
- return numbytes;
-#endif
+ return make_string(the_result, strlen(the_result));
}
diff --git a/cmd.h b/cmd.h
new file mode 100644
index 00000000..d40d3e32
--- /dev/null
+++ b/cmd.h
@@ -0,0 +1,212 @@
+/*
+ * cmd.h - definitions for command parser
+ */
+
+/*
+ * Copyright (C) 2004, 2010 the Free Software Foundation, Inc.
+ *
+ * This file is part of GAWK, the GNU implementation of the
+ * AWK Programming Language.
+ *
+ * GAWK is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * GAWK is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
+ */
+
+#ifdef HAVE_LIBREADLINE
+#include <readline/readline.h>
+#include <readline/history.h>
+extern char **command_completion(const char *text, int start, int end);
+extern void initialize_pager(FILE *fp); /* debug.c */
+extern NODE **get_varlist(void);
+extern char **get_parmlist(void);
+#else
+#define initialize_pager(x) /* nothing */
+#define add_history(x) /* nothing */
+#endif
+
+extern int gprintf(FILE *fp, const char *format, ...);
+extern jmp_buf pager_quit_tag;
+
+extern int output_is_tty;
+extern int input_fd;
+extern int input_from_tty;
+extern FILE *out_fp;
+extern char *dPrompt;
+extern char *commands_Prompt;
+extern char *eval_Prompt;
+extern char *dgawk_Prompt;
+
+enum argtype {
+ D_illegal,
+
+ /* commands */
+ D_backtrace,
+ D_break,
+ D_clear,
+ D_commands,
+ D_condition,
+ D_continue,
+ D_delete,
+ D_disable,
+ D_display,
+ D_down,
+ D_dump,
+ D_enable,
+ D_end,
+ D_eval,
+ D_finish,
+ D_frame,
+ D_help,
+ D_ignore,
+ D_info,
+ D_list,
+ D_next,
+ D_nexti,
+ D_option,
+ D_print,
+ D_printf,
+ D_quit,
+ D_return,
+ D_run,
+ D_save,
+ D_set,
+ D_silent,
+ D_source,
+ D_step,
+ D_stepi,
+ D_tbreak,
+ D_trace,
+ D_undisplay,
+ D_until,
+ D_unwatch,
+ D_up,
+ D_watch,
+
+ /* arguments */
+ D_argument,
+ D_int,
+ D_string,
+ D_variable,
+ D_node,
+ D_field,
+ D_array,
+ D_subscript,
+ D_func,
+ D_range
+};
+
+/* non-number arguments to commands */
+
+enum nametypeval {
+ A_ARGS = 1,
+ A_BREAK,
+ A_DEL,
+ A_DISPLAY,
+ A_FRAME,
+ A_FUNCTIONS,
+ A_LOCALS,
+ A_ONCE,
+ A_SOURCE,
+ A_SOURCES,
+ A_TRACE_ON,
+ A_TRACE_OFF,
+ A_VARIABLES,
+ A_WATCH
+};
+
+typedef struct cmd_argument {
+ struct cmd_argument *next;
+ enum argtype type;
+ union {
+ long lval;
+ char *sval;
+ NODE *nodeval;
+ } value;
+
+#define a_int value.lval /* type = D_int or D_range */
+#define a_argument value.lval /* type = D_argument */
+#define a_string value.sval /* type = D_string, D_array, D_subscript or D_variable */
+#define a_node value.nodeval /* type = D_node, D_field or D_func */
+
+ int a_count; /* subscript count for D_subscript and D_array */
+} CMDARG;
+
+typedef int (*Func_cmd)(CMDARG *, int);
+
+struct cmdtoken {
+ const char *name;
+ char *abbrvn; /* abbreviation */
+ enum argtype type;
+ int class;
+ Func_cmd cf_ptr;
+ const char *help_txt;
+};
+
+/* command.c */
+extern void free_cmdarg(CMDARG *list);
+extern Func_cmd get_command(int ctype);
+extern const char *get_command_name(int ctype);
+
+/* debug.c */
+extern void d_error(const char *mesg, ...);
+
+/* command.c */
+extern int find_option(char *name);
+extern void option_help(void);
+extern char *(*read_a_line)(const char *prompt);
+extern char *read_commands_string(const char *prompt);
+extern int in_cmd_src(const char *);
+extern int get_eof_status(void);
+extern void push_cmd_src(int fd, int istty, char * (*readfunc)(const char *), int (*closefunc)(int), int cmd, int eofstatus);
+extern int pop_cmd_src(void);
+extern int has_break_or_watch_point(int *pnum, int any);
+extern int do_list(CMDARG *arg, int cmd);
+extern int do_info(CMDARG *arg, int cmd);
+extern int do_print_var(CMDARG *arg, int cmd);
+extern int do_backtrace(CMDARG *arg, int cmd);
+extern int do_breakpoint(CMDARG *arg, int cmd);
+extern int do_tmp_breakpoint(CMDARG *arg, int cmd);
+extern int do_delete_breakpoint(CMDARG *arg, int cmd);
+extern int do_enable_breakpoint(CMDARG *arg, int cmd);
+extern int do_disable_breakpoint(CMDARG *arg, int cmd) ;
+extern int do_ignore_breakpoint(CMDARG *arg, int cmd) ;
+extern int do_run(CMDARG *arg, int cmd);
+extern int do_quit(CMDARG *arg, int cmd);
+extern int do_continue(CMDARG *arg, int cmd);
+extern int do_step(CMDARG *arg, int cmd) ;
+extern int do_stepi(CMDARG *arg, int cmd) ;
+extern int do_next(CMDARG *arg, int cmd);
+extern int do_nexti(CMDARG *arg, int cmd);
+extern int do_clear(CMDARG *arg, int cmd);
+extern int do_finish(CMDARG *arg, int cmd) ;
+extern int do_help(CMDARG *arg, int cmd) ;
+extern int do_up(CMDARG *arg, int cmd);
+extern int do_down(CMDARG *arg, int cmd);
+extern int do_frame(CMDARG *arg, int cmd);
+extern int do_until(CMDARG *arg, int cmd);
+extern int do_set_var(CMDARG *arg, int cmd);
+extern int do_return(CMDARG *arg, int cmd);
+extern int do_display(CMDARG *arg, int cmd);
+extern int do_undisplay(CMDARG *arg, int cmd);
+extern int do_watch(CMDARG *arg, int cmd);
+extern int do_unwatch(CMDARG *arg, int cmd);
+extern int do_dump_instructions(CMDARG *arg, int cmd);
+extern int do_trace_instruction(CMDARG *arg, int cmd);
+extern int do_option(CMDARG *arg, int cmd);
+extern int do_commands(CMDARG *arg, int cmd);
+extern int do_print_f(CMDARG *arg, int cmd);
+extern int do_source(CMDARG *arg, int cmd);
+extern int do_save(CMDARG *arg, int cmd);
+extern int do_eval(CMDARG *arg, int cmd);
+extern int do_condition(CMDARG *arg, int cmd);
diff --git a/command.c b/command.c
new file mode 100644
index 00000000..2f4608e2
--- /dev/null
+++ b/command.c
@@ -0,0 +1,3646 @@
+
+/* A Bison parser, made by GNU Bison 2.4.1. */
+
+/* Skeleton implementation for Bison's Yacc-like parsers in C
+
+ Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
+ Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* As a special exception, you may create a larger work that contains
+ part or all of the Bison parser skeleton and distribute that work
+ under terms of your choice, so long as that work isn't itself a
+ parser generator using the skeleton or a modified version thereof
+ as a parser skeleton. Alternatively, if you modify or redistribute
+ the parser skeleton itself, you may (at your option) remove this
+ special exception, which will cause the skeleton and the resulting
+ Bison output files to be licensed under the GNU General Public
+ License without this special exception.
+
+ This special exception was added by the Free Software Foundation in
+ version 2.2 of Bison. */
+
+/* C LALR(1) parser skeleton written by Richard Stallman, by
+ simplifying the original so-called "semantic" parser. */
+
+/* All symbols defined below should begin with yy or YY, to avoid
+ infringing on user name space. This should be done even for local
+ variables, as they might otherwise be expanded by user macros.
+ There are some unavoidable exceptions within include files to
+ define necessary library symbols; they are noted "INFRINGES ON
+ USER NAME SPACE" below. */
+
+/* Identify Bison output. */
+#define YYBISON 1
+
+/* Bison version. */
+#define YYBISON_VERSION "2.4.1"
+
+/* Skeleton name. */
+#define YYSKELETON_NAME "yacc.c"
+
+/* Pure parsers. */
+#define YYPURE 0
+
+/* Push parsers. */
+#define YYPUSH 0
+
+/* Pull parsers. */
+#define YYPULL 1
+
+/* Using locations. */
+#define YYLSP_NEEDED 0
+
+/* Substitute the variable and function names. */
+#define yyparse zzparse
+#define yylex zzlex
+#define yyerror zzerror
+#define yylval zzlval
+#define yychar zzchar
+#define yydebug zzdebug
+#define yynerrs zznerrs
+
+
+/* Copy the first part of user declarations. */
+
+/* Line 189 of yacc.c */
+#line 26 "command.y"
+
+#include "awk.h"
+#include "cmd.h"
+
+#if 0
+#define YYDEBUG 12
+int yydebug = 2;
+#endif
+
+static int yylex(void);
+static void yyerror(const char *mesg, ...);
+
+static int find_command(const char *token, size_t toklen);
+
+static int want_nodeval = FALSE;
+
+static int cmd_idx = -1; /* index of current command in cmd table */
+static int repeat_idx = -1; /* index of last repeatable command in command table */
+static CMDARG *arg_list = NULL; /* list of arguments */
+static long errcount = 0;
+static char *lexptr_begin = NULL;
+static int in_commands = FALSE;
+static int num_dim;
+
+static int in_eval = FALSE;
+static const char start_EVAL[] = "function @eval(){";
+static const char end_EVAL[] = "}";
+static CMDARG *append_statement(CMDARG *alist, char *stmt);
+static char *next_word(char *p, int len, char **endp);
+static NODE *concat_args(CMDARG *a, int count);
+
+#ifdef HAVE_LIBREADLINE
+static void history_expand_line(char **line);
+static char *command_generator(const char *text, int state);
+static char *srcfile_generator(const char *text, int state);
+static char *argument_generator(const char *text, int state);
+static char *variable_generator(const char *text, int state);
+extern char *option_generator(const char *text, int state);
+static int this_cmd = D_illegal;
+#else
+#define history_expand_line(p) /* nothing */
+static int rl_inhibit_completion; /* dummy variable */
+#endif
+
+struct argtoken {
+ const char *name;
+ enum argtype cmd;
+ enum nametypeval value;
+};
+
+/*
+ * These two should be static, but there are some compilers that
+ * don't like the static keyword with an empty size. Therefore give
+ * them names that are less likely to conflict with the rest of gawk.
+ */
+#define argtab zz_debug_argtab
+#define cmdtab zz_debug_cmdtab
+
+extern struct argtoken argtab[];
+extern struct cmdtoken cmdtab[];
+
+static CMDARG *mk_cmdarg(enum argtype type);
+static void append_cmdarg(CMDARG *arg);
+static int find_argument(CMDARG *arg);
+#define YYSTYPE CMDARG *
+
+
+/* Line 189 of yacc.c */
+#line 149 "command.c"
+
+/* Enabling traces. */
+#ifndef YYDEBUG
+# define YYDEBUG 0
+#endif
+
+/* Enabling verbose error messages. */
+#ifdef YYERROR_VERBOSE
+# undef YYERROR_VERBOSE
+# define YYERROR_VERBOSE 1
+#else
+# define YYERROR_VERBOSE 0
+#endif
+
+/* Enabling the token table. */
+#ifndef YYTOKEN_TABLE
+# define YYTOKEN_TABLE 0
+#endif
+
+
+/* Tokens. */
+#ifndef YYTOKENTYPE
+# define YYTOKENTYPE
+ /* Put the tokens into the symbol table, so that GDB and other debuggers
+ know about them. */
+ enum yytokentype {
+ D_BACKTRACE = 258,
+ D_BREAK = 259,
+ D_CLEAR = 260,
+ D_CONTINUE = 261,
+ D_DELETE = 262,
+ D_DISABLE = 263,
+ D_DOWN = 264,
+ D_ENABLE = 265,
+ D_FINISH = 266,
+ D_FRAME = 267,
+ D_HELP = 268,
+ D_IGNORE = 269,
+ D_INFO = 270,
+ D_LIST = 271,
+ D_NEXT = 272,
+ D_NEXTI = 273,
+ D_PRINT = 274,
+ D_PRINTF = 275,
+ D_QUIT = 276,
+ D_RETURN = 277,
+ D_RUN = 278,
+ D_SET = 279,
+ D_STEP = 280,
+ D_STEPI = 281,
+ D_TBREAK = 282,
+ D_UP = 283,
+ D_UNTIL = 284,
+ D_DISPLAY = 285,
+ D_UNDISPLAY = 286,
+ D_WATCH = 287,
+ D_UNWATCH = 288,
+ D_DUMP = 289,
+ D_TRACE = 290,
+ D_INT = 291,
+ D_STRING = 292,
+ D_NODE = 293,
+ D_VARIABLE = 294,
+ D_OPTION = 295,
+ D_COMMANDS = 296,
+ D_END = 297,
+ D_SILENT = 298,
+ D_SOURCE = 299,
+ D_SAVE = 300,
+ D_EVAL = 301,
+ D_CONDITION = 302,
+ D_STATEMENT = 303
+ };
+#endif
+/* Tokens. */
+#define D_BACKTRACE 258
+#define D_BREAK 259
+#define D_CLEAR 260
+#define D_CONTINUE 261
+#define D_DELETE 262
+#define D_DISABLE 263
+#define D_DOWN 264
+#define D_ENABLE 265
+#define D_FINISH 266
+#define D_FRAME 267
+#define D_HELP 268
+#define D_IGNORE 269
+#define D_INFO 270
+#define D_LIST 271
+#define D_NEXT 272
+#define D_NEXTI 273
+#define D_PRINT 274
+#define D_PRINTF 275
+#define D_QUIT 276
+#define D_RETURN 277
+#define D_RUN 278
+#define D_SET 279
+#define D_STEP 280
+#define D_STEPI 281
+#define D_TBREAK 282
+#define D_UP 283
+#define D_UNTIL 284
+#define D_DISPLAY 285
+#define D_UNDISPLAY 286
+#define D_WATCH 287
+#define D_UNWATCH 288
+#define D_DUMP 289
+#define D_TRACE 290
+#define D_INT 291
+#define D_STRING 292
+#define D_NODE 293
+#define D_VARIABLE 294
+#define D_OPTION 295
+#define D_COMMANDS 296
+#define D_END 297
+#define D_SILENT 298
+#define D_SOURCE 299
+#define D_SAVE 300
+#define D_EVAL 301
+#define D_CONDITION 302
+#define D_STATEMENT 303
+
+
+
+
+#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
+typedef int YYSTYPE;
+# define YYSTYPE_IS_TRIVIAL 1
+# define yystype YYSTYPE /* obsolescent; will be withdrawn */
+# define YYSTYPE_IS_DECLARED 1
+#endif
+
+
+/* Copy the second part of user declarations. */
+
+
+/* Line 264 of yacc.c */
+#line 287 "command.c"
+
+#ifdef short
+# undef short
+#endif
+
+#ifdef YYTYPE_UINT8
+typedef YYTYPE_UINT8 yytype_uint8;
+#else
+typedef unsigned char yytype_uint8;
+#endif
+
+#ifdef YYTYPE_INT8
+typedef YYTYPE_INT8 yytype_int8;
+#elif (defined __STDC__ || defined __C99__FUNC__ \
+ || defined __cplusplus || defined _MSC_VER)
+typedef signed char yytype_int8;
+#else
+typedef short int yytype_int8;
+#endif
+
+#ifdef YYTYPE_UINT16
+typedef YYTYPE_UINT16 yytype_uint16;
+#else
+typedef unsigned short int yytype_uint16;
+#endif
+
+#ifdef YYTYPE_INT16
+typedef YYTYPE_INT16 yytype_int16;
+#else
+typedef short int yytype_int16;
+#endif
+
+#ifndef YYSIZE_T
+# ifdef __SIZE_TYPE__
+# define YYSIZE_T __SIZE_TYPE__
+# elif defined size_t
+# define YYSIZE_T size_t
+# elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \
+ || defined __cplusplus || defined _MSC_VER)
+# include <stddef.h> /* INFRINGES ON USER NAME SPACE */
+# define YYSIZE_T size_t
+# else
+# define YYSIZE_T unsigned int
+# endif
+#endif
+
+#define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
+
+#ifndef YY_
+# if YYENABLE_NLS
+# if ENABLE_NLS
+# include <libintl.h> /* INFRINGES ON USER NAME SPACE */
+# define YY_(msgid) dgettext ("bison-runtime", msgid)
+# endif
+# endif
+# ifndef YY_
+# define YY_(msgid) msgid
+# endif
+#endif
+
+/* Suppress unused-variable warnings by "using" E. */
+#if ! defined lint || defined __GNUC__
+# define YYUSE(e) ((void) (e))
+#else
+# define YYUSE(e) /* empty */
+#endif
+
+/* Identity function, used to suppress warnings about constant conditions. */
+#ifndef lint
+# define YYID(n) (n)
+#else
+#if (defined __STDC__ || defined __C99__FUNC__ || defined __cplusplus || defined _MSC_VER)
+static int
+YYID (int yyi)
+#else
+static int
+YYID (yyi)
+ int yyi;
+#endif
+{
+ return yyi;
+}
+#endif
+
+#if ! defined yyoverflow || YYERROR_VERBOSE
+
+/* The parser invokes alloca or malloc; define the necessary symbols. */
+
+# ifdef YYSTACK_USE_ALLOCA
+# if YYSTACK_USE_ALLOCA
+# ifdef __GNUC__
+# define YYSTACK_ALLOC __builtin_alloca
+# elif defined __BUILTIN_VA_ARG_INCR
+# include <alloca.h> /* INFRINGES ON USER NAME SPACE */
+# elif defined _AIX
+# define YYSTACK_ALLOC __alloca
+# elif defined _MSC_VER
+# include <malloc.h> /* INFRINGES ON USER NAME SPACE */
+# define alloca _alloca
+# else
+# define YYSTACK_ALLOC alloca
+# if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
+ || defined __cplusplus || defined _MSC_VER)
+# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
+# ifndef _STDLIB_H
+# define _STDLIB_H 1
+# endif
+# endif
+# endif
+# endif
+# endif
+
+# ifdef YYSTACK_ALLOC
+ /* Pacify GCC's `empty if-body' warning. */
+# define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0))
+# ifndef YYSTACK_ALLOC_MAXIMUM
+ /* The OS might guarantee only one guard page at the bottom of the stack,
+ and a page size can be as small as 4096 bytes. So we cannot safely
+ invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
+ to allow for a few compiler-allocated temporary stack slots. */
+# define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
+# endif
+# else
+# define YYSTACK_ALLOC YYMALLOC
+# define YYSTACK_FREE YYFREE
+# ifndef YYSTACK_ALLOC_MAXIMUM
+# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
+# endif
+# if (defined __cplusplus && ! defined _STDLIB_H \
+ && ! ((defined YYMALLOC || defined malloc) \
+ && (defined YYFREE || defined free)))
+# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
+# ifndef _STDLIB_H
+# define _STDLIB_H 1
+# endif
+# endif
+# ifndef YYMALLOC
+# define YYMALLOC malloc
+# if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
+ || defined __cplusplus || defined _MSC_VER)
+void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
+# endif
+# endif
+# ifndef YYFREE
+# define YYFREE free
+# if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
+ || defined __cplusplus || defined _MSC_VER)
+void free (void *); /* INFRINGES ON USER NAME SPACE */
+# endif
+# endif
+# endif
+#endif /* ! defined yyoverflow || YYERROR_VERBOSE */
+
+
+#if (! defined yyoverflow && (! defined __cplusplus || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
+
+/* A type that is properly aligned for any stack member. */
+union yyalloc
+{
+ yytype_int16 yyss_alloc;
+ YYSTYPE yyvs_alloc;
+};
+
+/* The size of the maximum gap between one aligned stack and the next. */
+# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
+
+/* The size of an array large to enough to hold all stacks, each with
+ N elements. */
+# define YYSTACK_BYTES(N) \
+ ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
+ + YYSTACK_GAP_MAXIMUM)
+
+/* Copy COUNT objects from FROM to TO. The source and destination do
+ not overlap. */
+# ifndef YYCOPY
+# if defined __GNUC__ && 1 < __GNUC__
+# define YYCOPY(To, From, Count) \
+ __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
+# else
+# define YYCOPY(To, From, Count) \
+ do \
+ { \
+ YYSIZE_T yyi; \
+ for (yyi = 0; yyi < (Count); yyi++) \
+ (To)[yyi] = (From)[yyi]; \
+ } \
+ while (YYID (0))
+# endif
+# endif
+
+/* Relocate STACK from its old location to the new one. The
+ local variables YYSIZE and YYSTACKSIZE give the old and new number of
+ elements in the stack, and YYPTR gives the new location of the
+ stack. Advance YYPTR to a properly aligned location for the next
+ stack. */
+# define YYSTACK_RELOCATE(Stack_alloc, Stack) \
+ do \
+ { \
+ YYSIZE_T yynewbytes; \
+ YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
+ Stack = &yyptr->Stack_alloc; \
+ yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
+ yyptr += yynewbytes / sizeof (*yyptr); \
+ } \
+ while (YYID (0))
+
+#endif
+
+/* YYFINAL -- State number of the termination state. */
+#define YYFINAL 2
+/* YYLAST -- Last index in YYTABLE. */
+#define YYLAST 203
+
+/* YYNTOKENS -- Number of terminals. */
+#define YYNTOKENS 59
+/* YYNNTS -- Number of nonterminals. */
+#define YYNNTS 55
+/* YYNRULES -- Number of rules. */
+#define YYNRULES 156
+/* YYNRULES -- Number of states. */
+#define YYNSTATES 203
+
+/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
+#define YYUNDEFTOK 2
+#define YYMAXUTOK 303
+
+#define YYTRANSLATE(YYX) \
+ ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
+
+/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */
+static const yytype_uint8 yytranslate[] =
+{
+ 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 58, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 57, 2, 2, 2,
+ 2, 2, 2, 53, 50, 54, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 51, 2,
+ 2, 49, 2, 2, 52, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 55, 2, 56, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 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
+};
+
+#if YYDEBUG
+/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
+ YYRHS. */
+static const yytype_uint16 yyprhs[] =
+{
+ 0, 0, 3, 4, 7, 9, 12, 15, 17, 19,
+ 21, 23, 25, 27, 29, 31, 33, 35, 37, 39,
+ 41, 43, 45, 46, 51, 52, 53, 58, 62, 66,
+ 69, 71, 73, 75, 78, 81, 84, 88, 91, 92,
+ 96, 97, 101, 104, 107, 110, 113, 114, 120, 123,
+ 124, 128, 129, 133, 134, 139, 142, 145, 148, 151,
+ 154, 156, 158, 161, 162, 167, 169, 171, 173, 175,
+ 176, 178, 180, 183, 187, 189, 190, 192, 194, 196,
+ 197, 199, 203, 205, 206, 208, 210, 214, 218, 219,
+ 220, 224, 226, 227, 233, 237, 238, 240, 241, 243,
+ 244, 246, 247, 249, 251, 254, 256, 259, 263, 265,
+ 268, 272, 274, 276, 278, 280, 284, 286, 287, 289,
+ 291, 293, 295, 297, 301, 305, 309, 313, 314, 316,
+ 318, 320, 322, 325, 328, 330, 334, 336, 340, 344,
+ 346, 349, 351, 354, 357, 359, 362, 365, 366, 368,
+ 369, 371, 373, 376, 378, 381, 384
+};
+
+/* YYRHS -- A `-1'-separated list of the rules' RHS. */
+static const yytype_int8 yyrhs[] =
+{
+ 60, 0, -1, -1, 60, 61, -1, 113, -1, 71,
+ 113, -1, 1, 113, -1, 6, -1, 17, -1, 18,
+ -1, 25, -1, 26, -1, 31, -1, 33, -1, 8,
+ -1, 7, -1, 28, -1, 9, -1, 3, -1, 12,
+ -1, 4, -1, 27, -1, -1, 46, 66, 81, 113,
+ -1, -1, -1, 68, 48, 69, 113, -1, 67, 68,
+ 42, -1, 46, 66, 84, -1, 13, 94, -1, 21,
+ -1, 23, -1, 11, -1, 62, 109, -1, 64, 110,
+ -1, 15, 37, -1, 14, 111, 36, -1, 10, 95,
+ -1, -1, 19, 72, 97, -1, -1, 20, 73, 99,
+ -1, 16, 100, -1, 29, 87, -1, 5, 87, -1,
+ 65, 88, -1, -1, 24, 74, 107, 49, 108, -1,
+ 40, 85, -1, -1, 22, 75, 93, -1, -1, 30,
+ 76, 91, -1, -1, 32, 77, 107, 79, -1, 63,
+ 102, -1, 34, 92, -1, 44, 37, -1, 45, 37,
+ -1, 41, 80, -1, 42, -1, 43, -1, 35, 37,
+ -1, -1, 47, 111, 78, 79, -1, 70, -1, 83,
+ -1, 109, -1, 1, -1, -1, 82, -1, 39, -1,
+ 82, 39, -1, 82, 50, 39, -1, 1, -1, -1,
+ 84, -1, 1, -1, 38, -1, -1, 37, -1, 37,
+ 49, 37, -1, 37, -1, -1, 111, -1, 86, -1,
+ 37, 51, 111, -1, 37, 51, 86, -1, -1, -1,
+ 111, 89, 79, -1, 86, -1, -1, 37, 51, 111,
+ 90, 79, -1, 37, 51, 86, -1, -1, 107, -1,
+ -1, 37, -1, -1, 108, -1, -1, 37, -1, 102,
+ -1, 37, 102, -1, 107, -1, 52, 39, -1, 52,
+ 39, 106, -1, 96, -1, 97, 96, -1, 97, 50,
+ 96, -1, 1, -1, 38, -1, 107, -1, 98, -1,
+ 99, 50, 98, -1, 1, -1, -1, 53, -1, 54,
+ -1, 111, -1, 86, -1, 101, -1, 37, 51, 111,
+ -1, 37, 51, 86, -1, 37, 51, 101, -1, 111,
+ 54, 111, -1, -1, 103, -1, 1, -1, 111, -1,
+ 101, -1, 103, 111, -1, 103, 101, -1, 108, -1,
+ 104, 50, 108, -1, 1, -1, 55, 104, 56, -1,
+ 55, 104, 1, -1, 105, -1, 106, 105, -1, 39,
+ -1, 57, 38, -1, 39, 106, -1, 38, -1, 53,
+ 38, -1, 54, 38, -1, -1, 111, -1, -1, 112,
+ -1, 36, -1, 53, 36, -1, 36, -1, 53, 36,
+ -1, 54, 36, -1, 58, -1
+};
+
+/* YYRLINE[YYN] -- source line where rule number YYN was defined. */
+static const yytype_uint16 yyrline[] =
+{
+ 0, 106, 106, 108, 126, 127, 177, 184, 185, 186,
+ 187, 188, 192, 193, 194, 195, 199, 200, 201, 202,
+ 206, 207, 212, 216, 235, 242, 242, 249, 265, 279,
+ 280, 281, 282, 283, 284, 290, 302, 303, 304, 304,
+ 305, 305, 306, 307, 308, 309, 310, 310, 311, 312,
+ 312, 313, 313, 314, 314, 315, 316, 317, 322, 327,
+ 353, 363, 368, 380, 380, 388, 402, 415, 416, 422,
+ 423, 427, 428, 429, 430, 436, 437, 438, 443, 454,
+ 455, 460, 468, 485, 486, 487, 488, 489, 494, 495,
+ 495, 496, 497, 497, 498, 503, 504, 509, 510, 515,
+ 516, 519, 521, 525, 526, 541, 542, 547, 555, 556,
+ 557, 558, 562, 563, 567, 568, 569, 574, 575, 577,
+ 584, 585, 586, 587, 588, 589, 593, 606, 607, 608,
+ 612, 613, 614, 615, 619, 621, 623, 627, 642, 646,
+ 648, 653, 654, 663, 673, 675, 682, 695, 696, 702,
+ 703, 708, 714, 723, 725, 727, 735
+};
+#endif
+
+#if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
+/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
+ First, the terminals, then, starting at YYNTOKENS, nonterminals. */
+static const char *const yytname[] =
+{
+ "$end", "error", "$undefined", "D_BACKTRACE", "D_BREAK", "D_CLEAR",
+ "D_CONTINUE", "D_DELETE", "D_DISABLE", "D_DOWN", "D_ENABLE", "D_FINISH",
+ "D_FRAME", "D_HELP", "D_IGNORE", "D_INFO", "D_LIST", "D_NEXT", "D_NEXTI",
+ "D_PRINT", "D_PRINTF", "D_QUIT", "D_RETURN", "D_RUN", "D_SET", "D_STEP",
+ "D_STEPI", "D_TBREAK", "D_UP", "D_UNTIL", "D_DISPLAY", "D_UNDISPLAY",
+ "D_WATCH", "D_UNWATCH", "D_DUMP", "D_TRACE", "D_INT", "D_STRING",
+ "D_NODE", "D_VARIABLE", "D_OPTION", "D_COMMANDS", "D_END", "D_SILENT",
+ "D_SOURCE", "D_SAVE", "D_EVAL", "D_CONDITION", "D_STATEMENT", "'='",
+ "','", "':'", "'@'", "'+'", "'-'", "'['", "']'", "'$'", "'\\n'",
+ "$accept", "input", "line", "control_cmd", "d_cmd", "frame_cmd",
+ "break_cmd", "set_want_nodeval", "eval_prologue", "statement_list", "@1",
+ "eval_cmd", "command", "$@2", "$@3", "$@4", "$@5", "$@6", "$@7", "$@8",
+ "condition_exp", "commands_arg", "opt_param_list", "param_list",
+ "opt_string_node", "string_node", "option_args", "func_name", "location",
+ "break_args", "$@9", "$@10", "opt_variable", "opt_string", "opt_node",
+ "help_args", "enable_args", "print_exp", "print_args", "printf_exp",
+ "printf_args", "list_args", "integer_range", "opt_integer_list",
+ "integer_list", "exp_list", "subscript", "subscript_list", "variable",
+ "node", "opt_plus_integer", "opt_integer", "plus_integer", "integer",
+ "nls", 0
+};
+#endif
+
+# ifdef YYPRINT
+/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
+ token YYLEX-NUM. */
+static const yytype_uint16 yytoknum[] =
+{
+ 0, 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, 61,
+ 44, 58, 64, 43, 45, 91, 93, 36, 10
+};
+# endif
+
+/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
+static const yytype_uint8 yyr1[] =
+{
+ 0, 59, 60, 60, 61, 61, 61, 62, 62, 62,
+ 62, 62, 63, 63, 63, 63, 64, 64, 64, 64,
+ 65, 65, 66, 67, 68, 69, 68, 70, 70, 71,
+ 71, 71, 71, 71, 71, 71, 71, 71, 72, 71,
+ 73, 71, 71, 71, 71, 71, 74, 71, 71, 75,
+ 71, 76, 71, 77, 71, 71, 71, 71, 71, 71,
+ 71, 71, 71, 78, 71, 71, 79, 80, 80, 81,
+ 81, 82, 82, 82, 82, 83, 83, 83, 84, 85,
+ 85, 85, 86, 87, 87, 87, 87, 87, 88, 89,
+ 88, 88, 90, 88, 88, 91, 91, 92, 92, 93,
+ 93, 94, 94, 95, 95, 96, 96, 96, 97, 97,
+ 97, 97, 98, 98, 99, 99, 99, 100, 100, 100,
+ 100, 100, 100, 100, 100, 100, 101, 102, 102, 102,
+ 103, 103, 103, 103, 104, 104, 104, 105, 105, 106,
+ 106, 107, 107, 107, 108, 108, 108, 109, 109, 110,
+ 110, 111, 111, 112, 112, 112, 113
+};
+
+/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
+static const yytype_uint8 yyr2[] =
+{
+ 0, 2, 0, 2, 1, 2, 2, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 0, 4, 0, 0, 4, 3, 3, 2,
+ 1, 1, 1, 2, 2, 2, 3, 2, 0, 3,
+ 0, 3, 2, 2, 2, 2, 0, 5, 2, 0,
+ 3, 0, 3, 0, 4, 2, 2, 2, 2, 2,
+ 1, 1, 2, 0, 4, 1, 1, 1, 1, 0,
+ 1, 1, 2, 3, 1, 0, 1, 1, 1, 0,
+ 1, 3, 1, 0, 1, 1, 3, 3, 0, 0,
+ 3, 1, 0, 5, 3, 0, 1, 0, 1, 0,
+ 1, 0, 1, 1, 2, 1, 2, 3, 1, 2,
+ 3, 1, 1, 1, 1, 3, 1, 0, 1, 1,
+ 1, 1, 1, 3, 3, 3, 3, 0, 1, 1,
+ 1, 1, 2, 2, 1, 3, 1, 3, 3, 1,
+ 2, 1, 2, 2, 1, 2, 2, 0, 1, 0,
+ 1, 1, 2, 1, 2, 2, 1
+};
+
+/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
+ STATE-NUM when YYTABLE doesn't specify something else to do. Zero
+ means the default is an error. */
+static const yytype_uint8 yydefact[] =
+{
+ 2, 0, 1, 0, 18, 20, 83, 7, 15, 14,
+ 17, 0, 32, 19, 101, 0, 0, 117, 8, 9,
+ 38, 40, 30, 49, 31, 46, 10, 11, 21, 16,
+ 83, 51, 12, 53, 13, 97, 0, 79, 0, 60,
+ 61, 0, 0, 22, 0, 156, 3, 147, 0, 149,
+ 88, 24, 65, 0, 4, 6, 151, 82, 0, 85,
+ 44, 84, 129, 0, 37, 131, 103, 128, 130, 102,
+ 29, 0, 35, 82, 118, 119, 121, 42, 122, 120,
+ 0, 0, 99, 0, 43, 95, 0, 98, 56, 62,
+ 80, 48, 68, 59, 67, 148, 57, 58, 0, 63,
+ 33, 55, 153, 0, 0, 34, 150, 82, 91, 45,
+ 89, 0, 5, 0, 152, 104, 133, 132, 0, 36,
+ 0, 111, 141, 0, 0, 108, 39, 105, 116, 112,
+ 114, 41, 113, 144, 0, 0, 50, 100, 0, 52,
+ 96, 0, 0, 74, 78, 71, 0, 70, 28, 0,
+ 154, 155, 0, 0, 27, 25, 82, 87, 86, 126,
+ 124, 125, 123, 0, 139, 143, 106, 142, 0, 109,
+ 0, 145, 146, 0, 77, 54, 66, 76, 81, 23,
+ 72, 0, 64, 94, 92, 90, 0, 136, 0, 134,
+ 140, 107, 110, 115, 47, 73, 0, 26, 138, 0,
+ 137, 93, 135
+};
+
+/* YYDEFGOTO[NTERM-NUM]. */
+static const yytype_int16 yydefgoto[] =
+{
+ -1, 1, 46, 47, 48, 49, 50, 98, 51, 111,
+ 186, 52, 53, 80, 81, 83, 82, 85, 86, 149,
+ 175, 93, 146, 147, 176, 177, 91, 59, 60, 109,
+ 153, 196, 139, 88, 136, 70, 64, 125, 126, 130,
+ 131, 77, 65, 66, 67, 188, 164, 165, 127, 137,
+ 94, 105, 68, 106, 54
+};
+
+/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
+ STATE-NUM. */
+#define YYPACT_NINF -151
+static const yytype_int16 yypact[] =
+{
+ -151, 145, -151, -34, -151, -151, 50, -151, -151, -151,
+ -151, 10, -151, -151, -10, 59, -9, 43, -151, -151,
+ -151, -151, -151, -151, -151, -151, -151, -151, -151, -151,
+ 50, -151, -151, -151, -151, -8, -6, 14, 12, -151,
+ -151, 22, 23, -151, 59, -151, -151, 59, 13, 36,
+ 64, -151, -151, -34, -151, -151, -151, 24, 47, -151,
+ -151, -151, -151, 13, -151, -151, -151, 59, 48, -151,
+ -151, 80, -151, 67, 47, -151, -151, -151, -151, 48,
+ 4, 19, 69, -20, -151, -20, -20, -151, -151, -151,
+ 70, -151, -151, -151, -151, -151, -151, -151, 16, -151,
+ -151, -151, -151, 84, 85, -151, -151, 73, -151, -151,
+ -151, 40, -151, 74, -151, -151, -151, 48, 59, -151,
+ 74, -151, 71, 89, 91, -151, 42, -151, -151, -151,
+ -151, 81, -151, -151, 92, 94, -151, -151, 86, -151,
+ -151, 6, 96, -151, -151, -151, -34, 75, -151, 6,
+ -151, -151, 74, 6, -151, -151, -151, -151, -151, -151,
+ -151, -151, 48, 31, -151, 71, 71, -151, 52, -151,
+ -17, -151, -151, 69, -151, -151, -151, -151, -151, -151,
+ -151, 95, -151, -151, -151, -151, -34, -151, 17, -151,
+ -151, 71, -151, -151, -151, -151, 6, -151, -151, 69,
+ -151, -151, -151
+};
+
+/* YYPGOTO[NTERM-NUM]. */
+static const yytype_int16 yypgoto[] =
+{
+ -151, -151, -151, -151, -151, -151, -151, -151, -151, -151,
+ -151, -151, -151, -151, -151, -151, -151, -151, -151, -151,
+ -119, -151, -151, -151, -151, 38, -151, -15, 108, -151,
+ -151, -151, -151, -151, -151, -151, -151, -90, -151, -31,
+ -151, -151, -14, -25, -151, -151, -150, -26, -77, -147,
+ 97, -151, -5, -151, -3
+};
+
+/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
+ positive, shift that token. If negative, reduce the rule which
+ number is the opposite. If zero, do what YYDEFACT says.
+ If YYTABLE_NINF, syntax error. */
+#define YYTABLE_NINF -148
+static const yytype_int16 yytable[] =
+{
+ 55, 61, 76, 78, 132, 121, 138, 174, 140, 141,
+ 71, 62, 79, 92, 62, 190, 189, 143, 198, 122,
+ 128, 129, 122, 101, 45, 61, 194, 69, 72, 87,
+ 182, 89, 187, 95, 185, 108, 169, 124, 115, 99,
+ 124, 190, 95, 122, 144, 110, 56, 63, 56, 56,
+ 112, 90, 202, 116, 144, 145, 123, 129, 122, 96,
+ 97, 124, 117, 58, -75, 58, 58, 199, -127, 133,
+ -147, -127, 102, 200, -69, 113, 124, 201, 192, 56,
+ 73, 122, 154, 114, 134, 135, 56, 57, 155, 103,
+ 104, 122, 168, 132, 123, 56, 74, 75, 157, 124,
+ 56, 107, 118, 58, 123, 160, 161, 133, 158, 124,
+ 56, 156, 58, 159, 180, 162, 119, 58, 120, 142,
+ 150, 151, 134, 135, 152, 181, 163, 58, 166, 167,
+ 171, 170, 172, 178, 195, 173, 148, 183, 84, 193,
+ 191, 0, 0, 179, 100, 2, 3, 184, 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, 0, 0, 197, 0, 37, 38, 39, 40, 41,
+ 42, 43, 44, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 45
+};
+
+static const yytype_int16 yycheck[] =
+{
+ 3, 6, 17, 17, 81, 1, 83, 1, 85, 86,
+ 15, 1, 17, 1, 1, 165, 163, 1, 1, 39,
+ 1, 38, 39, 48, 58, 30, 173, 37, 37, 37,
+ 149, 37, 1, 38, 153, 50, 126, 57, 63, 44,
+ 57, 191, 47, 39, 38, 50, 36, 37, 36, 36,
+ 53, 37, 199, 67, 38, 39, 52, 38, 39, 37,
+ 37, 57, 67, 53, 58, 53, 53, 50, 58, 38,
+ 58, 58, 36, 56, 58, 51, 57, 196, 168, 36,
+ 37, 39, 42, 36, 53, 54, 36, 37, 48, 53,
+ 54, 39, 50, 170, 52, 36, 53, 54, 113, 57,
+ 36, 37, 54, 53, 52, 120, 120, 38, 113, 57,
+ 36, 37, 53, 118, 39, 120, 36, 53, 51, 49,
+ 36, 36, 53, 54, 51, 50, 55, 53, 39, 38,
+ 38, 50, 38, 37, 39, 49, 98, 152, 30, 170,
+ 166, -1, -1, 146, 47, 0, 1, 152, 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, -1, -1, 186, -1, 40, 41, 42, 43, 44,
+ 45, 46, 47, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 58
+};
+
+/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
+ symbol of state STATE-NUM. */
+static const yytype_uint8 yystos[] =
+{
+ 0, 60, 0, 1, 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, 40, 41, 42,
+ 43, 44, 45, 46, 47, 58, 61, 62, 63, 64,
+ 65, 67, 70, 71, 113, 113, 36, 37, 53, 86,
+ 87, 111, 1, 37, 95, 101, 102, 103, 111, 37,
+ 94, 111, 37, 37, 53, 54, 86, 100, 101, 111,
+ 72, 73, 75, 74, 87, 76, 77, 37, 92, 37,
+ 37, 85, 1, 80, 109, 111, 37, 37, 66, 111,
+ 109, 102, 36, 53, 54, 110, 112, 37, 86, 88,
+ 111, 68, 113, 51, 36, 102, 101, 111, 54, 36,
+ 51, 1, 39, 52, 57, 96, 97, 107, 1, 38,
+ 98, 99, 107, 38, 53, 54, 93, 108, 107, 91,
+ 107, 107, 49, 1, 38, 39, 81, 82, 84, 78,
+ 36, 36, 51, 89, 42, 48, 37, 86, 111, 111,
+ 86, 101, 111, 55, 105, 106, 39, 38, 50, 96,
+ 50, 38, 38, 49, 1, 79, 83, 84, 37, 113,
+ 39, 50, 79, 86, 111, 79, 69, 1, 104, 108,
+ 105, 106, 96, 98, 108, 39, 90, 113, 1, 50,
+ 56, 79, 108
+};
+
+#define yyerrok (yyerrstatus = 0)
+#define yyclearin (yychar = YYEMPTY)
+#define YYEMPTY (-2)
+#define YYEOF 0
+
+#define YYACCEPT goto yyacceptlab
+#define YYABORT goto yyabortlab
+#define YYERROR goto yyerrorlab
+
+
+/* Like YYERROR except do call yyerror. This remains here temporarily
+ to ease the transition to the new meaning of YYERROR, for GCC.
+ Once GCC version 2 has supplanted version 1, this can go. */
+
+#define YYFAIL goto yyerrlab
+
+#define YYRECOVERING() (!!yyerrstatus)
+
+#define YYBACKUP(Token, Value) \
+do \
+ if (yychar == YYEMPTY && yylen == 1) \
+ { \
+ yychar = (Token); \
+ yylval = (Value); \
+ yytoken = YYTRANSLATE (yychar); \
+ YYPOPSTACK (1); \
+ goto yybackup; \
+ } \
+ else \
+ { \
+ yyerror (YY_("syntax error: cannot back up")); \
+ YYERROR; \
+ } \
+while (YYID (0))
+
+
+#define YYTERROR 1
+#define YYERRCODE 256
+
+
+/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
+ If N is 0, then set CURRENT to the empty location which ends
+ the previous symbol: RHS[0] (always defined). */
+
+#define YYRHSLOC(Rhs, K) ((Rhs)[K])
+#ifndef YYLLOC_DEFAULT
+# define YYLLOC_DEFAULT(Current, Rhs, N) \
+ do \
+ if (YYID (N)) \
+ { \
+ (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
+ (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
+ (Current).last_line = YYRHSLOC (Rhs, N).last_line; \
+ (Current).last_column = YYRHSLOC (Rhs, N).last_column; \
+ } \
+ else \
+ { \
+ (Current).first_line = (Current).last_line = \
+ YYRHSLOC (Rhs, 0).last_line; \
+ (Current).first_column = (Current).last_column = \
+ YYRHSLOC (Rhs, 0).last_column; \
+ } \
+ while (YYID (0))
+#endif
+
+
+/* YY_LOCATION_PRINT -- Print the location on the stream.
+ This macro was not mandated originally: define only if we know
+ we won't break user code: when these are the locations we know. */
+
+#ifndef YY_LOCATION_PRINT
+# if YYLTYPE_IS_TRIVIAL
+# define YY_LOCATION_PRINT(File, Loc) \
+ fprintf (File, "%d.%d-%d.%d", \
+ (Loc).first_line, (Loc).first_column, \
+ (Loc).last_line, (Loc).last_column)
+# else
+# define YY_LOCATION_PRINT(File, Loc) ((void) 0)
+# endif
+#endif
+
+
+/* YYLEX -- calling `yylex' with the right arguments. */
+
+#ifdef YYLEX_PARAM
+# define YYLEX yylex (YYLEX_PARAM)
+#else
+# define YYLEX yylex ()
+#endif
+
+/* Enable debugging if requested. */
+#if YYDEBUG
+
+# ifndef YYFPRINTF
+# include <stdio.h> /* INFRINGES ON USER NAME SPACE */
+# define YYFPRINTF fprintf
+# endif
+
+# define YYDPRINTF(Args) \
+do { \
+ if (yydebug) \
+ YYFPRINTF Args; \
+} while (YYID (0))
+
+# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
+do { \
+ if (yydebug) \
+ { \
+ YYFPRINTF (stderr, "%s ", Title); \
+ yy_symbol_print (stderr, \
+ Type, Value); \
+ YYFPRINTF (stderr, "\n"); \
+ } \
+} while (YYID (0))
+
+
+/*--------------------------------.
+| Print this symbol on YYOUTPUT. |
+`--------------------------------*/
+
+/*ARGSUSED*/
+#if (defined __STDC__ || defined __C99__FUNC__ || defined __cplusplus || defined _MSC_VER)
+static void
+yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
+#else
+static void
+yy_symbol_value_print (yyoutput, yytype, yyvaluep)
+ FILE *yyoutput;
+ int yytype;
+ YYSTYPE const * const yyvaluep;
+#endif
+{
+ if (!yyvaluep)
+ return;
+# ifdef YYPRINT
+ if (yytype < YYNTOKENS)
+ YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
+# else
+ YYUSE (yyoutput);
+# endif
+ switch (yytype)
+ {
+ default:
+ break;
+ }
+}
+
+
+/*--------------------------------.
+| Print this symbol on YYOUTPUT. |
+`--------------------------------*/
+
+#if (defined __STDC__ || defined __C99__FUNC__ || defined __cplusplus || defined _MSC_VER)
+static void
+yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
+#else
+static void
+yy_symbol_print (yyoutput, yytype, yyvaluep)
+ FILE *yyoutput;
+ int yytype;
+ YYSTYPE const * const yyvaluep;
+#endif
+{
+ if (yytype < YYNTOKENS)
+ YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
+ else
+ YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
+
+ yy_symbol_value_print (yyoutput, yytype, yyvaluep);
+ YYFPRINTF (yyoutput, ")");
+}
+
+/*------------------------------------------------------------------.
+| yy_stack_print -- Print the state stack from its BOTTOM up to its |
+| TOP (included). |
+`------------------------------------------------------------------*/
+
+#if (defined __STDC__ || defined __C99__FUNC__ || defined __cplusplus || defined _MSC_VER)
+static void
+yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
+#else
+static void
+yy_stack_print (yybottom, yytop)
+ yytype_int16 *yybottom;
+ yytype_int16 *yytop;
+#endif
+{
+ YYFPRINTF (stderr, "Stack now");
+ for (; yybottom <= yytop; yybottom++)
+ {
+ int yybot = *yybottom;
+ YYFPRINTF (stderr, " %d", yybot);
+ }
+ YYFPRINTF (stderr, "\n");
+}
+
+# define YY_STACK_PRINT(Bottom, Top) \
+do { \
+ if (yydebug) \
+ yy_stack_print ((Bottom), (Top)); \
+} while (YYID (0))
+
+
+/*------------------------------------------------.
+| Report that the YYRULE is going to be reduced. |
+`------------------------------------------------*/
+
+#if (defined __STDC__ || defined __C99__FUNC__ || defined __cplusplus || defined _MSC_VER)
+static void
+yy_reduce_print (YYSTYPE *yyvsp, int yyrule)
+#else
+static void
+yy_reduce_print (yyvsp, yyrule)
+ YYSTYPE *yyvsp;
+ int yyrule;
+#endif
+{
+ int yynrhs = yyr2[yyrule];
+ int yyi;
+ unsigned long int yylno = yyrline[yyrule];
+ YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
+ yyrule - 1, yylno);
+ /* The symbols being reduced. */
+ for (yyi = 0; yyi < yynrhs; yyi++)
+ {
+ YYFPRINTF (stderr, " $%d = ", yyi + 1);
+ yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
+ &(yyvsp[(yyi + 1) - (yynrhs)])
+ );
+ YYFPRINTF (stderr, "\n");
+ }
+}
+
+# define YY_REDUCE_PRINT(Rule) \
+do { \
+ if (yydebug) \
+ yy_reduce_print (yyvsp, Rule); \
+} while (YYID (0))
+
+/* Nonzero means print parse trace. It is left uninitialized so that
+ multiple parsers can coexist. */
+int yydebug;
+#else /* !YYDEBUG */
+# define YYDPRINTF(Args)
+# define YY_SYMBOL_PRINT(Title, Type, Value, Location)
+# define YY_STACK_PRINT(Bottom, Top)
+# define YY_REDUCE_PRINT(Rule)
+#endif /* !YYDEBUG */
+
+
+/* YYINITDEPTH -- initial size of the parser's stacks. */
+#ifndef YYINITDEPTH
+# define YYINITDEPTH 200
+#endif
+
+/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
+ if the built-in stack extension method is used).
+
+ Do not make this value too large; the results are undefined if
+ YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
+ evaluated with infinite-precision integer arithmetic. */
+
+#ifndef YYMAXDEPTH
+# define YYMAXDEPTH 10000
+#endif
+
+
+
+#if YYERROR_VERBOSE
+
+# ifndef yystrlen
+# if defined __GLIBC__ && defined _STRING_H
+# define yystrlen strlen
+# else
+/* Return the length of YYSTR. */
+#if (defined __STDC__ || defined __C99__FUNC__ || defined __cplusplus || defined _MSC_VER)
+static YYSIZE_T
+yystrlen (const char *yystr)
+#else
+static YYSIZE_T
+yystrlen (yystr)
+ const char *yystr;
+#endif
+{
+ YYSIZE_T yylen;
+ for (yylen = 0; yystr[yylen]; yylen++)
+ continue;
+ return yylen;
+}
+# endif
+# endif
+
+# ifndef yystpcpy
+# if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
+# define yystpcpy stpcpy
+# else
+/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
+ YYDEST. */
+#if (defined __STDC__ || defined __C99__FUNC__ || defined __cplusplus || defined _MSC_VER)
+static char *
+yystpcpy (char *yydest, const char *yysrc)
+#else
+static char *
+yystpcpy (yydest, yysrc)
+ char *yydest;
+ const char *yysrc;
+#endif
+{
+ char *yyd = yydest;
+ const char *yys = yysrc;
+
+ while ((*yyd++ = *yys++) != '\0')
+ continue;
+
+ return yyd - 1;
+}
+# endif
+# endif
+
+# ifndef yytnamerr
+/* Copy to YYRES the contents of YYSTR after stripping away unnecessary
+ quotes and backslashes, so that it's suitable for yyerror. The
+ heuristic is that double-quoting is unnecessary unless the string
+ contains an apostrophe, a comma, or backslash (other than
+ backslash-backslash). YYSTR is taken from yytname. If YYRES is
+ null, do not copy; instead, return the length of what the result
+ would have been. */
+static YYSIZE_T
+yytnamerr (char *yyres, const char *yystr)
+{
+ if (*yystr == '"')
+ {
+ YYSIZE_T yyn = 0;
+ char const *yyp = yystr;
+
+ for (;;)
+ switch (*++yyp)
+ {
+ case '\'':
+ case ',':
+ goto do_not_strip_quotes;
+
+ case '\\':
+ if (*++yyp != '\\')
+ goto do_not_strip_quotes;
+ /* Fall through. */
+ default:
+ if (yyres)
+ yyres[yyn] = *yyp;
+ yyn++;
+ break;
+
+ case '"':
+ if (yyres)
+ yyres[yyn] = '\0';
+ return yyn;
+ }
+ do_not_strip_quotes: ;
+ }
+
+ if (! yyres)
+ return yystrlen (yystr);
+
+ return yystpcpy (yyres, yystr) - yyres;
+}
+# endif
+
+/* Copy into YYRESULT an error message about the unexpected token
+ YYCHAR while in state YYSTATE. Return the number of bytes copied,
+ including the terminating null byte. If YYRESULT is null, do not
+ copy anything; just return the number of bytes that would be
+ copied. As a special case, return 0 if an ordinary "syntax error"
+ message will do. Return YYSIZE_MAXIMUM if overflow occurs during
+ size calculation. */
+static YYSIZE_T
+yysyntax_error (char *yyresult, int yystate, int yychar)
+{
+ int yyn = yypact[yystate];
+
+ if (! (YYPACT_NINF < yyn && yyn <= YYLAST))
+ return 0;
+ else
+ {
+ int yytype = YYTRANSLATE (yychar);
+ YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]);
+ YYSIZE_T yysize = yysize0;
+ YYSIZE_T yysize1;
+ int yysize_overflow = 0;
+ enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
+ char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
+ int yyx;
+
+# if 0
+ /* This is so xgettext sees the translatable formats that are
+ constructed on the fly. */
+ YY_("syntax error, unexpected %s");
+ YY_("syntax error, unexpected %s, expecting %s");
+ YY_("syntax error, unexpected %s, expecting %s or %s");
+ YY_("syntax error, unexpected %s, expecting %s or %s or %s");
+ YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s");
+# endif
+ char *yyfmt;
+ char const *yyf;
+ static char const yyunexpected[] = "syntax error, unexpected %s";
+ static char const yyexpecting[] = ", expecting %s";
+ static char const yyor[] = " or %s";
+ char yyformat[sizeof yyunexpected
+ + sizeof yyexpecting - 1
+ + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2)
+ * (sizeof yyor - 1))];
+ char const *yyprefix = yyexpecting;
+
+ /* Start YYX at -YYN if negative to avoid negative indexes in
+ YYCHECK. */
+ int yyxbegin = yyn < 0 ? -yyn : 0;
+
+ /* Stay within bounds of both yycheck and yytname. */
+ int yychecklim = YYLAST - yyn + 1;
+ int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
+ int yycount = 1;
+
+ yyarg[0] = yytname[yytype];
+ yyfmt = yystpcpy (yyformat, yyunexpected);
+
+ for (yyx = yyxbegin; yyx < yyxend; ++yyx)
+ if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
+ {
+ if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
+ {
+ yycount = 1;
+ yysize = yysize0;
+ yyformat[sizeof yyunexpected - 1] = '\0';
+ break;
+ }
+ yyarg[yycount++] = yytname[yyx];
+ yysize1 = yysize + yytnamerr (0, yytname[yyx]);
+ yysize_overflow |= (yysize1 < yysize);
+ yysize = yysize1;
+ yyfmt = yystpcpy (yyfmt, yyprefix);
+ yyprefix = yyor;
+ }
+
+ yyf = YY_(yyformat);
+ yysize1 = yysize + yystrlen (yyf);
+ yysize_overflow |= (yysize1 < yysize);
+ yysize = yysize1;
+
+ if (yysize_overflow)
+ return YYSIZE_MAXIMUM;
+
+ if (yyresult)
+ {
+ /* Avoid sprintf, as that infringes on the user's name space.
+ Don't have undefined behavior even if the translation
+ produced a string with the wrong number of "%s"s. */
+ char *yyp = yyresult;
+ int yyi = 0;
+ while ((*yyp = *yyf) != '\0')
+ {
+ if (*yyp == '%' && yyf[1] == 's' && yyi < yycount)
+ {
+ yyp += yytnamerr (yyp, yyarg[yyi++]);
+ yyf += 2;
+ }
+ else
+ {
+ yyp++;
+ yyf++;
+ }
+ }
+ }
+ return yysize;
+ }
+}
+#endif /* YYERROR_VERBOSE */
+
+
+/*-----------------------------------------------.
+| Release the memory associated to this symbol. |
+`-----------------------------------------------*/
+
+/*ARGSUSED*/
+#if (defined __STDC__ || defined __C99__FUNC__ || defined __cplusplus || defined _MSC_VER)
+static void
+yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep)
+#else
+static void
+yydestruct (yymsg, yytype, yyvaluep)
+ const char *yymsg;
+ int yytype;
+ YYSTYPE *yyvaluep;
+#endif
+{
+ YYUSE (yyvaluep);
+
+ if (!yymsg)
+ yymsg = "Deleting";
+ YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
+
+ switch (yytype)
+ {
+
+ default:
+ break;
+ }
+}
+
+/* Prevent warnings from -Wmissing-prototypes. */
+#ifdef YYPARSE_PARAM
+#if defined __STDC__ || defined __cplusplus
+int yyparse (void *YYPARSE_PARAM);
+#else
+int yyparse ();
+#endif
+#else /* ! YYPARSE_PARAM */
+#if defined __STDC__ || defined __cplusplus
+int yyparse (void);
+#else
+int yyparse ();
+#endif
+#endif /* ! YYPARSE_PARAM */
+
+
+/* The lookahead symbol. */
+int yychar;
+
+/* The semantic value of the lookahead symbol. */
+YYSTYPE yylval;
+
+/* Number of syntax errors so far. */
+int yynerrs;
+
+
+
+/*-------------------------.
+| yyparse or yypush_parse. |
+`-------------------------*/
+
+#ifdef YYPARSE_PARAM
+#if (defined __STDC__ || defined __C99__FUNC__ || defined __cplusplus || defined _MSC_VER)
+int
+yyparse (void *YYPARSE_PARAM)
+#else
+int
+yyparse (YYPARSE_PARAM)
+ void *YYPARSE_PARAM;
+#endif
+#else /* ! YYPARSE_PARAM */
+#if (defined __STDC__ || defined __C99__FUNC__ || defined __cplusplus || defined _MSC_VER)
+int
+yyparse (void)
+#else
+int
+yyparse ()
+
+#endif
+#endif
+{
+
+
+ int yystate;
+ /* Number of tokens to shift before error messages enabled. */
+ int yyerrstatus;
+
+ /* The stacks and their tools:
+ `yyss': related to states.
+ `yyvs': related to semantic values.
+
+ Refer to the stacks thru separate pointers, to allow yyoverflow
+ to reallocate them elsewhere. */
+
+ /* The state stack. */
+ yytype_int16 yyssa[YYINITDEPTH];
+ yytype_int16 *yyss;
+ yytype_int16 *yyssp;
+
+ /* The semantic value stack. */
+ YYSTYPE yyvsa[YYINITDEPTH];
+ YYSTYPE *yyvs;
+ YYSTYPE *yyvsp;
+
+ YYSIZE_T yystacksize;
+
+ int yyn;
+ int yyresult;
+ /* Lookahead token as an internal (translated) token number. */
+ int yytoken;
+ /* The variables used to return semantic value and location from the
+ action routines. */
+ YYSTYPE yyval;
+
+#if YYERROR_VERBOSE
+ /* Buffer for error messages, and its allocated size. */
+ char yymsgbuf[128];
+ char *yymsg = yymsgbuf;
+ YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
+#endif
+
+#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
+
+ /* The number of symbols on the RHS of the reduced rule.
+ Keep to zero when no symbol should be popped. */
+ int yylen = 0;
+
+ yytoken = 0;
+ yyss = yyssa;
+ yyvs = yyvsa;
+ yystacksize = YYINITDEPTH;
+
+ YYDPRINTF ((stderr, "Starting parse\n"));
+
+ yystate = 0;
+ yyerrstatus = 0;
+ yynerrs = 0;
+ yychar = YYEMPTY; /* Cause a token to be read. */
+
+ /* Initialize stack pointers.
+ Waste one element of value and location stack
+ so that they stay on the same level as the state stack.
+ The wasted elements are never initialized. */
+ yyssp = yyss;
+ yyvsp = yyvs;
+
+ goto yysetstate;
+
+/*------------------------------------------------------------.
+| yynewstate -- Push a new state, which is found in yystate. |
+`------------------------------------------------------------*/
+ yynewstate:
+ /* In all cases, when you get here, the value and location stacks
+ have just been pushed. So pushing a state here evens the stacks. */
+ yyssp++;
+
+ yysetstate:
+ *yyssp = yystate;
+
+ if (yyss + yystacksize - 1 <= yyssp)
+ {
+ /* Get the current used size of the three stacks, in elements. */
+ YYSIZE_T yysize = yyssp - yyss + 1;
+
+#ifdef yyoverflow
+ {
+ /* Give user a chance to reallocate the stack. Use copies of
+ these so that the &'s don't force the real ones into
+ memory. */
+ YYSTYPE *yyvs1 = yyvs;
+ yytype_int16 *yyss1 = yyss;
+
+ /* Each stack pointer address is followed by the size of the
+ data in use in that stack, in bytes. This used to be a
+ conditional around just the two extra args, but that might
+ be undefined if yyoverflow is a macro. */
+ yyoverflow (YY_("memory exhausted"),
+ &yyss1, yysize * sizeof (*yyssp),
+ &yyvs1, yysize * sizeof (*yyvsp),
+ &yystacksize);
+
+ yyss = yyss1;
+ yyvs = yyvs1;
+ }
+#else /* no yyoverflow */
+# ifndef YYSTACK_RELOCATE
+ goto yyexhaustedlab;
+# else
+ /* Extend the stack our own way. */
+ if (YYMAXDEPTH <= yystacksize)
+ goto yyexhaustedlab;
+ yystacksize *= 2;
+ if (YYMAXDEPTH < yystacksize)
+ yystacksize = YYMAXDEPTH;
+
+ {
+ yytype_int16 *yyss1 = yyss;
+ union yyalloc *yyptr =
+ (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
+ if (! yyptr)
+ goto yyexhaustedlab;
+ YYSTACK_RELOCATE (yyss_alloc, yyss);
+ YYSTACK_RELOCATE (yyvs_alloc, yyvs);
+# undef YYSTACK_RELOCATE
+ if (yyss1 != yyssa)
+ YYSTACK_FREE (yyss1);
+ }
+# endif
+#endif /* no yyoverflow */
+
+ yyssp = yyss + yysize - 1;
+ yyvsp = yyvs + yysize - 1;
+
+ YYDPRINTF ((stderr, "Stack size increased to %lu\n",
+ (unsigned long int) yystacksize));
+
+ if (yyss + yystacksize - 1 <= yyssp)
+ YYABORT;
+ }
+
+ YYDPRINTF ((stderr, "Entering state %d\n", yystate));
+
+ if (yystate == YYFINAL)
+ YYACCEPT;
+
+ goto yybackup;
+
+/*-----------.
+| yybackup. |
+`-----------*/
+yybackup:
+
+ /* Do appropriate processing given the current state. Read a
+ lookahead token if we need one and don't already have one. */
+
+ /* First try to decide what to do without reference to lookahead token. */
+ yyn = yypact[yystate];
+ if (yyn == YYPACT_NINF)
+ goto yydefault;
+
+ /* Not known => get a lookahead token if don't already have one. */
+
+ /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */
+ if (yychar == YYEMPTY)
+ {
+ YYDPRINTF ((stderr, "Reading a token: "));
+ yychar = YYLEX;
+ }
+
+ if (yychar <= YYEOF)
+ {
+ yychar = yytoken = YYEOF;
+ YYDPRINTF ((stderr, "Now at end of input.\n"));
+ }
+ else
+ {
+ yytoken = YYTRANSLATE (yychar);
+ YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
+ }
+
+ /* If the proper action on seeing token YYTOKEN is to reduce or to
+ detect an error, take that action. */
+ yyn += yytoken;
+ if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
+ goto yydefault;
+ yyn = yytable[yyn];
+ if (yyn <= 0)
+ {
+ if (yyn == 0 || yyn == YYTABLE_NINF)
+ goto yyerrlab;
+ yyn = -yyn;
+ goto yyreduce;
+ }
+
+ /* Count tokens shifted since error; after three, turn off error
+ status. */
+ if (yyerrstatus)
+ yyerrstatus--;
+
+ /* Shift the lookahead token. */
+ YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
+
+ /* Discard the shifted token. */
+ yychar = YYEMPTY;
+
+ yystate = yyn;
+ *++yyvsp = yylval;
+
+ goto yynewstate;
+
+
+/*-----------------------------------------------------------.
+| yydefault -- do the default action for the current state. |
+`-----------------------------------------------------------*/
+yydefault:
+ yyn = yydefact[yystate];
+ if (yyn == 0)
+ goto yyerrlab;
+ goto yyreduce;
+
+
+/*-----------------------------.
+| yyreduce -- Do a reduction. |
+`-----------------------------*/
+yyreduce:
+ /* yyn is the number of a rule to reduce with. */
+ yylen = yyr2[yyn];
+
+ /* If YYLEN is nonzero, implement the default value of the action:
+ `$$ = $1'.
+
+ Otherwise, the following line sets YYVAL to garbage.
+ This behavior is undocumented and Bison
+ users should not rely upon it. Assigning to YYVAL
+ unconditionally makes the parser a bit smaller, and it avoids a
+ GCC warning that YYVAL may be used uninitialized. */
+ yyval = yyvsp[1-yylen];
+
+
+ YY_REDUCE_PRINT (yyn);
+ switch (yyn)
+ {
+ case 3:
+
+/* Line 1455 of yacc.c */
+#line 109 "command.y"
+ {
+ cmd_idx = -1;
+ want_nodeval = FALSE;
+ if (lexptr_begin != NULL) {
+ if (input_from_tty && lexptr_begin[0] != '\0')
+ add_history(lexptr_begin);
+ efree(lexptr_begin);
+ lexptr_begin = NULL;
+ }
+ if (arg_list != NULL) {
+ free_cmdarg(arg_list);
+ arg_list = NULL;
+ }
+ }
+ break;
+
+ case 5:
+
+/* Line 1455 of yacc.c */
+#line 128 "command.y"
+ {
+ if (errcount == 0 && cmd_idx >= 0) {
+ Func_cmd cmdfunc;
+ int terminate = FALSE;
+ CMDARG *args;
+ int ctype = 0;
+
+ ctype = cmdtab[cmd_idx].type;
+
+ /* a blank line repeats previous command
+ * (list, next, nexti, step, stepi and continue without arguments).
+ * save the index in the command table; used in yylex
+ */
+ if ((ctype == D_list
+ || ctype == D_next
+ || ctype == D_step
+ || ctype == D_nexti
+ || ctype == D_stepi
+ || ctype == D_continue)
+ && arg_list == NULL
+ && ! in_commands
+ && input_from_tty
+ )
+ repeat_idx = cmd_idx;
+ else
+ repeat_idx = -1;
+
+ /* call the command handler; reset the globals arg_list, cmd_idx,
+ * since this handler could invoke yyparse again.
+ * call do_commands for the list of commands in `commands';
+ * arg_list isn't freed on return.
+ */
+
+ cmdfunc = cmdtab[cmd_idx].cf_ptr;
+ if (in_commands)
+ cmdfunc = do_commands;
+ cmd_idx = -1;
+ want_nodeval = FALSE;
+
+ args = arg_list;
+ arg_list = NULL;
+
+ terminate = (*cmdfunc)(args, ctype);
+ if (! in_commands || ctype == D_commands)
+ free_cmdarg(args);
+ if (terminate)
+ YYACCEPT;
+ }
+ }
+ break;
+
+ case 6:
+
+/* Line 1455 of yacc.c */
+#line 178 "command.y"
+ {
+ yyerrok;
+ }
+ break;
+
+ case 22:
+
+/* Line 1455 of yacc.c */
+#line 212 "command.y"
+ { want_nodeval = TRUE; }
+ break;
+
+ case 23:
+
+/* Line 1455 of yacc.c */
+#line 217 "command.y"
+ {
+ if (errcount == 0) {
+ /* don't free arg_list; passed on to statement_list
+ * non-terminal (empty rule action). See below.
+ */
+ if (input_from_tty) {
+ dPrompt = eval_Prompt;
+ fprintf(out_fp, _("Type (g)awk statement(s). End with the command \"end\"\n"));
+ rl_inhibit_completion = 1;
+ }
+ cmd_idx = -1;
+ in_eval = TRUE;
+ }
+ }
+ break;
+
+ case 24:
+
+/* Line 1455 of yacc.c */
+#line 235 "command.y"
+ {
+ (yyval) = append_statement(arg_list, (char *) start_EVAL);
+ if (read_a_line == read_commands_string) /* unserializing 'eval' in 'commands' */
+ (yyval)->a_string[0] = '\0';
+ free_cmdarg(arg_list);
+ arg_list = NULL;
+ }
+ break;
+
+ case 25:
+
+/* Line 1455 of yacc.c */
+#line 242 "command.y"
+ { (yyval) = append_statement((yyvsp[(1) - (2)]), lexptr_begin); }
+ break;
+
+ case 26:
+
+/* Line 1455 of yacc.c */
+#line 243 "command.y"
+ {
+ (yyval) = (yyvsp[(3) - (4)]);
+ }
+ break;
+
+ case 27:
+
+/* Line 1455 of yacc.c */
+#line 250 "command.y"
+ {
+ arg_list = append_statement((yyvsp[(2) - (3)]), (char *) end_EVAL);
+ if (read_a_line == read_commands_string) { /* unserializing 'eval' in 'commands' */
+ char *str = arg_list->a_string;
+ size_t len = strlen(str);
+ assert(len > 2 && str[len - 2] == '}');
+ str[len - 2] = '\0';
+ }
+ if (input_from_tty) {
+ dPrompt = in_commands ? commands_Prompt : dgawk_Prompt;
+ rl_inhibit_completion = 0;
+ }
+ cmd_idx = find_command("eval", 4);
+ in_eval = FALSE;
+ }
+ break;
+
+ case 28:
+
+/* Line 1455 of yacc.c */
+#line 266 "command.y"
+ {
+ NODE *n;
+ CMDARG *arg;
+ n = (yyvsp[(3) - (3)])->a_node;
+ arg = append_statement(NULL, (char *) start_EVAL);
+ (void) append_statement(arg, n->stptr);
+ (void) append_statement(arg, (char *) end_EVAL);
+ free_cmdarg(arg_list);
+ arg_list = arg;
+ }
+ break;
+
+ case 34:
+
+/* Line 1455 of yacc.c */
+#line 285 "command.y"
+ {
+ if (cmdtab[cmd_idx].class == D_FRAME
+ && (yyvsp[(2) - (2)]) != NULL && (yyvsp[(2) - (2)])->a_int < 0)
+ yyerror(_("invalid frame number: %d"), (yyvsp[(2) - (2)])->a_int);
+ }
+ break;
+
+ case 35:
+
+/* Line 1455 of yacc.c */
+#line 291 "command.y"
+ {
+ int idx = find_argument((yyvsp[(2) - (2)]));
+ if (idx < 0)
+ yyerror(_("info: invalid option - \"%s\""), (yyvsp[(2) - (2)])->a_string);
+ else {
+ efree((yyvsp[(2) - (2)])->a_string);
+ (yyvsp[(2) - (2)])->a_string = NULL;
+ (yyvsp[(2) - (2)])->type = D_argument;
+ (yyvsp[(2) - (2)])->a_argument = argtab[idx].value;
+ }
+ }
+ break;
+
+ case 38:
+
+/* Line 1455 of yacc.c */
+#line 304 "command.y"
+ { want_nodeval = TRUE; }
+ break;
+
+ case 40:
+
+/* Line 1455 of yacc.c */
+#line 305 "command.y"
+ { want_nodeval = TRUE; }
+ break;
+
+ case 46:
+
+/* Line 1455 of yacc.c */
+#line 310 "command.y"
+ { want_nodeval = TRUE; }
+ break;
+
+ case 49:
+
+/* Line 1455 of yacc.c */
+#line 312 "command.y"
+ { want_nodeval = TRUE; }
+ break;
+
+ case 51:
+
+/* Line 1455 of yacc.c */
+#line 313 "command.y"
+ { want_nodeval = TRUE; }
+ break;
+
+ case 53:
+
+/* Line 1455 of yacc.c */
+#line 314 "command.y"
+ { want_nodeval = TRUE; }
+ break;
+
+ case 57:
+
+/* Line 1455 of yacc.c */
+#line 318 "command.y"
+ {
+ if (in_cmd_src((yyvsp[(2) - (2)])->a_string))
+ yyerror(_("source \"%s\": already sourced."), (yyvsp[(2) - (2)])->a_string);
+ }
+ break;
+
+ case 58:
+
+/* Line 1455 of yacc.c */
+#line 323 "command.y"
+ {
+ if (! input_from_tty)
+ yyerror(_("save \"%s\": command not permitted."), (yyvsp[(2) - (2)])->a_string);
+ }
+ break;
+
+ case 59:
+
+/* Line 1455 of yacc.c */
+#line 328 "command.y"
+ {
+ int type = 0;
+ int num;
+
+ if ((yyvsp[(2) - (2)]) != NULL)
+ num = (yyvsp[(2) - (2)])->a_int;
+
+ if (errcount != 0)
+ ;
+ else if (in_commands)
+ yyerror(_("Can't use command `commands' for breakpoint/watchpoint commands"));
+ else if ((yyvsp[(2) - (2)]) == NULL && ! (type = has_break_or_watch_point(&num, TRUE)))
+ yyerror(_("no breakpoint/watchpoint has been set yet"));
+ else if ((yyvsp[(2) - (2)]) != NULL && ! (type = has_break_or_watch_point(&num, FALSE)))
+ yyerror(_("invalid breakpoint/watchpoint number"));
+ if (type) {
+ in_commands = TRUE;
+ if (input_from_tty) {
+ dPrompt = commands_Prompt;
+ fprintf(out_fp, _("Type commands for when %s %d is hit, one per line.\n"),
+ (type == D_break) ? "breakpoint" : "watchpoint", num);
+ fprintf(out_fp, _("End with the command \"end\"\n"));
+ }
+ }
+ }
+ break;
+
+ case 60:
+
+/* Line 1455 of yacc.c */
+#line 354 "command.y"
+ {
+ if (! in_commands)
+ yyerror(_("`end' valid only in command `commands' or `eval'"));
+ else {
+ if (input_from_tty)
+ dPrompt = dgawk_Prompt;
+ in_commands = FALSE;
+ }
+ }
+ break;
+
+ case 61:
+
+/* Line 1455 of yacc.c */
+#line 364 "command.y"
+ {
+ if (! in_commands)
+ yyerror(_("`silent' valid only in command `commands'"));
+ }
+ break;
+
+ case 62:
+
+/* Line 1455 of yacc.c */
+#line 369 "command.y"
+ {
+ int idx = find_argument((yyvsp[(2) - (2)]));
+ if (idx < 0)
+ yyerror(_("trace: invalid option - \"%s\""), (yyvsp[(2) - (2)])->a_string);
+ else {
+ efree((yyvsp[(2) - (2)])->a_string);
+ (yyvsp[(2) - (2)])->a_string = NULL;
+ (yyvsp[(2) - (2)])->type = D_argument;
+ (yyvsp[(2) - (2)])->a_argument = argtab[idx].value;
+ }
+ }
+ break;
+
+ case 63:
+
+/* Line 1455 of yacc.c */
+#line 380 "command.y"
+ { want_nodeval = TRUE; }
+ break;
+
+ case 64:
+
+/* Line 1455 of yacc.c */
+#line 381 "command.y"
+ {
+ int type;
+ int num = (yyvsp[(2) - (4)])->a_int;
+ type = has_break_or_watch_point(&num, FALSE);
+ if (! type)
+ yyerror(_("condition: invalid breakpoint/watchpoint number"));
+ }
+ break;
+
+ case 65:
+
+/* Line 1455 of yacc.c */
+#line 389 "command.y"
+ {
+ if (in_commands) {
+ /* Prepend command 'eval' to argument list */
+ CMDARG *arg;
+ arg = mk_cmdarg(D_string);
+ arg->a_string = estrdup("eval", 4);
+ arg->next = arg_list;
+ arg_list = arg;
+ }
+ }
+ break;
+
+ case 66:
+
+/* Line 1455 of yacc.c */
+#line 403 "command.y"
+ {
+ if ((yyvsp[(1) - (1)]) != NULL) {
+ NODE *n = (yyvsp[(1) - (1)])->a_node;
+ (yyvsp[(1) - (1)])->type = D_string;
+ (yyvsp[(1) - (1)])->a_string = n->stptr;
+ freenode(n);
+ }
+ (yyval) = (yyvsp[(1) - (1)]);
+ }
+ break;
+
+ case 68:
+
+/* Line 1455 of yacc.c */
+#line 417 "command.y"
+ { (yyval) = NULL; }
+ break;
+
+ case 69:
+
+/* Line 1455 of yacc.c */
+#line 422 "command.y"
+ { (yyval) = NULL; }
+ break;
+
+ case 74:
+
+/* Line 1455 of yacc.c */
+#line 431 "command.y"
+ { (yyval) = NULL; }
+ break;
+
+ case 75:
+
+/* Line 1455 of yacc.c */
+#line 436 "command.y"
+ { (yyval) = NULL; }
+ break;
+
+ case 77:
+
+/* Line 1455 of yacc.c */
+#line 439 "command.y"
+ { (yyval) = NULL; }
+ break;
+
+ case 78:
+
+/* Line 1455 of yacc.c */
+#line 444 "command.y"
+ {
+ NODE *n;
+ n = (yyvsp[(1) - (1)])->a_node;
+ if ((n->flags & STRING) == 0)
+ yyerror(_("argument not a string"));
+ }
+ break;
+
+ case 79:
+
+/* Line 1455 of yacc.c */
+#line 454 "command.y"
+ { (yyval) = NULL; }
+ break;
+
+ case 80:
+
+/* Line 1455 of yacc.c */
+#line 456 "command.y"
+ {
+ if (find_option((yyvsp[(1) - (1)])->a_string) < 0)
+ yyerror(_("option: invalid parameter - \"%s\""), (yyvsp[(1) - (1)])->a_string);
+ }
+ break;
+
+ case 81:
+
+/* Line 1455 of yacc.c */
+#line 461 "command.y"
+ {
+ if (find_option((yyvsp[(1) - (3)])->a_string) < 0)
+ yyerror(_("option: invalid parameter - \"%s\""), (yyvsp[(1) - (3)])->a_string);
+ }
+ break;
+
+ case 82:
+
+/* Line 1455 of yacc.c */
+#line 469 "command.y"
+ {
+ NODE *n;
+ n = lookup((yyvsp[(1) - (1)])->a_string);
+ if (n == NULL || n->type != Node_func)
+ yyerror(_("no such function - \"%s\""), (yyvsp[(1) - (1)])->a_string);
+ else {
+ (yyvsp[(1) - (1)])->type = D_func;
+ efree((yyvsp[(1) - (1)])->a_string);
+ (yyvsp[(1) - (1)])->a_string = NULL;
+ (yyvsp[(1) - (1)])->a_node = n;
+ }
+ }
+ break;
+
+ case 83:
+
+/* Line 1455 of yacc.c */
+#line 485 "command.y"
+ { (yyval) = NULL; }
+ break;
+
+ case 88:
+
+/* Line 1455 of yacc.c */
+#line 494 "command.y"
+ { (yyval) = NULL; }
+ break;
+
+ case 89:
+
+/* Line 1455 of yacc.c */
+#line 495 "command.y"
+ { want_nodeval = TRUE; }
+ break;
+
+ case 92:
+
+/* Line 1455 of yacc.c */
+#line 497 "command.y"
+ { want_nodeval = TRUE; }
+ break;
+
+ case 95:
+
+/* Line 1455 of yacc.c */
+#line 503 "command.y"
+ { (yyval) = NULL; }
+ break;
+
+ case 97:
+
+/* Line 1455 of yacc.c */
+#line 509 "command.y"
+ { (yyval) = NULL; }
+ break;
+
+ case 99:
+
+/* Line 1455 of yacc.c */
+#line 515 "command.y"
+ { (yyval) = NULL; }
+ break;
+
+ case 104:
+
+/* Line 1455 of yacc.c */
+#line 527 "command.y"
+ {
+ int idx = find_argument((yyvsp[(1) - (2)]));
+ if (idx < 0)
+ yyerror(_("enable: invalid option - \"%s\""), (yyvsp[(1) - (2)])->a_string);
+ else {
+ efree((yyvsp[(1) - (2)])->a_string);
+ (yyvsp[(1) - (2)])->a_string = NULL;
+ (yyvsp[(1) - (2)])->type = D_argument;
+ (yyvsp[(1) - (2)])->a_argument = argtab[idx].value;
+ }
+ }
+ break;
+
+ case 106:
+
+/* Line 1455 of yacc.c */
+#line 543 "command.y"
+ {
+ (yyvsp[(2) - (2)])->type = D_array; /* dump all items */
+ (yyvsp[(2) - (2)])->a_count = 0;
+ }
+ break;
+
+ case 107:
+
+/* Line 1455 of yacc.c */
+#line 548 "command.y"
+ {
+ (yyvsp[(2) - (3)])->type = D_array;
+ (yyvsp[(2) - (3)])->a_count = num_dim;
+ }
+ break;
+
+ case 117:
+
+/* Line 1455 of yacc.c */
+#line 574 "command.y"
+ { (yyval) = NULL; }
+ break;
+
+ case 118:
+
+/* Line 1455 of yacc.c */
+#line 576 "command.y"
+ { (yyval) = NULL; }
+ break;
+
+ case 119:
+
+/* Line 1455 of yacc.c */
+#line 578 "command.y"
+ {
+ CMDARG *a;
+ a = mk_cmdarg(D_int);
+ a->a_int = -1;
+ append_cmdarg(a);
+ }
+ break;
+
+ case 126:
+
+/* Line 1455 of yacc.c */
+#line 594 "command.y"
+ {
+ if ((yyvsp[(1) - (3)])->a_int > (yyvsp[(3) - (3)])->a_int)
+ yyerror(_("invalid range specification: %d - %d"),
+ (yyvsp[(1) - (3)])->a_int, (yyvsp[(3) - (3)])->a_int);
+ else
+ (yyvsp[(1) - (3)])->type = D_range;
+ (yyval) = (yyvsp[(1) - (3)]);
+ }
+ break;
+
+ case 127:
+
+/* Line 1455 of yacc.c */
+#line 606 "command.y"
+ { (yyval) = NULL; }
+ break;
+
+ case 134:
+
+/* Line 1455 of yacc.c */
+#line 620 "command.y"
+ { (yyval) = (yyvsp[(1) - (1)]); }
+ break;
+
+ case 135:
+
+/* Line 1455 of yacc.c */
+#line 622 "command.y"
+ { (yyval) = (yyvsp[(1) - (3)]); }
+ break;
+
+ case 137:
+
+/* Line 1455 of yacc.c */
+#line 628 "command.y"
+ {
+ CMDARG *a;
+ NODE *subs;
+ int count = 0;
+
+ for (a = (yyvsp[(2) - (3)]); a != NULL; a = a->next)
+ count++;
+ subs =concat_args((yyvsp[(2) - (3)]), count);
+ free_cmdarg((yyvsp[(2) - (3)])->next);
+ (yyvsp[(2) - (3)])->next = NULL;
+ (yyvsp[(2) - (3)])->type = D_node;
+ (yyvsp[(2) - (3)])->a_node = subs;
+ (yyval) = (yyvsp[(2) - (3)]);
+ }
+ break;
+
+ case 139:
+
+/* Line 1455 of yacc.c */
+#line 647 "command.y"
+ { (yyval) = (yyvsp[(1) - (1)]); num_dim = 1; }
+ break;
+
+ case 140:
+
+/* Line 1455 of yacc.c */
+#line 649 "command.y"
+ { (yyval) = (yyvsp[(1) - (2)]); num_dim++; }
+ break;
+
+ case 142:
+
+/* Line 1455 of yacc.c */
+#line 655 "command.y"
+ {
+ NODE *n = (yyvsp[(2) - (2)])->a_node;
+ if ((n->flags & NUMBER) == 0)
+ yyerror(_("non-numeric value for field number"));
+ else
+ (yyvsp[(2) - (2)])->type = D_field;
+ (yyval) = (yyvsp[(2) - (2)]);
+ }
+ break;
+
+ case 143:
+
+/* Line 1455 of yacc.c */
+#line 664 "command.y"
+ {
+ /* a_string is array name, a_count is dimension count */
+ (yyvsp[(1) - (2)])->type = D_subscript;
+ (yyvsp[(1) - (2)])->a_count = num_dim;
+ (yyval) = (yyvsp[(1) - (2)]);
+ }
+ break;
+
+ case 144:
+
+/* Line 1455 of yacc.c */
+#line 674 "command.y"
+ { (yyval) = (yyvsp[(1) - (1)]); }
+ break;
+
+ case 145:
+
+/* Line 1455 of yacc.c */
+#line 676 "command.y"
+ {
+ NODE *n = (yyvsp[(2) - (2)])->a_node;
+ if ((n->flags & NUMBER) == 0)
+ yyerror(_("non-numeric value found, numeric expected"));
+ (yyval) = (yyvsp[(2) - (2)]);
+ }
+ break;
+
+ case 146:
+
+/* Line 1455 of yacc.c */
+#line 683 "command.y"
+ {
+ NODE *n = (yyvsp[(2) - (2)])->a_node;
+ if ((n->flags & NUMBER) == 0)
+ yyerror(_("non-numeric value found, numeric expected"));
+ else
+ (yyvsp[(2) - (2)])->a_node->numbr = - n->numbr;
+ (yyval) = (yyvsp[(2) - (2)]);
+ }
+ break;
+
+ case 147:
+
+/* Line 1455 of yacc.c */
+#line 695 "command.y"
+ { (yyval) = NULL; }
+ break;
+
+ case 148:
+
+/* Line 1455 of yacc.c */
+#line 697 "command.y"
+ { (yyval) = (yyvsp[(1) - (1)]); }
+ break;
+
+ case 149:
+
+/* Line 1455 of yacc.c */
+#line 702 "command.y"
+ { (yyval) = NULL; }
+ break;
+
+ case 150:
+
+/* Line 1455 of yacc.c */
+#line 704 "command.y"
+ { (yyval) = (yyvsp[(1) - (1)]); }
+ break;
+
+ case 151:
+
+/* Line 1455 of yacc.c */
+#line 709 "command.y"
+ {
+ if ((yyvsp[(1) - (1)])->a_int == 0)
+ yyerror(_("non-zero integer value"));
+ (yyval) = (yyvsp[(1) - (1)]);
+ }
+ break;
+
+ case 152:
+
+/* Line 1455 of yacc.c */
+#line 715 "command.y"
+ {
+ if ((yyvsp[(2) - (2)])->a_int == 0)
+ yyerror(_("non-zero integer value"));
+ (yyval) = (yyvsp[(2) - (2)]);
+ }
+ break;
+
+ case 153:
+
+/* Line 1455 of yacc.c */
+#line 724 "command.y"
+ { (yyval) = (yyvsp[(1) - (1)]); }
+ break;
+
+ case 154:
+
+/* Line 1455 of yacc.c */
+#line 726 "command.y"
+ { (yyval) = (yyvsp[(2) - (2)]); }
+ break;
+
+ case 155:
+
+/* Line 1455 of yacc.c */
+#line 728 "command.y"
+ {
+ (yyvsp[(2) - (2)])->a_int = - (yyvsp[(2) - (2)])->a_int;
+ (yyval) = (yyvsp[(2) - (2)]);
+ }
+ break;
+
+ case 156:
+
+/* Line 1455 of yacc.c */
+#line 736 "command.y"
+ {
+ if (lexptr_begin != NULL) {
+ if (input_from_tty && lexptr_begin[0] != '\0')
+ add_history(lexptr_begin);
+ efree(lexptr_begin);
+ lexptr_begin = NULL;
+ }
+ }
+ break;
+
+
+
+/* Line 1455 of yacc.c */
+#line 2511 "command.c"
+ default: break;
+ }
+ YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
+
+ YYPOPSTACK (yylen);
+ yylen = 0;
+ YY_STACK_PRINT (yyss, yyssp);
+
+ *++yyvsp = yyval;
+
+ /* Now `shift' the result of the reduction. Determine what state
+ that goes to, based on the state we popped back to and the rule
+ number reduced by. */
+
+ yyn = yyr1[yyn];
+
+ yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
+ if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
+ yystate = yytable[yystate];
+ else
+ yystate = yydefgoto[yyn - YYNTOKENS];
+
+ goto yynewstate;
+
+
+/*------------------------------------.
+| yyerrlab -- here on detecting error |
+`------------------------------------*/
+yyerrlab:
+ /* If not already recovering from an error, report this error. */
+ if (!yyerrstatus)
+ {
+ ++yynerrs;
+#if ! YYERROR_VERBOSE
+ yyerror (YY_("syntax error"));
+#else
+ {
+ YYSIZE_T yysize = yysyntax_error (0, yystate, yychar);
+ if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM)
+ {
+ YYSIZE_T yyalloc = 2 * yysize;
+ if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM))
+ yyalloc = YYSTACK_ALLOC_MAXIMUM;
+ if (yymsg != yymsgbuf)
+ YYSTACK_FREE (yymsg);
+ yymsg = (char *) YYSTACK_ALLOC (yyalloc);
+ if (yymsg)
+ yymsg_alloc = yyalloc;
+ else
+ {
+ yymsg = yymsgbuf;
+ yymsg_alloc = sizeof yymsgbuf;
+ }
+ }
+
+ if (0 < yysize && yysize <= yymsg_alloc)
+ {
+ (void) yysyntax_error (yymsg, yystate, yychar);
+ yyerror (yymsg);
+ }
+ else
+ {
+ yyerror (YY_("syntax error"));
+ if (yysize != 0)
+ goto yyexhaustedlab;
+ }
+ }
+#endif
+ }
+
+
+
+ if (yyerrstatus == 3)
+ {
+ /* If just tried and failed to reuse lookahead token after an
+ error, discard it. */
+
+ if (yychar <= YYEOF)
+ {
+ /* Return failure if at end of input. */
+ if (yychar == YYEOF)
+ YYABORT;
+ }
+ else
+ {
+ yydestruct ("Error: discarding",
+ yytoken, &yylval);
+ yychar = YYEMPTY;
+ }
+ }
+
+ /* Else will try to reuse lookahead token after shifting the error
+ token. */
+ goto yyerrlab1;
+
+
+/*---------------------------------------------------.
+| yyerrorlab -- error raised explicitly by YYERROR. |
+`---------------------------------------------------*/
+yyerrorlab:
+
+ /* Pacify compilers like GCC when the user code never invokes
+ YYERROR and the label yyerrorlab therefore never appears in user
+ code. */
+ if (/*CONSTCOND*/ 0)
+ goto yyerrorlab;
+
+ /* Do not reclaim the symbols of the rule which action triggered
+ this YYERROR. */
+ YYPOPSTACK (yylen);
+ yylen = 0;
+ YY_STACK_PRINT (yyss, yyssp);
+ yystate = *yyssp;
+ goto yyerrlab1;
+
+
+/*-------------------------------------------------------------.
+| yyerrlab1 -- common code for both syntax error and YYERROR. |
+`-------------------------------------------------------------*/
+yyerrlab1:
+ yyerrstatus = 3; /* Each real token shifted decrements this. */
+
+ for (;;)
+ {
+ yyn = yypact[yystate];
+ if (yyn != YYPACT_NINF)
+ {
+ yyn += YYTERROR;
+ if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
+ {
+ yyn = yytable[yyn];
+ if (0 < yyn)
+ break;
+ }
+ }
+
+ /* Pop the current state because it cannot handle the error token. */
+ if (yyssp == yyss)
+ YYABORT;
+
+
+ yydestruct ("Error: popping",
+ yystos[yystate], yyvsp);
+ YYPOPSTACK (1);
+ yystate = *yyssp;
+ YY_STACK_PRINT (yyss, yyssp);
+ }
+
+ *++yyvsp = yylval;
+
+
+ /* Shift the error token. */
+ YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
+
+ yystate = yyn;
+ goto yynewstate;
+
+
+/*-------------------------------------.
+| yyacceptlab -- YYACCEPT comes here. |
+`-------------------------------------*/
+yyacceptlab:
+ yyresult = 0;
+ goto yyreturn;
+
+/*-----------------------------------.
+| yyabortlab -- YYABORT comes here. |
+`-----------------------------------*/
+yyabortlab:
+ yyresult = 1;
+ goto yyreturn;
+
+#if !defined(yyoverflow) || YYERROR_VERBOSE
+/*-------------------------------------------------.
+| yyexhaustedlab -- memory exhaustion comes here. |
+`-------------------------------------------------*/
+yyexhaustedlab:
+ yyerror (YY_("memory exhausted"));
+ yyresult = 2;
+ /* Fall through. */
+#endif
+
+yyreturn:
+ if (yychar != YYEMPTY)
+ yydestruct ("Cleanup: discarding lookahead",
+ yytoken, &yylval);
+ /* Do not reclaim the symbols of the rule which action triggered
+ this YYABORT or YYACCEPT. */
+ YYPOPSTACK (yylen);
+ YY_STACK_PRINT (yyss, yyssp);
+ while (yyssp != yyss)
+ {
+ yydestruct ("Cleanup: popping",
+ yystos[*yyssp], yyvsp);
+ YYPOPSTACK (1);
+ }
+#ifndef yyoverflow
+ if (yyss != yyssa)
+ YYSTACK_FREE (yyss);
+#endif
+#if YYERROR_VERBOSE
+ if (yymsg != yymsgbuf)
+ YYSTACK_FREE (yymsg);
+#endif
+ /* Make sure YYID is used. */
+ return YYID (yyresult);
+}
+
+
+
+/* Line 1675 of yacc.c */
+#line 746 "command.y"
+
+
+
+/* append_statement --- append 'stmt' to the list of eval awk statements */
+
+static CMDARG *
+append_statement(CMDARG *alist, char *stmt)
+{
+ CMDARG *a, *arg;
+ char *s;
+ int len, slen, ssize;
+
+#define EVALSIZE 512
+
+ if (stmt == start_EVAL) {
+ len = sizeof(start_EVAL);
+ for (a = alist; a != NULL; a = a->next)
+ len += strlen(a->a_string) + 1; /* 1 for ',' */
+ len += EVALSIZE;
+
+ emalloc(s, char *, (len + 2) * sizeof(char), "append_statement");
+ arg = mk_cmdarg(D_string);
+ arg->a_string = s;
+ arg->a_count = len; /* kludge */
+
+ slen = sizeof("function @eval(") - 1;
+ memcpy(s, start_EVAL, slen);
+
+ for (a = alist; a != NULL; a = a->next) {
+ len = strlen(a->a_string);
+ memcpy(s + slen, a->a_string, len);
+ slen += len;
+ if (a->next != NULL)
+ s[slen++] = ',';
+ }
+ s[slen++] = ')';
+ s[slen++] = '{';
+ s[slen] = '\0';
+ return arg;
+ }
+
+ len = strlen(stmt) + 1; /* 1 for newline */
+ s = alist->a_string;
+ slen = strlen(s);
+ ssize = alist->a_count;
+ if (len > ssize - slen) {
+ ssize = slen + len + EVALSIZE;
+ erealloc(s, char *, (ssize + 2) * sizeof(char), "append_statement");
+ alist->a_string = s;
+ alist->a_count = ssize;
+ }
+ memcpy(s + slen, stmt, len);
+ slen += len;
+ if (slen >= 2 && s[slen - 2] != '\n') {
+ s[slen - 1] = '\n';
+ s[slen] = '\0';
+ }
+
+ if (stmt == end_EVAL)
+ erealloc(alist->a_string, char *, slen + 2, "append_statement");
+ return alist;
+
+#undef EVALSIZE
+}
+
+
+/* command names sorted in ascending order */
+
+struct cmdtoken cmdtab[] = {
+{ "backtrace", "bt", D_backtrace, D_BACKTRACE, do_backtrace,
+ gettext_noop("backtrace [N] - print trace of all or N innermost (outermost if N < 0) frames.") },
+{ "break", "b", D_break, D_BREAK, do_breakpoint,
+ gettext_noop("break [[filename:]N|function] - set breakpoint at the specified location.") },
+{ "clear", "", D_clear, D_CLEAR, do_clear,
+ gettext_noop("clear [[filename:]N|function] - delete breakpoints previously set.") },
+{ "commands", "", D_commands, D_COMMANDS, do_commands,
+ gettext_noop("commands [num] - starts a list of commands to be executed at a breakpoint(watchpoint) hit.") },
+{ "condition", "", D_condition, D_CONDITION, do_condition,
+ gettext_noop("condition num [expr] - set or clear breakpoint or watchpoint condition.") },
+{ "continue", "c", D_continue, D_CONTINUE, do_continue,
+ gettext_noop("continue [COUNT] - continue program being debugged.") },
+{ "delete", "d", D_delete, D_DELETE, do_delete_breakpoint,
+ gettext_noop("delete [breakpoints] [range] - delete specified breakpoints.") },
+{ "disable", "", D_disable, D_DISABLE, do_disable_breakpoint,
+ gettext_noop("disable [breakpoints] [range] - disable specified breakpoints.") },
+{ "display", "", D_display, D_DISPLAY, do_display,
+ gettext_noop("display [var] - print value of variable each time the program stops.") },
+{ "down", "", D_down, D_DOWN, do_down,
+ gettext_noop("down [N] - move N frames down the stack.") },
+{ "dump", "", D_dump, D_DUMP, do_dump_instructions,
+ gettext_noop("dump [filename] - dump instructions to file or stdout.") },
+{ "enable", "e", D_enable, D_ENABLE, do_enable_breakpoint,
+ gettext_noop("enable [once|del] [breakpoints] [range] - enable specified breakpoints.") },
+{ "end", "", D_end, D_END, do_commands,
+ gettext_noop("end - end a list of commands or awk statements.") },
+{ "eval", "", D_eval, D_EVAL, do_eval,
+ gettext_noop("eval stmt|[p1, p2, ...] - evaluate awk statement(s).") },
+{ "finish", "", D_finish, D_FINISH, do_finish,
+ gettext_noop("finish - execute until selected stack frame returns.") },
+{ "frame", "f", D_frame, D_FRAME, do_frame,
+ gettext_noop("frame [N] - select and print stack frame number N.") },
+{ "help", "h", D_help, D_HELP, do_help,
+ gettext_noop("help [command] - print list of commands or explanation of command.") },
+{ "ignore", "", D_ignore, D_IGNORE, do_ignore_breakpoint,
+ gettext_noop("ignore N COUNT - set ignore-count of breakpoint number N to COUNT.") },
+{ "info", "i", D_info, D_INFO, do_info,
+ gettext_noop("info topic - source|sources|variables|functions|break|frame|args|locals|display|watch.") },
+{ "list", "l", D_list, D_LIST, do_list,
+ gettext_noop("list [-|+|[filename:]lineno|function|range] - list specified line(s).") },
+{ "next", "n", D_next, D_NEXT, do_next,
+ gettext_noop("next [COUNT] - step program, proceeding through subroutine calls.") },
+{ "nexti", "ni", D_nexti, D_NEXTI, do_nexti,
+ gettext_noop("nexti [COUNT] - step one instruction, but proceed through subroutine calls.") },
+{ "option", "o", D_option, D_OPTION, do_option,
+ gettext_noop("option [name[=value]] - set or display debugger option(s).") },
+{ "print", "p", D_print, D_PRINT, do_print_var,
+ gettext_noop("print var [var] - print value of a variable or array.") },
+{ "printf", "", D_printf, D_PRINTF, do_print_f,
+ gettext_noop("printf format, [arg], ... - formatted output.") },
+{ "quit", "q", D_quit, D_QUIT, do_quit,
+ gettext_noop("quit - exit debugger.") },
+{ "return", "", D_return, D_RETURN, do_return,
+ gettext_noop("return [value] - make selected stack frame return to its caller.") },
+{ "run", "r", D_run, D_RUN, do_run,
+ gettext_noop("run - start or restart executing program.") },
+#ifdef HAVE_LIBREADLINE
+{ "save", "", D_save, D_SAVE, do_save,
+ gettext_noop("save filename - save commands from the session to file.") },
+#endif
+{ "set", "", D_set, D_SET, do_set_var,
+ gettext_noop("set var = value - assign value to a scalar variable.") },
+{ "silent", "", D_silent, D_SILENT, do_commands,
+ gettext_noop("silent - suspends usual message when stopped at a breakpoint/watchpoint.") },
+{ "source", "", D_source, D_SOURCE, do_source,
+ gettext_noop("source file - execute commands from file.") },
+{ "step", "s", D_step, D_STEP, do_step,
+ gettext_noop("step [COUNT] - step program until it reaches a different source line.") },
+{ "stepi", "si", D_stepi, D_STEPI, do_stepi,
+ gettext_noop("stepi [COUNT] - step one instruction exactly.") },
+{ "tbreak", "t", D_tbreak, D_TBREAK, do_tmp_breakpoint,
+ gettext_noop("tbreak [[filename:]N|function] - set a temporary breakpoint.") },
+{ "trace", "", D_trace, D_TRACE, do_trace_instruction,
+ gettext_noop("trace on|off - print instruction before executing.") },
+{ "undisplay", "", D_undisplay, D_UNDISPLAY, do_undisplay,
+ gettext_noop("undisplay [N] - remove variable(s) from automatic display list.") },
+{ "until", "u", D_until, D_UNTIL, do_until,
+ gettext_noop("until [[filename:]N|function] - execute until program reaches a different line or line N within current frame.") },
+{ "unwatch", "", D_unwatch, D_UNWATCH, do_unwatch,
+ gettext_noop("unwatch [N] - remove variable(s) from watch list.") },
+{ "up", "", D_up, D_UP, do_up,
+ gettext_noop("up [N] - move N frames up the stack.") },
+{ "watch", "w", D_watch, D_WATCH, do_watch,
+ gettext_noop("watch var - set a watchpoint for a variable.") },
+{ NULL, NULL, D_illegal, 0, (Func_cmd) 0,
+ NULL },
+};
+
+struct argtoken argtab[] = {
+ { "args", D_info, A_ARGS },
+ { "break", D_info, A_BREAK },
+ { "del", D_enable, A_DEL },
+ { "display", D_info, A_DISPLAY },
+ { "frame", D_info, A_FRAME },
+ { "functions", D_info, A_FUNCTIONS },
+ { "locals", D_info, A_LOCALS },
+ { "off", D_trace, A_TRACE_OFF },
+ { "on", D_trace, A_TRACE_ON },
+ { "once", D_enable, A_ONCE },
+ { "source", D_info, A_SOURCE },
+ { "sources", D_info, A_SOURCES },
+ { "variables", D_info, A_VARIABLES },
+ { "watch", D_info, A_WATCH },
+ { NULL, D_illegal, 0 },
+};
+
+
+/* get_command --- return command handler function */
+
+Func_cmd
+get_command(int ctype)
+{
+ int i;
+ for (i = 0; cmdtab[i].name != NULL; i++) {
+ if (cmdtab[i].type == ctype)
+ return cmdtab[i].cf_ptr;
+ }
+ return (Func_cmd) 0;
+}
+
+/* get_command_name --- return command name given it's type */
+
+const char *
+get_command_name(int ctype)
+{
+ int i;
+ for (i = 0; cmdtab[i].name != NULL; i++) {
+ if (cmdtab[i].type == ctype)
+ return cmdtab[i].name;
+ }
+ return NULL;
+}
+
+/* mk_cmdarg --- make an argument for command */
+
+static CMDARG *
+mk_cmdarg(enum argtype type)
+{
+ CMDARG *arg;
+ emalloc(arg, CMDARG *, sizeof(CMDARG), "mk_cmdarg");
+ memset(arg, 0, sizeof(CMDARG));
+ arg->type = type;
+ return arg;
+}
+
+/* append_cmdarg --- append ARG to the list of arguments for the current command */
+
+static void
+append_cmdarg(CMDARG *arg)
+{
+ static CMDARG *savetail;
+
+ if (arg_list == NULL)
+ arg_list = arg;
+ else
+ savetail->next = arg;
+ savetail = arg;
+}
+
+/* free_cmdarg --- free all arguments in LIST */
+
+void
+free_cmdarg(CMDARG *list)
+{
+ CMDARG *arg, *nexta;
+
+ for (arg = list; arg != NULL; arg = nexta) {
+ nexta = arg->next;
+
+ switch (arg->type) {
+ case D_variable:
+ case D_subscript:
+ case D_array:
+ case D_string:
+ if (arg->a_string != NULL)
+ efree(arg->a_string);
+ break;
+ case D_node:
+ case D_field:
+ unref(arg->a_node);
+ break;
+ default:
+ break;
+ }
+ efree(arg);
+ }
+}
+
+/* yyerror --- print a syntax error message */
+
+static void
+yyerror(const char *mesg, ...)
+{
+ va_list args;
+ va_start(args, mesg);
+ fprintf(out_fp, _("error: "));
+ vfprintf(out_fp, mesg, args);
+ fprintf(out_fp, "\n");
+ va_end(args);
+ errcount++;
+ repeat_idx = -1;
+}
+
+
+/* yylex --- read a command and turn it into tokens */
+
+static int
+yylex(void)
+{
+ static char *lexptr = NULL;
+ static char *lexend;
+ int c;
+ char *tokstart;
+ size_t toklen;
+
+ yylval = (CMDARG *) NULL;
+
+ if (errcount > 0 && lexptr_begin == NULL) {
+ /* fake a new line */
+ errcount = 0;
+ return '\n';
+ }
+
+ if (lexptr_begin == NULL) {
+again:
+ lexptr_begin = read_a_line(dPrompt);
+ if (lexptr_begin == NULL) { /* EOF or error */
+ if (get_eof_status() == EXIT_FATAL)
+ exit(EXIT_FATAL);
+ if (get_eof_status() == EXIT_FAILURE) {
+ static int seen_eof = 0;
+
+ /* force a quit, and let do_quit (in debug.c) exit */
+ if (! seen_eof) {
+ if (errno != 0) {
+ fprintf(stderr, _("can't read command (%s)"), strerror(errno));
+ exit_val = EXIT_FAILURE;
+ } /* else
+ exit_val = EXIT_SUCCESS; */
+
+ seen_eof = 1;
+ return '\n'; /* end current command if any */
+ } else if (seen_eof++ == 1) {
+ cmd_idx = find_command("quit", 4);
+ return D_QUIT; /* 'quit' token */
+ } else
+ return '\n'; /* end command 'quit' */
+ }
+ if (errno != 0)
+ d_error(_("can't read command (%s)"), strerror(errno));
+ if (pop_cmd_src() == 0)
+ goto again;
+ exit(EXIT_FATAL); /* shouldn't happen */
+ }
+
+ if (! in_commands && ! in_eval /* history expansion off in 'commands' and 'eval' */
+ && input_from_tty
+ )
+ history_expand_line(&lexptr_begin);
+
+ lexptr = lexptr_begin;
+ lexend = lexptr + strlen(lexptr);
+ if (*lexptr == '\0' /* blank line */
+ && repeat_idx >= 0
+ && input_from_tty
+ && ! in_eval
+ ) {
+#ifdef HAVE_LIBREADLINE
+ HIST_ENTRY *h;
+ h = previous_history();
+ if (h != NULL)
+ add_history(h->line);
+#endif
+ cmd_idx = repeat_idx;
+ return cmdtab[cmd_idx].class; /* repeat last command */
+ }
+ repeat_idx = -1;
+ }
+
+ c = *lexptr;
+
+ while (c == ' ' || c == '\t')
+ c = *++lexptr;
+
+ if (! input_from_tty && c == '#')
+ return '\n';
+
+ tokstart = lexptr;
+ if (lexptr >= lexend)
+ return '\n';
+
+ if (cmd_idx < 0) { /* need a command */
+ if (c == '?' && tokstart[1] == '\0' && ! in_eval) {
+ lexptr++;
+ cmd_idx = find_command("help", 4);
+ return D_HELP;
+ }
+
+ while (c != '\0' && c != ' ' && c != '\t') {
+ if (! isalpha(c) && ! in_eval) {
+ yyerror(_("invalid character in command"));
+ return '\n';
+ }
+ c = *++lexptr;
+ }
+
+ toklen = lexptr - tokstart;
+
+ if (in_eval) {
+ if (toklen == 3
+ && tokstart[3] == '\0'
+ && tokstart[0] == 'e'
+ && tokstart[1] == 'n'
+ && tokstart[2] == 'd'
+ ) {
+ cmd_idx = find_command(tokstart, toklen);
+ return D_END;
+ }
+ lexptr = lexend;
+ return D_STATEMENT;
+ }
+
+ cmd_idx = find_command(tokstart, toklen);
+ if (cmd_idx >= 0) {
+ if (in_commands && cmdtab[cmd_idx].type != D_eval) {
+ /* add the actual command string (lexptr_begin) to
+ * arg_list; command string for 'eval' prepended to the arg_list
+ * in the grammer above (see eval_cmd non-terminal).
+ */
+ CMDARG *arg;
+ arg = mk_cmdarg(D_string);
+ arg->a_string = estrdup(lexptr_begin, lexend - lexptr_begin);
+ append_cmdarg(arg);
+ }
+ return cmdtab[cmd_idx].class;
+ } else {
+ yyerror(_("unknown command - \"%.*s\", try help"), toklen, tokstart);
+ return '\n';
+ }
+ }
+
+ c = *lexptr;
+
+ if (cmdtab[cmd_idx].type == D_option) {
+ if (c == '=')
+ return *lexptr++;
+ } else if (c == '-' || c == '+' || c == ':' || c == '|')
+ return *lexptr++;
+
+ if (c == '"') {
+ char *str, *p;
+ int flags = ALREADY_MALLOCED;
+ int esc_seen = FALSE;
+
+ toklen = lexend - lexptr;
+ emalloc(str, char *, toklen + 2, "yylex");
+ p = str;
+
+ while ((c = *++lexptr) != '"') {
+ if (lexptr == lexend) {
+err:
+ efree(str);
+ yyerror(_("unterminated string"));
+ return '\n';
+ }
+ if (c == '\\') {
+ c = *++lexptr;
+ esc_seen = TRUE;
+ if (want_nodeval || c != '"')
+ *p++ = '\\';
+ }
+ if (lexptr == lexend)
+ goto err;
+ *p++ = c;
+ }
+ lexptr++;
+ *p = '\0';
+
+ if (! want_nodeval) {
+ yylval = mk_cmdarg(D_string);
+ yylval->a_string = estrdup(str, p - str);
+ append_cmdarg(yylval);
+ return D_STRING;
+ } else { /* awk string */
+ if (esc_seen)
+ flags |= SCAN;
+ yylval = mk_cmdarg(D_node);
+ yylval->a_node = make_str_node(str, p - str, flags);
+ append_cmdarg(yylval);
+ return D_NODE;
+ }
+ }
+
+ if (! want_nodeval) {
+ while ((c = *++lexptr) != '\0' && c != ':' && c != '-'
+ && c != ' ' && c != '\t' && c != '=')
+ ;
+
+ /* Is it an integer? */
+ if (isdigit(tokstart[0]) && cmdtab[cmd_idx].type != D_option) {
+ char *end;
+ long l;
+
+ errno = 0;
+ l = strtol(tokstart, &end, 0);
+ if (errno != 0) {
+ yyerror(_("%s"), strerror(errno));
+ errno = 0;
+ return '\n';
+ }
+
+ if (lexptr == end) {
+ yylval = mk_cmdarg(D_int);
+ yylval->a_int = l;
+ append_cmdarg(yylval);
+ return D_INT;
+ }
+ }
+
+ /* Must be string */
+ yylval = mk_cmdarg(D_string);
+ yylval->a_string = estrdup(tokstart, lexptr - tokstart);
+ append_cmdarg(yylval);
+ return D_STRING;
+ }
+
+ /* assert(want_nodval == TRUE); */
+
+ /* look for awk number */
+
+ if (isdigit(tokstart[0])) {
+ double d;
+
+ errno = 0;
+ d = strtod(tokstart, &lexptr);
+ if (errno != 0) {
+ yyerror(strerror(errno));
+ errno = 0;
+ return '\n';
+ }
+ yylval = mk_cmdarg(D_node);
+ yylval->a_node = make_number(d);
+ append_cmdarg(yylval);
+ return D_NODE;
+ }
+
+ c = *lexptr;
+ if (c == '$' || c == '@'
+ || c == '[' || c == ']'
+ || c == ',' || c == '=')
+ return *lexptr++;
+
+ if (c != '_' && ! isalpha(c)) {
+ yyerror(_("invalid character"));
+ return '\n';
+ }
+
+ while (isalnum(c) || c == '_')
+ c = *++lexptr;
+ toklen = lexptr - tokstart;
+
+ /* awk variable */
+ yylval = mk_cmdarg(D_variable);
+ yylval->a_string = estrdup(tokstart, toklen);
+ append_cmdarg(yylval);
+ return D_VARIABLE;
+}
+
+/* find_argument --- find index in 'argtab' for a command option */
+
+static int
+find_argument(CMDARG *arg)
+{
+ /* non-number argument */
+ int idx;
+ char *name, *p;
+ size_t len;
+ assert(cmd_idx >= 0);
+ name = arg->a_string;
+ len = strlen(name);
+ for (idx = 0; (p = (char *) argtab[idx].name) != NULL; idx++) {
+ if (cmdtab[cmd_idx].type == argtab[idx].cmd
+ && *p == *name
+ && strlen(p) == len
+ && strncmp(p, name, len) == 0
+ )
+ return idx;
+ }
+ return -1; /* invalid option */
+}
+
+/* concat_args --- concatenate argument strings into a single string NODE */
+
+static NODE *
+concat_args(CMDARG *arg, int count)
+{
+ NODE *n;
+ NODE **tmp;
+ char *str, *subsep, *p;
+ long len, subseplen;
+ int i;
+
+ if (count == 1) {
+ n = force_string(arg->a_node);
+ return dupnode(n);
+ }
+
+ emalloc(tmp, NODE **, count * sizeof(NODE *), "concat_args");
+ subseplen = SUBSEP_node->var_value->stlen;
+ subsep = SUBSEP_node->var_value->stptr;
+ len = -subseplen;
+
+ for (i = 0; i < count; i++) {
+ n = force_string(arg->a_node);
+ len += n->stlen + subseplen;
+ tmp[i] = n;
+ arg = arg->next;
+ }
+
+ emalloc(str, char *, len + 2, "concat_args");
+ n = tmp[0];
+ memcpy(str, n->stptr, n->stlen);
+ p = str + n->stlen;
+ for (i = 1; i < count; i++) {
+ if (subseplen == 1)
+ *p++ = *subsep;
+ else if (subseplen > 0) {
+ memcpy(p, subsep, subseplen);
+ p += subseplen;
+ }
+
+ n = tmp[i];
+ memcpy(p, n->stptr, n->stlen);
+ p += n->stlen;
+ }
+ str[len] = '\0';
+ efree(tmp);
+ return make_str_node(str, len, ALREADY_MALLOCED);
+}
+
+/* find_command --- find the index in 'cmdtab' using exact,
+ * abbreviation or unique partial match
+ */
+
+static int
+find_command(const char *token, size_t toklen)
+{
+ char *name, *abrv;
+ int i, k;
+ int try_exact = TRUE;
+ int abrv_match = -1;
+ int partial_match = -1;
+
+#if 'a' == 0x81 /* it's EBCDIC */
+ /* make sure all lower case characters in token (sorting
+ * isn't the solution in this case)
+ */
+ for (i = 0; i < toklen; i++) {
+ if (token[i] != tolower(token[i]))
+ return -1;
+ }
+#endif
+
+ k = sizeof(cmdtab)/sizeof(cmdtab[0]) - 1;
+ for (i = 0; i < k; i++) {
+ name = (char *) cmdtab[i].name;
+ if (try_exact && *token == *name
+ && toklen == strlen(name)
+ && strncmp(name, token, toklen) == 0
+ )
+ return i;
+ if (*name > *token)
+ try_exact = FALSE;
+ if (abrv_match < 0) {
+ abrv = cmdtab[i].abbrvn;
+ if (abrv[0] == token[0]) {
+ if (toklen == 1 && ! abrv[1])
+ abrv_match = i;
+ else if (toklen == 2 && abrv[1] == token[1])
+ abrv_match = i;
+ }
+ }
+ if (! try_exact && abrv_match >= 0)
+ return abrv_match;
+ if (partial_match < 0) {
+ if (*token == *name
+ && toklen < strlen(name)
+ && strncmp(name, token, toklen) == 0
+ ) {
+ if ((i == k - 1 || strncmp(cmdtab[i + 1].name, token, toklen) != 0)
+ && (i == 0 || strncmp(cmdtab[i - 1].name, token, toklen) != 0)
+ )
+ partial_match = i;
+ }
+ }
+ }
+ return partial_match;
+}
+
+/* do_help -- help command */
+
+int
+do_help(CMDARG *arg, int cmd)
+{
+ int i;
+ if (arg == NULL) {
+ initialize_pager(out_fp);
+ if (setjmp(pager_quit_tag) == 0) {
+ for (i = 0; cmdtab[i].name != NULL; i++) {
+ gprintf(out_fp, "%s:\n", cmdtab[i].name);
+ gprintf(out_fp, "\t%s\n", _(cmdtab[i].help_txt));
+ }
+ }
+ } else if (arg->type == D_string) {
+ char *name;
+ name = arg->a_string;
+ i = find_command(name, strlen(name));
+ if (i >= 0) {
+ fprintf(out_fp, "%s\n", cmdtab[i].help_txt);
+ if (STREQ(cmdtab[i].name, "option"))
+ option_help();
+ } else
+ fprintf(out_fp, _("undefined command: %s\n"), name);
+ }
+
+ return FALSE;
+}
+
+
+/* next_word --- find the next word in a line to complete
+ * (word seperation characters are space and tab).
+ */
+
+static char *
+next_word(char *p, int len, char **endp)
+{
+ char *q;
+ int i;
+
+ if (p == NULL || len <= 0)
+ return NULL;
+ for (i = 0; i < len; i++, p++)
+ if (*p != ' ' && *p != '\t')
+ break;
+ if (i == len)
+ return NULL;
+ if (endp != NULL) {
+ for (i++, q = p + 1; i < len; i++, q++)
+ if (*q == ' ' || *q == '\t')
+ break;
+ *endp = q;
+ }
+ return p;
+}
+
+#ifdef HAVE_LIBREADLINE
+
+/* command_completion --- attempt to complete based on the word number in line;
+ * try to complete on command names if this is the first word; for the next
+ * word(s), the type of completion depends on the command name (first word).
+ */
+
+#ifndef RL_READLINE_VERSION /* < 4.2a */
+#define rl_completion_matches(x, y) completion_matches((char *) (x), (y))
+#endif
+
+
+char **
+command_completion(const char *text, int start, int end)
+{
+ char *cmdtok, *e;
+ int idx;
+ int len;
+
+ rl_attempted_completion_over = TRUE; /* no default filename completion please */
+
+ this_cmd = D_illegal;
+ len = start;
+ if ((cmdtok = next_word(rl_line_buffer, len, &e)) == NULL) /* no first word yet */
+ return rl_completion_matches(text, command_generator);
+ len -= (e - rl_line_buffer);
+
+ idx = find_command(cmdtok, e - cmdtok);
+ if (idx < 0)
+ return NULL;
+ this_cmd = cmdtab[idx].type;
+
+ if (! next_word(e, len, NULL)) {
+ switch (this_cmd) {
+ case D_break:
+ case D_list:
+ case D_until:
+ case D_tbreak:
+ case D_clear:
+ return rl_completion_matches(text, srcfile_generator);
+ case D_info:
+ case D_enable:
+ case D_trace:
+ case D_help:
+ return rl_completion_matches(text, argument_generator);
+ case D_option:
+ return rl_completion_matches(text, option_generator);
+ case D_print:
+ case D_printf:
+ case D_set:
+ case D_display:
+ case D_watch:
+ return rl_completion_matches(text, variable_generator);
+ default:
+ return NULL;
+ }
+ }
+ if (this_cmd == D_print || this_cmd == D_printf)
+ return rl_completion_matches(text, variable_generator);
+ return NULL;
+}
+
+/* command_generator --- generator function for command completion */
+
+static char *
+command_generator(const char *text, int state)
+{
+ static size_t textlen;
+ static int idx = 0;
+ char *name;
+
+ if (! state) { /* first time */
+ textlen = strlen(text);
+ idx = 0;
+ }
+ while ((name = (char *) cmdtab[idx].name) != NULL) {
+ idx++;
+ if (strncmp(name, text, textlen) == 0)
+ return estrdup(name, strlen(name));
+ }
+ return NULL;
+}
+
+/* srcfile_generator --- generator function for source file completion */
+
+static char *
+srcfile_generator(const char *text, int state)
+{
+ static size_t textlen;
+ static SRCFILE *s;
+ char *name;
+ extern SRCFILE *srcfiles;
+
+ if (! state) { /* first time */
+ textlen = strlen(text);
+ s = srcfiles->next;
+ }
+ while (s != srcfiles) {
+ if (s->stype != SRC_FILE && s->stype != SRC_INC) {
+ s = s->next;
+ continue;
+ }
+ name = s->src;
+ s = s->next;
+ if (strncmp(name, text, textlen) == 0)
+ return estrdup(name, strlen(name));
+ }
+ return NULL;
+}
+
+/* argument_generator --- generator function for non-number argument completion */
+
+static char *
+argument_generator(const char *text, int state)
+{
+ static size_t textlen;
+ static int idx;
+ char *name;
+
+ if (! state) { /* first time */
+ textlen = strlen(text);
+ idx = 0;
+ }
+
+ if (this_cmd == D_help) {
+ while ((name = (char *) cmdtab[idx++].name) != NULL) {
+ if (strncmp(name, text, textlen) == 0)
+ return estrdup(name, strlen(name));
+ }
+ } else {
+ while ((name = (char *) argtab[idx].name) != NULL) {
+ if (this_cmd != argtab[idx++].cmd)
+ continue;
+ if (strncmp(name, text, textlen) == 0)
+ return estrdup(name, strlen(name));
+ }
+ }
+ return NULL;
+}
+
+/* variable_generator --- generator function for variable name completion */
+
+static char *
+variable_generator(const char *text, int state)
+{
+ static size_t textlen;
+ static int idx = 0;
+ static char **pnames = NULL;
+ static NODE **var_table = NULL;
+ char *name;
+ NODE *hp;
+
+ if (! state) { /* first time */
+ textlen = strlen(text);
+ if (var_table != NULL)
+ efree(var_table);
+ var_table = get_varlist();
+ idx = 0;
+ pnames = get_parmlist(); /* names of function params in
+ * current context; the array
+ * is NULL terminated in
+ * awkgram.y (func_install).
+ */
+ }
+
+ /* function params */
+ while (pnames != NULL) {
+ name = pnames[idx];
+ if (name == NULL) {
+ pnames = NULL; /* don't try to match params again */
+ idx = 0;
+ break;
+ }
+ idx++;
+ if (strncmp(name, text, textlen) == 0)
+ return estrdup(name, strlen(name));
+ }
+
+ /* globals */
+ while ((hp = var_table[idx]) != NULL) {
+ idx++;
+ if (hp->hvalue->type == Node_func)
+ continue;
+ if (strncmp(hp->hname, text, textlen) == 0)
+ return estrdup(hp->hname, hp->hlength);
+ }
+ return NULL;
+}
+
+/* history_expand_line --- history expand the LINE */
+
+static void
+history_expand_line(char **line)
+{
+ int ret;
+ char *expansion;
+
+ if (! *line || input_fd != 0 || ! input_from_tty)
+ return;
+ using_history();
+ ret = history_expand(*line, &expansion);
+ if (ret < 0 || ret == 2)
+ efree(expansion);
+ else {
+ efree(*line);
+ *line = expansion;
+ }
+}
+
+#endif
+
+
diff --git a/command.y b/command.y
new file mode 100644
index 00000000..6d203b9a
--- /dev/null
+++ b/command.y
@@ -0,0 +1,1680 @@
+/*
+ * command.y - yacc/bison parser for debugger command
+ */
+
+/*
+ * Copyright (C) 2004, 2010 the Free Software Foundation, Inc.
+ *
+ * This file is part of GAWK, the GNU implementation of the
+ * AWK Programming Language.
+ *
+ * GAWK is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * GAWK is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
+ */
+
+%{
+#include "awk.h"
+#include "cmd.h"
+
+#if 0
+#define YYDEBUG 12
+int yydebug = 2;
+#endif
+
+static int yylex(void);
+static void yyerror(const char *mesg, ...);
+
+static int find_command(const char *token, size_t toklen);
+
+static int want_nodeval = FALSE;
+
+static int cmd_idx = -1; /* index of current command in cmd table */
+static int repeat_idx = -1; /* index of last repeatable command in command table */
+static CMDARG *arg_list = NULL; /* list of arguments */
+static long errcount = 0;
+static char *lexptr_begin = NULL;
+static int in_commands = FALSE;
+static int num_dim;
+
+static int in_eval = FALSE;
+static const char start_EVAL[] = "function @eval(){";
+static const char end_EVAL[] = "}";
+static CMDARG *append_statement(CMDARG *alist, char *stmt);
+static char *next_word(char *p, int len, char **endp);
+static NODE *concat_args(CMDARG *a, int count);
+
+#ifdef HAVE_LIBREADLINE
+static void history_expand_line(char **line);
+static char *command_generator(const char *text, int state);
+static char *srcfile_generator(const char *text, int state);
+static char *argument_generator(const char *text, int state);
+static char *variable_generator(const char *text, int state);
+extern char *option_generator(const char *text, int state);
+static int this_cmd = D_illegal;
+#else
+#define history_expand_line(p) /* nothing */
+static int rl_inhibit_completion; /* dummy variable */
+#endif
+
+struct argtoken {
+ const char *name;
+ enum argtype cmd;
+ enum nametypeval value;
+};
+
+/*
+ * These two should be static, but there are some compilers that
+ * don't like the static keyword with an empty size. Therefore give
+ * them names that are less likely to conflict with the rest of gawk.
+ */
+#define argtab zz_debug_argtab
+#define cmdtab zz_debug_cmdtab
+
+extern struct argtoken argtab[];
+extern struct cmdtoken cmdtab[];
+
+static CMDARG *mk_cmdarg(enum argtype type);
+static void append_cmdarg(CMDARG *arg);
+static int find_argument(CMDARG *arg);
+#define YYSTYPE CMDARG *
+%}
+
+%token D_BACKTRACE D_BREAK D_CLEAR D_CONTINUE D_DELETE D_DISABLE D_DOWN
+%token D_ENABLE D_FINISH D_FRAME D_HELP D_IGNORE D_INFO D_LIST
+%token D_NEXT D_NEXTI D_PRINT D_PRINTF D_QUIT D_RETURN D_RUN D_SET
+%token D_STEP D_STEPI D_TBREAK D_UP D_UNTIL
+%token D_DISPLAY D_UNDISPLAY D_WATCH D_UNWATCH
+%token D_DUMP D_TRACE
+%token D_INT D_STRING D_NODE D_VARIABLE
+%token D_OPTION D_COMMANDS D_END D_SILENT D_SOURCE
+%token D_SAVE D_EVAL D_CONDITION
+%token D_STATEMENT
+
+%%
+
+input
+ : /* empty */
+ | input line
+ {
+ cmd_idx = -1;
+ want_nodeval = FALSE;
+ if (lexptr_begin != NULL) {
+ if (input_from_tty && lexptr_begin[0] != '\0')
+ add_history(lexptr_begin);
+ efree(lexptr_begin);
+ lexptr_begin = NULL;
+ }
+ if (arg_list != NULL) {
+ free_cmdarg(arg_list);
+ arg_list = NULL;
+ }
+ }
+ ;
+
+line
+ : nls
+ | command nls
+ {
+ if (errcount == 0 && cmd_idx >= 0) {
+ Func_cmd cmdfunc;
+ int terminate = FALSE;
+ CMDARG *args;
+ int ctype = 0;
+
+ ctype = cmdtab[cmd_idx].type;
+
+ /* a blank line repeats previous command
+ * (list, next, nexti, step, stepi and continue without arguments).
+ * save the index in the command table; used in yylex
+ */
+ if ((ctype == D_list
+ || ctype == D_next
+ || ctype == D_step
+ || ctype == D_nexti
+ || ctype == D_stepi
+ || ctype == D_continue)
+ && arg_list == NULL
+ && ! in_commands
+ && input_from_tty
+ )
+ repeat_idx = cmd_idx;
+ else
+ repeat_idx = -1;
+
+ /* call the command handler; reset the globals arg_list, cmd_idx,
+ * since this handler could invoke yyparse again.
+ * call do_commands for the list of commands in `commands';
+ * arg_list isn't freed on return.
+ */
+
+ cmdfunc = cmdtab[cmd_idx].cf_ptr;
+ if (in_commands)
+ cmdfunc = do_commands;
+ cmd_idx = -1;
+ want_nodeval = FALSE;
+
+ args = arg_list;
+ arg_list = NULL;
+
+ terminate = (*cmdfunc)(args, ctype);
+ if (! in_commands || ctype == D_commands)
+ free_cmdarg(args);
+ if (terminate)
+ YYACCEPT;
+ }
+ }
+ | error nls
+ {
+ yyerrok;
+ }
+ ;
+
+control_cmd
+ : D_CONTINUE
+ | D_NEXT
+ | D_NEXTI
+ | D_STEP
+ | D_STEPI
+ ;
+
+d_cmd
+ : D_UNDISPLAY
+ | D_UNWATCH
+ | D_DISABLE
+ | D_DELETE
+ ;
+
+frame_cmd
+ : D_UP
+ | D_DOWN
+ | D_BACKTRACE
+ | D_FRAME
+ ;
+
+break_cmd
+ : D_BREAK
+ | D_TBREAK
+ ;
+
+/* mid-rule action buried in non-terminal to avoid conflict */
+set_want_nodeval
+ : { want_nodeval = TRUE; }
+ ;
+
+eval_prologue
+ : D_EVAL set_want_nodeval opt_param_list nls
+ {
+ if (errcount == 0) {
+ /* don't free arg_list; passed on to statement_list
+ * non-terminal (empty rule action). See below.
+ */
+ if (input_from_tty) {
+ dPrompt = eval_Prompt;
+ fprintf(out_fp, _("Type (g)awk statement(s). End with the command \"end\"\n"));
+ rl_inhibit_completion = 1;
+ }
+ cmd_idx = -1;
+ in_eval = TRUE;
+ }
+ }
+ ;
+
+statement_list
+ : /* empty */
+ {
+ $$ = append_statement(arg_list, (char *) start_EVAL);
+ if (read_a_line == read_commands_string) /* unserializing 'eval' in 'commands' */
+ $$->a_string[0] = '\0';
+ free_cmdarg(arg_list);
+ arg_list = NULL;
+ }
+ | statement_list D_STATEMENT { $$ = append_statement($1, lexptr_begin); } nls
+ {
+ $$ = $3;
+ }
+ ;
+
+eval_cmd
+ : eval_prologue statement_list D_END
+ {
+ arg_list = append_statement($2, (char *) end_EVAL);
+ if (read_a_line == read_commands_string) { /* unserializing 'eval' in 'commands' */
+ char *str = arg_list->a_string;
+ size_t len = strlen(str);
+ assert(len > 2 && str[len - 2] == '}');
+ str[len - 2] = '\0';
+ }
+ if (input_from_tty) {
+ dPrompt = in_commands ? commands_Prompt : dgawk_Prompt;
+ rl_inhibit_completion = 0;
+ }
+ cmd_idx = find_command("eval", 4);
+ in_eval = FALSE;
+ }
+ | D_EVAL set_want_nodeval string_node
+ {
+ NODE *n;
+ CMDARG *arg;
+ n = $3->a_node;
+ arg = append_statement(NULL, (char *) start_EVAL);
+ (void) append_statement(arg, n->stptr);
+ (void) append_statement(arg, (char *) end_EVAL);
+ free_cmdarg(arg_list);
+ arg_list = arg;
+ }
+ ;
+
+command
+ : D_HELP help_args
+ | D_QUIT
+ | D_RUN
+ | D_FINISH
+ | control_cmd opt_plus_integer
+ | frame_cmd opt_integer
+ {
+ if (cmdtab[cmd_idx].class == D_FRAME
+ && $2 != NULL && $2->a_int < 0)
+ yyerror(_("invalid frame number: %d"), $2->a_int);
+ }
+ | D_INFO D_STRING
+ {
+ int idx = find_argument($2);
+ if (idx < 0)
+ yyerror(_("info: invalid option - \"%s\""), $2->a_string);
+ else {
+ efree($2->a_string);
+ $2->a_string = NULL;
+ $2->type = D_argument;
+ $2->a_argument = argtab[idx].value;
+ }
+ }
+ | D_IGNORE plus_integer D_INT
+ | D_ENABLE enable_args
+ | D_PRINT { want_nodeval = TRUE; } print_args
+ | D_PRINTF { want_nodeval = TRUE; } printf_args
+ | D_LIST list_args
+ | D_UNTIL location
+ | D_CLEAR location
+ | break_cmd break_args
+ | D_SET { want_nodeval = TRUE; } variable '=' node
+ | D_OPTION option_args
+ | D_RETURN { want_nodeval = TRUE; } opt_node
+ | D_DISPLAY { want_nodeval = TRUE; } opt_variable
+ | D_WATCH { want_nodeval = TRUE; } variable condition_exp
+ | d_cmd opt_integer_list
+ | D_DUMP opt_string
+ | D_SOURCE D_STRING
+ {
+ if (in_cmd_src($2->a_string))
+ yyerror(_("source \"%s\": already sourced."), $2->a_string);
+ }
+ | D_SAVE D_STRING
+ {
+ if (! input_from_tty)
+ yyerror(_("save \"%s\": command not permitted."), $2->a_string);
+ }
+ | D_COMMANDS commands_arg
+ {
+ int type = 0;
+ int num;
+
+ if ($2 != NULL)
+ num = $2->a_int;
+
+ if (errcount != 0)
+ ;
+ else if (in_commands)
+ yyerror(_("Can't use command `commands' for breakpoint/watchpoint commands"));
+ else if ($2 == NULL && ! (type = has_break_or_watch_point(&num, TRUE)))
+ yyerror(_("no breakpoint/watchpoint has been set yet"));
+ else if ($2 != NULL && ! (type = has_break_or_watch_point(&num, FALSE)))
+ yyerror(_("invalid breakpoint/watchpoint number"));
+ if (type) {
+ in_commands = TRUE;
+ if (input_from_tty) {
+ dPrompt = commands_Prompt;
+ fprintf(out_fp, _("Type commands for when %s %d is hit, one per line.\n"),
+ (type == D_break) ? "breakpoint" : "watchpoint", num);
+ fprintf(out_fp, _("End with the command \"end\"\n"));
+ }
+ }
+ }
+ | D_END
+ {
+ if (! in_commands)
+ yyerror(_("`end' valid only in command `commands' or `eval'"));
+ else {
+ if (input_from_tty)
+ dPrompt = dgawk_Prompt;
+ in_commands = FALSE;
+ }
+ }
+ | D_SILENT
+ {
+ if (! in_commands)
+ yyerror(_("`silent' valid only in command `commands'"));
+ }
+ | D_TRACE D_STRING
+ {
+ int idx = find_argument($2);
+ if (idx < 0)
+ yyerror(_("trace: invalid option - \"%s\""), $2->a_string);
+ else {
+ efree($2->a_string);
+ $2->a_string = NULL;
+ $2->type = D_argument;
+ $2->a_argument = argtab[idx].value;
+ }
+ }
+ | D_CONDITION plus_integer { want_nodeval = TRUE; } condition_exp
+ {
+ int type;
+ int num = $2->a_int;
+ type = has_break_or_watch_point(&num, FALSE);
+ if (! type)
+ yyerror(_("condition: invalid breakpoint/watchpoint number"));
+ }
+ | eval_cmd
+ {
+ if (in_commands) {
+ /* Prepend command 'eval' to argument list */
+ CMDARG *arg;
+ arg = mk_cmdarg(D_string);
+ arg->a_string = estrdup("eval", 4);
+ arg->next = arg_list;
+ arg_list = arg;
+ }
+ }
+ ;
+
+condition_exp
+ : opt_string_node
+ {
+ if ($1 != NULL) {
+ NODE *n = $1->a_node;
+ $1->type = D_string;
+ $1->a_string = n->stptr;
+ freenode(n);
+ }
+ $$ = $1;
+ }
+ ;
+
+commands_arg
+ : opt_plus_integer
+ | error
+ { $$ = NULL; }
+ ;
+
+opt_param_list
+ : /* empty */
+ { $$ = NULL; }
+ | param_list
+ ;
+
+param_list
+ : D_VARIABLE
+ | param_list D_VARIABLE
+ | param_list ',' D_VARIABLE
+ | error
+ { $$ = NULL; }
+ ;
+
+opt_string_node
+ : /* empty */
+ { $$ = NULL; }
+ | string_node
+ | error
+ { $$ = NULL; }
+ ;
+
+string_node
+ : D_NODE
+ {
+ NODE *n;
+ n = $1->a_node;
+ if ((n->flags & STRING) == 0)
+ yyerror(_("argument not a string"));
+ }
+ ;
+
+option_args
+ : /* empty */
+ { $$ = NULL; }
+ | D_STRING
+ {
+ if (find_option($1->a_string) < 0)
+ yyerror(_("option: invalid parameter - \"%s\""), $1->a_string);
+ }
+ | D_STRING '=' D_STRING
+ {
+ if (find_option($1->a_string) < 0)
+ yyerror(_("option: invalid parameter - \"%s\""), $1->a_string);
+ }
+ ;
+
+func_name
+ : D_STRING
+ {
+ NODE *n;
+ n = lookup($1->a_string);
+ if (n == NULL || n->type != Node_func)
+ yyerror(_("no such function - \"%s\""), $1->a_string);
+ else {
+ $1->type = D_func;
+ efree($1->a_string);
+ $1->a_string = NULL;
+ $1->a_node = n;
+ }
+ }
+ ;
+
+location
+ : /* empty */
+ { $$ = NULL; }
+ | plus_integer
+ | func_name
+ | D_STRING ':' plus_integer
+ | D_STRING ':' func_name
+ ;
+
+break_args
+ : /* empty */
+ { $$ = NULL; }
+ | plus_integer { want_nodeval = TRUE; } condition_exp
+ | func_name
+ | D_STRING ':' plus_integer { want_nodeval = TRUE; } condition_exp
+ | D_STRING ':' func_name
+ ;
+
+opt_variable
+ : /* empty */
+ { $$ = NULL; }
+ | variable
+ ;
+
+opt_string
+ : /* empty */
+ { $$ = NULL; }
+ | D_STRING
+ ;
+
+opt_node
+ : /* empty */
+ { $$ = NULL; }
+ | node
+ ;
+
+help_args
+ : /* empty */
+ | D_STRING
+ ;
+
+enable_args
+ : opt_integer_list
+ | D_STRING opt_integer_list
+ {
+ int idx = find_argument($1);
+ if (idx < 0)
+ yyerror(_("enable: invalid option - \"%s\""), $1->a_string);
+ else {
+ efree($1->a_string);
+ $1->a_string = NULL;
+ $1->type = D_argument;
+ $1->a_argument = argtab[idx].value;
+ }
+ }
+ ;
+
+print_exp
+ : variable
+ | '@' D_VARIABLE
+ {
+ $2->type = D_array; /* dump all items */
+ $2->a_count = 0;
+ }
+ | '@' D_VARIABLE subscript_list /* dump sub-array items*/
+ {
+ $2->type = D_array;
+ $2->a_count = num_dim;
+ }
+ ;
+
+print_args
+ : print_exp
+ | print_args print_exp
+ | print_args ',' print_exp
+ | error
+ ;
+
+printf_exp
+ : D_NODE
+ | variable
+ ;
+
+printf_args
+ : printf_exp
+ | printf_args ',' printf_exp
+ | error
+ ;
+
+list_args
+ : /* empty */
+ { $$ = NULL; }
+ | '+'
+ { $$ = NULL; }
+ | '-'
+ {
+ CMDARG *a;
+ a = mk_cmdarg(D_int);
+ a->a_int = -1;
+ append_cmdarg(a);
+ }
+ | plus_integer
+ | func_name
+ | integer_range
+ | D_STRING ':' plus_integer
+ | D_STRING ':' func_name
+ | D_STRING ':' integer_range
+ ;
+
+integer_range
+ : plus_integer '-' plus_integer
+ {
+ if ($1->a_int > $3->a_int)
+ yyerror(_("invalid range specification: %d - %d"),
+ $1->a_int, $3->a_int);
+ else
+ $1->type = D_range;
+ $$ = $1;
+ }
+ ;
+
+opt_integer_list
+ : /* empty */
+ { $$ = NULL; }
+ | integer_list
+ | error
+ ;
+
+integer_list
+ : plus_integer
+ | integer_range
+ | integer_list plus_integer
+ | integer_list integer_range
+ ;
+
+exp_list
+ : node
+ { $$ = $1; }
+ | exp_list ',' node
+ { $$ = $1; }
+ | error
+ ;
+
+subscript
+ : '[' exp_list ']'
+ {
+ CMDARG *a;
+ NODE *subs;
+ int count = 0;
+
+ for (a = $2; a != NULL; a = a->next)
+ count++;
+ subs =concat_args($2, count);
+ free_cmdarg($2->next);
+ $2->next = NULL;
+ $2->type = D_node;
+ $2->a_node = subs;
+ $$ = $2;
+ }
+ | '[' exp_list error
+ ;
+
+subscript_list
+ : subscript
+ { $$ = $1; num_dim = 1; }
+ | subscript_list subscript
+ { $$ = $1; num_dim++; }
+ ;
+
+variable
+ : D_VARIABLE
+ | '$' D_NODE
+ {
+ NODE *n = $2->a_node;
+ if ((n->flags & NUMBER) == 0)
+ yyerror(_("non-numeric value for field number"));
+ else
+ $2->type = D_field;
+ $$ = $2;
+ }
+ | D_VARIABLE subscript_list
+ {
+ /* a_string is array name, a_count is dimension count */
+ $1->type = D_subscript;
+ $1->a_count = num_dim;
+ $$ = $1;
+ }
+ ;
+
+node
+ : D_NODE
+ { $$ = $1; }
+ | '+' D_NODE
+ {
+ NODE *n = $2->a_node;
+ if ((n->flags & NUMBER) == 0)
+ yyerror(_("non-numeric value found, numeric expected"));
+ $$ = $2;
+ }
+ | '-' D_NODE
+ {
+ NODE *n = $2->a_node;
+ if ((n->flags & NUMBER) == 0)
+ yyerror(_("non-numeric value found, numeric expected"));
+ else
+ $2->a_node->numbr = - n->numbr;
+ $$ = $2;
+ }
+ ;
+
+opt_plus_integer
+ : /* empty */
+ { $$ = NULL; }
+ | plus_integer
+ { $$ = $1; }
+ ;
+
+opt_integer
+ : /* empty */
+ { $$ = NULL; }
+ | integer
+ { $$ = $1; }
+ ;
+
+plus_integer
+ : D_INT
+ {
+ if ($1->a_int == 0)
+ yyerror(_("non-zero integer value"));
+ $$ = $1;
+ }
+ | '+' D_INT
+ {
+ if ($2->a_int == 0)
+ yyerror(_("non-zero integer value"));
+ $$ = $2;
+ }
+ ;
+
+integer
+ : D_INT
+ { $$ = $1; }
+ | '+' D_INT
+ { $$ = $2; }
+ | '-' D_INT
+ {
+ $2->a_int = - $2->a_int;
+ $$ = $2;
+ }
+ ;
+
+nls
+ : '\n'
+ {
+ if (lexptr_begin != NULL) {
+ if (input_from_tty && lexptr_begin[0] != '\0')
+ add_history(lexptr_begin);
+ efree(lexptr_begin);
+ lexptr_begin = NULL;
+ }
+ }
+ ;
+
+%%
+
+
+/* append_statement --- append 'stmt' to the list of eval awk statements */
+
+static CMDARG *
+append_statement(CMDARG *alist, char *stmt)
+{
+ CMDARG *a, *arg;
+ char *s;
+ int len, slen, ssize;
+
+#define EVALSIZE 512
+
+ if (stmt == start_EVAL) {
+ len = sizeof(start_EVAL);
+ for (a = alist; a != NULL; a = a->next)
+ len += strlen(a->a_string) + 1; /* 1 for ',' */
+ len += EVALSIZE;
+
+ emalloc(s, char *, (len + 2) * sizeof(char), "append_statement");
+ arg = mk_cmdarg(D_string);
+ arg->a_string = s;
+ arg->a_count = len; /* kludge */
+
+ slen = sizeof("function @eval(") - 1;
+ memcpy(s, start_EVAL, slen);
+
+ for (a = alist; a != NULL; a = a->next) {
+ len = strlen(a->a_string);
+ memcpy(s + slen, a->a_string, len);
+ slen += len;
+ if (a->next != NULL)
+ s[slen++] = ',';
+ }
+ s[slen++] = ')';
+ s[slen++] = '{';
+ s[slen] = '\0';
+ return arg;
+ }
+
+ len = strlen(stmt) + 1; /* 1 for newline */
+ s = alist->a_string;
+ slen = strlen(s);
+ ssize = alist->a_count;
+ if (len > ssize - slen) {
+ ssize = slen + len + EVALSIZE;
+ erealloc(s, char *, (ssize + 2) * sizeof(char), "append_statement");
+ alist->a_string = s;
+ alist->a_count = ssize;
+ }
+ memcpy(s + slen, stmt, len);
+ slen += len;
+ if (slen >= 2 && s[slen - 2] != '\n') {
+ s[slen - 1] = '\n';
+ s[slen] = '\0';
+ }
+
+ if (stmt == end_EVAL)
+ erealloc(alist->a_string, char *, slen + 2, "append_statement");
+ return alist;
+
+#undef EVALSIZE
+}
+
+
+/* command names sorted in ascending order */
+
+struct cmdtoken cmdtab[] = {
+{ "backtrace", "bt", D_backtrace, D_BACKTRACE, do_backtrace,
+ gettext_noop("backtrace [N] - print trace of all or N innermost (outermost if N < 0) frames.") },
+{ "break", "b", D_break, D_BREAK, do_breakpoint,
+ gettext_noop("break [[filename:]N|function] - set breakpoint at the specified location.") },
+{ "clear", "", D_clear, D_CLEAR, do_clear,
+ gettext_noop("clear [[filename:]N|function] - delete breakpoints previously set.") },
+{ "commands", "", D_commands, D_COMMANDS, do_commands,
+ gettext_noop("commands [num] - starts a list of commands to be executed at a breakpoint(watchpoint) hit.") },
+{ "condition", "", D_condition, D_CONDITION, do_condition,
+ gettext_noop("condition num [expr] - set or clear breakpoint or watchpoint condition.") },
+{ "continue", "c", D_continue, D_CONTINUE, do_continue,
+ gettext_noop("continue [COUNT] - continue program being debugged.") },
+{ "delete", "d", D_delete, D_DELETE, do_delete_breakpoint,
+ gettext_noop("delete [breakpoints] [range] - delete specified breakpoints.") },
+{ "disable", "", D_disable, D_DISABLE, do_disable_breakpoint,
+ gettext_noop("disable [breakpoints] [range] - disable specified breakpoints.") },
+{ "display", "", D_display, D_DISPLAY, do_display,
+ gettext_noop("display [var] - print value of variable each time the program stops.") },
+{ "down", "", D_down, D_DOWN, do_down,
+ gettext_noop("down [N] - move N frames down the stack.") },
+{ "dump", "", D_dump, D_DUMP, do_dump_instructions,
+ gettext_noop("dump [filename] - dump instructions to file or stdout.") },
+{ "enable", "e", D_enable, D_ENABLE, do_enable_breakpoint,
+ gettext_noop("enable [once|del] [breakpoints] [range] - enable specified breakpoints.") },
+{ "end", "", D_end, D_END, do_commands,
+ gettext_noop("end - end a list of commands or awk statements.") },
+{ "eval", "", D_eval, D_EVAL, do_eval,
+ gettext_noop("eval stmt|[p1, p2, ...] - evaluate awk statement(s).") },
+{ "finish", "", D_finish, D_FINISH, do_finish,
+ gettext_noop("finish - execute until selected stack frame returns.") },
+{ "frame", "f", D_frame, D_FRAME, do_frame,
+ gettext_noop("frame [N] - select and print stack frame number N.") },
+{ "help", "h", D_help, D_HELP, do_help,
+ gettext_noop("help [command] - print list of commands or explanation of command.") },
+{ "ignore", "", D_ignore, D_IGNORE, do_ignore_breakpoint,
+ gettext_noop("ignore N COUNT - set ignore-count of breakpoint number N to COUNT.") },
+{ "info", "i", D_info, D_INFO, do_info,
+ gettext_noop("info topic - source|sources|variables|functions|break|frame|args|locals|display|watch.") },
+{ "list", "l", D_list, D_LIST, do_list,
+ gettext_noop("list [-|+|[filename:]lineno|function|range] - list specified line(s).") },
+{ "next", "n", D_next, D_NEXT, do_next,
+ gettext_noop("next [COUNT] - step program, proceeding through subroutine calls.") },
+{ "nexti", "ni", D_nexti, D_NEXTI, do_nexti,
+ gettext_noop("nexti [COUNT] - step one instruction, but proceed through subroutine calls.") },
+{ "option", "o", D_option, D_OPTION, do_option,
+ gettext_noop("option [name[=value]] - set or display debugger option(s).") },
+{ "print", "p", D_print, D_PRINT, do_print_var,
+ gettext_noop("print var [var] - print value of a variable or array.") },
+{ "printf", "", D_printf, D_PRINTF, do_print_f,
+ gettext_noop("printf format, [arg], ... - formatted output.") },
+{ "quit", "q", D_quit, D_QUIT, do_quit,
+ gettext_noop("quit - exit debugger.") },
+{ "return", "", D_return, D_RETURN, do_return,
+ gettext_noop("return [value] - make selected stack frame return to its caller.") },
+{ "run", "r", D_run, D_RUN, do_run,
+ gettext_noop("run - start or restart executing program.") },
+#ifdef HAVE_LIBREADLINE
+{ "save", "", D_save, D_SAVE, do_save,
+ gettext_noop("save filename - save commands from the session to file.") },
+#endif
+{ "set", "", D_set, D_SET, do_set_var,
+ gettext_noop("set var = value - assign value to a scalar variable.") },
+{ "silent", "", D_silent, D_SILENT, do_commands,
+ gettext_noop("silent - suspends usual message when stopped at a breakpoint/watchpoint.") },
+{ "source", "", D_source, D_SOURCE, do_source,
+ gettext_noop("source file - execute commands from file.") },
+{ "step", "s", D_step, D_STEP, do_step,
+ gettext_noop("step [COUNT] - step program until it reaches a different source line.") },
+{ "stepi", "si", D_stepi, D_STEPI, do_stepi,
+ gettext_noop("stepi [COUNT] - step one instruction exactly.") },
+{ "tbreak", "t", D_tbreak, D_TBREAK, do_tmp_breakpoint,
+ gettext_noop("tbreak [[filename:]N|function] - set a temporary breakpoint.") },
+{ "trace", "", D_trace, D_TRACE, do_trace_instruction,
+ gettext_noop("trace on|off - print instruction before executing.") },
+{ "undisplay", "", D_undisplay, D_UNDISPLAY, do_undisplay,
+ gettext_noop("undisplay [N] - remove variable(s) from automatic display list.") },
+{ "until", "u", D_until, D_UNTIL, do_until,
+ gettext_noop("until [[filename:]N|function] - execute until program reaches a different line or line N within current frame.") },
+{ "unwatch", "", D_unwatch, D_UNWATCH, do_unwatch,
+ gettext_noop("unwatch [N] - remove variable(s) from watch list.") },
+{ "up", "", D_up, D_UP, do_up,
+ gettext_noop("up [N] - move N frames up the stack.") },
+{ "watch", "w", D_watch, D_WATCH, do_watch,
+ gettext_noop("watch var - set a watchpoint for a variable.") },
+{ NULL, NULL, D_illegal, 0, (Func_cmd) 0,
+ NULL },
+};
+
+struct argtoken argtab[] = {
+ { "args", D_info, A_ARGS },
+ { "break", D_info, A_BREAK },
+ { "del", D_enable, A_DEL },
+ { "display", D_info, A_DISPLAY },
+ { "frame", D_info, A_FRAME },
+ { "functions", D_info, A_FUNCTIONS },
+ { "locals", D_info, A_LOCALS },
+ { "off", D_trace, A_TRACE_OFF },
+ { "on", D_trace, A_TRACE_ON },
+ { "once", D_enable, A_ONCE },
+ { "source", D_info, A_SOURCE },
+ { "sources", D_info, A_SOURCES },
+ { "variables", D_info, A_VARIABLES },
+ { "watch", D_info, A_WATCH },
+ { NULL, D_illegal, 0 },
+};
+
+
+/* get_command --- return command handler function */
+
+Func_cmd
+get_command(int ctype)
+{
+ int i;
+ for (i = 0; cmdtab[i].name != NULL; i++) {
+ if (cmdtab[i].type == ctype)
+ return cmdtab[i].cf_ptr;
+ }
+ return (Func_cmd) 0;
+}
+
+/* get_command_name --- return command name given it's type */
+
+const char *
+get_command_name(int ctype)
+{
+ int i;
+ for (i = 0; cmdtab[i].name != NULL; i++) {
+ if (cmdtab[i].type == ctype)
+ return cmdtab[i].name;
+ }
+ return NULL;
+}
+
+/* mk_cmdarg --- make an argument for command */
+
+static CMDARG *
+mk_cmdarg(enum argtype type)
+{
+ CMDARG *arg;
+ emalloc(arg, CMDARG *, sizeof(CMDARG), "mk_cmdarg");
+ memset(arg, 0, sizeof(CMDARG));
+ arg->type = type;
+ return arg;
+}
+
+/* append_cmdarg --- append ARG to the list of arguments for the current command */
+
+static void
+append_cmdarg(CMDARG *arg)
+{
+ static CMDARG *savetail;
+
+ if (arg_list == NULL)
+ arg_list = arg;
+ else
+ savetail->next = arg;
+ savetail = arg;
+}
+
+/* free_cmdarg --- free all arguments in LIST */
+
+void
+free_cmdarg(CMDARG *list)
+{
+ CMDARG *arg, *nexta;
+
+ for (arg = list; arg != NULL; arg = nexta) {
+ nexta = arg->next;
+
+ switch (arg->type) {
+ case D_variable:
+ case D_subscript:
+ case D_array:
+ case D_string:
+ if (arg->a_string != NULL)
+ efree(arg->a_string);
+ break;
+ case D_node:
+ case D_field:
+ unref(arg->a_node);
+ break;
+ default:
+ break;
+ }
+ efree(arg);
+ }
+}
+
+/* yyerror --- print a syntax error message */
+
+static void
+yyerror(const char *mesg, ...)
+{
+ va_list args;
+ va_start(args, mesg);
+ fprintf(out_fp, _("error: "));
+ vfprintf(out_fp, mesg, args);
+ fprintf(out_fp, "\n");
+ va_end(args);
+ errcount++;
+ repeat_idx = -1;
+}
+
+
+/* yylex --- read a command and turn it into tokens */
+
+static int
+yylex(void)
+{
+ static char *lexptr = NULL;
+ static char *lexend;
+ int c;
+ char *tokstart;
+ size_t toklen;
+
+ yylval = (CMDARG *) NULL;
+
+ if (errcount > 0 && lexptr_begin == NULL) {
+ /* fake a new line */
+ errcount = 0;
+ return '\n';
+ }
+
+ if (lexptr_begin == NULL) {
+again:
+ lexptr_begin = read_a_line(dPrompt);
+ if (lexptr_begin == NULL) { /* EOF or error */
+ if (get_eof_status() == EXIT_FATAL)
+ exit(EXIT_FATAL);
+ if (get_eof_status() == EXIT_FAILURE) {
+ static int seen_eof = 0;
+
+ /* force a quit, and let do_quit (in debug.c) exit */
+ if (! seen_eof) {
+ if (errno != 0) {
+ fprintf(stderr, _("can't read command (%s)"), strerror(errno));
+ exit_val = EXIT_FAILURE;
+ } /* else
+ exit_val = EXIT_SUCCESS; */
+
+ seen_eof = 1;
+ return '\n'; /* end current command if any */
+ } else if (seen_eof++ == 1) {
+ cmd_idx = find_command("quit", 4);
+ return D_QUIT; /* 'quit' token */
+ } else
+ return '\n'; /* end command 'quit' */
+ }
+ if (errno != 0)
+ d_error(_("can't read command (%s)"), strerror(errno));
+ if (pop_cmd_src() == 0)
+ goto again;
+ exit(EXIT_FATAL); /* shouldn't happen */
+ }
+
+ if (! in_commands && ! in_eval /* history expansion off in 'commands' and 'eval' */
+ && input_from_tty
+ )
+ history_expand_line(&lexptr_begin);
+
+ lexptr = lexptr_begin;
+ lexend = lexptr + strlen(lexptr);
+ if (*lexptr == '\0' /* blank line */
+ && repeat_idx >= 0
+ && input_from_tty
+ && ! in_eval
+ ) {
+#ifdef HAVE_LIBREADLINE
+ HIST_ENTRY *h;
+ h = previous_history();
+ if (h != NULL)
+ add_history(h->line);
+#endif
+ cmd_idx = repeat_idx;
+ return cmdtab[cmd_idx].class; /* repeat last command */
+ }
+ repeat_idx = -1;
+ }
+
+ c = *lexptr;
+
+ while (c == ' ' || c == '\t')
+ c = *++lexptr;
+
+ if (! input_from_tty && c == '#')
+ return '\n';
+
+ tokstart = lexptr;
+ if (lexptr >= lexend)
+ return '\n';
+
+ if (cmd_idx < 0) { /* need a command */
+ if (c == '?' && tokstart[1] == '\0' && ! in_eval) {
+ lexptr++;
+ cmd_idx = find_command("help", 4);
+ return D_HELP;
+ }
+
+ while (c != '\0' && c != ' ' && c != '\t') {
+ if (! isalpha(c) && ! in_eval) {
+ yyerror(_("invalid character in command"));
+ return '\n';
+ }
+ c = *++lexptr;
+ }
+
+ toklen = lexptr - tokstart;
+
+ if (in_eval) {
+ if (toklen == 3
+ && tokstart[3] == '\0'
+ && tokstart[0] == 'e'
+ && tokstart[1] == 'n'
+ && tokstart[2] == 'd'
+ ) {
+ cmd_idx = find_command(tokstart, toklen);
+ return D_END;
+ }
+ lexptr = lexend;
+ return D_STATEMENT;
+ }
+
+ cmd_idx = find_command(tokstart, toklen);
+ if (cmd_idx >= 0) {
+ if (in_commands && cmdtab[cmd_idx].type != D_eval) {
+ /* add the actual command string (lexptr_begin) to
+ * arg_list; command string for 'eval' prepended to the arg_list
+ * in the grammer above (see eval_cmd non-terminal).
+ */
+ CMDARG *arg;
+ arg = mk_cmdarg(D_string);
+ arg->a_string = estrdup(lexptr_begin, lexend - lexptr_begin);
+ append_cmdarg(arg);
+ }
+ return cmdtab[cmd_idx].class;
+ } else {
+ yyerror(_("unknown command - \"%.*s\", try help"), toklen, tokstart);
+ return '\n';
+ }
+ }
+
+ c = *lexptr;
+
+ if (cmdtab[cmd_idx].type == D_option) {
+ if (c == '=')
+ return *lexptr++;
+ } else if (c == '-' || c == '+' || c == ':' || c == '|')
+ return *lexptr++;
+
+ if (c == '"') {
+ char *str, *p;
+ int flags = ALREADY_MALLOCED;
+ int esc_seen = FALSE;
+
+ toklen = lexend - lexptr;
+ emalloc(str, char *, toklen + 2, "yylex");
+ p = str;
+
+ while ((c = *++lexptr) != '"') {
+ if (lexptr == lexend) {
+err:
+ efree(str);
+ yyerror(_("unterminated string"));
+ return '\n';
+ }
+ if (c == '\\') {
+ c = *++lexptr;
+ esc_seen = TRUE;
+ if (want_nodeval || c != '"')
+ *p++ = '\\';
+ }
+ if (lexptr == lexend)
+ goto err;
+ *p++ = c;
+ }
+ lexptr++;
+ *p = '\0';
+
+ if (! want_nodeval) {
+ yylval = mk_cmdarg(D_string);
+ yylval->a_string = estrdup(str, p - str);
+ append_cmdarg(yylval);
+ return D_STRING;
+ } else { /* awk string */
+ if (esc_seen)
+ flags |= SCAN;
+ yylval = mk_cmdarg(D_node);
+ yylval->a_node = make_str_node(str, p - str, flags);
+ append_cmdarg(yylval);
+ return D_NODE;
+ }
+ }
+
+ if (! want_nodeval) {
+ while ((c = *++lexptr) != '\0' && c != ':' && c != '-'
+ && c != ' ' && c != '\t' && c != '=')
+ ;
+
+ /* Is it an integer? */
+ if (isdigit(tokstart[0]) && cmdtab[cmd_idx].type != D_option) {
+ char *end;
+ long l;
+
+ errno = 0;
+ l = strtol(tokstart, &end, 0);
+ if (errno != 0) {
+ yyerror(_("%s"), strerror(errno));
+ errno = 0;
+ return '\n';
+ }
+
+ if (lexptr == end) {
+ yylval = mk_cmdarg(D_int);
+ yylval->a_int = l;
+ append_cmdarg(yylval);
+ return D_INT;
+ }
+ }
+
+ /* Must be string */
+ yylval = mk_cmdarg(D_string);
+ yylval->a_string = estrdup(tokstart, lexptr - tokstart);
+ append_cmdarg(yylval);
+ return D_STRING;
+ }
+
+ /* assert(want_nodval == TRUE); */
+
+ /* look for awk number */
+
+ if (isdigit(tokstart[0])) {
+ double d;
+
+ errno = 0;
+ d = strtod(tokstart, &lexptr);
+ if (errno != 0) {
+ yyerror(strerror(errno));
+ errno = 0;
+ return '\n';
+ }
+ yylval = mk_cmdarg(D_node);
+ yylval->a_node = make_number(d);
+ append_cmdarg(yylval);
+ return D_NODE;
+ }
+
+ c = *lexptr;
+ if (c == '$' || c == '@'
+ || c == '[' || c == ']'
+ || c == ',' || c == '=')
+ return *lexptr++;
+
+ if (c != '_' && ! isalpha(c)) {
+ yyerror(_("invalid character"));
+ return '\n';
+ }
+
+ while (isalnum(c) || c == '_')
+ c = *++lexptr;
+ toklen = lexptr - tokstart;
+
+ /* awk variable */
+ yylval = mk_cmdarg(D_variable);
+ yylval->a_string = estrdup(tokstart, toklen);
+ append_cmdarg(yylval);
+ return D_VARIABLE;
+}
+
+/* find_argument --- find index in 'argtab' for a command option */
+
+static int
+find_argument(CMDARG *arg)
+{
+ /* non-number argument */
+ int idx;
+ char *name, *p;
+ size_t len;
+ assert(cmd_idx >= 0);
+ name = arg->a_string;
+ len = strlen(name);
+ for (idx = 0; (p = (char *) argtab[idx].name) != NULL; idx++) {
+ if (cmdtab[cmd_idx].type == argtab[idx].cmd
+ && *p == *name
+ && strlen(p) == len
+ && strncmp(p, name, len) == 0
+ )
+ return idx;
+ }
+ return -1; /* invalid option */
+}
+
+/* concat_args --- concatenate argument strings into a single string NODE */
+
+static NODE *
+concat_args(CMDARG *arg, int count)
+{
+ NODE *n;
+ NODE **tmp;
+ char *str, *subsep, *p;
+ long len, subseplen;
+ int i;
+
+ if (count == 1) {
+ n = force_string(arg->a_node);
+ return dupnode(n);
+ }
+
+ emalloc(tmp, NODE **, count * sizeof(NODE *), "concat_args");
+ subseplen = SUBSEP_node->var_value->stlen;
+ subsep = SUBSEP_node->var_value->stptr;
+ len = -subseplen;
+
+ for (i = 0; i < count; i++) {
+ n = force_string(arg->a_node);
+ len += n->stlen + subseplen;
+ tmp[i] = n;
+ arg = arg->next;
+ }
+
+ emalloc(str, char *, len + 2, "concat_args");
+ n = tmp[0];
+ memcpy(str, n->stptr, n->stlen);
+ p = str + n->stlen;
+ for (i = 1; i < count; i++) {
+ if (subseplen == 1)
+ *p++ = *subsep;
+ else if (subseplen > 0) {
+ memcpy(p, subsep, subseplen);
+ p += subseplen;
+ }
+
+ n = tmp[i];
+ memcpy(p, n->stptr, n->stlen);
+ p += n->stlen;
+ }
+ str[len] = '\0';
+ efree(tmp);
+ return make_str_node(str, len, ALREADY_MALLOCED);
+}
+
+/* find_command --- find the index in 'cmdtab' using exact,
+ * abbreviation or unique partial match
+ */
+
+static int
+find_command(const char *token, size_t toklen)
+{
+ char *name, *abrv;
+ int i, k;
+ int try_exact = TRUE;
+ int abrv_match = -1;
+ int partial_match = -1;
+
+#if 'a' == 0x81 /* it's EBCDIC */
+ /* make sure all lower case characters in token (sorting
+ * isn't the solution in this case)
+ */
+ for (i = 0; i < toklen; i++) {
+ if (token[i] != tolower(token[i]))
+ return -1;
+ }
+#endif
+
+ k = sizeof(cmdtab)/sizeof(cmdtab[0]) - 1;
+ for (i = 0; i < k; i++) {
+ name = (char *) cmdtab[i].name;
+ if (try_exact && *token == *name
+ && toklen == strlen(name)
+ && strncmp(name, token, toklen) == 0
+ )
+ return i;
+ if (*name > *token)
+ try_exact = FALSE;
+ if (abrv_match < 0) {
+ abrv = cmdtab[i].abbrvn;
+ if (abrv[0] == token[0]) {
+ if (toklen == 1 && ! abrv[1])
+ abrv_match = i;
+ else if (toklen == 2 && abrv[1] == token[1])
+ abrv_match = i;
+ }
+ }
+ if (! try_exact && abrv_match >= 0)
+ return abrv_match;
+ if (partial_match < 0) {
+ if (*token == *name
+ && toklen < strlen(name)
+ && strncmp(name, token, toklen) == 0
+ ) {
+ if ((i == k - 1 || strncmp(cmdtab[i + 1].name, token, toklen) != 0)
+ && (i == 0 || strncmp(cmdtab[i - 1].name, token, toklen) != 0)
+ )
+ partial_match = i;
+ }
+ }
+ }
+ return partial_match;
+}
+
+/* do_help -- help command */
+
+int
+do_help(CMDARG *arg, int cmd)
+{
+ int i;
+ if (arg == NULL) {
+ initialize_pager(out_fp);
+ if (setjmp(pager_quit_tag) == 0) {
+ for (i = 0; cmdtab[i].name != NULL; i++) {
+ gprintf(out_fp, "%s:\n", cmdtab[i].name);
+ gprintf(out_fp, "\t%s\n", _(cmdtab[i].help_txt));
+ }
+ }
+ } else if (arg->type == D_string) {
+ char *name;
+ name = arg->a_string;
+ i = find_command(name, strlen(name));
+ if (i >= 0) {
+ fprintf(out_fp, "%s\n", cmdtab[i].help_txt);
+ if (STREQ(cmdtab[i].name, "option"))
+ option_help();
+ } else
+ fprintf(out_fp, _("undefined command: %s\n"), name);
+ }
+
+ return FALSE;
+}
+
+
+/* next_word --- find the next word in a line to complete
+ * (word seperation characters are space and tab).
+ */
+
+static char *
+next_word(char *p, int len, char **endp)
+{
+ char *q;
+ int i;
+
+ if (p == NULL || len <= 0)
+ return NULL;
+ for (i = 0; i < len; i++, p++)
+ if (*p != ' ' && *p != '\t')
+ break;
+ if (i == len)
+ return NULL;
+ if (endp != NULL) {
+ for (i++, q = p + 1; i < len; i++, q++)
+ if (*q == ' ' || *q == '\t')
+ break;
+ *endp = q;
+ }
+ return p;
+}
+
+#ifdef HAVE_LIBREADLINE
+
+/* command_completion --- attempt to complete based on the word number in line;
+ * try to complete on command names if this is the first word; for the next
+ * word(s), the type of completion depends on the command name (first word).
+ */
+
+#ifndef RL_READLINE_VERSION /* < 4.2a */
+#define rl_completion_matches(x, y) completion_matches((char *) (x), (y))
+#endif
+
+
+char **
+command_completion(const char *text, int start, int end)
+{
+ char *cmdtok, *e;
+ int idx;
+ int len;
+
+ rl_attempted_completion_over = TRUE; /* no default filename completion please */
+
+ this_cmd = D_illegal;
+ len = start;
+ if ((cmdtok = next_word(rl_line_buffer, len, &e)) == NULL) /* no first word yet */
+ return rl_completion_matches(text, command_generator);
+ len -= (e - rl_line_buffer);
+
+ idx = find_command(cmdtok, e - cmdtok);
+ if (idx < 0)
+ return NULL;
+ this_cmd = cmdtab[idx].type;
+
+ if (! next_word(e, len, NULL)) {
+ switch (this_cmd) {
+ case D_break:
+ case D_list:
+ case D_until:
+ case D_tbreak:
+ case D_clear:
+ return rl_completion_matches(text, srcfile_generator);
+ case D_info:
+ case D_enable:
+ case D_trace:
+ case D_help:
+ return rl_completion_matches(text, argument_generator);
+ case D_option:
+ return rl_completion_matches(text, option_generator);
+ case D_print:
+ case D_printf:
+ case D_set:
+ case D_display:
+ case D_watch:
+ return rl_completion_matches(text, variable_generator);
+ default:
+ return NULL;
+ }
+ }
+ if (this_cmd == D_print || this_cmd == D_printf)
+ return rl_completion_matches(text, variable_generator);
+ return NULL;
+}
+
+/* command_generator --- generator function for command completion */
+
+static char *
+command_generator(const char *text, int state)
+{
+ static size_t textlen;
+ static int idx = 0;
+ char *name;
+
+ if (! state) { /* first time */
+ textlen = strlen(text);
+ idx = 0;
+ }
+ while ((name = (char *) cmdtab[idx].name) != NULL) {
+ idx++;
+ if (strncmp(name, text, textlen) == 0)
+ return estrdup(name, strlen(name));
+ }
+ return NULL;
+}
+
+/* srcfile_generator --- generator function for source file completion */
+
+static char *
+srcfile_generator(const char *text, int state)
+{
+ static size_t textlen;
+ static SRCFILE *s;
+ char *name;
+ extern SRCFILE *srcfiles;
+
+ if (! state) { /* first time */
+ textlen = strlen(text);
+ s = srcfiles->next;
+ }
+ while (s != srcfiles) {
+ if (s->stype != SRC_FILE && s->stype != SRC_INC) {
+ s = s->next;
+ continue;
+ }
+ name = s->src;
+ s = s->next;
+ if (strncmp(name, text, textlen) == 0)
+ return estrdup(name, strlen(name));
+ }
+ return NULL;
+}
+
+/* argument_generator --- generator function for non-number argument completion */
+
+static char *
+argument_generator(const char *text, int state)
+{
+ static size_t textlen;
+ static int idx;
+ char *name;
+
+ if (! state) { /* first time */
+ textlen = strlen(text);
+ idx = 0;
+ }
+
+ if (this_cmd == D_help) {
+ while ((name = (char *) cmdtab[idx++].name) != NULL) {
+ if (strncmp(name, text, textlen) == 0)
+ return estrdup(name, strlen(name));
+ }
+ } else {
+ while ((name = (char *) argtab[idx].name) != NULL) {
+ if (this_cmd != argtab[idx++].cmd)
+ continue;
+ if (strncmp(name, text, textlen) == 0)
+ return estrdup(name, strlen(name));
+ }
+ }
+ return NULL;
+}
+
+/* variable_generator --- generator function for variable name completion */
+
+static char *
+variable_generator(const char *text, int state)
+{
+ static size_t textlen;
+ static int idx = 0;
+ static char **pnames = NULL;
+ static NODE **var_table = NULL;
+ char *name;
+ NODE *hp;
+
+ if (! state) { /* first time */
+ textlen = strlen(text);
+ if (var_table != NULL)
+ efree(var_table);
+ var_table = get_varlist();
+ idx = 0;
+ pnames = get_parmlist(); /* names of function params in
+ * current context; the array
+ * is NULL terminated in
+ * awkgram.y (func_install).
+ */
+ }
+
+ /* function params */
+ while (pnames != NULL) {
+ name = pnames[idx];
+ if (name == NULL) {
+ pnames = NULL; /* don't try to match params again */
+ idx = 0;
+ break;
+ }
+ idx++;
+ if (strncmp(name, text, textlen) == 0)
+ return estrdup(name, strlen(name));
+ }
+
+ /* globals */
+ while ((hp = var_table[idx]) != NULL) {
+ idx++;
+ if (hp->hvalue->type == Node_func)
+ continue;
+ if (strncmp(hp->hname, text, textlen) == 0)
+ return estrdup(hp->hname, hp->hlength);
+ }
+ return NULL;
+}
+
+/* history_expand_line --- history expand the LINE */
+
+static void
+history_expand_line(char **line)
+{
+ int ret;
+ char *expansion;
+
+ if (! *line || input_fd != 0 || ! input_from_tty)
+ return;
+ using_history();
+ ret = history_expand(*line, &expansion);
+ if (ret < 0 || ret == 2)
+ efree(expansion);
+ else {
+ efree(*line);
+ *line = expansion;
+ }
+}
+
+#endif
+
diff --git a/configh.in b/configh.in
index b44ae1d8..edcef5f0 100644
--- a/configh.in
+++ b/configh.in
@@ -103,6 +103,9 @@
/* Define to 1 if you have the `m' library (-lm). */
#undef HAVE_LIBM
+/* Define to 1 if you have a fully functional readline library. */
+#undef HAVE_LIBREADLINE
+
/* Define if you have the sigsegv library. */
#undef HAVE_LIBSIGSEGV
@@ -160,8 +163,8 @@
/* Define to 1 if you have the <netinet/in.h> header file. */
#undef HAVE_NETINET_IN_H
-/* we have portals on /p on this system */
-#undef HAVE_PORTALS
+/* Define to 1 if you have the `setenv' function. */
+#undef HAVE_SETENV
/* Define to 1 if you have the `setlocale' function. */
#undef HAVE_SETLOCALE
diff --git a/configure b/configure
index e084dc92..25e74436 100755
--- a/configure
+++ b/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.65 for GNU Awk 3.1.70.
+# Generated by GNU Autoconf 2.65 for GNU Awk 3.1.76.
#
# Report bugs to <bug-gawk@gnu.org>.
#
@@ -552,8 +552,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='GNU Awk'
PACKAGE_TARNAME='gawk'
-PACKAGE_VERSION='3.1.70'
-PACKAGE_STRING='GNU Awk 3.1.70'
+PACKAGE_VERSION='3.1.76'
+PACKAGE_STRING='GNU Awk 3.1.76'
PACKAGE_BUGREPORT='bug-gawk@gnu.org'
PACKAGE_URL='http://www.gnu.org/software/gawk/'
@@ -599,6 +599,7 @@ ac_func_list=
ac_subst_vars='am__EXEEXT_FALSE
am__EXEEXT_TRUE
LTLIBOBJS
+LIBREADLINE
SOCKET_LIBS
LIBSIGSEGV_PREFIX
LTLIBSIGSEGV
@@ -718,7 +719,6 @@ SHELL'
ac_subst_files=''
ac_user_opts='
enable_option_checking
-enable_portals
with_whiny_user_strftime
enable_lint
enable_dependency_tracking
@@ -729,6 +729,7 @@ enable_rpath
with_libiconv_prefix
with_libintl_prefix
with_libsigsegv_prefix
+with_readline
'
ac_precious_vars='build_alias
host_alias
@@ -1282,7 +1283,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures GNU Awk 3.1.70 to adapt to many kinds of systems.
+\`configure' configures GNU Awk 3.1.76 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1352,7 +1353,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of GNU Awk 3.1.70:";;
+ short | recursive ) echo "Configuration of GNU Awk 3.1.76:";;
esac
cat <<\_ACEOF
@@ -1360,7 +1361,6 @@ Optional Features:
--disable-option-checking ignore unrecognized --enable/--with options
--disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
--enable-FEATURE[=ARG] include FEATURE [ARG=yes]
- --enable-portals Enable /p as path prefix for portals
--disable-lint Disable gawk lint checking
--disable-dependency-tracking speeds up one-time build
--enable-dependency-tracking do not reject slow dependency extractors
@@ -1379,6 +1379,7 @@ Optional Packages:
--without-libintl-prefix don't search for libintl in includedir and libdir
--with-libsigsegv-prefix[=DIR] search for libsigsegv in DIR/include and DIR/lib
--without-libsigsegv-prefix don't search for libsigsegv in includedir and libdir
+ --with-readline=DIR look for the readline library in DIR
Some influential environment variables:
CC C compiler command
@@ -1463,7 +1464,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-GNU Awk configure 3.1.70
+GNU Awk configure 3.1.76
generated by GNU Autoconf 2.65
Copyright (C) 2009 Free Software Foundation, Inc.
@@ -2162,7 +2163,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by GNU Awk $as_me 3.1.70, which was
+It was created by GNU Awk $as_me 3.1.76, which was
generated by GNU Autoconf 2.65. Invocation command line was
$ $0 $@
@@ -2990,7 +2991,7 @@ fi
# Define the identity of the package.
PACKAGE='gawk'
- VERSION='3.1.70'
+ VERSION='3.1.76'
cat >>confdefs.h <<_ACEOF
@@ -3033,17 +3034,6 @@ am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'
-# Check whether --enable-portals was given.
-if test "${enable_portals+set}" = set; then :
- enableval=$enable_portals; if test "$enableval" = yes
- then
-
-$as_echo "#define HAVE_PORTALS 1" >>confdefs.h
-
- fi
-
-fi
-
# Check whether --with-whiny-user-strftime was given.
if test "${with_whiny_user_strftime+set}" = set; then :
@@ -5505,8 +5495,8 @@ $as_echo_n "checking for z/OS USS compilation... " >&6; }
if test "OS/390" = "`uname`"
then
CFLAGS="$CFLAGS -D_ALL_SOURCE -DZOS_USS -DUSE_EBCDIC"
- # Must rebuild awkgram.c from Bison for EBCDIC
- rm -f awkgram.c
+ # Must rebuild awkgram.c and command.c from Bison for EBCDIC
+ rm -f awkgram.c command.c
ac_cv_zos_uss=yes
else
ac_cv_zos_uss=no
@@ -9756,7 +9746,7 @@ esac
for ac_func in atexit btowc fmod getgrent getgroups grantpt \
isascii iswctype iswlower iswupper mbrlen \
memcmp memcpy memcpy_ulong memmove memset \
- memset_ulong mkstemp setlocale snprintf strchr \
+ memset_ulong mkstemp setenv setlocale snprintf strchr \
strerror strftime strncasecmp strtod strtoul \
system tmpfile towlower towupper tzset usleep wcrtomb \
wcscoll wcscoll wctype
@@ -10122,6 +10112,82 @@ $as_echo "#define HAVE_SOCKETS 1" >>confdefs.h
fi
+
+
+# Check whether --with-readline was given.
+if test "${with_readline+set}" = set; then :
+ withval=$with_readline; _do_readline=$withval
+else
+ _do_readline=yes
+fi
+
+
+ if test "$_do_readline" != "no" ; then
+ if test -d "$withval" ; then
+ CPPFLAGS="${CPPFLAGS} -I$withval/include"
+ LDFLAGS="${LDFLAGS} -L$withval/lib"
+ fi
+
+ for _termcap in "" "-ltermcap" "-lcurses" "-lncurses" ; do
+ _readline_save_libs=$LIBS
+ _combo="-lreadline${_termcap:+ $_termcap}"
+ LIBS="$LIBS $_combo"
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether readline via \"$_combo\" is present and sane" >&5
+$as_echo_n "checking whether readline via \"$_combo\" is present and sane... " >&6; }
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <stdio.h>
+#include <readline/readline.h>
+#include <readline/history.h>
+
+int
+main ()
+{
+
+rl_completion_func_t *completer;
+add_history("foobar");
+rl_catch_signals=0;
+rl_inhibit_completion=0;
+rl_attempted_completion_function=NULL;
+rl_completion_matches(NULL,NULL);
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ _found_readline=yes
+else
+ _found_readline=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_found_readline" >&5
+$as_echo "$_found_readline" >&6; }
+
+ LIBS=$_readline_save_libs
+
+ if test $_found_readline = yes ; then
+
+$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
+
+ LIBREADLINE=$_combo
+
+ break
+ fi
+ done
+
+ unset _termcap
+ unset _readline_save_libs
+ unset _combo
+ unset _found_readline
+ fi
+
+
ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default"
if test "x$ac_cv_member_struct_stat_st_blksize" = x""yes; then :
@@ -11033,7 +11099,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by GNU Awk $as_me 3.1.70, which was
+This file was extended by GNU Awk $as_me 3.1.76, which was
generated by GNU Autoconf 2.65. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -11101,7 +11167,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-GNU Awk config.status 3.1.70
+GNU Awk config.status 3.1.76
configured by $0, generated by GNU Autoconf 2.65,
with options \\"\$ac_cs_config\\"
diff --git a/configure.ac b/configure.ac
index 1ccdf775..d1998f63 100644
--- a/configure.ac
+++ b/configure.ac
@@ -23,7 +23,7 @@ dnl
dnl Process this file with autoconf to produce a configure script.
-AC_INIT([GNU Awk], 3.1.70, bug-gawk@gnu.org, gawk)
+AC_INIT([GNU Awk], 3.1.76, bug-gawk@gnu.org, gawk)
# This is a hack. Different versions of install on different systems
# are just too different. Chuck it and use install-sh.
@@ -40,17 +40,11 @@ then
fi
AC_PREREQ(2.63)
-AM_INIT_AUTOMAKE([1.11])
+AM_INIT_AUTOMAKE([1.11 dist-bzip2 dist-xz])
AC_CONFIG_MACRO_DIR([m4])
dnl Additional argument stuff
-AC_ARG_ENABLE(portals, [ --enable-portals Enable /p as path prefix for portals],
- if test "$enableval" = yes
- then
- AC_DEFINE(HAVE_PORTALS, 1, [we have portals on /p on this system])
- fi
-)
AC_ARG_WITH(whiny-user-strftime, [ --with-whiny-user-strftime Force use of included version of strftime for deficient systems],
if test "$withval" = yes
then
@@ -273,7 +267,7 @@ esac
AC_CHECK_FUNCS(atexit btowc fmod getgrent getgroups grantpt \
isascii iswctype iswlower iswupper mbrlen \
memcmp memcpy memcpy_ulong memmove memset \
- memset_ulong mkstemp setlocale snprintf strchr \
+ memset_ulong mkstemp setenv setlocale snprintf strchr \
strerror strftime strncasecmp strtod strtoul \
system tmpfile towlower towupper tzset usleep wcrtomb \
wcscoll wcscoll wctype)
@@ -343,6 +337,9 @@ AC_MSG_RESULT($has_f_format)
dnl check for sockets
GAWK_AC_LIB_SOCKETS
+dnl check for readline support
+GNUPG_CHECK_READLINE
+
dnl checks for structure members
AC_STRUCT_ST_BLKSIZE
AC_HEADER_TIME
diff --git a/custom.h b/custom.h
index 12db4781..671f8a4b 100644
--- a/custom.h
+++ b/custom.h
@@ -48,43 +48,11 @@
#define GETPGRP_VOID 1
#endif
-/* For Amigas, from Fred Fish, fnf@ninemoons.com */
-#ifdef __amigaos__
-#define fork vfork
-#endif
-
-/* For BeOS, from mc@whoever.com */
-#if defined(__dest_os) && __dest_os == __be_os
-#define BROKEN_STRNCASECMP
-#define ELIDE_CODE
-#include <alloca.h>
-#endif
-
-/* For Tandems, based on code from scldad@sdc.com.au */
-#ifdef TANDEM
-#define tempnam(a,b) tmpnam(NULL)
-#define variable(a,b,c) variabl(a,b,c)
-#define srandom srand
-#define random rand
-
-#include <cextdecs(PROCESS_GETINFO_)>
-#endif
-
-/* For 16-bit DOS */
-#if defined(MSC_VER) && defined(MSDOS)
-#define NO_PROFILING 1
-#endif
-
/* For MacOS X, which is almost BSD Unix */
#ifdef __APPLE__
#define HAVE_MKTIME 1
#endif
-#ifdef __WIN32__
-#undef HAVE_STRFTIME
-/* #define system(s) os_system(s) */
-#endif
-
/* For ULTRIX 4.3 */
#ifdef ultrix
#define HAVE_MKTIME 1
@@ -106,4 +74,9 @@
/* For z/OS, from Dave Pitts */
#ifdef ZOS_USS
#undef HAVE_DLFCN_H
+#undef HAVE_SETENV
+#define setenv zos_setenv
+#define unsetenv zos_unsetenv
+extern int setenv(const char *name, const char *value, int rewrite);
+extern int unsetenv(const char *name);
#endif
diff --git a/debug.c b/debug.c
new file mode 100644
index 00000000..4b70f2e2
--- /dev/null
+++ b/debug.c
@@ -0,0 +1,5732 @@
+/*
+ * debug.c - gawk debugger
+ */
+
+/*
+ * Copyright (C) 2004, 2010 the Free Software Foundation, Inc.
+ *
+ * This file is part of GAWK, the GNU implementation of the
+ * AWK Programming Language.
+ *
+ * GAWK is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * GAWK is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
+ */
+
+#include "awk.h"
+#include "cmd.h"
+
+#ifndef O_RDONLY
+#include <fcntl.h> /* open() */
+#endif
+
+extern int exiting;
+extern SRCFILE *srcfiles;
+extern INSTRUCTION *rule_list;
+extern INSTRUCTION *code_block;
+extern NODE **fcall_list;
+extern long fcall_count;
+extern FILE *output_fp;
+extern IOBUF *curfile;
+extern const char *command_file;
+extern int r_interpret(INSTRUCTION *);
+extern int zzparse(void);
+#define read_command() (void) zzparse()
+
+extern int free_instruction(INSTRUCTION *, int *);
+extern void destroy_symbol(char *name);
+extern const char *redir2str(int redirtype);
+
+static char *linebuf = NULL; /* used to print a single line of source */
+static size_t linebuf_len;
+
+FILE *out_fp;
+char *dPrompt;
+char *commands_Prompt = "> "; /* breakpoint or watchpoint commands list */
+char *eval_Prompt = "@> "; /* awk statement(s) */
+
+int input_from_tty = FALSE;
+int input_fd;
+
+static SRCFILE *cur_srcfile;
+static long cur_frame = 0;
+static INSTRUCTION *cur_pc;
+int cur_rule = 0;
+
+static int prog_running = FALSE;
+
+struct condition {
+ INSTRUCTION *code;
+ CONTEXT *ctxt;
+ char *expr;
+};
+
+struct commands_item {
+ struct commands_item *next;
+ struct commands_item *prev;
+ int cmd;
+ char *cmd_string;
+ CMDARG *arg;
+};
+
+/* breakpoint structure */
+typedef struct break_point {
+ struct break_point *next;
+ struct break_point *prev;
+ int number;
+
+ long ignore_count;
+ long hit_count;
+ char *src;
+ INSTRUCTION *bpi; /* Op_breakpoint */
+
+ struct commands_item commands; /* list of commands to run */
+ int silent;
+
+ struct condition cndn;
+
+ short flags;
+#define BP_ENABLE 1
+#define BP_ENABLE_ONCE 2 /* enable once */
+#define BP_TEMP 4
+#define BP_IGNORE 8
+
+} BREAKPOINT;
+
+static BREAKPOINT breakpoints = { &breakpoints, &breakpoints, 0 };
+
+/* do_save -- save command */
+static int sess_history_base = 0;
+
+/* 'list' command */
+static int last_printed_line = 0;
+static int last_print_count; /* # of lines printed */
+
+/* watch or display item */
+struct list_item {
+ struct list_item *next;
+ struct list_item *prev;
+ int number; /* item number */
+
+ NODE *symbol; /* variable or function param */
+ NODE **subs; /* subscripts */
+ int num_subs; /* subscript(dimension) count */
+ char *sname; /* symbol or param name */
+
+ long fcall_count;
+
+ struct commands_item commands;
+ int silent;
+ struct condition cndn;
+
+ /* This is for the value of the watched item */
+ union {
+ NODE *n;
+ long l;
+ } value[2];
+#define cur_value value[0].n
+#define cur_size value[0].l
+#define old_value value[1].n
+#define old_size value[1].l
+
+ int flags;
+#define PARAM 1
+#define SUBSCRIPT 2
+#define FIELD_NUM 4
+#define OLD_IS_ARRAY 8 /* old item is array */
+#define CUR_IS_ARRAY 16 /* current item is array */
+};
+
+#define IS_PARAM(d) (((d)->flags & PARAM) != 0)
+#define IS_SUBSCRIPT(d) (((d)->flags & SUBSCRIPT) != 0)
+#define IS_FIELD(d) (((d)->flags & FIELD_NUM) != 0)
+#define WATCHING_ARRAY(d) (((d)->flags & CUR_IS_ARRAY) != 0)
+
+static struct list_item display_list = { &display_list, &display_list, 0 };
+static struct list_item watch_list = { &watch_list, &watch_list, 0 };
+
+
+/* Structure to maintain data for processing debugger commands */
+
+static struct {
+ long fcall_count; /* 'finish', 'until', 'next', 'step', 'nexti' commands */
+ int sourceline; /* source line number last
+ * time we stopped execution,
+ * used by next, until and step commands
+ */
+ char *source; /* next, until and step */
+
+ INSTRUCTION *pc; /* 'until' and 'return' commands */
+ int repeat_count; /* 'step', 'next', 'stepi', 'nexti' commands */
+ int print_frame; /* print frame info, 'finish' and 'until' */
+ int print_ret; /* print returned value, 'finish' */
+ int break_point; /* non-zero (breakpoint number) if stopped at break point */
+ int watch_point; /* non-zero (watchpoint number) if stopped at watch point */
+
+ int (*check_func)(INSTRUCTION **); /* function to decide when to suspend
+ * awk interpreter and return control
+ * to debugger command interpreter.
+ */
+
+ enum argtype command; /* command type */
+} stop;
+
+
+/* restart related stuff */
+extern char **d_argv; /* copy of argv array */
+static int need_restart = FALSE;
+enum { BREAK=1, WATCH, DISPLAY, HISTORY, OPTION };
+static const char *const env_variable[] = {
+"",
+"DGAWK_BREAK",
+"DGAWK_WATCH",
+"DGAWK_DISPLAY",
+"DGAWK_HISTORY",
+"DGAWK_OPTION",
+};
+static void serialize(int );
+static void unserialize(int );
+static const char *commands_string = NULL;
+static int commands_string_len = 0;
+static char line_sep;
+#define FSEP (char)'\037'
+#define RSEP (char)'\036'
+#define CSEP (char)'\035'
+
+
+/* debugger option */
+struct dbg_option {
+ const char *name;
+ int *num_val;
+ char **str_val;
+ void (*assign)(const char *);
+ const char *help_txt;
+};
+
+#define DEFAULT_HISTFILE "./.dgawk_history"
+#define DEFAULT_OPTFILE "./.dgawkrc"
+#define DEFAULT_PROMPT "dgawk> "
+#define DEFAULT_LISTSIZE 15
+#define DEFAULT_HISTSIZE 100
+
+static void set_gawk_output(const char *file);
+static void set_prompt(const char *value);
+static void set_listsize(const char *value);
+static void set_trace(const char *value);
+static void set_save_history(const char *value);
+static void set_save_options(const char *value);
+static void set_history_size(const char *value);
+static const char *history_file = DEFAULT_HISTFILE;
+static const char *options_file = DEFAULT_OPTFILE;
+
+/* keep all option variables in one place */
+
+static char *output_file = "/dev/stdout"; /* gawk output redirection */
+char *dgawk_Prompt = NULL; /* initialized in interpret */
+static int list_size = DEFAULT_LISTSIZE; /* # of lines that 'list' prints */
+static int do_trace = FALSE;
+static int do_save_history = TRUE;
+static int do_save_options = TRUE;
+static int history_size = DEFAULT_HISTSIZE; /* max # of lines in history file */
+
+static const struct dbg_option option_list[] = {
+{"history_size", &history_size, NULL, &set_history_size,
+ gettext_noop("set or show the number of lines to keep in history file.") },
+{"listsize", &list_size, NULL, &set_listsize,
+ gettext_noop("set or show the list command window size.") },
+{"outfile", NULL, &output_file, &set_gawk_output,
+ gettext_noop("set or show gawk output file.") },
+{"prompt", NULL, &dgawk_Prompt, &set_prompt,
+ gettext_noop("set or show debugger prompt."), },
+{"save_history", &do_save_history, NULL, &set_save_history,
+ gettext_noop("(un)set or show saving of command history (value=on|off).") },
+{"save_options", &do_save_options, NULL, &set_save_options,
+ gettext_noop("(un)set or show saving of options (value=on|off).") },
+{"trace", &do_trace, NULL, &set_trace,
+ gettext_noop("(un)set or show instruction tracing (value=on|off).") },
+{0, NULL, NULL, NULL, 0},
+};
+
+static void save_options(const char *file);
+
+
+/* pager */
+jmp_buf pager_quit_tag;
+static int screen_width = INT_MAX; /* no of columns */
+static int screen_height = INT_MAX; /* no of rows */
+static int pager_lines_printed = 0; /* no of lines printed so far */
+
+static void restart(int run) ATTRIBUTE_NORETURN;
+static void close_all(void);
+static int open_readfd(const char *file);
+static int find_lines(SRCFILE *s);
+static SRCFILE *source_find(char *src);
+static int print_lines(char *src, int start_line, int nlines);
+static void print_symbol(NODE *r, int isparam);
+static NODE *find_frame(long num);
+static NODE *find_param(const char *name, long num, char **pname);
+static NODE *find_symbol(const char *name, char **pname);
+static NODE *find_array(const char *name);
+static void print_field(long field_num);
+static int print_function(INSTRUCTION *pc, void *);
+static void print_frame(NODE *func, char *src, int srcline);
+static void print_numbered_frame(long num);
+static void print_cur_frame_and_sourceline(void);
+static INSTRUCTION *find_rule(char *src, long lineno);
+static INSTRUCTION *mk_breakpoint(char *src, int srcline);
+static int execute_commands(struct commands_item *commands);
+static void delete_commands_item(struct commands_item *c);
+static NODE *execute_code(volatile INSTRUCTION *code);
+static int pre_execute_code(INSTRUCTION **pi, int inloop);
+static int parse_condition(int type, int num, char *expr);
+static BREAKPOINT *add_breakpoint(INSTRUCTION *, INSTRUCTION *, char *, int);
+static BREAKPOINT *set_breakpoint_next(INSTRUCTION *rp, INSTRUCTION *ip);
+static BREAKPOINT *set_breakpoint_at(INSTRUCTION *, int, int);
+static int set_breakpoint(CMDARG *arg, int temporary);
+static void delete_breakpoint(BREAKPOINT *b);
+static BREAKPOINT *find_breakpoint(long num);
+static void display(struct list_item *d);
+static struct list_item *find_item(struct list_item *list, long num);
+static struct list_item *add_item(struct list_item *list, int type, NODE *symbol, char *pname);
+static void delete_item(struct list_item *d);
+static int breakpoint_triggered(BREAKPOINT *b);
+static int watchpoint_triggered(struct list_item *w);
+
+static void print_instruction(INSTRUCTION *pc, Func_print print_func, FILE *fp, int in_dump);
+static void next_command();
+static char *g_readline(const char *prompt);
+static int prompt_yes_no(const char *, char , int , FILE *);
+
+static struct pf_data {
+ Func_print print_func;
+ int defn;
+ FILE *fp;
+} pf_data;
+
+char * (*read_a_line)(const char *) = 0; /* reads a line of input */
+
+struct command_source
+{
+ int fd;
+ int is_tty;
+ char * (*read_func)(const char *);
+ int (*close_func)(int);
+ int eof_status; /* see push_cmd_src */
+ int cmd; /* D_source or 0 */
+ char *str; /* sourced file */
+ struct command_source *next;
+};
+
+static struct command_source *cmd_src = NULL;
+
+#define get_param_count(f) (f)->lnode->param_cnt
+#define get_params(f) (f)->parmlist
+
+
+#define CHECK_PROG_RUNNING() \
+ do { \
+ if (! prog_running) { \
+ d_error(_("program not running.")); \
+ return FALSE; \
+ } \
+ } while (FALSE)
+
+#define r_format_arg static NODE * format_arg
+#define fmt_msg d_error
+#include "awkprintf.h"
+#undef fmt_msg
+#undef r_format_arg
+
+/* g_readline -- read a line of text; the interface is like 'readline' but
+ * without any command-line editing; used when not compiled with
+ * readline support and/or input is not from terminal (prompt set to NULL).
+ */
+
+static char *
+g_readline(const char *prompt)
+{
+ char *line;
+ size_t line_size = 100;
+ static char buf[2];
+ char *p, *end;
+ int n;
+
+ if (input_from_tty && prompt && *prompt)
+ fprintf(out_fp, "%s", prompt);
+
+ emalloc(line, char *, line_size + 1, "g_readline");
+ p = line;
+ end = line + line_size;
+ while ((n = read(input_fd, buf, 1)) > 0) {
+ if (buf[0] == '\n') {
+ if (p > line && p[-1] == '\r')
+ p--;
+ break;
+ }
+ if (p == end) {
+ erealloc(line, char *, 2 * line_size + 1, "g_readline");
+ p = line + line_size;
+ line_size *= 2;
+ end = line + line_size;
+ }
+ *p++ = buf[0];
+ }
+ if (n == -1 || (n == 0 && p == line)) {
+ efree(line);
+ return NULL;
+ }
+ *p = '\0';
+ return line;
+}
+
+
+/* d_error --- print an error message */
+
+void
+d_error(const char *mesg, ...)
+{
+ va_list args;
+ va_start(args, mesg);
+ fprintf(out_fp, _("error: "));
+ vfprintf(out_fp, mesg, args);
+ fprintf(out_fp, "\n");
+ va_end(args);
+}
+
+/* find_lines --- find the positions of the lines in the source file. */
+
+static int
+find_lines(SRCFILE *s)
+{
+ char *buf, *p, *end;
+ int n;
+ int ofs = 0;
+ int *pos;
+ int pos_size;
+ int maxlen = 0;
+ int numlines = 0;
+ char lastchar = '\0';
+
+ emalloc(buf, char *, s->bufsize, "find_lines");
+ pos_size = s->srclines;
+ emalloc(s->line_offset, int *, (pos_size + 2) * sizeof(int), "find_lines");
+ pos = s->line_offset;
+ pos[0] = 0;
+
+ while ((n = read(s->fd, buf, s->bufsize)) > 0) {
+ end = buf + n;
+ lastchar = buf[n - 1];
+ p = buf;
+ while (p < end) {
+ if (*p++ == '\n') {
+ if (++numlines > pos_size) {
+ erealloc(s->line_offset, int *, (2 * pos_size + 2) * sizeof(int), "find_lines");
+ pos = s->line_offset + pos_size;
+ pos_size *= 2;
+ }
+ *++pos = ofs + (p - buf);
+ if ((pos[0] - pos[-1]) > maxlen)
+ maxlen = pos[0] - pos[-1]; /* length including NEWLINE */
+ }
+ }
+ ofs += n;
+ }
+ efree(buf);
+
+ if (n == -1) {
+ d_error(_("can't read source file `%s' (%s)"),
+ s->src, strerror(errno));
+ return -1;
+ }
+ if (ofs <= 0) {
+ fprintf(out_fp, _("source file `%s' is empty.\n"), s->src);
+ return -1;
+ }
+
+ if (lastchar != '\n') {
+ /* fake a NEWLINE at end */
+ *++pos = ofs + 1;
+ numlines++;
+ if ((pos[0] - pos[-1]) > maxlen)
+ maxlen = pos[0] - pos[-1];
+ }
+ s->maxlen = maxlen;
+ s->srclines = numlines;
+ return 0;
+}
+
+/* source_find --- return the SRCFILE struct for the source 'src' */
+
+static SRCFILE *
+source_find(char *src)
+{
+ SRCFILE *s;
+ struct stat sbuf;
+ char *path;
+ int errno_val = 0;
+
+ if (src == NULL || *src == '\0') {
+ d_error(_("no current source file."));
+ return NULL;
+ }
+
+ if (cur_srcfile->src == src) /* strcmp(cur_srcfile->src, src) == 0 */
+ return cur_srcfile;
+
+ for (s = srcfiles->next; s != srcfiles; s = s->next) {
+ if ((s->stype == SRC_FILE || s->stype == SRC_INC)
+ && strcmp(s->src, src) == 0)
+ return s;
+ }
+
+ path = find_source(src, &sbuf, &errno_val);
+ if (path != NULL) {
+ efree(path);
+ for (s = srcfiles->next; s != srcfiles; s = s->next) {
+ if ((s->stype == SRC_FILE || s->stype == SRC_INC)
+ && files_are_same(& s->sbuf, & sbuf))
+ return s;
+ }
+ }
+
+ d_error(_("No source file named `%s' (%s)"), src, strerror(errno_val));
+ return NULL;
+}
+
+/* print_lines --- print source lines, and update 'cur_srcfile' */
+
+static int
+print_lines(char *src, int start_line, int nlines)
+{
+ SRCFILE *s;
+ int *pos;
+ int i;
+ struct stat sbuf;
+
+ s = source_find(src);
+ if (s == NULL)
+ return -1;
+ if (s->fd <= INVALID_HANDLE && (s->fd = srcopen(s)) <= INVALID_HANDLE) {
+ d_error(_("can't open source file `%s' for reading (%s)"),
+ src, strerror(errno));
+ return -1;
+ }
+
+ if (fstat(s->fd, &sbuf) == 0 && s->mtime < sbuf.st_mtime) {
+ fprintf(out_fp, _("WARNING: source file `%s' modified since program compilation.\n"),
+ src);
+ efree(s->line_offset);
+ s->line_offset = NULL;
+ s->mtime = sbuf.st_mtime;
+
+ /* reopen source file */
+ close(s->fd);
+ s->fd = INVALID_HANDLE;
+ if ((s->fd = srcopen(s)) <= INVALID_HANDLE) {
+ d_error(_("can't open source file `%s' for reading (%s)"),
+ src, strerror(errno));
+ return -1;
+ }
+ }
+
+ if (s->line_offset == NULL && find_lines(s) != 0)
+ return -1;
+ if (start_line < 1 || start_line > s->srclines) {
+ d_error(_("line number %d out of range; `%s' has %d lines"),
+ start_line, src, s->srclines);
+ return -1;
+ }
+
+ assert(nlines > 0);
+ if ((start_line + nlines - 1) > s->srclines)
+ nlines = s->srclines - start_line + 1;
+
+ pos = s->line_offset;
+ if (lseek(s->fd, (off_t) pos[start_line - 1], SEEK_SET) < 0) {
+ d_error("%s: %s", src, strerror(errno));
+ return -1;
+ }
+
+ if (linebuf == NULL) {
+ emalloc(linebuf, char *, s->maxlen + 20, "print_lines"); /* 19 for line # */
+ linebuf_len = s->maxlen;
+ } else if (linebuf_len < s->maxlen) {
+ erealloc(linebuf, char *, s->maxlen + 20, "print_lines");
+ linebuf_len = s->maxlen;
+ }
+
+ for (i = start_line; i < start_line + nlines; i++) {
+ int supposed_len, len;
+ char *p;
+
+ sprintf(linebuf, "%-8d", i);
+
+ /* mark the line about to be executed with =>; nlines > 1
+ * condition makes sure that we are in list command
+ */
+ if (nlines > 1) {
+ BREAKPOINT *b;
+ int has_bpt = FALSE;
+ for (b = breakpoints.prev; b != &breakpoints; b = b->prev) {
+ if (src == b->src && i == b->bpi->source_line) {
+ has_bpt = TRUE;
+ break;
+ }
+ }
+ if (prog_running && src == source && i == sourceline) {
+ if (has_bpt)
+ sprintf(linebuf, "%-4d:b=>", i);
+ else
+ sprintf(linebuf, "%-4d =>", i);
+ } else if (has_bpt)
+ sprintf(linebuf, "%-4d:b ", i);
+ }
+
+ p = linebuf + strlen(linebuf);
+ supposed_len = pos[i] - pos[i - 1];
+ len = read(s->fd, p, supposed_len);
+ switch (len) {
+ case -1:
+ d_error(_("can't read source file `%s' (%s)"),
+ src, strerror(errno));
+ return -1;
+
+ case 0:
+ d_error(_("unexpected eof while reading file `%s', line %d"),
+ src, i);
+ return -1;
+
+ default:
+ if (i == s->srclines && p[len - 1] != '\n')
+ p[len++] = '\n';
+#if 0
+ if (len != supposed_len || p[len - 1] != '\n') {
+ d_error(_("source file `%s' modified since start of program execution"),
+ src);
+ return -1;
+ }
+#endif
+ len += (p - linebuf);
+ if (fwrite(linebuf, sizeof(char), len, out_fp) != len)
+ return -1;
+ }
+ }
+
+ if (cur_srcfile != s) {
+ if (cur_srcfile->fd != INVALID_HANDLE) {
+ close(cur_srcfile->fd);
+ cur_srcfile->fd = INVALID_HANDLE;
+ }
+ cur_srcfile = s;
+ }
+ return (i - 1); /* no of lines printed */
+}
+
+/* do_list --- list command */
+
+int
+do_list(CMDARG *arg, int cmd ATTRIBUTE_UNUSED)
+{
+ long line_first, line_last;
+ long count = list_size;
+ INSTRUCTION *rp;
+ char *src = cur_srcfile->src;
+
+ line_first = last_printed_line + 1; /* default or no arg */
+ if (arg == NULL) /* list or list + */
+ goto list;
+
+ switch (arg->type) {
+ case D_int: /* list n or list - */
+ if (arg->a_int < 0) { /* list - */
+ line_first = last_printed_line - last_print_count - list_size + 1;
+ if (line_first < 1) {
+ if (last_printed_line != last_print_count)
+ line_first = 1;
+ else
+ return FALSE;
+ }
+ } else {
+line:
+ line_first = arg->a_int - list_size / 2;
+ if (line_first < 1)
+ line_first = 1;
+ }
+ break;
+
+ case D_range: /* list m-n */
+range:
+ line_first = arg->a_int;
+ arg = arg->next;
+ assert(arg != NULL);
+ assert(arg->type == D_int);
+ count = arg->a_int - line_first + 1;
+ break;
+
+ case D_string:
+ src = arg->a_string;
+ if (arg->next != NULL) {
+ arg = arg->next;
+ if (arg->type == D_int) /* list file:n */
+ goto line;
+ else if (arg->type == D_range) /* list file:m-n */
+ goto range;
+ else if (arg->type == D_func) /* list file:function */
+ goto func;
+ else
+ line_first = 1;
+ } else
+ line_first = 1;
+ break;
+
+ case D_func: /* list function */
+func:
+ rp = arg->a_node->code_ptr;
+ src = rp->source_file;
+ line_first = rp->source_line - list_size / 2;
+ if (line_first < 1)
+ line_first = 1;
+ break;
+
+ default:
+ break;
+ }
+
+list:
+ line_last = print_lines(src, line_first, count);
+ if (line_last != -1) {
+ last_printed_line = line_last;
+ last_print_count = line_last - line_first + 1;
+ }
+ return FALSE;
+}
+
+/* do_info --- info command */
+
+int
+do_info(CMDARG *arg, int cmd ATTRIBUTE_UNUSED)
+{
+ if (arg == NULL || arg->type != D_argument)
+ return FALSE;
+
+ switch (arg->a_argument) {
+ case A_SOURCE:
+ fprintf(out_fp, _("Current source file: %s\n"), cur_srcfile->src);
+ fprintf(out_fp, _("Number of lines: %d\n"), cur_srcfile->srclines);
+ break;
+
+ case A_SOURCES:
+ {
+ SRCFILE *s;
+ for (s = srcfiles->next; s != srcfiles; s = s->next) {
+ fprintf(out_fp, _("Source file (lines): %s (%d)\n"),
+ (s->stype == SRC_FILE || s->stype == SRC_INC) ? s->src
+ : "cmd. line",
+ s->srclines);
+ }
+ }
+ break;
+
+ case A_BREAK:
+ initialize_pager(out_fp);
+ if (setjmp(pager_quit_tag) == 0) {
+ BREAKPOINT *b;
+ struct commands_item *c;
+
+ gprintf(out_fp, _("Number Disp Enabled Location\n\n"));
+ for (b = breakpoints.prev; b != &breakpoints; b = b->prev) {
+ char *disp = "keep";
+ if (b->flags & BP_ENABLE_ONCE)
+ disp = "dis";
+ else if(b->flags & BP_TEMP)
+ disp = "del";
+ gprintf(out_fp, "%-6d %-4.4s %-7.7s file %s, line #%d\n",
+ b->number, disp, (b->flags & BP_ENABLE) ? "yes" : "no",
+ b->src, b->bpi->source_line);
+ if (b->hit_count > 0)
+ gprintf(out_fp, _("\tno of hits = %ld\n"), b->hit_count);
+ if (b->flags & BP_IGNORE)
+ gprintf(out_fp, _("\tignore next %ld hit(s)\n"), b->ignore_count);
+ if (b->cndn.code != NULL)
+ gprintf(out_fp, _("\tstop condition: %s\n"), b->cndn.expr);
+ if (b->commands.next != &b->commands)
+ gprintf(out_fp, _("\tcommands:\n"));
+ for (c = b->commands.next; c != &b->commands; c = c->next) {
+ gprintf(out_fp, "\t%s\n", c->cmd_string);
+ if (c->cmd == D_eval) {
+ char *start, *end;
+ CMDARG *a = c->arg;
+ start = strchr(a->a_string, '{');
+ end = strrchr(a->a_string, '}');
+ if (start == NULL || end == NULL)
+ continue;
+ start++;
+ *end = '\0';
+ gprintf(out_fp, "%s", start); /* FIXME: translate ? */
+ *end = '}';
+ }
+ }
+ }
+ }
+ break;
+
+ case A_FRAME:
+ CHECK_PROG_RUNNING();
+ fprintf(out_fp, _("Current frame: "));
+ print_numbered_frame(cur_frame);
+ if (cur_frame < fcall_count) {
+ fprintf(out_fp, _("Called by frame: "));
+ print_numbered_frame(cur_frame + 1);
+ }
+ if (cur_frame > 0) {
+ fprintf(out_fp, _("Caller of frame: "));
+ print_numbered_frame(cur_frame - 1);
+ }
+ break;
+
+ case A_ARGS:
+ case A_LOCALS:
+ {
+ NODE *f, *func;
+ INSTRUCTION *pc;
+ int arg_count, pcount;
+ int i, from, to;
+ char **pnames;
+
+ CHECK_PROG_RUNNING();
+ f = find_frame(cur_frame);
+ func = f->func_node;
+ if (func == NULL) {
+ /* print ARGV ? */
+ fprintf(out_fp, _("None in main().\n"));
+ return FALSE;
+ }
+
+ pcount = get_param_count(func); /* # of defined params */
+ pnames = get_params(func); /* param names */
+
+ pc = (INSTRUCTION *) f->reti; /* Op_func_call instruction */
+ arg_count = (pc + 1)->expr_count; /* # of arguments supplied */
+
+ if (arg_count > pcount) /* extra args */
+ arg_count = pcount;
+ if (arg->a_argument == A_ARGS) {
+ from = 0;
+ to = arg_count - 1;
+ } else {
+ from = arg_count;
+ to = pcount - 1;
+ }
+
+ for (i = from; i <= to; i++) {
+ NODE *r;
+ r = f->stack[i];
+ if (r->type == Node_array_ref)
+ r = r->orig_array;
+ fprintf(out_fp, "%s = ", pnames[i]);
+ print_symbol(r, TRUE);
+ }
+ if (to < from)
+ fprintf(out_fp, "%s",
+ arg->a_argument == A_ARGS ?
+ _("No arguments.\n") :
+ _("No locals.\n"));
+ }
+ break;
+
+ case A_VARIABLES:
+ initialize_pager(out_fp);
+ if (setjmp(pager_quit_tag) == 0) {
+ gprintf(out_fp, _("All defined variables:\n\n"));
+ print_vars(gprintf, out_fp);
+ }
+ break;
+
+ case A_FUNCTIONS:
+ initialize_pager(out_fp);
+ if (setjmp(pager_quit_tag) == 0) {
+ gprintf(out_fp, _("All defined functions:\n\n"));
+ pf_data.print_func = gprintf;
+ pf_data.fp = out_fp;
+ pf_data.defn = TRUE;
+ (void) foreach_func((int (*)(INSTRUCTION *, void *)) print_function,
+ TRUE, /* sort */
+ &pf_data /* data */
+ );
+ }
+ break;
+
+ case A_DISPLAY:
+ case A_WATCH:
+ initialize_pager(out_fp);
+ if (setjmp(pager_quit_tag) == 0) {
+ struct list_item *d, *list;
+
+ if (arg->a_argument == A_DISPLAY) {
+ list = &display_list;
+ gprintf(out_fp, _("Auto-display variables:\n\n"));
+ } else {
+ list = &watch_list;
+ gprintf(out_fp, _("Watch variables:\n\n"));
+ }
+ for (d = list->prev; d != list; d = d->prev) {
+ int i;
+ struct commands_item *c;
+ NODE *symbol = d->symbol;
+
+ if (IS_SUBSCRIPT(d)) {
+ gprintf(out_fp, "%d:\t%s", d->number, d->sname);
+ for (i = 0; i < d->num_subs; i++) {
+ NODE *sub;
+ sub = d->subs[i];
+ gprintf(out_fp, "[\"%s\"]", sub->stptr);
+ }
+ gprintf(out_fp, "\n");
+ } else if (IS_FIELD(d))
+ gprintf(out_fp, "%d:\t$%ld\n", d->number, (long) symbol->numbr);
+ else
+ gprintf(out_fp, "%d:\t%s\n", d->number, d->sname);
+ if (d->cndn.code != NULL)
+ gprintf(out_fp, _("\tstop condition: %s\n"), d->cndn.expr);
+ if (d->commands.next != &d->commands)
+ gprintf(out_fp, _("\tcommands:\n"));
+ for (c = d->commands.next; c != &d->commands; c = c->next) {
+ gprintf(out_fp, "\t%s\n", c->cmd_string);
+ if (c->cmd == D_eval) {
+ char *start, *end;
+ CMDARG *a = c->arg;
+ start = strchr(a->a_string, '{');
+ end = strrchr(a->a_string, '}');
+ if (start == NULL || end == NULL)
+ continue;
+ start++;
+ *end = '\0';
+ gprintf(out_fp, "%s", start); /* FIXME: translate ? */
+ *end = '}';
+ }
+ }
+
+ }
+ }
+ break;
+
+ default:
+ break;
+ }
+
+ return FALSE;
+}
+
+/* print_symbol --- print a symbol table entry */
+
+static void
+print_symbol(NODE *r, int isparam)
+{
+ switch (r->type) {
+ case Node_var_new:
+ fprintf(out_fp, "untyped variable\n");
+ break;
+ case Node_var:
+ if (! isparam && r->var_update)
+ r->var_update();
+ valinfo(r->var_value, fprintf, out_fp);
+ break;
+ case Node_var_array:
+ fprintf(out_fp, "array, %ld elements\n", r->table_size);
+ break;
+ case Node_func:
+ fprintf(out_fp, "`function'\n");
+ break;
+ default:
+ break;
+ }
+}
+
+/* find_frame --- find frame given a frame number */
+
+static NODE *
+find_frame(long num)
+{
+ assert(num >= 0);
+ if (num == 0)
+ return frame_ptr;
+
+ assert(prog_running == TRUE);
+ assert(num <= fcall_count);
+ assert(fcall_list[num] != NULL);
+ return fcall_list[num];
+}
+
+/* find_param --- find a function parameter in a given frame number */
+
+static NODE *
+find_param(const char *name, long num, char **pname)
+{
+ NODE *r = NULL;
+ NODE *f;
+
+ if (pname)
+ *pname = NULL;
+
+ if (num < 0 || num > fcall_count || name == NULL)
+ return NULL;
+ f = find_frame(num);
+ if (f->func_node != NULL) { /* in function */
+ NODE *func;
+ char **pnames;
+ int i, pcount;
+
+ func = f->func_node;
+ pnames = get_params(func);
+ pcount = get_param_count(func);
+
+ for (i = 0; i < pcount; i++) {
+ if (STREQ(name, pnames[i])) {
+ r = f->stack[i];
+ if (r->type == Node_array_ref)
+ r = r->orig_array;
+ if (pname)
+ *pname = pnames[i];
+ break;
+ }
+ }
+ }
+ return r;
+}
+
+/* find_symbol --- find a symbol in current context */
+
+static
+NODE *find_symbol(const char *name, char **pname)
+{
+ NODE *r = NULL;
+
+ if (pname)
+ *pname = NULL;
+ if (prog_running)
+ r = find_param(name, cur_frame, pname);
+ if (r == NULL)
+ r = lookup(name);
+ if (r == NULL)
+ fprintf(out_fp, _("no symbol `%s' in current context\n"), name);
+ return r;
+}
+
+/* find_array -- find an array in current context */
+
+static NODE *
+find_array(const char *name)
+{
+ NODE *r;
+ r = find_symbol(name, NULL);
+ if (r != NULL && r->type != Node_var_array) {
+ fprintf(out_fp, _("`%s' is not an array\n"), name);
+ return NULL;
+ }
+ return r;
+}
+
+/* print_field --- print the value of $n */
+
+static void
+print_field(long field_num)
+{
+ NODE **lhs;
+ lhs = get_field(field_num, NULL);
+ if (*lhs == Null_field || *lhs == Nnull_string)
+ fprintf(out_fp, _("$%ld = uninitialized field\n"), field_num);
+ else {
+ fprintf(out_fp, "$%ld = ", field_num);
+ valinfo(*lhs, fprintf, out_fp);
+ }
+}
+
+extern int comp_func(const void *p1, const void *p2);
+
+/* print_array --- print the contents of an array */
+
+static void
+print_array(NODE *arr, char *arr_name, Func_print print_func)
+{
+ NODE *bucket;
+ NODE **list = NULL;
+ int i, j;
+ size_t num_elems = 0;
+
+ if (arr->var_array == NULL || arr->table_size == 0) {
+ print_func(out_fp, _("array `%s' is empty\n"), arr_name);
+ return;
+ }
+
+ /* sort indices */
+
+ /* allocate space for array */
+ num_elems = arr->table_size;
+ emalloc(list, NODE **, num_elems * sizeof(NODE *), "print_array");
+
+ /* populate it */
+ for (i = j = 0; i < arr->array_size; i++) {
+ bucket = arr->var_array[i];
+ if (bucket == NULL)
+ continue;
+ for (; bucket != NULL; bucket = bucket->ahnext)
+ list[j++] = bucket;
+ }
+ qsort(list, num_elems, sizeof(NODE *), comp_func); /* shazzam! */
+
+ for (i = 0; i < num_elems; i++) {
+ bucket = list[i];
+ if (bucket->ahvalue->type == Node_var_array) {
+ arr = bucket->ahvalue;
+ print_array(arr, arr->vname, print_func);
+ } else {
+ print_func(out_fp, "%s[\"%s\"] = ", arr_name, bucket->ahname_str);
+ valinfo(bucket->ahvalue, print_func, out_fp);
+ }
+ }
+ efree(list);
+}
+
+/* print_subscript --- print an array element */
+
+static void
+print_subscript(NODE *arr, char *arr_name, CMDARG *a, int count)
+{
+ NODE *r, *subs;
+
+ subs = a->a_node;
+ r = in_array(arr, subs);
+ if (r == NULL)
+ fprintf(out_fp, _("[\"%s\"] not in array `%s'\n"), subs->stptr, arr_name);
+ else if (r->type == Node_var_array) {
+ if (count > 1)
+ print_subscript(r, r->vname, a->next, count - 1);
+ else {
+ /* print # of elements in array */
+ fprintf(out_fp, "%s = ", r->vname);
+ print_symbol(r, FALSE);
+ }
+ } else {
+ fprintf(out_fp, "%s[\"%s\"] = ", arr_name, subs->stptr);
+ valinfo(r, fprintf, out_fp);
+ }
+}
+
+/* do_print_var --- print command */
+
+int
+do_print_var(CMDARG *arg, int cmd ATTRIBUTE_UNUSED)
+{
+ NODE *r;
+ CMDARG *a;
+ char *name, *pname;
+
+ for (a = arg; a != NULL; a = a->next) {
+ switch (a->type) {
+ case D_variable:
+ name = a->a_string;
+ if ((r = find_symbol(name, &pname)) != NULL) {
+ fprintf(out_fp, "%s = ", name);
+ print_symbol(r, (pname != NULL));
+ }
+ break;
+
+ case D_subscript:
+ assert(a->a_count > 0);
+ name = a->a_string;
+ r = find_array(name);
+ if (r != NULL)
+ print_subscript(r, name, a->next, a->a_count);
+ break;
+
+ case D_array:
+ name = a->a_string;
+ if ((r = find_array(name)) != NULL) {
+ int count = a->a_count;
+ for (; count > 0; count--) {
+ NODE *value, *subs;
+ a = a->next;
+ subs = a->a_node;
+ value = in_array(r, subs);
+ if (value == NULL) {
+ fprintf(out_fp, _("[\"%s\"] not in array `%s'\n"),
+ subs->stptr, name);
+ break;
+ } else if (value->type != Node_var_array) {
+ fprintf(out_fp, _("`%s[\"%s\"]' is not an array\n"),
+ name, subs->stptr);
+ break;
+ } else {
+ r = value;
+ name = r->vname;
+ }
+ }
+ if (count == 0) {
+ initialize_pager(out_fp);
+ if (setjmp(pager_quit_tag) == 0)
+ print_array(r, name, gprintf);
+ }
+ }
+ break;
+
+ case D_field:
+ print_field(a->a_node->numbr);
+ break;
+
+ default:
+ /* notably D_node, subscript for invalid array name; skip */
+ break;
+ }
+ }
+ return FALSE;
+}
+
+/* do_set_var --- set command */
+
+int
+do_set_var(CMDARG *arg, int cmd ATTRIBUTE_UNUSED)
+{
+ NODE *r, *val;
+ NODE **lhs;
+ char *name, *pname;
+
+ switch (arg->type) {
+ case D_variable:
+ name = arg->a_string;
+ arg = arg->next;
+ val = arg->a_node;
+
+ if ((r = find_symbol(name, &pname)) == NULL)
+ break;
+
+ switch (r->type) {
+ case Node_var_new:
+ r->type = Node_var;
+ r->var_value = Nnull_string;
+ /* fall through */
+ case Node_var:
+ lhs = &r->var_value;
+ unref(*lhs);
+ *lhs = dupnode(val);
+ if (pname == NULL && r->var_assign != NULL)
+ r->var_assign();
+ fprintf(out_fp, "%s = ", name);
+ print_symbol(r, (pname != NULL));
+ break;
+
+ default:
+ d_error(_("`%s' is not a scalar variable"), name);
+ break;
+ }
+ break;
+
+ case D_subscript:
+ {
+ NODE *subs, *value;
+ int count = arg->a_count;
+
+ assert(count > 0);
+ name = arg->a_string;
+ r = find_array(name);
+ if (r == NULL)
+ break;
+ for (; count > 0; count--) {
+ arg = arg->next;
+ subs = arg->a_node;
+ value = in_array(r, subs);
+
+ if (count == 1) {
+ if (value != NULL && value->type == Node_var_array)
+ d_error(_("attempt to use array `%s[\"%s\"]' in a scalar context"),
+ name, subs->stptr);
+ else {
+ arg = arg->next;
+ val = arg->a_node;
+ lhs = assoc_lookup(r, subs, FALSE);
+ unref(*lhs);
+ *lhs = dupnode(val);
+ fprintf(out_fp, "%s[\"%s\"] = ", name, subs->stptr);
+ valinfo(*lhs, fprintf, out_fp);
+ }
+ } else {
+ if (value == NULL) {
+ const char *aname = make_aname(r, subs);
+ NODE *array;
+ getnode(array);
+ array->type = Node_var_array;
+ array->var_array = NULL;
+ array->vname = estrdup(aname, strlen(aname));
+ *assoc_lookup(r, subs, FALSE) = array;
+ r = array;
+ } else if (value->type != Node_var_array) {
+ d_error(_("attempt to use scalar `%s[\"%s\"]' as array"),
+ name, subs->stptr);
+ break;
+ } else {
+ r = value;
+ name = r->vname;
+ }
+ }
+ }
+ }
+ break;
+
+ case D_field:
+ {
+ long field_num;
+ Func_ptr assign = NULL;
+
+ field_num = (long) arg->a_node->numbr;
+ assert(field_num >= 0);
+ arg = arg->next;
+ val = arg->a_node;
+ lhs = get_field(field_num, &assign);
+ unref(*lhs);
+ *lhs = dupnode(val);
+ if (assign)
+ assign();
+ print_field(field_num);
+ }
+ break;
+
+ default:
+ break;
+ }
+ return FALSE;
+}
+
+/* find_item --- find an item in the watch/display list */
+
+static struct list_item *
+find_item(struct list_item *list, long num)
+{
+ struct list_item *d;
+
+ if (num <= 0)
+ return NULL;
+ for (d = list->next; d != list; d = d->next) {
+ if (d->number == num)
+ return d;
+ }
+ return NULL;
+}
+
+/* delete_item --- delete an item from the watch/display list */
+
+static void
+delete_item(struct list_item *d)
+{
+ struct commands_item *c;
+ int i;
+
+ if (IS_SUBSCRIPT(d)) {
+ for (i = 0; i < d->num_subs; i++)
+ unref(d->subs[i]);
+ efree(d->subs);
+ } else if (IS_FIELD(d))
+ unref(d->symbol);
+
+ if ((d->flags & CUR_IS_ARRAY) == 0)
+ unref(d->cur_value);
+ if ((d->flags & OLD_IS_ARRAY) == 0)
+ unref(d->old_value);
+
+ /* delete commands */
+ for (c = d->commands.next; c != &d->commands; c = c->next) {
+ c = c->prev;
+ delete_commands_item(c->next);
+ }
+
+ free_context(d->cndn.ctxt, FALSE);
+ if (d->cndn.expr != NULL)
+ efree(d->cndn.expr);
+
+ d->next->prev = d->prev;
+ d->prev->next = d->next;
+ efree(d);
+}
+
+/* add_item --- craete a watch/display item and add it to the list */
+
+static struct list_item *
+add_item(struct list_item *list, int type, NODE *symbol, char *pname)
+{
+ struct list_item *d;
+
+ emalloc(d, struct list_item *, sizeof(struct list_item), "add_item");
+ memset(d, 0, sizeof(struct list_item));
+ d->commands.next = d->commands.prev = &d->commands;
+
+ d->number = ++list->number;
+ d->sname = symbol->vname;
+ if (pname != NULL) { /* function param */
+ d->sname = pname;
+ d->flags |= PARAM;
+ d->fcall_count = fcall_count - cur_frame;
+ }
+
+ if (type == D_field) { /* field number */
+ d->symbol = symbol;
+ d->flags |= FIELD_NUM;
+ } else if (type == D_subscript) { /* subscript */
+ d->symbol = symbol;
+ d->flags |= SUBSCRIPT;
+ } else /* array or variable */
+ d->symbol = symbol;
+
+ /* add to list */
+ d->next = list->next;
+ d->prev = list;
+ list->next = d;
+ d->next->prev = d;
+ return d;
+}
+
+/* do_add_item --- add an item to the watch/display list */
+
+static struct list_item *
+do_add_item(struct list_item *list, CMDARG *arg)
+{
+ NODE *symbol = NULL;
+ char *name, *pname = NULL;
+ struct list_item *item = NULL;
+
+ switch (arg->type) {
+ case D_subscript:
+ case D_variable:
+ name = arg->a_string;
+ if ((symbol = find_symbol(name, &pname)) == NULL)
+ return NULL;
+ if (symbol->type == Node_func) {
+ d_error(_("`%s' is a function"), name);
+ return NULL;
+ }
+ if (arg->type == D_subscript && symbol->type != Node_var_array) {
+ d_error(_("`%s' is not an array\n"), name);
+ return NULL;
+ }
+
+ item = add_item(list, arg->type, symbol, pname);
+ if (item != NULL && arg->type == D_subscript) {
+ NODE **subs;
+ int count = arg->a_count;
+ int i;
+
+ assert(count > 0);
+ emalloc(subs, NODE **, count * sizeof(NODE *), "do_add_item");
+ for (i = 0; i < count; i++) {
+ arg = arg->next;
+ subs[i] = dupnode(arg->a_node);
+ (void) force_string(subs[i]);
+ }
+ item->subs = subs;
+ item->num_subs = count;
+ }
+ break;
+
+ case D_field:
+ symbol = dupnode(arg->a_node);
+ item = add_item(list, D_field, symbol, NULL);
+ break;
+
+ default:
+ break;
+ }
+
+ /* watch condition if any */
+ if (list == &watch_list) {
+ arg = arg->next;
+ if (item != NULL && arg != NULL) {
+ if (parse_condition(D_watch, item->number, arg->a_string) == 0)
+ arg->a_string = NULL; /* don't let free_cmdarg free it */
+ else
+ fprintf(out_fp, _("watchpoint %d is unconditional\n"), item->number);
+ }
+ }
+ return item;
+}
+
+/* do_delete_item --- delete a watch/display item from list. */
+
+static void
+do_delete_item(struct list_item *list, CMDARG *arg)
+{
+ if (arg == NULL) {
+ while (list->next != list)
+ delete_item(list->next);
+ }
+
+ for (; arg != NULL; arg = arg->next) {
+ struct list_item *d;
+ if (arg->type == D_range) {
+ long i, j;
+
+ i = arg->a_int;
+ arg = arg->next;
+ j = arg->a_int;
+ if (j > list->number)
+ j = list->number;
+ for (; i <= j; i++) {
+ if ((d = find_item(list, i)) != NULL)
+ delete_item(d);
+ }
+ } else {
+ if ((d = find_item(list, arg->a_int)) == NULL) {
+ /* split into two for easier message translation */
+ if (list == &display_list)
+ d_error(_("No display item numbered %ld"),
+ arg->a_int);
+ else
+ d_error(_("No watch item numbered %ld"),
+ arg->a_int);
+ } else
+ delete_item(d);
+ }
+ }
+}
+
+/* display --- print an item from the auto-display list */
+
+static void
+display(struct list_item *d)
+{
+ NODE *symbol;
+
+ symbol = d->symbol;
+ if (IS_PARAM(d) && (d->fcall_count != (fcall_count - cur_frame)))
+ return;
+
+ if (IS_SUBSCRIPT(d)) {
+ NODE *sub, *r;
+ int i = 0, count = d->num_subs;
+ for (i = 0; i < count; i++) {
+ sub = d->subs[i];
+ r = in_array(symbol, sub);
+ if (r == NULL) {
+ fprintf(out_fp, _("%d: [\"%s\"] not in array `%s'\n"),
+ d->number, sub->stptr, d->sname);
+ break;
+ }
+ if (r->type == Node_var_array) {
+ symbol = r;
+ if (i == count - 1) /* it's a sub-array */
+ goto print_sym; /* print # of elements in sub-array */
+ } else {
+ if (i != count - 1)
+ return; /* FIXME msg and delete item ? */
+ fprintf(out_fp, "%d: %s[\"%s\"] = ", d->number,
+ d->sname, sub->stptr);
+ valinfo(r, fprintf, out_fp);
+ }
+ }
+ } else if (IS_FIELD(d)) {
+ NODE *r = d->symbol;
+ fprintf(out_fp, "%d: ", d->number);
+ print_field(r->numbr);
+ } else {
+print_sym:
+ fprintf(out_fp, "%d: %s = ", d->number, d->sname);
+ print_symbol(symbol, IS_PARAM(d));
+ }
+}
+
+
+/* do_display --- display command */
+
+int
+do_display(CMDARG *arg, int cmd ATTRIBUTE_UNUSED)
+{
+ struct list_item *d;
+
+ if (arg == NULL) {
+ /* display all items */
+ for (d = display_list.prev; d != &display_list; d = d->prev)
+ display(d);
+ return FALSE;
+ }
+
+ if ((d = do_add_item(&display_list, arg)) != NULL)
+ display(d);
+
+ return FALSE;
+}
+
+/* do_undisplay --- undisplay command */
+
+int
+do_undisplay(CMDARG *arg, int cmd ATTRIBUTE_UNUSED)
+{
+ do_delete_item(&display_list, arg);
+ return FALSE;
+}
+
+/* condition_triggered --- test if a condition expression is true */
+
+static int
+condition_triggered(struct condition *cndn)
+{
+ NODE *r;
+ int di;
+
+ assert(cndn != NULL);
+ if (cndn->code == NULL)
+ return TRUE;
+
+ set_context(cndn->ctxt);
+ r = execute_code((volatile INSTRUCTION *) cndn->code);
+ set_context(NULL); /* switch to prev context */
+ if (r == NULL) /* fatal error */
+ return FALSE; /* not triggered */
+
+ force_number(r);
+ di = (r->numbr != 0.0);
+ DEREF(r);
+ return di;
+}
+
+
+
+static int
+find_subscript(struct list_item *item, NODE **ptr)
+{
+ NODE *symbol = item->symbol;
+ NODE *sub, *r;
+ int i = 0, count = item->num_subs;
+
+ r = *ptr = NULL;
+ for (i = 0; i < count; i++) {
+ sub = item->subs[i];
+ r = in_array(symbol, sub);
+ if (r == NULL)
+ return 0;
+ if (r->type == Node_var_array)
+ symbol = r;
+ else if (i < count - 1)
+ return -1;
+ }
+ *ptr = r;
+ return 0;
+}
+
+/* cmp_val --- compare values of watched item, returns TRUE if different; */
+
+static int
+cmp_val(struct list_item *w, NODE *old, NODE *new)
+{
+ /*
+ * case old new result
+ * ------------------------------
+ * 1: NULL ARRAY TRUE
+ * 2: NULL SCALAR TRUE
+ * 3: NULL NULL FALSE
+ * 4: SCALAR SCALAR cmp_node
+ * 5: SCALAR ARRAY TRUE
+ * 6: SCALAR NULL TRUE
+ * 7: ARRAY SCALAR TRUE
+ * 8: ARRAY ARRAY compare size
+ * 9: ARRAY NULL TRUE
+ */
+
+ if (WATCHING_ARRAY(w)) {
+ long size = 0;
+ if (! new) /* 9 */
+ return TRUE;
+ if (new->type == Node_val) /* 7 */
+ return TRUE;
+ /* new->type == Node_var_array */ /* 8 */
+ if (new->var_array != NULL)
+ size = new->table_size;
+ if (w->cur_size == size)
+ return FALSE;
+ return TRUE;
+ }
+
+ if (! old && ! new) /* 3 */
+ return FALSE;
+ if ((! old && new) /* 1, 2 */
+ || (old && ! new)) /* 6 */
+ return TRUE;
+
+ if (new->type == Node_var_array) /* 5 */
+ return TRUE;
+ return cmp_nodes(old, new); /* 4 */
+}
+
+/* watchpoint_triggered --- check if we should stop at this watchpoint;
+ * update old and current values accordingly.
+ */
+
+static int
+watchpoint_triggered(struct list_item *w)
+{
+ NODE *symbol;
+ NODE *t1, *t2;
+
+ symbol = w->symbol;
+ if (IS_PARAM(w) && (w->fcall_count != (fcall_count - cur_frame)))
+ return 0; /* parameter with same name in a different function */
+ if (! condition_triggered(&w->cndn))
+ return 0;
+
+ t1 = w->cur_value;
+ t2 = (NODE *) 0;
+ if (IS_SUBSCRIPT(w))
+ (void) find_subscript(w, &t2);
+ else if (IS_FIELD(w)) {
+ long field_num;
+ field_num = (long) w->symbol->numbr;
+ t2 = *get_field(field_num, NULL);
+ } else {
+ switch (symbol->type) {
+ case Node_var:
+ t2 = symbol->var_value;
+ break;
+ case Node_var_array:
+ t2 = symbol;
+ break;
+ case Node_var_new:
+ break;
+ default:
+ cant_happen();
+ }
+ }
+
+ if (! cmp_val(w, t1, t2))
+ return 0;
+
+ /* update old and current values */
+
+ if ((w->flags & OLD_IS_ARRAY) == 0)
+ unref(w->old_value);
+ w->flags &= ~OLD_IS_ARRAY;
+ if (WATCHING_ARRAY(w)) { /* 7, 8, 9 */
+ w->old_size = w->cur_size;
+ w->flags |= OLD_IS_ARRAY;
+ if (! t2) {
+ w->flags &= ~CUR_IS_ARRAY;
+ w->cur_value = 0;
+ } else if (t2->type == Node_val) {
+ w->flags &= ~CUR_IS_ARRAY;
+ w->cur_value = dupnode(t2);
+ } else
+ w->cur_size = (t2->var_array != NULL) ? t2->table_size : 0;
+ } else if (! t1) { /* 1, 2 */
+ w->old_value = 0;
+ /* new != NULL */
+ if (t2->type == Node_val)
+ w->cur_value = dupnode(t2);
+ else {
+ w->flags |= CUR_IS_ARRAY;
+ w->cur_size = (t2->var_array != NULL) ? t2->table_size : 0;
+ }
+ } else /* if (t1->type == Node_val) */ { /* 4, 5, 6 */
+ w->old_value = w->cur_value;
+ if (! t2)
+ w->cur_value = 0;
+ else if (t2->type == Node_var_array) {
+ w->flags |= CUR_IS_ARRAY;
+ w->cur_size = (t2->var_array != NULL) ? t2->table_size : 0;
+ } else
+ w->cur_value = dupnode(t2);
+ }
+
+ return w->number;
+}
+
+/* initialize_watch_item --- initialize current value of a watched item */
+
+static int
+initialize_watch_item(struct list_item *w)
+{
+ NODE *t, *r;
+ NODE *symbol = w->symbol;
+
+ if (IS_SUBSCRIPT(w)) {
+ if (find_subscript(w, &r) == -1) {
+ d_error(_("attempt to use scalar value as array"));
+ return -1;
+ }
+
+ if (r == NULL)
+ w->cur_value = (NODE *) 0;
+ else if (r->type == Node_var_array) { /* it's a sub-array */
+ w->flags |= CUR_IS_ARRAY;
+ w->cur_size = (r->var_array != NULL) ? r->table_size : 0;
+ } else
+ w->cur_value = dupnode(r);
+ } else if (IS_FIELD(w)) {
+ long field_num;
+ t = w->symbol;
+ field_num = (long) t->numbr;
+ r = *get_field(field_num, NULL);
+ w->cur_value = dupnode(r);
+ } else {
+ if (symbol->type == Node_var_new)
+ w->cur_value = (NODE *) 0;
+ else if (symbol->type == Node_var) {
+ r = symbol->var_value;
+ w->cur_value = dupnode(r);
+ } else if (symbol->type == Node_var_array) {
+ w->flags |= CUR_IS_ARRAY;
+ w->cur_size = (symbol->var_array != NULL) ? symbol->table_size : 0;
+ } /* else
+ can't happen */
+ }
+ return 0;
+}
+
+/* do_watch --- watch command */
+
+int
+do_watch(CMDARG *arg, int cmd ATTRIBUTE_UNUSED)
+{
+ struct list_item *w;
+ NODE *symbol, *sub;
+ int i;
+
+ w = do_add_item(&watch_list, arg);
+ if (w == NULL)
+ return FALSE;
+
+ if (initialize_watch_item(w) == -1) {
+ delete_item(w);
+ return FALSE;
+ }
+
+ fprintf(out_fp, "Watchpoint %d: ", w->number);
+ symbol = w->symbol;
+
+/* FIXME: common code also in print_watch_item */
+ if (IS_SUBSCRIPT(w)) {
+ fprintf(out_fp, "%s", w->sname);
+ for (i = 0; i < w->num_subs; i++) {
+ sub = w->subs[i];
+ fprintf(out_fp, "[\"%s\"]", sub->stptr);
+ }
+ fprintf(out_fp, "\n");
+ } else if (IS_FIELD(w))
+ fprintf(out_fp, "$%ld\n", (long) symbol->numbr);
+ else
+ fprintf(out_fp, "%s\n", w->sname);
+
+ return FALSE;
+}
+
+/* do_unwatch --- unwatch command */
+
+int
+do_unwatch(CMDARG *arg, int cmd ATTRIBUTE_UNUSED)
+{
+ do_delete_item(&watch_list, arg);
+ return FALSE;
+}
+
+/* callback from pop_frame in eval.c */
+
+void
+frame_popped()
+{
+ struct list_item *item;
+
+ /* delete all out of scope watchpoints */
+ for (item = watch_list.next; item != &watch_list; item = item->next) {
+ if (IS_PARAM(item) && (item->fcall_count > fcall_count)) {
+ fprintf(out_fp,
+ _("Watchpoint %d deleted because parameter is out of scope.\n"),
+ item->number);
+ item = item->prev;
+ delete_item(item->next);
+ }
+ }
+
+ /* delete all out of scope display items */
+ for (item = display_list.next; item != &display_list; item = item->next) {
+ if (IS_PARAM(item) && (item->fcall_count > fcall_count)) {
+ fprintf(out_fp,
+ _("Display %d deleted because parameter is out of scope.\n"),
+ item->number);
+ item = item->prev;
+ delete_item(item->next);
+ }
+ }
+}
+
+/* print_function --- print function name, parameters, and optionally
+ * file and line number.
+ */
+
+static int
+print_function(INSTRUCTION *pc, void *x)
+{
+ NODE *func;
+ int i, pcount;
+ char **pnames;
+ struct pf_data *data = (struct pf_data *) x;
+ int defn = data->defn;
+ Func_print print_func = data->print_func;
+ FILE *fp = data->fp;
+
+ func = pc->func_body;
+ pcount = get_param_count(func);
+ pnames = get_params(func);
+
+ print_func(fp, "%s(", func->lnode->param);
+ for (i = 0; i < pcount; i++) {
+ print_func(fp, "%s", pnames[i]);
+ if (i < pcount - 1)
+ print_func(fp, ", ");
+ }
+ print_func(fp, ")");
+ if (defn)
+ print_func(fp, _(" in file `%s', line %d\n"),
+ pc->source_file, pc->source_line);
+ return 0;
+}
+
+/* print_frame --- print function name, parameters,
+ * source and line number of where it is
+ * executing.
+ */
+
+static void
+print_frame(NODE *func, char *src, int srcline)
+{
+ if (func == NULL)
+ fprintf(out_fp, "main()");
+ else {
+ pf_data.print_func = fprintf;
+ pf_data.fp = out_fp;
+ pf_data.defn = FALSE;
+ (void) print_function(func->code_ptr, &pf_data);
+ }
+ fprintf(out_fp, _(" at `%s':%d"), src, srcline);
+}
+
+/* print_numbered_frame --- print a frame given its number */
+
+static void
+print_numbered_frame(long num)
+{
+ NODE *f;
+
+ assert(prog_running == TRUE);
+ f = find_frame(num);
+ if (num == 0) {
+ fprintf(out_fp, "#%ld\t ", num);
+ print_frame(f->func_node, source, sourceline);
+ } else {
+ fprintf(out_fp, _("#%ld\tin "), num);
+ print_frame(f->func_node, f->vname,
+ ((INSTRUCTION *) find_frame(num - 1)->reti)->source_line);
+ }
+ fprintf(out_fp, "\n");
+}
+
+/* do_backtrace --- backtrace command */
+
+int
+do_backtrace(CMDARG *arg, int cmd ATTRIBUTE_UNUSED)
+{
+ long cur = 0;
+ long last = fcall_count;
+
+ CHECK_PROG_RUNNING();
+ if (arg != NULL && arg->type == D_int) {
+ long count = arg->a_int;
+
+ /* frame_ptr (frame #0), fcall_list[1, 2, ... fcall_count] => total count */
+ if (count >= 0) {
+ /* toward outermost frame #fcall_count */
+ last = count - 1;
+ if (last > fcall_count)
+ last = fcall_count;
+ } else {
+ /* toward innermost frame #0 */
+ cur = 1 + fcall_count + count;
+ if (cur < 0)
+ cur = 0;
+ }
+ }
+
+ for (; cur <= last; cur++) {
+ print_numbered_frame(cur);
+ }
+ if (cur <= fcall_count)
+ fprintf(out_fp, _("More stack frames follow ...\n"));
+ return FALSE;
+}
+
+/* print_cur_frame_and_sourceline --- print current frame, and
+ * current source line.
+ */
+
+static void
+print_cur_frame_and_sourceline()
+{
+ NODE *f;
+ int srcline;
+ char *src;
+
+ assert(prog_running == TRUE);
+ f = find_frame(cur_frame);
+ if (cur_frame == 0) {
+ src = source;
+ srcline = sourceline;
+ } else {
+ f = find_frame(cur_frame);
+ src = f->vname;
+ srcline = ((INSTRUCTION *) find_frame(cur_frame - 1)->reti)->source_line;
+ }
+
+ fprintf(out_fp, (cur_frame > 0 ? _("#%ld\tin ") : "#%ld\t "), cur_frame);
+ print_frame(f->func_node, src, srcline);
+ fprintf(out_fp, "\n");
+ print_lines(src, srcline, 1);
+ last_printed_line = srcline - list_size / 2;
+ if (last_printed_line < 0)
+ last_printed_line = 0;
+}
+
+/* do_frame --- frame command */
+
+int
+do_frame(CMDARG *arg, int cmd ATTRIBUTE_UNUSED)
+{
+ CHECK_PROG_RUNNING();
+ if (arg && arg->type == D_int) {
+ if (arg->a_int < 0 || arg->a_int > fcall_count) {
+ d_error(_("invalid frame number"));
+ return FALSE;
+ }
+ cur_frame = arg->a_int;
+ }
+ print_cur_frame_and_sourceline();
+ return FALSE;
+}
+
+/* do_up --- up command */
+
+int
+do_up(CMDARG *arg, int cmd ATTRIBUTE_UNUSED)
+{
+ CHECK_PROG_RUNNING();
+ if (arg != NULL && arg->type == D_int)
+ cur_frame += arg->a_int;
+ else
+ cur_frame++;
+ if (cur_frame < 0)
+ cur_frame = 0;
+ else if (cur_frame > fcall_count)
+ cur_frame = fcall_count;
+ print_cur_frame_and_sourceline();
+ return FALSE;
+}
+
+/* do_down --- down command */
+
+int
+do_down(CMDARG *arg, int cmd ATTRIBUTE_UNUSED)
+{
+ CHECK_PROG_RUNNING();
+ if (arg != NULL && arg->type == D_int)
+ cur_frame -= arg->a_int;
+ else
+ cur_frame--;
+ if (cur_frame < 0)
+ cur_frame = 0;
+ else if (cur_frame > fcall_count)
+ cur_frame = fcall_count;
+ print_cur_frame_and_sourceline();
+ return FALSE;
+}
+
+/* find_rule --- find a rule or function in file 'src' containing
+ * source line 'lineno'
+ */
+
+static INSTRUCTION *
+find_rule(char *src, long lineno)
+{
+ INSTRUCTION *rp;
+
+ assert(lineno > 0);
+ for (rp = rule_list->nexti; rp != NULL; rp = rp->nexti) {
+ if ((rp - 1)->source_file == src
+ && lineno >= (rp + 1)->first_line
+ && lineno <= (rp + 1)->last_line)
+ return (rp - 1);
+ }
+ return NULL;
+}
+
+/* mk_breakpoint --- create a breakpoint instruction and the corresponding
+ * breakpoint structure.
+ */
+
+static INSTRUCTION *
+mk_breakpoint(char *src, int srcline)
+{
+ INSTRUCTION *bp;
+ BREAKPOINT *b;
+
+ bp = bcalloc(Op_breakpoint, 1, srcline);
+ emalloc(b, BREAKPOINT *, sizeof(BREAKPOINT), "mk_breakpoint");
+ memset(&b->cndn, 0, sizeof(struct condition));
+ b->commands.next = b->commands.prev = &b->commands;
+ b->silent = FALSE;
+
+
+ b->number = ++watch_list.number; /* breakpoints and watchpoints use same counter */
+ b->ignore_count = 0;
+ b->hit_count = 0;
+ b->flags = BP_ENABLE;
+ b->src = src;
+ bp->break_pt = b;
+ b->bpi = bp;
+
+ /* prepend to list */
+ b->next = breakpoints.next;
+ b->prev = &breakpoints;
+ breakpoints.next = b;
+ b->next->prev = b;
+ return bp;
+}
+
+/* delete_breakpoint --- delete a breakpoint structure and
+ * disable the breakpoint instruction.
+ */
+
+static void
+delete_breakpoint(BREAKPOINT *b)
+{
+ INSTRUCTION *pc = b->bpi;
+ struct commands_item *c;
+
+ /* N.B.: easiest thing to do is to turn Op_breakpoint into a no-op;
+ * deleteing the instruction is not that simple,
+ * since could have reference to it somewhere else (e.g. cur_pc).
+ */
+
+ pc->opcode = Op_no_op;
+ pc->source_line = 0;
+ pc->break_pt = NULL;
+
+ /* delete commands */
+ for (c = b->commands.next; c != &b->commands; c = c->next) {
+ c = c->prev;
+ delete_commands_item(c->next);
+ }
+
+ free_context(b->cndn.ctxt, FALSE);
+ if (b->cndn.expr != NULL)
+ efree(b->cndn.expr);
+
+ /* remove from list */
+ b->next->prev = b->prev;
+ b->prev->next = b->next;
+ efree(b);
+}
+
+/* find_breakpoint --- find the breakpoint structure from a breakpoint number */
+
+static BREAKPOINT *
+find_breakpoint(long num)
+{
+ BREAKPOINT *b;
+
+ if (num <= 0)
+ return NULL;
+
+ for (b = breakpoints.next; b != &breakpoints; b = b->next) {
+ if (b->number == num)
+ return b;
+ }
+ return NULL;
+}
+
+/* add_breakpoint --- add a breakpoint instruction between PREVP and IP */
+
+static BREAKPOINT *
+add_breakpoint(INSTRUCTION *prevp, INSTRUCTION *ip, char *src, int silent)
+{
+ BREAKPOINT *b;
+ INSTRUCTION *bp;
+ int lineno = ip->source_line;
+
+ /* add new breakpoint instruction at the end of
+ * already set breakpoints at this line number.
+ */
+
+ while (ip->opcode == Op_breakpoint && ip->source_line == lineno) {
+ if (! silent) {
+ b = ip->break_pt;
+ /*
+ * This is more verbose that it might otherwise be,
+ * in order to provide easily translatable strings.
+ */
+ if (b->flags & BP_ENABLE) {
+ if (b->flags & BP_IGNORE)
+ fprintf(out_fp,
+ _("Note: breakpoint %d (enabled, ignore next %ld hits), also set at %s:%d"),
+ b->number,
+ b->ignore_count,
+ b->src,
+ lineno);
+ else
+ fprintf(out_fp,
+ _("Note: breakpoint %d (enabled), also set at %s:%d"),
+ b->number,
+ b->src,
+ lineno);
+ } else {
+ if (b->flags & BP_IGNORE)
+ fprintf(out_fp,
+ _("Note: breakpoint %d (disabled, ignore next %ld hits), also set at %s:%d"),
+ b->number,
+ b->ignore_count,
+ b->src,
+ lineno);
+ else
+ fprintf(out_fp,
+ _("Note: breakpoint %d (disabled), also set at %s:%d"),
+ b->number,
+ b->src,
+ lineno);
+ }
+ }
+ prevp = ip;
+ ip = ip->nexti;
+ }
+
+ assert(ip->source_line == lineno);
+
+ bp = mk_breakpoint(src, lineno);
+ prevp->nexti = bp;
+ bp->nexti = ip;
+ b = bp->break_pt;
+ if (! silent)
+ fprintf(out_fp, _("Breakpoint %d set at file `%s', line %d\n"),
+ b->number, src, lineno);
+ return b;
+}
+
+/* set_breakpoint_at --- set a breakpoint at given line number*/
+
+static BREAKPOINT *
+set_breakpoint_at(INSTRUCTION *rp, int lineno, int silent)
+{
+ INSTRUCTION *ip, *prevp;
+
+ for (prevp = rp, ip = rp->nexti; ip; prevp = ip, ip = ip->nexti) {
+ if (ip->source_line >= lineno)
+ return add_breakpoint(prevp, ip, rp->source_file, silent);
+ if (ip == (rp + 1)->lasti)
+ break;
+ }
+ return NULL;
+}
+
+/* set_breakpoint_next --- set a breakpoint at the next instruction */
+
+static BREAKPOINT *
+set_breakpoint_next(INSTRUCTION *rp, INSTRUCTION *ip)
+{
+ INSTRUCTION *prevp;
+
+ if (ip == (rp + 1)->lasti)
+ return NULL;
+ prevp = ip;
+ if (ip->opcode != Op_breakpoint)
+ ip = ip->nexti;
+ for (; ip; prevp = ip, ip = ip->nexti) {
+ if (ip->source_line > 0)
+ return add_breakpoint(prevp, ip, rp->source_file, FALSE);
+ if (ip == (rp + 1)->lasti)
+ break;
+ }
+ return NULL;
+}
+
+/* set_breakpoint --- set a breakpoint */
+
+static int
+set_breakpoint(CMDARG *arg, int temporary)
+{
+ int lineno;
+ BREAKPOINT *b = NULL;
+ INSTRUCTION *rp, *ip;
+ NODE *func;
+ SRCFILE *s = cur_srcfile;
+ char *src = cur_srcfile->src;
+
+ if (arg == NULL) {
+/*
+* (From GDB Documentation):
+*
+* When called without any arguments, break sets a breakpoint at the next instruction
+* to be executed in the selected stack frame (see section Examining the Stack).
+* In any selected frame but the innermost, this makes your program stop as soon
+* as control returns to that frame. This is similar to the effect of a finish command
+* in the frame inside the selected frame--except that finish does not leave an
+* active breakpoint. If you use break without an argument in the innermost frame,
+* GDB stops the next time it reaches the current location; this may be useful
+* inside loops.
+* GDB normally ignores breakpoints when it resumes execution, until at least
+* one instruction has been executed. If it did not do this,
+* you would be unable to proceed past a breakpoint without first disabling the
+* breakpoint. This rule applies whether or not the breakpoint already existed
+* when your program stopped.
+*/
+ CHECK_PROG_RUNNING();
+ if (cur_frame == 0) {
+ src = source;
+ ip = cur_pc;
+ } else {
+ NODE *f;
+ f = find_frame(cur_frame);
+ src = f->vname;
+ ip = (INSTRUCTION *) find_frame(cur_frame - 1)->reti; /* Op_func_call */
+ }
+ rp = find_rule(src, ip->source_line);
+ assert(rp != NULL);
+ if ((b = set_breakpoint_next(rp, ip)) == NULL)
+ fprintf(out_fp, _("Can't set breakpoint in file `%s'\n"), src);
+ else {
+ if (cur_frame == 0) { /* stop next time */
+ b->flags |= BP_IGNORE;
+ b->ignore_count = 1;
+ }
+ if (temporary)
+ b->flags |= BP_TEMP;
+ }
+ return FALSE;
+ }
+
+ /* arg != NULL */
+
+ switch (arg->type) {
+ case D_string: /* break filename:lineno|function */
+ s = source_find(arg->a_string);
+ arg = arg->next;
+ if (s == NULL || arg == NULL
+ || (arg->type != D_int && arg->type != D_func))
+ return FALSE;
+ src = s->src;
+ if (arg->type == D_func) /* break filename:function */
+ goto func;
+ else
+ /* fall through */
+ case D_int: /* break lineno */
+ lineno = (int) arg->a_int;
+ if (lineno <= 0 || lineno > s->srclines)
+ d_error(_("line number %d in file `%s' out of range"), lineno, src);
+ else {
+ rp = find_rule(src, lineno);
+ if (rp == NULL)
+ fprintf(out_fp, _("Can't find rule!!!\n"));
+ if (rp == NULL || (b = set_breakpoint_at(rp, lineno, FALSE)) == NULL)
+ fprintf(out_fp, _("Can't set breakpoint at `%s':%d\n"),
+ src, lineno);
+ if (b != NULL && temporary)
+ b->flags |= BP_TEMP;
+ }
+ break;
+
+ case D_func: /* break function */
+func:
+ func = arg->a_node;
+ rp = func->code_ptr;
+ if ((b = set_breakpoint_at(rp, rp->source_line, FALSE)) == NULL)
+ fprintf(out_fp, _("Can't set breakpoint in function `%s'\n"),
+ func->lnode->param);
+ else if (temporary)
+ b->flags |= BP_TEMP;
+ lineno = b->bpi->source_line;
+ break;
+
+ default:
+ return FALSE;
+ }
+ /* condition if any */
+ arg = arg->next;
+ if (b != NULL && arg != NULL) {
+ if (parse_condition(D_break, b->number, arg->a_string) == 0)
+ arg->a_string = NULL; /* don't let free_cmdarg free it */
+ else
+ fprintf(out_fp, _("breakpoint %d set at file `%s', line %d is unconditional\n"),
+ b->number, src, lineno);
+ }
+ return FALSE;
+}
+
+
+/* breakpoint_triggered --- check if we should stop at this breakpoint */
+
+static int
+breakpoint_triggered(BREAKPOINT *b)
+{
+ if ((b->flags & BP_ENABLE) == 0)
+ return 0;
+ if ((b->flags & BP_IGNORE) != 0) {
+ if (--b->ignore_count <= 0)
+ b->flags &= ~BP_IGNORE;
+ return 0;
+ }
+
+ if (! condition_triggered(&b->cndn))
+ return 0;
+
+ b->hit_count++;
+ if (b->flags & BP_ENABLE_ONCE) {
+ b->flags &= ~BP_ENABLE_ONCE;
+ b->flags &= ~BP_ENABLE;
+ }
+ return b->number;
+}
+
+/* do_breakpoint --- break command */
+
+int
+do_breakpoint(CMDARG *arg, int cmd ATTRIBUTE_UNUSED)
+{
+ return set_breakpoint(arg, FALSE);
+}
+
+/* do_tmp_breakpoint --- tbreak command */
+
+int
+do_tmp_breakpoint(CMDARG *arg, int cmd ATTRIBUTE_UNUSED)
+{
+ return set_breakpoint(arg, TRUE);
+}
+
+/* do_clear --- clear command */
+
+int
+do_clear(CMDARG *arg, int cmd ATTRIBUTE_UNUSED)
+{
+ int lineno;
+ BREAKPOINT *b;
+ INSTRUCTION *rp, *ip;
+ NODE *func;
+ SRCFILE *s = cur_srcfile;
+ char *src = cur_srcfile->src;
+ int bp_found = FALSE;
+
+ if (arg == NULL) { /* clear */
+ CHECK_PROG_RUNNING();
+ if (cur_frame == 0) {
+ lineno = sourceline;
+ src = source;
+ } else {
+ NODE *f;
+ f = find_frame(cur_frame);
+ src = f->vname;
+ lineno = ((INSTRUCTION *) find_frame(cur_frame - 1)->reti)->source_line;
+ }
+ goto delete_bp;
+ }
+
+ switch (arg->type) {
+ case D_string: /* clear filename:lineno|function */
+ s = source_find(arg->a_string);
+ arg = arg->next;
+ if (s == NULL || arg == NULL ||
+ (arg->type != D_int && arg->type != D_func))
+ return FALSE;
+ src = s->src;
+ if (arg->type == D_func)
+ goto func;
+ /* else
+ fall through */
+ case D_int: /* clear lineno */
+ lineno = (int) arg->a_int;
+ if (lineno <= 0 || lineno > s->srclines) {
+ d_error(_("line number %d in file `%s' out of range"), lineno, src);
+ return FALSE;
+ }
+ break;
+
+ case D_func: /* clear function */
+func:
+ func = arg->a_node;
+ rp = func->code_ptr;
+ for (ip = rp->nexti; ip; ip = ip->nexti) {
+ if (ip->source_line <= 0)
+ continue;
+ if (ip->opcode != Op_breakpoint)
+ break;
+ b = ip->break_pt;
+ if (++bp_found == 1)
+ fprintf(out_fp, _("Deleted breakpoint %d"), b->number);
+ else
+ fprintf(out_fp, ", %d", b->number);
+ delete_breakpoint(b);
+ }
+ if (! bp_found)
+ fprintf(out_fp, _("No breakpoint(s) at entry to function `%s'\n"),
+ func->lnode->param);
+ else
+ fprintf(out_fp, "\n");
+ /* fall through */
+ default:
+ return FALSE;
+ }
+
+delete_bp:
+ rp = find_rule(src, lineno);
+ if (rp != NULL) {
+ for (ip = rp->nexti; ip; ip = ip->nexti) {
+ if (ip->opcode == Op_breakpoint && ip->source_line == lineno) {
+ b = ip->break_pt;
+ if (++bp_found == 1)
+ fprintf(out_fp, _("Deleted breakpoint %d"), b->number);
+ else
+ fprintf(out_fp, ", %d", b->number);
+ delete_breakpoint(b);
+ }
+ if (ip == (rp + 1)->lasti)
+ break;
+ }
+ }
+
+ if (! bp_found)
+ fprintf(out_fp, _("No breakpoint at file `%s', line #%d\n"),
+ src, (int) lineno);
+ else
+ fprintf(out_fp, "\n");
+ return FALSE;
+}
+
+/* enable_breakpoint --- enable a breakpoint and set its disposition */
+
+static inline void
+enable_breakpoint(BREAKPOINT *b, short disp)
+{
+ b->flags &= ~(BP_ENABLE_ONCE|BP_TEMP);
+ b->flags |= BP_ENABLE;
+ if (disp)
+ b->flags |= disp;
+}
+
+/* do_enable_breakpoint --- enable command */
+
+int
+do_enable_breakpoint(CMDARG *arg, int cmd ATTRIBUTE_UNUSED)
+{
+ BREAKPOINT *b;
+ short disp = 0;
+
+ if (arg != NULL && arg->type == D_argument) {
+ if (arg->a_argument == A_DEL) /* del */
+ disp = BP_TEMP;
+ else /* once */
+ disp = BP_ENABLE_ONCE;
+ arg = arg->next;
+ }
+
+ if (arg == NULL) { /* enable [once|del] */
+ for (b = breakpoints.next; b != &breakpoints; b = b->next)
+ enable_breakpoint(b, disp);
+ }
+
+ for (; arg != NULL; arg = arg->next) {
+ if (arg->type == D_range) {
+ long i, j;
+
+ i = arg->a_int;
+ arg = arg->next;
+ j = arg->a_int;
+ if (j > breakpoints.number)
+ j = breakpoints.number;
+ for (; i <= j; i++) {
+ if ((b = find_breakpoint(i)) != NULL)
+ enable_breakpoint(b, disp);
+ }
+ } else {
+ assert(arg->type == D_int);
+ if ((b = find_breakpoint(arg->a_int)) == NULL)
+ d_error(_("invalid breakpoint number"));
+ else
+ enable_breakpoint(b, disp);
+ }
+ }
+ return FALSE;
+}
+
+/* do_delete_breakpoint --- delete command */
+
+int
+do_delete_breakpoint(CMDARG *arg, int cmd ATTRIBUTE_UNUSED)
+{
+ if (arg == NULL) {
+ int delete_all = TRUE;
+ delete_all = prompt_yes_no(
+ _("Delete all breakpoints? (y or n) "),
+ _("y")[0], TRUE, out_fp);
+
+ if (delete_all) {
+ while (breakpoints.next != &breakpoints)
+ delete_breakpoint(breakpoints.next);
+ }
+ }
+
+ for (; arg != NULL; arg = arg->next) {
+ BREAKPOINT *b;
+ if (arg->type == D_range) {
+ long i, j;
+
+ i = arg->a_int;
+ arg = arg->next;
+ j = arg->a_int;
+ if (j > breakpoints.number)
+ j = breakpoints.number;
+ for (; i <= j; i++) {
+ if ((b = find_breakpoint(i)) != NULL)
+ delete_breakpoint(b);
+ }
+ } else {
+ if ((b = find_breakpoint(arg->a_int)) == NULL)
+ d_error(_("invalid breakpoint number"));
+ else
+ delete_breakpoint(b);
+ }
+ }
+ return FALSE;
+}
+
+/* do_ignore_breakpoint --- ignore command */
+
+int
+do_ignore_breakpoint(CMDARG *arg, int cmd ATTRIBUTE_UNUSED)
+{
+ BREAKPOINT *b;
+
+ if (arg == NULL || arg->type != D_int
+ || arg->next == NULL || arg->next->type != D_int)
+ return FALSE;
+
+ if ((b = find_breakpoint(arg->a_int)) == NULL)
+ d_error(_("invalid breakpoint number"));
+ else {
+ b->ignore_count = arg->next->a_int;
+ if (b->ignore_count > 0) {
+ b->flags |= BP_IGNORE;
+ fprintf(out_fp, _("Will ignore next %ld crossing(s) of breakpoint %d.\n"),
+ b->ignore_count, b->number);
+ } else {
+ b->flags &= ~BP_IGNORE;
+ fprintf(out_fp, _("Will stop next time breakpoint %d is reached.\n"),
+ b->number);
+ }
+ }
+ return FALSE;
+}
+
+/* do_disable_breakpoint --- disable command */
+
+int
+do_disable_breakpoint(CMDARG *arg, int cmd ATTRIBUTE_UNUSED)
+{
+ BREAKPOINT *b;
+
+ if (arg == NULL) {
+ /* disable all */
+ for (b = breakpoints.next; b != &breakpoints; b = b->next)
+ b->flags &= ~BP_ENABLE;
+ }
+
+ for (; arg != NULL; arg = arg->next) {
+ if (arg->type == D_range) {
+ long i, j;
+
+ i = arg->a_int;
+ arg = arg->next;
+ j = arg->a_int;
+ if (j > breakpoints.number)
+ j = breakpoints.number;
+ for (; i <= j; i++)
+ if ((b = find_breakpoint(i)) != NULL)
+ b->flags &= ~BP_ENABLE;
+ } else {
+ if ((b = find_breakpoint(arg->a_int)) == NULL)
+ d_error(_("invalid breakpoint number"));
+ else
+ b->flags &= ~BP_ENABLE;
+ }
+ }
+ return FALSE;
+}
+
+#ifdef HAVE_LIBREADLINE
+
+/* get_parmlist --- list of function params in current context */
+
+char **
+get_parmlist()
+{
+ NODE *func;
+
+ if (! prog_running)
+ return NULL;
+ func = find_frame(cur_frame)->func_node;
+ if (func == NULL) /* in main */
+ return NULL;
+ return func->parmlist;
+}
+
+/* initialize_readline --- initialize readline */
+
+static void
+initialize_readline()
+{
+ /* tell readline which stream to use for output,
+ * default input stream is stdin.
+ */
+ rl_outstream = out_fp;
+
+ /* allow conditional parsing of the ~/.inputrc file. */
+ rl_readline_name = "gawk";
+
+ /* our completion function. */
+ rl_attempted_completion_function = command_completion;
+
+ read_a_line = readline;
+}
+#else
+#define initialize_readline() /* nothing */
+#endif
+
+
+/* interpret --- debugger entry point */
+
+int
+interpret(INSTRUCTION *pc)
+{
+ char *run;
+
+ input_fd = fileno(stdin);
+ out_fp = stdout;
+ if (isatty(input_fd))
+ input_from_tty = TRUE;
+ if (input_fd == 0 && input_from_tty)
+ initialize_readline();
+
+ if (! read_a_line)
+ read_a_line = g_readline;
+
+ push_cmd_src(input_fd, input_from_tty, read_a_line, 0, 0, EXIT_FATAL);
+
+ setbuf(out_fp, (char *) NULL);
+ for (cur_srcfile = srcfiles->prev; cur_srcfile != srcfiles;
+ cur_srcfile = cur_srcfile->prev) {
+ if (cur_srcfile->stype == SRC_FILE
+ || cur_srcfile->stype == SRC_INC)
+ break;
+ }
+
+ if (cur_srcfile == srcfiles) {
+ fprintf(out_fp, _("Can only debug programs provided with the `-f' option.\n"));
+ exit(EXIT_FAILURE);
+ }
+
+ dgawk_Prompt = estrdup(DEFAULT_PROMPT, strlen(DEFAULT_PROMPT));
+ dPrompt = dgawk_Prompt;
+
+ memset(&stop, 0, sizeof(stop));
+ stop.command = D_illegal;
+
+ if ((run = getenv("DGAWK_RESTART")) != NULL) {
+ /* We are restarting; restore state (breakpoints, history etc.)
+ * passed as environment variables and optionally execute the run command.
+ */
+ unserialize(BREAK);
+ unserialize(WATCH);
+ unserialize(DISPLAY);
+ unserialize(HISTORY);
+ unserialize(OPTION);
+ unsetenv("DGAWK_RESTART");
+ fprintf(out_fp, "Restarting ...\n");
+ if (run[0] == 'T')
+ (void) do_run(NULL, 0);
+
+ } else if (command_file != NULL) {
+ /* run commands from a file (--command=file or -R file) */
+ int fd;
+ fd = open_readfd(command_file);
+ if (fd == INVALID_HANDLE) {
+ fprintf(stderr, _("can't open source file `%s' for reading (%s)"),
+ command_file, strerror(errno));
+ exit(EXIT_FAILURE);
+ }
+ push_cmd_src(fd, FALSE, g_readline, close, 0, EXIT_FAILURE);
+ cmd_src->str = estrdup(command_file, strlen(command_file));
+
+ } else {
+ int fd;
+
+#ifdef HAVE_LIBREADLINE
+ (void) read_history(history_file);
+ sess_history_base = history_length;
+#endif
+
+ /* read saved options */
+ fd = open_readfd(options_file);
+ if (fd > INVALID_HANDLE)
+ push_cmd_src(fd, FALSE, g_readline, close, 0, EXIT_SUCCESS);
+ }
+
+ /* start the command interpreter */
+ read_command(); /* yyparse */
+ return EXIT_SUCCESS;
+}
+
+
+/* N.B.: ignore breakpoints and watchpoints for return command */
+
+/* check_watchpoint --- check if any watchpoint triggered */
+
+static int
+check_watchpoint()
+{
+ struct list_item *w;
+
+ if (stop.command == D_return)
+ return FALSE;
+ for (w = watch_list.prev; w != &watch_list; w = w->prev) {
+ int wnum = watchpoint_triggered(w);
+ if (wnum > 0) {
+ stop.watch_point = wnum;
+ stop.print_frame = TRUE;
+ return TRUE;
+ }
+ }
+ return FALSE;
+}
+
+/* check_breakpoint --- check if breakpoint triggered */
+
+static int
+check_breakpoint(INSTRUCTION **pi)
+{
+ INSTRUCTION *pc;
+
+ pc = *pi;
+ if (stop.command == D_return)
+ return FALSE;
+ if (pc->opcode == Op_breakpoint) {
+ int bnum;
+ *pi = pc->nexti; /* skip past the breakpoint instruction;
+ * interpreter doesn't process Op_breakpoint.
+ */
+ bnum = breakpoint_triggered(pc->break_pt);
+ if (bnum > 0) {
+ stop.break_point = bnum;
+ stop.print_frame = TRUE;
+ return TRUE;
+ }
+ }
+ return FALSE;
+}
+
+/* restart --- restart the debugger */
+
+static void
+restart(int run)
+{
+ /* save state in the environment after serialization */
+ serialize(BREAK);
+ serialize(WATCH);
+ serialize(DISPLAY);
+ serialize(HISTORY);
+ serialize(OPTION);
+
+ /* tell the new process to restore state from the environment */
+ setenv("DGAWK_RESTART", (run ? "TRUE" : "FALSE"), 1);
+
+ /* close all open files */
+ close_all();
+
+ /* start a new process replacing the current process */
+ execvp(d_argv[0], d_argv);
+
+ /* execvp failed !!! */
+ fprintf(out_fp, _("Failed to restart debugger"));
+ exit(EXIT_FAILURE);
+}
+
+/* do_run --- run command */
+
+int
+do_run(CMDARG *arg ATTRIBUTE_UNUSED, int cmd ATTRIBUTE_UNUSED)
+{
+ if (prog_running) {
+ if (! input_from_tty)
+ need_restart = TRUE; /* handled later */
+ else {
+ need_restart = prompt_yes_no(
+ _("Program already running. Restart from beginning (y/n)? "),
+ _("y")[0], FALSE, out_fp);
+
+ if (! need_restart) {
+ fprintf(out_fp, _("Program not restarted\n"));
+ return FALSE;
+ }
+ }
+ }
+
+ if (need_restart) {
+ /* avoid endless cycles of restarting */
+ if (command_file != NULL) {
+ /* input_from_tty = FALSE */
+ fprintf(stderr, _("error: cannot restart, operation not allowed\n"));
+ exit(EXIT_FAILURE);
+ }
+
+ if (cmd_src->cmd == D_source) {
+ /* input_from_tty = FALSE */
+ fprintf(out_fp, _("error (%s): cannot restart, ignoring rest of the commands\n"), cmd_src->str);
+ pop_cmd_src();
+ return FALSE;
+ }
+
+ restart(TRUE); /* does not return */
+ }
+
+ fprintf(out_fp, _("Starting program: \n"));
+
+ prog_running = TRUE;
+ fatal_tag_valid = TRUE;
+ if (setjmp(fatal_tag) == 0)
+ (void) r_interpret(code_block);
+
+ fatal_tag_valid = FALSE;
+ prog_running = FALSE;
+ fprintf(out_fp, _("Program exited %s with exit value: %d\n"),
+ (! exiting && exit_val != EXIT_SUCCESS) ? "abnormally"
+ : "normally",
+ exit_val);
+ need_restart = TRUE;
+ return FALSE;
+}
+
+/* do_quit --- quit command */
+
+int
+do_quit(CMDARG *arg ATTRIBUTE_UNUSED, int cmd ATTRIBUTE_UNUSED)
+{
+ int terminate = TRUE;
+ if (prog_running)
+ terminate = prompt_yes_no(
+ _("The program is running. Exit anyway (y/n)? "),
+ _("y")[0], TRUE, out_fp);
+ if (terminate) {
+ close_all();
+ do_trace = FALSE; /* don't save 'trace on' */
+
+#ifdef HAVE_LIBREADLINE
+ if (do_save_history && input_from_tty) {
+ int ret;
+ ret = write_history(history_file);
+ if (ret == 0 && history_length > history_size)
+ (void) history_truncate_file(history_file, history_size);
+ }
+#endif
+ if (do_save_options && input_from_tty)
+ save_options(options_file);
+
+ exit(exit_val);
+ }
+ return FALSE;
+}
+
+/* do_continue --- continue command */
+
+int
+do_continue(CMDARG *arg, int cmd ATTRIBUTE_UNUSED)
+{
+ BREAKPOINT *b;
+
+ CHECK_PROG_RUNNING();
+ if (! arg || arg->type != D_int)
+ return TRUE;
+
+ /* arg is breakpoint ignore count if stopped at a breakpoint */
+ if (! stop.break_point) {
+ fprintf(out_fp, _("Not stopped at any breakpoint; argument ignored.\n"));
+ return TRUE;
+ }
+ b = find_breakpoint(stop.break_point);
+ if (b == NULL) {
+ d_error(_("invalid breakpoint number %d."), stop.break_point);
+ return FALSE;
+ }
+ b->flags |= BP_IGNORE;
+ b->ignore_count = arg->a_int;
+ fprintf(out_fp, _("Will ignore next %ld crossings of breakpoint %d.\n"),
+ b->ignore_count, stop.break_point);
+ return TRUE;
+}
+
+/* next_step --- common code for next and step commands */
+
+static int
+next_step(CMDARG *arg, int cmd)
+{
+ CHECK_PROG_RUNNING();
+ if (arg != NULL && arg->type == D_int)
+ stop.repeat_count = arg->a_int;
+ else
+ stop.repeat_count = 1;
+ stop.command = cmd;
+ return TRUE;
+}
+
+/* check_step --- process step command, return TRUE if stopping */
+
+static int
+check_step(INSTRUCTION **pi)
+{
+ if (fcall_count != stop.fcall_count) {
+ stop.fcall_count = fcall_count;
+ stop.sourceline = sourceline;
+ stop.source = source;
+ stop.print_frame = TRUE;
+ return (--stop.repeat_count == 0);
+ }
+
+ if (source != stop.source) {
+ stop.source = source;
+ stop.sourceline = sourceline;
+ return (--stop.repeat_count == 0);
+ }
+
+ if (sourceline != stop.sourceline) {
+ stop.sourceline = sourceline;
+ return (--stop.repeat_count == 0);
+ }
+ return FALSE;
+}
+
+/* do_step -- process step command, return TRUE if stopping */
+
+int
+do_step(CMDARG *arg, int cmd)
+{
+ int ret;
+ ret = next_step(arg, cmd);
+ if (ret) {
+ stop.fcall_count = fcall_count;
+ stop.source = source;
+ stop.sourceline = sourceline;
+ stop.check_func = check_step;
+ }
+ return ret;
+}
+
+/* do_stepi -- process stepi command, return TRUE if stopping */
+
+static int
+check_stepi(INSTRUCTION **pi)
+{
+ return (--stop.repeat_count == 0);
+}
+
+/* do_stepi -- stepi command */
+
+int
+do_stepi(CMDARG *arg, int cmd)
+{
+ int ret;
+ ret = next_step(arg, cmd);
+ if (ret)
+ stop.check_func = check_stepi;
+ return ret;
+}
+
+
+/* check_next -- process next command returning TRUE if stopping */
+
+static int
+check_next(INSTRUCTION **pi)
+{
+ /* make sure not to step inside function calls */
+
+ if (fcall_count < stop.fcall_count) {
+ stop.fcall_count = fcall_count;
+ stop.sourceline = sourceline;
+ stop.source = source;
+ stop.print_frame = TRUE;
+ return (--stop.repeat_count == 0);
+ }
+
+ if (fcall_count == stop.fcall_count) {
+ if (source != stop.source) {
+ stop.source = source;
+ stop.sourceline = sourceline;
+ return (--stop.repeat_count == 0);
+ }
+ if (sourceline != stop.sourceline) {
+ stop.sourceline = sourceline;
+ return (--stop.repeat_count == 0);
+ }
+ }
+
+#if 0
+ /* redundant ? */
+ if (fcall_count > stop.fcall_count) {
+ stop.source = source;
+ stop.sourceline = sourceline;
+ }
+#endif
+
+ return FALSE;
+}
+
+/* do_next -- next command */
+
+int
+do_next(CMDARG *arg, int cmd)
+{
+ int ret;
+
+ ret = next_step(arg, cmd);
+ if (ret) {
+ stop.source = source;
+ stop.sourceline = sourceline;
+ stop.fcall_count = fcall_count;
+ stop.check_func = check_next;
+ }
+ return ret;
+}
+
+/* check_nexti --- process nexti command, returns TRUE if stopping */
+
+static int
+check_nexti(INSTRUCTION **pi)
+{
+
+ /* make sure not to step inside function calls */
+
+ if (fcall_count < stop.fcall_count) {
+ stop.print_frame = TRUE;
+ stop.fcall_count = fcall_count;
+ }
+ return (fcall_count == stop.fcall_count
+ && --stop.repeat_count == 0);
+}
+
+/* do_nexti -- nexti command */
+
+int
+do_nexti(CMDARG *arg, int cmd)
+{
+ int ret;
+
+ ret = next_step(arg, cmd);
+ if (ret) {
+ stop.fcall_count = fcall_count;
+ stop.check_func = check_nexti;
+ }
+ return ret;
+}
+
+/* check_finish --- process finish command, returns TRUE if stopping */
+
+static int
+check_finish(INSTRUCTION **pi)
+{
+ if (fcall_count == stop.fcall_count) {
+ stop.print_frame = TRUE;
+ return TRUE;
+ }
+ return FALSE;
+}
+
+/* do_finish --- finish command */
+
+int
+do_finish(CMDARG *arg ATTRIBUTE_UNUSED, int cmd)
+{
+ CHECK_PROG_RUNNING();
+ if (cur_frame == fcall_count) {
+ fprintf(out_fp,
+ _("'finish' not meaningful in the outermost frame main()\n"));
+ return FALSE;
+ }
+ stop.fcall_count = fcall_count - cur_frame - 1;
+ assert(stop.fcall_count >= 0);
+ fprintf(out_fp, _("Run till return from "));
+ print_numbered_frame(cur_frame);
+ stop.check_func = check_finish;
+ stop.command = cmd;
+ stop.print_ret = TRUE;
+ return TRUE;
+}
+
+/* check_return --- process return, returns TRUE if stopping */
+
+static int
+check_return(INSTRUCTION **pi)
+{
+ assert(fcall_count >= stop.fcall_count);
+
+ if (fcall_count == stop.fcall_count) {
+ stop.print_frame = TRUE;
+ return TRUE;
+ }
+
+ if (fcall_count > stop.fcall_count) { /* innermost frame just returned */
+ /* force this one to return too */
+ NODE *func;
+
+ func = find_frame(cur_frame)->func_node;
+ assert(func != NULL);
+ *pi = (func->code_ptr + 1)->lasti;
+ /* assert((*pi)->opcode == Op_K_return); */
+ }
+
+ return FALSE;
+}
+
+/* do_return --- return command */
+
+int
+do_return(CMDARG *arg, int cmd)
+{
+ NODE *func;
+
+ CHECK_PROG_RUNNING();
+ func = find_frame(cur_frame)->func_node;
+ if (func == NULL) {
+ fprintf(out_fp, _("'return' not meaningful in the outermost frame main()\n"));
+ return FALSE;
+ }
+
+ stop.fcall_count = fcall_count - cur_frame - 1;
+ assert(stop.fcall_count >= 0);
+ stop.pc = (func->code_ptr + 1)->lasti;
+ assert(stop.pc->opcode == Op_K_return);
+ stop.command = cmd;
+
+ stop.check_func = check_return;
+
+ if (arg != NULL && arg->type == D_node) { /* optional return value */
+ NODE *n;
+ n = dupnode(arg->a_node);
+ PUSH(n);
+ } else
+ PUSH(Nnull_string);
+
+ return TRUE;
+}
+
+/* check_until --- process until, returns TRUE if stopping */
+
+int
+check_until(INSTRUCTION **pi)
+{
+ if (fcall_count < stop.fcall_count) { /* current stack frame returned */
+ stop.print_frame = TRUE;
+ return TRUE;
+ } else if (fcall_count == stop.fcall_count) {
+ if (stop.pc && *pi == stop.pc) /* until location */
+ return TRUE;
+ if (stop.sourceline > 0 /* until */
+ && source == stop.source
+ && sourceline > stop.sourceline)
+ return TRUE;
+ }
+ return FALSE;
+}
+
+/* do_until --- until command */
+
+int
+do_until(CMDARG *arg, int cmd)
+{
+ SRCFILE *s = cur_srcfile;
+ char *src = cur_srcfile->src;
+ int lineno;
+ INSTRUCTION *rp, *ip;
+ NODE *func;
+
+ CHECK_PROG_RUNNING();
+ stop.pc = NULL;
+ stop.sourceline = 0;
+
+ if (arg == NULL) { /* until without argument */
+
+ /* GDB doc.: continue running until a source line past the current line,
+ * in the current stack frame, is reached. Is used to avoid single
+ * stepping through a loop more than once. ...
+ * This means that when you reach the end of a loop after single
+ * stepping though it, until makes your program continue execution
+ * until it exits the loop. In contrast, a next command at the end
+ * of a loop simply steps back to the beginning of the loop, which
+ * forces you to step through the next iteration.
+ */
+
+ stop.source = source;
+ stop.sourceline = sourceline;
+ stop.fcall_count = fcall_count - cur_frame;
+ stop.check_func = check_until;
+ stop.command = cmd;
+ return TRUE;
+ }
+
+ /* GDB: until location - continue running program until
+ * either the specified location is reached, or the
+ * current stack frame returns.
+ */
+
+ switch (arg->type) {
+ case D_string: /* until filename : lineno|function */
+ s = source_find(arg->a_string);
+ arg = arg->next;
+ if (s == NULL || arg == NULL
+ || (arg->type != D_int && arg->type != D_func))
+ return FALSE;
+ src = s->src;
+ if (arg->type == D_func)
+ goto func;
+ /* else
+ fall through */
+ case D_int: /* until lineno */
+ lineno = arg->a_int;
+ if (lineno <= 0 || lineno > s->srclines) {
+ d_error(_("line number %d in file `%s' out of range"),
+ lineno, src);
+ return FALSE;
+ }
+ break;
+
+ case D_func: /* until function */
+func:
+ func = arg->a_node;
+ rp = func->code_ptr;
+ for (ip = rp->nexti; ip; ip = ip->nexti) {
+ if (ip->opcode != Op_breakpoint && ip->source_line > 0) {
+ stop.pc = ip;
+ stop.fcall_count = fcall_count - cur_frame;
+ stop.check_func = check_until;
+ stop.command = cmd;
+ return TRUE;
+ }
+ }
+ fprintf(out_fp, _("Can't find specified location in function `%s'\n"),
+ func->lnode->param);
+ /* fall through */
+ default:
+ return FALSE;
+ }
+
+ if ((rp = find_rule(src, lineno)) == NULL) {
+ d_error(_("invalid source line %d in file `%s'"), lineno, src);
+ return FALSE;
+ }
+
+ for (ip = rp->nexti; ip; ip = ip->nexti) {
+ if (ip->opcode != Op_breakpoint && ip->source_line >= lineno) {
+ stop.pc = ip;
+ stop.fcall_count = fcall_count - cur_frame;
+ stop.check_func = check_until;
+ stop.command = cmd;
+ return TRUE;
+ }
+ if (ip == (rp + 1)->lasti)
+ break;
+ }
+ fprintf(out_fp, _("Can't find specified location %d in file `%s'\n"),
+ lineno, src);
+ return FALSE;
+}
+
+/* print_watch_item --- print watched item name, old and current values */
+
+static void
+print_watch_item(struct list_item *w)
+{
+ NODE *symbol, *sub;
+ int i;
+
+ symbol = w->symbol;
+ if (IS_SUBSCRIPT(w)) {
+ fprintf(out_fp, "%s", w->sname);
+ for (i = 0; i < w->num_subs; i++) {
+ sub = w->subs[i];
+ fprintf(out_fp, "[\"%s\"]", sub->stptr);
+ }
+ fprintf(out_fp, "\n");
+ } else if (IS_FIELD(w))
+ fprintf(out_fp, "$%ld\n", (long) symbol->numbr);
+ else
+ fprintf(out_fp, "%s\n", w->sname);
+
+
+#define print_value(X, S, V) \
+if (X) \
+ fprintf(out_fp, "array, %ld elements\n", w->S); \
+else if (! w->V) \
+ fprintf(out_fp, IS_SUBSCRIPT(w) ? \
+ _("element not in array\n") : _("untyped variable\n")); \
+else \
+ valinfo(w->V, fprintf, out_fp);
+
+ fprintf(out_fp, " Old value: ");
+ print_value((w->flags & OLD_IS_ARRAY), old_size, old_value);
+ fprintf(out_fp, " New value: ");
+ print_value((w->flags & CUR_IS_ARRAY), cur_size, cur_value);
+
+#undef print_value
+}
+
+/* next_command --- (optionally) print stoppage location and reason;
+ * also fetch next debug command from the user.
+ */
+
+static void
+next_command()
+{
+ static int last_rule = 0;
+ struct list_item *d = NULL, *w = NULL;
+ BREAKPOINT *b = NULL;
+ SRCFILE *s;
+
+ if (source == NULL) {
+ stop.command = D_illegal;
+ stop.check_func = NULL;
+ return;
+ }
+
+ if (stop.break_point) {
+ b = find_breakpoint(stop.break_point);
+ assert(b != NULL);
+ if (b->silent)
+ goto no_output;
+ } else if (stop.watch_point) {
+ w = find_item(&watch_list, stop.watch_point);
+ if (w->silent)
+ goto no_output;
+ }
+
+ if (cur_rule != last_rule) {
+ fprintf(out_fp, _("Stopping in %s ...\n"), ruletab[cur_rule]);
+ last_rule = cur_rule;
+ }
+
+ if (b != NULL)
+ fprintf(out_fp, "Breakpoint %d, ", b->number);
+ else if (w != NULL) {
+ fprintf(out_fp, "Watchpoint %d: ", w->number);
+ print_watch_item(w);
+ }
+
+ /* frame info */
+ if (stop.print_frame) {
+ print_frame(frame_ptr->func_node, source, sourceline);
+ fprintf(out_fp, "\n");
+ stop.print_frame = FALSE;
+ }
+
+ (void) print_lines(source, sourceline, 1);
+
+ /* automatic display of variables */
+ for (d = display_list.prev; d != &display_list; d = d->prev)
+ display(d);
+
+no_output:
+ /* update last_printed_line, so that output of 'list' is
+ * centered around current sourceline
+ */
+
+ last_printed_line = sourceline - list_size / 2;
+ if (last_printed_line < 0)
+ last_printed_line = 0;
+
+ /* update current source file */
+ s = source_find(source);
+ if (cur_srcfile != s) {
+ if (cur_srcfile->fd != INVALID_HANDLE) {
+ close(cur_srcfile->fd);
+ cur_srcfile->fd = INVALID_HANDLE;
+ }
+ cur_srcfile = s;
+ }
+
+ stop.command = D_illegal;
+ stop.check_func = NULL;
+
+ if (b != NULL) {
+ int ret;
+ ret = execute_commands(&b->commands);
+ if ((b->flags & BP_TEMP) != 0)
+ delete_breakpoint(b);
+ if (ret) /* resume execution */
+ return;
+ } else if (w != NULL && execute_commands(&w->commands))
+ return;
+
+ read_command(); /* zzparse */
+}
+
+/* post_execute --- post_hook in the interpreter */
+
+void
+post_execute(INSTRUCTION *pc, int inloop)
+{
+ if (get_context()->level > 0)
+ return;
+
+ switch (pc->opcode) {
+ case Op_K_break:
+ case Op_K_continue:
+ if (inloop)
+ break;
+ /* else
+ fall through */
+ case Op_K_next:
+ case Op_K_nextfile:
+ case Op_K_exit:
+ if (stop.command == D_finish) {
+ /* cancel finish command */
+ stop.print_ret = FALSE;
+ stop.print_frame = FALSE;
+ stop.command = D_illegal;
+ stop.check_func = NULL;
+ fprintf(out_fp, _("'finish' not meaningful with non-local jump '%s'\n"),
+ op2str(pc->opcode));
+ } else if (stop.command == D_until) {
+ /* cancel until command */
+ stop.print_frame = FALSE;
+ stop.command = D_illegal;
+ stop.check_func = NULL;
+ fprintf(out_fp, _("'until' not meaningful with non-local jump '%s'\n"),
+ op2str(pc->opcode));
+ }
+ break;
+
+ case Op_K_return:
+ if (stop.command == D_finish
+ && fcall_count == stop.fcall_count
+ && stop.print_ret
+ ) {
+ NODE *r;
+
+ assert(stack_empty() == FALSE);
+ /* print the returned value before it disappears. */
+ r = TOP();
+ fprintf(out_fp, "Returned value = ");
+ valinfo(r, fprintf, out_fp);
+ stop.print_ret = FALSE;
+ }
+ break;
+
+ case Op_newfile:
+ case Op_get_record:
+ return;
+
+ default:
+ break;
+ }
+}
+
+/* pre_execute --- pre_hook, called by the interpreter before execution;
+ * checks if execution needs to be suspended and control
+ * transferred to the debugger.
+ */
+
+int
+pre_execute(INSTRUCTION **pi, int inloop)
+{
+ static int cant_stop = FALSE;
+ NODE *m;
+
+ if (get_context()->level > 0)
+ return pre_execute_code(pi, inloop);
+
+ cur_pc = *pi;
+ stop.break_point = 0;
+ stop.watch_point = 0;
+ cur_frame = 0;
+
+ if (do_trace
+ && cur_pc->opcode != Op_breakpoint
+ && stop.command != D_return
+ )
+ print_instruction(cur_pc, fprintf, out_fp, FALSE);
+
+/* N.B.: For Op_field_spec_lhs must execute instructions upto Op_field_assign
+ * as a group before stopping. Otherwise, watch/print of field variables
+ * yield surprising results. Ditto for Op_push_lhs for special variables
+ * (upto Op_var_assign, the set_FOO routine).
+ */
+
+ switch (cur_pc->opcode) {
+ case Op_field_spec_lhs:
+ cant_stop = TRUE;
+ break;
+
+ case Op_field_assign:
+ cant_stop = FALSE;
+ return TRUE; /* may stop at next instruction */
+
+ case Op_push_lhs:
+ m = cur_pc->memory;
+ if (m->type == Node_var && m->var_assign)
+ cant_stop = TRUE;
+ break;
+
+ case Op_arrayfor_incr: /* can have special var as array variable !!! */
+ m = cur_pc->array_var;
+ if (m->type == Node_var && m->var_assign)
+ cant_stop = TRUE;
+ break;
+
+ case Op_pop_loop: /* need to unset cant_stop for Op_arrayfor_incr */
+ case Op_var_assign:
+ cant_stop = FALSE;
+ return TRUE; /* may stop at next instruction */
+
+ case Op_rule:
+ cur_rule = cur_pc->in_rule;
+ return TRUE;
+
+ case Op_func:
+ case Op_ext_func:
+ case Op_var_update:
+ return TRUE;
+
+ case Op_breakpoint:
+ break; /* processed later in check_breakpoint() */
+
+ default:
+ if (cur_pc->source_line <= 0)
+ return TRUE;
+ break;
+ }
+
+ if (cant_stop)
+ return TRUE;
+
+ assert(sourceline > 0);
+
+ if (check_breakpoint(pi)
+ || check_watchpoint()
+ || (stop.check_func && stop.check_func(pi))) {
+ next_command(); /* return to debugger interface */
+ if (stop.command == D_return)
+ *pi = stop.pc; /* jump to this instruction */
+ }
+
+ /* if cur_pc == *pi, interpreter executes cur_pc;
+ * Otherwise, jumps to instruction *pi.
+ */
+ return (cur_pc == *pi);
+}
+
+/* print_memory --- print a scalar value */
+
+static void
+print_memory(NODE *m, char **fparms, Func_print print_func, FILE *fp)
+{
+ switch (m->type) {
+ case Node_val:
+ if (m == Nnull_string)
+ print_func(fp, "Nnull_string");
+ else if ((m->flags & NUMBER) != 0)
+ print_func(fp, "%g", m->numbr);
+ else if ((m->flags & STRING) != 0)
+ pp_string_fp(print_func, fp, m->stptr, m->stlen, '"', FALSE);
+ else if ((m->flags & NUMCUR) != 0)
+ print_func(fp, "%g", m->numbr);
+ else if ((m->flags & STRCUR) != 0)
+ pp_string_fp(print_func, fp, m->stptr, m->stlen, '"', FALSE);
+ else
+ print_func(fp, "-?-");
+ print_func(fp, " [%s]", flags2str(m->flags));
+ break;
+
+ case Node_regex:
+ pp_string_fp(print_func, fp, m->re_exp->stptr, m->re_exp->stlen, '/', FALSE);
+ break;
+
+ case Node_dynregex:
+ break;
+
+ case Node_param_list:
+ assert(fparms != NULL);
+ print_func(fp, "%s", fparms[m->param_cnt]);
+ break;
+
+ case Node_var:
+ case Node_var_new:
+ case Node_var_array:
+ print_func(fp, "%s", m->vname);
+ break;
+
+ default:
+ print_func(fp, "?"); /* can't happen */
+ }
+}
+
+/* print_instruction --- print a bytecode */
+
+static void
+print_instruction(INSTRUCTION *pc, Func_print print_func, FILE *fp, int in_dump)
+{
+ static char **fparms = NULL;
+ int pcount = 0;
+ NODE *func = NULL;
+ static int noffset = 0;
+
+ if (noffset == 0) {
+ static char buf[50];
+ /* offset for 2nd to last lines in a multi-line output */
+ noffset = sprintf(buf, "[ :%p] %-20.20s: ", pc, opcode2str(pc->opcode));
+ }
+
+ if (pc->opcode == Op_func) {
+ func = pc->func_body;
+ fparms = get_params(func);
+ pcount = get_param_count(func);
+ if (in_dump) {
+ int j;
+ print_func(fp, "\n\t# Function: %s (", func->lnode->param);
+ for (j = 0; j < pcount; j++) {
+ print_func(fp, "%s", fparms[j]);
+ if (j < pcount - 1)
+ print_func(fp, ", ");
+ }
+ print_func(fp, ")\n\n");
+ }
+ } else if (pc->opcode == Op_ext_func) {
+ func = pc->func_body;
+ fparms = get_params(func);
+ pcount = get_param_count(func);
+ if (in_dump)
+ print_func(fp, "\n\t# Extension function: %s (... %d params ...)\n\n",
+ func->lnode->param, pcount);
+ } else if (pc->opcode == Op_rule) {
+ if (in_dump)
+ print_func(fp, "\n\t# %s\n\n", ruletab[pc->in_rule]);
+ }
+
+ if (pc->opcode == Op_newfile)
+ print_func(fp, "\n");
+
+ if (pc->source_line <= 0)
+ print_func(fp, "[ :%p] %-20.20s: ", pc, opcode2str(pc->opcode));
+ else
+ print_func(fp, "[%6d:%p] %-20.20s: ",
+ pc->source_line, pc, opcode2str(pc->opcode));
+
+ if (prog_running && ! in_dump) {
+ /* find params in the current frame */
+ func = find_frame(0)->func_node;
+ if (func != NULL)
+ fparms = get_params(func);
+ /* else
+ fparms = NULL; */
+ }
+
+
+ switch (pc->opcode) {
+ case Op_var_update:
+ print_func(fp, "[update_%s]\n", pc->memory->vname);
+ break;
+
+ case Op_var_assign:
+ print_func(fp, "[set_%s]\n", pc->memory->vname);
+ break;
+
+ case Op_field_spec_lhs:
+ print_func(fp, "[target_assign = %p] [do_reference = %s]\n",
+ pc->target_assign, pc->do_reference ? "TRUE" : "FALSE");
+ break;
+
+ case Op_ext_func:
+ print_func(fp, "[param_cnt = %d]\n", pcount);
+ break;
+
+ case Op_func:
+ print_func(fp, "[param_cnt = %d] [source_file = %s]\n", pcount,
+ pc->source_file ? pc->source_file : "cmd. line");
+ break;
+
+ case Op_K_getline_redir:
+ print_func(fp, "[into_var = %s] [redir_type = \"%s\"]\n",
+ pc->into_var ? "TRUE" : "FALSE",
+ redir2str(pc->redir_type));
+ break;
+
+ case Op_K_getline:
+ print_func(fp, "[into_var = %s]\n", pc->into_var ? "TRUE" : "FALSE");
+ print_func(fp, "%*s[target_beginfile = %p] [target_endfile = %p]\n",
+ noffset, "",
+ (pc + 1)->target_beginfile, (pc + 1)->target_endfile);
+ break;
+
+ case Op_K_print_rec:
+ print_func(fp, "[redir_type = \"%s\"]\n", redir2str(pc->redir_type));
+ break;
+
+ case Op_K_print:
+ case Op_K_printf:
+ print_func(fp, "[expr_count = %ld] [redir_type = \"%s\"]\n",
+ pc->expr_count, redir2str(pc->redir_type));
+ break;
+
+ case Op_indirect_func_call:
+ case Op_func_call:
+ print_func(fp, "[func_name = %s] [arg_count = %ld]\n",
+ pc->func_name, (pc + 1)->expr_count);
+ break;
+
+ case Op_push_loop:
+ if (pc->target_continue != NULL)
+ print_func(fp, "[target_continue = %p] [target_break = %p]\n",
+ pc->target_continue, pc->target_break);
+ else
+ print_func(fp, "[target_break = %p]\n", pc->target_break);
+ break;
+
+ case Op_K_nextfile:
+ case Op_newfile:
+ print_func(fp, "[target_jmp = %p] [target_endfile = %p]\n",
+ pc->target_jmp, pc->target_endfile);
+ break;
+
+ case Op_jmp:
+ case Op_jmp_false:
+ case Op_jmp_true:
+ case Op_and:
+ case Op_or:
+ case Op_K_next:
+ case Op_arrayfor_init:
+ case Op_K_break:
+ case Op_K_continue:
+ case Op_K_exit:
+ print_func(fp, "[target_jmp = %p]\n", pc->target_jmp);
+ break;
+
+ case Op_arrayfor_incr:
+ print_func(fp, "[array_var = %s] [target_jmp = %p]\n",
+ pc->array_var->type == Node_param_list ?
+ fparms[pc->array_var->param_cnt] : pc->array_var->vname,
+ pc->target_jmp);
+ break;
+
+ case Op_line_range:
+ print_func(fp, "[triggered = %ld] [target_jmp = %p]\n",
+ pc->triggered, pc->target_jmp);
+ break;
+
+ case Op_cond_pair:
+ print_func(fp, "[line_range = %p] [target_jmp = %p]\n",
+ pc->line_range, pc->target_jmp);
+ break;
+
+ case Op_builtin:
+ {
+ const char *fname = getfname(pc->builtin);
+ if (fname == NULL)
+ print_func(fp, "(extension func) [arg_count = %ld]\n", pc->expr_count);
+ else
+ print_func(fp, "%s [arg_count = %ld]\n", fname, pc->expr_count);
+ }
+ break;
+
+ case Op_subscript:
+ case Op_sub_array:
+ print_func(fp, "[sub_count = %ld]\n", pc->sub_count);
+ break;
+
+ case Op_store_sub:
+ print_memory(pc->memory, fparms, print_func, fp);
+ print_func(fp, " [sub_count = %ld]\n", pc->expr_count);
+ break;
+
+ case Op_subscript_lhs:
+ print_func(fp, "[sub_count = %ld] [do_reference = %s]\n",
+ pc->sub_count,
+ pc->do_reference ? "TRUE" : "FALSE");
+ break;
+
+ case Op_K_delete:
+ case Op_in_array:
+ print_func(fp, "[expr_count = %ld]\n", pc->expr_count);
+ break;
+ case Op_concat:
+ /* NB: concat_flag CSVAR only used in grammar, don't display it */
+ print_func(fp, "[expr_count = %ld] [concat_flag = %s]\n",
+ pc->expr_count,
+ (pc->concat_flag & CSUBSEP) ? "CSUBSEP" : "0");
+ break;
+
+ case Op_rule:
+ print_func(fp, "[in_rule = %s] [source_file = %s]\n",
+ ruletab[pc->in_rule],
+ pc->source_file ? pc->source_file : "cmd. line");
+ break;
+
+ case Op_lint:
+ {
+ static const char *const linttypetab[] = {
+ "LINT_illegal",
+ "LINT_assign_in_cond",
+ "LINT_no_effect"
+ };
+ print_func(fp, "[lint_type = %s]\n", linttypetab[pc->lint_type]);
+ }
+ break;
+
+ case Op_exec_count:
+ print_func(fp, "[exec_count = %ld]\n", pc->exec_count);
+ break;
+
+ case Op_K_switch:
+ {
+ INSTRUCTION *curr;
+ print_func(fp, "[case_val = %p ] [switch_dflt = %p]\n",
+ pc->case_val, pc->switch_dflt);
+
+ for (curr = pc->case_val; curr != NULL; curr = curr->nexti) {
+ print_func(fp, "[%6d:%p] %-20.20s: ",
+ curr->source_line, curr, opcode2str(curr->opcode));
+ if (curr->opcode == Op_K_case) {
+ print_func(fp, "case: ");
+ print_memory(curr->memory, fparms, print_func, fp);
+ }
+ print_func(fp, " [target_stmt = %p]\n", curr->target_stmt);
+ }
+ }
+ break;
+
+ case Op_store_var:
+ case Op_push_lhs:
+ print_memory(pc->memory, fparms, print_func, fp);
+ print_func(fp, " [do_reference = %s]\n",
+ pc->do_reference ? "TRUE" : "FALSE");
+ break;
+
+ case Op_push_i:
+ case Op_push:
+ case Op_push_param:
+ case Op_push_array:
+ case Op_push_re:
+ case Op_match_rec:
+ case Op_match:
+ case Op_nomatch:
+ case Op_plus_i:
+ case Op_minus_i:
+ case Op_times_i:
+ case Op_exp_i:
+ case Op_quotient_i:
+ case Op_mod_i:
+ case Op_assign_concat:
+ print_memory(pc->memory, fparms, print_func, fp);
+ /* fall through */
+ default:
+ print_func(fp, "\n");
+ break;
+ }
+}
+
+/* do_trace_instruction --- trace command */
+
+int
+do_trace_instruction(CMDARG *arg, int cmd ATTRIBUTE_UNUSED)
+{
+ if (arg != NULL && arg->type == D_argument
+ && arg->a_argument == A_TRACE_ON)
+ do_trace = TRUE;
+ else
+ do_trace = FALSE;
+ return FALSE;
+}
+
+/* print_code --- print a list of instructions */
+
+static int
+print_code(INSTRUCTION *pc, void *x)
+{
+ struct pf_data *data = (struct pf_data *) x;
+ for (; pc != NULL; pc = pc->nexti)
+ print_instruction(pc, data->print_func, data->fp, data->defn /* in_dump */);
+ return 0;
+}
+
+/* do_dump_instructions --- dump command */
+
+int
+do_dump_instructions(CMDARG *arg, int cmd ATTRIBUTE_UNUSED)
+{
+ FILE *fp;
+
+ if (arg != NULL && arg->type == D_string) {
+ /* dump to a file */
+ if ((fp = fopen(arg->a_string, "w")) == NULL) {
+ d_error(_("could not open `%s' for writing (%s)"),
+ arg->a_string, strerror(errno));
+ return FALSE;
+ }
+ pf_data.print_func = fprintf;
+ pf_data.fp = fp;
+ pf_data.defn = TRUE; /* in_dump = TRUE */
+ (void) print_code(code_block, &pf_data);
+ (void) foreach_func((int (*)(INSTRUCTION *, void *)) print_code,
+ TRUE, /* sort */
+ &pf_data /* data */
+ );
+ fclose(fp);
+ return FALSE;
+ }
+
+ initialize_pager(out_fp);
+ if (setjmp(pager_quit_tag) == 0) {
+ pf_data.print_func = gprintf;
+ pf_data.fp = out_fp;
+ pf_data.defn = TRUE; /* in_dump = TRUE */
+ (void) print_code(code_block, &pf_data);
+ (void) foreach_func((int (*)(INSTRUCTION *, void *)) print_code,
+ TRUE, /* sort */
+ &pf_data /* data */
+ );
+ }
+ return FALSE;
+}
+
+/* do_save --- save command */
+
+int
+do_save(CMDARG *arg, int cmd ATTRIBUTE_UNUSED)
+{
+#ifdef HAVE_LIBREADLINE
+ FILE *fp;
+ HIST_ENTRY **hist_list;
+ int i;
+
+ if ((fp = fopen(arg->a_string, "w")) == NULL) {
+ d_error(_("could not open `%s' for writing (%s)"),
+ arg->a_string, strerror(errno));
+ return FALSE;
+ }
+
+ hist_list = history_list();
+ if (hist_list && history_length > sess_history_base) {
+ for (i = sess_history_base; hist_list[i] != NULL; i++) {
+ char *line;
+ line = hist_list[i]->line;
+
+ /* exclude save commands;
+ * N.B.: this test may fail if there is another
+ * command with the same first 2 letters.
+ */
+
+ if (strlen(line) > 1
+ && STREQN(line, "sa", 2))
+ continue;
+
+ fprintf(fp, "%s\n", line);
+ }
+ }
+ fclose(fp);
+#endif
+ return FALSE;
+}
+
+/* do_option --- option command */
+
+int
+do_option(CMDARG *arg, int cmd ATTRIBUTE_UNUSED)
+{
+ const struct dbg_option *opt;
+ char *name, *value;
+
+ if (arg == NULL) { /* display all available options and corresponding values */
+ for (opt = option_list; opt->name; opt++) {
+ if (opt->str_val != NULL)
+ fprintf(out_fp, "%s = \"%s\"\n", opt->name, *(opt->str_val));
+ else
+ fprintf(out_fp, "%s = %d\n", opt->name, *(opt->num_val));
+ }
+ return FALSE;
+ }
+
+ name = arg->a_string;
+ arg = arg->next;
+ value = arg ? arg->a_string : NULL;
+
+ for (opt = option_list; opt->name; opt++) { /* linear search */
+ if (STREQ(name, opt->name))
+ break;
+ }
+ if (! opt->name)
+ return FALSE;
+
+ if (value == NULL) { /* display current setting */
+ if (opt->str_val != NULL)
+ fprintf(out_fp, "%s = \"%s\"\n", opt->name, *(opt->str_val));
+ else
+ fprintf(out_fp, "%s = %d\n", opt->name, *(opt->num_val));
+ } else
+ (*(opt->assign))(value);
+ return FALSE;
+}
+
+
+#ifdef HAVE_LIBREADLINE
+
+/* initialize_pager --- initialize our idea of the terminal size */
+
+void
+initialize_pager(FILE *fp)
+{
+ if (! isatty(fileno(fp)) || ! input_from_tty || input_fd != 0) {
+ screen_width = INT_MAX;
+ screen_height = INT_MAX;
+ } else {
+ /* get the terminal size from readline. */
+
+ rl_reset_terminal(NULL); /* N.B.: NULL argument means
+ * "use TERM env variable for terminal name".
+ */
+ rl_get_screen_size(&screen_height, &screen_width);
+ if (screen_height <= 1)
+ screen_height = INT_MAX;
+ if (screen_width <= 1)
+ screen_width = INT_MAX;
+ }
+ pager_lines_printed = 0;
+}
+#endif
+
+static void
+prompt_continue(FILE *fp)
+{
+ int quit_pager = FALSE;
+
+ if (isatty(fileno(fp)) && input_fd == 0)
+ quit_pager = prompt_yes_no(
+ _("\t------[Enter] to continue or q [Enter] to quit------"),
+ _("q")[0], FALSE, fp);
+ if (quit_pager)
+ longjmp(pager_quit_tag, 1);
+ pager_lines_printed = 0;
+}
+
+/* gprintf --- like fprintf but allows paging */
+
+int
+gprintf(FILE *fp, const char *format, ...)
+{
+ va_list args;
+ static char *buf = NULL;
+ static size_t buflen = 0;
+ static int bl = 0;
+ char *p, *q;
+ int nchar;
+
+#define GPRINTF_BUFSIZ 512
+ if (buf == NULL) {
+ buflen = GPRINTF_BUFSIZ;
+ emalloc(buf, char *, (buflen + 2) * sizeof(char), "gprintf");
+ } else if (buflen - bl < GPRINTF_BUFSIZ/2) {
+ buflen += GPRINTF_BUFSIZ;
+ erealloc(buf, char *, (buflen + 2) * sizeof(char), "gprintf");
+ }
+#undef GPRINTF_BUFSIZ
+
+ while (TRUE) {
+ va_start(args, format);
+ nchar = vsnprintf(buf + bl, buflen - bl, format, args);
+ va_end(args);
+ if (nchar == 0)
+ return 0;
+ if (nchar > 0 && nchar < buflen - bl) {
+ bl += nchar;
+ if (buf[bl-1] != '\n') /* buffer output until see a newline at end */
+ return nchar;
+ break;
+ }
+
+ /* enlarge buffer, and try again */
+ buflen *= 2;
+ erealloc(buf, char *, (buflen + 2) * sizeof(char), "gprintf");
+ }
+
+ bl = 0;
+ for (p = buf; (q = strchr(p, '\n')) != NULL; p = q + 1) {
+ int sz = (int) (q - p);
+
+ while (sz > 0) {
+ int cnt;
+ cnt = sz > screen_width ? screen_width : sz;
+
+ /* do not print partial line before scrolling */
+ if (cnt < sz && (pager_lines_printed == (screen_height - 2)))
+ prompt_continue(fp);
+
+ if (fwrite(p, sizeof(char), cnt, fp) != cnt)
+ return -1;
+ if (cnt == sz)
+ break;
+ else {
+ if (++pager_lines_printed == (screen_height - 1))
+ prompt_continue(fp);
+ sz -= screen_width;
+ assert(sz > 0);
+ p += cnt;
+ }
+ }
+
+ fprintf(fp, "\n");
+ if (++pager_lines_printed == (screen_height - 1))
+ prompt_continue(fp);
+ p++;
+ }
+ return nchar;
+}
+
+
+static int
+serialize_subscript(char *buf, int buflen, struct list_item *item)
+{
+ int bl = 0, nchar, i;
+ NODE *sub;
+
+ nchar = snprintf(buf, buflen, "%d%c%d%c%s%c%d%c",
+ item->number, FSEP, D_subscript, FSEP, item->sname, FSEP,
+ item->num_subs, FSEP);
+ if (nchar <= 0)
+ return 0;
+ else if (nchar >= buflen) /* need larger buffer */
+ return nchar;
+ bl += nchar;
+ for (i = 0; i < item->num_subs; i++) {
+ sub = item->subs[i];
+ nchar = snprintf(buf + bl, buflen - bl, "%lu%c%s%c",
+ (unsigned long) sub->stlen, FSEP, sub->stptr, FSEP);
+ if (nchar <= 0)
+ return 0;
+ bl += nchar;
+ if (bl >= buflen) /* need larger buffer */
+ return bl;
+ }
+ return bl;
+}
+
+
+
+/* serialize --- convert a list structure to a byte stream and
+ * save in environment.
+ */
+
+static void
+serialize(int type)
+{
+#ifndef HAVE_LIBREADLINE
+#define HIST_ENTRY void
+#define history_list() NULL
+#endif
+
+ static char *buf = NULL;
+ static int buflen = 0;
+ int bl;
+ BREAKPOINT *b = NULL;
+ struct list_item *wd = NULL;
+ HIST_ENTRY **hist_list = NULL;
+ int hist_index = 0;
+ HIST_ENTRY *h = NULL;
+ struct dbg_option *opt = NULL;
+ struct commands_item *commands = NULL, *c;
+ int cnum = 0;
+ struct condition *cndn = NULL;
+ void *ptr, *end_ptr;
+
+ switch (type) {
+ case BREAK:
+ end_ptr = (void *) &breakpoints;
+ ptr = (void *) breakpoints.prev;
+ break;
+ case WATCH:
+ end_ptr = (void *) &watch_list;
+ ptr = (void *) watch_list.prev;
+ break;
+ case DISPLAY:
+ end_ptr = (void *) &display_list;
+ ptr = (void *) display_list.prev;
+ break;
+ case HISTORY:
+ hist_list = history_list();
+ if (hist_list == NULL) /* empty history list */
+ return;
+ end_ptr = NULL;
+ ptr = (void *) hist_list[0];
+ break;
+ case OPTION:
+ {
+ int n;
+ n = sizeof(option_list)/sizeof(option_list[0]);
+ end_ptr = (void *) &option_list[n - 1];
+ ptr = (void *) option_list;
+ }
+ break;
+
+ default:
+ return;
+ }
+
+ if (type != HISTORY && ptr == end_ptr) /* empty list */
+ return;
+
+#define SERIALIZE_BUFSIZ 512
+
+ if (buf == NULL) { /* first time */
+ buflen = SERIALIZE_BUFSIZ;
+ emalloc(buf, char *, buflen + 2, "serialize");
+ }
+ bl = 0;
+
+ while (ptr != end_ptr) {
+ int nchar = 0;
+ if (buflen - bl < SERIALIZE_BUFSIZ/2) {
+enlarge_buffer:
+ buflen *= 2;
+ erealloc(buf, char *, buflen + 2, "serialize");
+ }
+
+#undef SERIALIZE_BUFSIZ
+
+ /* field seperator is FSEP ('\037'), and the record separator is RSEP ('\036') */
+
+ switch (type) {
+ case BREAK:
+ b = (BREAKPOINT *) ptr;
+
+ /* src source_line flags ignore_count hit_count number;
+ * commands and condition processed later in the end switch
+ */
+
+ nchar = snprintf(buf + bl, buflen - bl,
+ "%s%c%d%c%d%c%d%c%d%c%d%c",
+ b->src, FSEP, b->bpi->source_line, FSEP, b->flags, FSEP,
+ (int) b->ignore_count, FSEP,
+ (int) b->hit_count, FSEP, b->number, FSEP);
+ cnum = b->number;
+ commands = &b->commands;
+ cndn = &b->cndn;
+ break;
+ case DISPLAY:
+ case WATCH:
+ wd = (struct list_item *) ptr;
+
+ /* subscript -- number type sname num_subs subs(stlen + stptr) [commands [condition]]
+ * variable -- number type sname [commands [condition]]
+ * field -- number type symbol(numbr) [commands [condition]]
+ */
+
+ if (IS_PARAM(wd)) /* exclude parameters */
+ nchar = 0;
+ else if (IS_SUBSCRIPT(wd))
+ nchar = serialize_subscript(buf + bl, buflen - bl, wd);
+ else if (IS_FIELD(wd))
+ nchar = snprintf(buf + bl, buflen - bl, "%d%c%d%c%d%c",
+ wd->number, FSEP, D_field, FSEP, (int) wd->symbol->numbr, FSEP);
+ else
+ nchar = snprintf(buf + bl, buflen - bl, "%d%c%d%c%s%c",
+ wd->number, FSEP, D_variable, FSEP, wd->sname, FSEP);
+ cnum = wd->number;
+ commands = &wd->commands;
+ cndn = &wd->cndn;
+ break;
+ case HISTORY:
+#ifdef HAVE_LIBREADLINE
+ h = (HIST_ENTRY *) ptr;
+ nchar = strlen(h->line);
+ if (nchar >= buflen - bl)
+ goto enlarge_buffer;
+ strcpy(buf + bl, h->line);
+#endif
+ break;
+ case OPTION:
+ opt = (struct dbg_option *) ptr;
+ if (opt->num_val != NULL)
+ nchar = snprintf(buf + bl, buflen - bl,
+ "%s%c%d%c", opt->name, FSEP, *(opt->num_val), FSEP);
+ else
+ nchar = snprintf(buf + bl, buflen - bl,
+ "%s%c%s%c", opt->name, FSEP, *(opt->str_val), FSEP);
+ break;
+ default:
+ break;
+ }
+
+ if (nchar == 0) /* skip empty history lines etc.*/
+ ;
+ else if (nchar > 0 && nchar < buflen - bl) {
+ bl += nchar;
+ buf[bl] = RSEP; /* record */
+ buf[++bl] = '\0';
+ } else
+ goto enlarge_buffer;
+
+ switch (type) {
+ case BREAK:
+ case WATCH:
+ /* recreate the `commands' command strings including the `commands'
+ * and `end' commands; command seperator is '\034'.
+ * re-parsed in unserialize to recover the commands list.
+ * Alternatively, one could encode(serialize) each command and it's arguments.
+ */
+
+ bl--; /* undo RSEP from above */
+
+ /* compute required room in buffer */
+ nchar = 0;
+ for (c = commands->next; c != commands; c = c->next) {
+ nchar += (strlen(c->cmd_string) + 1);
+ if (c->cmd == D_eval) {
+ CMDARG *a = c->arg;
+ nchar += (strlen(a->a_string) + 1); /* awk statements */
+ nchar += (strlen("end") + 1);
+ }
+ }
+
+ if (nchar > 0) { /* non-empty commands list */
+ nchar += (strlen("commands ") + 20 + strlen("end") + 2); /* 20 for cnum (an int) */
+ if (nchar > buflen - bl) {
+ buflen = bl + nchar;
+ erealloc(buf, char *, buflen + 3, "serialize");
+ }
+ nchar = sprintf(buf + bl, "commands %d", cnum);
+ bl += nchar;
+ buf[bl++] = CSEP;
+ for (c = commands->next; c != commands; c = c->next) {
+ nchar = strlen(c->cmd_string);
+ memcpy(buf + bl, c->cmd_string, nchar);
+ bl += nchar;
+ buf[bl++] = CSEP;
+
+ if (c->cmd == D_eval) {
+ CMDARG *a = c->arg;
+ nchar = strlen(a->a_string); /* statements */
+ memcpy(buf + bl, a->a_string, nchar);
+ bl += nchar;
+ buf[bl++] = CSEP;
+ nchar = strlen("end"); /* end of 'eval' */
+ memcpy(buf + bl, "end", nchar);
+ bl += nchar;
+ buf[bl++] = CSEP;
+ }
+ }
+ nchar = strlen("end"); /* end of 'commands' */
+ memcpy(buf + bl, "end", nchar);
+ bl += nchar;
+ }
+ buf[bl++] = FSEP; /* field */
+ buf[bl++] = RSEP; /* record */
+ buf[bl] = '\0';
+
+ /* condition expression */
+ if (cndn->expr) {
+ bl--; /* undo RSEP from above */
+ nchar = strlen(cndn->expr);
+ if (nchar > buflen - bl) {
+ buflen = bl + nchar;
+ erealloc(buf, char *, buflen + 3, "serialize");
+ }
+ memcpy(buf + bl, cndn->expr, nchar);
+ bl += nchar;
+ buf[bl++] = FSEP; /* field */
+ buf[bl++] = RSEP; /* record */
+ buf[bl] = '\0';
+ }
+
+ ptr = (type == BREAK) ? (void *) b->prev : (void *) wd->prev;
+ break;
+ case DISPLAY:
+ ptr = (void *) wd->prev;
+ break;
+ case HISTORY:
+ ptr = (void *) hist_list[++hist_index];
+ break;
+ case OPTION:
+ ptr = (void *) (++opt);
+ break;
+ default:
+ break;
+ }
+ }
+
+ if (bl > 0) /* non-empty list */
+ setenv(env_variable[type], buf, 1);
+}
+
+
+static void
+unserialize_commands(char *str, int str_len)
+{
+ if (str_len <= 0 || str == NULL)
+ return;
+ commands_string = str;
+ commands_string_len = str_len;
+ push_cmd_src(INVALID_HANDLE, FALSE, read_commands_string, 0, 0, EXIT_FATAL);
+ line_sep = CSEP;
+ read_command(); /* forced to return in do_commands */
+ pop_cmd_src();
+}
+
+
+/* unserialize_list_item --- create a list_item structure from unserialized data */
+
+static struct list_item *
+unserialize_list_item(struct list_item *list, char **pstr, int *pstr_len, int field_cnt)
+{
+ int num, type, i;
+ struct list_item *l;
+ NODE *symbol = NULL;
+ int sub_cnt, cnt;
+ NODE **subs = NULL;
+
+ /* subscript -- number type sname num_subs subs [commands [condition]]
+ * variable -- number type sname [commands [condition]]
+ * field -- number type symbol(numbr) commands [commands [condition]]
+ */
+
+ num = strtol(pstr[0], NULL, 0);
+ type = strtol(pstr[1], NULL, 0);
+
+ if (type == D_field) {
+ int field_num;
+ field_num = strtol(pstr[2], NULL, 0);
+ symbol = make_number((AWKNUM) field_num);
+ cnt = 3;
+ } else {
+ char *name;
+ name = estrdup(pstr[2], pstr_len[2]);
+ symbol = find_symbol(name, NULL);
+ efree(name);
+ if (symbol == NULL)
+ return NULL;
+ cnt = 3;
+ if (type == D_subscript) {
+ int sub_len;
+ sub_cnt = strtol(pstr[3], NULL, 0);
+ emalloc(subs, NODE **, sub_cnt * sizeof(NODE *), "unserialize_list_item");
+ cnt++;
+ for (i = 0; i < sub_cnt; i++) {
+ sub_len = strtol(pstr[cnt], NULL, 0);
+ subs[i] = make_string(pstr[cnt + 1], sub_len);
+ cnt += 2;
+ }
+ }
+ }
+
+ l = add_item(list, type, symbol, NULL);
+ if (type == D_subscript) {
+ l->num_subs = sub_cnt;
+ l->subs = subs;
+ }
+ l->number = num; /* keep same item number across executions */
+
+ if (list == &watch_list) {
+ initialize_watch_item(l);
+ /* unserialize watchpoint `commands' */
+ unserialize_commands(pstr[cnt], pstr_len[cnt]);
+ cnt++;
+ if (field_cnt > cnt) {
+ char *expr;
+ expr = estrdup(pstr[cnt], pstr_len[cnt]);
+ if (parse_condition(D_watch, l->number, expr) != 0)
+ efree(expr);
+ }
+ if (num > list->number) /* update list number counter */
+ list->number = num;
+ } else
+ list->number = num;
+
+ return l;
+}
+
+/* unserialize_breakpoint --- create a breakpoint structure from unserialized data */
+
+static BREAKPOINT *
+unserialize_breakpoint(char **pstr, int *pstr_len, int field_cnt)
+{
+ char *src;
+ int lineno;
+ BREAKPOINT *b = NULL;
+ INSTRUCTION *rp;
+ SRCFILE *s;
+
+ /* src source_line flags ignore_count hit_count number commands [condition] */
+
+ src = estrdup(pstr[0], pstr_len[0]);
+ s = source_find(src);
+ efree(src);
+ if (s == NULL)
+ return NULL;
+ src = s->src;
+ lineno = strtol(pstr[1], NULL, 0);
+ if (lineno <= 0 || lineno > s->srclines)
+ return NULL;
+ rp = find_rule(src, lineno);
+ if (rp == NULL
+ || (b = set_breakpoint_at(rp, lineno, TRUE)) == NULL
+ )
+ return NULL;
+
+ b->flags = strtol(pstr[2], NULL, 0);
+ b->ignore_count = strtol(pstr[3], NULL, 0);
+ b->hit_count = strtol(pstr[4], NULL, 0);
+ b->number = strtol(pstr[5], NULL, 0); /* same number as previous run */
+
+ if (field_cnt > 6) /* unserialize breakpoint `commands' */
+ unserialize_commands(pstr[6], pstr_len[6]);
+
+ if (field_cnt > 7) { /* condition expression */
+ char *expr;
+ expr = estrdup(pstr[7], pstr_len[7]);
+ if (parse_condition(D_break, b->number, expr) != 0)
+ efree(expr);
+ }
+
+ if (b->number > watch_list.number) /* watch and break has same number counter */
+ watch_list.number = b->number; /* update counter */
+ return b;
+}
+
+/* unserialize_option --- set a debugger option from unserialized data. */
+
+static struct dbg_option *
+unserialize_option(char **pstr, int *pstr_len, int field_cnt ATTRIBUTE_UNUSED)
+{
+ const struct dbg_option *opt;
+
+ for (opt = option_list; opt->name; opt++) {
+ if (STREQN(pstr[0], opt->name, pstr_len[0])) {
+ char *value;
+ value = estrdup(pstr[1], pstr_len[1]);
+ (*(opt->assign))(value);
+ efree(value);
+ return ((struct dbg_option *) opt);
+ }
+ }
+ return NULL;
+}
+
+/* unserialize -- reconstruct list from serialized data stored in
+ * environment variable.
+ */
+
+static void
+unserialize(int type)
+{
+ char *val;
+ char *p, *q, *r, *s;
+#define MAX_FIELD 30
+ static char *pstr[MAX_FIELD];
+ static int pstr_len[MAX_FIELD];
+
+ val = getenv(env_variable[type]);
+ if (val == NULL)
+ return;
+
+ for (p = val; (q = strchr(p, RSEP)) != NULL; p = q + 1) {
+ int field_cnt = 0;
+ if (type == HISTORY) {
+ *q = '\0';
+ add_history(p);
+ *q = RSEP;
+ continue;
+ }
+
+ r = p;
+ while ((s = strchr(r, FSEP)) != NULL && s < q) {
+ pstr[field_cnt] = r;
+ pstr_len[field_cnt] = (int) (s - r);
+ r = s + 1;
+ field_cnt++;
+ if (field_cnt == MAX_FIELD)
+#ifdef GAWKDEBUG
+ fatal("Increase MAX_FIELD and recompile.\n");
+#else
+ return;
+#endif
+ }
+
+ switch (type) {
+ case BREAK:
+ (void) unserialize_breakpoint(pstr, pstr_len, field_cnt);
+ break;
+ case DISPLAY:
+ (void) unserialize_list_item(&display_list, pstr, pstr_len, field_cnt);
+ break;
+ case WATCH:
+ (void) unserialize_list_item(&watch_list, pstr, pstr_len, field_cnt);
+ break;
+ case OPTION:
+ (void) unserialize_option(pstr, pstr_len, field_cnt);
+ break;
+ case HISTORY:
+ /* processed at the beginning of for loop */
+ break;
+ default:
+ break;
+ }
+ }
+
+#ifdef HAVE_LIBREADLINE
+ if (type == HISTORY)
+ sess_history_base = history_length;
+#endif
+
+ unsetenv(env_variable[type]);
+#undef MAX_FIELD
+}
+
+static int
+prompt_yes_no(const char *mesg, char res_true, int res_default, FILE *fp)
+{
+ char *in_str;
+ int ret = res_default; /* default */
+
+ if (input_from_tty) {
+ fprintf(fp, "%s", _(mesg));
+ in_str = read_a_line(NULL);
+ if (in_str == NULL) /* EOF */
+ exit(EXIT_FAILURE);
+ ret = (*in_str == res_true);
+ efree(in_str);
+ }
+ return ret;
+}
+
+/* has_break_or_watch_point --- check if given breakpoint or watchpoint
+ * number exists. When flag any is TRUE,
+ * check if any breakpoint/watchpoint
+ * has been set (ignores num). Returns
+ * type (breakpoint or watchpoint) or 0.
+ */
+
+int
+has_break_or_watch_point(int *pnum, int any)
+{
+ BREAKPOINT *b = NULL;
+ struct list_item *w = NULL;
+
+ if (any) {
+ if (breakpoints.next != &breakpoints)
+ b = breakpoints.next;
+ if (watch_list.next != &watch_list)
+ w = watch_list.next;
+
+ if (! b && ! w)
+ return 0;
+ if (b && ! w) {
+ *pnum = b->number;
+ return D_break;
+ }
+ if (w && ! b) {
+ *pnum = w->number;
+ return D_watch;
+ }
+ if (w->number > b->number) {
+ *pnum = w->number;
+ return D_watch;
+ }
+ *pnum = b->number;
+ return D_break;
+ }
+
+ /* N.B: breakpoints and watchpoints get numbers from a single
+ * counter/sequencer watch_list.number.
+ */
+
+ for (b = breakpoints.next; b != &breakpoints; b = b->next) {
+ if (b->number == *pnum)
+ return D_break;
+ }
+ for (w = watch_list.next; w != &watch_list; w = w->next) {
+ if (w->number == *pnum)
+ return D_watch;
+ }
+
+ return 0;
+}
+
+/* delete_commands_item --- delete item(command) from `commands' list. */
+
+static void
+delete_commands_item(struct commands_item *c)
+{
+ efree(c->cmd_string);
+ free_cmdarg(c->arg);
+ c->next->prev = c->prev;
+ c->prev->next = c->next;
+ efree(c);
+}
+
+/* do_commands --- commands command */
+
+int
+do_commands(CMDARG *arg, int cmd)
+{
+ static BREAKPOINT *b;
+ static struct list_item *w;
+ static struct commands_item *commands;
+ struct commands_item *c;
+
+ if (cmd == D_commands) {
+ int num, type;
+ if (arg == NULL)
+ type = has_break_or_watch_point(&num, TRUE);
+ else {
+ num = arg->a_int;
+ type = has_break_or_watch_point(&num, FALSE);
+ }
+ b = NULL;
+ w = NULL;
+ if (type == D_break)
+ b = find_breakpoint(num);
+ else if (type == D_watch)
+ w = find_item(&watch_list, num);
+ assert((b != NULL) || (w != NULL));
+ commands = (b != NULL) ? &b->commands : &w->commands;
+
+ /* delete current commands */
+ for (c = commands->next; c != commands; c = c->next) {
+ c = c->prev;
+ delete_commands_item(c->next);
+ }
+ return FALSE;
+
+ } else if (cmd == D_end) {
+ commands = NULL;
+ if (read_a_line == read_commands_string) /* unserializig commands */
+ return TRUE; /* done unserializing, terminate zzparse() */
+ return FALSE;
+
+ } else if (cmd == D_silent) {
+ if (b != NULL)
+ b->silent = TRUE;
+ else if (w != NULL)
+ w->silent = TRUE;
+ /* we also append silent command to the list for use
+ * in `info break(watch)', and to simplify
+ * serialization/unserialization of commands.
+ */
+ }
+
+ assert(commands != NULL);
+
+ emalloc(c, struct commands_item *, sizeof(struct commands_item), "do_commands");
+ c->next = NULL;
+ c->cmd = cmd;
+
+ /* N.B.: first arg is the command string, see command.y */
+ c->cmd_string = arg->a_string;
+ c->arg = arg->next; /* actual arguments to the command */
+ efree(arg);
+
+ /* append to the list */
+ c->prev = commands->prev;
+ c->next = commands;
+ commands->prev = c;
+ c->prev->next = c;
+ return FALSE;
+}
+
+/* execute_commands --- execute breakpoint/watchpoint commands, the first
+ * command that resumes execution terminates
+ * commands processing.
+ */
+
+static int
+execute_commands(struct commands_item *commands)
+{
+ struct commands_item *c;
+ Func_cmd cmd_ptr;
+ int ret = FALSE;
+
+ for (c = commands->next; c != commands; c = c->next) {
+ if (c->cmd == D_silent)
+ continue;
+ cmd_ptr = get_command(c->cmd); /* command handler */
+ ret = (*cmd_ptr)(c->arg, c->cmd);
+ if (ret) /* resume execution (continue, next etc.) */
+ break;
+ }
+ return ret;
+}
+
+/* do_print_f --- printf command */
+
+int
+do_print_f(CMDARG *arg, int cmd ATTRIBUTE_UNUSED)
+{
+ int count = 0;
+ int i;
+ CMDARG *a;
+ NODE **tmp;
+ NODE *r;
+ char *name;
+
+ /* count maximum required size for tmp */
+ for (a = arg; a != NULL ; a = a->next)
+ count++;
+ emalloc(tmp, NODE **, count * sizeof(NODE *), "do_print_f");
+
+ for (i = 0, a = arg; a != NULL ; i++, a = a->next) {
+ switch (a->type) {
+ case D_variable:
+ name = a->a_string;
+ r = find_symbol(name, NULL);
+ if (r == NULL)
+ goto done;
+ if (r->type == Node_var_new)
+ tmp[i] = Nnull_string;
+ else if (r->type != Node_var) {
+ d_error(_("`%s' is not a scalar variable"), name);
+ goto done;
+ } else
+ tmp[i] = r->var_value;
+ break;
+ case D_field:
+ {
+ long field_num;
+ r = a->a_node;
+ field_num = (long) r->numbr;
+ tmp[i] = *get_field(field_num, NULL);
+ }
+ break;
+ case D_subscript:
+ {
+ int cnt = a->a_count;
+ name = a->a_string;
+ r = find_array(name);
+ if (r == NULL)
+ goto done;
+
+ for (; cnt > 0; cnt--) {
+ NODE *value, *subs;
+ a = a->next;
+ subs = a->a_node;
+ value = in_array(r, subs);
+ if (cnt == 1) {
+ if (value == NULL)
+ tmp[i] = Nnull_string; /* FIXME: goto done ? */
+ else if (value->type == Node_var_array) {
+ d_error(_("attempt to use array `%s[\"%s\"]' in a scalar context"),
+ name, subs->stptr);
+ goto done;
+ } else
+ tmp[i] = value;
+ } else {
+ if (value == NULL) {
+ d_error(_("[\"%s\"] not in array `%s'"),
+ subs->stptr, name);
+ goto done;
+ } else if (value->type != Node_var_array) {
+ d_error(_("attempt to use scalar `%s[\"%s\"]' as array"),
+ name, subs->stptr);
+ goto done;
+ } else {
+ r = value;
+ name = r->vname;
+ }
+ }
+ }
+ }
+ break;
+ case D_node:
+ tmp[i] = a->a_node;
+ break;
+ default:
+ break;
+ }
+ }
+
+ force_string(tmp[0]);
+ r = format_arg(tmp[0]->stptr, tmp[0]->stlen, tmp, i);
+ if (r != NULL) {
+ (void) fwrite(r->stptr, sizeof(char), r->stlen, out_fp);
+ unref(r);
+ }
+done:
+ efree(tmp);
+ return FALSE;
+}
+
+/* do_source --- source command */
+
+int
+do_source(CMDARG *arg, int cmd ATTRIBUTE_UNUSED)
+{
+ int fd;
+ char *file = arg->a_string;
+
+ fd = open_readfd(file);
+ if (fd <= INVALID_HANDLE) {
+ d_error(_("can't open source file `%s' for reading (%s)"),
+ file, strerror(errno));
+ return FALSE;
+ }
+
+ push_cmd_src(fd, FALSE, g_readline, close, D_source, EXIT_SUCCESS);
+ cmd_src->str = estrdup(file, strlen(file));
+ return FALSE;
+}
+
+/* open_readfd --- open a file for reading */
+
+static int
+open_readfd(const char *file)
+{
+ int fd;
+
+ fd = open(file, O_RDONLY);
+ if (fd <= INVALID_HANDLE)
+ return INVALID_HANDLE;
+ else if (os_isdir(fd)) {
+ (void) close(fd);
+ errno = EISDIR;
+ return INVALID_HANDLE;
+ }
+ return fd;
+}
+
+/* find_option --- check if option name is valid */
+
+int
+find_option(char *name)
+{
+ const char *p;
+ int idx;
+
+ for (idx = 0; (p = option_list[idx].name); idx++) {
+ if (STREQ(p, name))
+ return idx;
+ }
+ return -1;
+}
+
+/* option_help --- display help text for debugger options */
+
+void
+option_help()
+{
+ const struct dbg_option *opt;
+
+ for (opt = option_list; opt->name; opt++)
+ fprintf(out_fp, "\t%-15.15s - %s\n", opt->name, _(opt->help_txt));
+}
+
+#ifdef HAVE_LIBREADLINE
+
+/* option_generator --- generator function for option name completion */
+
+char *
+option_generator(const char *text, int state)
+{
+ static size_t textlen;
+ static int idx;
+ const char *name;
+
+ if (! state) { /* first time */
+ textlen = strlen(text);
+ idx = 0;
+ }
+
+ while ((name = option_list[idx++].name)) {
+ if (strncmp(name, text, textlen) == 0)
+ return estrdup(name, strlen(name));
+ }
+ return NULL;
+}
+
+#endif
+
+/* set_gawk_output --- redirect gawk (normal) output */
+
+static void
+set_gawk_output(const char *file)
+{
+ int fd = INVALID_HANDLE;
+ FILE *fp = NULL;
+
+ if (output_fp != stdout) {
+ if (output_fp != stderr) {
+ fclose(output_fp);
+ efree(output_file);
+ }
+ output_fp = stdout;
+ output_is_tty = isatty(fileno(stdout));
+ output_file = "/dev/stdout";
+ }
+
+ if (file == NULL || file[0] == '\0')
+ return;
+
+ errno = 0;
+ if ((fd = os_devopen(file, O_WRONLY)) != INVALID_HANDLE) {
+ fp = fdopen(fd, "w");
+ if (fp == NULL)
+ close(fd);
+
+ } else if (STREQN(file, "/dev/", 5)) {
+ char *cp = (char *) file + 5;
+
+ if (STREQ(cp, "stdout"))
+ return;
+ if (STREQ(cp, "stderr")) {
+ output_fp = stderr;
+ output_file = "/dev/stderr";
+ output_is_tty = isatty(fileno(stderr));
+ return;
+ }
+
+ if (STREQN(cp, "fd/", 3)) {
+ cp += 3;
+ fd = (int) strtoul(cp, NULL, 10);
+ if (errno == 0 && fd > INVALID_HANDLE) {
+ fp = fdopen(fd, "w");
+ if (fp == NULL)
+ fd = INVALID_HANDLE;
+ } else
+ fd = INVALID_HANDLE;
+ } else {
+ /* /dev/ttyN, /dev/pts/N, /dev/null etc. */
+ fd = open(file, O_WRONLY);
+ }
+
+ if (fd > INVALID_HANDLE && fp == NULL) {
+ fp = fdopen(fd, "w");
+ if (fp == NULL)
+ close(fd);
+ }
+
+ } else {
+ /* regular file */
+ fp = fopen(file, "w");
+ }
+
+ if (fp != NULL) {
+ output_fp = fp;
+ output_file = estrdup(file, strlen(file));
+ setbuf(fp, (char *) NULL);
+ output_is_tty = isatty(fileno(fp));
+ } else {
+ d_error(_("could not open `%s' for writing (%s)"),
+ file,
+ errno != 0 ? strerror(errno) : _("reason unknown"));
+ fprintf(out_fp, _("sending output to stdout\n"));
+ }
+}
+
+/* set_prompt --- set debugger prompt */
+
+static void
+set_prompt(const char *value)
+{
+ efree(dgawk_Prompt);
+ dgawk_Prompt = estrdup(value, strlen(value));
+ dPrompt = dgawk_Prompt;
+}
+
+/* set_option_flag --- convert option string to flag value */
+
+static int
+set_option_flag(const char *value)
+{
+ long n;
+ if (STREQ(value, "on"))
+ return TRUE;
+ if (STREQ(value, "off"))
+ return FALSE;
+ errno = 0;
+ n = strtol(value, NULL, 0);
+ return (errno == 0 && n != 0);
+}
+
+/* set_option_num --- set integer option value from string */
+
+static void
+set_option_num(int *pnum, const char *value)
+{
+ long n;
+ errno = 0;
+ n = strtol(value, NULL, 0);
+ if (errno == 0 && n > 0)
+ *pnum = n;
+ else
+ d_error(_("invalid number"));
+}
+
+/* set_listsize --- set list output window size */
+
+static void
+set_listsize(const char *value)
+{
+ set_option_num(&list_size, value);
+}
+
+/* set_trace --- set instruction tracing on or off */
+
+static void
+set_trace(const char *value)
+{
+ do_trace = set_option_flag(value);
+}
+
+/* set_save_history --- save history on exit */
+
+static void
+set_save_history(const char *value)
+{
+ do_save_history = set_option_flag(value);
+}
+
+/* set_save_options --- save options on exit */
+
+static void
+set_save_options(const char *value)
+{
+ do_save_options = set_option_flag(value);
+}
+
+/* set_history_size --- maximum entries in history file */
+
+static void
+set_history_size(const char *value)
+{
+ set_option_num(&history_size, value);
+}
+
+
+/* read_commands_string --- one of the many ways zzlex fetches a line to parse;
+ * this one is used to parse `commands' string during
+ * unserialization.
+ */
+
+char *
+read_commands_string(const char *prompt ATTRIBUTE_UNUSED)
+{
+ char *p, *end, *line;
+
+ if (commands_string == NULL)
+ return NULL;
+
+ p = (char *) commands_string;
+ end = (char *) commands_string + commands_string_len;
+ for (; p < end; p++) {
+ if (*p == line_sep) {
+ line = estrdup(commands_string, p - commands_string);
+ commands_string = p + 1;
+ commands_string_len = end - commands_string;
+ return line;
+ }
+ }
+
+ line = estrdup(commands_string, commands_string_len);
+ commands_string = NULL;
+ commands_string_len = 0;
+ return line;
+}
+
+/* save_options --- save current options to file */
+
+static void
+save_options(const char *file)
+{
+ FILE *fp;
+ const struct dbg_option *opt;
+
+ fp = fopen(file, "w");
+ if (fp == NULL)
+ return;
+
+ for (opt = option_list; opt->name; opt++) {
+ if (opt->str_val != NULL)
+ fprintf(fp, "option %s = \"%s\"\n", opt->name, *(opt->str_val));
+ else
+ fprintf(fp, "option %s = %d\n", opt->name, *(opt->num_val));
+ }
+ fclose(fp);
+ chmod(file, 0600);
+}
+
+/* close_all --- close all open files */
+
+static void
+close_all()
+{
+ int stdio_problem;
+ struct command_source *cs;
+
+ (void) nextfile(&curfile, TRUE); /* close input data file */
+ (void) close_io(&stdio_problem);
+ if (cur_srcfile->fd != INVALID_HANDLE) {
+ close(cur_srcfile->fd);
+ cur_srcfile->fd = INVALID_HANDLE;
+ }
+ for (cs = cmd_src; cs != NULL; cs = cs->next) {
+ if (cs->close_func && cs->fd != INVALID_HANDLE) {
+ cs->close_func(cs->fd);
+ cs->fd = INVALID_HANDLE;
+ }
+ }
+
+ set_gawk_output(NULL); /* closes output_fp if not stdout */
+}
+
+/* install_params --- install function parameters into the symbol table */
+
+static void
+install_params(NODE *func)
+{
+ NODE *np;
+
+ if (func == NULL)
+ return;
+ /* function parameters of type Node_param_list */
+ np = func->lnode;
+ for (np = np->rnode; np != NULL; np = np->rnode)
+ install_symbol(np->param, np);
+}
+
+/* remove_params --- remove function parameters out of the symbol table */
+
+static void
+remove_params(NODE *func)
+{
+ NODE *np;
+
+ if (func == NULL)
+ return;
+ np = func->lnode;
+ for (np = np->rnode; np != NULL; np = np->rnode)
+ remove_symbol(np->param);
+}
+
+/* pre_execute_code --- pre_hook for execute_code, called by pre_execute */
+
+static int
+pre_execute_code(INSTRUCTION **pi, int inloop)
+{
+ INSTRUCTION *ei = *pi;
+
+ switch (ei->opcode) {
+ case Op_K_break:
+ case Op_K_continue:
+ if (inloop)
+ break;
+ /* else
+ fall through */
+ case Op_K_exit:
+ case Op_K_next:
+ case Op_K_nextfile:
+ case Op_K_getline: /* getline without redirection */
+ d_error(_("`%s' not allowed in current context;"
+ " statement ignored"),
+ op2str(ei->opcode));
+ *pi = ei->nexti;
+ break;
+ case Op_K_return:
+ if (ei->nexti != NULL) { /* not an implicit return */
+ NODE *r;
+ d_error(_("`return' not allowed in current context;"
+ " statement ignored"));
+ /* throw away return value already pushed onto stack */
+ r = POP_SCALAR();
+ DEREF(r);
+ *pi = ei->nexti;
+ }
+ break;
+ default:
+ break;
+ }
+ return (ei == *pi);
+}
+
+extern void unwind_stack(STACK_ITEM *sp_bottom);
+
+static NODE *
+execute_code(volatile INSTRUCTION *code)
+{
+ volatile NODE *r = NULL;
+ volatile jmp_buf fatal_tag_stack;
+ STACK_ITEM *ctxt_stack_bottom;
+
+ /* We use one global stack for all contexts.
+ * Remember stack bottom for current context; in case of
+ * a fatal error, unwind stack until stack_ptr is below that 'bottom'.
+ */
+ ctxt_stack_bottom = stack_ptr + 1;
+
+ PUSH_BINDING(fatal_tag_stack);
+ if (setjmp(fatal_tag) == 0) {
+ (void) r_interpret((INSTRUCTION *) code);
+ assert(stack_ptr == ctxt_stack_bottom);
+ r = POP_SCALAR();
+ } else /* fatal error */
+ unwind_stack(ctxt_stack_bottom);
+
+ POP_BINDING(fatal_tag_stack);
+
+ if (exit_val != EXIT_SUCCESS) { /* must be EXIT_FATAL? */
+ exit_val = EXIT_SUCCESS;
+ return NULL;
+ }
+ return (NODE *) r;
+}
+
+/* do_eval --- eval command */
+
+int
+do_eval(CMDARG *arg, int cmd ATTRIBUTE_UNUSED)
+{
+ NODE *r, *ret_val;
+ NODE *f = NULL;
+ NODE *this_frame = NULL, *this_func = NULL;
+ NODE **sp;
+ INSTRUCTION *eval, *code = NULL;
+ CONTEXT *ctxt;
+ char **save_parmlist = NULL;
+ int ecount = 0, pcount = 0;
+ int ret;
+
+ if (prog_running) {
+ this_frame = find_frame(0);
+ this_func = this_frame->func_node;
+ }
+
+ install_params(this_func); /* expose current function parameters to eval */
+ ctxt = new_context();
+ ctxt->install_func = append_symbol; /* keep track of newly installed globals */
+ set_context(ctxt);
+ (void) add_srcfile(SRC_CMDLINE, arg->a_string, srcfiles, NULL, NULL);
+ ret = parse_program(&code);
+ remove_params(this_func);
+ if (ret != 0) {
+ set_context(NULL); /* switch to prev context (main) */
+ free_context(ctxt, FALSE /* keep_globals */);
+ return FALSE;
+ }
+
+ f = lookup("@eval");
+ assert(f != NULL);
+ if (this_func == NULL) { /* in main */
+ /* do a function call */
+ eval = bcalloc(Op_func_call, 2, 0);
+ eval->source_file = cur_srcfile->src;
+ eval->func_body = f;
+ eval->func_name = NULL; /* not needed, func_body already assigned */
+ (eval + 1)->expr_count = 0;
+ eval->nexti = bcalloc(Op_stop, 1, 0);
+
+ } else {
+ /* execute as a part of the current function */
+ int i;
+ char **varnames;
+ INSTRUCTION *t;
+ NODE *np;
+
+ eval = f->code_ptr; /* Op_func */
+ eval->source_file = cur_srcfile->src;
+ /* turn implicit Op_K_return into Op_stop */
+ t = (eval + 1)->lasti; /* Op_K_return */
+ t->opcode = Op_stop;
+
+ /* add or append eval locals to the current frame stack */
+ ecount = f->lnode->param_cnt; /* eval local count */
+ pcount = this_func->lnode->param_cnt;
+ save_parmlist = this_func->parmlist;
+
+ if (ecount > 0) {
+ if (pcount == 0)
+ emalloc(this_frame->stack, NODE **, ecount * sizeof(NODE *), "do_eval");
+ else
+ erealloc(this_frame->stack, NODE **, (pcount + ecount) * sizeof(NODE *), "do_eval");
+
+ emalloc(varnames, char **, (pcount + ecount + 1) * sizeof(char *), "do_eval");
+ if (pcount > 0)
+ memcpy(varnames, save_parmlist, pcount * sizeof(char *));
+ for (np = f->lnode->rnode, i = 0; np != NULL; np = np->rnode, i++) {
+ varnames[pcount + i] = np->param;
+ np->param_cnt += pcount; /* appending eval locals: fixup param_cnt */
+ }
+ varnames[pcount + ecount] = NULL;
+ sp = this_frame->stack + pcount;
+ for (i = 0; i < ecount; i++) {
+ getnode(r);
+ memset(r, 0, sizeof(NODE));
+ *sp++ = r;
+ /* local variable */
+ r->type = Node_var_new;
+ r->vname = varnames[pcount + i];
+ }
+
+ this_func->parmlist = varnames;
+ this_func->lnode->param_cnt += ecount;
+ }
+ }
+
+#if 0
+ pf_data.print_func = fprintf;
+ pf_data.fp = out_fp;
+ pf_data.defn = FALSE; /* in_dump = FALSE */
+ (void) print_code(f->code_ptr, &pf_data);
+#endif
+
+ ret_val = execute_code((volatile INSTRUCTION *) eval);
+
+ if (ret_val != NULL)
+ DEREF(ret_val); /* throw away return value */
+ /* else
+ fatal error */
+
+ if (this_func != NULL && ecount > 0) {
+ int i;
+
+ /* undo frame manipulation from above */
+
+ /* free eval locals */
+ sp = this_frame->stack + pcount;
+ for (i = ecount; i > 0; i--) {
+ r = *sp;
+ if (r->type == Node_var) /* eval local variable */
+ DEREF(r->var_value);
+ else if (r->type == Node_var_array) /* eval local array */
+ assoc_clear(r);
+ freenode(r);
+ *sp++ = (NODE *) 0;
+ }
+ if (pcount == 0) {
+ efree(this_frame->stack);
+ this_frame->stack = NULL;
+ } /* else
+ restore_frame() will free it */
+
+ efree(this_func->parmlist);
+ this_func->parmlist = save_parmlist;
+ this_func->lnode->param_cnt -= ecount;
+ }
+
+ /* always destroy symbol "@eval", however destroy all newly installed
+ * globals only if fatal error in r_interpret (r == NULL).
+ */
+
+ set_context(NULL); /* switch to prev context (main) */
+ free_context(ctxt, (ret_val != NULL)); /* free all instructions and optionally symbols */
+ if (ret_val != NULL)
+ destroy_symbol("@eval"); /* destroy "@eval" */
+ return FALSE;
+}
+
+/*
+GDB Documentation:
+ ... When you use condition, GDB checks expression
+immediately for syntactic correctness, and to determine whether symbols
+in it have referents in the context of your breakpoint. If expression
+uses symbols not referenced in the context of the breakpoint, GDB prints
+an error message:
+
+ No symbol "foo" in current context.
+*/
+
+static int invalid_symbol = 0;
+
+void
+check_symbol(char *name)
+{
+ invalid_symbol++;
+ d_error(_("No symbol `%s' in current context"), name);
+ /* install anyway, but keep track of it */
+ append_symbol(name);
+}
+
+/* parse_condition --- compile a condition expression */
+
+static int
+parse_condition(int type, int num, char *expr)
+{
+ INSTRUCTION *code = NULL;
+ CONTEXT *ctxt = NULL;
+ int ret;
+ BREAKPOINT *b;
+ struct list_item *w;
+ NODE *this_func = NULL;
+ INSTRUCTION *it, *stop, *rule;
+ struct condition *cndn = NULL;
+
+ if (type == D_break && (b = find_breakpoint(num)) != NULL) {
+ INSTRUCTION *rp;
+ cndn = &b->cndn;
+ rp = find_rule(b->src, b->bpi->source_line);
+ if (rp != NULL && rp->opcode == Op_func)
+ this_func = rp->func_body;
+ } else if (type == D_watch && (w = find_item(&watch_list, num)) != NULL) {
+ cndn = &w->cndn;
+ this_func = find_frame(cur_frame)->func_node;
+ }
+
+ if (cndn == NULL)
+ return -1;
+ if (expr == NULL)
+ goto out; /* delete condition */
+
+ install_params(this_func);
+ ctxt = new_context();
+ invalid_symbol = 0;
+ ctxt->install_func = check_symbol;
+ set_context(ctxt);
+ (void) add_srcfile(SRC_CMDLINE, expr, srcfiles, NULL, NULL);
+ ret = parse_program(&code);
+ remove_params(this_func);
+ set_context(NULL);
+
+ if (ret != 0 || invalid_symbol) {
+ free_context(ctxt, FALSE /* keep_globals */);
+ return -1;
+ }
+
+ /* condition expression is parsed as awk pattern without
+ * any action. The code is then modified to end up with
+ * a `1.0' on stack when the expression is true, `0.0' otherwise.
+ */
+
+ assert(code != NULL);
+ rule = ctxt->rule_list.nexti;
+ stop = bcalloc(Op_stop, 1, 0);
+
+ it = rule->firsti; /* Op_K_print_rec */
+ assert(it->opcode == Op_K_print_rec);
+ it->opcode = Op_push_i;
+ it->memory = mk_number((AWKNUM) 1.0, PERM|NUMBER|NUMCUR);
+ it->nexti = bcalloc(Op_jmp, 1, 0);
+ it->nexti->target_jmp = stop;
+ it->nexti->nexti = rule->lasti;
+
+ it = rule->lasti; /* Op_no_op, target for Op_jmp_false */
+ assert(it->opcode == Op_no_op);
+ it->opcode = Op_push_i;
+ it->memory = mk_number((AWKNUM) 0.0, PERM|NUMBER|NUMCUR);
+ it->nexti = stop;
+
+out:
+ if (cndn->expr != NULL)
+ efree(cndn->expr);
+ free_context(cndn->ctxt, FALSE);
+ cndn->code = code;
+ cndn->expr = expr;
+ cndn->ctxt = ctxt;
+
+ return 0;
+}
+
+/* do_condition --- condition command */
+
+int
+do_condition(CMDARG *arg, int cmd ATTRIBUTE_UNUSED)
+{
+ int type, num;
+ char *expr = NULL;
+
+ num = arg->a_int;
+ type = has_break_or_watch_point(&num, FALSE);
+ if (! type)
+ return FALSE;
+ arg = arg->next; /* condition expression */
+ if (arg != NULL)
+ expr = arg->a_string;
+ if (parse_condition(type, num, expr) == 0 && arg != NULL)
+ arg->a_string = NULL; /* don't let free_cmdarg free it */
+ return FALSE;
+}
+
+/* in_cmd_src --- check if filename already in cmd_src */
+
+int
+in_cmd_src(const char *filename)
+{
+ struct command_source *cs;
+ for (cs = cmd_src; cs != NULL; cs = cs->next) {
+ if (cs->str != NULL && STREQ(cs->str, filename))
+ return TRUE;
+ }
+ return FALSE;
+}
+
+int
+get_eof_status()
+{
+ if (cmd_src == NULL)
+ return EXIT_FATAL;
+ return cmd_src->eof_status;
+}
+
+void
+push_cmd_src(
+ int fd,
+ int istty,
+ char * (*readfunc)(const char *),
+ int (*closefunc)(int),
+ int ctype,
+ int eofstatus)
+{
+ struct command_source *cs;
+ emalloc(cs, struct command_source *, sizeof(struct command_source), "push_cmd_src");
+ cs->fd = fd;
+ cs->is_tty = istty;
+ cs->read_func = readfunc;
+ cs->close_func = closefunc;
+ cs->cmd = ctype;
+
+ /* eof_status = EXIT_FATAL - exit with status EXIT_FATAL on EOF or error.
+ * = EXIT_FAILURE - exit status EXIT_FAILURE on error.
+ * = EXIT_SUCCESS - don't exit on EOF or error.
+ */
+ cs->eof_status = eofstatus;
+ cs->str = NULL;
+ cs->next = cmd_src;
+ cmd_src = cs;
+
+ input_fd = fd;
+ input_from_tty = istty;
+ read_a_line = readfunc;
+}
+
+int
+pop_cmd_src()
+{
+ struct command_source *cs;
+
+ if (cmd_src->next == NULL)
+ return -1;
+
+ cs = cmd_src;
+ cmd_src = cs->next;
+ if (cs->close_func && cs->fd != INVALID_HANDLE)
+ cs->close_func(cs->fd);
+ if (cs->str != NULL)
+ efree(cs->str);
+ efree(cs);
+
+ input_fd = cmd_src->fd;
+ input_from_tty = cmd_src->is_tty;
+ read_a_line = cmd_src->read_func;
+ return 0;
+}
diff --git a/dfa.c b/dfa.c
index 3621676a..fdaaadbd 100644
--- a/dfa.c
+++ b/dfa.c
@@ -58,8 +58,11 @@
/* We can handle multibyte strings. */
#include <wchar.h>
#include <wctype.h>
+
+#if HAVE_LANGINFO_CODESET
# include <langinfo.h>
#endif
+#endif
#include "regex.h"
#include "dfa.h"
@@ -726,33 +729,37 @@ in_coll_range (char ch, char from, char to)
typedef int predicate (int);
+#ifdef GAWK
+#define bool int
+#define true (1)
+#define false (0)
+#endif
/* The following list maps the names of the Posix named character classes
to predicate functions that determine whether a given character is in
the class. The leading [ has already been eaten by the lexical analyzer. */
-static struct {
+struct dfa_ctype {
const char *name;
- predicate *pred;
-} const prednames[] = {
- { "alpha", isalpha },
- { "upper", isupper },
- { "lower", islower },
- { "digit", isdigit },
- { "xdigit", isxdigit },
- { "space", isspace },
- { "punct", ispunct },
- { "alnum", isalnum },
- { "print", isprint },
- { "graph", isgraph },
- { "cntrl", iscntrl },
-#ifdef GAWK
- { "blank", is_blank },
-#else
- { "blank", isblank },
-#endif
- { NULL, NULL }
+ predicate *func;
+ bool single_byte_only;
+};
+
+static const struct dfa_ctype prednames[] = {
+ { "alpha", isalpha, false },
+ { "upper", isupper, false },
+ { "lower", islower, false },
+ { "digit", isdigit, true },
+ { "xdigit", isxdigit, true },
+ { "space", isspace, false },
+ { "punct", ispunct, false },
+ { "alnum", isalnum, false },
+ { "print", isprint, false },
+ { "graph", isgraph, false },
+ { "cntrl", iscntrl, false },
+ { "blank", is_blank, false },
+ { NULL, NULL, false }
};
-static predicate *
+static const struct dfa_ctype *
find_pred (const char *str)
{
unsigned int i;
@@ -760,7 +767,7 @@ find_pred (const char *str)
if (STREQ (str, prednames[i].name))
break;
- return prednames[i].pred;
+ return &prednames[i];
}
/* Multibyte character handling sub-routine for lex.
@@ -773,6 +780,13 @@ parse_bracket_exp (void)
int c, c1, c2;
charclass ccl;
+ /* Used to warn about [:space:].
+ Bit 0 = first character is a colon.
+ Bit 1 = last character is a colon.
+ Bit 2 = includes any other character but a colon.
+ Bit 3 = includes ranges, char/equiv classes or collation elements. */
+ int colon_warning_state;
+
#if MBS_SUPPORT
wint_t wc, wc1, wc2;
@@ -811,9 +825,11 @@ parse_bracket_exp (void)
else
invert = 0;
+ colon_warning_state = (c == ':');
do
{
c1 = EOF; /* mark c1 is not initialized". */
+ colon_warning_state &= ~2;
/* Note that if we're looking at some other [:...:] construct,
we just treat it as a bunch of ordinary characters. We can do
@@ -857,8 +873,12 @@ parse_bracket_exp (void)
|| STREQ (str, "lower"))
? "alpha"
: str);
+ const struct dfa_ctype *pred = find_pred (class);
+ if (!pred)
+ dfaerror(_("invalid character class"));
+
#if MBS_SUPPORT
- if (MB_CUR_MAX > 1)
+ if (MB_CUR_MAX > 1 && !pred->single_byte_only)
{
/* Store the character class as wctype_t. */
wctype_t wt = wctype (class);
@@ -872,14 +892,9 @@ parse_bracket_exp (void)
}
#endif
- {
- predicate *pred = find_pred (class);
- if (!pred)
- dfaerror(_("invalid character class"));
- for (c2 = 0; c2 < NOTCHAR; ++c2)
- if ((*pred)(c2))
- setbit_case_fold (c2, ccl);
- }
+ for (c2 = 0; c2 < NOTCHAR; ++c2)
+ if (pred->func(c2))
+ setbit_case_fold (c2, ccl);
}
#if MBS_SUPPORT
@@ -912,6 +927,7 @@ parse_bracket_exp (void)
}
}
#endif
+ colon_warning_state |= 8;
/* Fetch new lookahead character. */
FETCH_WC (c1, wc1, _("unbalanced ["));
@@ -997,10 +1013,13 @@ parse_bracket_exp (void)
setbit_case_fold (c, ccl);
}
+ colon_warning_state |= 8;
FETCH_WC(c1, wc1, _("unbalanced ["));
continue;
}
+ colon_warning_state |= (c == ':') ? 2 : 4;
+
#if MBS_SUPPORT
/* Build normal characters. */
setbit_case_fold (wc, ccl);
@@ -1040,6 +1059,9 @@ parse_bracket_exp (void)
#endif
(c = c1) != ']'));
+ if (colon_warning_state == 7)
+ dfawarn (_("character class syntax is [[:space:]], not [:space:]"));
+
#if MBS_SUPPORT
if (MB_CUR_MAX > 1
&& (!using_utf8()
@@ -2310,8 +2332,8 @@ dfaanalyze (struct dfa *d, int searchflag)
void
dfastate (int s, struct dfa *d, int trans[])
{
- position_set grps[NOTCHAR]; /* As many as will ever be needed. */
- charclass labels[NOTCHAR]; /* Labels corresponding to the groups. */
+ position_set *grps; /* As many as will ever be needed. */
+ charclass *labels; /* Labels corresponding to the groups. */
int ngrps = 0; /* Number of groups actually used. */
position pos; /* Current position being considered. */
charclass matches; /* Set of matching characters. */
@@ -2335,6 +2357,9 @@ dfastate (int s, struct dfa *d, int trans[])
#endif
int i, j, k;
+ grps = xnmalloc (NOTCHAR, sizeof *grps);
+ labels = xnmalloc (NOTCHAR, sizeof *labels);
+
/* Initialize the set of letters, if necessary. */
if (! initialized)
{
@@ -2597,6 +2622,8 @@ dfastate (int s, struct dfa *d, int trans[])
free(grps[i].elems);
free(follows.elems);
free(tmp.elems);
+ free(grps);
+ free(labels);
}
/* Some routines for manipulating a compiled dfa's transition tables.
@@ -3121,6 +3148,53 @@ transit_state (struct dfa *d, int s, unsigned char const **pp)
return s1;
}
+/* Initialize mblen_buf and inputwcs with data from the next line. */
+
+static void
+prepare_wc_buf (const char *begin, const char *end)
+{
+ unsigned char eol = eolbyte;
+ size_t remain_bytes, i;
+
+ buf_begin = (unsigned char *) begin;
+
+ remain_bytes = 0;
+ for (i = 0; i < end - begin + 1; i++)
+ {
+ if (remain_bytes == 0)
+ {
+ remain_bytes
+ = mbrtowc(inputwcs + i, begin + i, end - begin - i + 1, &mbs);
+ if (remain_bytes < 1
+ || remain_bytes == (size_t) -1
+ || remain_bytes == (size_t) -2
+ || (remain_bytes == 1 && inputwcs[i] == (wchar_t)begin[i]))
+ {
+ remain_bytes = 0;
+ inputwcs[i] = (wchar_t)begin[i];
+ mblen_buf[i] = 0;
+ if (begin[i] == eol)
+ break;
+ }
+ else
+ {
+ mblen_buf[i] = remain_bytes;
+ remain_bytes--;
+ }
+ }
+ else
+ {
+ mblen_buf[i] = remain_bytes;
+ inputwcs[i] = 0;
+ remain_bytes--;
+ }
+ }
+
+ buf_end = (unsigned char *) (begin + i);
+ mblen_buf[i] = 0;
+ inputwcs[i] = 0; /* sentinel */
+}
+
#endif /* MBS_SUPPORT */
/* Search through a buffer looking for a match to the given struct dfa.
@@ -3144,9 +3218,9 @@ dfaexec (struct dfa *d, char const *begin, char *end,
int **trans, *t; /* Copy of d->trans so it can be optimized
into a register. */
unsigned char eol = eolbyte; /* Likewise for eolbyte. */
+ unsigned char saved_end;
static int sbit[NOTCHAR]; /* Table for anding with d->success. */
static int sbit_init;
- unsigned char saved_end;
if (! sbit_init)
{
@@ -3170,44 +3244,10 @@ dfaexec (struct dfa *d, char const *begin, char *end,
#if MBS_SUPPORT
if (d->mb_cur_max > 1)
{
- unsigned int i;
- int remain_bytes;
- buf_begin = (unsigned char *) begin;
- buf_end = (unsigned char *) end;
-
- /* initialize mblen_buf, and inputwcs. */
MALLOC(mblen_buf, unsigned char, end - begin + 2);
MALLOC(inputwcs, wchar_t, end - begin + 2);
- memset(&mbs, 0, sizeof mbs);
- remain_bytes = 0;
- for (i = 0; i < end - begin + 1; i++)
- {
- if (remain_bytes == 0)
- {
- remain_bytes
- = mbrtowc(inputwcs + i, begin + i, end - begin - i + 1, &mbs);
- if (remain_bytes < 1
- || (remain_bytes == 1 && inputwcs[i] == (wchar_t)begin[i]))
- {
- remain_bytes = 0;
- inputwcs[i] = (wchar_t)begin[i];
- mblen_buf[i] = 0;
- }
- else
- {
- mblen_buf[i] = remain_bytes;
- remain_bytes--;
- }
- }
- else
- {
- mblen_buf[i] = remain_bytes;
- inputwcs[i] = 0;
- remain_bytes--;
- }
- }
- mblen_buf[i] = 0;
- inputwcs[i] = 0; /* sentinel */
+ memset(&mbs, 0, sizeof(mbstate_t));
+ prepare_wc_buf ((const char *) p, end);
}
#endif /* MBS_SUPPORT */
@@ -3217,7 +3257,7 @@ dfaexec (struct dfa *d, char const *begin, char *end,
if (d->mb_cur_max > 1)
while ((t = trans[s]))
{
- if ((char *) p > end)
+ if (p > buf_end)
break;
s1 = s;
SKIP_REMAINS_MB_IF_INITIAL_STATE(s, p);
@@ -3228,6 +3268,19 @@ dfaexec (struct dfa *d, char const *begin, char *end,
continue;
}
+ /* Falling back to the glibc matcher in this case gives
+ better performance (up to 25% better on [a-z], for
+ example) and enables support for collating symbols and
+ equivalence classes. */
+ if (backref)
+ {
+ *backref = 1;
+ free(mblen_buf);
+ free(inputwcs);
+ *end = saved_end;
+ return (char *) p;
+ }
+
/* Can match with a multibyte character (and multi character
collating element). Transition table might be updated. */
s = transit_state(d, s, &p);
@@ -3277,8 +3330,16 @@ dfaexec (struct dfa *d, char const *begin, char *end,
}
/* If the previous character was a newline, count it. */
- if (count && (char *) p <= end && p[-1] == eol)
- ++*count;
+ if ((char *) p <= end && p[-1] == eol)
+ {
+ if (count)
+ ++*count;
+
+#if MBS_SUPPORT
+ if (d->mb_cur_max > 1)
+ prepare_wc_buf ((const char *) p, end);
+#endif
+ }
/* Check if we've run off the end of the buffer. */
if ((char *) p > end)
diff --git a/dfa.h b/dfa.h
index 0a8ad421..ac339309 100644
--- a/dfa.h
+++ b/dfa.h
@@ -90,7 +90,13 @@ extern void dfastate (int, struct dfa *, int []);
/* Error handling. */
+/* dfawarn() is called by the regexp routines whenever a regex is compiled
+ that likely doesn't do what the user wanted. It takes a single
+ argument, a NUL-terminated string describing the situation. The user
+ must supply a dfawarn. */
+extern void dfawarn (const char *);
+
/* dfaerror() is called by the regexp routines whenever an error occurs. It
takes a single argument, a NUL-terminated string describing the error.
The user must supply a dfaerror. */
-extern void dfaerror (const char *) __attribute__ ((noreturn));
+extern void dfaerror (const char *);
diff --git a/doc/ChangeLog b/doc/ChangeLog
index ec1cc43a..871c9400 100644
--- a/doc/ChangeLog
+++ b/doc/ChangeLog
@@ -1,3 +1,36 @@
+Mon Nov 8 22:24:21 2010 Arnold D. Robbins <arnold@skeeve.com>
+
+ * gawk.1: Minor fix from Jari Aalto <jari.aalto@cante.net>
+ to help Emacs fontification.
+
+Tue Nov 2 12:15:56 2010 Arnold D. Robbins <arnold@skeeve.com>
+
+ * awkcard.in, gawk.1, gawk.texi: --lint --> -L,
+ --lint-old --> -t.
+
+Mon Nov 1 22:01:26 2010 Arnold D. Robbins <arnold@skeeve.com>
+
+ * awkcard.in, gawk.1, gawk.texi: -l renamed -t.
+
+Sat Oct 30 05:53:25 2010 John Haque <j.eh@mchsi.com>
+
+ * gawk.texi: Added section on Array of Arrays.
+
+Sat Oct 23 20:36:58 2010 Arnold D. Robbins <arnold@skeeve.com>
+
+ * awkcard.in: Updated, cleaned up.
+ * gawk.1: Updated, some clean up.
+
+Wed Sep 22 05:29:43 2010 Arnold D. Robbins <arnold@skeeve.com>
+
+ * gawk.texi: Added section on @include files.
+
+Wed Aug 18 22:14:19 2010 Arnold D. Robbins <arnold@skeeve.com>
+
+ * gawk.texi: Minor edits.
+ * Makefile.am (LN): Use `ln -f' when installing link for
+ pgawk.1. Thanks to Peter Breitenlohner <peb@mppmu.mpg.de>.
+
Thu Jul 1 21:29:25 2010 Arnold D. Robbins <arnold@skeeve.com>
* gawk.texi, gawk.1, awkcard.in: Document `/inet4' and `/inet6'.
diff --git a/doc/Makefile.am b/doc/Makefile.am
index 38971b2a..80741ab6 100644
--- a/doc/Makefile.am
+++ b/doc/Makefile.am
@@ -33,7 +33,8 @@ EXTRA_DIST = ChangeLog README.card ad.block setter.outline \
macros colors no.colors $(man_MANS) \
lflashlight.eps rflashlight.eps \
lflashlight.pdf rflashlight.pdf \
- statist.jpg statist.eps statist.pdf
+ statist.jpg statist.eps statist.pdf \
+ bc_notes README.DGAWK
# Get rid of generated files when cleaning
CLEANFILES = *.ps *.html *.dvi *~ awkcard.nc awkcard.tr gawk.pdf gawkinet.pdf awkcard.pdf gawk.1.pdf
@@ -62,7 +63,7 @@ AWKCARD = awkcard.ps
# make pgawk.1 a link to gawk.1 in the installed man directory.
# We want hard links for install-data-hook, below
-LN= ln
+LN= ln -f
# Link gawk.1 to pgawk.1
install-data-hook:
diff --git a/doc/Makefile.in b/doc/Makefile.in
index 661c90ef..c373f5e8 100644
--- a/doc/Makefile.in
+++ b/doc/Makefile.in
@@ -70,9 +70,9 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/arch.m4 \
$(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libsigsegv.m4 \
$(top_srcdir)/m4/longlong.m4 $(top_srcdir)/m4/nls.m4 \
$(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \
- $(top_srcdir)/m4/socket.m4 $(top_srcdir)/m4/stdint_h.m4 \
- $(top_srcdir)/m4/uintmax_t.m4 $(top_srcdir)/m4/ulonglong.m4 \
- $(top_srcdir)/configure.ac
+ $(top_srcdir)/m4/readline.m4 $(top_srcdir)/m4/socket.m4 \
+ $(top_srcdir)/m4/stdint_h.m4 $(top_srcdir)/m4/uintmax_t.m4 \
+ $(top_srcdir)/m4/ulonglong.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
@@ -154,6 +154,7 @@ LDFLAGS = @LDFLAGS@
LIBICONV = @LIBICONV@
LIBINTL = @LIBINTL@
LIBOBJS = @LIBOBJS@
+LIBREADLINE = @LIBREADLINE@
LIBS = @LIBS@
LIBSIGSEGV = @LIBSIGSEGV@
LIBSIGSEGV_PREFIX = @LIBSIGSEGV_PREFIX@
@@ -246,7 +247,8 @@ EXTRA_DIST = ChangeLog README.card ad.block setter.outline \
macros colors no.colors $(man_MANS) \
lflashlight.eps rflashlight.eps \
lflashlight.pdf rflashlight.pdf \
- statist.jpg statist.eps statist.pdf
+ statist.jpg statist.eps statist.pdf \
+ bc_notes README.DGAWK
# Get rid of generated files when cleaning
@@ -273,7 +275,7 @@ AWKCARD = awkcard.ps
# make pgawk.1 a link to gawk.1 in the installed man directory.
# We want hard links for install-data-hook, below
-LN = ln
+LN = ln -f
all: all-am
.SUFFIXES:
diff --git a/doc/README.DGAWK b/doc/README.DGAWK
new file mode 100644
index 00000000..ac54e29c
--- /dev/null
+++ b/doc/README.DGAWK
@@ -0,0 +1,304 @@
+INVOKING:
+
+ Invoking dgawk is similar to gawk. Run dgawk with all options and arguments as
+you would supply to gawk. Command line scripts can not be debugged using dgawk.
+dgawk expects at least one program text included via the -f option. If you include
+programs using the --source option, dgawk will not stop at instructions originating
+from that source.
+
+USAGE:
+
+ $> dgawk -f foo.awk
+ dgawk> list
+ ...
+ dgawk> break 5
+ ...
+ dgawk> run
+ ...
+ dgawk> next
+ ...
+ dgawk> continue
+ ...
+ dgawk> quit
+
+
+COMMANDS:
+
+ * help [command]
+ prints a list of all commands and short descriptions.
+ 'help command' prints the information about command 'command'.
+
+ * info source|sources|variables|functions|break|frame|args|locals|display|watch
+ * source
+ name of the current source file. Each time the program stops, the
+ current source file is the file containing the current instruction.
+ When dgawk first starts, the current source file is the first file
+ included via the -f option. The 'list filename:lineno' command can
+ be used at any time to change the current source.
+ * sources
+ list all program sources.
+ * variables
+ list all global variables.
+ * functions
+ list all function definitions including source file names and
+ line numbers.
+ * break
+ list all currently set breakpoints.
+ * frame
+ description of the selected stack frame.
+ * args
+ arguments of the selected frame.
+ * locals
+ local variables of the selected frame.
+ * display
+ list of all items in the automatic display list.
+ * watch
+ list of all items in the watch list.
+
+ * list [-|+|n|filename:n|m-n|function]
+ prints specified lines (default 15) from the current source file
+ or file named 'filename'.
+ - print lines before the lines last printed.
+ + print lines after the lines last printed.
+ list without any argument does the same thing.
+ n print lines centered around line number 'n'.
+ m-n print lines from 'm' to 'n'.
+ filename:n print lines centered around line number 'n' in
+ source file 'filename'. May change current source file.
+ function print lines centered around beginning of the
+ function 'function'. May change current source file.
+
+ * break [[filename:]n|function]
+ Without any argument, sets a breakpoint at the next instruction
+ to be executed in the selected stack frame.
+ n set a breakpoint at line number 'n' in the current
+ source file.
+ filename:n set a breakpoint at line number 'n' in source file
+ 'filename'.
+ function set a breakpoint at entry to function (first instruction)
+ 'function'.
+
+ * tbreak [[filename:]n|function]
+ set a temporary breakpoint (enabled for only one stop).
+
+ * disable [n1 n2 ...] [m-n]
+ disable specified breakpoints or a range of breakpoints. Without
+ any argument, disables all breakpoints.
+
+ * enable [once|del] [n1 n2 ...] [m-n]
+ enable specified breakpoints or a range of breakpoints. Without
+ any argument, enables all breakpoints.
+ once enable breakpoint(s) temporarily, then disable it when
+ the program stops at the breakpoint.
+ del enable breakpoint(s) tempoarily, then delete it when
+ the program stops at the breakpoint.
+
+ * delete [n1 n2 ...] [m-n]
+ delete specified breakpoints or a range of breakpoints. Deletes
+ all defined breakpoints if no argument is supplied.
+
+ * clear [[filename:]n|function]
+ without any argument, deletes any breakpoint at the next instruction
+ to be executed in the selected stack frame. If the program stops at
+ a breakpoint, this will delete that breakpoint so that the program
+ does not stop at that location again.
+ n delete breakpoint(s) set at line number 'n' in current
+ source file.
+ filename:n delete breakpoint(s) set at line number 'n' in source
+ file 'filename'.
+ function delete breakpoint(s) set at entry to function 'function'.
+
+ * ignore N COUNT
+ ignore breakpoint N COUNT times before stopping.
+
+ * run
+ starts/restarts execution of the program. When restarting, dgawk retains
+ current breakpoints, watchpoints, command history, automatic display
+ variables and debugger options.
+
+ * frame [N]
+ select and print (frame number, function and argument names, source file,
+ and the source line) stack frame N. Frame 0 is the currently executing
+ or innermost frame (function call), frame 1 is the frame that called the
+ innermost one. The highest numbered frame is the one for 'main'.
+
+ * up [COUNT]
+ move COUNT (default 1) frames up the stack toward the outermost frame.
+ selects and prints the frame.
+
+ * down [COUNT]
+ move COUNT (default 1) frames down the stack toward the innermost frame.
+ selects and prints the frame.
+
+ * backtrace [COUNT]
+ print backtrace of all function calls (stack frames), or innermost COUNT
+ frames if COUNT > 0. Prints outermost -COUNT frames for COUNT < 0.
+ Displays name and arguments to each function, source filename and line number.
+
+ * continue [COUNT]
+ resume program execution. If continued from a breakpoint and COUNT is
+ specified, ignores the breakpoint at that location next COUNT times before
+ stopping.
+
+ * step [COUNT]
+ continue execution until control reaches a different source line in the
+ current stack frame. Step steps inside any function called within the line.
+ If the argument COUNT is supplied, steps that many times before stopping,
+ unless it encounters a breakpoint (or watchpoint).
+
+ * next [COUNT]
+ continue execution to the next source line, stepping over function calls.
+ The argument COUNT controls how many times to repeat the action as
+ in step.
+
+ * stepi [COUNT]
+ execute one (or COUNT) instruction(s), stepping inside function calls.
+
+ * nexti [COUNT]
+ execute one (or COUNT) instruction(s), stepping over function calls.
+
+ * finish
+ execute program until the selected stack frame returns.
+ Prints the returned value.
+
+ * return [value]
+ cancel execution of a function call. If 'value' (either string or number)
+ is specified, it is used as the function's return value. If used in a
+ frame other than the the innermost one (currently executing function i.e.
+ frame number 0), discards all outer frames in addition to the selected one,
+ and the caller of that frame becomes the innermost frame.
+
+ * until [[filename:]n|function]
+ without any argument, continues execution until a line past the current
+ line in current stack frame is reached. With argument,
+ continues execution until the specified location is reached, or the current
+ stack frame returns.
+
+ * print var1[,|\s|\t var2 ...]
+ print the value of a gawk variable or field. Fields must be referenced by
+ constants:
+ dgawk> print $3
+ prints the third field in the input record (if the specified field does not
+ exist, it will print 'Null field'). Variable can be an array element, with
+ the subscripts being constant values. To print the contents of an array,
+ prefix the name of the array with the '@' symbol:
+ gawk> print @a
+ prints the index and the corresponding value for all elements in array 'a'.
+
+ * printf format, [arg], ...
+ print formatted text. May include escape sequences, such as `\n'.
+ No newline is printed unless specified one.
+
+ * set var=value
+ assign a constant (number or string) value to a gawk variable or field.
+ String values must be enclosed between double quotes(").
+
+ * display [var|$n]
+ add variable 'var' (or field $n) to the automatic display list. The
+ value of the variable or field is displayed each time the program stops.
+ Each variable added to the list is identified by a unique number:
+ dgawk> display x
+ 10: x = 1
+ displays the assigned item number, the variable name and its current value.
+ If the display variable refers to a function parameter, it is silently
+ deleted from the list as soon as the execution reaches a context where
+ no such variable of the given name exists.
+ Without argument, displays the current values of items on the list.
+
+ * undisplay [N]
+ remove item number N (or all items) from the automatic display list.
+
+ * watch var|$n
+ add variable 'var' (or field $n) to the watch list. dgawk will stop whenever
+ the value of the variable or field changes. Each watched item is assigned a
+ number which can be used to delete it from the watch list using the
+ unwatch command.
+
+ * unwatch [N]
+ remove item number N (or all items) from the watch list.
+
+ * option [name[=value]]
+ without argument, displays the available debugger options
+ and their current values. 'option name' shows the current
+ value of the named option. 'option name=value' assigns
+ a new value to the named option.
+ Available options:
+ * listsize
+ the number of lines that list prints. The default is 15.
+ * prompt
+ debugger prompt. The default is "dgawk> ".
+ * trace [on|off]
+ turns instruction tracing on or off. The default is off.
+ * outfile
+ sends gawk output to a file; debugger output still goes
+ to stdout. An empty string ("") resets output to stdout.
+ * save_history [on|off]
+ save command history to file ./.dgawk_history. The default is 'on'.
+ * history_size
+ maximum no of lines to keep in history file ./.dgawk_history.
+ The default is 100.
+ * save_options [on|off]
+ save current options to file ./.dgawkrc on quit. The default is 'on'.
+ Options are read back in next session on startup.
+
+ * commands [N]
+ * silent
+ * end
+ 'commands' sets list of commands to be executed when stopped at
+ a breakpoint or watchpoint. N is the breakpoint or watchpoint number.
+ Without a number, refers to the last one set. The actual commands follow
+ starting on the next line and are terminated by the 'end' command.
+ If the command 'silent' is in the list, the usual messages about stopping
+ at a breakpoint and the sourceline are not printed. Any command
+ in the list that resumes execution (e.g. continue) terminates the list
+ (an implicit end), and subsequent commands are ignored.
+
+ dgawk> commands
+ > silent
+ > printf "A silent breakpoint; i = %d\n", i
+ > info locals
+ > set i = 10
+ > continue
+ > end
+ dgawk>
+
+ * source filename
+ run command(s) from a file; an error in any command does not
+ terminate execution of subsequent commands. Comments (lines starting
+ with #) are allowed in a command file. Empty lines are ignored, does not
+ repeat last command. Can't restart program by having more than one run
+ command in the file.
+ Can also use the '-R file' OR '--command=file' command line option to
+ execute commands from a file non-interactively.
+
+ * save filename
+ saves the commands from the current session to the given filename,
+ so it can be replayed using the source command.
+
+ * quit
+ quit debugger.
+
+
+READLINE SUPPORT:
+
+ If compiled with readline library, you can take advantage of its command
+completion and history expansion feature. The following types of completion
+are available:
+ * command completion
+ command names.
+ * source filename completion
+ source file names. Relevant commands are list, break, tbreak, until,
+ and clear.
+ * argument completion
+ non-number arguments to a command. Relevant commands are info and enable.
+ * variable name completion
+ global variable names, and function arguments in the current context
+ if the program is running. Relevant commands are print, set, watch,
+ and display.
+
+REFERENCES:
+
+ * Debugging with GDB, the manual for the GNU Source-Level Debugger.
+ Much of the contents of this README shamelessly stolen and adapted from it.
+ * GNU Readline User's Manual
+ * GNU History User's Manual
diff --git a/doc/awkcard.in b/doc/awkcard.in
index 0d00c33e..9ff33a5d 100644
--- a/doc/awkcard.in
+++ b/doc/awkcard.in
@@ -47,42 +47,41 @@
.ES
.in +.2i
.nf
-\*(FRAction Statements 7
-Arrays 10
-Awk Program Execution 4
-Bit Manipulation Functions (\*(GK) 15
+\*(FRAction Statements 9
+Arrays 7
+Awk Program Execution 5
+Bit Manipulation Functions (\*(GK) 17
Bug Reports 2
-Closing Redirections 12
+Closing Redirections 13
Command Line Arguments (standard) 2
Command Line Arguments (\*(GK) 3
Command Line Arguments (\*(MK) 4
-Conversions And Comparisons 9
+Conversions And Comparisons 8
Copying Permissions 18
Definitions 2
-Dynamic Extensions (\*(GK) 16
-Environment Variables (\*(GK) 17
-Escape Sequences 8
-Expressions 10
-Fields 6
+Dynamic Extensions (\*(GK) 17
+Environment Variables (\*(GK) 11
+Escape Sequences 9
+Expressions 7
+Fields 10
FTP/HTTP Information 18
-Historical Features (\*(GK) 17
-Input Control 11
-Internationalization (\*(GK) 16
-Lines And Statements 5
-Localization (\*(GK) 16
+Historical Features (\*(GK) 10
+Input Control 13
+Internationalization (\*(GK) 18
+Lines And Statements 4
+Localization (\*(GK) 12
Numeric Functions 15
-Output Control 11
-Pattern Elements 7
-POSIX Character Classes 6
-Printf Formats 13
-Records 6
-Regular Expressions 5
+Output Control 13
+Pattern Elements 8
+Printf Formats 14
+Records 10
+Regular Expressions 11
Signals (\*(PK) 4
Special Filenames 12
-String Functions 14
-Time Functions (\*(GK) 15
-User-defined Functions 17
-Variables 8\*(CX
+String Functions 16
+Time Functions (\*(GK) 17
+User-defined Functions 15
+Variables 5\*(CX
.in -.2i
.EB "\s+2\f(HBCONTENTS\*(FR\s0"
.sp .4
@@ -111,7 +110,7 @@ Brian Kernighan and Michael Brennan who reviewed it.
.\" --- Definitions
.fi
.ES
-\*(CDThis card describes POSIX AWK, as well as the three
+\*(CDThis card describes POSIX AWK, as well as three
freely available \*(AK implementations
(see \fHFTP/HTTP Information\fP below).
\*(CLCommon extensions (in two or more versions) are printed in light blue.
@@ -158,7 +157,7 @@ Regexp constants may contain \*(FIescape sequences\*(FR.
\*(FIname\fP \- a variable, array or function name.
.sp .5
\*(FIentry\fP(\*(FIN\fP) \- entry \*(FIentry\fP in section \*(FIN\fP of the
-UNIX reference manual.
+Unix reference manual.
.sp .5
\*(FIpattern\fP \- an expression describing an input record to be matched.
.sp .5
@@ -181,19 +180,19 @@ the behavior of the running interpreter.
.sp .5
.TS
expand;
-l lw(2.2i).
-\*(FC\-F \*(FIfs\*(FR use \*(FIfs\fP for the input field separator.
+l lw(2.0i).
+\*(FC\-F \*(FIfs\*(FR Use \*(FIfs\fP for the input field separator.
\*(FC\-v\*(FI var\*(FC\^=\^\*(FIval\*(FR T{
-assign the value \*(FIval\*(FR to the variable \*(FIvar\*(FR
+Assign the value \*(FIval\*(FR to the variable \*(FIvar\*(FR
before execution of the program begins. Such
variable values are available to the \*(FCBEGIN\fP rule.
T}
\*(FC\-f \*(FIprog-file\*(FR T{
-read the AWK program source from the file
+Read the AWK program source from the file
\*(FIprog-file\*(FR, instead of from the first command
line argument. Multiple \*(FC\-f\*(FR options may be used.
T}
-\*(FC\-\^\-\*(FR signal the end of options.\*(CX
+\*(FC\-\^\-\*(FR Signal the end of options.\*(CX
.TE
.EB "\s+2\f(HBCOMMAND LINE ARGUMENTS (standard)\*(FR\s0"
@@ -231,9 +230,9 @@ T}
.TS
expand, tab(%);
l lw(1.3i).
-\*(FC\-\^\-assign \*(FIvar\*(FC\^=\^\*(FIval\*(FR%just like \*(FC\-v\fP.
-\*(FC\-\^\-field-separator \*(FIfs\*(FR%just like \*(FC\-F\fP.
-\*(FC\-\^\-file \*(FIprog-file%\*(FRjust like \*(FC\-f\fP.
+\*(FC\-\^\-assign \*(FIvar\*(FC\^=\^\*(FIval\*(FR%Same as \*(FC\-v\fP.
+\*(FC\-\^\-field-separator \*(FIfs\*(FR%Same as \*(FC\-F\fP.
+\*(FC\-\^\-file \*(FIprog-file%\*(FRSame as \*(FC\-f\fP.
.TE
.in +4n
.TI "\*(FC\-b\*(FR, \*(FC\-\^\-characters\-as\-bytes\*(FR
@@ -241,37 +240,35 @@ Treat all input data as single-byte characters. I.e.,
don't attempt to
process strings as multibyte characters.
Overridden by \*(FC\-\^\-posix\*(FR.
-.TI "\*(FC\-c\*(FR, \*(FC\-\^\-compat\*(FR, \*(FC\-\^\-traditional\*(FR
-disable \*(GK-specific extensions
-(the use of \*(FC\-\^\-traditional\*(FR is preferred).
-.TI "\*(FC\-C\*(FR, \*(FC\-\^\-copyleft\*(FR, \*(FC\-\^\-copyright\*(FR
-print the short version of the GNU
+.TI "\*(FC\-c\*(FR, \*(FC\-\^\-traditional\*(FR
+Disable \*(GK-specific extensions.
+.TI "\*(FC\-C\*(FR, \*(FC\-\^\-copyright\*(FR
+Print the short version of the GNU
copyright information on \*(FCstdout\*(FR.
-.T&
-.IT "\*(FC\-d \*(FIfile\*(FR, \*(FC\-\^\-dump-variables\*(FR[\*(FC=\*(FIfile\*(FR]
-print a sorted list of global variables,
+.TI "\*(FC\-d \*(FIfile\*(FR, \*(FC\-\^\-dump-variables\*(FR[\*(FC=\*(FIfile\*(FR]
+Print a sorted list of global variables,
their types and final values to
\*(FIfile\*(FR.
If no \*(FIfile\*(FR
is provided, \*(FCgawk\*(FR
uses \*(FCawkvars.out\*(FR.
.TI "\*(FC-e '\*(FItext\*(FC'\*(FR, \*(FC\-\^\-source '\*(FItext\*(FC'\*(FR
-use \*(FItext\*(FR as AWK program source code.
+Use \*(FItext\*(FR as AWK program source code.
.TI "\*(FC\-E \*(FIfile\*(FR, \*(FC\-\^\-exec \*(FIfile\*(FR
-read program text from \*(FIfile\fP. No other
+Read program text from \*(FIfile\fP. No other
options are processed.
Also disables command-line variable assignments.
Useful with \*(FC#!\fP.
.TI "\*(FC\-g\*(FR, \*(FC\-\^\-gen\-pot\*(FR
-process the program and print a GNU \*(FCgettext\*(FR
-format \*(FC\&.po\*(FR format file on standard output,
+Process the program and print a GNU \*(FCgettext\*(FR
+format \*(FC\&.pot\*(FR file on standard output,
containing the text of all strings that were marked
for localization.
-.TI "\*(FC\-h\*(FR, \*(FC\-\^\-help\*(FR, \*(FC\-\^\-usage\*(FR
-print a short summary of the available
+.TI "\*(FC\-h\*(FR, \*(FC\-\^\-help\*(FR
+Print a short summary of the available
options on \*(FCstdout\*(FR, then exit zero.
-.TI "\*(FC\-l \*(FR[\*(FC=\*(FIvalue\*(FR], \*(FC\-\^\-lint\*(FR[\*(FC=\*(FIvalue\*(FR]
-warn about dubious or non-portable constructs.
+.TI "\*(FC\-L \*(FR[\*(FC\*(FIvalue\*(FR], \*(FC\-\^\-lint\*(FR[\*(FC=\*(FIvalue\*(FR]
+Warn about dubious or non-portable constructs.
If \*(FIvalue\*(FR is
\*(FCfatal\*(FR,
lint warnings become fatal errors.
@@ -279,19 +276,15 @@ If \*(FIvalue\*(FR is
\*(FCinvalid\*(FR,
only issue warnings about things that are
actually invalid (not fully implemented yet).
-.TI "\*(FC-L\*(FR, \*(FC\-\^\-lint\-old\*(FR
-warn about constructs that are not
-portable to the original version of
-Unix \*(AK.
.TI "\*(FC\-n\*(FR, \*(FC\-\^\-non\-decimal\-data\*(FR
-recognize octal and hexadecimal values in input data.
+Recognize octal and hexadecimal values in input data.
\*(FIUse this option with great caution!\*(FR
.TI "\*(FC\-N\*(FR, \*(FC\-\^\-use\-lc\-numeric\*(FR
-force use of the locale's decimal point character when parsing input data.
+Force use of the locale's decimal point character when parsing input data.
.TI "\*(FC\-O\*(FR, \*(FC\-\^\-optimize\*(FR
-enable some internal optimizations.
+Enable some internal optimizations.
.TI "\*(FC\-p \*(FR[\*(FC\*(FIfile\*(FR], \*(FC\-\^\-profile\*(FR[\*(FC=\*(FIfile\*(FR]
-send profiling data to \*(FIfile\*(FR
+Send profiling data to \*(FIfile\*(FR
(default: \*(FCawkprof.out\*(FR).
With \*(GK,
the profile is just a ``pretty printed'' version of the program.
@@ -299,19 +292,37 @@ With \*(PK,
the profile contains execution counts in the left margin
of each statement in the program.
.TI "\*(FC\-P\*(FR, \*(FC\-\^\-posix\*(FR
-disable common and GNU extensions.
+Disable common and GNU extensions.
+.TI "\*(FC\-R \*(FIfile\*(FR, \*(FC\-\^\-command \*(FIfile\*(FR"
+\*(FCdgawk\*(FR only.
+Read stored debugger commands from \*(FIfile\*(FR.
.TI "\*(FC\-r\*(FR, \*(FC\-\^\-re\-interval\*(FR
-enable \*(FIinterval expressions\*(FR in regular
+Enable \*(FIinterval expressions\*(FR in regular
expression matching (see \fHRegular
Expressions\fP below). Useful if
\*(FC\-\^\-traditional\*(FR is specified.
.TI "\*(FC\-S\*(FR, \*(FC\-\^\-sandbox\*(FR
-disable the \*(FCsystem\*(FR function,
+Disable the \*(FCsystem()\*(FR function,
input redirection with \*(FCgetline\*(FR,
output redirection with \*(FCprint\*(FR and \*(FCprintf\*(FR,
-and dynamic extensions loading.
+and dynamic extensions loading.\*(CB
+.in -4n
+.EB "\s+2\f(HBCOMMAND LINE ARGUMENTS (\*(GK\f(HB)\*(FR\s0"
+
+.BT
+
+.\"
+.\"
+.\" --- Command Line Arguments (gawk) continued
+.ES
+.fi
+.in +4n
+.TI "\*(FC-t\*(FR, \*(FC\-\^\-lint\-old\*(FR
+Warn about constructs that are not
+portable to the original version of
+Unix \*(AK.
.TI "\*(FC\-V\*(FR, \*(FC\-\^\-version\*(FR
-print version \" information
+Print version \" information
info
on \*(FCstdout\fP
and exit zero.
@@ -326,8 +337,6 @@ options are passed on to the AWK program in
for processing.\*(CB
.EB "\s+2\f(HBCOMMAND LINE ARGUMENTS (\*(GK\f(HB)\*(FR\s0"
-.BT
-
.\"
.\"
.\" --- Command Line Arguments (mawk)
@@ -340,26 +349,26 @@ for processing.\*(CB
expand;
l lw(1.8i).
\*(FC\-W dump\*(FR T{
-print an assembly listing of the program to
+Print an assembly listing of the program to
\*(FCstdout\fP and exit zero.
T}
\*(FC\-W exec \*(FIfile\*(FR T{
-read program text from \*(FIfile\fP. No other
+Read program text from \*(FIfile\fP. No other
options are processed. Useful with \*(FC#!\fP.
T}
\*(FC\-W interactive\*(FR T{
-unbuffer \*(FCstdout\fP and line buffer \*(FCstdin\fP.
+Unbuffer \*(FCstdout\fP and line buffer \*(FCstdin\fP.
Lines are always records, ignoring \*(FCRS\fP.
T}
\*(FC\-W posix_space\*(FR T{
\*(FC\en\*(FR separates fields when \*(FCRS = "\^"\fP.
T}
\*(FC\-W sprintf=\*(FInum\*(FR T{
-adjust the size of \*(MK's internal
+Adjust the size of \*(MK's internal
\*(FCsprintf\*(FR buffer.
T}
\*(FC\-W version\*(FR T{
-print version and copyright on
+Print version and copyright on
\*(FCstdout\fP and limit information on \*(FCstderr\fP
and exit zero.
T}
@@ -380,13 +389,53 @@ and so on.\*(CB
profile file. It then continues to run.
\*(FCSIGHUP\fP is similar, but exits.\*(CB
.EB "\s+2\f(HBSIGNALS (\*(PK\f(HB)\*(FR\s0"
-.sp .7
+
+.\" --- Lines And Statements
+.ES
+.fi
+\*(CDAWK is a line-oriented language. The pattern comes first, and then the
+action. Action statements are enclosed in \*(FC{\fP and \*(FC}\*(FR.
+Either the pattern or the action may be missing, but
+not both. If the pattern is missing, the action is
+executed for every input record.
+A missing action is equivalent to
+.sp .5
+ \*(FC{ print }\fP
+.sp .5
+which prints the entire record.
+.sp .5
+Comments begin with the \*(FC#\*(FR character, and continue until the
+end of the line.
+Normally, a statement ends with a newline, but lines ending in
+a ``,'',
+\*(FC{\*(FR,
+\*(CB\*(FC?\*(FR,
+\*(FC:\*(FR,\*(CD
+\*(FC&&\*(FR
+or
+\*(FC||\*(FR
+are automatically continued.
+Lines ending in \*(FCdo\fP or \*(FCelse\fP
+also have their statements automatically continued on the following line.
+In other cases, a line can be continued by ending it with a ``\e'',
+in which case the newline is ignored. However, a ``\e'' after a
+\*(FC#\*(FR is not special.
+.sp .5
+Multiple statements may be put on one line by separating them with a ``;''.
+This applies to both the statements within the action part of a
+pattern-action pair (the usual case)
+and to the pattern-action statements themselves.\*(CX
+.EB "\s+2\f(HBLINES AND STATEMENTS\*(FR\s0"
+.BT
+
.\" --- Awk Program Execution
.ES
.fi
\*(CDAWK programs are a sequence of pattern-action statements
and optional function definitions.
.sp .5
+ \*(CB\*(FC@include "\*(FIfilename\*(FC"\*(CD
+.br
\*(FIpattern\*(FC { \*(FIaction statements\*(FC }\*(FR
.br
\*(FCfunction \*(FIname\*(FC(\*(FIparameter list\*(FC) { \*(FIstatements\*(FC }\*(FR
@@ -398,6 +447,9 @@ or from the first non-option argument on the command line.
The program text is read as if all the \*(FIprog-file\*(FR(s)
\*(CBand command line
source texts\*(CD had been concatenated.
+.sp
+\*(GK includes files named on \*(FC@include\*(FR lines.
+Nested includes are allowed.\*(CD
.sp .5
AWK programs execute in the following order.
First, all variable assignments specified via the \*(FC\-v\fP
@@ -425,6 +477,11 @@ a single data file.
If the value of a particular element of \*(FCARGV\fP is empty
(\*(FC"\^"\*(FR), \*(AK skips over it.
.sp .5
+\*(CBFor each input file,
+if a \*(FCBEGINFILE\fP rule exists, \*(GK executes the associated code
+before processing the contents of the file. Similarly, \*(GK executes
+the code associated with \*(FCENDFILE\fP after processing the file.\*(CD
+.sp .5
For each record in the input, \*(AK tests to see if it matches any
\*(FIpattern\fP in the AWK program.
For each pattern that the record matches, the associated
@@ -435,364 +492,10 @@ Finally, after all the input is exhausted,
\*(AK executes the code in the \*(FCEND\fP rule(s), if any.
.sp .5
If a program only has a \*(FCBEGIN\fP rule, no input files are processed.
-If a program only has an \*(FCEND\fP rule, the input will be read.
+If a program only has an \*(FCEND\fP rule, the input is read.
\*(CX
.EB "\s+2\f(HBAWK PROGRAM EXECUTION\*(FR\s0"
-
-
-.BT
-
-.\" --- Lines And Statements
-.ES
-.fi
-\*(CDAWK is a line-oriented language. The pattern comes first, and then the
-action. Action statements are enclosed in \*(FC{\fP and \*(FC}\*(FR.
-Either the pattern or the action may be missing, but
-not both. If the pattern is missing, the action is
-executed for every input record.
-A missing action is equivalent to
-.sp .5
- \*(FC{ print }\fP
-.sp .5
-which prints the entire record.
-.sp .5
-Comments begin with the \*(FC#\*(FR character, and continue until the
-end of the line.
-Normally, a statement ends with a newline, but lines ending in
-a ``,'',
-\*(FC{\*(FR,
-\*(CB\*(FC?\*(FR,
-\*(FC:\*(FR,\*(CD
-\*(FC&&\*(FR
-or
-\*(FC||\*(FR
-are automatically continued.
-Lines ending in \*(FCdo\fP or \*(FCelse\fP
-also have their statements automatically continued on the following line.
-In other cases, a line can be continued by ending it with a ``\e'',
-in which case the newline is ignored. However, a ``\e'' after a
-\*(FC#\*(FR is not special.
-.sp .5
-Multiple statements may be put on one line by separating them with a ``;''.
-This applies to both the statements within the action part of a
-pattern-action pair (the usual case)
-and to the pattern-action statements themselves.\*(CX
-.EB "\s+2\f(HBLINES AND STATEMENTS\*(FR\s0"
-
-
-
-.\" --- Regular Expressions
-.ES
-.fi
-\*(CDRegular expressions are the extended kind originally defined by
-\*(FCegrep\fP.
-\*(CBAdditional GNU regexp operators are supported by \*(GK.
-A \*(FIword-constituent\fP character is a letter, digit, or
-underscore (\*(FC_\fP).\*(CD
-.sp .5
-.TS
-center, tab(~);
-cp8 sp8
-cp8 sp8
-lp8|lp8.
-.\" .vs 10
-_
-Summary of Regular Expressions
-In Decreasing Precedence
-_
-\*(FC(\^\*(FIr\*(FC)\*(FR~regular expression (for grouping)
-\*(FIc\*(FR~if non-special char, matches itself
-\*(FC\e\*(FI\^c\*(FR~turn off special meaning of \*(FIc\fP
-\*(FC^\*(FR~beginning of string (note: \*(FInot\fP line)
-\*(FC$\*(FR~end of string (note: \*(FInot\fP line)
-\*(FC.\*(FR~any single character, including newline
-\*(FC[\*(FR...\*(FC]\*(FR~any one character in ... or range
-\*(FC[^\*(FR...\*(FC]\*(FR~any one character not in ... or range
-\*(CB\*(FC\ey\*(FR~word boundary
-\*(FC\eB\*(FR~middle of a word
-\*(FC\e<\*(FR~beginning of a word
-\*(FC\e>\*(FR~end of a word
-\*(FC\es\*(FR~any whitespace character
-\*(FC\eS\*(FR~any non-whitespace character
-\*(FC\ew\*(FR~any word-constituent character
-\*(FC\eW\*(FR~any non-word-constituent character
-\*(FC\e`\*(FR~beginning of a string
-\*(FC\e'\*(FR~end of a string\*(CD
-\*(FIr\*(FC*\*(FR~zero or more occurrences of \*(FIr\*(FR
-\*(FIr\*(FC+\*(FR~one or more occurrences of \*(FIr\*(FR
-\*(FIr\*(FC?\*(FR~zero or one occurrences of \*(FIr\*(FR
-\*(FIr\*(FC{\*(FIn\*(FC,\*(FIm\*(FC}\*(FR~\*(FIn\fP to \*(FIm\fP occurrences of \*(FIr\*(FR \*(CR(POSIX: see note below)\*(CD
-\*(FIr1\*(FC|\|\*(FIr2\*(FR~\*(FIr1\*(FR or \*(FIr2\*(FR
-.TE
-.sp .5
-.fi
-\*(CRThe \*(FIr\*(FC{\*(FIn\*(FC,\*(FIm\*(FC}\*(FR notation is called an
-\*(FIinterval expression\fP. POSIX mandates it for AWK regexps, but
-most \*(AKs don't implement it.\*(CX
-.EB "\s+2\f(HBREGULAR EXPRESSIONS\*(FR\s0"
-
-
-.BT
-
-.\" --- POSIX Character Classes
-.ES
-.fi
-\*(CDIn regular expressions, within character ranges
-(\*(FC[\*(FR...\*(FC]\*(FR),
-the notation \*(FC[[:\*(FIclass\*(FC:]]\*(FR defines character classes \*(CR(not \*(MK\fP)\*(CD:
-.sp .5
-.TS
-center, tab(~);
-lp8 lp8 lp8 lp8.
-\*(FCalnum\*(FR~alphanumeric~\*(FClower\*(FR~lower-case
-\*(FCalpha\*(FR~alphabetic~\*(FCprint\*(FR~printable
-\*(FCblank\*(FR~space or tab~\*(FCpunct\*(FR~punctuation
-\*(FCcntrl\*(FR~control~\*(FCspace\*(FR~whitespace
-\*(FCdigit\*(FR~decimal~\*(FCupper\*(FR~upper-case
-\*(FCgraph\*(FR~non-spaces~\*(FCxdigit\*(FR~hexadecimal
-.TE
-.fi
-.sp .5
-\*(CB\*(FRRecognition of these character classes is disabled
-when \*(FC\-\-traditional\*(FR is supplied.\*(CL
-.EB "\s+2\f(HBPOSIX CHARACTER CLASSES\*(FR\s0"
-
-.\" --- Records
-.ES
-.fi
-\*(CDNormally, records are separated by newline characters.
-Assigning values to the built-in variable \*(FCRS\*(FR
-controls how records are separated.
-If \*(FCRS\fP is any single character, that character separates records.
-\*(CLOtherwise, \*(FCRS\fP is a regular expression.
-\*(CR(Not \*(NK.)\*(CL
-Text in the input that matches this
-regular expression separates the record.
-\*(CB\*(GK sets \*(FCRT\*(FR to the value of the
-input text that matched the regular expression.
-The value of \*(FCIGNORECASE\fP
-also affects how records are separated when
-\*(FCRS\fP is a regular expression.\*(CD
-If \*(FCRS\fP is set to the null string,
-then records are separated by one or more blank lines.
-When \*(FCRS\fP is set to the null string,
-the newline character always acts as
-a field separator, in addition to whatever value
-\*(FCFS\fP may have.
-\*(CB\*(MK does not apply exceptional rules to \*(FCFS\fP
-when \*(FCRS = "\^"\fP.\*(CX
-.EB "\s+2\f(HBRECORDS\*(FR\s0"
-
-.\" --- Fields
-.ES
-.fi
-\*(CDAs each input record is read, \*(AK splits the record into
-\*(FIfields\*(FR, using the value of the \*(FCFS\fP
-variable as the field separator.
-If \*(FCFS\fP is a single character,
-fields are separated by that character.
-\*(CLIf \*(FCFS\fP is the null string,
-then each individual character becomes a separate field.\*(CD
-Otherwise, \*(FCFS\fP is expected to be a full regular expression.
-In the special case that \*(FCFS\fP
-is a single space, fields are separated
-by runs of spaces and/or tabs
-\*(CLand/or newlines\*(CD.
-Leading and trailing whitespace are ignored.
-\*(CBThe value of \*(FCIGNORECASE\fP
-also affects how fields are split when
-\*(FCFS\fP is a regular expression.\*(CD
-.sp .5
-\*(CBIf the \*(FCFIELDWIDTHS\fP
-variable is set to a space-separated list of numbers, each field is
-expected to have a fixed width, and \*(GK
-splits up the record using the specified widths.
-The value of \*(FCFS\fP is ignored.
-Assigning a new value to \*(FCFS\fP
-overrides the use of \*(FCFIELDWIDTHS\*(FR.
-and restores the default behavior.
-.sp .5
-Similarly, if the
-\*(FCFPAT\fP
-variable is set to a string representing a regular expression,
-each field is made up of text that matches that regular expression. In
-this case, the regular expression describes the fields themselves,
-instead of the text that separates the fields.
-Assigning a new value to
-\*(FCFS\fP
-or
-\*(FCFIELDWIDTHS\fP
-overrides the use of
-\*(FCFPAT\fP.\*(CD
-.sp .5
-Each field in the input record may be referenced by its position,
-\*(FC$1\*(FR, \*(FC$2\*(FR and so on.
-\*(FC$0\fP is the whole record.
-Fields may also be assigned new values.
-.sp .5
-The variable \*(FCNF\fP
-is set to the total number of fields in the input record.
-.sp .5
-References to non-existent fields (i.e., fields after \*(FC$NF\*(FR)
-produce the null-string. However, assigning to a non-existent field
-(e.g., \*(FC$(NF+2) = 5\*(FR) increases the value of
-\*(FCNF\*(FR, creates any intervening fields with the null string as their value,
-and causes the value of \*(FC$0\fP
-to be recomputed with the fields being separated by the
-value of \*(FCOFS\*(FR.
-References to negative numbered fields cause a fatal error.
-Decreasing the value of \*(FCNF\fP causes the trailing fields to be lost
-\*(CR(not \*(NK).\*(CX
-.EB "\s+2\f(HBFIELDS\*(FR\s0"
-
-.BT
-
-.\" --- Pattern Elements
-.ES
-.fi
-\*(CDAWK patterns may be one of the following.
-.sp .5
-.nf
- \*(FCBEGIN
- END
- BEGINFILE
- ENDFILE
- \*(FIexpression
- pat1\*(FC,\*(FIpat2\*(FR
-.sp .5
-.fi
-\*(FCBEGIN\fP and \*(FCEND\fP are special patterns that provide start-up
-and clean-up actions respectively. They must have actions. There can
-be multiple \*(FCBEGIN\fP and \*(FCEND\fP rules; they are merged and
-executed as if there had just been one large rule. They may occur anywhere
-in a program, including different source files.
-.sp .5
-\*(FCBEGINFILE\*(FR and \*(FCENDFILE\*(FR are special patterns that
-execute before the first record of each file and after the last record
-of each file, respectively. In the \*(FCBEGINFILE\*(FR rule, the \*(FCERRNO\*(FR
-variable is non-null if there is a problem with the file; the code should use
-\*(FCnextfile\*(FR to skip the file if desired. Otherwise \*(GK exits with
-its usual fatal error.
-.sp .5
-Expression patterns can be any expression, as described
-under \fHExpressions\fP.
-.sp .5
-The \*(FIpat1\*(FC,\*(FIpat2\*(FR pattern
-is called a \*(FIrange pattern\*(FR.
-It matches all input records starting with a record that matches
-\*(FIpat1\*(FR, and continuing until a record that matches
-\*(FIpat2\*(FR, inclusive.
-It does not combine with any other pattern expression.\*(CX
-.EB "\s+2\f(HBPATTERN ELEMENTS\*(FR\s0"
-
-.\" --- Action Statements
-.ES
-.fi
-.in +.2i
-.ti -.2i
-\*(CD\*(FCbreak\*(FR
-.br
-break out of the nearest enclosing \*(FCdo\*(FR, \*(FCfor\*(FR,
-or \*(FCwhile\*(FR loop.
-.ti -.2i
-\*(FCcontinue\*(FR
-.br
-skip the rest of the loop body.
-Evaluate the \*(FIcondition\*(FR
-part of the nearest enclosing \*(FCdo\*(FR or \*(FCwhile\*(FR loop,
-or go to the \*(FIincr\*(FR part of a \*(FCfor\*(FR loop.
-.ti -.2i
-\*(FCdelete \*(FIarray\^\*(FC[\^\*(FIindex\^\*(FC]\*(FR
-.br
-delete element \*(FIindex\*(FR from array \*(FIarray\*(FR.
-.ti -.2i
-\*(CL\*(FCdelete \*(FIarray\^\*(FR
-.br
-delete all elements from array \*(FIarray\*(FR.\*(CD
-.ti -.2i
-\*(FCdo \*(FIstatement \*(FCwhile (\*(FIcondition\*(FC)\*(FR
-.br
-execute \*(FIstatement\*(FR while \*(FIcondition\*(FR is true.
-The \*(FIstatement\*(FR is always executed at least once.
-.ti -.2i
-\*(FCexit\*(FR [ \*(FIexpression\*(FR ]
-.br
-terminate input record processing.
-Execute the \*(FCEND\*(FR rule(s) if present.
-If present, \*(FIexpression\*(FR becomes \*(AK's return value.
-.ti -.2i
-\*(FCfor (\*(FIinit\*(FC; \*(FIcond\*(FC; \*(FIincr\*(FC) \*(FIstatement\*(FR
-.br
-execute \*(FIinit\*(FR.
-Evaluate \*(FIcond\*(FR.
-If it is true, execute \*(FIstatement\*(FR.
-Execute \*(FIincr\*(FR before going back to the top to
-re-evaluate \*(FIcond\*(FR.
-Any of the three may be omitted.
-A missing \*(FIcond\*(FR is considered to be true.
-.ti -.2i
-\*(FCfor (\*(FIvar \*(FCin\*(FI array\*(FC) \*(FIstatement\*(FR
-.br
-execute \*(FIstatement\*(FR once for each subscript in \*(FIarray\*(FR,
-with \*(FIvar\*(FR set to a different subscript each time through
-the loop.
-.ti -.2i
-\*(CD\*(FCif (\*(FIcondition\*(FC) \*(FIstatement1\*(FR [ \*(FCelse\*(FI statement2\*(FR ]
-.br
-if \*(FIcondition\*(FR is true, execute \*(FIstatement1\*(FR,
-otherwise execute \*(FIstatement2\*(FR. Each \*(FCelse\*(FR
-matches the closest \*(FCif\*(FR.
-.ti -.2i
-\*(FCnext\*(FR see \fHInput Control.\fP
-.ti -.2i
-\*(CL\*(FCnextfile\*(FR \*(CR(not \*(MK) \*(CLsee \fHInput Control.\fP\*(CD
-.ti -.2i
-.\" --- Start switch statement
-\*(CB\*(FCswitch (\*(FIexpression\*(FC) {
-.br
- case [\*(FIvalue\*(FC|\*(FIregular expression\*(FC] : \*(FIstatement(s)\*(FC
-.br
- default: \*(FIstatement(s)\*(FC
-.br
-}\*(FR
-.br
-switch on \*(FIexpression\*(FR, execute \*(FIcase\*(FR if matched, default if not.\*(CD
-.ti -.2i
-.\" --- End switch statement
-\*(FCwhile (\*(FIcondition\*(FC) \*(FIstatement \*(FR
-.br
-while \*(FIcondition\*(FR is true, execute \*(FIstatement\*(FR.
-.ti -.2i
-\*(FC{ \*(FIstatements \*(FC}\*(FR
-.br
-a list of statements enclosed in braces can be used anywhere
-that a single statement would otherwise be used.\*(CX
-.in -.2i
-.EB "\s+2\f(HBACTION STATEMENTS\*(FR\s0"
-
-
-.BT
-
-.\" --- Escape Sequences
-.ES
-.fi
-\*(CDWithin strings constants (\*(FC"..."\fP) and regexp
-constants (\*(FC/.../\fP), escape sequences may be used to
-generate otherwise unprintable characters. This table lists
-the available escape sequences.
.sp .5
-.TS
-center, tab(~);
-lp8 lp8 lp8 lp8.
-\*(FC\ea\fP~alert (bell)~\*(FC\er\fP~carriage return
-\*(FC\eb\fP~backspace~\*(FC\et\fP~horizontal tab
-\*(FC\ef\fP~form feed~\*(FC\ev\fP~vertical tab
-\*(FC\en\fP~newline~\*(FC\e\e\fP~backslash
-\*(FC\e\*(FIddd\*(FR~octal value \*(FIddd\fP~\*(CL\*(FC\ex\*(FIhh\*(FR~hex value \*(FIhh\fP\*(CD
-\*(FC\e"\fP~double quote~\*(FC\e/\fP~forward slash\*(CX
-.TE
-.EB "\s+2\f(HBESCAPE SEQUENCES\*(FR\s0"
-.sp .7
.\" --- Variables
.ES
.fi
@@ -800,69 +503,77 @@ lp8 lp8 lp8 lp8.
expand;
l lw(2i).
\*(CD\*(FCARGC\fP T{
-number of command line arguments.
+Number of command line arguments.
T}
\*(CB\*(FCARGIND\fP T{
-index in \*(FCARGV\fP of current data file.\*(CD
+Index in \*(FCARGV\fP of current data file.\*(CD
T}
\*(FCARGV\fP T{
-array of command line arguments. Indexed from
+Array of command line arguments. Indexed from
0 to \*(FCARGC\fP \- 1. Dynamically changing the
contents of \*(FCARGV\fP can control the files used
for data.
T}
\*(CL\*(FCBINMODE\fP T{
-controls ``binary'' mode for all file I/O. Values of 1, 2, or 3,
+Controls ``binary'' mode for all file I/O. Values of 1, 2, or 3,
indicate input, output, or all files, respectively, should use binary
I/O. \*(CR(Not \*(NK.) \*(CLApplies only to non-POSIX systems.
\*(CBFor \*(GK, string values of \*(FC"r"\fP, or \*(FC"w"\fP specify
that input files, or output files, respectively, should use binary I/O.
-String values of \*(FC"rw"\fP or \*(FC"wr"\fP specify that all files
-should use binary I/O. Any other string value is treated as \*(FC"rw"\fP,
-but generates a warning message.\*(CD
+Use \*(FC"rw"\fP or \*(FC"wr"\fP for all files.\*(CX
T}
+.TE
+.EB "\s+2\f(HBVARIABLES\*(FR\s0"
+.BT
+
+.\" --- Variables (continued)
+.ES
+.fi
+.TS
+expand;
+l lw(2i).
\*(FCCONVFMT\fP T{
-conversion format for numbers, default value
+Conversion format for numbers, default value
is \*(FC"%.6g"\*(FR.
T}
\*(FCENVIRON\fP T{
-array containing the current environment.
-The array is indexed by the environment
+Array containing the current environment.
+it is indexed by the environment
variables, each element being the value of
that variable.
T}
\*(CB\*(FCERRNO\fP T{
-string describing the error if a
+String describing the error if a
\*(FCgetline\*(FR
redirection or read
fails, or if
\*(FCclose()\*(FR fails.
T}
\*(FCFIELDWIDTHS\fP T{
-white-space separated list of fieldwidths. Used
+Whitespace separated list of fieldwidths. Used
to parse the input into fields of fixed width,
instead of the value of \*(FCFS\fP.\*(CD
T}
\*(FCFILENAME\fP T{
-name of the current input file. If no files given
+Name of the current input file. If no files given
on the command line, \*(FCFILENAME\fP is ``\-''.
\*(FCFILENAME\fP is undefined inside the \*(FCBEGIN\fP rule
(unless set by \*(FCgetline\fP).
T}
\*(FCFNR\fP T{
-record number in current input file.
+Record number in current input file.
T}
\*(CB\*(FCFPAT\fP T{
-regular expression describing field contents.
+Regular expression describing field contents.
Used to parse the input based on the fields
instead of the field separator.\*(CD
T}
\*(FCFS\fP T{
-input field separator, a space by default
+Input field separator, a space by default
(see \fHFields\fP above).
T}
\*(CB\*(FCIGNORECASE\fP T{
-if non-zero, all regular expression and string
+If non-zero, all regular expression and string
operations ignore case.
Array subscripting
is \*(FInot\*(FR affected.
@@ -873,125 +584,64 @@ and
function are affected.
T}
\*(CB\*(FCLINT\fP T{
-provides dynamic control of the \*(FC\-\^\-lint\fP
+Provides dynamic control of the \*(FC\-\^\-lint\fP
option from within an AWK program.
When true, \*(GK
prints lint warnings.
When assigned the string value \*(FC"fatal"\*(FR,
-lint warnings become fatal errors, exactly like
-\*(FC\-\-lint=fatal\*(FR.
+lint warnings become fatal errors.
Any other true value just prints warnings.\*(CD
T}
\*(FCNF\fP T{
-number of fields in the current input record.
+Number of fields in the current input record.
T}
\*(FCNR\fP T{
-total number of input records seen so far.\*(CX
+Total number of input records seen so far.\*(CX
T}
-.TE
-.EB "\s+2\f(HBVARIABLES\*(FR\s0"
-.BT
-
-.\" --- Variables (continued)
-.ES
-.fi
-.TS
-expand;
-l lw(2i).
\*(CD\*(FCOFMT\fP T{
-output format for numbers, \*(FC"%.6g"\*(FR, by default.
-\*(CROld versions of \*(AK used this for number
-to string conversion.\*(CD
+Output format for numbers, \*(FC"%.6g"\*(FR, by default.
T}
\*(FCOFS\fP T{
-output field separator, a space by default.
+Output field separator, a space by default.
T}
\*(FCORS\fP T{
-output record separator, a newline by default.
+Output record separator, a newline by default.
T}
\*(CB\*(FCPROCINFO\fP T{
-elements of this array provide access to info
+Elements of this array provide access to information
about the running AWK program. See
\*(AM for details.\*(CD
T}
\*(FCRLENGTH\fP T{
-length of the string matched by \*(FCmatch()\*(FR;
+Length of the string matched by \*(FCmatch()\*(FR;
\-1 if no match.
T}
\*(FCRS\fP T{
-input record separator, a newline by default
+Input record separator, a newline by default
(see \fHRecords\fP above).
T}
\*(FCRSTART\fP T{
-index of the first character matched by
+Index of the first character matched by
\*(FCmatch()\*(FR; 0 if no match.
T}
\*(CB\*(FCRT\fP T{
-record terminator. \*(GK sets \*(FCRT\fP to the input
+Record terminator. \*(GK sets \*(FCRT\fP to the input
text that matched the character or regular
expression specified by \*(FCRS\*(FR.\*(CD
T}
\*(FCSUBSEP\fP T{
-character(s) used to separate multiple subscripts
+Character(s) used to separate multiple subscripts
in array elements, by default \*(FC"\e034"\*(FR. (See
\fHArrays\fP below).
T}
\*(CB\*(FCTEXTDOMAIN\fP T{
-the application's text domain for internationalization;
-used to find the localized
-translations for the program's strings.\*(CX
+The internationalization text domain,
+for finding the localized
+translations of the program's strings.\*(CX
T}
.TE
.EB "\s+2\f(HBVARIABLES (continued)\*(FR\s0"
-.\" --- Conversions and Comparisons
-.ES
-.fi
-\*(CDVariables and fields may be (floating point) numbers, strings or both.
-Context determines how the value of a variable is interpreted. If used in
-a numeric expression, it will be treated as a number, if used as a string
-it will be treated as a string.
-.sp .5
-To force a variable to be treated as a number, add 0 to it; to force it
-to be treated as a string, concatenate it with the null string.
-.sp .5
-When a string must be converted to a number, the conversion is accomplished
-using \*(FIstrtod\*(FR(3).
-A number is converted to a string by using the value of \*(FCCONVFMT\fP
-as a format string for \*(FIsprintf\*(FR(3),
-with the numeric value of the variable as the argument.
-However, even though all numbers in AWK are floating-point,
-integral values are \*(FIalways\fP converted as integers.
-.sp .5
-Comparisons are performed as follows:
-If two variables are numeric, they are compared numerically.
-If one value is numeric and the other has a string value that is a
-``numeric string,'' then comparisons are also done numerically.
-Otherwise, the numeric value is converted to a string, and a string
-comparison is performed.
-Two strings are compared, of course, as strings.
-.sp .5
-Note that string constants, such as \*(FC"57"\fP, are \*(FInot\fP
-numeric strings, they are string constants. The idea of ``numeric string''
-only applies to fields, \*(FCgetline\fP input,
-\*(FCFILENAME\*(FR, \*(FCARGV\fP elements, \*(FCENVIRON\fP
-elements and the elements of an array created by
-\*(FCsplit()\fP or
-\*(FCpatsplit()\fP that are numeric strings.
-The basic idea is that \*(FIuser input\*(FR,
-and only user input, that looks numeric,
-should be treated that way.
-\*(CRNote that the POSIX standard applies the concept of
-``numeric string'' everywhere, even to string constants.
-However, this is
-clearly incorrect, and none of the three free \*(AK\*(FRs do this.\*(CD
-(Fortunately, this is fixed in the next version of the standard.)
-.sp .5
-Uninitialized variables have the numeric value 0 and the string value
-\*(FC"\^"\fP
-(the null, or empty, string).\*(CX
-.EB "\s+2\f(HBCONVERSIONS AND COMPARISONS\*(FR\s0"
-
.BT
.\" --- Arrays
@@ -1056,7 +706,7 @@ i.e., not used on the right-hand side of
\*(CB\*(FCgensub()\fP,\*(CD
\*(FCgsub()\fP,
\*(FCmatch()\fP,
-\*(FCpatsplit()\fP,
+\*(CB\*(FCpatsplit()\fP,\*(CD
\*(FCsplit()\fP,
and
\*(FCsub()\fP,
@@ -1068,35 +718,539 @@ The AWK operators, in order of decreasing precedence, are:
.TS
expand;
l lw(1.8i).
-\*(FC(\&...)\*(FR grouping
-\*(FC$\fP field reference
+\*(FC(\&...)\*(FR Grouping
+\*(FC$\fP Field reference
\*(FC++ \-\^\-\fP T{
-increment and decrement,
+Increment and decrement,
prefix and postfix
T}
-\*(FC^\fP \*(CL\*(FC**\*(FR\*(CD exponentiation
-\*(FC+ \- !\fP unary plus, unary minus, and logical negation
-\*(FC* / %\fP multiplication, division, and modulus
-\*(FC+ \-\fP addition and subtraction
-\*(FIspace\fP string concatenation
-\*(FC< >\fP less than, greater than
-\*(FC<= >=\fP less than or equal, greater than or equal
-\*(FC!= ==\fP not equal, equal
-\*(FC~ !~\fP regular expression match, negated match
-\*(FCin\fP array membership
-\*(FC&&\fP logical AND, short circuit
-\*(FC||\fP logical OR, short circuit
-\*(FC?\^:\fP in-line conditional expression
+\*(FC^\fP \*(CL\*(FC**\*(FR\*(CD Exponentiation
+\*(FC+ \- !\fP Unary plus, unary minus, and logical negation
+\*(FC* / %\fP Multiplication, division, and modulus
+\*(FC+ \-\fP Addition and subtraction
+\*(FIspace\fP String concatenation
+\*(FC< >\fP Less than, greater than
+\*(FC<= >=\fP Less than or equal, greater than or equal
+\*(FC!= ==\fP Not equal, equal
+\*(FC~ !~\fP Regular expression match, negated match
+\*(FCin\fP Array membership
+\*(FC&&\fP Logical AND, short circuit
+\*(FC||\fP Logical OR, short circuit
+\*(FC?\^:\fP In-line conditional expression
.T&
l s
l lw(1.8i).
\*(FC=\0+=\0\-=\0*=\0/=\0%=\0^=\0\*(CL**=\*(CD\fP
- assignment operators\*(CX
+ Assignment operators\*(CX
.TE
.EB "\s+2\f(HBEXPRESSIONS\*(FR\s0"
.BT
+.\" --- Conversions and Comparisons
+.ES
+.fi
+\*(CDVariables and fields may be (floating point) numbers, strings or both.
+Context determines how a variable's value is interpreted. If used in
+a numeric expression, it will be treated as a number, if used as a string
+it will be treated as a string.
+.sp .5
+To force a variable to be treated as a number, add 0 to it; to force it
+to be treated as a string, concatenate it with the null string.
+.sp .5
+When a string must be converted to a number, the conversion is accomplished
+using \*(FIstrtod\*(FR(3).
+A number is converted to a string by using the value of \*(FCCONVFMT\fP
+as a format string for \*(FIsprintf\*(FR(3),
+with the numeric value of the variable as the argument.
+However, even though all numbers in AWK are floating-point,
+integral values are \*(FIalways\fP converted as integers.
+.sp .5
+Comparisons are performed as follows:
+If two variables are numeric, they are compared numerically.
+If one value is numeric and the other has a string value that is a
+``numeric string,'' then comparisons are also done numerically.
+Otherwise, the numeric value is converted to a string, and a string
+comparison is performed.
+Two strings are compared, of course, as strings.
+.sp .5
+Note that string constants, such as \*(FC"57"\fP, are \*(FInot\fP
+numeric strings, they are string constants. The idea of ``numeric string''
+only applies to fields, \*(FCgetline\fP input,
+\*(FCFILENAME\*(FR, \*(FCARGV\fP elements, \*(FCENVIRON\fP
+elements and the elements of an array created by \*(FCsplit()\fP
+\*(CBor \*(FCpatsplit()\fP\*(CD that are numeric strings.
+The basic idea is that \*(FIuser input\*(FR,
+and only user input, that looks numeric,
+should be treated that way.\*(CD
+.sp .5
+Uninitialized variables have the numeric value 0 and the string value
+\*(FC"\^"\fP
+(the null, or empty, string).\*(CX
+.EB "\s+2\f(HBCONVERSIONS AND COMPARISONS\*(FR\s0"
+
+.\" --- Pattern Elements
+.ES
+.fi
+\*(CDAWK patterns may be one of the following.
+.sp .5
+.nf
+ \*(FCBEGIN
+ END
+ \*(CBBEGINFILE
+ ENDFILE\*(CD
+ \*(FIexpression
+ pat1\*(FC,\*(FIpat2\*(FR
+.sp .5
+.fi
+\*(FCBEGIN\fP and \*(FCEND\fP are special patterns that provide start-up
+and clean-up actions respectively. They must have actions. There can
+be multiple \*(FCBEGIN\fP and \*(FCEND\fP rules; they are merged and
+executed as if there had just been one large rule. They may occur anywhere
+in a program, including different source files.
+.sp .5
+\*(CB\*(FCBEGINFILE\*(FR and \*(FCENDFILE\*(FR are special patterns that
+execute before the first record of each file and after the last record
+of each file, respectively. In the \*(FCBEGINFILE\*(FR rule, the \*(FCERRNO\*(FR
+variable is non-null if there is a problem with the file; the code should use
+\*(FCnextfile\*(FR to skip the file if desired. Otherwise \*(GK exits with
+its usual fatal error. The actions for multiple
+\*(FCBEGINFILE\*(FR and \*(FCENDFILE\*(FR patterns are merged.\*(CD
+.sp .5
+Expression patterns can be any expression, as described
+under \fHExpressions\fP.
+.sp .5
+The \*(FIpat1\*(FC,\*(FIpat2\*(FR pattern
+is called a \*(FIrange pattern\*(FR.
+It matches all input records starting with a record that matches
+\*(FIpat1\*(FR, and continuing until a record that matches
+\*(FIpat2\*(FR, inclusive.
+It does not combine with any other pattern expression.\*(CX
+.EB "\s+2\f(HBPATTERN ELEMENTS\*(FR\s0"
+
+.BT
+
+.\" --- Action Statements
+.ES
+.fi
+.in +.2i
+.ti -.2i
+\*(CD\*(FCbreak\*(FR
+.br
+Break out of the nearest enclosing
+\*(CB\*(FCswitch\fP statement, or\*(CD
+\*(FCdo\*(FR, \*(FCfor\*(FR, or \*(FCwhile\*(FR loop.
+.ti -.2i
+\*(FCcontinue\*(FR
+.br
+Skip the rest of the loop body.
+Evaluate the \*(FIcondition\*(FR
+part of the nearest enclosing \*(FCdo\*(FR or \*(FCwhile\*(FR loop,
+or go to the \*(FIincr\*(FR part of a \*(FCfor\*(FR loop.
+.ti -.2i
+\*(FCdelete \*(FIarray\^\*(FC[\^\*(FIindex\^\*(FC]\*(FR
+.br
+Delete element \*(FIindex\*(FR from array \*(FIarray\*(FR.
+.ti -.2i
+\*(CL\*(FCdelete \*(FIarray\^\*(FR
+.br
+Delete all elements from array \*(FIarray\*(FR.\*(CD
+.ti -.2i
+\*(FCdo \*(FIstatement \*(FCwhile (\*(FIcondition\*(FC)\*(FR
+.br
+Execute \*(FIstatement\*(FR while \*(FIcondition\*(FR is true.
+The \*(FIstatement\*(FR is always executed at least once.
+.ti -.2i
+\*(FCexit\*(FR [ \*(FIexpression\*(FR ]
+.br
+Terminate input record processing.
+Execute the \*(FCEND\*(FR rule(s) if present.
+If present, \*(FIexpression\*(FR becomes \*(AK's return value.
+.ti -.2i
+\*(FCfor (\*(FIinit\*(FC; \*(FIcond\*(FC; \*(FIincr\*(FC) \*(FIstatement\*(FR
+.br
+Execute \*(FIinit\*(FR.
+Evaluate \*(FIcond\*(FR.
+If it is true, execute \*(FIstatement\*(FR.
+Execute \*(FIincr\*(FR before going back to the top to
+re-evaluate \*(FIcond\*(FR.
+Any of the three may be omitted.
+A missing \*(FIcond\*(FR is considered to be true.
+.ti -.2i
+\*(FCfor (\*(FIvar \*(FCin\*(FI array\*(FC) \*(FIstatement\*(FR
+.br
+Execute \*(FIstatement\*(FR once for each subscript in \*(FIarray\*(FR,
+with \*(FIvar\*(FR set to a different subscript each time through
+the loop.
+.ti -.2i
+\*(CD\*(FCif (\*(FIcondition\*(FC) \*(FIstatement1\*(FR [ \*(FCelse\*(FI statement2\*(FR ]
+.br
+If \*(FIcondition\*(FR is true, execute \*(FIstatement1\*(FR,
+otherwise execute \*(FIstatement2\*(FR. Each \*(FCelse\*(FR
+matches the closest \*(FCif\*(FR.
+.ti -.2i
+\*(FCnext\*(FR See \fHInput Control.\fP
+.ti -.2i
+\*(CL\*(FCnextfile\*(FR See \fHInput Control.\fP\*(CD
+.in -.2i
+.\" --- Start switch statement
+\*(CB\*(FCswitch (\*(FIexpression\*(FC) {
+.br
+case \*(FIconstant\*(FC|\*(FIregular expression\*(FC: \*(FIstatement(s)
+.br
+\*(FCdefault: \*(FIstatement(s)
+.br
+\*(FC}\*(FR
+.in +.2i
+.br
+Switch on \*(FIexpression\*(FR,
+execute \*(FIcase\*(FR if matched, default if not.
+The \*(FCdefault\fP label and associated statements are optional.\*(CD
+.ti -.2i
+.\" --- End switch statement
+\*(FCwhile (\*(FIcondition\*(FC) \*(FIstatement \*(FR
+.br
+While \*(FIcondition\*(FR is true, execute \*(FIstatement\*(FR.
+.ti -.2i
+\*(FC{ \*(FIstatements \*(FC}\*(FR
+.br
+A list of statements enclosed in braces can be used anywhere
+that a single statement would otherwise be used.\*(CX
+.in -.2i
+.EB "\s+2\f(HBACTION STATEMENTS\*(FR\s0"
+
+.\" --- Escape Sequences
+.ES
+.fi
+\*(CDWithin strings constants (\*(FC"..."\fP) and regexp
+constants (\*(FC/.../\fP), escape sequences may be used to
+generate otherwise unprintable characters. This table lists
+the available escape sequences.
+.sp .5
+.TS
+center, tab(~);
+lp8 lp8 lp8 lp8.
+\*(FC\ea\fP~alert (bell)~\*(FC\er\fP~carriage return
+\*(FC\eb\fP~backspace~\*(FC\et\fP~horizontal tab
+\*(FC\ef\fP~form feed~\*(FC\ev\fP~vertical tab
+\*(FC\en\fP~newline~\*(FC\e\e\fP~backslash
+\*(FC\e\*(FIddd\*(FR~octal value \*(FIddd\fP~\*(CL\*(FC\ex\*(FIhh\*(FR~hex value \*(FIhh\fP\*(CD
+\*(FC\e"\fP~double quote~\*(FC\e/\fP~forward slash\*(CX
+.TE
+.EB "\s+2\f(HBESCAPE SEQUENCES\*(FR\s0"
+.BT
+
+.\" --- Records
+.ES
+.fi
+\*(CDNormally, records are separated by newline characters.
+Assigning values to the built-in variable \*(FCRS\*(FR
+controls how records are separated.
+If \*(FCRS\fP is any single character, that character separates records.
+\*(CLOtherwise, \*(FCRS\fP is a regular expression.
+\*(CR(Not \*(NK.)\*(CL
+Text in the input that matches this
+regular expression separates the record.
+\*(CB\*(GK sets \*(FCRT\*(FR to the value of the
+input text that matched the regular expression.
+The value of \*(FCIGNORECASE\fP
+also affects how records are separated when
+\*(FCRS\fP is a regular expression.\*(CD
+If \*(FCRS\fP is set to the null string,
+then records are separated by one or more blank lines.
+When \*(FCRS\fP is set to the null string,
+the newline character always acts as
+a field separator, in addition to whatever value
+\*(FCFS\fP may have.
+\*(CB\*(MK does not apply exceptional rules to \*(FCFS\fP
+when \*(FCRS = "\^"\fP.\*(CX
+.EB "\s+2\f(HBRECORDS\*(FR\s0"
+
+.\" --- Fields
+.ES
+.fi
+\*(CDAs each input record is read, \*(AK splits the record into
+\*(FIfields\*(FR, using the value of the \*(FCFS\fP
+variable as the field separator.
+If \*(FCFS\fP is a single character,
+fields are separated by that character.
+\*(CLIf \*(FCFS\fP is the null string,
+then each individual character becomes a separate field.\*(CD
+Otherwise, \*(FCFS\fP is expected to be a full regular expression.
+In the special case that \*(FCFS\fP
+is a single space, fields are separated
+by runs of spaces and/or tabs
+\*(CLand/or newlines\*(CD.
+Leading and trailing whitespace are ignored.
+\*(CBThe value of \*(FCIGNORECASE\fP
+also affects how fields are split when
+\*(FCFS\fP is a regular expression.\*(CD
+.sp .5
+\*(CBIf the \*(FCFIELDWIDTHS\fP
+variable is set to a space-separated list of numbers, each field is
+expected to have a fixed width, and \*(GK
+splits up the record using the specified widths.
+The value of \*(FCFS\fP is ignored.
+Assigning a new value to \*(FCFS\fP or \*(FCFPAT\fP
+overrides the use of \*(FCFIELDWIDTHS\*(FR.
+and restores the default behavior.
+.sp .5
+Similarly, if the
+\*(FCFPAT\fP
+variable is set to a string representing a regular expression,
+each field is made up of text that matches that regular expression. In
+this case, the regular expression describes the fields themselves,
+instead of the text that separates the fields.
+Assigning a new value to
+\*(FCFS\fP
+or
+\*(FCFIELDWIDTHS\fP
+overrides the use of
+\*(FCFPAT\fP.\*(CD
+.sp .5
+Each field in the input record may be referenced by its position,
+\*(FC$1\*(FR, \*(FC$2\*(FR and so on.
+\*(FC$0\fP is the whole record.
+Fields may also be assigned new values.
+.sp .5
+The variable \*(FCNF\fP
+is set to the total number of fields in the input record.
+.sp .5
+References to non-existent fields (i.e., fields after \*(FC$NF\*(FR)
+produce the null-string. However, assigning to a non-existent field
+(e.g., \*(FC$(NF+2) = 5\*(FR) increases the value of
+\*(FCNF\*(FR, creates any intervening fields with the null string as their value,
+and causes the value of \*(FC$0\fP
+to be recomputed with the fields being separated by the
+value of \*(FCOFS\*(FR.
+References to negative numbered fields cause a fatal error.
+Decreasing the value of \*(FCNF\fP causes the trailing fields to be lost
+\*(CR(not \*(NK).\*(CX
+.EB "\s+2\f(HBFIELDS\*(FR\s0"
+
+.\" --- Historical Features
+.ES
+.fi
+\*(CDIt is possible to call the \*(FClength()\fP
+built-in function not only with no argument, but even without parentheses.
+Doing so, however, is poor practice,
+and \*(GK
+issues a warning about its use if \*(FC\-\^\-lint\fP
+is specified on the command line.\*(CB
+.EB "\s+2\f(HBHISTORICAL FEATURES (\*(GK\f(HB)\*(FR\s0"
+.BT
+
+.\" --- Regular Expressions
+.ES
+.fi
+\*(CDRegular expressions are the extended kind originally defined by
+\*(FCegrep\fP.
+\*(CB\*(GK supports additional GNU operators.
+A \*(FIword-constituent\fP character is a letter, digit, or
+underscore (\*(FC_\fP).\*(CD
+.sp .5
+.TS
+center, tab(~);
+cp8 sp8
+cp8 sp8
+lp8|lp8.
+.\" .vs 10
+_
+Summary of Regular Expressions
+In Decreasing Precedence
+_
+\*(FC(\^\*(FIr\*(FC)\*(FR~regular expression (for grouping)
+\*(FIc\*(FR~if non-special char, matches itself
+\*(FC\e\*(FI\^c\*(FR~turn off special meaning of \*(FIc\fP
+\*(FC^\*(FR~beginning of string (note: \*(FInot\fP line)
+\*(FC$\*(FR~end of string (note: \*(FInot\fP line)
+\*(FC.\*(FR~any single character, including newline
+\*(FC[\*(FR...\*(FC]\*(FR~any one character in ... or range
+\*(FC[^\*(FR...\*(FC]\*(FR~any one character not in ... or range
+\*(CB\*(FC\ey\*(FR~word boundary
+\*(FC\eB\*(FR~middle of a word
+\*(FC\e<\*(FR~beginning of a word
+\*(FC\e>\*(FR~end of a word
+\*(FC\es\*(FR~any whitespace character
+\*(FC\eS\*(FR~any non-whitespace character
+\*(FC\ew\*(FR~any word-constituent character
+\*(FC\eW\*(FR~any non-word-constituent character
+\*(FC\e`\*(FR~beginning of a string
+\*(FC\e'\*(FR~end of a string\*(CD
+\*(FIr\*(FC*\*(FR~zero or more occurrences of \*(FIr\*(FR
+\*(FIr\*(FC+\*(FR~one or more occurrences of \*(FIr\*(FR
+\*(FIr\*(FC?\*(FR~zero or one occurrences of \*(FIr\*(FR
+\*(FIr\*(FC{\*(FIn\*(FC,\*(FIm\*(FC}\*(FR~\*(FIn\fP to \*(FIm\fP occurrences of \*(FIr\*(FR \*(CR(POSIX: see note below)\*(CD
+\*(FIr1\*(FC|\|\*(FIr2\*(FR~\*(FIr1\*(FR or \*(FIr2\*(FR
+.TE
+.sp .5
+.fi
+\*(CRThe \*(FIr\*(FC{\*(FIn\*(FC,\*(FIm\*(FC}\*(FR notation is called an
+\*(FIinterval expression\fP. POSIX mandates it for AWK regexps, but
+most \*(AKs don't implement it.\*(CX
+.sp .5
+\*(CDIn regular expressions, within character ranges
+(\*(FC[\*(FR...\*(FC]\*(FR),
+the notation \*(FC[[:\*(FIclass\*(FC:]]\*(FR defines character classes\*(CD:
+.sp .5
+.TS
+center, tab(~);
+lp8 lp8 lp8 lp8.
+\*(FCalnum\*(FR~alphanumeric~\*(FClower\*(FR~lowercase
+\*(FCalpha\*(FR~alphabetic~\*(FCprint\*(FR~printable
+\*(FCblank\*(FR~space or tab~\*(FCpunct\*(FR~punctuation
+\*(FCcntrl\*(FR~control~\*(FCspace\*(FR~whitespace
+\*(FCdigit\*(FR~decimal~\*(FCupper\*(FR~uppercase
+\*(FCgraph\*(FR~non-spaces~\*(FCxdigit\*(FR~hexadecimal\*(CX
+.TE
+.fi
+.EB "\s+2\f(HBREGULAR EXPRESSIONS\*(FR\s0"
+
+.\" --- Environment Variables
+.ES
+.fi
+\*(CDThe environment variable \*(FCAWKPATH\fP specifies a search path to use
+when finding source files named with the \*(FC\-f\fP
+option.
+The default path is
+\*(FC".:/usr/local/share/awk"\*(FR.
+.\" if this variable does not exist.
+.\" (The actual directory may vary,
+.\" depending upon how \*(GK was built and installed.)
+If a file name given to the \*(FC\-f\fP option contains a ``/'' character,
+no path search is performed.
+.sp .5
+.PP
+For socket communication,
+\*(FCGAWK_SOCK_RETRIES\fP
+controls the number of retries, and
+\*(FCGAWK_MSEC_SLEEP\fP controls
+the interval between retries.
+The interval is in milliseconds. On systems that do not support
+\*(FIusleep\fP(3),
+the value is rounded up to an integral number of seconds.
+.sp .5
+If \*(FCPOSIXLY_CORRECT\fP exists
+.\" in the environment,
+then \*(GK
+behaves exactly as if the \*(FC\-\^\-posix\fP option had been given.\*(CB
+.EB "\s+2\f(HBENVIRONMENT VARIABLES (\*(GK\f(HB)\*(FR\s0"
+.BT
+
+.\" --- Localization
+.ES
+.fi
+\*(CDThere are several steps involved in producing and running a localizable
+\*(AK program.
+.sp .5
+1. Add a \*(FCBEGIN\*(FR action to assign a value to the
+\*(FCTEXTDOMAIN\*(FR variable to set the text domain for
+your program.
+.sp .3
+.ti +5n
+\*(FCBEGIN { TEXTDOMAIN = "myprog" }\*(FR
+.sp .3
+This allows \*(GK to find the \*(FC\&.mo\*(FR
+file associated with your program.
+Without this step, \*(GK uses the \*(FCmessages\*(FR text domain,
+which probably won't work.
+.sp .5
+2. Mark all strings that should be translated with leading underscores.
+.sp .5
+3. Use the
+\*(FCbindtextdomain()\*(FR,
+\*(FCdcgettext()\*(FR,
+and/or
+\*(FCdcngettext()\*(FR
+functions in your program, as appropriate.
+.sp .5
+4. Run
+.sp .3
+.ti +3n
+\*(FCgawk\0\-\^\-gen\-pot\0\-f\0myprog.awk\0>\0myprog.pot\*(FR
+.sp .3
+to generate a \*(FC\&.pot\*(FR
+file for your program.
+.sp .5
+5. Provide appropriate translations, and build and install a corresponding
+\*(FC\&.mo\*(FR file.
+.sp .5
+The internationalization features are described in full detail in \*(AM.\*(CB
+.EB "\s+2\f(HBLOCALIZATION (\*(GK\f(HB)\*(FR\s0"
+
+.\" --- Special Filenames
+.ES
+.fi
+\*(CDAll three \*(FCawk\fP implementations
+recognize certain special filenames internally
+when doing I/O redirection from either \*(FCprint\fP
+or \*(FCprintf\fP into a file or via \*(FCgetline\fP
+from a file.
+These filenames
+provide access to open file descriptors inherited from the
+parent process. They
+may also be used on the command line to name data files.
+The filenames are:
+.sp .5
+.TS
+expand;
+l lw(2i).
+\*(FC"\-"\fP standard input
+\*(FC/dev/stdin\fP standard input \*(CR(not \*(MK)\*(CD
+\*(FC/dev/stdout\fP standard output
+\*(FC/dev/stderr\fP standard error output
+.TE
+.sp .5
+.fi
+\*(CBThe following names are specific to \*(GK.
+.sp .5
+.in +.2i
+.ti -.2i
+\*(FC/dev/fd/\^\*(FIn\*(FR
+.br
+File associated with the open file descriptor \*(FIn\*(FR.
+.ti -.2i
+\*(FC/inet/tcp/\*(FIlport\*(FC/\*(FIrhost\*(FC/\*(FIrport\*(FR
+.br
+.ti -.2i
+\*(FC/inet4/tcp/\*(FIlport\*(FC/\*(FIrhost\*(FC/\*(FIrport\*(FR
+.br
+.ti -.2i
+\*(FC/inet6/tcp/\*(FIlport\*(FC/\*(FIrhost\*(FC/\*(FIrport\*(FR
+.br
+Files for TCP/IP connections on local port \*(FIlport\*(FR to
+remote host \*(FIrhost\*(FR on remote port \*(FIrport\*(FR.
+Use a port of \*(FC0\*(FR to have the system pick a port.
+Use \*(FC/inet4\fP to force an IPv4 connection,
+and \*(FC/inet6\fP to force an IPv6 connection.
+Plain \*(FC/inet\fP uses the system default (probably IPv4).
+Usable only with the \*(FC|&\*(FR two-way I/O operator.
+.ti -.2i
+\*(FC/inet/udp/\*(FIlport\*(FC/\*(FIrhost\*(FC/\*(FIrport\*(FR
+.br
+.ti -.2i
+\*(FC/inet4/udp/\*(FIlport\*(FC/\*(FIrhost\*(FC/\*(FIrport\*(FR
+.br
+.ti -.2i
+\*(FC/inet6/udp/\*(FIlport\*(FC/\*(FIrhost\*(FC/\*(FIrport\*(FR
+.br
+Similar, but use UDP/IP instead of TCP/IP.
+.ti -.2i
+\*(CR\*(FC/inet/raw/\*(FIlport\*(FC/\*(FIrhost\*(FC/\*(FIrport\*(FR
+.br
+.ti -.2i
+\*(FC/inet4/raw/\*(FIlport\*(FC/\*(FIrhost\*(FC/\*(FIrport\*(FR
+.br
+.ti -.2i
+\*(FC/inet6/raw/\*(FIlport\*(FC/\*(FIrhost\*(FC/\*(FIrport\*(FR
+.br
+.\" Similar, but use raw IP sockets.
+Reserved for future use.\*(CL
+.in -.2i
+.EB "\s+2\f(HBSPECIAL FILENAMES\*(FR\s0"
+
+.BT
+
.\" --- Input Control
.ES
.fi
@@ -1104,29 +1258,29 @@ l lw(1.8i).
expand;
l lw(1.8i).
\*(FCgetline\fP T{
-set \*(FC$0\fP from next record;
+Set \*(FC$0\fP from next record;
set \*(FCNF\*(FR, \*(FCNR\*(FR, \*(FCFNR\*(FR.
T}
-\*(FCgetline < \*(FIfile\*(FR set \*(FC$0\fP from next record of \*(FIfile\*(FR; set \*(FCNF\*(FR.
+\*(FCgetline < \*(FIfile\*(FR Set \*(FC$0\fP from next record of \*(FIfile\*(FR; set \*(FCNF\*(FR.
\*(FCgetline \*(FIv\*(FR T{
-set \*(FIv\fP from next input record;
+Set \*(FIv\fP from next input record;
set \*(FCNR\*(FR, \*(FCFNR\*(FR.
T}
-\*(FCgetline \*(FIv \*(FC< \*(FIfile\*(FR set \*(FIv\fP from next record of \*(FIfile\*(FR.
-\*(FIcmd \*(FC| getline\*(FR pipe into \*(FCgetline\*(FR; set \*(FC$0\*(FR, \*(FCNF\*(FR.
-\*(FIcmd \*(FC| getline \*(FIv\*(FR pipe into \*(FCgetline\*(FR; set \*(FIv\*(FR.
-\*(CB\*(FIcmd \*(FC|& getline\*(FR co-process pipe into \*(FCgetline\*(FR; set \*(FC$0\*(FR, \*(FCNF\*(FR.
+\*(FCgetline \*(FIv \*(FC< \*(FIfile\*(FR Set \*(FIv\fP from next record of \*(FIfile\*(FR.
+\*(FIcmd \*(FC| getline\*(FR Pipe into \*(FCgetline\*(FR; set \*(FC$0\*(FR, \*(FCNF\*(FR.
+\*(FIcmd \*(FC| getline \*(FIv\*(FR Pipe into \*(FCgetline\*(FR; set \*(FIv\*(FR.
+\*(CB\*(FIcmd \*(FC|& getline\*(FR Co-process pipe into \*(FCgetline\*(FR; set \*(FC$0\*(FR, \*(FCNF\*(FR.
.TE
.fi
.in +.2i
.ti -.2i
\*(FIcmd \*(FC|& getline \*(FIv\*(FR
.br
-co-process pipe into \*(FCgetline\*(FR; set \*(FIv\*(FR.
+Co-process pipe into \*(FCgetline\*(FR; set \*(FIv\*(FR.
.ti -.2i
\*(CD\*(FCnext\fP
.br
-stop processing the current input
+Stop processing the current input
record. Read next input record and
start over with the first pattern in the
program. Upon end of the input data,
@@ -1135,17 +1289,13 @@ execute any \*(FCEND\fP rule(s).
.ti -.2i
\*(CL\*(FCnextfile\fP
.br
-stop processing the current input file.
+Stop processing the current input file.
The next input record comes from the
next input file. \*(FCFILENAME\fP \*(CBand
\*(FCARGIND\fP\*(CL are updated, \*(FCFNR\fP is reset to 1,
and processing starts over with the first
pattern in the AWK program. Upon end
-of input data, execute any \*(FCEND\fP rule(s).
-\*(CREarlier versions of \*(GK used
-\*(FCnext file\*(FR, as two words.
-This usage is no longer supported.
-\*(CR\*(MK does not currently support \*(FCnextfile\*(FR.\*(CD
+of input data, execute any \*(FCEND\fP rule(s).\*(CD
.in -.2i
.sp .5
.fi
@@ -1161,7 +1311,7 @@ the problem.\*(CX
.ti -.2i
\*(CL\*(FCfflush(\*(FR[\*(FIfile\^\*(FR]\*(FC)\*(FR
.br
-flush any buffers associated
+Flush any buffers associated
with the open output file or pipe \*(FIfile\*(FR.\*(CD
\*(CBIf no \*(FIfile\fP, then flush standard output.
If \*(FIfile\fP is null, then flush all open output files and pipes
@@ -1169,22 +1319,22 @@ If \*(FIfile\fP is null, then flush all open output files and pipes
.ti -.2i
\*(FCprint\fP
.br
-print the current record. Terminate output record
+Print the current record. Terminate output record
with \*(FCORS\fP.
.ti -.2i
\*(FCprint \*(FIexpr-list\*(FR
.br
-print expressions. Each expression is separated
+Print expressions. Each expression is separated
by the value of \*(FCOFS\fP. Terminate the output record
with \*(FCORS\fP.
.ti -.2i
\*(FCprintf \*(FIfmt\*(FC, \*(FIexpr-list\*(FR
.br
-format and print (see \fHPrintf Formats\fP below).
+Format and print (see \fHPrintf Formats\fP below).
.ti -.2i
\*(FCsystem(\*(FIcmd\*(FC)\*(FR
.br
-execute the command \*(FIcmd\*(FR,
+Execute the command \*(FIcmd\*(FR,
and return the exit status
\*(CR(may not be available on non-POSIX systems)\*(CD.
.sp .5
@@ -1195,25 +1345,23 @@ I/O redirections may be used with both \*(FCprint\fP and \*(FCprintf\fP.
.ti -.2i
\*(CD\*(FCprint "hello" > \*(FIfile\*(FR
.br
-print data to \*(FIfile\fP. The first time the file is written to, it
+Print data to \*(FIfile\fP. The first time the file is written to, it
is truncated. Subsequent commands append data.
.ti -.2i
\*(FCprint "hello" >> \*(FIfile\*(FR
.br
-append data to \*(FIfile\fP. The previous contents of \*(FIfile\*(FR are not lost.
+Append data to \*(FIfile\fP. The previous contents of \*(FIfile\*(FR are not lost.
.ti -.2i
\*(FCprint "hello" | \*(FIcmd\*(FR
.br
-print data down a pipeline to \*(FIcmd\*(FR.
+Print data down a pipeline to \*(FIcmd\*(FR.
.ti -.2i
\*(CB\*(FCprint "hello" |& \*(FIcmd\*(FR
.br
-print data down a pipeline to co-process \*(FIcmd\*(FR.\*(CX
+Print data down a pipeline to co-process \*(FIcmd\*(FR.\*(CX
.in -.2i
.EB "\s+2\f(HBOUTPUT CONTROL\*(FR\s0"
-.BT
-
.\" --- Closing Redirections
.ES
.fi
@@ -1221,11 +1369,11 @@ print data down a pipeline to co-process \*(FIcmd\*(FR.\*(CX
.ti -.2i
\*(CD\*(FCclose(\*(FIfile\*(FC)\*(FR
.br
-close input or output file, pipe \*(CBor co-process.\*(CD
+Close input or output file, pipe \*(CBor co-process.\*(CD
.ti -.2i
\*(CB\*(FCclose(\*(FIcommand\*(FC, \*(FIhow\*(FC)\*(FR
.br
-close one end of co-process pipe.
+Close one end of co-process pipe.
Use \*(FC"to"\*(FR for the write end, or
\*(FC"from"\*(FR for the read end.\*(CD
.in -.2i
@@ -1238,75 +1386,6 @@ if there was a system problem.
the error.\*(CX
.EB "\s+2\f(HBCLOSING REDIRECTIONS\*(FR\s0"
-.\" --- Special Filenames
-.ES
-.fi
-\*(CDWhen doing I/O redirection from either \*(FCprint\fP
-or \*(FCprintf\fP into a file or via \*(FCgetline\fP
-from a file, all three implementations of \*(FCawk\fP
-recognize certain special filenames internally. These filenames
-allow access to open file descriptors inherited from the
-parent process (usually the shell).
-These filenames may also be used on the command line to name data files.
-The filenames are:
-.sp .5
-.TS
-expand;
-l lw(2i).
-\*(FC"\-"\fP standard input
-\*(FC/dev/stdin\fP standard input \*(CR(not \*(MK)\*(CD
-\*(FC/dev/stdout\fP standard output
-\*(FC/dev/stderr\fP standard error output
-.TE
-.sp .5
-.fi
-\*(CBThe following names are specific to \*(GK.
-.sp .5
-.in +.2i
-.ti -.2i
-\*(FC/dev/fd/\^\*(FIn\*(FR
-.br
-File associated with the open file descriptor \*(FIn\*(FR.
-.ti -.2i
-\*(FC/inet/tcp/\*(FIlport\*(FC/\*(FIrhost\*(FC/\*(FIrport\*(FR
-.br
-.ti -.2i
-\*(FC/inet4/tcp/\*(FIlport\*(FC/\*(FIrhost\*(FC/\*(FIrport\*(FR
-.br
-.ti -.2i
-\*(FC/inet6/tcp/\*(FIlport\*(FC/\*(FIrhost\*(FC/\*(FIrport\*(FR
-.br
-Files for TCP/IP connections on local port \*(FIlport\*(FR to
-remote host \*(FIrhost\*(FR on remote port \*(FIrport\*(FR.
-Use a port of \*(FC0\*(FR to have the system pick a port.
-Use \*(FC/inet4\fP to force an IPv4 connection,
-and \*(FC/inet6\fP to force an IPv6 connection.
-Plain \*(FC/inet\fP uses the system default (probably IPv4).
-Usable only with the \*(FC|&\*(FR two-way I/O operator.
-.ti -.2i
-\*(FC/inet/udp/\*(FIlport\*(FC/\*(FIrhost\*(FC/\*(FIrport\*(FR
-.br
-.ti -.2i
-\*(FC/inet4/udp/\*(FIlport\*(FC/\*(FIrhost\*(FC/\*(FIrport\*(FR
-.br
-.ti -.2i
-\*(FC/inet6/udp/\*(FIlport\*(FC/\*(FIrhost\*(FC/\*(FIrport\*(FR
-.br
-Similar, but use UDP/IP instead of TCP/IP.
-.ti -.2i
-\*(CR\*(FC/inet/raw/\*(FIlport\*(FC/\*(FIrhost\*(FC/\*(FIrport\*(FR
-.br
-.ti -.2i
-\*(FC/inet4/raw/\*(FIlport\*(FC/\*(FIrhost\*(FC/\*(FIrport\*(FR
-.br
-.ti -.2i
-\*(FC/inet6/raw/\*(FIlport\*(FC/\*(FIrhost\*(FC/\*(FIrport\*(FR
-.br
-.\" Similar, but use raw IP sockets.
-Reserved for future use.\*(CL
-.in -.2i
-.EB "\s+2\f(HBSPECIAL FILENAMES\*(FR\s0"
-
.BT
.\" --- Printf Formats
@@ -1317,23 +1396,23 @@ Reserved for future use.\*(CL
accept the following conversion specification formats:
.sp .5
.nf
-\*(FC%c\fP an \s-1ASCII\s+1 character
-\*(FC%d\fP, \*(FC%i\fP a decimal number (the integer part)
-\*(FC%e\fP a floating point number of the form
+\*(FC%c\fP An \s-1ASCII\s+1 character
+\*(FC%d\fP, \*(FC%i\fP A decimal number (the integer part)
+\*(FC%e\fP A floating point number of the form
\*(FC[\-]d.dddddde[+\^\-]dd\*(FR
-\*(FC%E\fP like \*(FC%e\fP, but use \*(FCE\fP instead of \*(FCe\*(FR
-\*(FC%f\fP a floating point number of the form
+\*(FC%E\fP Like \*(FC%e\fP, but use \*(FCE\fP instead of \*(FCe\*(FR
+\*(FC%f\fP A floating point number of the form
\*(FC[\-]ddd.dddddd\*(FR
-\*(FC%F\fP like \*(FC%f\fP, but use capital letters for infinity and
+\*(FC%F\fP Like \*(FC%f\fP, but use capital letters for infinity and
not-a-number values.
-\*(FC%g\fP use \*(FC%e\fP or \*(FC%f\fP, whichever is shorter, with
+\*(FC%g\fP Use \*(FC%e\fP or \*(FC%f\fP, whichever is shorter, with
nonsignificant zeros suppressed
-\*(FC%G\fP like \*(FC%g\fP, but use \*(FC%E\fP instead of \*(FC%e\*(FR
-\*(FC%o\fP an unsigned octal integer
-\*(FC%u\fP an unsigned decimal integer
-\*(FC%s\fP a character string
-\*(FC%x\fP an unsigned hexadecimal integer
-\*(FC%X\fP like \*(FC%x\fP, but use \*(FCABCDEF\fP for 10\(en15
+\*(FC%G\fP Like \*(FC%g\fP, but use \*(FC%E\fP instead of \*(FC%e\*(FR
+\*(FC%o\fP An unsigned octal integer
+\*(FC%u\fP An unsigned decimal integer
+\*(FC%s\fP A character string
+\*(FC%x\fP An unsigned hexadecimal integer
+\*(FC%X\fP Like \*(FC%x\fP, but use \*(FCABCDEF\fP for 10\(en15
\*(FC%%\fP A literal \*(FC%\fP; no argument is converted
.sp .5
.fi
@@ -1344,7 +1423,7 @@ and the control letter:
expand;
l lw(2.2i).
\*(CB\*(FIcount\*(FC$\*(FR T{
-use the
+Use the
\*(FIcount\*(FR'th
argument at this point in the formatting
(a \*(FIpositional specifier\*(FR).
@@ -1352,75 +1431,72 @@ Use in translated versions of
format strings, not in the original text of an AWK program.\*(CD
T}
\*(FC\-\fP T{
-left-justify the expression within its field.
+Left-justify the expression within its field.
T}
\*(FIspace\fP T{
-for numeric conversions, prefix positive values
+For numeric conversions, prefix positive values
with a space and negative values with a
minus sign.
T}
\*(FC+\fP T{
-used before the \*(FIwidth\fP modifier means to always
+Use before the \*(FIwidth\fP modifier to always
supply a sign for numeric conversions, even if
the data to be formatted is positive. The \*(FC+\fP
overrides the space modifier.
T}
\*(FC#\fP T{
-use an ``alternate form'' for some control letters.
+Use an ``alternate form'' for some control letters:
T}
- \*(FC%o\*(FR T{
-supply a leading zero.
+ \*(FC%o\*(FR T{
+Supply a leading zero.
T}
- \*(FC%x\*(FR, \*(FC%X\*(FR T{
-supply a leading \*(FC0x\*(FR or \*(FC0X\*(FR for a nonzero result.
+ \*(FC%x\*(FR, \*(FC%X\*(FR T{
+Supply a leading \*(FC0x\*(FR or \*(FC0X\*(FR for a nonzero result.
T}
- \*(FC%e\*(FR, \*(FC%E\*(FR, \*(FC%f\*(FR T{
-the result always has a decimal point.
+ \*(FC%e\*(FR, \*(FC%E\*(FR, \*(FC%f\*(FR T{
+The result always has a decimal point.
T}
- \*(FC%g\*(FR, \*(FC%G\*(FR T{
-trailing zeros are not removed.
+ \*(FC%g\*(FR, \*(FC%G\*(FR T{
+Trailing zeros are not removed.
T}
\*(FC0\fP T{
-pad output with zeros instead of spaces.
+Pad output with zeros instead of spaces.
This applies only to the numeric output formats.
Only has an effect when the field width is wider
than the value to be printed.
T}
\*(CB\*(FC'\*(FR T{
-use the locale's thousands separator for \*(FC%d\fP, \*(FC%i\fP, and \*(FC%u\fP.\*(CD
+Use the locale's thousands separator for \*(FC%d\fP, \*(FC%i\fP, and \*(FC%u\fP.\*(CD
T}
\*(FIwidth\fP T{
-pad the field to this width. The field is normally
+Pad the field to this width. The field is normally
padded with spaces. If the \*(FC0\fP flag has been used,
pad with zeros.
T}
\*(FC.\*(FIprec\*(FR T{
-precision.
+Precision.
The meaning of the \*(FIprec\*(FR varies by control letter:
T}
- \*(FC%d\*(FR, \*(FC%o\*(FR, \*(FC%i\*(FR,
- \*(FC%u\*(FR, \*(FC%x\*(FR, \*(FC%X\fP T{
-the minimum number of digits to print.
+ \*(FC%d\*(FR, \*(FC%o\*(FR, \*(FC%i\*(FR,
+ \*(FC%u\*(FR, \*(FC%x\*(FR, \*(FC%X\fP T{
+The minimum number of digits to print.
T}
- \*(FC%e\*(FR, \*(FC%E\*(FR, \*(FC%f\*(FR T{
-the number of digits to print to the right of the decimal point.
+ \*(FC%e\*(FR, \*(FC%E\*(FR, \*(FC%f\*(FR T{
+The number of digits to print to the right of the decimal point.
T}
- \*(FC%g\*(FR, \*(FC%G\fP T{
-the maximum number of significant digits.
+ \*(FC%g\*(FR, \*(FC%G\fP T{
+The maximum number of significant digits.
T}
- \*(FC%s\fP T{
-the maximum number of characters to print.
+ \*(FC%s\fP T{
+The maximum number of characters to print.
T}
.TE
.sp .5
.fi
-.ig
-The dynamic \*(FIwidth\fP and \*(FIprec\fP capabilities of the ANSI C
-\*(FCprintf()\fP routines are supported.
-..
-A \*(FC*\fP in place of either the \*(FIwidth\fP or \*(FIprec\fP
-specifications causes their values to be taken from
-the argument list to \*(FCprintf\fP or \*(FCsprintf()\*(FR.
+Use a
+\*(FC*\fP in place of either the \*(FIwidth\fP or \*(FIprec\fP
+specifications to take their values from
+the \*(FCprintf\fP or \*(FCsprintf()\*(FR argument list.
\*(CBUse \*(FC*\*(FIn\*(FC$\*(FR to use positional specifiers
with a dynamic width or precision.\*(CX
.EB "\s+2\f(HBPRINTF FORMATS\*(FR\s0"
@@ -1428,6 +1504,99 @@ with a dynamic width or precision.\*(CX
.BT
+.\" --- User-defined Functions
+.ES
+.fi
+\*(CDFunctions in AWK are defined as follows:
+.sp .5
+.nf
+ \*(FCfunction \*(FIname\*(FC(\*(FIparameter list\*(FC)
+ {
+ \*(FIstatements
+ \*(FC}\*(FR
+.sp .5
+.fi
+Functions are executed when they are called from within expressions
+in either patterns or actions. Actual parameters supplied in the function
+call instantiate the formal parameters declared in the function.
+Arrays are passed by reference, other variables are passed by value.
+.sp .5
+Local variables are declared as extra parameters
+in the parameter list. The convention is to separate local variables from
+real parameters by extra spaces in the parameter list. For example:
+.sp .5
+.nf
+ \*(FC# a and b are local
+ function f(p, q, a, b)
+ {
+ \&.....
+ }
+.sp .3
+ /abc/ { ... ; f(1, 2) ; ... }\*(FR
+.fi
+.sp .5
+The left parenthesis in a function call is required
+to immediately follow the function name
+without any intervening whitespace.
+This is to avoid a syntactic ambiguity with the concatenation operator.
+This restriction does not apply to the built-in functions.
+.sp .5
+Functions may call each other and may be recursive.
+Function parameters used as local variables are initialized
+to the null string and the number zero upon function invocation.
+.sp .5
+\*(CBFunctions may be called indirectly. To do this, assign
+the name of the function to be called, as a string, to a variable.
+Then use the variable as if it were the name of a function, prefixed with
+an ``at'' sign, like so:\*(FC
+.nf
+.sp .5
+ function myfunc()
+ {
+ print "myfunc called"
+ }
+.sp .3
+ {
+ the_func = "myfunc"
+ @the_func()
+ }
+.fi
+.sp .5
+\*(FR\*(CDUse \*(FCreturn\fP to return a value from a function. The return value
+is undefined if no value is provided, or if the function returns by
+``falling off'' the end.
+.sp .5
+\*(CLThe word
+\*(FCfunc\fP
+may be used in place of
+\*(FCfunction\*(FR.
+\*(CRThis usage is deprecated.\*(CX
+.EB "\s+2\f(HBUSER-DEFINED FUNCTIONS\*(FR\s0"
+.sp .6
+.\" --- Builtin Numeric Functions
+.ES
+.fi
+.TS
+expand;
+l lw(2i).
+\*(CD\*(FCatan2(\*(FIy\*(FC, \*(FIx\*(FC)\*(FR The arctangent of \*(FIy/x\fP in radians.
+\*(FCcos(\*(FIexpr\*(FC)\*(FR The cosine of \*(FIexpr\fP, which is in radians.
+\*(FCexp(\*(FIexpr\*(FC)\*(FR The exponential function (\*(FIe \*(FC^ \*(FIx\*(FR).
+\*(FCint(\*(FIexpr\*(FC)\*(FR Truncate to integer.
+\*(FClog(\*(FIexpr\*(FC)\*(FR The natural logarithm function (base \*(FIe\^\*(FR).
+\*(FCrand()\fP A random number between 0 and 1 (0 \(<= \*(FIN\fP < 1).
+\*(FCsin(\*(FIexpr\*(FC)\*(FR The sine of \*(FIexpr\fP, which is in radians.
+\*(FCsqrt(\*(FIexpr\*(FC)\*(FR The square root function.
+\&\*(FCsrand(\*(FR[\*(FIexpr\^\*(FR]\*(FC)\*(FR T{
+Use \*(FIexpr\fP as the new seed for the random number
+generator. If no \*(FIexpr\fP, the time of day is used.
+Return the random number
+generator's previous seed.\*(CX
+T}
+.TE
+.EB "\s+2\f(HBNUMERIC FUNCTIONS\*(FR\s0"
+.BT
+
.\" --- Builtin String Functions
.ES
.fi
@@ -1435,26 +1604,26 @@ with a dynamic width or precision.\*(CX
.ti -.2i
\*(CB\*(FCasort(\*(FIs\*(FC \*(FR[\*(FC, \*(FId\*(FR]\*(FC)\*(FR
.br
-sorts the source array \*(FIs\*(FR, replacing the indices with numeric
+Sort the source array \*(FIs\*(FR, replacing the indices with numeric
values 1 through \*(FIn\*(FR (the number of elements in the array),
-and returns the number of elements.
-If destination \*(FId\*(FR is supplied, \*(FIs\*(FR is copied to \*(FId\*(FR,
-\*(FId\*(FR is sorted, and \*(FIs\*(FR is unchanged.\*(CD
+and return the number of elements.
+If destination \*(FId\*(FR is supplied, copy \*(FIs\*(FR to \*(FId\*(FR,
+sort \*(FId\*(FR, and leave \*(FIs\*(FR unchanged.\*(CD
.ti -.2i
\*(CB\*(FCasorti(\*(FIs\*(FC \*(FR[\*(FC, \*(FId\*(FR]\*(FC)\*(FR
.br
-like \*(FCasort()\*(FR, but sorting is done on the indices, not
+Like \*(FCasort()\*(FR, but sort on the indices, not
the values. The original values are thrown array, so provide a
second array to preserve the first.\*(CD
.ti -.2i
\*(CB\*(FCgensub(\*(FIr\*(FC, \*(FIs\*(FC, \*(FIh \*(FR[\*(FC, \*(FIt\*(FR]\*(FC)\*(FR
.br
-search the target string
+Search the target string
\*(FIt\fP for matches of the regular expression \*(FIr\*(FR. If
\*(FIh\fP is a string beginning with \*(FCg\fP or \*(FCG\*(FR,
replace all matches of \*(FIr\fP with \*(FIs\*(FR. Otherwise, \*(FIh\fP
is a number indicating which match of \*(FIr\fP to replace.
-If \*(FIt\fP is not supplied, \*(FC$0\fP is used instead. Within the
+If \*(FIt\fP is not supplied, use \*(FC$0\fP instead. Within the
replacement text \*(FIs\*(FR, the sequence \*(FC\e\*(FIn\*(FR,
where \*(FIn\fP is a digit from 1 to 9, may be used to indicate just
the text that matched the \*(FIn\*(FRth parenthesized subexpression.
@@ -1465,7 +1634,7 @@ and the original target string is \*(FInot\fP changed.\*(CD
.ti -.2i
\*(FCgsub(\*(FIr\*(FC, \*(FIs \*(FR[\*(FC, \*(FIt\*(FR]\*(FC)\*(FR
.br
-for each substring matching the
+For each substring matching the
regular expression \*(FIr\fP in the string \*(FIt\*(FR, substitute the
string \*(FIs\*(FR, and return the number of substitutions. If
\*(FIt\fP is not supplied, use \*(FC$0\*(FR. An \*(FC&\fP in the
@@ -1477,21 +1646,21 @@ and \*(FCgsub()\*(FR
.ti -.2i
\*(FCindex(\*(FIs\*(FC, \*(FIt\*(FC)\*(FR
.br
-returns the index of the string
+Return the index of the string
\*(FIt\fP in the string \*(FIs\*(FR, or 0 if \*(FIt\fP is not present.
.ti -.2i
\*(FClength(\*(FR[\*(FIs\*(FR]\*(FC)\*(FR
.br
-returns the length of the string
+Return the length of the string
\*(FIs\*(FR, or the length of \*(FC$0\fP if \*(FIs\fP is not supplied.
-\*(CBWith an array argument, returns the number of elements
+\*(CLWith an array argument, return the number of elements
in the array.\*(CD
.ti -.2i
\*(FCmatch(\*(FIs\*(FC, \*(FIr \*(CB\*(FR[\*(FC, \*(FIa\*(FR]\*(CD\*(FC)\*(FR
.br
-returns the position in
+Return the position in
\*(FIs\fP where the regular expression \*(FIr\fP occurs, or 0 if
-\*(FIr\fP is not present, and sets the values of variables
+\*(FIr\fP is not present, and set the values of variables
\*(FCRSTART\fP
and \*(FCRLENGTH\*(FR.
\*(CBIf \*(FIa\*(FR is supplied, the text matching all of \*(FIr\*(FR
@@ -1507,104 +1676,81 @@ respectively, of each matching substring.\*(CD
.ti -.2i
\*(CB\*(FCpatsplit(\*(FIs\*(FC, \*(FIa \*(FR[\*(FC, \*(FIr \*(CB\*(FR[\*(FC, \*(FIseps \*(FR] \*(FR] \*(FC)\*(FR
.br
-splits the string
+Split the string
\*(FIs\fP into the array \*(FIa\fP
and the array \*(FIseps\fP of separator strings
using the regular expression \*(FIr\*(FR,
-and returns the number of fields.
+and return the number of fields.
Element values are the portions of \*(FIs\fP that matched \*(FIr\fP.
The value of \*(FIseps\fP[\*(FIi\fP] is the separator that appeared in
front of \*(FIa\fP[\*(FIi\fP+1].
-If \*(FIr\fP is omitted, \*(FCFPAT\fP
-is used instead.
-The arrays \*(FIa\fP and \*(FIseps\fP are cleared first.
+If \*(FIr\fP is omitted, use \*(FCFPAT\fP instead.
+Clear the arrays \*(FIa\fP and \*(FIseps\fP first.
Splitting behaves identically to field splitting with \*(FCFPAT\fP.\*(CD
.ti -.2i
\*(FCsplit(\*(FIs\*(FC, \*(FIa \*(FR[\*(FC, \*(FIr \*(CB\*(FR[\*(FC, \*(FIseps \*(FR]\*(CD \*(FR] \*(FC)\*(FR
.br
-splits the string
+Split the string
\*(FIs\fP into the array \*(FIa\fP \*(CBand the array \*(FIseps\fP of separator strings\*(CD
using the regular expression \*(FIr\*(FR,
-and returns the number of fields. If \*(FIr\fP is omitted, \*(FCFS\fP
-is used instead.
-The arrays \*(FIa\fP \*(CBand \*(FIseps\fP\*(CD are cleared first.
+and return the number of fields. If \*(FIr\fP is omitted, use \*(FCFS\fP
+instead.
+Clear the \*(FIa\fP \*(CBand \*(FIseps\fP\*(CD first.
Splitting behaves identically to field splitting.
(See \fHFields\fP, above.)
.ti -.2i
\*(FCsprintf(\*(FIfmt\*(FC, \*(FIexpr-list\*(FC)\*(FR
.br
-prints \*(FIexpr-list\fP
-according to \*(FIfmt\*(FR, and returns the resulting string.
+Print \*(FIexpr-list\fP
+according to \*(FIfmt\*(FR, and return the result.\*(CX
+.in -.2i
+.EB "\s+2\f(HBSTRING FUNCTIONS\*(FR\s0"
+
+.BT
+
+.\" --- Builtin String Functions
+.ES
+.fi
+.in +.2i
.ti -.2i
\*(CB\*(FCstrtonum(\*(FIs\*(FC)\*(FR
.br
-examines \*(FIs\*(FR, and returns its numeric value.
+Examine \*(FIs\*(FR, and return its numeric value.
If \*(FIs\*(FR begins with a leading \*(FC0\*(FR,
\*(FCstrtonum()\*(FR assumes that \*(FIs\*(FR
is an octal number.
If \*(FIs\*(FR begins with a leading \*(FC0x\*(FR
or \*(FC0X\*(FR, \*(FCstrtonum()\*(FR assumes that
-\*(FIs\*(FR is a hexadecimal number.\*(CD
+\*(FIs\*(FR is a hexadecimal number. Otherwise, the
+number is treated as decimal.\*(CD
.ti -.2i
\*(FCsub(\*(FIr\*(FC, \*(FIs \*(FR[\*(FC, \*(FIt\*(FR]\*(FC)\*(FR
.br
-just like
-\*(FCgsub()\*(FR, but only the first matching substring is replaced.\*(CX
-.in -.2i
-.EB "\s+2\f(HBSTRING FUNCTIONS\*(FR\s0"
-
-.BT
-
-.\" --- Builtin String Functions
-.ES
-.fi
-.in +.2i
+Just like
+\*(FCgsub()\*(FR, but replace only the first matching substring.\*(CX
.ti -.2i
\*(CD\*(FCsubstr(\*(FIs\*(FC, \*(FIi \*(FR[\*(FC, \*(FIn\*(FR]\*(FC)\*(FR
.br
-returns the at most
+Return the at most
\*(FIn\*(FR-character substring of \*(FIs\fP starting at \*(FIi\*(FR.
-If \*(FIn\fP is omitted, the rest of \*(FIs\fP is used.
+If \*(FIn\fP is omitted, use the rest of \*(FIs\fP.
.ti -.2i
\*(FCtolower(\*(FIstr\*(FC)\*(FR
.br
-returns a copy of the string \*(FIstr\*(FR,
-with all the upper-case characters in \*(FIstr\fP translated to their
-corresponding lower-case counterparts. Non-alphabetic characters are
+Return a copy of the string \*(FIstr\*(FR,
+with all the uppercase characters in \*(FIstr\fP translated to their
+corresponding lowercase counterparts. Non-alphabetic characters are
left unchanged.
.ti -.2i
\*(FCtoupper(\*(FIstr\*(FC)\*(FR
.br
-returns a copy of the string \*(FIstr\*(FR,
-with all the lower-case characters in \*(FIstr\fP translated to their
-corresponding upper-case counterparts. Non-alphabetic characters are
+Return a copy of the string \*(FIstr\*(FR,
+with all the lowercase characters in \*(FIstr\fP translated to their
+corresponding uppercase counterparts. Non-alphabetic characters are
left unchanged.\*(CX
.in -.2i
.EB "\s+2\f(HBSTRING FUNCTIONS (continued)\*(FR\s0"
.sp .6
-.\" --- Builtin Numeric Functions
-.ES
-.fi
-.TS
-expand;
-l lw(2i).
-\*(CD\*(FCatan2(\*(FIy\*(FC, \*(FIx\*(FC)\*(FR the arctangent of \*(FIy/x\fP in radians.
-\*(FCcos(\*(FIexpr\*(FC)\*(FR the cosine of \*(FIexpr\fP, which is in radians.
-\*(FCexp(\*(FIexpr\*(FC)\*(FR the exponential function (\*(FIe \*(FC^ \*(FIx\*(FR).
-\*(FCint(\*(FIexpr\*(FC)\*(FR truncates to integer.
-\*(FClog(\*(FIexpr\*(FC)\*(FR the natural logarithm function (base \*(FIe\^\*(FR).
-\*(FCrand()\fP a random number between 0 and 1 (0 \(<= \*(FIN\fP < 1).
-\*(FCsin(\*(FIexpr\*(FC)\*(FR the sine of \*(FIexpr\fP, which is in radians.
-\*(FCsqrt(\*(FIexpr\*(FC)\*(FR the square root function.
-\&\*(FCsrand(\*(FR[\*(FIexpr\^\*(FR]\*(FC)\*(FR T{
-uses \*(FIexpr\fP as a new seed for the random number
-generator. If no \*(FIexpr\fP, the time of day is used.
-Returns previous seed for the random number
-generator.\*(CX
-T}
-.TE
-.EB "\s+2\f(HBNUMERIC FUNCTIONS\*(FR\s0"
-.sp .6
.\" --- Builtin Time Functions
.ES
.fi
@@ -1617,14 +1763,15 @@ formatting them.
.ti -.2i
\*(FCmktime(\*(FIdatespec\*(FC)\*(FR
.br
-turns \*(FIdatespec\fP into a time
-stamp of the same form as returned by \*(FCsystime()\*(FR.
+Convert \*(FIdatespec\fP into a time
+stamp of the same form as returned by \*(FCsystime()\*(FR
+and return it.
The \*(FIdatespec\fP is a string of the form
\*(FC"\*(FIYYYY MM DD HH MM SS[ DST]\*(FC"\*(FR.
.ti -.2i
\*(FCstrftime(\*(FR[\*(FIformat \*(FR[\*(FC, \*(FItimestamp\*(FR[\*(FC, \*(FIutc-flag\*(FR]]]\*(FC)\*(FR
.br
-formats \*(FItimestamp\fP
+Format \*(FItimestamp\fP
according to the specification in \*(FIformat\*(FR. The
\*(FItimestamp\fP should be of the same form as returned by
\*(FCsystime()\*(FR.
@@ -1637,7 +1784,7 @@ of \*(FIdate\*(FR(1) is used.
.ti -.2i
\*(FCsystime()\fP
.br
-returns the current time of day as the number of
+Return the current time of day as the number of
seconds since the Epoch.\*(CB
.in -.2i
.EB "\s+2\f(HBTIME FUNCTIONS (\*(GK\f(HB)\*(FR\s0"
@@ -1653,38 +1800,36 @@ provides the following functions for doing bitwise operations.
.ti -.2i
\*(FCand(\*(FIv1\*(FC, \*(FIv2\*(FC)\*(FR
.br
-returns the bitwise AND of the values provided by
+Return the bitwise AND of the values provided by
\*(FIv1\*(FR and \*(FIv2\*(FR.
.ti -.2i
\*(FCcompl(\*(FIval\*(FC)\*(FR
.br
-returns the bitwise complement of
+Return the bitwise complement of
\*(FIval\*(FR.
.ti -.2i
\*(FClshift(\*(FIval\*(FC, \*(FIcount\*(FC)\*(FR
.br
-returns the value of \*(FIval\*(FR,
+Return the value of \*(FIval\*(FR,
shifted left by \*(FIcount\*(FR bits.
.ti -.2i
\*(FCor(\*(FIv1\*(FC, \*(FIv2\*(FC)\*(FR
.br
-returns the bitwise OR of the values provided by
+Return the bitwise OR of the values provided by
\*(FIv1\*(FR and \*(FIv2\*(FR.
.ti -.2i
\*(FCrshift(\*(FIval\*(FC, \*(FIcount\*(FC)\*(FR
.br
-returns the value of \*(FIval\*(FR,
+Return the value of \*(FIval\*(FR,
shifted right by \*(FIcount\*(FR bits.
.ti -.2i
\*(FCxor(\*(FIv1\*(FC, \*(FIv2\*(FC)\*(FR
.br
-teturns the bitwise XOR of the values provided by
+Return the bitwise XOR of the values provided by
\*(FIv1\*(FR and \*(FIv2\*(FR.\*(CB
.in -.2i
.EB "\s+2\f(HBBIT MANIPULATION FUNCTIONS (\*(GK\f(HB)\*(FR\s0"
-
-.BT
-
+.sp .6
.\" --- Extensions
.ES
.fi
@@ -1692,7 +1837,7 @@ teturns the bitwise XOR of the values provided by
.ti -.2i
\*(CD\*(FCextension(\*(FIlib\*(FC, \*(FIfunc\*(FC)\*(FR
.br
-dynamically load the shared library
+Dynamically load the shared library
\*(FIlib\*(FR
and call
\*(FIfunc\*(FR
@@ -1702,6 +1847,7 @@ It returns the value returned by
\*(FIfunc\*(FR.\*(CB
.in -.2i
.EB "\s+2\f(HBDYNAMIC EXTENSIONS (\*(GK\f(HB)\*(FR\s0"
+.BT
.\" --- Builtin Internationalization Functions
.ES
@@ -1713,11 +1859,11 @@ provides the following functions for runtime message translation.
.ti -.2i
\*(FCbindtextdomain(\*(FIdirectory \*(FR[\*(FC, \*(FIdomain\*(FR]\*(FC)\*(FR
.br
-specifies the directory where \*(GK looks for the \*(FC\&.mo\*(FR
+Specify the directory where \*(GK looks for the \*(FC\&.mo\*(FR
files, in case they
will not or cannot be placed in the ``standard'' locations
-(e.g., during testing.)
-It returns the directory where \*(FIdomain\*(FR is ``bound.''
+(e.g., during testing).
+Return the directory where \*(FIdomain\*(FR is ``bound.''
.sp .5
The default \*(FIdomain\*(FR is the value of \*(FCTEXTDOMAIN\*(FR.
When \*(FIdirectory\*(FR is the null string (\*(FC"\^"\*(FR),
@@ -1726,7 +1872,7 @@ given \*(FIdomain\*(FR.
.ti -.2i
\*(FCdcgettext(\*(FIstring \*(FR[\*(FC, \*(FIdomain \*(FR[\*(FC, \*(FIcategory\*(FR]]\*(FC)\*(FR
.br
-returns the translation of \*(FIstring\*(FR in text domain
+Return the translation of \*(FIstring\*(FR in text domain
\*(FIdomain\*(FR for locale category \*(FIcategory\*(FR.
The default value for \*(FIdomain\*(FR is the current value of \*(FCTEXTDOMAIN\*(FR.
The default value for \*(FIcategory\*(FR is \*(FC"LC_MESSAGES"\*(FR.
@@ -1738,7 +1884,7 @@ to use the current domain.
.ti -.2i
\*(FCdcngettext(\*(FIstring1\*(FC, \*(FIstring2\*(FC, \*(FInumber\*(FR [\*(FC, \*(FIdom \*(FR[\*(FC, \*(FIcat\*(FR]]\*(FC)\*(FR
.br
-returns the plural form used for \*(FInumber\*(FR of the translation of
+Return the plural form used for \*(FInumber\*(FR of the translation of
\*(FIstring1\*(FR and \*(FIstring2\*(FR in text domain
\*(FIdom\*(FR for locale category \*(FIcat\*(FR.
The default value for \*(FIdom\*(FR is the current value of \*(FCTEXTDOMAIN\*(FR.
@@ -1752,159 +1898,6 @@ to use the current domain.\*(CB
.in -.2i
.EB "\s+2\f(HBINTERNATIONALIZATION (\*(GK\f(HB)\*(FR\s0"
-.\" --- Localization
-.ES
-.fi
-\*(CDThere are several steps involved in producing and running a localizable
-\*(AK program.
-.sp .5
-1. Add a \*(FCBEGIN\*(FR action to assign a value to the
-\*(FCTEXTDOMAIN\*(FR variable to set the text domain for
-your program.
-.sp .5
-.ti +5n
-\*(FCBEGIN { TEXTDOMAIN = "myprog" }\*(FR
-.sp .5
-This allows \*(GK to find the \*(FC\&.mo\*(FR
-file associated with your program.
-Without this step, \*(GK uses the \*(FCmessages\*(FR text domain,
-which probably won't work.
-.sp .5
-2. Mark all strings that should be translated with leading underscores.
-.sp .5
-3. Use the
-\*(FCbindtextdomain()\*(FR,
-\*(FCdcgettext()\*(FR,
-and/or
-\*(FCdcngettext()\*(FR
-functions in your program, as appropriate.
-.sp .5
-4. Run
-.sp .5
-.ti +3n
-\*(FCgawk\0\-\^\-gen\-pot\0\-f\0myprog.awk\0>\0myprog.po\*(FR
-.sp .5
-to generate a \*(FC\&.po\*(FR
-file for your program.
-.sp .5
-5. Provide appropriate translations, and build and install a corresponding
-\*(FC\&.mo\*(FR file.
-.sp .5
-The internationalization features are described in full detail in \*(AM.\*(CB
-.EB "\s+2\f(HBLOCALIZATION (\*(GK\f(HB)\*(FR\s0"
-
-
-.BT
-
-.\" --- User-defined Functions
-.ES
-.fi
-\*(CDFunctions in AWK are defined as follows:
-.sp .5
-.nf
- \*(FCfunction \*(FIname\*(FC(\*(FIparameter list\*(FC)
- {
- \*(FIstatements
- \*(FC}\*(FR
-.sp .5
-.fi
-Functions are executed when they are called from within expressions
-in either patterns or actions. Actual parameters supplied in the function
-call instantiate the formal parameters declared in the function.
-Arrays are passed by reference, other variables are passed by value.
-.sp .5
-Local variables are declared as extra parameters
-in the parameter list. The convention is to separate local variables from
-real parameters by extra spaces in the parameter list. For example:
-.sp .5
-.nf
- \*(FC# a and b are local
- function f(p, q, a, b)
- {
- \&.....
- }
-.sp .3
- /abc/ { ... ; f(1, 2) ; ... }\*(FR
-.fi
-.sp .5
-The left parenthesis in a function call is required
-to immediately follow the function name
-without any intervening white space.
-This is to avoid a syntactic ambiguity with the concatenation operator.
-This restriction does not apply to the built-in functions.
-.sp .5
-Functions may call each other and may be recursive.
-Function parameters used as local variables are initialized
-to the null string and the number zero upon function invocation.
-.sp .5
-\*(CBFunctions may be called indirectly. To do this, assign
-the name of the function to be called, as a string, to a variable.
-Then use the variable as if it were the name of a function, prefixed with
-an ``at'' sign, like so:\*(FC
-.nf
-.sp .5
- function myfunc()
- {
- print "myfunc called"
- }
-.sp .3
- {
- the_func = "myfunc"
- @the_func()
- }
-.fi
-.sp .5
-\*(FR\*(CDUse \*(FCreturn\fP to return a value from a function. The return value
-is undefined if no value is provided, or if the function returns by
-``falling off'' the end.
-.sp .5
-\*(CLThe word
-\*(FCfunc\fP
-may be used in place of
-\*(FCfunction\*(FR.
-\*(CRNote: This usage is deprecated.\*(CX
-.EB "\s+2\f(HBUSER-DEFINED FUNCTIONS\*(FR\s0"
-
-.\" --- Environment Variables
-.ES
-.fi
-\*(CDThe environment variable \*(FCAWKPATH\fP specifies a search path to use
-when finding source files named with the \*(FC\-f\fP
-option.
-The default path is
-\*(FC".:/usr/local/share/awk"\*(FR.
-.\" if this variable does not exist.
-.\" (The actual directory may vary,
-.\" depending upon how \*(GK was built and installed.)
-If a file name given to the \*(FC\-f\fP option contains a ``/'' character,
-no path search is performed.
-.sp .5
-If \*(FCPOSIXLY_CORRECT\fP exists
-.\" in the environment,
-then \*(GK
-behaves exactly as if the \*(FC\-\^\-posix\fP option had been given.\*(CB
-.EB "\s+2\f(HBENVIRONMENT VARIABLES (\*(GK\f(HB)\*(FR\s0"
-
-.BT
-
-.\" --- Historical Features
-.ES
-.fi
-\*(CDIt is possible to call the \*(FClength()\fP
-built-in function not only with no argument, but even without parentheses.
-This feature is marked as ``deprecated'' in the POSIX standard, and \*(GK
-issues a warning about its use if \*(FC\-\^\-lint\fP
-is specified on the command line.
-.sp .5
-The \*(FCcontinue\fP
-and \*(FCbreak\fP statements may be used outside the body of a
-\*(FCwhile\*(FR, \*(FCfor\*(FR, or \*(FCdo\fP loop.
-Historical AWK implementations have treated such usage as
-equivalent to the \*(FCnext\fP statement.
-\*(GK supports this usage if \*(FC\-\^\-traditional\fP
-is specified.\*(CB
-.EB "\s+2\f(HBHISTORICAL FEATURES (\*(GK\f(HB)\*(FR\s0"
-
.\" --- FTP/HTTP Information
.ES
.nf
@@ -1932,8 +1925,8 @@ Host: \*(FCinvisible-island.net\*(FR
File: \*(FC/mawk/mawk.tar.gz\fP
.in +.2i
.fi
-Michael Brennan's \*(MK. Thomas Dickey is now
-maintaining it.\*(CX
+Michael Brennan's \*(MK. Thomas Dickey now
+maintains it.\*(CX
.in -.2i
.EB "\s+2\f(HBFTP/HTTP INFORMATION\*(FR\s0"
diff --git a/doc/bc_notes b/doc/bc_notes
new file mode 100644
index 00000000..b548cec5
--- /dev/null
+++ b/doc/bc_notes
@@ -0,0 +1,323 @@
+Op Codes
+========
+ Op_illegal, /* illegal entry == 0 */
+
+ /* binary operators */
+ Op_times,
+ Op_times_i, all _i operators here are used to optimise arithmetic
+ Op_quotient, by converting push, push , op to just push, op_i
+ Op_quotient_i,
+ Op_mod,
+ Op_mod_i,
+ Op_plus,
+ Op_plus_i,
+ Op_minus,
+ Op_minus_i,
+ Op_exp,
+ Op_exp_i,
+ Op_concat,
+
+ /* line range instruction pairs */
+ Op_line_range, /* flags for Op_cond_pair */
+ Op_cond_pair, /* conditional pair */
+
+ Op_subscript, calculate array subscript
+
+ /* unary operators */
+ Op_preincrement,
+ Op_predecrement,
+ Op_postincrement,
+ Op_postdecrement,
+ Op_unary_minus,
+ Op_field_spec, usage: push #, field_spec -> $#
+
+ /* unary relationals */
+ Op_not,
+
+ /* assignments */
+ Op_assign, simple assign
+ Op_assign_times, *= etc
+ Op_assign_quotient,
+ Op_assign_mod,
+ Op_assign_plus,
+ Op_assign_minus,
+ Op_assign_exp,
+ Op_assign_concat, optimised concatenation
+
+ /* boolean binaries */
+ Op_and, /* a left subexpression in && */
+ Op_and_final, /* right subexpression of && */
+ Op_or,
+ Op_or_final,
+
+ /* binary relationals */
+ Op_equal,
+ Op_notequal,
+ Op_less,
+ Op_greater,
+ Op_leq,
+ Op_geq,
+ Op_match,
+ Op_match_rec, /* match $0 */
+ Op_nomatch,
+
+ Op_rule,
+
+ /* keywords */
+ Op_K_case,
+ Op_K_default,
+ Op_K_break,
+ Op_K_continue,
+ Op_K_print,
+ Op_K_print_rec,
+ Op_K_printf,
+ Op_K_next,
+ Op_K_exit,
+ Op_K_return,
+ Op_K_delete,
+ Op_K_delete_loop,
+ Op_K_getline,
+ Op_K_nextfile,
+
+ Op_builtin,
+ Op_in_array, /* boolean test of membership in array */
+
+ /* function call instruction pairs */
+ Op_func_call,
+
+ Op_push, /* variable */
+ Op_push_i, /* number, string */
+ Op_push_re, /* regex */
+ Op_push_array,
+ Op_push_param,
+ Op_push_lhs, var assignment
+ Op_subscript_lhs, array assignment
+ Op_field_spec_lhs, field assignment
+ Op_no_op, /* jump target */
+ Op_pop, /* pop an item from the runtime stack */
+ Op_jmp,
+ Op_jmp_true,
+ Op_jmp_false,
+ Op_push_loop, /* break (continue) target for loop */
+ Op_pop_loop, end of loop
+ Op_get_record, read next input line
+ Op_newfile, open next input file
+ Op_arrayfor_init, initialise array for loop
+ Op_arrayfor_incr, next in array for loop
+ Op_arrayfor_final, end of array loop
+
+ Op_var_update, /* update value of NR, NF or FNR */
+ Op_var_assign,
+ Op_field_assign,
+
+ Op_ext_func,
+ Op_func,
+
+ Op_exec_count, debugging etc
+ Op_breakpoint,
+ Op_lint,
+ Op_exit, /* end of instructions, contains final exit value */
+
+ /*--------- end proper opcodes -------*/
+
+ /* program structures */
+ Op_K_do,
+ Op_K_for,
+ Op_K_arrayfor,
+ Op_K_while,
+ Op_K_switch,
+ Op_K_if,
+ Op_K_else,
+ Op_K_function,
+ Op_cond_exp,
+ Op_list,
+ Op_case_list,
+
+ /* I/O redirection for print statements */
+ Op_redirect_output,
+ Op_redirect_append,
+ Op_redirect_pipe,
+ Op_redirect_pipein,
+ Op_redirect_input,
+ Op_redirect_twoway,
+
+ Op_final /* sentry value, not legal */
+
+
+INSTRUCTIONs
+============
+
+typedef struct exp_instruction {
+ struct exp_instruction *nexti;
+ union {
+ NODE *dn;
+ struct exp_instruction *di;
+ NODE *(*fptr) P((int));
+ long dl;
+ char *name;
+ } d;
+
+ union {
+ long xl;
+ NODE *xn;
+ void (*aptr) P((void));
+ struct exp_instruction *xi;
+ struct break_point *bpt;
+ } x;
+
+ short source_line;
+ OPCODE opcode;
+} INSTRUCTION;
+
+#define lextok d.name
+#define func_name d.name
+
+#define memory d.dn
+#define builtin d.fptr
+#define builtin_idx d.dl
+
+#define expr_count x.xl
+
+#define target_continue d.di
+#define target_jmp d.di
+#define target_break x.xi
+
+/* Op_rule */
+#define in_rule x.xl
+#define source_file d.name
+
+/* Op_K_case, Op_K_default */
+#define target_stmt x.xi
+
+/* Op_case_list, Op_K_switch */
+#define case_val d.di
+#define case_stmt x.xi
+#define switch_dflt x.xi
+#define switch_body d.di /* pretty printing and profiling */
+
+/* Op_K_exit */
+#define target_exit x.xi
+
+/* Op_exit */
+#define exit_value d.dl
+
+/* Op_K_getline */
+#define into_var x.xl
+
+/* Op_K_getline, Op_K_print, Op_K_print_rec, Op_K_printf */
+#define redir_type d.dl
+
+/* Op_arrayfor_incr */
+#define array_var x.xn
+
+/* Op_line_range */
+#define triggered x.xl
+
+/* Op_cond_pair */
+#define line_range x.xi
+
+/* Op_func_call, Op_func */
+#define func_body x.xn
+
+/* Op_subscript */
+#define sub_count d.dl
+
+/* Op_push_lhs, Op_subscript_lhs, Op_field_spec_lhs */
+#define do_reference x.xl
+
+/* Op_list, Op_rule, Op_func */
+#define lasti d.di
+#define firsti x.xi
+
+/* Op_rule, Op_func */
+#define last_line x.xl
+#define first_line source_line
+
+/* Op_lint */
+#define lint_type d.dl
+
+/* Op_field_spec_lhs */
+#define target_assign d.di
+
+/* Op_field_assign */
+#define field_assign x.aptr
+
+/* Op_concat */
+#define var_concat d.dl
+
+/* Op_breakpoint */
+#define break_pt x.bpt
+
+/*------------------ pretty printing/profiling --------*/
+
+/* Op_exec_count */
+#define exec_count d.dl
+
+/* Op_K_while */
+#define while_body d.di
+
+/* Op_K_do */
+#define doloop_cond d.di
+
+/* Op_K_for */
+#define forloop_cond d.di
+#define forloop_body x.xi
+
+/* Op_K_if */
+#define branch_if d.di
+#define branch_else x.xi
+
+/* Op_K_else */
+#define branch_end x.xi
+
+/* Op_line_range */
+#define condpair_left d.di
+#define condpair_right x.xi
+
+Programs consist of a list of INSTRUCTIONs linked by nexti pointers.
+Each source statement generates a list of INSTRUCTIONs which are then in turn linked to create the program list.
+
+The list for a given source statement is delimited by the lasti (last INSTRUCTION) pointer.
+(The first INSTRUCTION in any rule is identified by the firsti pointer. This is only used in profiling (I think).)
+
+Each INSTRUCTION can be linked to a NODE via the d.dn (memory) pointer.
+
+The BEGIN rule(s) are prepended to the program list and the END rule(s) are appended to complete the program build process.
+
+At run-time, the "virtual machine" walks the program list using the nexti pointers.
+
+The list_xxx functions are used to create and manipulate these INSTRUCTION lists.
+
+list_create creates an INSTRUCTION with opcode Op_list and nexti and lasti pointers pointing to itself (an empty list).
+
+list_append adds a single INSTRUCTION to the end of an existing list and list_prepend does the same at the start of an existing list.
+list_merge adds one list to the end of another (and frees the "header" INSTRUCTION of the added list);
+
+The list_append, list_prepend and list_merge functions reset the nexti and lasti pointers as needed.
+
+
+
+Run-time Stack
+==============
+
+Stack is allocated in eval.c line 1040 with an initial 256 (NODE) entries.
+If this stack fills, additional blocks of 256 entries are added.
+
+The various push operators add NODE entries to the stack for processing by subsequent operators.
+Once a stack variable is used and no longer required, it is popped off and (if temporary) freed.
+Current stack position is in stack_ptr.
+
+Most operators (eg builtin functions) expect all of their "arguments" to be on the stack.
+Some operators (eg Op_plus_i etc) expect one operand on the stack and another in the NODE linked to the
+operator via the d.dn (memory) pointer.
+
+
+Debugger
+========
+The dgawk debugger usage is described in README.DGAWK. I suggest that we make -DBCDEBUG a default setting (or remove the ifdefs)
+so that the dump and trace commands are always available.
+
+dgawk operates in exactly the same way as gawk except that it offers the ability to dump the program list, to step through the program list, to set breakpoints and to view variables etc.
+
+dgawk uses exactly the same "virtual machine" as gawk so the results are identical. The only difference is that dgawk checks to see if any debug action is required before executing each INSTRUCTION.
+
diff --git a/doc/gawk.1 b/doc/gawk.1
index 784dae45..d34dfcac 100644
--- a/doc/gawk.1
+++ b/doc/gawk.1
@@ -3,14 +3,6 @@
.ds AN \s-1ANSI\s+1
.ds GN \s-1GNU\s+1
.ds AK \s-1AWK\s+1
-.de EX
-.nf
-.ft CW
-..
-.de EE
-.ft R
-.fi
-..
.ds EP \fIGAWK: Effective AWK Programming\fP
.if !\n(.g \{\
. if !\w|\*(lq| \{\
@@ -22,7 +14,7 @@
. if \w'\(rq' .ds rq "\(rq
. \}
.\}
-.TH GAWK 1 "Apr 20 2010" "Free Software Foundation" "Utility Commands"
+.TH GAWK 1 "Oct 21 2010" "Free Software Foundation" "Utility Commands"
.SH NAME
gawk \- pattern scanning and processing language
.SH SYNOPSIS
@@ -57,6 +49,14 @@ file .\|.\|.
]
.I program-text
file .\|.\|.
+.sp
+.B dgawk
+[ \*(PX or \*(GN style options ]
+.B \-f
+.I program-file
+[
+.B \-\^\-
+] file .\|.\|.
.SH DESCRIPTION
.I Gawk
is the \*(GN Project's implementation of the \*(AK programming language.
@@ -64,14 +64,25 @@ It conforms to the definition of the language in
the \*(PX 1003.1 Standard.
This version in turn is based on the description in
.IR "The AWK Programming Language" ,
-by Aho, Kernighan, and Weinberger,
-with the additional features found in the System V Release 4 version
-of \*(UX
-.IR awk .
+by Aho, Kernighan, and Weinberger.
.I Gawk
-also provides more recent Bell Laboratories
+provides the additional features found in the current version
+of \*(UX
.I awk
-extensions, and a number of \*(GN-specific extensions.
+and a number of \*(GN-specific extensions.
+.PP
+The command line consists of options to
+.I gawk
+itself, the \*(AK program text (if not supplied via the
+.B \-f
+or
+.B \-\^\-file
+options), and values to be made
+available in the
+.B ARGC
+and
+.B ARGV
+pre-defined \*(AK variables.
.PP
.I Pgawk
is the profiling version of
@@ -86,37 +97,28 @@ See the
.B \-\^\-profile
option, below.
.PP
-The command line consists of options to
-.I gawk
-itself, the \*(AK program text (if not supplied via the
+.I Dgawk
+is an
+.I awk
+debugger. Instead of running the program directly, it loads the
+AWK source code and then prompts for debugging commands.
+Unlike
+.IR gawk " and " pgawk ", " dgawk
+only processes AWK program source provided with the
.B \-f
-or
-.B \-\^\-file
-options), and values to be made
-available in the
-.B ARGC
-and
-.B ARGV
-pre-defined \*(AK variables.
+option.
+The debugger is documented in \*(EP.
.SH OPTION FORMAT
.PP
.I Gawk
-options may be either traditional \*(PX one letter options,
+options may be either traditional \*(PX-style one letter options,
or \*(GN-style long options. \*(PX options start with a single \*(lq\-\*(rq,
while long options start with \*(lq\-\^\-\*(rq.
Long options are provided for both \*(GN-specific features and
for \*(PX-mandated features.
.PP
-Following the \*(PX standard,
-.IR gawk -specific
-options are supplied via arguments to the
-.B \-W
-option. Multiple
-.B \-W
-options may be supplied
-Each
-.B \-W
-option has a corresponding long option, as detailed below.
+.IR Gawk -
+specific options are typically used in long-option form.
Arguments to long options are either joined with the option
by an
.B =
@@ -220,9 +222,6 @@ option overrides this one.
.PD 0
.B \-c
.TP
-.PD 0
-.B \-\^\-compat
-.TP
.PD
.B \-\^\-traditional
Run in
@@ -242,9 +241,6 @@ below, for more information.
.PD 0
.B \-C
.TP
-.PD 0
-.B \-\^\-copyleft
-.TP
.PD
.B \-\^\-copyright
Print the short version of the \*(GN copyright information message on
@@ -325,11 +321,8 @@ files.
.PD 0
.B \-h
.TP
-.PD 0
-.B \-\^\-help
-.TP
.PD
-.B \-\^\-usage
+.B \-\^\-help
Print a relatively short summary of the available options on
the standard output.
(Per the
@@ -337,7 +330,7 @@ the standard output.
these options cause an immediate, successful exit.)
.TP
.PD 0
-.BR "\-l " [ \fIvalue\fR ]
+.BR "\-L " [ \fIvalue\fR ]
.TP
.PD
.BR \-\^\-lint [ =\fIvalue\fR ]
@@ -354,15 +347,6 @@ only warnings about things that are
actually invalid are issued. (This is not fully implemented yet.)
.TP
.PD 0
-.B \-L
-.TP
-.PD
-.B \-\^\-lint\-old
-Provide warnings about constructs that are
-not portable to the original version of Unix
-.IR awk .
-.TP
-.PD 0
.B \-n
.TP
.PD
@@ -493,6 +477,17 @@ Interval expressions were not traditionally available in the
and
.I egrep
consistent with each other.
+They are enabled by default, but this option remains for use with
+.BR \-\^-traditional .
+.TP
+.PD 0
+.B \-R
+.TP
+.PD
+.BI \-\^\-command " file"
+.I Dgawk
+only. Read stored debugger commands from
+.IR file .
.TP
.PD 0
.BI \-S
@@ -502,14 +497,24 @@ consistent with each other.
Runs
.I gawk
in sandbox mode, disabling the
-.B system
+.B system()
function, input redirection with
.BR getline ,
output redirection with
-.BR print "and " printf ,
-and dynamic extensions loading.
+.BR print " and " printf ,
+and loading dynamic extensions.
Command execution (through pipelines) is also disabled.
-This effectively blocks a script from accessing local resources (except for the files specified on the command line).
+This effectively blocks a script from accessing local resources
+(except for the files specified on the command line).
+.TP
+.PD 0
+.B \-t
+.TP
+.PD
+.B \-\^\-lint\-old
+Provide warnings about constructs that are
+not portable to the original version of Unix
+.IR awk .
.TP
.PD 0
.B \-V
@@ -548,6 +553,7 @@ An \*(AK program consists of a sequence of pattern-action statements
and optional function definitions.
.RS
.PP
+\fB@include "\fIfilename\fB"
\fIpattern\fB { \fIaction statements\fB }\fR
.br
\fBfunction \fIname\fB(\fIparameter list\fB) { \fIstatements\fB }\fR
@@ -574,6 +580,11 @@ of \*(AK functions, without having to include them in each new \*(AK
program that uses them. It also provides the ability to mix library
functions with command line programs.
.PP
+In addition, lines beginning with
+.B @include
+may be used to include other source files into your program,
+making library use even easier.
+.PP
The environment variable
.B AWKPATH
specifies a search path to use when finding source files named with
@@ -605,7 +616,8 @@ block(s) (if any),
and then proceeds to read
each file named in the
.B ARGV
-array.
+array (up to
+.BR ARGV[ARGC] ).
If there are no files named on the command line,
.I gawk
reads the standard input.
@@ -631,6 +643,19 @@ is empty (\fB""\fR),
.I gawk
skips over it.
.PP
+For each input file,
+if a
+.B BEGINFILE
+rule exists,
+.I gawk
+executes the associated code
+before processing the contents of the file. Similarly,
+.I gawk
+executes
+the code associated with
+.B ENDFILE
+after processing the file.
+.PP
For each record in the input,
.I gawk
tests to see if it matches any
@@ -876,12 +901,15 @@ a string describing the error.
The value is subject to translation in non-English locales.
.TP
.B FIELDWIDTHS
-A white-space separated list of fieldwidths. When set,
+A whitespace separated list of field widths. When set,
.I gawk
parses the input into fields of fixed width, instead of using the
value of the
.B FS
variable as the field separator.
+See
+.BR Fields ,
+above.
.TP
.B FILENAME
The name of the current input file.
@@ -925,7 +953,9 @@ and string operations. If
has a non-zero value, then string comparisons and
pattern matching in rules,
field splitting with
-.BR FS ,
+.B FS
+and
+.BR FPAT ,
record separating with
.BR RS ,
regular expression
@@ -964,17 +994,6 @@ As with all \*(AK variables, the initial value of
.B IGNORECASE
is zero, so all regular expression and string
operations are normally case-sensitive.
-Under Unix, the full ISO 8859-1 Latin-1 character set is used
-when ignoring case.
-As of
-.I gawk
-3.1.4, the case equivalencies are fully locale-aware, based on
-the C
-.B <ctype.h>
-facilities such as
-.BR isalpha() ,
-and
-.BR toupper() .
.TP
.B LINT
Provides dynamic control of the
@@ -1060,8 +1079,6 @@ system call.
\fBPROCINFO["version"]\fP
the version of
.IR gawk .
-This is available from
-version 3.1.4 and later.
.RE
.TP
.B RS
@@ -1124,7 +1141,7 @@ are associative, i.e. indexed by string values.
The special operator
.B in
may be used to test if an array has an index consisting of a particular
-value.
+value:
.PP
.RS
.ft B
@@ -1189,6 +1206,7 @@ the variable
.B b
has a string value of \fB"12"\fR and not \fB"12.00"\fR.
.PP
+.BR NOTE :
When operating in POSIX mode (such as with the
.B \-\^\-posix
command line option),
@@ -1232,9 +1250,7 @@ should be treated that way.
Uninitialized variables have the numeric value 0 and the string value ""
(the null, or empty, string).
.SS Octal and Hexadecimal Constants
-Starting with version 3.1 of
-.I gawk ,
-you may use C-style octal and hexadecimal constants in your AWK
+You may use C-style octal and hexadecimal constants in your AWK
program source code.
For example, the octal value
.B 011
@@ -1246,7 +1262,7 @@ is equal to decimal 17.
.SS String Constants
.PP
String constants in \*(AK are sequences of characters enclosed
-between double quotes (\fB"\fR). Within strings, certain
+between double quotes (like \fB"value"\fR). Within strings, certain
.I "escape sequences"
are recognized, as in C. These are:
.PP
@@ -1321,12 +1337,14 @@ A missing action is equivalent to
.PP
which prints the entire record.
.PP
-Comments begin with the \*(lq#\*(rq character, and continue until the
+Comments begin with the
+.B #
+character, and continue until the
end of the line.
Blank lines may be used to separate statements.
Normally, a statement ends with a newline, however, this is not the
case for lines ending in
-a \*(lq,\*(rq,
+a comma,
.BR { ,
.BR ? ,
.BR : ,
@@ -1339,7 +1357,7 @@ or
.B else
also have their statements automatically continued on the following line.
In other cases, a line can be continued by ending it with a \*(lq\e\*(rq,
-in which case the newline will be ignored.
+in which case the newline is ignored.
.PP
Multiple statements may
be put on one line by separating them with a \*(lq;\*(rq.
@@ -1408,7 +1426,7 @@ use
.B nextfile
to skip it. If that is not done,
.I gawk
-will produce its usual fatal error for files that cannot be opened.
+produces its usual fatal error for files that cannot be opened.
.PP
For
.BI / "regular expression" /
@@ -1608,7 +1626,7 @@ Characters that are both printable and visible.
is both.)
.TP
.B [:lower:]
-Lower-case alphabetic characters.
+Lowercase alphabetic characters.
.TP
.B [:print:]
Printable characters (characters that are not control characters.)
@@ -1621,7 +1639,7 @@ control characters, or space characters).
Space characters (such as space, tab, and formfeed, to name a few).
.TP
.B [:upper:]
-Upper-case alphabetic characters.
+Uppercase alphabetic characters.
.TP
.B [:xdigit:]
Characters that are hexadecimal digits.
@@ -1729,10 +1747,7 @@ matches a literal
Traditional Unix
.I awk
regular expressions are matched. The \*(GN operators
-are not special, interval expressions are not available, and neither
-are the \*(PX character classes
-.RB ( [[:alnum:]]
-and so on).
+are not special, and interval expressions are not available.
Characters described by octal and hexadecimal escape sequences are
treated literally, even if they represent regular expression metacharacters.
.TP
@@ -1749,20 +1764,6 @@ Action statements consist of the usual assignment, conditional, and looping
statements found in most languages. The operators, control statements,
and input/output statements
available are patterned after those in C.
-.PP
-.I gawk
-accepts an additional control-flow statement not allowed in other
-.I awk
-versions:
-.RS
-.nf
-\fBswitch (\fIexpression\fB) {
-\fBcase \fIvalue\fB|\fIregex\fB : \fIstatement
-\&.\^.\^.
-\fR[ \fBdefault: \fIstatement \fR]
-\fB}\fR
-.fi
-.RE
.SS Operators
.PP
The operators in \*(AK, in order of decreasing precedence, are
@@ -1793,7 +1794,7 @@ Addition and subtraction.
.I space
String concatenation.
.TP
-.B "| |&"
+.B "| |&"
Piped I/O for
.BR getline ,
.BR print ,
@@ -1866,6 +1867,11 @@ as follows:
\fBdelete \fIarray\^\fR
\fBexit\fR [ \fIexpression\fR ]
\fB{ \fIstatements \fB}\fR
+\fBswitch (\fIexpression\fB) {
+\fBcase \fIvalue\fB|\fIregex\fB : \fIstatement
+\&.\^.\^.
+\fR[ \fBdefault: \fIstatement \fR]
+\fB}\fR
.fi
.RE
.SS "I/O Statements"
@@ -1958,13 +1964,13 @@ is reset to 1, and processing starts over with the first pattern in the
block(s), if any, are executed.
.TP
.B print
-Prints the current record.
+Print the current record.
The output record is terminated with the value of the
.B ORS
variable.
.TP
.BI print " expr-list"
-Prints expressions.
+Print expressions.
Each expression is separated by the value of the
.B OFS
variable.
@@ -1973,7 +1979,7 @@ The output record is terminated with the value of the
variable.
.TP
.BI print " expr-list" " >" file
-Prints expressions on
+Print expressions on
.IR file .
Each expression is separated by the value of the
.B OFS
@@ -1983,6 +1989,7 @@ variable.
.TP
.BI printf " fmt, expr-list"
Format and print.
+See \fBThe \fIprintf \fBStatement\fR, below.
.TP
.BI printf " fmt, expr-list" " >" file
Format and print on
@@ -1999,12 +2006,11 @@ Flush any buffers associated with the open output file or pipe
.IR file .
If
.I file
-is missing, then standard output is flushed.
+is missing, then flush standard output.
If
.I file
is the null string,
-then all open output files and pipes
-have their buffers flushed.
+then flush all open output files and pipes.
.PP
Additional output redirections are allowed for
.B print
@@ -2057,7 +2063,7 @@ function
accept the following conversion specification formats:
.TP "\w'\fB%g\fR, \fB%G\fR'u+2n"
.B %c
-An \s-1ASCII\s+1 character.
+A single character.
If the argument used for
.B %c
is numeric, it is treated as a character and printed.
@@ -2221,8 +2227,8 @@ and
formats, it specifies the maximum number
of significant digits. For the
.BR %d ,
-.BR %o ,
.BR %i ,
+.BR %o ,
.BR %u ,
.BR %x ,
and
@@ -2307,7 +2313,7 @@ print "You blew it!" | "cat 1>&2"
.PP
The following special filenames may be used with the
.B |&
-co-process operator for creating TCP/IP network connections.
+co-process operator for creating TCP/IP network connections:
.TP
.PD 0
.BI /inet/tcp/ lport / rhost / rport
@@ -2363,12 +2369,12 @@ Reserved for future use.
.PP
.TP "\w'\fBsrand(\fR[\fIexpr\^\fR]\fB)\fR'u+1n"
.BI atan2( y , " x" )
-Returns the arctangent of
+Return the arctangent of
.I y/x
in radians.
.TP
.BI cos( expr )
-Returns the cosine of
+Return the cosine of
.IR expr ,
which is in radians.
.TP
@@ -2376,19 +2382,19 @@ which is in radians.
The exponential function.
.TP
.BI int( expr )
-Truncates to integer.
+Truncate to integer.
.TP
.BI log( expr )
The natural logarithm function.
.TP
.B rand()
-Returns a random number
+Return a random number
.IR N ,
between 0 and 1,
such that 0 \(<= \fIN\fP < 1.
.TP
.BI sin( expr )
-Returns the sine of
+Return the sine of
.IR expr ,
which is in radians.
.TP
@@ -2396,11 +2402,11 @@ which is in radians.
The square root function.
.TP
\&\fBsrand(\fR[\fIexpr\^\fR]\fB)\fR
-Uses
+Use
.I expr
-as a new seed for the random number generator. If no
+as the new seed for the random number generator. If no
.I expr
-is provided, the time of day is used.
+is provided, use the time of day.
The return value is the previous seed for the random
number generator.
.SS String Functions
@@ -2410,34 +2416,36 @@ has the following built-in string functions:
.PP
.TP "\w'\fBsprintf(\^\fIfmt\fB\^, \fIexpr-list\^\fB)\fR'u+1n"
\fBasort(\fIs \fR[\fB, \fId\fR]\fB)\fR
-Returns the number of elements in the source
+Return the number of elements in the source
array
.IR s .
-The contents of
+Sort
+the contents of
.I s
-are sorted using
+using
.IR gawk\^ "'s"
normal rules for
-comparing values, and the indices of the
-sorted values of
+comparing values, and replace the indices of the
+sorted values
.I s
-are replaced with sequential
+with sequential
integers starting with 1. If the optional
destination array
.I d
is specified, then
+first duplicate
.I s
-is first duplicated into
+into
.IR d ,
-and then
-.I d
-is sorted, leaving the indices of the
+and then sort
+.IR d ,
+leaving the indices of the
source array
.I s
unchanged.
.TP "\w'\fBsprintf(\^\fIfmt\fB\^, \fIexpr-list\^\fB)\fR'u+1n"
\fBasorti(\fIs \fR[\fB, \fId\fR]\fB)\fR
-Returns the number of elements in the source
+Return the number of elements in the source
array
.IR s .
The behavior is the same as that of
@@ -2472,9 +2480,9 @@ is a number indicating which match of
to replace.
If
.I t
-is not supplied,
+is not supplied, use
.B $0
-is used instead.
+instead.
Within the replacement text
.IR s ,
the sequence
@@ -2527,7 +2535,7 @@ and
.BR gensub() .)
.TP
.BI index( s , " t" )
-Returns the index of the string
+Return the index of the string
.I t
in the string
.IR s ,
@@ -2537,26 +2545,25 @@ is not present.
(This implies that character indices start at one.)
.TP
\fBlength(\fR[\fIs\fR]\fB)
-Returns the length of the string
+Return the length of the string
.IR s ,
or the length of
.B $0
if
.I s
is not supplied.
-Starting with version 3.1.5,
-as a non-standard extension, with an array argument,
+As a non-standard extension, with an array argument,
.B length()
returns the number of elements in the array.
.TP
\fBmatch(\fIs\fB, \fIr \fR[\fB, \fIa\fR]\fB)\fR
-Returns the position in
+Return the position in
.I s
where the regular expression
.I r
occurs, or 0 if
.I r
-is not present, and sets the values of
+is not present, and set the values of
.B RSTART
and
.BR RLENGTH .
@@ -2592,7 +2599,7 @@ provide the starting index in the string and length
respectively, of each matching substring.
.TP
\fBpatsplit(\fIs\fB, \fIa \fR[\fB, \fIr\fR [\fB, \fIseps\fR] ]\fB)\fR
-Splits the string
+Split the string
.I s
into the array
.I a
@@ -2600,7 +2607,7 @@ and the separators array
.I seps
on the regular expression
.IR r ,
-and returns the number of fields.
+and return the number of fields.
Element values are the portions of
.I s
that matched
@@ -2620,17 +2627,12 @@ The arrays
and
.I seps
are cleared first.
-.I seps[i]
-is the field separator text between
-.I a[i]
-and
-.IR a[i+1] .
Splitting behaves identically to field splitting with
.BR FPAT ,
described above.
.TP
\fBsplit(\fIs\fB, \fIa \fR[\fB, \fIr\fR [\fB, \fIseps\fR] ]\fB)\fR
-Splits the string
+Split the string
.I s
into the array
.I a
@@ -2638,7 +2640,7 @@ and the separators array
.I seps
on the regular expression
.IR r ,
-and returns the number of fields. If
+and return the number of fields. If
.I r
is omitted,
.B FS
@@ -2677,9 +2679,9 @@ according to
and returns the resulting string.
.TP
.BI strtonum( str )
-Examines
+Examine
.IR str ,
-and returns its numeric value.
+and return its numeric value.
If
.I str
begins
@@ -2700,14 +2702,15 @@ or
assumes that
.I str
is a hexadecimal number.
+Otherwise, decimal is assumed.
.TP
\fBsub(\fIr\fB, \fIs \fR[\fB, \fIt\fR]\fB)\fR
Just like
.BR gsub() ,
-but only the first matching substring is replaced.
+but replace only the first matching substring.
.TP
\fBsubstr(\fIs\fB, \fIi \fR[\fB, \fIn\fR]\fB)\fR
-Returns the at most
+Return the at most
.IR n -character
substring of
.I s
@@ -2715,28 +2718,26 @@ starting at
.IR i .
If
.I n
-is omitted, the rest of
-.I s
-is used.
+is omitted, use the rest of
+.IR s .
.TP
.BI tolower( str )
-Returns a copy of the string
+Return a copy of the string
.IR str ,
-with all the upper-case characters in
+with all the uppercase characters in
.I str
-translated to their corresponding lower-case counterparts.
+translated to their corresponding lowercase counterparts.
Non-alphabetic characters are left unchanged.
.TP
.BI toupper( str )
-Returns a copy of the string
+Return a copy of the string
.IR str ,
-with all the lower-case characters in
+with all the lowercase characters in
.I str
-translated to their corresponding upper-case counterparts.
+translated to their corresponding uppercase counterparts.
Non-alphabetic characters are left unchanged.
.PP
-As of version 3.1.5,
-.I gawk
+.I Gawk
is multibyte aware. This means that
.BR index() ,
.BR length() ,
@@ -2753,10 +2754,11 @@ formatting them.
.PP
.TP "\w'\fBsystime()\fR'u+1n"
\fBmktime(\fIdatespec\fB)\fR
-Turns
+Turn
.I datespec
into a time stamp of the same form as returned by
-.BR systime() .
+.BR systime() ,
+and return the result.
The
.I datespec
is a string of the form
@@ -2767,7 +2769,7 @@ the month from 1 to 12,
the day of the month from 1 to 31,
the hour of the day from 0 to 23,
the minute from 0 to 59,
-and the second from 0 to 60,
+the second from 0 to 60,
and an optional daylight saving flag.
The values of these numbers need not be within the ranges specified;
for example, an hour of \-1 means 1 hour before midnight.
@@ -2789,10 +2791,10 @@ is out of range,
returns \-1.
.TP
\fBstrftime(\fR[\fIformat \fR[\fB, \fItimestamp\fR[\fB, \fIutc-flag\fR]]]\fB)\fR
-Formats
+Format
.I timestamp
according to the specification in
-.IR format.
+.IR format .
If
.I utc-flag
is present and is non-zero or non-null, the result
@@ -2815,12 +2817,11 @@ function in \*(AN C for the format conversions that are
guaranteed to be available.
.TP
.B systime()
-Returns the current time of day as the number of seconds since the Epoch
+Return the current time of day as the number of seconds since the Epoch
(1970-01-01 00:00:00 UTC on \*(PX systems).
.SS Bit Manipulations Functions
-Starting with version 3.1 of
-.IR gawk ,
-the following bit manipulation functions are available.
+.I Gawk
+supplies the following bit manipulation functions.
They work by converting double-precision floating point
values to
.B uintmax_t
@@ -2865,14 +2866,12 @@ and
.IR v2 .
.PP
.SS Internationalization Functions
-Starting with version 3.1 of
-.IR gawk ,
-the following functions may be used from within your AWK program for
+The following functions may be used from within your AWK program for
translating strings at run-time.
For full details, see \*(EP.
.TP
\fBbindtextdomain(\fIdirectory \fR[\fB, \fIdomain\fR]\fB)\fR
-Specifies the directory where
+Specify the directory where
.I gawk
looks for the
.B \&.mo
@@ -2896,10 +2895,9 @@ given
.IR domain .
.TP
\fBdcgettext(\fIstring \fR[\fB, \fIdomain \fR[\fB, \fIcategory\fR]]\fB)\fR
-Returns the translation of
+Return the translation of
.I string
-in
-text domain
+in text domain
.I domain
for locale category
.IR category .
@@ -2921,7 +2919,7 @@ You must also supply a text domain. Use
if you want to use the current domain.
.TP
\fBdcngettext(\fIstring1 \fR, \fIstring2 \fR, \fInumber \fR[\fB, \fIdomain \fR[\fB, \fIcategory\fR]]\fB)\fR
-Returns the plural form used for
+Return the plural form used for
.I number
of the translation of
.I string1
@@ -2980,7 +2978,7 @@ function f(p, q, a, b) # a and b are local
.PP
The left parenthesis in a function call is required
to immediately follow the function name,
-without any intervening white space.
+without any intervening whitespace.
This avoids a syntactic ambiguity with the concatenation operator.
This restriction does not apply to the built-in functions listed above.
.PP
@@ -2998,8 +2996,9 @@ As a
.I gawk
extension, functions may be called indirectly. To do this, assign
the name of the function to be called, as a string, to a variable.
-Then use the variable as if it were the name of a function, prefixed with
-an ``at'' sign, like so:
+Then use the variable as if it were the name of a function, prefixed with an
+.B @
+sign, like so:
.RS
.ft B
.nf
@@ -3031,9 +3030,7 @@ The word
may be used in place of
.BR function .
.SH DYNAMICALLY LOADING NEW FUNCTIONS
-Beginning with version 3.1 of
-.IR gawk ,
-you can dynamically add new built-in functions to the running
+You can dynamically add new built-in functions to the running
.I gawk
interpreter.
The full details are beyond the scope of this manual page;
@@ -3047,16 +3044,12 @@ and invoke
.I function
in that object, to perform initialization.
These should both be provided as strings.
-Returns the value returned by
+Return the value returned by
.IR function .
.PP
-.ft B
-This function is provided and documented in \*(EP,
-but everything about this feature is likely to change
-eventually.
-We STRONGLY recommend that you do not use this feature
-for anything that you aren't willing to redo.
-.ft R
+Using this feature at the C level is not pretty, but
+it is unlikely to go away. Additional mechanisms may
+be added at some point.
.SH SIGNALS
.I pgawk
accepts two signals.
@@ -3071,45 +3064,11 @@ option. It then continues to run.
causes
.I pgawk
to dump the profile and function call stack and then exit.
-.SH EXAMPLES
-.nf
-Print and sort the login names of all users:
-
-.ft B
- BEGIN { FS = ":" }
- { print $1 | "sort" }
-
-.ft R
-Count lines in a file:
-
-.ft B
- { nlines++ }
- END { print nlines }
-
-.ft R
-Precede each line by its number in the file:
-
-.ft B
- { print FNR, $0 }
-
-.ft R
-Concatenate and line number (a variation on a theme):
-
-.ft B
- { print NR, $0 }
-.ft R
-Run an external command for particular lines of data:
-
-.ft B
- tail -f access_log |
- awk '/myhome.html/ { system("nmap " $1 ">> logdir/myhome.html") }'
-.ft R
-.fi
.SH INTERNATIONALIZATION
.PP
String constants are sequences of characters enclosed in double
quotes. In non-English speaking environments, it is possible to mark
-strings in the \*(AK program as requiring translation to the native
+strings in the \*(AK program as requiring translation to the local
natural language. Such strings are marked in the \*(AK program with
a leading underscore (\*(lq_\*(rq). For example,
.sp
@@ -3141,12 +3100,12 @@ Add a
.B BEGIN
action to assign a value to the
.B TEXTDOMAIN
-variable to set the text domain to a name associated with your program.
+variable to set the text domain to a name associated with your program:
.sp
.RS
-.EX
+.ft B
BEGIN { TEXTDOMAIN = "myprog" }
-.EE
+.ft R
.RE
.sp
This allows
@@ -3173,7 +3132,7 @@ functions in your program, as appropriate.
.TP
4.
Run
-.B "gawk \-\^\-gen\-pot \-f myprog.awk > myprog.po"
+.B "gawk \-\^\-gen\-pot \-f myprog.awk > myprog.pot"
to generate a
.B \&.po
file for your program.
@@ -3216,10 +3175,6 @@ option for assigning variables before program execution was added to
accommodate applications that depended upon the old behavior.
(This feature was agreed upon by both the Bell Laboratories and the \*(GN developers.)
.PP
-The
-.B \-W
-option for implementation specific features is from the \*(PX standard.
-.PP
When processing arguments,
.I gawk
uses the special option \*(lq\-\^\-\*(rq to signal the end of
@@ -3284,29 +3239,11 @@ a = length($0)
.ft R
.RE
.PP
-This feature is marked as \*(lqdeprecated\*(rq in the \*(PX standard, and
+Using this feature is poor practice, and
.I gawk
issues a warning about its use if
.B \-\^\-lint
is specified on the command line.
-.PP
-The other feature is the use of either the
-.B continue
-or the
-.B break
-statements outside the body of a
-.BR while ,
-.BR for ,
-or
-.B do
-loop. Traditional \*(AK implementations have treated such usage as
-equivalent to the
-.B next
-statement.
-.I Gawk
-supports this usage if
-.B \-\^\-traditional
-has been specified.
.SH GNU EXTENSIONS
.I Gawk
has a number of extensions to \*(PX
@@ -3337,6 +3274,12 @@ environment variable is not special.
.\" POSIX and language recognition issues
.TP
\(bu
+There is no facility for doing file inclusion
+.RI ( gawk 's
+.B @include
+mechanism).
+.TP
+\(bu
The
.B \ex
escape sequence.
@@ -3416,6 +3359,11 @@ and as the third argument to
.BR split() .
.TP
\(bu
+An optional fourth argument to
+.B split()
+to receive the separator texts.
+.TP
+\(bu
The optional second argument to the
.B close()
function.
@@ -3526,7 +3474,7 @@ was compiled for debugging, it
accepts the following additional options:
.TP
.PD 0
-.B \-Wparsedebug
+.B \-Y
.TP
.PD
.B \-\^\-parsedebug
@@ -3598,35 +3546,10 @@ If
exits because of a fatal error, the exit
status is 2. On non-POSIX systems, this value may be mapped to
.BR EXIT_FAILURE .
-.SH SEE ALSO
-.IR egrep (1),
-.IR getpid (2),
-.IR getppid (2),
-.IR getpgrp (2),
-.IR getuid (2),
-.IR geteuid (2),
-.IR getgid (2),
-.IR getegid (2),
-.IR getgroups (2)
-.PP
-.IR "The AWK Programming Language" ,
-Alfred V. Aho, Brian W. Kernighan, Peter J. Weinberger,
-Addison-Wesley, 1988. ISBN 0-201-07981-X.
-.PP
-\*(EP,
-Edition 3.0, published by the Free Software Foundation, 2001.
-The current version of this document is available online at
-.BR http://www.gnu.org/software/gawk/manual .
-.SH BUGS
-The
-.B \-F
-option is not necessary given the command line variable assignment feature;
-it remains only for backwards compatibility.
-.PP
-Syntactically invalid single character programs tend to overflow
-the parse stack, generating a rather unhelpful message. Such programs
-are surprisingly difficult to diagnose in the completely general case,
-and the effort to do so really is not worth it.
+.SH VERSION INFORMATION
+This man page documents
+.IR gawk ,
+version 4.0.
.SH AUTHORS
The original version of \*(UX
.I awk
@@ -3649,27 +3572,23 @@ compatible with the new version of \*(UX
Arnold Robbins is the current maintainer.
.PP
The initial DOS port was done by Conrad Kwok and Scott Garfinkle.
-Scott Deifik is the current DOS maintainer. Pat Rankin did the
+Scott Deifik maintains the port to MS-Windows using MinGW.
+Pat Rankin did the
port to VMS, and Michal Jaegermann did the port to the Atari ST.
The port to OS/2 was done by Kai Uwe Rommel, with contributions and
help from Darrel Hankerson.
Andreas Buening now maintains the OS/2 port.
-Fred Fish supplied support for the Amiga,
+The late Fred Fish supplied support for the Amiga,
and Martin Brown provided the BeOS port.
Stephen Davies provided the original Tandem port, and
Matthew Woehlke provided changes for Tandem's POSIX-compliant systems.
-.SH Ralf Wildenhues now maintains that port.
.PP
See the
.I README
file in the
.I gawk
-distribution for current information about maintainers
+distribution for up-to-date information about maintainers
and which ports are currently supported.
-VERSION INFORMATION
-This man page documents
-.IR gawk ,
-version 4.0.
.SH BUG REPORTS
If you find a bug in
.IR gawk ,
@@ -3707,12 +3626,79 @@ developers occasionally read this newsgroup, posting bug reports there
is an unreliable way to report bugs. Instead, please use the electronic mail
addresses given above.
.PP
-If you're using a GNU/Linux system or BSD-based system,
+If you're using a GNU/Linux or BSD-based system,
you may wish to submit a bug report to the vendor of your distribution.
That's fine, but please send a copy to the official email address as well,
-since there's no guarantee that the bug will be forwarded to the
+since there's no guarantee that the bug report will be forwarded to the
.I gawk
maintainer.
+.SH BUGS
+The
+.B \-F
+option is not necessary given the command line variable assignment feature;
+it remains only for backwards compatibility.
+.PP
+Syntactically invalid single character programs tend to overflow
+the parse stack, generating a rather unhelpful message. Such programs
+are surprisingly difficult to diagnose in the completely general case,
+and the effort to do so really is not worth it.
+.SH SEE ALSO
+.IR egrep (1),
+.IR getpid (2),
+.IR getppid (2),
+.IR getpgrp (2),
+.IR getuid (2),
+.IR geteuid (2),
+.IR getgid (2),
+.IR getegid (2),
+.IR getgroups (2),
+.IR usleep (3)
+.PP
+.IR "The AWK Programming Language" ,
+Alfred V. Aho, Brian W. Kernighan, Peter J. Weinberger,
+Addison-Wesley, 1988. ISBN 0-201-07981-X.
+.PP
+\*(EP,
+Edition 3.0, shipped with the
+.I gawk
+source.
+The current version of this document is available online at
+.BR http://www.gnu.org/software/gawk/manual .
+.SH EXAMPLES
+.nf
+Print and sort the login names of all users:
+
+.ft B
+ BEGIN { FS = ":" }
+ { print $1 | "sort" }
+
+.ft R
+Count lines in a file:
+
+.ft B
+ { nlines++ }
+ END { print nlines }
+
+.ft R
+Precede each line by its number in the file:
+
+.ft B
+ { print FNR, $0 }
+
+.ft R
+Concatenate and line number (a variation on a theme):
+
+.ft B
+ { print NR, $0 }
+
+.ft R
+Run an external command for particular lines of data:
+
+.ft B
+ tail -f access_log |
+ awk '/myhome.html/ { system("nmap " $1 ">> logdir/myhome.html") }'
+.ft R
+.fi
.SH ACKNOWLEDGEMENTS
Brian Kernighan of Bell Laboratories
provided valuable assistance during testing and debugging.
diff --git a/doc/gawk.info b/doc/gawk.info
index 8b70bd43..d10c3927 100644
--- a/doc/gawk.info
+++ b/doc/gawk.info
@@ -14,7 +14,7 @@ END-INFO-DIR-ENTRY
Foundation, Inc.
- This is Edition 3 of `GAWK: Effective AWK Programming: A User's
+ This is Edition 4 of `GAWK: Effective AWK Programming: A User's
Guide for GNU Awk', for the 3.1.8 (or later) version of the GNU
implementation of AWK.
@@ -46,7 +46,7 @@ particular records in a file and perform operations upon them.
Foundation, Inc.
- This is Edition 3 of `GAWK: Effective AWK Programming: A User's
+ This is Edition 4 of `GAWK: Effective AWK Programming: A User's
Guide for GNU Awk', for the 3.1.8 (or later) version of the GNU
implementation of AWK.
@@ -94,6 +94,7 @@ texts being (a) (see below), and with the Back-Cover Texts being (b)
* Library Functions:: A Library of `awk' Functions.
* Sample Programs:: Many `awk' programs with complete
explanations.
+* Debugger:: The `dgawk' debugger.
* Language History:: The evolution of the `awk'
language.
* Installation:: Installing `gawk' under various
@@ -132,7 +133,7 @@ texts being (a) (see below), and with the Back-Cover Texts being (b)
* Comments:: Adding documentation to `gawk'
programs.
* Quoting:: More discussion of shell quoting issues.
-* DOS Quoting:: Quoting in MS-DOS Batch Files.
+* DOS Quoting:: Quoting in Windows Batch Files.
* Sample Data Files:: Sample data files for use in the
`awk' programs illustrated in this
Info file.
@@ -159,6 +160,7 @@ texts being (a) (see below), and with the Back-Cover Texts being (b)
* Nonconstant Fields:: Nonconstant Field Numbers.
* Changing Fields:: Changing the Contents of a Field.
* Field Separators:: The field separator and how to change it.
+* Default Field Splitting:: How fields are normally separated.
* Regexp Field Splitting:: Using regexps as the field separator.
* Single Character Fields:: Making each character a separate field.
* Command Line Field Separator:: Setting `FS' from the command-line.
@@ -298,16 +300,18 @@ texts being (a) (see below), and with the Back-Cover Texts being (b)
`awk'.
* Multi-scanning:: Scanning multidimensional arrays.
* Array Sorting:: Sorting array values and indices.
+* Arrays of Arrays:: True multidimensional arrays.
* Built-in:: Summarizes the built-in functions.
* Calling Built-in:: How to call built-in functions.
* Numeric Functions:: Functions that work with numbers, including
- `int', `sin' and `rand'.
+ `int()', `sin()' and
+ `rand()'.
* String Functions:: Functions for string manipulation, such as
- `split', `match' and
- `sprintf'.
+ `split()', `match()' and
+ `sprintf()'.
* Gory Details:: More than you want to know about `\'
- and `&' with `sub', `gsub',
- and `gensub'.
+ and `&' with `sub()',
+ `gsub()', and `gensub()'.
* I/O Functions:: Functions for files and shell commands.
* Time Functions:: Functions for dealing with timestamps.
* Bitwise Functions:: Functions for bitwise operations.
@@ -335,7 +339,6 @@ texts being (a) (see below), and with the Back-Cover Texts being (b)
process.
* TCP/IP Networking:: Using `gawk' for network
programming.
-* Portal Files:: Using `gawk' with BSD portals.
* Profiling:: Profiling your `awk' programs.
* Command Line:: How to run `awk'.
* Options:: Command-line options and their meanings.
@@ -343,6 +346,7 @@ texts being (a) (see below), and with the Back-Cover Texts being (b)
* AWKPATH Variable:: Searching directories for `awk'
programs.
* Exit Status:: `gawk''s exit status.
+* Include Files:: Including other files into your program.
* Obsolete:: Obsolete Options and/or features.
* Undocumented:: Undocumented Options and Features.
* Known Bugs:: Known Bugs in `gawk'.
@@ -352,10 +356,10 @@ texts being (a) (see below), and with the Back-Cover Texts being (b)
* Nextfile Function:: Two implementations of a `nextfile'
function.
* Strtonum Function:: A replacement for the built-in
- `strtonum' function.
+ `strtonum()' function.
* Assert Function:: A function for assertions in `awk'
programs.
-* Round Function:: A function for rounding if `sprintf'
+* Round Function:: A function for rounding if `sprintf()'
does not do it correctly.
* Cliff Random Function:: The Cliff Random Number Generator.
* Ordinal Functions:: Functions for using characters as numbers
@@ -399,6 +403,23 @@ texts being (a) (see below), and with the Back-Cover Texts being (b)
files.
* Signature Program:: People do amazing things with too much time
on their hands.
+* Debugging:: Introduction to `dgawk'.
+* Debugging Concepts:: Debugging In General.
+* Debugging Terms:: Additional Debugging Concepts.
+* Awk Debugging:: Awk Debugging.
+* Sample dgawk session:: Sample `dgawk' session.
+* dgawk invocation:: `dgawk' Invocation.
+* Finding The Bug:: Finding The Bug.
+* List of Debugger Commands:: Main `dgawk' Commands.
+* Breakpoint Control:: Control of breakpoints.
+* Dgawk Execution Control:: Control of execution.
+* Viewing And Changing Data:: Viewing and changing data.
+* Dgawk Stack:: Dealing with the stack.
+* Dgawk Info:: Obtaining information about the program and
+ the debugger state.
+* Miscellaneous Dgawk Commands:: Miscellaneous Commands.
+* Readline Support:: Readline Support.
+* Dgawk Limitations:: Limitations and future plans.
* V7/SVR3.1:: The major changes between V7 and System V
Release 3.1.
* SVR4:: Minor changes between System V Releases 3.1
@@ -491,8 +512,8 @@ File: gawk.info, Node: Foreword, Next: Preface, Prev: Top, Up: Top
Foreword
********
-Arnold Robbins and I are good friends. We were introduced 11 years ago
-by circumstances--and our favorite programming language, AWK. The
+Arnold Robbins and I are good friends. We were introduced in 1990 by
+circumstances--and our favorite programming language, AWK. The
circumstances started a couple of years earlier. I was working at a new
job and noticed an unplugged Unix computer sitting in the corner. No
one knew how to use it, and neither did I. However, a couple of days
@@ -581,17 +602,17 @@ Several kinds of tasks occur repeatedly when working with text files.
You might want to extract certain lines and discard the rest. Or you
may need to make changes wherever certain patterns appear, but leave
the rest of the file alone. Writing single-use programs for these
-tasks in languages such as C, C++, or Pascal is time-consuming and
+tasks in languages such as C, C++, or Java is time-consuming and
inconvenient. Such jobs are often easier with `awk'. The `awk'
utility interprets a special-purpose programming language that makes it
easy to handle simple data-reformatting jobs.
The GNU implementation of `awk' is called `gawk'; it is fully
-compatible with the System V Release 4 version of `awk'. `gawk' is
-also compatible with the POSIX specification of the `awk' language.
-This means that all properly written `awk' programs should work with
-`gawk'. Thus, we usually don't distinguish between `gawk' and other
-`awk' implementations.
+compatible with the POSIX(1) specification of the `awk' language and
+with the Unix version of `awk' maintained by Brian Kernighan. This
+means that all properly written `awk' programs should work with `gawk'.
+Thus, we usually don't distinguish between `gawk' and other `awk'
+implementations.
Using `awk' allows you to:
@@ -616,17 +637,19 @@ This means that all properly written `awk' programs should work with
This Info file teaches you about the `awk' language and how you can
use it effectively. You should already be familiar with basic system
-commands, such as `cat' and `ls',(1) as well as basic shell facilities,
+commands, such as `cat' and `ls',(2) as well as basic shell facilities,
such as input/output (I/O) redirection and pipes.
Implementations of the `awk' language are available for many
different computing environments. This Info file, while describing the
`awk' language in general, also describes the particular implementation
of `awk' called `gawk' (which stands for "GNU awk"). `gawk' runs on a
-broad range of Unix systems, ranging from 80386 PC-based computers up
-through large-scale systems, such as Crays. `gawk' has also been ported
-to Mac OS X, MS-DOS, Microsoft Windows (all versions) and OS/2 PCs,
-Atari microcomputers, BeOS, Tandem D20, and VMS.
+broad range of Unix systems, ranging from Intel(R)-architecture
+PC-based computers up through large-scale systems, such as Crays.
+`gawk' has also been ported to Mac OS X, Microsoft Windows (all
+versions) and OS/2 PCs, and VMS. (Other systems to which `gawk' was
+once ported are no longer supported and the code for those systems has
+been removed.)
* Menu:
@@ -643,7 +666,10 @@ Atari microcomputers, BeOS, Tandem D20, and VMS.
---------- Footnotes ----------
- (1) These commands are available on POSIX-compliant systems, as well
+ (1) The 2008 POSIX standard can be found online at
+`http://www.opengroup.org/onlinepubs/9699919799/'.
+
+ (2) These commands are available on POSIX-compliant systems, as well
as on traditional Unix-based systems. If you are using some other
operating system, you still need to be familiar with the ideas of I/O
redirection and pipes.
@@ -671,18 +697,18 @@ of `awk' was written in 1977 at AT&T Bell Laboratories. In 1985, a new
version made the programming language more powerful, introducing
user-defined functions, multiple input streams, and computed regular
expressions. This new version became widely available with Unix System
-V Release 3.1 (SVR3.1). The version in SVR4 added some new features
-and cleaned up the behavior in some of the "dark corners" of the
-language. The specification for `awk' in the POSIX Command Language
-and Utilities standard further clarified the language. Both the `gawk'
-designers and the original Bell Laboratories `awk' designers provided
-feedback for the POSIX specification.
+V Release 3.1 (1987) The version in System V Release 4 (1989) added
+some new features and cleaned up the behavior in some of the "dark
+corners" of the language. The specification for `awk' in the POSIX
+Command Language and Utilities standard further clarified the language.
+Both the `gawk' designers and the original Bell Laboratories `awk'
+designers provided feedback for the POSIX specification.
Paul Rubin wrote the GNU implementation, `gawk', in 1986. Jay
Fenlason completed it, with advice from Richard Stallman. John Woods
contributed parts of the code as well. In 1988 and 1989, David
Trueman, with help from me, thoroughly reworked `gawk' for compatibility
-with the newer `awk'. Circa 1995, I became the primary maintainer.
+with the newer `awk'. Circa 1994, I became the primary maintainer.
Current development focuses on bug fixes, performance improvements,
standards compliance, and occasionally, new features.
@@ -706,20 +732,20 @@ The `awk' language has evolved over the years. Full details are
provided in *note Language History::. The language described in this
Info file is often referred to as "new `awk'" (`nawk').
- Because of this, many systems have multiple versions of `awk'. Some
-systems have an `awk' utility that implements the original version of
-the `awk' language and a `nawk' utility for the new version. Others
+ Because of this, there are systems with multiple versions of `awk'.
+Some systems have an `awk' utility that implements the original version
+of the `awk' language and a `nawk' utility for the new version. Others
have an `oawk' version for the "old `awk'" language and plain `awk' for
the new one. Still others only have one version, which is usually the
new one.(1)
All in all, this makes it difficult for you to know which version of
-`awk' you should run when writing your programs. The best advice I can
-give here is to check your local documentation. Look for `awk', `oawk',
-and `nawk', as well as for `gawk'. It is likely that you already have
-some version of new `awk' on your system, which is what you should use
-when running your programs. (Of course, if you're reading this Info
-file, chances are good that you have `gawk'!)
+`awk' you should run when writing your programs. The best advice we
+can give here is to check your local documentation. Look for `awk',
+`oawk', and `nawk', as well as for `gawk'. It is likely that you
+already have some version of new `awk' on your system, which is what
+you should use when running your programs. (Of course, if you're
+reading this Info file, chances are good that you have `gawk'!)
Throughout this Info file, whenever we refer to a language feature
that should be available in any complete implementation of POSIX `awk',
@@ -739,11 +765,12 @@ Using This Book
The term `awk' refers to a particular program as well as to the
language you use to tell this program what to do. When we need to be
careful, we call the language "the `awk' language," and the program
-"the `awk' utility." This Info file explains both the `awk' language
-and how to run the `awk' utility. The term "`awk' program" refers to a
-program written by you in the `awk' programming language.
+"the `awk' utility." This Info file explains both how to write program
+in the `awk' language and how to run the `awk' utility. The term
+"`awk' program" refers to a program written by you in the `awk'
+programming language.
- Primarily, this Info file explains the features of `awk', as defined
+ Primarily, this Info file explains the features of `awk' as defined
in the POSIX standard. It does so in the context of the `gawk'
implementation. While doing so, it also attempts to describe important
differences between `gawk' and other `awk' implementations.(1) Finally,
@@ -774,7 +801,8 @@ particular the flavors supported by POSIX `awk' and `gawk'.
*note Reading Files::, describes how `awk' reads your data. It
introduces the concepts of records and fields, as well as the `getline'
-command. I/O redirection is first described here.
+command. I/O redirection is first described here. Network I/O is also
+briefly introduced here.
*note Printing::, describes how `awk' programs can produce output
with `print' and `printf'.
@@ -808,14 +836,16 @@ its command-line options, and how it finds `awk' program source files.
sample `awk' programs. Reading them allows you to see `awk' solving
real problems.
+ *note Debugger::, describes the `awk' debugger, `dgawk'.
+
*note Language History::, describes how the `awk' language has
-evolved since first release to present. It also describes how `gawk'
-has acquired features over time.
+evolved since its first release to present. It also describes how
+`gawk' has acquired features over time.
*note Installation::, describes how to get `gawk', how to compile it
-under Unix, and how to compile and use it on different non-Unix
-systems. It also describes how to report bugs in `gawk' and where to
-get three other freely available implementations of `awk'.
+on POSIX-compatible systems, and how to compile and use it on different
+non-POSIX systems. It also describes how to report bugs in `gawk' and
+where to get other freely available `awk' implementations.
*note Notes::, describes how to disable `gawk''s extensions, as well
as how to contribute new code to `gawk', how to write extension
@@ -851,11 +881,11 @@ both the printed and online versions of the documentation. This minor
node briefly documents the typographical conventions used in Texinfo.
Examples you would type at the command-line are preceded by the
-common shell primary and secondary prompts, `$' and `>'. Output from
-the command is preceded by the glyph "-|". This typically represents
-the command's standard output. Error messages, and other output on the
-command's standard error, are preceded by the glyph "error-->". For
-example:
+common shell primary and secondary prompts, `$' and `>'. Input that
+you type is shown `like this'. Output from the command is preceded by
+the glyph "-|". This typically represents the command's standard
+output. Error messages, and other output on the command's standard
+error, are preceded by the glyph "error-->". For example:
$ echo hi on stdout
-| hi on stdout
@@ -876,14 +906,17 @@ Dark Corners
illuminate, there's always a smaller but darker one.
Brian Kernighan
- Until the POSIX standard (and `The Gawk Manual'), many features of
-`awk' were either poorly documented or not documented at all.
-Descriptions of such features (often called "dark corners") are noted
-in this Info file with "(d.c.)". They also appear in the index under
-the heading "dark corner."
+ Until the POSIX standard (and `GAWK: Effective AWK Programming'),
+many features of `awk' were either poorly documented or not documented
+at all. Descriptions of such features (often called "dark corners")
+are noted in this Info file with "(d.c.)". They also appear in the
+index under the heading "dark corner."
As noted by the opening quote, though, any coverage of dark corners
-is, by definition, something that is incomplete.
+is, by definition, incomplete.
+
+ Extensions to the standard `awk' language are marked "(c.e.)," and
+listed in the index under "common extensions" and "extensions, common."

File: gawk.info, Node: Manual History, Next: How To Contribute, Prev: Conventions, Up: Preface
@@ -911,19 +944,18 @@ This Info file may also be read from their web site
Objective-C compilers, a symbolic debugger and dozens of large and
small utilities (such as `gawk'), have all been completed and are
freely available. The GNU operating system kernel (the HURD), has been
-released but is still in an early stage of development.
+released but remains in an early stage of development.
Until the GNU operating system is more fully developed, you should
consider using GNU/Linux, a freely distributable, Unix-like operating
-system for Intel 80386, DEC Alpha, Sun SPARC, IBM S/390, and other
-systems.(2) There are many books on GNU/Linux. One that is freely
-available is `Linux Installation and Getting Started', by Matt Welsh.
-Many GNU/Linux distributions are often available in computer stores or
-bundled on CD-ROMs with books about Linux. (There are three other
-freely available, Unix-like operating systems for 80386 and other
-systems: NetBSD, FreeBSD, and OpenBSD. All are based on the 4.4-Lite
-Berkeley Software Distribution, and they use recent versions of `gawk'
-for their versions of `awk'.)
+system for Intel(R), Power Architecture, Sun SPARC, IBM S/390, and other
+systems.(2) Many GNU/Linux distributions are available for download
+from the Internet.
+
+ (There are numerous other freely available, Unix-like operating
+systems based on the Berkeley Software Distribution, and they use
+recent versions of `gawk' for their versions of `awk'. NetBSD, FreeBSD
+and OpenBSD are three of the most popular ones, but there are others.)
The Info file itself has gone through a number of previous editions.
Paul Rubin wrote the very first draft of `The GAWK Manual'; it was
@@ -937,17 +969,16 @@ it progressed, the FSF published several preliminary versions (numbered
published the first two editions under the title `The GNU Awk User's
Guide'.
- This edition maintains the basic structure of Edition 1.0, but with
-significant additional material, reflecting the host of new features in
-`gawk' version 3.1. Of particular note is *note Array Sorting::, as
-well as *note Bitwise Functions::, *note Internationalization::, and
-also *note Advanced Features::, and *note Dynamic Extensions::.
+ This edition maintains the basic structure of Edition 1.0. For
+Edition 4.0, the content has been thoroughly reviewed and updated. All
+references to versions prior to 4.0 have been removed. Of significant
+note for this edition is *note Debugger::.
`GAWK: Effective AWK Programming' will undoubtedly continue to
evolve. An electronic version comes with the `gawk' distribution from
the FSF. If you find an error in this Info file, please report it!
*Note Bugs::, for information on submitting problem reports
-electronically, or write to me in care of the publisher.
+electronically.
---------- Footnotes ----------
@@ -1004,56 +1035,63 @@ acknowledgments:
better world and for his courage in founding the FSF and starting the
GNU Project.
- The following people (in alphabetical order) provided helpful
-comments on various versions of this book, up to and including this
-edition. Rick Adams, Nelson H.F. Beebe, Karl Berry, Dr. Michael
-Brennan, Rich Burridge, Claire Cloutier, Diane Close, Scott Deifik,
-Christopher ("Topher") Eliot, Jeffrey Friedl, Dr. Darrel Hankerson,
-Michal Jaegermann, Dr. Richard J. LeBlanc, Michael Lijewski, Pat Rankin,
-Miriam Robbins, Mary Sheehan, and Chuck Toporek.
-
- Robert J. Chassell provided much valuable advice on the use of
-Texinfo. He also deserves special thanks for convincing me _not_ to
-title this Info file `How To Gawk Politely'. Karl Berry helped
-significantly with the TeX part of Texinfo.
-
- I would like to thank Marshall and Elaine Hartholz of Seattle and
-Dr. Bert and Rita Schreiber of Detroit for large amounts of quiet
-vacation time in their homes, which allowed me to make significant
-progress on this Info file and on `gawk' itself.
-
- Phil Hughes of SSC contributed in a very important way by loaning me
-his laptop GNU/Linux system, not once, but twice, which allowed me to
-do a lot of work while away from home.
-
- David Trueman deserves special credit; he has done a yeoman job of
-evolving `gawk' so that it performs well and without bugs. Although he
-is no longer involved with `gawk', working with him on this project was
-a significant pleasure.
-
- The intrepid members of the GNITS mailing list, and most notably
-Ulrich Drepper, provided invaluable help and feedback for the design of
-the internationalization features.
-
- Nelson Beebe, Andreas Buening, Antonio Colombo, Scott Deifik, John
-H. DuBois III, Darrel Hankerson, Michal Jaegermann, Ju"rgen Kahrs, Dave
-Pitts, Stepan Kasal, Pat Rankin, Andrew Schorr, Corinna Vinschen,
-Anders Wallin, and Eli Zaretskii (in alphabetical order) make up the
-current `gawk' "crack portability team." Without their hard work and
-help, `gawk' would not be nearly the fine program it is today. It has
-been and continues to be a pleasure working with this team of fine
-people.
-
- David and I would like to thank Brian Kernighan of Bell Laboratories
-for invaluable assistance during the testing and debugging of `gawk',
-and for help in clarifying numerous points about the language. We
+ Earlier editins of this Info file had the following acknowledgements:
+
+ The following people (in alphabetical order) provided helpful
+ comments on various versions of this book, Rick Adams, Nelson H.F.
+ Beebe, Karl Berry, Dr. Michael Brennan, Rich Burridge, Claire
+ Cloutier, Diane Close, Scott Deifik, Christopher ("Topher") Eliot,
+ Jeffrey Friedl, Dr. Darrel Hankerson, Michal Jaegermann, Dr.
+ Richard J. LeBlanc, Michael Lijewski, Pat Rankin, Miriam Robbins,
+ Mary Sheehan, and Chuck Toporek.
+
+ Robert J. Chassell provided much valuable advice on the use of
+ Texinfo. He also deserves special thanks for convincing me _not_
+ to title this Info file `How To Gawk Politely'. Karl Berry helped
+ significantly with the TeX part of Texinfo.
+
+ I would like to thank Marshall and Elaine Hartholz of Seattle and
+ Dr. Bert and Rita Schreiber of Detroit for large amounts of quiet
+ vacation time in their homes, which allowed me to make significant
+ progress on this Info file and on `gawk' itself.
+
+ Phil Hughes of SSC contributed in a very important way by loaning
+ me his laptop GNU/Linux system, not once, but twice, which allowed
+ me to do a lot of work while away from home.
+
+ David Trueman deserves special credit; he has done a yeoman job of
+ evolving `gawk' so that it performs well and without bugs.
+ Although he is no longer involved with `gawk', working with him on
+ this project was a significant pleasure.
+
+ The intrepid members of the GNITS mailing list, and most notably
+ Ulrich Drepper, provided invaluable help and feedback for the
+ design of the internationalization features.
+
+ Chuck Toporek, Mary Sheehan, and Claire Coutier of O'Reilly &
+ Associates contributed significant editorial help for this Info
+ file for the 3.1 release of `gawk'.
+
+ Nelson Beebe, Andreas Buening, Antonio Colombo, Stephen Davies,
+Scott Deifik, John H. DuBois III, Darrel Hankerson, Michal Jaegermann,
+Ju"rgen Kahrs, Dave Pitts, Stepan Kasal, Pat Rankin, Andrew Schorr,
+Corinna Vinschen, Anders Wallin, and Eli Zaretskii (in alphabetical
+order) make up the current `gawk' "crack portability team." Without
+their hard work and help, `gawk' would not be nearly the fine program
+it is today. It has been and continues to be a pleasure working with
+this team of fine people.
+
+ John Haque contributed the modifications to convert `gawk' into a
+byte-code interpreter, including the debugger. Stephen Davies
+contributed to the effort to bring the byte-code changes into the
+mainstream code base.
+
+ I would like to thank Brian Kernighan of Bell Laboratories for
+invaluable assistance during the testing and debugging of `gawk', and
+for ongoing help in clarifying numerous points about the language. We
could not have done nearly as good a job on either `gawk' or its
documentation without his help.
- Chuck Toporek, Mary Sheehan, and Claire Coutier of O'Reilly &
-Associates contributed significant editorial help for this Info file
-for the 3.1 release of `gawk'.
-
I must thank my wonderful wife, Miriam, for her patience through the
many versions of this project, for her proofreading, and for sharing me
with the computer. I would like to thank my parents for their love,
@@ -1066,7 +1104,7 @@ to take advantage of those opportunities.
Arnold Robbins
Nof Ayalon
ISRAEL
-February, 2010
+December, 2010

File: gawk.info, Node: Getting Started, Next: Regexp, Prev: Preface, Up: Top
@@ -1196,8 +1234,8 @@ following command line:
`awk' applies the PROGRAM to the "standard input", which usually means
whatever you type on the terminal. This continues until you indicate
end-of-file by typing `Ctrl-d'. (On other operating systems, the
-end-of-file character may be different. For example, on OS/2 and
-MS-DOS, it is `Ctrl-z'.)
+end-of-file character may be different. For example, on OS/2, it is
+`Ctrl-z'.)
As an example, the following program prints a friendly piece of
advice (from Douglas Adams's `The Hitchhiker's Guide to the Galaxy'),
@@ -1229,7 +1267,7 @@ works is explained shortly).
---------- Footnotes ----------
- (1) If you use `bash' as your shell, you should execute the command
+ (1) If you use Bash as your shell, you should execute the command
`set +H' before running this program interactively, to disable the
`csh'-style command history, which treats `!' as a special character.
We recommend putting this command into your personal startup file.
@@ -1283,9 +1321,9 @@ File: gawk.info, Node: Executable Scripts, Next: Comments, Prev: Long, Up: R
-------------------------------
Once you have learned `awk', you may want to write self-contained `awk'
-scripts, using the `#!' script mechanism. You can do this on many Unix
-systems(1) as well as on the GNU system. For example, you could update
-the file `advice' to look like this:
+scripts, using the `#!' script mechanism. You can do this on many
+systems.(1) For example, you could update the file `advice' to look
+like this:
#! /bin/awk -f
@@ -1327,9 +1365,8 @@ the name of your script (`advice'). Don't rely on the value of
---------- Footnotes ----------
- (1) The `#!' mechanism works on Linux systems, systems derived from
-the 4.4-Lite Berkeley Software Distribution, and most commercial Unix
-systems.
+ (1) The `#!' mechanism works on GNU/Linux systems, BSD-based systems
+and commercial Unix systems.
(2) The line beginning with `#!' lists the full file name of an
interpreter to run and an optional initial command-line argument to
@@ -1401,7 +1438,7 @@ File: gawk.info, Node: Quoting, Prev: Comments, Up: Running gawk
* Menu:
-* DOS Quoting:: Quoting in MS-DOS Batch Files.
+* DOS Quoting:: Quoting in Windows Batch Files.
For short to medium length `awk' programs, it is most convenient to
enter the program on the `awk' command line. This is best done by
@@ -1413,8 +1450,8 @@ writing it as part of a larger shell script:
Once you are working with the shell, it is helpful to have a basic
knowledge of shell quoting rules. The following rules apply only to
-POSIX-compliant, Bourne-style shells (such as `bash', the GNU
-Bourne-Again Shell). If you use `csh', you're on your own.
+POSIX-compliant, Bourne-style shells (such as Bash, the GNU Bourne-Again
+Shell). If you use `csh', you're on your own.
* Quoted items can be concatenated with nonquoted items as well as
with other quoted items. The shell turns everything into one
@@ -1487,10 +1524,11 @@ Judge for yourself which of these two is the more readable.
-| Here is a single quote <'>
This option is also painful, because double quotes, backslashes, and
-dollar signs are very common in `awk' programs.
+dollar signs are very common in more advanced `awk' programs.
- A third option is to use the octal escape sequence equivalents for
-the single- and double-quote characters, like so:
+ A third option is to use the octal escape sequence equivalents
+(*note Escape Sequences::) for the single- and double-quote characters,
+like so:
$ awk 'BEGIN { print "Here is a single quote <\47>" }'
-| Here is a single quote <'>
@@ -1513,14 +1551,14 @@ shell won't be part of the picture, and you can say what you mean.

File: gawk.info, Node: DOS Quoting, Up: Quoting
-1.1.6.1 Quoting in MS-DOS Batch Files
-.....................................
+1.1.6.1 Quoting in Windows Batch Files
+......................................
Although this Info file generally only worries about POSIX systems and
the POSIX shell, the following issue arises often enough for many users
that it is worth addressing.
- Systems providing an MS-DOS compatible "shell" use the double-quote
+ The "shell" on Microsoft Windows systems use the double-quote
character for quoting, and make it difficult or impossible to include an
escaped double-quote character in a command-line script. The following
example, courtesy of Jeroen Brink, shows how to print all lines in a
@@ -1697,7 +1735,7 @@ different ways to do the same things shown here:
* Print the total number of kilobytes used by FILES:
ls -l FILES | awk '{ x += $5 }
- END { print "total K-bytes: " (x + 1023)/1024 }'
+ END { print "total K-bytes:", x /1024 }'
* Print a sorted list of the login names of all users:
@@ -1778,14 +1816,14 @@ summarize, select, and rearrange the output of another utility. It uses
features that haven't been covered yet, so don't worry if you don't
understand all the details:
- ls -l | awk '$6 == "Nov" { sum += $5 }
- END { print sum }'
+ LC_ALL=C ls -l | awk '$6 == "Nov" { sum += $5 }
+ END { print sum }'
This command prints the total number of bytes in all the files in the
current directory that were last modified in November (of any year).
-(1) The `ls -l' part of this example is a system command that gives you
-a listing of the files in a directory, including each file's size and
-the date the file was last modified. Its output looks like this:
+The `ls -l' part of this example is a system command that gives you a
+listing of the files in a directory, including each file's size and the
+date the file was last modified. Its output looks like this:
-rw-r--r-- 1 arnold user 1933 Nov 7 13:05 Makefile
-rw-r--r-- 1 arnold user 10809 Nov 7 13:03 awk.h
@@ -1802,7 +1840,7 @@ identifies the owner of the file. The fourth field identifies the group
of the file. The fifth field contains the size of the file in bytes.
The sixth, seventh, and eighth fields contain the month, day, and time,
respectively, that the file was last modified. Finally, the ninth field
-contains the name of the file.(2)
+contains the file name.(1)
The `$6 == "Nov"' in our `awk' program is an expression that tests
whether the sixth field of the output from `ls -l' matches the string
@@ -1826,16 +1864,8 @@ reports.
---------- Footnotes ----------
- (1) In the C shell (`csh'), you need to type a semicolon and then a
-backslash at the end of the first line; see *note Statements/Lines::,
-for an explanation. In a POSIX-compliant shell, such as the Bourne
-shell or `bash', you can type the example as shown. If the command
-`echo $path' produces an empty output line, you are most likely using a
-POSIX-compliant shell. Otherwise, you are probably using the C shell
-or a shell derived from it.
-
- (2) On some very old systems, you may need to use `ls -lg' to get
-this output.
+ (1) The `LC_ALL=C' is needed to produce traditional-style output
+from `ls'.

File: gawk.info, Node: Statements/Lines, Next: Other Features, Prev: More Complex, Up: Getting Started
@@ -1867,24 +1897,24 @@ example:
awk '/This regular expression is too long, so continue it\
on the next line/ { print $1 }'
-We have generally not used backslash continuation in the sample programs
-in this Info file. In `gawk', there is no limit on the length of a
-line, so backslash continuation is never strictly necessary; it just
-makes programs more readable. For this same reason, as well as for
-clarity, we have kept most statements short in the sample programs
-presented throughout the Info file. Backslash continuation is most
-useful when your `awk' program is in a separate source file instead of
-entered from the command line. You should also note that many `awk'
-implementations are more particular about where you may use backslash
-continuation. For example, they may not allow you to split a string
-constant using backslash continuation. Thus, for maximum portability
-of your `awk' programs, it is best not to split your lines in the
-middle of a regular expression or a string.
+We have generally not used backslash continuation in our sample
+programs. `gawk' places no limit on the length of a line, so backslash
+continuation is never strictly necessary; it just makes programs more
+readable. For this same reason, as well as for clarity, we have kept
+most statements short in the sample programs presented throughout the
+Info file. Backslash continuation is most useful when your `awk'
+program is in a separate source file instead of entered from the
+command line. You should also note that many `awk' implementations are
+more particular about where you may use backslash continuation. For
+example, they may not allow you to split a string constant using
+backslash continuation. Thus, for maximum portability of your `awk'
+programs, it is best not to split your lines in the middle of a regular
+expression or a string.
*Caution:* _Backslash continuation does not work as described with
the C shell._ It works for `awk' programs in files and for one-shot
programs, _provided_ you are using a POSIX-compliant shell, such as the
-Unix Bourne shell or `bash'. But the C shell behaves differently!
+Unix Bourne shell or Bash. But the C shell behaves differently!
There, you must use two backslashes in a row, followed by a newline.
Note also that when using the C shell, _every_ newline in your awk
program must be escaped with a backslash. To illustrate:
@@ -1961,10 +1991,10 @@ There are other variables your program can set as well to control how
In addition, `awk' provides a number of built-in functions for doing
common computational and string-related operations. `gawk' provides
built-in functions for working with timestamps, performing bit
-manipulation, and for runtime string translation.
+manipulation, for runtime string translation, and array sorting.
As we develop our presentation of the `awk' language, we introduce
-most of the variables and many of the functions. They are defined
+most of the variables and many of the functions. They are described
systematically in *note Built-in Variables::, and *note Built-in::.

@@ -1983,7 +2013,7 @@ programs like `ls'. (*Note More Complex::.)
Programs written with `awk' are usually much smaller than they would
be in other languages. This makes `awk' programs easy to compose and
-use. Often, `awk' programs can be quickly composed at your terminal,
+use. Often, `awk' programs can be quickly composed at your keyboard,
used once, and thrown away. Because `awk' programs are interpreted, you
can avoid the (usually lengthy) compilation part of the typical
edit-compile-test-debug cycle of software development.
@@ -1991,12 +2021,10 @@ edit-compile-test-debug cycle of software development.
Complex programs have been written in `awk', including a complete
retargetable assembler for eight-bit microprocessors (*note Glossary::,
for more information), and a microcode assembler for a special-purpose
-Prolog computer. More recently, `gawk' was used for writing a a Wiki
-clone (http://www.awk-scripting.de/cgi-bin/wiki.cgi/yawk/). While the
-original `awk''s capabilities were strained by tasks of such
-complexity, modern versions are more capable. Even the Bell Labs
-version of `awk' has fewer predefined limits, and those that it has are
-much larger than they used to be.
+Prolog computer. While the original `awk''s capabilities were strained
+by tasks of such complexity, modern versions are more capable. Even
+the Bell Labs version of `awk' has fewer predefined limits, and those
+that it has are much larger than they used to be.
If you find yourself writing `awk' scripts of more than, say, a few
hundred lines, you might consider using a different programming
@@ -2059,13 +2087,12 @@ it:
-| 555-6480
-| 555-2127
- `~' (tilde), `~' operator Regular expressions can also be used in
-matching expressions. These expressions allow you to specify the
-string to match against; it need not be the entire current input
-record. The two operators `~' and `!~' perform regular expression
-comparisons. Expressions using these operators can be used as
-patterns, or in `if', `while', `for', and `do' statements. (*Note
-Statements::.) For example:
+ Regular expressions can also be used in matching expressions. These
+expressions allow you to specify the string to match against; it need
+not be the entire current input record. The two operators `~' and `!~'
+perform regular expression comparisons. Expressions using these
+operators can be used as patterns, or in `if', `while', `for', and `do'
+statements. (*Note Statements::.) For example:
EXP ~ /REGEXP/
@@ -2167,20 +2194,20 @@ apply to both string constants and regexp constants:
The hexadecimal value HH, where HH stands for a sequence of
hexadecimal digits (`0'-`9', and either `A'-`F' or `a'-`f'). Like
the same construct in ISO C, the escape sequence continues until
- the first nonhexadecimal digit is seen. However, using more than
- two hexadecimal digits produces undefined results. (The `\x'
- escape sequence is not allowed in POSIX `awk'.)
+ the first nonhexadecimal digit is seen. (c.e.) However, using
+ more than two hexadecimal digits produces undefined results. (The
+ `\x' escape sequence is not allowed in POSIX `awk'.)
`\/'
A literal slash (necessary for regexp constants only). This
- expression is used when you want to write a regexp constant that
+ sequence is used when you want to write a regexp constant that
contains a slash. Because the regexp is delimited by slashes, you
need to escape the slash that is part of the pattern, in order to
tell `awk' to keep processing the rest of the regexp.
`\"'
A literal double quote (necessary for string constants only).
- This expression is used when you want to write a string constant
+ This sequence is used when you want to write a string constant
that contains a double quote. Because the string is delimited by
double quotes, you need to escape the quote that is part of the
string, in order to tell `awk' to keep processing the rest of the
@@ -2224,8 +2251,8 @@ Strip the backslash out
is the same as `"aqc"'. (Because this is such an easy bug both to
introduce and to miss, `gawk' warns you about it.) Consider `FS =
"[ \t]+\|[ \t]+"' to use vertical bars surrounded by whitespace as
- the field separator. There should be two backslashes in the string
- `FS = "[ \t]+\\|[ \t]+"'.)
+ the field separator. There should be two backslashes in the
+ string: `FS = "[ \t]+\\|[ \t]+"'.)
Leave the backslash alone
Some other `awk' implementations do this. In such
@@ -2288,7 +2315,7 @@ sequences and that are not listed in the table stand for themselves:
if ("line1\nLINE 2" ~ /1$/) ...
-`.'
+`. (period)'
This matches any single character, _including_ the newline
character. For example, `.P' matches any single character
followed by a `P' in a string. Using concatenation, we can make a
@@ -2386,10 +2413,10 @@ sequences and that are not listed in the table stand for themselves:
Initially, because old programs may use `{' and `}' in regexp
constants, `gawk' did _not_ match interval expressions in regexps.
- However, beginning with version 3.2 *(FIXME: version)* `gawk' does
- match interval expressions by default. This is because
- compatibility with POSIX has become more important to most `gawk'
- users than compatibility with old programs.
+ However, beginning with version 4.0, `gawk' does match interval
+ expressions by default. This is because compatibility with POSIX
+ has become more important to most `gawk' users than compatibility
+ with old programs.
For programs that use `{' and `}' in regexp constants, it is good
practice to always escape them with a backslash. Then the regexp
@@ -2406,9 +2433,8 @@ themselves when there is nothing in the regexp that precedes them. For
example, `/+/' matches a literal plus sign. However, many other
versions of `awk' treat such a usage as a syntax error.
- If `gawk' is in compatibility mode (*note Options::), POSIX
-character classes and interval expressions are not available in regular
-expressions.
+ If `gawk' is in compatibility mode (*note Options::), interval
+expressions are not available in regular expressions.
---------- Footnotes ----------
@@ -2428,13 +2454,12 @@ File: gawk.info, Node: Character Lists, Next: GNU Regexp Operators, Prev: Reg
Within a character list, a "range expression" consists of two
characters separated by a hyphen. It matches any single character that
sorts between the two characters, using the locale's collating sequence
-and character set. For example, in the default C locale, `[a-dx-z]' is
-equivalent to `[abcdxyz]'. Many locales sort characters in dictionary
-order, and in these locales, `[a-dx-z]' is typically not equivalent to
-`[abcdxyz]'; instead it might be equivalent to `[aBbCcDdxXyYz]', for
-example. To obtain the traditional interpretation of bracket
-expressions, you can use the C locale by setting the `LC_ALL'
-environment variable to the value `C'.
+and character set. For example, `[0-9]' is equivalent to
+`[0123456789]'.
+
+ Unfortunately, providing simple character ranges such as `[a-z]'
+usually does not work like you might expect, due to locale-related
+issues. This is discussed more fully, in *note Locales::.
To include one of the characters `\', `]', `-', or `^' in a
character list, put a `\' in front of it. For example:
@@ -2449,9 +2474,9 @@ expressions in `awk' are a superset of the POSIX specification for
Extended Regular Expressions (EREs). POSIX EREs are based on the
regular expressions accepted by the traditional `egrep' utility.
- "Character classes" are a new feature introduced in the POSIX
-standard. A character class is a special notation for describing lists
-of characters that have a specific attribute, but the actual characters
+ "Character classes" are a feature introduced in the POSIX standard.
+A character class is a special notation for describing lists of
+characters that have a specific attribute, but the actual characters
can vary from country to country and/or from character set to character
set. For example, the notion of what is an alphabetic character
differs between the United States and France.
@@ -2600,11 +2625,11 @@ No options
`--traditional'
Traditional Unix `awk' regexps are matched. The GNU operators are
- not special, interval expressions are not available, nor are the
- POSIX character classes (`[[:alnum:]]', etc.). Characters
- described by octal and hexadecimal escape sequences are treated
- literally, even if they represent regexp metacharacters. Also,
- `gawk' silently skips directories named on the command line.
+ not special, and interval expressions are not available. The
+ POSIX character classes (`[[:alnum:]]', etc.) are supported, as
+ modern Unix `awk' does support them. Characters described by
+ octal and hexadecimal escape sequences are treated literally, even
+ if they represent regexp metacharacters.
`--re-interval'
Allow interval expressions in regexps, if `--traditional' has been
@@ -2629,7 +2654,7 @@ read. There are two alternatives that you might prefer.
One way to perform a case-insensitive match at a particular point in
the program is to convert the data to a single case, using the
-`tolower' or `toupper' built-in string functions (which we haven't
+`tolower()' or `toupper()' built-in string functions (which we haven't
discussed yet; *note String Functions::). For example:
tolower($1) ~ /foo/ { ... }
@@ -2655,7 +2680,7 @@ zero:
case-insensitive and other rules case-sensitive, because there is no
straightforward way to set `IGNORECASE' just for the pattern of a
particular rule.(1) To do this, use either character lists or
-`tolower'. However, one thing you can do with `IGNORECASE' only is
+`tolower()'. However, one thing you can do with `IGNORECASE' only is
dynamically turn case-sensitivity on or off for all the rules at once.
`IGNORECASE' can be set on the command line or in a `BEGIN' rule
@@ -2663,20 +2688,15 @@ dynamically turn case-sensitivity on or off for all the rules at once.
`IGNORECASE' from the command line is a way to make a program
case-insensitive without having to edit it.
- Prior to `gawk' 3.0, the value of `IGNORECASE' affected regexp
-operations only. It did not affect string comparison with `==', `!=',
-and so on. Beginning with version 3.0, both regexp and string
-comparison operations are also affected by `IGNORECASE'.
+ Both regexp and string comparison operations are affected by
+`IGNORECASE'.
- Beginning with `gawk' 3.0, the equivalences between upper- and
-lowercase characters are based on the ISO-8859-1 (ISO Latin-1)
-character set. This character set is a superset of the traditional 128
-ASCII characters, which also provides a number of characters suitable
-for use with European languages.
-
- As of `gawk' 3.1.4, the case equivalences are fully locale-aware.
-They are based on the C `<ctype.h>' facilities, such as `isalpha()' and
-`toupper()'.
+ In multibyte locales, the equivalences between upper- and lowercase
+characters are tested based on the wide-character values of the
+locale's character set. Otherwise, the characters are tested based on
+the ISO-8859-1 (ISO Latin-1) character set. This character set is a
+superset of the traditional 128 ASCII characters, which also provides a
+number of characters suitable for use with European languages.(2)
The value of `IGNORECASE' has no effect if `gawk' is in
compatibility mode (*note Options::). Case is always significant in
@@ -2689,6 +2709,9 @@ using something like `IGNORECASE = 1 && /foObAr/ { ... }' and
`IGNORECASE = 0 || /foobar/ { ... }'. However, this is somewhat
obscure and we don't recommend it.
+ (2) If you don't understand this, don't worry about it; it just
+means that `gawk' does the right thing.
+

File: gawk.info, Node: Leftmost Longest, Next: Computed Regexps, Prev: Case-sensitivity, Up: Regexp
@@ -2699,9 +2722,9 @@ Consider the following:
echo aaaabcd | awk '{ sub(/a+/, "<A>"); print }'
- This example uses the `sub' function (which we haven't discussed yet;
-*note String Functions::) to make a change to the input record. Here,
-the regexp `/a+/' indicates "one or more `a' characters," and the
+ This example uses the `sub()' function (which we haven't discussed
+yet; *note String Functions::) to make a change to the input record.
+Here, the regexp `/a+/' indicates "one or more `a' characters," and the
replacement text is `<A>'.
The input contains four `a' characters. `awk' (and POSIX) regular
@@ -2713,11 +2736,11 @@ with `<A>' in this example:
-| <A>bcd
For simple match/no-match tests, this is not so important. But when
-doing text matching and substitutions with the `match', `sub', `gsub',
-and `gensub' functions, it is very important. *Note String Functions::,
-for more information on these functions. Understanding this principle
-is also important for regexp-based record and field splitting (*note
-Records::, and also *note Field Separators::).
+doing text matching and substitutions with the `match()', `sub()',
+`gsub()', and `gensub()' functions, it is very important. *Note String
+Functions::, for more information on these functions. Understanding
+this principle is also important for regexp-based record and field
+splitting (*note Records::, and also *note Field Separators::).

File: gawk.info, Node: Computed Regexps, Next: Locales, Prev: Leftmost Longest, Up: Regexp
@@ -2737,15 +2760,15 @@ that is computed in this way is called a "dynamic regexp":
This sets `digits_regexp' to a regexp that describes one or more digits,
and tests whether the input record matches this regexp.
- *Caution:* When using the `~' and `!~' operators, there is a
-difference between a regexp constant enclosed in slashes and a string
-constant enclosed in double quotes. If you are going to use a string
-constant, you have to understand that the string is, in essence,
-scanned _twice_: the first time when `awk' reads your program, and the
-second time when it goes to match the string on the lefthand side of
-the operator with the pattern on the right. This is true of any
-string-valued expression (such as `digits_regexp', shown previously),
-not just string constants.
+ NOTE: When using the `~' and `!~' operators, there is a difference
+ between a regexp constant enclosed in slashes and a string
+ constant enclosed in double quotes. If you are going to use a
+ string constant, you have to understand that the string is, in
+ essence, scanned _twice_: the first time when `awk' reads your
+ program, and the second time when it goes to match the string on
+ the lefthand side of the operator with the pattern on the right.
+ This is true of any string-valued expression (such as
+ `digits_regexp', shown previously), not just string constants.
What difference does it make if the string is scanned twice? The
answer has to do with escape sequences, and particularly with
@@ -2807,12 +2830,27 @@ File: gawk.info, Node: Locales, Prev: Computed Regexps, Up: Regexp
Modern systems support the notion of "locales": a way to tell the
system about the local character set and language. The current locale
setting can affect the way regexp matching works, often in surprising
-ways. In particular, many locales do case-insensitive matching, even
-when you may have specified characters of only one particular case.
+ways.
+
+ For example, in the default C locale, `[a-dx-z]' is equivalent to
+`[abcdxyz]'. Many locales sort characters in dictionary order, and in
+these locales, `[a-dx-z]' is typically not equivalent to `[abcdxyz]';
+instead it might be equivalent to `[aBbCcdXxYyz]', for example.
+
+ This point needs to be emphasized: Much literature teaches that one
+should use `[a-z]' to match a lower case character. But on systems with
+non-ASCII locales, this also matches all of the upper case characters
+except `Z'! This is a continuous cause of confusion, even well into
+the twenty-first century.
- The following example uses the `sub' function, which does text
-replacement (*note String Functions::). Here, the intent is to remove
-trailing uppercase characters:
+ To obtain the traditional interpretation of bracket expressions, you
+can use the C locale by setting the `LC_ALL' environment variable to the
+value `C'. However, it is best to just use POSIX character classes,
+such as `[[:lower:]]' to match specific classes of characters.
+
+ To demonstrate these issues, the following example uses the `sub()'
+function, which does text replacement (*note String Functions::). Here,
+the intent is to remove trailing uppercase characters:
$ echo something1234abc | gawk '{ sub("[A-Z]*$", ""); print }'
-| something1234
@@ -2839,11 +2877,12 @@ such as `en_US.UTF-8'. (In general, such ranges should be avoided;
either list the characters individually, or use a POSIX character class
such as `[[:punct:]]'.)
- For the normal case of `RS = "\n"', the locale is largely irrelevant.
-For other single-character record separators, using `LC_ALL=C' will
-give you much better performance when reading records. Otherwise,
-`gawk' has to make several function calls, _per input character_ to
-find the record terminator.
+ An additional factor relates to splitting recoreds. For the normal
+case of `RS = "\n"', the locale is largely irrelevant. For other
+single-character record separators, using `LC_ALL=C' will give you much
+better performance when reading records. Otherwise, `gawk' has to make
+several function calls, _per input character_ to find the record
+terminator.
Finally, the locale affects the value of the decimal point character
used when `gawk' parses input data. This is discussed in detail in
@@ -2855,7 +2894,7 @@ File: gawk.info, Node: Reading Files, Next: Printing, Prev: Regexp, Up: Top
3 Reading Input Files
*********************
-In the typical `awk' program, all input is read either from the
+In the typical `awk' program, `awk' reads all input either from the
standard input (by default, this is the keyboard, but often it is a
pipe from another command) or from files whose names you specify on the
`awk' command line. If you specify input files, `awk' reads them in
@@ -2900,9 +2939,9 @@ The `awk' utility divides the input for your `awk' program into records
and fields. `awk' keeps track of the number of records that have been
read so far from the current input file. This value is stored in a
built-in variable called `FNR'. It is reset to zero when a new file is
-started. Another built-in variable, `NR', is the total number of input
-records read so far from all data files. It starts at zero, but is
-never automatically reset to zero.
+started. Another built-in variable, `NR', records the total number of
+input records read so far from all data files. It starts at zero, but
+is never automatically reset to zero.
Records are separated by a character called the "record separator".
By default, the record separator is the newline character. This is why
@@ -3003,16 +3042,18 @@ currently being processed, as well as records already processed, are not
affected.
After the end of the record has been determined, `gawk' sets the
-variable `RT' to the text in the input that matched `RS'. When using
-`gawk', the value of `RS' is not limited to a one-character string. It
-can be any regular expression (*note Regexp::). In general, each record
-ends at the next string that matches the regular expression; the next
-record starts at the end of the matching string. This general rule is
-actually at work in the usual case, where `RS' contains just a newline:
-a record ends at the beginning of the next matching string (the next
-newline in the input), and the following record starts just after the
-end of this string (at the first character of the following line). The
-newline, because it matches `RS', is not part of either record.
+variable `RT' to the text in the input that matched `RS'.
+
+ When using `gawk', the value of `RS' is not limited to a
+one-character string. It can be any regular expression (*note
+Regexp::). In general, each record ends at the next string that
+matches the regular expression; the next record starts at the end of
+the matching string. This general rule is actually at work in the
+usual case, where `RS' contains just a newline: a record ends at the
+beginning of the next matching string (the next newline in the input),
+and the following record starts just after the end of this string (at
+the first character of the following line). The newline, because it
+matches `RS', is not part of either record.
When `RS' is a single character, `RT' contains the same single
character. However, when `RS' is a regular expression, `RT' contains
@@ -3096,9 +3137,9 @@ File: gawk.info, Node: Fields, Next: Nonconstant Fields, Prev: Records, Up:
====================
When `awk' reads an input record, the record is automatically "parsed"
-or separated by the interpreter into chunks called "fields". By
+or separated by the `awk' utility into chunks called "fields". By
default, fields are separated by "whitespace", like words in a line.
-Whitespace in `awk' means any string of one or more spaces, tabs, or
+Whitespace in `awk' means any string of one or more spaces, TABs, or
newlines;(1) other characters, such as formfeed, vertical tab, etc.
that are considered whitespace by other languages, are _not_ considered
whitespace by `awk'.
@@ -3313,9 +3354,8 @@ The intervening field, `$5', is created with an empty value (indicated
by the second pair of adjacent colons), and `NF' is updated with the
value six.
- *FIXME:* Verify that this is in POSIX. Decrementing `NF' throws
-away the values of the fields after the new value of `NF' and
-recomputes `$0'. (d.c.) Here is an example:
+ Decrementing `NF' throws away the values of the fields after the new
+value of `NF' and recomputes `$0'. (d.c.) Here is an example:
$ echo a b c d e f | awk '{ print "NF =", NF;
> NF = 3; print $0 }'
@@ -3338,8 +3378,8 @@ as we've shown here.
There is a flip side to the relationship between `$0' and the
fields. Any assignment to `$0' causes the record to be reparsed into
fields using the _current_ value of `FS'. This also applies to any
-built-in function that updates `$0', such as `sub' and `gsub' (*note
-String Functions::).
+built-in function that updates `$0', such as `sub()' and `gsub()'
+(*note String Functions::).

File: gawk.info, Node: Field Separators, Next: Constant Size, Prev: Changing Fields, Up: Reading Files
@@ -3349,6 +3389,7 @@ File: gawk.info, Node: Field Separators, Next: Constant Size, Prev: Changing
* Menu:
+* Default Field Splitting:: How fields are normally separated.
* Regexp Field Splitting:: Using regexps as the field separator.
* Single Character Fields:: Making each character a separate field.
* Command Line Field Separator:: Setting `FS' from the command-line.
@@ -3372,7 +3413,7 @@ leading spaces in the values of the second and third fields.
The field separator is represented by the built-in variable `FS'.
Shell programmers take note: `awk' does _not_ use the name `IFS' that
is used by the POSIX-compliant shells (such as the Unix Bourne shell,
-`sh', or `bash').
+`sh', or Bash).
The value of `FS' can be changed in the `awk' program with the
assignment operator, `=' (*note Assignment Ops::). Often the right
@@ -3404,7 +3445,13 @@ characters carefully to prevent such problems. (If the data is not in
a form that is easy to process, perhaps you can massage it first with a
separate `awk' program.)
- Fields are normally separated by whitespace sequences (spaces, TABs,
+
+File: gawk.info, Node: Default Field Splitting, Next: Regexp Field Splitting, Up: Field Separators
+
+3.5.1 Whitespace Normally Separates Fields
+------------------------------------------
+
+Fields are normally separated by whitespace sequences (spaces, TABs,
and newlines), not by single spaces. Two spaces in a row do not
delimit an empty field. The default value of the field separator `FS'
is a string containing a single space, `" "'. If `awk' interpreted
@@ -3422,9 +3469,9 @@ space character is the only single character that does not follow these
rules.

-File: gawk.info, Node: Regexp Field Splitting, Next: Single Character Fields, Up: Field Separators
+File: gawk.info, Node: Regexp Field Splitting, Next: Single Character Fields, Prev: Default Field Splitting, Up: Field Separators
-3.5.1 Using Regular Expressions to Separate Fields
+3.5.2 Using Regular Expressions to Separate Fields
--------------------------------------------------
The previous node discussed the use of single characters or simple
@@ -3489,30 +3536,22 @@ versions answer this question differently, and you should not rely on
any specific behavior in your programs. (d.c.)
As a point of information, the Bell Labs `awk' allows `^' to match
-only at the beginning of the record. Versions of `gawk' after 3.1.6
-also work this way. For example:
-
- $ echo 'xxAA xxBxx C' |
- > nawk -F '(^x+)|( +)' '{ for (i = 1; i <= NF; i++) printf "-->%s<--\n", $i }'
- -| --><--
- -| -->AA<--
- -| -->xxBxx<--
- -| -->C<--
+only at the beginning of the record. `gawk' also works this way. For
+example:
- $ echo 'xxAA xxBxx C' |
- > gawk-3.1.6 -F '(^x+)|( +)' '{ for (i = 1; i <= NF; i++) printf "-->%s<--\n", $i }'
+ $ echo 'xxAA xxBxx C' |
+ > gawk -F '(^x+)|( +)' '{ for (i = 1; i <= NF; i++)
+ > printf "-->%s<--\n", $i }'
-| --><--
-| -->AA<--
-| --><--
-| -->Bxx<--
-| -->C<--
-As mentioned, `gawk' now behaves like the Bell Labs `awk'.
-

File: gawk.info, Node: Single Character Fields, Next: Command Line Field Separator, Prev: Regexp Field Splitting, Up: Field Separators
-3.5.2 Making Each Character a Separate Field
+3.5.3 Making Each Character a Separate Field
--------------------------------------------
There are times when you may want to examine each character of a record
@@ -3538,7 +3577,7 @@ way.

File: gawk.info, Node: Command Line Field Separator, Next: Field Splitting Summary, Prev: Single Character Fields, Up: Field Separators
-3.5.3 Setting `FS' from the Command Line
+3.5.4 Setting `FS' from the Command Line
----------------------------------------
`FS' can be set on the command line. Use the `-F' option to do so.
@@ -3625,7 +3664,7 @@ the entries for users who have no password:

File: gawk.info, Node: Field Splitting Summary, Prev: Command Line Field Separator, Up: Field Separators
-3.5.4 Field-Splitting Summary
+3.5.5 Field-Splitting Summary
-----------------------------
It is important to remember that when you assign a string constant as
@@ -3719,18 +3758,18 @@ File: gawk.info, Node: Constant Size, Next: Splitting By Content, Prev: Field
(This minor node discusses an advanced feature of `awk'. If you are a
novice `awk' user, you might want to skip it on the first reading.)
-`gawk' version 2.13 introduced a facility for dealing with fixed-width
-fields with no distinctive field separator. For example, data of this
-nature arises in the input for old Fortran programs where numbers are
-run together, or in the output of programs that did not anticipate the
-use of their output as input for other programs.
+`gawk' provides a facility for dealing with fixed-width fields with no
+distinctive field separator. For example, data of this nature arises
+in the input for old Fortran programs where numbers are run together,
+or in the output of programs that did not anticipate the use of their
+output as input for other programs.
An example of the latter is a table where all the columns are lined
up by the use of a variable number of spaces and _empty fields are just
spaces_. Clearly, `awk''s normal field splitting based on `FS' does
not work well in this case. Although a portable `awk' program can use
-a series of `substr' calls on `$0' (*note String Functions::), this is
-awkward and inefficient for a large number of fields.
+a series of `substr()' calls on `$0' (*note String Functions::), this
+is awkward and inefficient for a large number of fields.
The splitting of an input record into fixed-width fields is
specified by assigning a string containing space-separated numbers to
@@ -3825,11 +3864,11 @@ novice `awk' user, you might want to skip it on the first reading.)
Normally, when using `FS', `gawk' defines the fields as the parts of
the record that occur in between each field separator. In other words,
-`FS' defines what a field _is not_, and not what a field _is_.
+`FS' defines what a field _is not_, instead of what a field _is_.
However, there are times when you really want to define the fields by
what they are, and not by what they are not.
- The most notorious such case is so-called Comma-Separated-Value
+ The most notorious such case is so-called "comma separated value"
(CSV) data. Many spreadsheet programs, for example, can export their
data into text files, where each record is terminated with a newline,
and fields are separated by commas. If only commas separated the data,
@@ -3898,6 +3937,15 @@ affects field splitting with `FPAT'.
provides an elegant solution for the majority of cases, and the
`gawk' maintainer is satisfied with that.
+ As written, the regexp used for `FPATH' requires that each field
+have a least one character. A straightforward modification (changing
+changed the first `+' to `*') allows fields to be empty:
+
+ FPAT = "([^,]*)|(\"[^\"]+\")"
+
+ Finally, the `patsplit()' function makes the same functionality
+available for splitting regular strings (*note String Functions::).
+
---------- Footnotes ----------
(1) At least, we don't know of one.
@@ -3955,7 +4003,7 @@ field separations result from `FS'.(1)
provide useful behavior in the default case (i.e., `FS' is equal to
`" "'). This feature can be a problem if you really don't want the
newline character to separate fields, because there is no way to
-prevent it. However, you can work around this by using the `split'
+prevent it. However, you can work around this by using the `split()'
function to break up the record manually (*note String Functions::).
If you have a single character field separator, you can work around the
special feature in a different way, by making `FS' into a regexp for
@@ -4068,8 +4116,8 @@ describing the error that occurred.
In the following examples, COMMAND stands for a string value that
represents a shell command.
- NOTE: When `--sandbox' is specified, reading lines from files,
- pipes and coprocesses is disabled.
+ NOTE: When `--sandbox' is specified (*note Options::), reading
+ lines from files, pipes and coprocesses is disabled.
* Menu:
@@ -4115,7 +4163,7 @@ processing on the next record _right now_. For example:
u = index($0, "*/")
offset = 0
}
- # substr expression will be "" if */
+ # substr() expression will be "" if */
# occurred at end of line
$0 = tmp substr($0, offset + u + 2)
}
@@ -4211,7 +4259,7 @@ EXPRESSION contains unparenthesized operators other than `$'; for
example, `getline < dir "/" file' is ambiguous because the
concatenation operator is not parenthesized. You should write it as
`getline < (dir "/" file)' if you want your program to be portable to
-other `awk' implementations.
+all `awk' implementations.

File: gawk.info, Node: Getline/Variable/File, Next: Getline/Pipe, Prev: Getline/File, Up: Getline
@@ -4243,7 +4291,7 @@ file FILENAME:
program; it is taken directly from the data, specifically from the
second field on the `@include' line.
- The `close' function is called to ensure that if two identical
+ The `close()' function is called to ensure that if two identical
`@include' lines appear in the input, the entire specified file is
included twice. *Note Close Files And Pipes::.
@@ -4273,7 +4321,7 @@ produced by running the rest of the line as a shell command:
{
if ($1 == "@execute") {
- tmp = substr($0, 10)
+ tmp = substr($0, 10) # Remove "@execute"
while ((tmp | getline) > 0)
print
close(tmp)
@@ -4281,7 +4329,7 @@ produced by running the rest of the line as a shell command:
print
}
-The `close' function is called to ensure that if two identical
+The `close()' function is called to ensure that if two identical
`@execute' lines appear in the input, the command is run for each one.
*Note Close Files And Pipes::. Given the input:
@@ -4314,16 +4362,15 @@ EXPRESSION contains unparenthesized operators other than `$'--for
example, `"echo " "date" | getline' is ambiguous because the
concatenation operator is not parenthesized. You should write it as
`("echo " "date") | getline' if you want your program to be portable to
-other `awk' implementations.
+all `awk' implementations.
NOTE: Unfortunately, `gawk' has not been consistent in its
- treatment of a construct like `"echo " "date" | getline'. Up to
- and including version 3.1.1 of `gawk', it was treated as `("echo "
- "date") | getline'. (This how Unix `awk' behaves.) From 3.1.2
- through 3.1.5, it was treated as `"echo " ("date" | getline)'.
- (This is how `mawk' behaves.) Starting with version 3.1.6, the
- earlier behavior was reinstated. In short, _always_ use explicit
- parentheses, and then you won't have to worry.
+ treatment of a construct like `"echo " "date" | getline'. Most
+ versions, including the current version, treat it at as `("echo "
+ "date") | getline'. (This how Unix `awk' behaves.) Some versions
+ changed and treated it as `"echo " ("date" | getline)'. (This is
+ how `mawk' behaves.) In short, _always_ use explicit parentheses,
+ and then you won't have to worry.

File: gawk.info, Node: Getline/Variable/Pipe, Next: Getline/Coprocess, Prev: Getline/Pipe, Up: Getline
@@ -4434,6 +4481,12 @@ in mind:
probably by accident, and you should reconsider what it is you're
trying to accomplish.
+ * *note Getline Summary::, presents a table summarizing the
+ `getline' variants and which variables they can affect. It is
+ worth noting that those variants which do not use redirection can
+ cause `FILENAME' to be updated if they cause `awk' to start
+ reading a new input file.
+

File: gawk.info, Node: Getline Summary, Prev: Getline Notes, Up: Getline
@@ -4443,16 +4496,19 @@ File: gawk.info, Node: Getline Summary, Prev: Getline Notes, Up: Getline
*note table-getline-variants:: summarizes the eight variants of
`getline', listing which built-in variables are set by each one.
-Variant Effect
+Variant Effect Standad /
+ Extenstion
--------------------------------------------------------------------------
-`getline' Sets `$0', `NF', `FNR', and `NR'
-`getline' VAR Sets VAR, `FNR', and `NR'
-`getline <' FILE Sets `$0' and `NF'
-`getline VAR < FILE' Sets VAR
-COMMAND `| getline' Sets `$0' and `NF'
-COMMAND `| getline' VAR Sets VAR
-COMMAND `|& getline' Sets `$0' and `NF'. This is a `gawk' extension
-COMMAND `|& getline' VAR Sets VAR. This is a `gawk' extension
+`getline' Sets `$0', `NF', `FNR', and Standard
+ `NR'
+`getline' VAR Sets VAR, `FNR', and `NR' Standard
+`getline <' FILE Sets `$0' and `NF' Standard
+`getline VAR < FILE' Sets VAR Standard
+COMMAND `| getline' Sets `$0' and `NF' Standard
+COMMAND `| getline' VAR Sets VAR Standard
+COMMAND `|& getline' Sets `$0' and `NF' Extension
+COMMAND `|& getline' Sets VAR Extension
+VAR
Table 3.1: getline Variants and What They Set
@@ -4462,10 +4518,7 @@ File: gawk.info, Node: BEGINFILE/ENDFILE, Next: Command line directories, Pre
3.10 The `BEGINFILE' and `ENDFILE' Special Patterns
===================================================
-*FIXME:* Get the version right.
-
- NOTE: This minor node describes a `gawk'-specific feature added in
- `gawk' 3.X.
+ NOTE: This minor node describes a `gawk'-specific feature.
Two special kinds of rule, `BEGINFILE' and `ENDFILE', give you
"hooks" into `gawk''s command-line file processing loop. As with the
@@ -4489,7 +4542,7 @@ would otherwise be difficult or impossible to perform:
string; if so, then `gawk' was not able to open the file. In this
case, your program can execute the `nextfile' statement (*note
Nextfile Statement::). This casuses `gawk' to skip the file
- entirely. Otherwise, `gawk' will exit with the usual fatal error.
+ entirely. Otherwise, `gawk' exits with the usual fatal error.
2. If you have written extensions that modify the record handling (by
inserting an "open hook"), you can invoke them at this point,
@@ -4498,17 +4551,19 @@ would otherwise be difficult or impossible to perform:
(http://xgawk.sourceforge.net).)
The `ENDFILE' rule is called when `gawk' has finished processing the
-last record in an input file. It will be called before any `END' rules.
+last record in an input file. For the last input file, it will be
+called before any `END' rules.
- Normally, when an error occurs when reading input in the normal
-input processing loop, the error is fatal. However, if an `ENDFILE'
-rule is present, the error becomes non-fatal, and instead `ERRNO' is
-set. This makes it possible to catch and process I/O errors at the
-level of the `awk' program.
+ Normally, when an error occurs when reading input in the normal input
+processing loop, the error is fatal. However, if an `ENDFILE' rule is
+present, the error becomes non-fatal, and instead `ERRNO' is set. This
+makes it possible to catch and process I/O errors at the level of the
+`awk' program.
- The `next' statement is not allowed inside either a `BEGINFILE' or
-and `ENDFILE' rule. The `nextfile' statement is allowed only inside a
-`BEGINFILE' rule, but not inside an `ENDFILE' rule.
+ The `next' statement (*note Next Statement::) is not allowed inside
+either a `BEGINFILE' or and `ENDFILE' rule. The `nextfile' statement
+(*note Nextfile Statement::) is allowed only inside a `BEGINFILE' rule,
+but not inside an `ENDFILE' rule.
The `getline' statement (*note Getline::) is restricted inside both
`BEGINFILE' and `ENDFILE'. Only the `getline VARIABLE < FILE' form is
@@ -4524,15 +4579,15 @@ File: gawk.info, Node: Command line directories, Prev: BEGINFILE/ENDFILE, Up:
3.11 Directories On The Command Line
====================================
-According to POSIX, files named on the `awk' command line must be text
-files. The behavior is "undefined" if they are not. Most versions of
-`awk' treat a directory on the command line as a fatal error.
+According to the POSIX standard, files named on the `awk' command line
+must be text files. It is a fatal error if they are not. Most
+versions of `awk' treat a directory on the command line as a fatal
+error.
- *FIXME:* Get the version right. Starting with version 3.x of
-`gawk', a directory on the command line produces a warning, but is
-otherwise skipped. If either of the `--posix' or `--traditional'
-options is given, then `gawk' reverts to treating directories on the
-command line as a fatal error.
+ By default, `gawk' produces a warning for a directory on the command
+line, but otherwise ignores it. If either of the `--posix' or
+`--traditional' options is given, then `gawk' reverts to treating a
+directory on the command line as a fatal error.

File: gawk.info, Node: Printing, Next: Expressions, Prev: Reading Files, Up: Top
@@ -4552,7 +4607,7 @@ statement (*note Printf::).
Besides basic and formatted printing, this major node also covers
I/O redirections to files and pipes, introduces the special file names
-that `gawk' processes internally, and discusses the `close' built-in
+that `gawk' processes internally, and discusses the `close()' built-in
function.
* Menu:
@@ -4575,7 +4630,7 @@ File: gawk.info, Node: Print, Next: Print Examples, Up: Printing
4.1 The `print' Statement
=========================
-The `print' statement is used to produce output with simple,
+The `print' statement is used for producing output with simple,
standardized formatting. Specify only the strings or numbers to print,
in a list separated by commas. They are output, separated by single
spaces, followed by a newline. The statement looks like this:
@@ -4584,8 +4639,8 @@ spaces, followed by a newline. The statement looks like this:
The entire list of items may be optionally enclosed in parentheses. The
parentheses are necessary if any of the item expressions uses the `>'
-relational operator; otherwise it could be confused with a redirection
-(*note Redirection::).
+relational operator; otherwise it could be confused with an output
+redirection (*note Redirection::).
The items to print can be constant strings or numbers, fields of the
current record (such as `$1'), variables, or any `awk' expression.
@@ -4602,12 +4657,12 @@ that a space is printed between any two items.

File: gawk.info, Node: Print Examples, Next: Output Separators, Prev: Print, Up: Printing
-4.2 Examples of `print' Statements
-==================================
+4.2 `print' Statement Examples
+==============================
Each `print' statement makes at least one line of output. However, it
-isn't limited to only one line. If an item value is a string that
-contains a newline, the newline is output along with the rest of the
+isn't limited to only one line. If an item value is a string
+containing a newline, the newline is output along with the rest of the
string. A single `print' statement can make any number of lines this
way.
@@ -4718,7 +4773,7 @@ semicolon, with a blank line added after each newline:
...
If the value of `ORS' does not contain a newline, the program's
-output is run together on a single line.
+output runs together on a single line.

File: gawk.info, Node: OFMT, Next: Printf, Prev: Output Separators, Up: Printing
@@ -4726,21 +4781,21 @@ File: gawk.info, Node: OFMT, Next: Printf, Prev: Output Separators, Up: Prin
4.4 Controlling Numeric Output with `print'
===========================================
-When the `print' statement is used to print numeric values, `awk'
+When printing numeric values with the `print' statement, `awk'
internally converts the number to a string of characters and prints
-that string. `awk' uses the `sprintf' function to do this conversion
+that string. `awk' uses the `sprintf()' function to do this conversion
(*note String Functions::). For now, it suffices to say that the
-`sprintf' function accepts a "format specification" that tells it how
+`sprintf()' function accepts a "format specification" that tells it how
to format numbers (or strings), and that there are a number of
different ways in which numbers can be formatted. The different format
specifications are discussed more fully in *note Control Letters::.
The built-in variable `OFMT' contains the default format
-specification that `print' uses with `sprintf' when it wants to convert
-a number to a string for printing. The default value of `OFMT' is
-`"%.6g"'. The way `print' prints numbers can be changed by supplying
-different format specifications as the value of `OFMT', as shown in the
-following example:
+specification that `print' uses with `sprintf()' when it wants to
+convert a number to a string for printing. The default value of `OFMT'
+is `"%.6g"'. The way `print' prints numbers can be changed by
+supplying different format specifications as the value of `OFMT', as
+shown in the following example:
$ awk 'BEGIN {
> OFMT = "%.0f" # print numbers as integers (rounds)
@@ -4757,13 +4812,13 @@ File: gawk.info, Node: Printf, Next: Redirection, Prev: OFMT, Up: Printing
4.5 Using `printf' Statements for Fancier Printing
==================================================
-For more precise control over the output format than what is normally
-provided by `print', use `printf'. `printf' can be used to specify the
-width to use for each item, as well as various formatting choices for
-numbers (such as what output base to use, whether to print an exponent,
-whether to print a sign, and how many digits to print after the decimal
-point). This is done by supplying a string, called the "format
-string", that controls how and where to print the other arguments.
+For more precise control over the output format than what is provided
+by `print', use `printf'. With `printf' you can specify the width to
+use for each item, as well as various formatting choices for numbers
+(such as what output base to use, whether to print an exponent, whether
+to print a sign, and how many digits to print after the decimal point).
+You do this by supplying a string, called the "format string", that
+controls how and where to print the other arguments.
* Menu:
@@ -4784,8 +4839,8 @@ A simple `printf' statement looks like this:
The entire list of arguments may optionally be enclosed in parentheses.
The parentheses are necessary if any of the item expressions use the `>'
-relational operator; otherwise, it can be confused with a redirection
-(*note Redirection::).
+relational operator; otherwise, it can be confused with an output
+redirection (*note Redirection::).
The difference between `printf' and `print' is the FORMAT argument.
This is an expression whose value is taken as a string; it specifies
@@ -4811,7 +4866,7 @@ statements. For example:
> }'
-| Dont Panic!
-Here, neither the `+' nor the `OUCH' appear when the message is printed.
+Here, neither the `+' nor the `OUCH' appear in the output message.

File: gawk.info, Node: Control Letters, Next: Format Modifiers, Prev: Basic Printf, Up: Printf
@@ -4827,28 +4882,28 @@ print. The rest of the format specifier is made up of optional
width. Here is a list of the format-control letters:
`%c'
- This prints a number as an ASCII character; thus, `printf "%c",
- 65' outputs the letter `A'. (The output for a string value is the
- first character of the string.)
-
- NOTE: The `%c' format does _not_ handle values outside the
- range 0-255. On most systems, values from 0-127 are within
- the range of ASCII and will yield an ASCII character. Values
- in the range 128-255 may format as characters in some
- extended character set, or they may not. System 390 (IBM
- architecture mainframe) systems use 8-bit characters, and
- thus values from 0-255 yield the corresponding EBCDIC
- character. Any value above 255 is treated as modulo 255;
- i.e., the lowest eight bits of the value are used. The
- locale and character set are always ignored.
+ Print a number as an ASCII character; thus, `printf "%c", 65'
+ outputs the letter `A'. The output for a string value is the first
+ character of the string.
+
+ NOTE: The POSIX standard says the first character of a string
+ is printed. In locales with multibyte characters, `gawk'
+ attempts to convert the leading bytes of the string into a
+ valid wide character and then to print the multibyte encoding
+ of that character. Similarly, when printing a numeric value,
+ `gawk' allows the value to be within the numeric range of
+ values that can be held in a wide character.
+
+ Other `awk' versions generally restrict themselves to printing
+ the first byte of a string or to numeric values within the
+ range of a single byte (0-255).
`%d, %i'
- These are equivalent; they both print a decimal integer. (The
- `%i' specification is for compatibility with ISO C.)
+ Print a decimal integer. The two control letters are equivalent.
+ (The `%i' specification is for compatibility with ISO C.)
`%e, %E'
- These print a number in scientific (exponential) notation; for
- example:
+ Print a number in scientific (exponential) notation; for example:
printf "%4.3e\n", 1950
@@ -4858,7 +4913,7 @@ width. Here is a list of the format-control letters:
of `e' in the output.
`%f'
- This prints a number in floating-point notation. For example:
+ Print a number in floating-point notation. For example:
printf "%4.3f", 1950
@@ -4879,30 +4934,28 @@ width. Here is a list of the format-control letters:
support it. On those that don't, `gawk' uses `%f' instead.
`%g, %G'
- These print a number in either scientific notation or in
- floating-point notation, whichever uses fewer characters; if the
- result is printed in scientific notation, `%G' uses `E' instead of
- `e'.
+ Print a number in either scientific notation or in floating-point
+ notation, whichever uses fewer characters; if the result is
+ printed in scientific notation, `%G' uses `E' instead of `e'.
`%o'
- This prints an unsigned octal integer.
+ Print an unsigned octal integer.
`%s'
- This prints a string.
+ Print a string.
`%u'
- This prints an unsigned decimal integer. (This format is of
- marginal use, because all numbers in `awk' are floating-point; it
- is provided primarily for compatibility with C.)
+ Print an unsigned decimal integer. (This format is of marginal
+ use, because all numbers in `awk' are floating-point; it is
+ provided primarily for compatibility with C.)
`%x, %X'
- These print an unsigned hexadecimal integer; `%X' uses the letters
- `A' through `F' instead of `a' through `f'.
+ Print an unsigned hexadecimal integer; `%X' uses the letters `A'
+ through `F' instead of `a' through `f'.
`%%'
- This isn't a format-control letter, but it does have meaning--the
- sequence `%%' outputs one `%'; it does not consume an argument and
- it ignores any modifiers.
+ Print a single `%'. This does not consume an argument and it
+ ignores any modifiers.
NOTE: When using the integer format-control letters for values
that are outside the range of the widest C integer type, `gawk'
@@ -4966,7 +5019,7 @@ which they may appear:
`#'
Use an "alternate form" for certain control letters. For `%o',
supply a leading zero. For `%x' and `%X', supply a leading `0x'
- or `0X' for a nonzero result. For `%e', `%E', and `%f', the
+ or `0X' for a nonzero result. For `%e', `%E', `%f', and `%F', the
result always contains a decimal point. For `%g' and `%G',
trailing zeros are not removed from the result.
@@ -5024,15 +5077,15 @@ which they may appear:
to use when printing. The meaning of the precision varies by
control letter:
- `%e', `%E', `%f'
+ `%d', `%i', `%o', `%u', `%x', `%X'
+ Minimum number of digits to print.
+
+ `%e', `%E', `%f', `%F'
Number of digits to the right of the decimal point.
`%g', `%G'
Maximum number of significant digits.
- `%d', `%i', `%o', `%u', `%x', `%X'
- Minimum number of digits to print.
-
`%s'
Maximum number of characters from the string that should
print.
@@ -5072,10 +5125,9 @@ This is not particularly easy to read but it does work.
C programmers may be used to supplying additional `l', `L', and `h'
modifiers in `printf' format strings. These are not valid in `awk'.
-Most `awk' implementations silently ignore these modifiers. If
-`--lint' is provided on the command line (*note Options::), `gawk'
-warns about their use. If `--posix' is supplied, their use is a fatal
-error.
+Most `awk' implementations silently ignore them. If `--lint' is
+provided on the command line (*note Options::), `gawk' warns about
+their use. If `--posix' is supplied, their use is a fatal error.

File: gawk.info, Node: Printf Examples, Prev: Format Modifiers, Up: Printf
@@ -5083,7 +5135,7 @@ File: gawk.info, Node: Printf Examples, Prev: Format Modifiers, Up: Printf
4.5.4 Examples Using `printf'
-----------------------------
-The following is a simple example of how to use `printf' to make an
+The following simple example shows how to use `printf' to make an
aligned table:
awk '{ printf "%-10s %s\n", $1, $2 }' BBS-list
@@ -5124,7 +5176,7 @@ beginning of the `awk' program:
print "---- ------" }
{ printf "%-10s %s\n", $1, $2 }' BBS-list
- The above example mixed `print' and `printf' statements in the same
+ The above example mixes `print' and `printf' statements in the same
program. Using just `printf' statements can produce the same results:
awk 'BEGIN { printf "%-10s %s\n", "Name", "Number"
@@ -5155,11 +5207,11 @@ File: gawk.info, Node: Redirection, Next: Special Files, Prev: Printf, Up: P
==============================================
So far, the output from `print' and `printf' has gone to the standard
-output, usually the terminal. Both `print' and `printf' can also send
+output, usually the screen. Both `print' and `printf' can also send
their output to other places. This is called "redirection".
- NOTE: When `--sandbox' is specified, redirecting output to files
- and pipes is disabled.
+ NOTE: When `--sandbox' is specified (*note Options::), redirecting
+ output to files and pipes is disabled.
A redirection appears after the `print' or `printf' statement.
Redirections in `awk' are written just like redirections in shell
@@ -5171,10 +5223,10 @@ to a coprocess. They are all shown for the `print' statement, but they
work identically for `printf':
`print ITEMS > OUTPUT-FILE'
- This type of redirection prints the items into the output file
- named OUTPUT-FILE. The file name OUTPUT-FILE can be any
- expression. Its value is changed to a string and then used as a
- file name (*note Expressions::).
+ This redirection prints the items into the output file named
+ OUTPUT-FILE. The file name OUTPUT-FILE can be any expression.
+ Its value is changed to a string and then used as a file name
+ (*note Expressions::).
When this type of redirection is used, the OUTPUT-FILE is erased
before the first output is written to it. Subsequent writes to
@@ -5199,17 +5251,17 @@ work identically for `printf':
Each output file contains one name or number per line.
`print ITEMS >> OUTPUT-FILE'
- This type of redirection prints the items into the pre-existing
- output file named OUTPUT-FILE. The difference between this and the
- single-`>' redirection is that the old contents (if any) of
- OUTPUT-FILE are not erased. Instead, the `awk' output is appended
- to the file. If OUTPUT-FILE does not exist, then it is created.
+ This redirection prints the items into the pre-existing output file
+ named OUTPUT-FILE. The difference between this and the single-`>'
+ redirection is that the old contents (if any) of OUTPUT-FILE are
+ not erased. Instead, the `awk' output is appended to the file.
+ If OUTPUT-FILE does not exist, then it is created.
`print ITEMS | COMMAND'
- It is also possible to send output to another program through a
- pipe instead of into a file. This type of redirection opens a
- pipe to COMMAND, and writes the values of ITEMS through this pipe
- to another process created to execute COMMAND.
+ It is possible to send output to another program through a pipe
+ instead of into a file. This redirection opens a pipe to
+ COMMAND, and writes the values of ITEMS through this pipe to
+ another process created to execute COMMAND.
The redirection argument COMMAND is actually an `awk' expression.
Its value is converted to a string whose contents give the shell
@@ -5240,7 +5292,7 @@ work identically for `printf':
program. (The parentheses group the items to concatenate--see
*note Concatenation::.)
- The `close' function is called here because it's a good idea to
+ The `close()' function is called here because it's a good idea to
close the pipe as soon as all the intended output has been sent to
it. *Note Close Files And Pipes::, for more information.
@@ -5251,11 +5303,11 @@ work identically for `printf':
that the string value be spelled identically every time.
`print ITEMS |& COMMAND'
- This type of redirection prints the items to the input of COMMAND.
- The difference between this and the single-`|' redirection is that
- the output from COMMAND can be read with `getline'. Thus COMMAND
- is a "coprocess", which works together with, but subsidiary to,
- the `awk' program.
+ This redirection prints the items to the input of COMMAND. The
+ difference between this and the single-`|' redirection is that the
+ output from COMMAND can be read with `getline'. Thus COMMAND is a
+ "coprocess", which works together with, but subsidiary to, the
+ `awk' program.
This feature is a `gawk' extension, and is not available in POSIX
`awk'. *Note Getline/Coprocess::, for a brief discussion. *Note
@@ -5301,7 +5353,7 @@ lowercase. The following program is both simple and efficient:
END { close("sh") }
- The `tolower' function returns its argument string with all
+ The `tolower()' function returns its argument string with all
uppercase characters converted to lowercase (*note String Functions::).
The program builds up a list of command lines, using the `mv' utility
to rename the files. It then sends the list to the shell for execution.
@@ -5314,7 +5366,7 @@ File: gawk.info, Node: Special Files, Next: Close Files And Pipes, Prev: Redi
`gawk' provides a number of special file names that it interprets
internally. These file names provide access to standard file
-descriptors, process-related information, and TCP/IP networking.
+descriptors and TCP/IP networking.
* Menu:
@@ -5331,7 +5383,7 @@ File: gawk.info, Node: Special FD, Next: Special Network, Up: Special Files
Running programs conventionally have three input and output streams
already available to them for reading and writing. These are known as
the "standard input", "standard output", and "standard error output".
-These streams are, by default, connected to your terminal, but they are
+These streams are, by default, connected to your screen, but they are
often redirected with the shell, via the `<', `<<', `>', `>>', `>&',
and `|' operators. Standard error is typically used for writing error
messages; the reason there are two separate streams, standard output
@@ -5346,13 +5398,16 @@ This works by opening a pipeline to a shell command that can access the
standard error stream that it inherits from the `awk' process. This is
far from elegant, and it is also inefficient, because it requires a
separate process. So people writing `awk' programs often don't do
-this. Instead, they send the error messages to the terminal, like this:
+this. Instead, they send the error messages to the screen, like this:
print "Serious error detected!" > "/dev/tty"
+(`/dev/tty' is a special file supplied by the operating system that is
+connected to your keyboard and screen. It represents the "terminal,"(1)
+which on modern systems is a keyboard and screen, not a serial console.)
This usually has the same effect but not always: although the standard
-error stream is usually the terminal, it can be redirected; when that
-happens, writing to the terminal is not correct. In fact, if `awk' is
+error stream is usually the screen, it can be redirected; when that
+happens, writing to the screen is not correct. In fact, if `awk' is
run from a background job, it may not have a terminal at all. Then
opening `/dev/tty' fails.
@@ -5389,10 +5444,17 @@ error message in a `gawk' program is to use `/dev/stderr', like this:
redirection, the value must be a string. It is a common error to omit
the quotes, which leads to confusing results.
- Finally, usng the `close' function on a file name of the form
+ Finally, usng the `close()' function on a file name of the form
`"/dev/fd/N"', for file descriptor numbers above two, will actually
close the given file descriptor.
+ The `/dev/stdin', `/dev/stdout', and `/dev/stderr' special files are
+also recognized internally by several other versions of `awk'.
+
+ ---------- Footnotes ----------
+
+ (1) The "tty" in `/dev/tty' stands for "Teletype," a serial terminal.
+

File: gawk.info, Node: Special Network, Next: Special Caveats, Prev: Special FD, Up: Special Files
@@ -5424,28 +5486,13 @@ names that `gawk' provides:
* Recognition of these special file names is disabled if `gawk' is in
compatibility mode (*note Options::).
- * The special files that provide process-related information are now
- considered obsolete and will disappear entirely in the next
- release of `gawk'. `gawk' prints a warning message every time you
- use one of these files. To obtain process-related information,
- use the `PROCINFO' array. *Note Built-in Variables::.
-
- * Starting with version 3.1, `gawk' _always_ interprets these
- special file names.(1) For example, using `/dev/fd/4' for output
- actually writes on file descriptor 4, and not on a new file
- descriptor that is `dup''ed from file descriptor 4. Most of the
- time this does not matter; however, it is important to _not_ close
- any of the files related to file descriptors 0, 1, and 2. Doing
- so results in unpredictable behavior.
-
- ---------- Footnotes ----------
-
- (1) Older versions of `gawk' would interpret these names internally
-only if the system did not actually have a `/dev/fd' directory or any
-of the other special files listed earlier. Usually this didn't make a
-difference, but sometimes it did; thus, it was decided to make `gawk''s
-behavior consistent on all systems and to have it always interpret the
-special file names itself.
+ * `gawk' _always_ interprets these special file names. For example,
+ using `/dev/fd/4' for output actually writes on file descriptor 4,
+ and not on a new file descriptor that is `dup''ed from file
+ descriptor 4. Most of the time this does not matter; however, it
+ is important to _not_ close any of the files related to file
+ descriptors 0, 1, and 2. Doing so results in unpredictable
+ behavior.

File: gawk.info, Node: Close Files And Pipes, Prev: Special Files, Up: Printing
@@ -5460,14 +5507,14 @@ time only. At that time, the first record of input is read from that
file or command. The next time the same file or command is used with
`getline', another record is read from it, and so on.
- Similarly, when a file or pipe is opened for output, the file name or
-command associated with it is remembered by `awk', and subsequent
-writes to the same file or command are appended to the previous writes.
-The file or pipe stays open until `awk' exits.
+ Similarly, when a file or pipe is opened for output, `awk' remembers
+the file name or command associated with it, and subsequent writes to
+the same file or command are appended to the previous writes. The file
+or pipe stays open until `awk' exits.
This implies that special steps are necessary in order to read the
same file again from the beginning, or to rerun a shell command (rather
-than reading more output from the same command). The `close' function
+than reading more output from the same command). The `close()' function
makes these things possible:
close(FILENAME)
@@ -5532,7 +5579,7 @@ programs. Here are some of the reasons for closing an output file:
`gawk' attempts to multiplex the available open files among your data
files. `gawk''s ability to do this depends upon the facilities of your
operating system, so it may not always work. It is therefore both good
-practice and good portability advice to always use `close' on your
+practice and good portability advice to always use `close()' on your
files when you are done with them. In fact, if you are using a lot of
pipes, it is essential that you close commands when done. For example,
consider something like this:
@@ -5547,17 +5594,18 @@ consider something like this:
}
This example creates a new pipeline based on data in _each_ record.
-Without the call to `close' indicated in the comment, `awk' creates
+Without the call to `close()' indicated in the comment, `awk' creates
child processes to run the commands, until it eventually runs out of
file descriptors for more pipelines.
Even though each command has finished (as indicated by the
end-of-file return status from `getline'), the child process is not
terminated;(1) more importantly, the file descriptor for the pipe is
-not closed and released until `close' is called or `awk' exits.
+not closed and released until `close()' is called or `awk' exits.
- `close' will silently do nothing if given an argument that does not
-represent a file, pipe or coprocess that was opened with a redirection.
+ `close()' will silently do nothing if given an argument that does
+not represent a file, pipe or coprocess that was opened with a
+redirection.
Note also that `close(FILENAME)' has no "magic" effects on the
implicit loop that reads through the files named on the command line.
@@ -5567,38 +5615,38 @@ silently does nothing.
When using the `|&' operator to communicate with a coprocess, it is
occasionally useful to be able to close one end of the two-way pipe
without closing the other. This is done by supplying a second argument
-to `close'. As in any other call to `close', the first argument is the
-name of the command or special file used to start the coprocess. The
-second argument should be a string, with either of the values `"to"' or
-`"from"'. Case does not matter. As this is an advanced feature, a
-more complete discussion is delayed until *note Two-way I/O::, which
-discusses it in more detail and gives an example.
-
-Advanced Notes: Using `close''s Return Value
---------------------------------------------
+to `close()'. As in any other call to `close()', the first argument is
+the name of the command or special file used to start the coprocess.
+The second argument should be a string, with either of the values
+`"to"' or `"from"'. Case does not matter. As this is an advanced
+feature, a more complete discussion is delayed until *note Two-way
+I/O::, which discusses it in more detail and gives an example.
+
+Advanced Notes: Using `close()''s Return Value
+----------------------------------------------
-In many versions of Unix `awk', the `close' function is actually a
+In many versions of Unix `awk', the `close()' function is actually a
statement. It is a syntax error to try and use the return value from
-`close': (d.c.)
+`close()': (d.c.)
command = "..."
command | getline info
- retval = close(command) # syntax error in most Unix awks
+ retval = close(command) # syntax error in many Unix awks
- `gawk' treats `close' as a function. The return value is -1 if the
-argument names something that was never opened with a redirection, or
-if there is a system problem closing the file or process. In these
+ `gawk' treats `close()' as a function. The return value is -1 if
+the argument names something that was never opened with a redirection,
+or if there is a system problem closing the file or process. In these
cases, `gawk' sets the built-in variable `ERRNO' to a string describing
the problem.
In `gawk', when closing a pipe or coprocess (input or output), the
return value is the exit status of the command.(2) Otherwise, it is the
-return value from the system's `close' or `fclose' C functions when
+return value from the system's `close()' or `fclose()' C functions when
closing input or output files, respectively. This value is zero if the
close succeeds, or -1 if it fails.
- The POSIX standard is very vague; it says that `close' returns zero
-on success and non-zero otherwise. In general, different
+ The POSIX standard is very vague; it says that `close()' returns
+zero on success and non-zero otherwise. In general, different
implementations vary in what they report when closing pipes; thus the
return value cannot be used portably. (d.c.)
@@ -5608,7 +5656,7 @@ return value cannot be used portably. (d.c.)
is called a "zombie," and cleaning up after it is referred to as
"reaping."
- (2) This is a full 16-bit value as returned by the `wait' system
+ (2) This is a full 16-bit value as returned by the `wait()' system
call. See the system manual pages for information on how to decode this
value.
@@ -5755,9 +5803,9 @@ program text. However, such numbers in the input data are not treated
differently; doing so by default would break old programs. (If you
really need to do this, use the `--non-decimal-data' command-line
option; *note Nondecimal Data::.) If you have octal or hexadecimal
-data, you can use the `strtonum' function (*note String Functions::) to
-convert the data into a number. Most of the time, you will want to use
-octal or hexadecimal constants when working with the built-in bit
+data, you can use the `strtonum()' function (*note String Functions::)
+to convert the data into a number. Most of the time, you will want to
+use octal or hexadecimal constants when working with the built-in bit
manipulation functions; see *note Bitwise Functions::, for more
information.
@@ -5840,11 +5888,11 @@ the contents of the current input record. This feature of the language
has never been well documented until the POSIX specification.
Constant regular expressions are also used as the first argument for
-the `gensub', `sub', and `gsub' functions, and as the second argument
-of the `match' function (*note String Functions::). Modern
+the `gensub()', `sub()', and `gsub()' functions, and as the second
+argument of the `match()' function (*note String Functions::). Modern
implementations of `awk', including `gawk', allow the third argument of
-`split' to be a regexp constant, but some older implementations do not.
-(d.c.) This can lead to confusion when attempting to use regexp
+`split()' to be a regexp constant, but some older implementations do
+not. (d.c.) This can lead to confusion when attempting to use regexp
constants as arguments to user-defined functions (*note User-defined::).
For example:
@@ -5866,7 +5914,7 @@ For example:
In this example, the programmer wants to pass a regexp constant to
the user-defined function `mysub', which in turn passes it on to either
-`sub' or `gsub'. However, what really happens is that the `pat'
+`sub()' or `gsub()'. However, what really happens is that the `pat'
parameter is either one or zero, depending upon whether or not `$0'
matches `/hi/'. `gawk' issues a warning when it sees a regexp constant
used as a parameter to a user-defined function, since passing a truth
@@ -6002,8 +6050,8 @@ interpreted as valid numbers convert to zero.
The exact manner in which numbers are converted into strings is
controlled by the `awk' built-in variable `CONVFMT' (*note Built-in
-Variables::). Numbers are converted using the `sprintf' function with
-`CONVFMT' as the format specifier (*note String Functions::).
+Variables::). Numbers are converted using the `sprintf()' function
+with `CONVFMT' as the format specifier (*note String Functions::).
`CONVFMT''s default value is `"%.6g"', which prints a value with at
most six significant digits. For some applications, you might want to
@@ -6012,11 +6060,11 @@ digits is enough to capture a floating-point number's value exactly,
most of the time.(1)
Strange results can occur if you set `CONVFMT' to a string that
-doesn't tell `sprintf' how to format floating-point numbers in a useful
-way. For example, if you forget the `%' in the format, `awk' converts
-all numbers to the same constant string. As a special case, if a
-number is an integer, then the result of converting it to a string is
-_always_ an integer, no matter what the value of `CONVFMT' may be.
+doesn't tell `sprintf()' how to format floating-point numbers in a
+useful way. For example, if you forget the `%' in the format, `awk'
+converts all numbers to the same constant string. As a special case,
+if a number is an integer, then the result of converting it to a string
+is _always_ an integer, no matter what the value of `CONVFMT' may be.
Given the following code fragment:
CONVFMT = "%2.2f"
@@ -6088,7 +6136,7 @@ Feature Default `--posix' or `--use-lc-numeric'
`%'g' Use locale Use locale
`%g' Use period Use locale
Input Use period Use locale
-`strtonum' Use period Use locale
+`strtonum()'Use period Use locale
Table 5.1: Locale Decimal Point versus A Period
@@ -6403,9 +6451,9 @@ righthand expression. For example:
}
The indices of `bar' are practically guaranteed to be different, because
-`rand' returns different values each time it is called. (Arrays and
-the `rand' function haven't been covered yet. *Note Arrays::, and see
-*note Numeric Functions::, for more information). This example
+`rand()' returns different values each time it is called. (Arrays and
+the `rand()' function haven't been covered yet. *Note Arrays::, and
+see *note Numeric Functions::, for more information). This example
illustrates an important fact about assignment operators: the lefthand
expression is only evaluated _once_. It is up to the implementation as
to which expression is evaluated first, the lefthand or the righthand.
@@ -6633,8 +6681,8 @@ these rules:
STRING attribute.
* Fields, `getline' input, `FILENAME', `ARGV' elements, `ENVIRON'
- elements, and the elements of an array created by `split' and
- `match' that are numeric strings have the STRNUM attribute.
+ elements, and the elements of an array created by `split()' and
+ `match()' that are numeric strings have the STRNUM attribute.
Otherwise, they have the STRING attribute. Uninitialized
variables also have the STRNUM attribute.
@@ -6965,11 +7013,11 @@ File: gawk.info, Node: Function Calls, Next: Precedence, Prev: Truth Values a
A "function" is a name for a particular calculation. This enables you
to ask for it by name at any point in the program. For example, the
-function `sqrt' computes the square root of a number.
+function `sqrt()' computes the square root of a number.
A fixed set of functions are "built-in", which means they are
-available in every `awk' program. The `sqrt' function is one of these.
-*Note Built-in::, for a list of built-in functions and their
+available in every `awk' program. The `sqrt()' function is one of
+these. *Note Built-in::, for a list of built-in functions and their
descriptions. In addition, you can define functions for use in your
program. *Note User-defined::, for instructions on how to do this.
@@ -6993,8 +7041,8 @@ concatenation of a variable with an expression inside parentheses.
With built-in functions, space before the parenthesis is harmless,
but it is best not to get into the habit of using space to avoid
mistakes with user-defined functions. Each function expects a
-particular number of arguments. For example, the `sqrt' function must
-be called with a single argument, the number of which to take the
+particular number of arguments. For example, the `sqrt()' function
+must be called with a single argument, the number of which to take the
square root:
sqrt(ARGUMENT)
@@ -7441,7 +7489,7 @@ the order in which they are executed doesn't matter. *Note Options::,
for more information on using library functions. *Note Library
Functions::, for a number of useful library functions.
- If an `awk' program has only a `BEGIN' rule and no other rules, then
+ If an `awk' program has only `BEGIN' rules and no other rules, then
the program exits after the `BEGIN' rule is run.(1) However, if an
`END' rule exists, then the input is read, even if there are no other
rules in the program. This is necessary in case the `END' rule checks
@@ -7968,11 +8016,8 @@ Statement::.)
loop. However, although it was never documented, historical
implementations of `awk' treated the `break' statement outside of a
loop as if it were a `next' statement (*note Next Statement::). Recent
-versions of Unix `awk' no longer allow this usage. `gawk' supports
-this use of `break' only if `--traditional' has been specified on the
-command line (*note Options::). Otherwise, it is treated as an error,
-since the POSIX standard specifies that `break' should only be used
-inside the body of a loop. (d.c.)
+versions of Unix `awk' no longer allow this usage, nor does `gawk'.
+(d.c.)

File: gawk.info, Node: Continue Statement, Next: Next Statement, Prev: Break Statement, Up: Statements
@@ -8021,10 +8066,7 @@ This program loops forever once `x' reaches 5.
a loop. Historical versions of `awk' treated a `continue' statement
outside a loop the same way they treated a `break' statement outside a
loop: as if it were a `next' statement (*note Next Statement::).
-Recent versions of Unix `awk' no longer work this way, and `gawk'
-allows it only if `--traditional' is specified on the command line
-(*note Options::). Just like the `break' statement, the POSIX standard
-specifies that `continue' should only be used inside the body of a loop.
+Recent versions of Unix `awk' no longer work this way, nor does `gawk'.
(d.c.)

@@ -8106,7 +8148,7 @@ continue scanning the unwanted records. The `nextfile' statement
accomplishes this much more efficiently.
While one might think that `close(FILENAME)' would accomplish the
-same as `nextfile', this isn't true. `close' is reserved for closing
+same as `nextfile', this isn't true. `close()' is reserved for closing
files, pipes, and coprocesses that are opened with redirections. It is
not related to the main processing that `awk' does with the files
listed in `ARGV'.
@@ -8243,7 +8285,7 @@ specific to `gawk' are marked with a pound sign (`#').
`CONVFMT'
This string controls conversion of numbers to strings (*note
Conversion::). It works by being passed, in effect, as the first
- argument to the `sprintf' function (*note String Functions::).
+ argument to the `sprintf()' function (*note String Functions::).
Its default value is `"%.6g"'. `CONVFMT' was introduced by the
POSIX standard.
@@ -8297,13 +8339,13 @@ specific to `gawk' are marked with a pound sign (`#').
`IGNORECASE #'
If `IGNORECASE' is nonzero or non-null, then all string comparisons
and all regular expression matching are case independent. Thus,
- regexp matching with `~' and `!~', as well as the `gensub',
- `gsub', `index', `match', `split', and `sub' functions, record
- termination with `RS', and field splitting with `FS', all ignore
- case when doing their particular regexp operations. However, the
- value of `IGNORECASE' does _not_ affect array subscripting and it
- does not affect field splitting when using a single-character
- field separator. *Note Case-sensitivity::.
+ regexp matching with `~' and `!~', as well as the `gensub()',
+ `gsub()', `index()', `match()', `split()', and `sub()' functions,
+ record termination with `RS', and field splitting with `FS', all
+ ignore case when doing their particular regexp operations.
+ However, the value of `IGNORECASE' does _not_ affect array
+ subscripting and it does not affect field splitting when using a
+ single-character field separator. *Note Case-sensitivity::.
If `gawk' is in compatibility mode (*note Options::), then
`IGNORECASE' has no special meaning. Thus, string and regexp
@@ -8329,7 +8371,7 @@ specific to `gawk' are marked with a pound sign (`#').
`OFMT'
This string controls conversion of numbers to strings (*note
Conversion::) for printing with the `print' statement. It works
- by being passed as the first argument to the `sprintf' function
+ by being passed as the first argument to the `sprintf()' function
(*note String Functions::). Its default value is `"%.6g"'.
Earlier versions of `awk' also used `OFMT' to specify the format
for converting numbers to strings in general expressions; this is
@@ -8368,9 +8410,9 @@ specific to `gawk' are marked with a pound sign (`#').
This variable is used for internationalization of programs at the
`awk' level. It sets the default text domain for specially marked
string constants in the source text, as well as for the
- `dcgettext', `dcngettext' and `bindtextdomain' functions (*note
- Internationalization::). The default value of `TEXTDOMAIN' is
- `"messages"'.
+ `dcgettext()', `dcngettext()' and `bindtextdomain()' functions
+ (*note Internationalization::). The default value of `TEXTDOMAIN'
+ is `"messages"'.
This variable is a `gawk' extension. In other `awk'
implementations, or if `gawk' is in compatibility mode (*note
@@ -8446,7 +8488,7 @@ with a pound sign (`#').
are the values of the particular environment variables. For
example, `ENVIRON["HOME"]' might be `/home/arnold'. Changing this
array does not affect the environment passed on to any programs
- that `awk' may spawn via redirection or the `system' function.
+ that `awk' may spawn via redirection or the `system()' function.
Some operating systems may not have environment variables. On
such systems, the `ENVIRON' array is empty (except for
@@ -8454,13 +8496,12 @@ with a pound sign (`#').
`ERRNO #'
If a system error occurs during a redirection for `getline',
- during a read for `getline', or during a `close' operation, then
+ during a read for `getline', or during a `close()' operation, then
`ERRNO' contains a string describing the error.
- *FIXME:* Get the version right. Starting with version 3.X, `gawk'
- clears `ERRNO' before opening each command line input file. This
- enables checking if the file is readable inside a `BEGINFILE'
- pattern (*note BEGINFILE/ENDFILE::).
+ Starting with version 4.0, `gawk' clears `ERRNO' before opening
+ each command line input file. This enables checking if the file is
+ readable inside a `BEGINFILE' pattern (*note BEGINFILE/ENDFILE::).
Otherwise, `ERRNO' works similarly to the C variable `errno'.
Except for the case just mentioned, `gawk' _never_ clears it (sets
@@ -8550,17 +8591,17 @@ with a pound sign (`#').
special.
`RLENGTH'
- The length of the substring matched by the `match' function (*note
- String Functions::). `RLENGTH' is set by invoking the `match'
- function. Its value is the length of the matched string, or -1 if
- no match is found.
+ The length of the substring matched by the `match()' function
+ (*note String Functions::). `RLENGTH' is set by invoking the
+ `match()' function. Its value is the length of the matched
+ string, or -1 if no match is found.
`RSTART'
The start-index in characters of the substring that is matched by
- the `match' function (*note String Functions::). `RSTART' is set
- by invoking the `match' function. Its value is the position of
- the string where the matched substring starts, or zero if no match
- was found.
+ the `match()' function (*note String Functions::). `RSTART' is
+ set by invoking the `match()' function. Its value is the position
+ of the string where the matched substring starts, or zero if no
+ match was found.
`RT #'
This is set each time a record is read. It contains the input text
@@ -8729,6 +8770,7 @@ cannot have a variable and an array with the same name in the same
* Multi-dimensional:: Emulating multidimensional arrays in
`awk'.
* Array Sorting:: Sorting array values and indices.
+* Arrays of Arrays:: True multidimensional arrays.

File: gawk.info, Node: Array Basics, Next: Delete, Up: Arrays
@@ -8755,7 +8797,7 @@ File: gawk.info, Node: Array Intro, Next: Reference to Elements, Up: Array Ba
7.1.1 Introduction to Arrays
----------------------------
- Doing linear scans over an associateive array is like tryinng to
+ Doing linear scans over an associative array is like tryinng to
club someone to death with a loaded Uzi.
Larry Wall
@@ -8844,7 +8886,7 @@ automatically converts it to a string.
The value of `IGNORECASE' has no effect upon array subscripting.
The identical string value used to store an array element must be used
-to retrieve it. When `awk' creates an array (e.g., with the `split'
+to retrieve it. When `awk' creates an array (e.g., with the `split()'
built-in function), that array's indices are consecutive integers
starting at one. (*Note String Functions::.)
@@ -8995,7 +9037,7 @@ the word as index. The second rule scans the elements of `used' to
find all the distinct words that appear in the input. It prints each
word that is more than 10 characters long and also prints the number of
such words. *Note String Functions::, for more information on the
-built-in function `length'.
+built-in function `length()'.
# Record a 1 for each word that is used at least once
{
@@ -9080,7 +9122,7 @@ clear out an array:(1)
split("", array)
- The `split' function (*note String Functions::) clears out the
+ The `split()' function (*note String Functions::) clears out the
target array first. This call asks it to split apart the null string.
Because there is no data to split out, the function simply clears the
array and then returns.
@@ -9293,8 +9335,8 @@ _way of accessing_ an array.
However, if your program has an array that is always accessed as
multidimensional, you can get the effect of scanning it by combining
the scanning `for' statement (*note Scanning an Array::) with the
-built-in `split' function (*note String Functions::). It works in the
-following manner:
+built-in `split()' function (*note String Functions::). It works in
+the following manner:
for (combined in array) {
split(combined, separate, SUBSEP)
@@ -9310,8 +9352,8 @@ become the elements of the array `separate'.
element with index `"1\034foo"' exists in `array'. (Recall that the
default value of `SUBSEP' is the character with code 034.) Sooner or
later, the `for' statement finds that index and does an iteration with
-the variable `combined' set to `"1\034foo"'. Then the `split' function
-is called as follows:
+the variable `combined' set to `"1\034foo"'. Then the `split()'
+function is called as follows:
split("1\034foo", separate, "\034")
@@ -9320,7 +9362,7 @@ The result is to set `separate[1]' to `"1"' and `separate[2]' to
recovered.

-File: gawk.info, Node: Array Sorting, Prev: Multi-dimensional, Up: Arrays
+File: gawk.info, Node: Array Sorting, Next: Arrays of Arrays, Prev: Multi-dimensional, Up: Arrays
7.6 Sorting Array Values and Indices with `gawk'
================================================
@@ -9329,24 +9371,24 @@ The order in which an array is scanned with a `for (i in array)' loop
is essentially arbitrary. In most `awk' implementations, sorting an
array requires writing a `sort' function. While this can be
educational for exploring different sorting algorithms, usually that's
-not the point of the program. `gawk' provides the built-in `asort' and
-`asorti' functions (*note String Functions::) for sorting arrays. For
-example:
+not the point of the program. `gawk' provides the built-in `asort()'
+and `asorti()' functions (*note String Functions::) for sorting arrays.
+For example:
POPULATE THE ARRAY data
n = asort(data)
for (i = 1; i <= n; i++)
DO SOMETHING WITH data[i]
- After the call to `asort', the array `data' is indexed from 1 to
+ After the call to `asort()', the array `data' is indexed from 1 to
some number N, the total number of elements in `data'. (This count is
-`asort''s return value.) `data[1]' <= `data[2]' <= `data[3]', and so
+`asort()''s return value.) `data[1]' <= `data[2]' <= `data[3]', and so
on. The comparison of array elements is done using `gawk''s usual
comparison rules (*note Typing and Comparison::).
- An important side effect of calling `asort' is that _the array's
+ An important side effect of calling `asort()' is that _the array's
original indices are irrevocably lost_. As this isn't always
-desirable, `asort' accepts a second argument:
+desirable, `asort()' accepts a second argument:
POPULATE THE ARRAY source
n = asort(source, dest)
@@ -9359,9 +9401,9 @@ array is not affected.
Often, what's needed is to sort on the values of the _indices_
instead of the values of the elements. To do that, starting with
-`gawk' 3.1.2, use the `asorti' function. The interface is identical to
-that of `asort', except that the index values are used for sorting, and
-become the values of the result array:
+`gawk' 3.1.2, use the `asorti()' function. The interface is identical
+to that of `asort()', except that the index values are used for
+sorting, and become the values of the result array:
{ source[$0] = some_func($0) }
@@ -9375,8 +9417,8 @@ become the values of the result array:
}
If your version of `gawk' is 3.1.0 or 3.1.1, you don't have
-`asorti'. Instead, use a helper array to hold the sorted index values,
-and then access the original array's elements. It works in the
+`asorti()'. Instead, use a helper array to hold the sorted index
+values, and then access the original array's elements. It works in the
following way:
POPULATE THE ARRAY data
@@ -9400,19 +9442,125 @@ indices.
Copying array indices and elements isn't expensive in terms of
memory. Internally, `gawk' maintains "reference counts" to data. For
-example, when `asort' copies the first array to the second one, there
+example, when `asort()' copies the first array to the second one, there
is only one copy of the original array elements' data, even though both
arrays use the values. Similarly, when copying the indices from `data'
to `ind', there is only one copy of the actual index strings.
We said previously that comparisons are done using `gawk''s "usual
comparison rules." Because `IGNORECASE' affects string comparisons,
-the value of `IGNORECASE' also affects sorting for both `asort' and
-`asorti'. Note also that the locale's sorting order does _not_ come
+the value of `IGNORECASE' also affects sorting for both `asort()' and
+`asorti()'. Note also that the locale's sorting order does _not_ come
into play; comparisons are based on character values only. Caveat
Emptor.

+File: gawk.info, Node: Arrays of Arrays, Prev: Array Sorting, Up: Arrays
+
+7.7 Arrays of Arrays
+====================
+
+`gawk' supports arrays of arrays. Elements of a subarray are referred
+to by their own indices enclosed in square brackets, just like the
+elements of the main array. For example, the following creates a
+two-element subarray at index `1' of the main array `a':
+
+ a[1][1] = 1
+ a[1][2] = 2
+
+ This simulates a true two-dimensional array. Each subarray element
+can contain another subarray as a value, which in turn can hold other
+arrays as well. In this way, you can create arrays of three or more
+dimensions. The indices can be any `awk' expression, including scalars
+seperated by commas (that is, a regular `awk' simulated
+multidimensional subscript). So the following is valid in `gawk':
+
+ a[1][3][1, "name"] = "barney"
+
+ Each subarray and the main array can be of different length. In
+fact, the elements of an array or its subarray do not all have to have
+the same type. This means that the main array and any of its subarrays
+can be non-rectangular, or jagged in structure. One can assign a scalar
+value to the index `4' of the main array `a':
+
+ a[4] = "An element in a jagged array"
+
+ The terms "dimension", "row" and "column" are meaningless when
+applied to such an array, but we will use "dimension" henceforth to
+imply the maximum number of indices needed to refer to an existing
+element. The type of any element that has already been assigned cannot
+be changed by assigning a value of a different type. You have to first
+delete the current element, which effectively makes `gawk' forget about
+the element at that index:
+
+ delete a[4]
+ a[4][5][6][7] = "An element in a four-dimensional array"
+
+This removes the scalar value from index `4' and then inserts a
+subarray of subarray of subarray containing a scalar. You can also
+delete an entire subarray or subarray of subarrays:
+
+ delete a[4][5]
+ a[4][5] = "An element in subarray a[4]"
+
+ But recall that you can not delete the main array `a' and then use it
+as a scalar.
+
+ The built-in functions which take array arguments can also be used
+with subarrays. For example, the following code fragment uses `length()'
+to determine the number of elements in the main array `a' and its
+subarrays:
+
+ print length(a), length(a[1]), length(a[1][3])
+
+This results in the following output for our main array `a':
+
+ 2, 3, 1
+
+The `SUBSCRIPT in ARRAY' expression (*note Reference to Elements::)
+works similarly for both regular `awk'-style arrays and arrays of
+arrays. For example, the tests `1 in a', `3 in a[1]', and `(1, "name")
+in a[1][3]' all evaluate to one (true) for our array `a'.
+
+ The `for (item in array)' statement (*note Scanning an Array::) can
+be nested to scan all the elements of an array of arrays if it is
+rectangular in structure. In order to print the contents (scalar
+values) of a two-dimensional array of arrays with each subarray having
+the same length, you could use the following code:
+
+ for (i in array)
+ for (j in array[j])
+ print array[i][j]
+
+ If the structure of a jagged array of arrays is known in advance,
+you can often devise workarounds using control statements. For example,
+the following code prints the elements of our main array `a':
+
+ for (i in a) {
+ for (j in a[j]) {
+ if (j == 3) {
+ for (k in a[i][j])
+ print a[i][j][k]
+ } else
+ print a[i][j]
+ }
+ }
+
+ Recall that a reference to an uninitialized array element yields a
+value of `""', the null string. This has one important implication when
+you intend to use a subarray as an argument to a function, as
+illustrated by the following example:
+
+ $ gawk 'BEGIN { split("a b c d", b[1]); print b[1][1] }'
+ error--> gawk: cmd. line:1: fatal: split: second argument is not an array
+
+ The way to work around this is to first force `b[1]' to be an array
+by creating an arbitray index:
+
+ $ gawk 'BEGIN { b[1][1] = ""; split("a b c d", b[1]); print b[1][1] }'
+ -| a
+
+
File: gawk.info, Node: Functions, Next: Internationalization, Prev: Arrays, Up: Top
8 Functions
@@ -9448,9 +9596,10 @@ for your convenience.
* Calling Built-in:: How to call built-in functions.
* Numeric Functions:: Functions that work with numbers, including
- `int', `sin' and `rand'.
+ `int()', `sin()' and `rand()'.
* String Functions:: Functions for string manipulation, such as
- `split', `match' and `sprintf'.
+ `split()', `match()' and
+ `sprintf()'.
* I/O Functions:: Functions for files and shell commands.
* Time Functions:: Functions for dealing with timestamps.
* Bitwise Functions:: Functions for bitwise operations.
@@ -9464,7 +9613,7 @@ File: gawk.info, Node: Calling Built-in, Next: Numeric Functions, Up: Built-i
To call one of `awk''s built-in functions, write the name of the
function followed by arguments in parentheses. For example, `atan2(y +
-z, 1)' is a call to the function `atan2' and has two arguments.
+z, 1)' is a call to the function `atan2()' and has two arguments.
Whitespace is ignored between the built-in function name and the
open parenthesis, and it is good practice to avoid using whitespace
@@ -9486,7 +9635,7 @@ For example, in the following code fragment:
i = 4
j = sqrt(i++)
-the variable `i' is incremented to the value five before `sqrt' is
+the variable `i' is incremented to the value five before `sqrt()' is
called with a value of four for its actual parameter. The order of
evaluation of the expressions used for the function's parameters is
undefined. Thus, avoid writing programs that assume that parameters
@@ -9496,9 +9645,9 @@ are evaluated from left to right or from right to left. For example:
j = atan2(i++, i *= 2)
If the order of evaluation is left to right, then `i' first becomes
-6, and then 12, and `atan2' is called with the two arguments 6 and 12.
-But if the order of evaluation is right to left, `i' first becomes 10,
-then 11, and `atan2' is called with the two arguments 11 and 10.
+6, and then 12, and `atan2()' is called with the two arguments 6 and
+12. But if the order of evaluation is right to left, `i' first becomes
+10, then 11, and `atan2()' is called with the two arguments 11 and 10.

File: gawk.info, Node: Numeric Functions, Next: String Functions, Prev: Calling Built-in, Up: Built-in
@@ -9540,9 +9689,9 @@ brackets ([ ]):
This returns the arctangent of `Y / X' in radians.
`rand()'
- This returns a random number. The values of `rand' are uniformly
- distributed between zero and one. The value could be zero but is
- never one.(1)
+ This returns a random number. The values of `rand()' are
+ uniformly distributed between zero and one. The value could be
+ zero but is never one.(1)
Often random integers are needed instead. Following is a
user-defined function that can be used to obtain a random
@@ -9553,7 +9702,7 @@ brackets ([ ]):
}
The multiplication produces a random number greater than zero and
- less than `n'. Using `int', this result is made into an integer
+ less than `n'. Using `int()', this result is made into an integer
between zero and `n' - 1, inclusive.
The following example uses a similar function to produce random
@@ -9570,17 +9719,17 @@ brackets ([ ]):
roll(6)+roll(6)+roll(6))
}
- *Caution:* In most `awk' implementations, including `gawk', `rand'
- starts generating numbers from the same starting number, or
- "seed", each time you run `awk'. Thus, a program generates the
+ *Caution:* In most `awk' implementations, including `gawk',
+ `rand()' starts generating numbers from the same starting number,
+ or "seed", each time you run `awk'. Thus, a program generates the
same results each time you run it. The numbers are random within
one `awk' run but predictable from run to run. This is convenient
for debugging, but if you want a program to do different things
each time it is used, you must change the seed to a value that is
- different in each run. To do this, use `srand'.
+ different in each run. To do this, use `srand()'.
`srand([X])'
- The function `srand' sets the starting point, or seed, for
+ The function `srand()' sets the starting point, or seed, for
generating random numbers to the value X.
Each seed value leads to a particular sequence of random
@@ -9596,17 +9745,17 @@ brackets ([ ]):
date and time of day are used for a seed. This is the way to get
random numbers that are truly unpredictable.
- The return value of `srand' is the previous seed. This makes it
+ The return value of `srand()' is the previous seed. This makes it
easy to keep track of the seeds in case you need to consistently
reproduce sequences of random numbers.
---------- Footnotes ----------
- (1) The C version of `rand' is known to produce fairly poor
+ (1) The C version of `rand()' is known to produce fairly poor
sequences of random numbers. However, nothing requires that an `awk'
-implementation use the C `rand' to implement the `awk' version of
-`rand'. In fact, `gawk' uses the BSD `random' function, which is
-considerably better than `rand', to produce random numbers.
+implementation use the C `rand()' to implement the `awk' version of
+`rand()'. In fact, `gawk' uses the BSD `random' function, which is
+considerably better than `rand()', to produce random numbers.
(2) Computer-generated random numbers really are not truly random.
They are technically known as "pseudorandom." This means that while
@@ -9627,11 +9776,11 @@ with a pound sign (`#'):
* Menu:
* Gory Details:: More than you want to know about `\' and
- `&' with `sub', `gsub', and
- `gensub'.
+ `&' with `sub()', `gsub()', and
+ `gensub()'.
`asort(SOURCE [, DEST]) #'
- `asort' is a `gawk'-specific extension, returning the number of
+ `asort()' is a `gawk'-specific extension, returning the number of
elements in the array SOURCE. The contents of SOURCE are sorted
using `gawk''s normal rules for comparing values (in particular,
`IGNORECASE' affects the sorting) and the indices of the sorted
@@ -9645,7 +9794,7 @@ with a pound sign (`#'):
a["first"] = "sac"
a["middle"] = "cul"
- A call to `asort':
+ A call to `asort()':
asort(a)
@@ -9655,20 +9804,20 @@ with a pound sign (`#'):
a[2] = "de"
a[3] = "sac"
- The `asort' function is described in more detail in *note Array
- Sorting::. `asort' is a `gawk' extension; it is not available in
- compatibility mode (*note Options::).
+ The `asort()' function is described in more detail in *note Array
+ Sorting::. `asort()' is a `gawk' extension; it is not available
+ in compatibility mode (*note Options::).
`asorti(SOURCE [, DEST]) #'
- `asorti' is a `gawk'-specific extension, returning the number of
- elements in the array SOURCE. It works similarly to `asort',
+ `asorti()' is a `gawk'-specific extension, returning the number of
+ elements in the array SOURCE. It works similarly to `asort()',
however, the _indices_ are sorted, instead of the values. As
array indices are always strings, the comparison performed is
always a string comparison. (Here too, `IGNORECASE' affects the
sorting.)
- The `asorti' function is described in more detail in *note Array
- Sorting::. It was added in `gawk' 3.1.2. `asorti' is a `gawk'
+ The `asorti()' function is described in more detail in *note Array
+ Sorting::. It was added in `gawk' 3.1.2. `asorti()' is a `gawk'
extension; it is not available in compatibility mode (*note
Options::).
@@ -9680,8 +9829,8 @@ with a pound sign (`#'):
$ awk 'BEGIN { print index("peanut", "an") }'
-| 3
- If FIND is not found, `index' returns zero. (Remember that string
- indices in `awk' start at one.)
+ If FIND is not found, `index()' returns zero. (Remember that
+ string indices in `awk' start at one.)
`length([STRING])'
This returns the number of characters in STRING. If STRING is a
@@ -9691,17 +9840,16 @@ with a pound sign (`#'):
and 525 is then converted to the string `"525"', which has three
characters.
- If no argument is supplied, `length' returns the length of `$0'.
+ If no argument is supplied, `length()' returns the length of `$0'.
- NOTE: In older versions of `awk', the `length' function could
- be called without any parentheses. Doing so is marked as
- "deprecated" in the POSIX standard. This means that while a
- program can do this, it is a feature that can eventually be
- removed from a future version of the standard. Therefore,
- for programs to be maximally portable, always supply the
+ NOTE: In older versions of `awk', the `length()' function
+ could be called without any parentheses. Doing so is
+ considered poor practice, although the 2008 POSIX standard
+ explicitly allows it, to support historical practice. For
+ programs to be maximally portable, always supply the
parentheses.
- If `length' is called with a variable that has not been used,
+ If `length()' is called with a variable that has not been used,
`gawk' forces the variable to be a scalar. Other implementations
of `awk' leave the variable without a type. (d.c.) Consider:
@@ -9716,16 +9864,16 @@ with a pound sign (`#'):
warning about this.
Beginning with `gawk' version 3.1.5, when supplied an array
- argument, the `length' function returns the number of elements in
- the array. This is less useful than it might seem at first, as the
- array is not guaranteed to be indexed from one to the number of
- elements in it. If `--lint' is provided on the command line
+ argument, the `length()' function returns the number of elements
+ in the array. This is less useful than it might seem at first, as
+ the array is not guaranteed to be indexed from one to the number
+ of elements in it. If `--lint' is provided on the command line
(*note Options::), `gawk' warns that passing an array argument is
not portable. If `--posix' is supplied, using an array argument
is a fatal error (*note Arrays::).
`match(STRING, REGEXP [, ARRAY])'
- The `match' function searches STRING for the longest, leftmost
+ The `match()' function searches STRING for the longest, leftmost
substring matched by the regular expression, REGEXP. It returns
the character position, or "index", at which that substring begins
(one, if it starts at the beginning of STRING). If no match is
@@ -9738,11 +9886,12 @@ with a pound sign (`#'):
implications for writing your program correctly.
The order of the first two arguments is backwards from most other
- string functions that work with regular expressions, such as `sub'
- and `gsub'. It might help to remember that for `match', the order
- is the same as for the `~' operator: `STRING ~ REGEXP'.
+ string functions that work with regular expressions, such as
+ `sub()' and `gsub()'. It might help to remember that for
+ `match()', the order is the same as for the `~' operator: `STRING
+ ~ REGEXP'.
- The `match' function sets the built-in variable `RSTART' to the
+ The `match()' function sets the built-in variable `RSTART' to the
index. It also sets the built-in variable `RLENGTH' to the length
in characters of the matched substring. If no match is found,
`RSTART' is set to zero, and `RLENGTH' to -1.
@@ -9808,7 +9957,7 @@ with a pound sign (`#'):
text; thus they should be tested for with the `in' operator (*note
Reference to Elements::).
- The ARRAY argument to `match' is a `gawk' extension. In
+ The ARRAY argument to `match()' is a `gawk' extension. In
compatibility mode (*note Options::), using a third argument is a
fatal error.
@@ -9820,11 +9969,11 @@ with a pound sign (`#'):
argument, FIELDPAT, is a regexp describing the fields in STRING
(just as `FPAT' is a regexp describing the fields in input
records). If FIELDPAT is omitted, the value of `FPAT' is used.
- `patsplit' returns the number of elements created. `SEPS[I]' is
+ `patsplit()' returns the number of elements created. `SEPS[I]' is
the separator string between `ARRAY[I]' and `ARRAY[I+1]'. Any
leading separator will be in `SEPS[0]'.
- The `patsplit' function splits strings into pieces in a manner
+ The `patsplit()' function splits strings into pieces in a manner
similar to the way input lines are split into fields using `FPAT'.
`split(STRING, ARRAY [, FIELDSEP [, SEPS ] ])'
@@ -9835,14 +9984,14 @@ with a pound sign (`#'):
argument, FIELDSEP, is a regexp describing where to split STRING
(much as `FS' can be a regexp describing where to split input
records). If FIELDSEP is omitted, the value of `FS' is used.
- `split' returns the number of elements created. SEPS is a `gawk'
- extension with `SEPS[I]' being the separator string between
+ `split()' returns the number of elements created. SEPS is a
+ `gawk' extension with `SEPS[I]' being the separator string between
`ARRAY[I]' and `ARRAY[I+1]'. If FIELDSEP is a single space then
any leading whitespace goes into `SEPS[0]' and any trailing
whitespace goes into `SEPS[N]' where N is the return value of
`split()' (that is, the number of elements in ARRAY).
- The `split' function splits strings into pieces in a manner
+ The `split()' function splits strings into pieces in a manner
similar to the way input lines are split into fields. For example:
split("cul-de-sac", a, "-", seps)
@@ -9859,7 +10008,7 @@ with a pound sign (`#'):
seps[1] = "-"
seps[2] = "-"
- The value returned by this call to `split' is three.
+ The value returned by this call to `split()' is three.
As with input field-splitting, when the value of FIELDSEP is
`" "', leading and trailing whitespace is ignored in ARRAY but not
@@ -9868,9 +10017,9 @@ with a pound sign (`#'):
string, each individual character in the string is split into its
own array element. (This is a `gawk'-specific extension.)
- Note, however, that `RS' has no effect on the way `split' works.
+ Note, however, that `RS' has no effect on the way `split()' works.
Even though `RS = ""' causes newline to also be an input field
- separator, this does not affect how `split' splits strings.
+ separator, this does not affect how `split()' splits strings.
Modern implementations of `awk', including `gawk', allow the third
argument to be a regexp constant (`/abc/') as well as a string.
@@ -9879,7 +10028,7 @@ with a pound sign (`#'):
string constant or a regexp constant, and the implications for
writing your program correctly.
- Before splitting the string, `split' deletes any previously
+ Before splitting the string, `split()' deletes any previously
existing elements in the arrays ARRAY and SEPS.
If STRING is null, the array has no elements. (So this is a
@@ -9901,26 +10050,26 @@ with a pound sign (`#'):
`strtonum(STR) #'
Examines STR and returns its numeric value. If STR begins with a
- leading `0', `strtonum' assumes that STR is an octal number. If
- STR begins with a leading `0x' or `0X', `strtonum' assumes that
+ leading `0', `strtonum()' assumes that STR is an octal number. If
+ STR begins with a leading `0x' or `0X', `strtonum()' assumes that
STR is a hexadecimal number. For example:
$ echo 0x11 |
> gawk '{ printf "%d\n", strtonum($1) }'
-| 17
- Using the `strtonum' function is _not_ the same as adding zero to
- a string value; the automatic coercion of strings to numbers works
- only for decimal data, not for octal or hexadecimal.(1)
+ Using the `strtonum()' function is _not_ the same as adding zero
+ to a string value; the automatic coercion of strings to numbers
+ works only for decimal data, not for octal or hexadecimal.(1)
- Note also that `strtonum' uses the current locale's decimal point
+ Note also that `strtonum()' uses the current locale's decimal point
for recognizing numbers.
- `strtonum' is a `gawk' extension; it is not available in
+ `strtonum()' is a `gawk' extension; it is not available in
compatibility mode (*note Options::).
`sub(REGEXP, REPLACEMENT [, TARGET])'
- The `sub' function alters the value of TARGET. It searches this
+ The `sub()' function alters the value of TARGET. It searches this
value, which is treated as a string, for the leftmost, longest
substring matched by the regular expression REGEXP. Then the
entire string is changed by replacing the matched text with
@@ -9934,7 +10083,7 @@ with a pound sign (`#'):
This function is peculiar because TARGET is not simply used to
compute a value, and not just any expression will do--it must be a
- variable, field, or array element so that `sub' can store a
+ variable, field, or array element so that `sub()' can store a
modified value there. If this argument is omitted, then the
default is to use and alter `$0'.(2) For example:
@@ -9944,8 +10093,8 @@ with a pound sign (`#'):
sets `str' to `"wither, water, everywhere"', by replacing the
leftmost longest occurrence of `at' with `ith'.
- The `sub' function returns the number of substitutions made (either
- one or zero).
+ The `sub()' function returns the number of substitutions made
+ (either one or zero).
If the special character `&' appears in REPLACEMENT, it stands for
the precise substring that was matched by REGEXP. (If the regexp
@@ -9977,10 +10126,10 @@ with a pound sign (`#'):
{ sub(/\|/, "\\&"); print }
- As mentioned, the third argument to `sub' must be a variable,
+ As mentioned, the third argument to `sub()' must be a variable,
field or array reference. Some versions of `awk' allow the third
argument to be an expression that is not an lvalue. In such a
- case, `sub' still searches for the pattern and returns zero or
+ case, `sub()' still searches for the pattern and returns zero or
one, but the result of the substitution (if any) is thrown away
because there is no place to put it. Such versions of `awk'
accept expressions such as the following:
@@ -9997,9 +10146,9 @@ with a pound sign (`#'):
regexp to match.
`gsub(REGEXP, REPLACEMENT [, TARGET])'
- This is similar to the `sub' function, except `gsub' replaces
+ This is similar to the `sub()' function, except `gsub()' replaces
_all_ of the longest, leftmost, _nonoverlapping_ matching
- substrings it can find. The `g' in `gsub' stands for "global,"
+ substrings it can find. The `g' in `gsub()' stands for "global,"
which means replace everywhere. For example:
{ gsub(/Britain/, "United Kingdom"); print }
@@ -10007,25 +10156,25 @@ with a pound sign (`#'):
replaces all occurrences of the string `Britain' with `United
Kingdom' for all input records.
- The `gsub' function returns the number of substitutions made. If
+ The `gsub()' function returns the number of substitutions made. If
the variable to search and alter (TARGET) is omitted, then the
- entire input record (`$0') is used. As in `sub', the characters
+ entire input record (`$0') is used. As in `sub()', the characters
`&' and `\' are special, and the third argument must be assignable.
`gensub(REGEXP, REPLACEMENT, HOW [, TARGET]) #'
- `gensub' is a general substitution function. Like `sub' and
- `gsub', it searches the target string TARGET for matches of the
- regular expression REGEXP. Unlike `sub' and `gsub', the modified
- string is returned as the result of the function and the original
- target string is _not_ changed. If HOW is a string beginning with
- `g' or `G', then it replaces all matches of REGEXP with
- REPLACEMENT. Otherwise, HOW is treated as a number that indicates
- which match of REGEXP to replace. If no TARGET is supplied, `$0'
- is used.
-
- `gensub' provides an additional feature that is not available in
- `sub' or `gsub': the ability to specify components of a regexp in
- the replacement text. This is done by using parentheses in the
+ `gensub()' is a general substitution function. Like `sub()' and
+ `gsub()', it searches the target string TARGET for matches of the
+ regular expression REGEXP. Unlike `sub()' and `gsub()', the
+ modified string is returned as the result of the function and the
+ original target string is _not_ changed. If HOW is a string
+ beginning with `g' or `G', then it replaces all matches of REGEXP
+ with REPLACEMENT. Otherwise, HOW is treated as a number that
+ indicates which match of REGEXP to replace. If no TARGET is
+ supplied, `$0' is used.
+
+ `gensub()' provides an additional feature that is not available in
+ `sub()' or `gsub()': the ability to specify components of a regexp
+ in the replacement text. This is done by using parentheses in the
regexp to mark the components and then specifying `\N' in the
replacement text, where N is a digit from 1 to 9. For example:
@@ -10037,7 +10186,7 @@ with a pound sign (`#'):
> }'
-| def abc
- As with `sub', you must type two backslashes in order to get one
+ As with `sub()', you must type two backslashes in order to get one
into the string. In the replacement text, the sequence `\0'
represents the entire matched text, as does the character `&'.
@@ -10048,19 +10197,19 @@ with a pound sign (`#'):
> gawk '{ print gensub(/a/, "AA", 2) }'
-| a b c AA b c
- In this case, `$0' is used as the default target string. `gensub'
- returns the new string as its result, which is passed directly to
- `print' for printing.
+ In this case, `$0' is used as the default target string.
+ `gensub()' returns the new string as its result, which is passed
+ directly to `print' for printing.
If the HOW argument is a string that does not begin with `g' or
`G', or if it is a number that is less than or equal to zero, only
one substitution is performed. If HOW is zero, `gawk' issues a
warning message.
- If REGEXP does not match TARGET, `gensub''s return value is the
+ If REGEXP does not match TARGET, `gensub()''s return value is the
original unchanged value of TARGET.
- `gensub' is a `gawk' extension; it is not available in
+ `gensub()' is a `gawk' extension; it is not available in
compatibility mode (*note Options::).
`substr(STRING, START [, LENGTH])'
@@ -10075,31 +10224,31 @@ with a pound sign (`#'):
also returned if LENGTH is greater than the number of characters
remaining in the string, counting from character START.
- If START is less than one, `substr' treats it as if it was one.
+ If START is less than one, `substr()' treats it as if it was one.
(POSIX doesn't specify what to do in this case: Unix `awk' acts
this way, and therefore `gawk' does too.) If START is greater
- than the number of characters in the string, `substr' returns the
- null string. Similarly, if LENGTH is present but less than or
+ than the number of characters in the string, `substr()' returns
+ the null string. Similarly, if LENGTH is present but less than or
equal to zero, the null string is returned.
- The string returned by `substr' _cannot_ be assigned. Thus, it is
- a mistake to attempt to change a portion of a string, as shown in
- the following example:
+ The string returned by `substr()' _cannot_ be assigned. Thus, it
+ is a mistake to attempt to change a portion of a string, as shown
+ in the following example:
string = "abcdef"
# try to get "abCDEf", won't work
substr(string, 3, 3) = "CDE"
- It is also a mistake to use `substr' as the third argument of
- `sub' or `gsub':
+ It is also a mistake to use `substr()' as the third argument of
+ `sub()' or `gsub()':
gsub(/xyz/, "pdq", substr($0, 5, 20)) # WRONG
- (Some commercial versions of `awk' do in fact let you use `substr'
- this way, but doing so is not portable.)
+ (Some commercial versions of `awk' do in fact let you use
+ `substr()' this way, but doing so is not portable.)
If you need to replace bits and pieces of a string, combine
- `substr' with string concatenation, in the following manner:
+ `substr()' with string concatenation, in the following manner:
string = "abcdef"
...
@@ -10133,10 +10282,10 @@ is number zero.

File: gawk.info, Node: Gory Details, Up: String Functions
-8.1.3.1 More About `\' and `&' with `sub', `gsub', and `gensub'
-...............................................................
+8.1.3.1 More About `\' and `&' with `sub()', `gsub()', and `gensub()'
+.....................................................................
-When using `sub', `gsub', or `gensub', and trying to get literal
+When using `sub()', `gsub()', or `gensub()', and trying to get literal
backslashes and ampersands into the replacement text, you need to
remember that there are several levels of "escape processing" going on.
@@ -10156,13 +10305,13 @@ example, `"a\qb"' is treated as `"aqb"'.
At the runtime level, the various functions handle sequences of `\'
and `&' differently. The situation is (sadly) somewhat complex.
-Historically, the `sub' and `gsub' functions treated the two character
-sequence `\&' specially; this sequence was replaced in the generated
-text with a single `&'. Any other `\' within the REPLACEMENT string
-that did not precede an `&' was passed through unchanged. This is
-illustrated in *note table-sub-escapes::.
+Historically, the `sub()' and `gsub()' functions treated the two
+character sequence `\&' specially; this sequence was replaced in the
+generated text with a single `&'. Any other `\' within the REPLACEMENT
+string that did not precede an `&' was passed through unchanged. This
+is illustrated in *note table-sub-escapes::.
- You type `sub' sees `sub' generates
+ You type `sub()' sees `sub()' generates
------- --------- --------------
`\&' `&' the matched text
`\\&' `\&' a literal `&'
@@ -10176,20 +10325,20 @@ Table 8.1: Historical Escape Sequence Processing for sub and gsub
This table shows both the lexical-level processing, where an odd number
of backslashes becomes an even number at the runtime level, as well as
-the runtime processing done by `sub'. (For the sake of simplicity, the
-rest of the following tables only show the case of even numbers of
+the runtime processing done by `sub()'. (For the sake of simplicity,
+the rest of the following tables only show the case of even numbers of
backslashes entered at the lexical level.)
The problem with the historical approach is that there is no way to
get a literal `\' followed by the matched text.
The 1992 POSIX standard attempted to fix this problem. That standard
-says that `sub' and `gsub' look for either a `\' or an `&' after the
-`\'. If either one follows a `\', that character is output literally.
-The interpretation of `\' and `&' then becomes as shown in *note
-table-sub-posix-92::.
+says that `sub()' and `gsub()' look for either a `\' or an `&' after
+the `\'. If either one follows a `\', that character is output
+literally. The interpretation of `\' and `&' then becomes as shown in
+*note table-sub-posix-92::.
- You type `sub' sees `sub' generates
+ You type `sub()' sees `sub()' generates
------- --------- --------------
`&' `&' the matched text
`\\&' `\&' a literal `&'
@@ -10217,7 +10366,7 @@ proposed rules have special cases that make it possible to produce a
`\' preceding the matched text. This is shown in *note
table-sub-proposed::.
- You type `sub' sees `sub' generates
+ You type `sub()' sees `sub()' generates
------- --------- --------------
`\\\\\\&' `\\\&' a literal `\&'
`\\\\&' `\\&' a literal `\', followed by the matched text
@@ -10233,8 +10382,8 @@ there was only one. However, as in the historical case, any `\' that
is not part of one of these three sequences is not special and appears
in the output literally.
- `gawk' 3.0 and 3.1 follow these proposed POSIX rules for `sub' and
-`gsub'. The POSIX standard took much longer to be revised than was
+ `gawk' 3.0 and 3.1 follow these proposed POSIX rules for `sub()' and
+`gsub()'. The POSIX standard took much longer to be revised than was
expected in 1996. The 2001 standard does not follow the above rules.
Instead, the rules there are somewhat simpler. The results are similar
except for one case.
@@ -10244,7 +10393,7 @@ produces a literal `&', `\\' produces a literal `\', and `\' followed
by anything else is not special; the `\' is placed straight into the
output. These rules are presented in *note table-posix-2001-sub::.
- You type `sub' sees `sub' generates
+ You type `sub()' sees `sub()' generates
------- --------- --------------
`\\\\\\&' `\\\&' a literal `\&'
`\\\\&' `\\&' a literal `\', followed by the matched text
@@ -10262,16 +10411,16 @@ Table 8.4: POSIX 2001 rules for sub
follow the 1996 proposed rules, since that had been its behavior for
many seven years.
- As of version 3.2, `gawk' uses the POSIX 2001 rules.
+ As of version 4.0, `gawk' uses the POSIX 2001 rules.
- The rules for `gensub' are considerably simpler. At the runtime
+ The rules for `gensub()' are considerably simpler. At the runtime
level, whenever `gawk' sees a `\', if the following character is a
digit, then the text that matched the corresponding parenthesized
subexpression is placed in the generated output. Otherwise, no matter
what character follows the `\', it appears in the generated text and
the `\' does not, as shown in *note table-gensub-escapes::.
- You type `gensub' sees `gensub' generates
+ You type `gensub()' sees `gensub()' generates
------- ------------ -----------------
`&' `&' the matched text
`\\&' `\&' a literal `&'
@@ -10283,15 +10432,15 @@ the `\' does not, as shown in *note table-gensub-escapes::.
Table 8.5: Escape Sequence Processing for gensub
Because of the complexity of the lexical and runtime level processing
-and the special cases for `sub' and `gsub', we recommend the use of
-`gawk' and `gensub' when you have to do substitutions.
+and the special cases for `sub()' and `gsub()', we recommend the use of
+`gawk' and `gensub()' when you have to do substitutions.
Advanced Notes: Matching the Null String
----------------------------------------
In `awk', the `*' operator can match the null string. This is
-particularly important for the `sub', `gsub', and `gensub' functions.
-For example:
+particularly important for the `sub()', `gsub()', and `gensub()'
+functions. For example:
$ echo abc | awk '{ gsub(/m*/, "X"); print }'
-| XaXbXcX
@@ -10320,7 +10469,7 @@ parameters are enclosed in square brackets ([ ]):
When closing a coprocess, it is occasionally useful to first close
one end of the two-way pipe and then to close the other. This is
- done by providing a second argument to `close'. This second
+ done by providing a second argument to `close()'. This second
argument should be one of the two string values `"to"' or `"from"',
indicating which end of the pipe to close. Case in the string does
not matter. *Note Two-way I/O::, which discusses this feature in
@@ -10338,23 +10487,23 @@ parameters are enclosed in square brackets ([ ]):
little bit of information as soon as it is ready. However,
sometimes it is necessary to force a program to "flush" its
buffers; that is, write the information to its destination, even
- if a buffer is not full. This is the purpose of the `fflush'
- function--`gawk' also buffers its output and the `fflush' function
- forces `gawk' to flush its buffers.
+ if a buffer is not full. This is the purpose of the `fflush()'
+ function--`gawk' also buffers its output and the `fflush()'
+ function forces `gawk' to flush its buffers.
- `fflush' was added to the Bell Laboratories research version of
+ `fflush()' was added to the Bell Laboratories research version of
`awk' in 1994; it is not part of the POSIX standard and is not
available if `--posix' has been specified on the command line
(*note Options::).
- `gawk' extends the `fflush' function in two ways. The first is to
- allow no argument at all. In this case, the buffer for the
+ `gawk' extends the `fflush()' function in two ways. The first is
+ to allow no argument at all. In this case, the buffer for the
standard output is flushed. The second is to allow the null string
(`""') as the argument. In this case, the buffers for _all_ open
output files and pipes are flushed. Current versions of the Bell
Labs `awk' also support these extensions.
- `fflush' returns zero if the buffer is successfully flushed;
+ `fflush()' returns zero if the buffer is successfully flushed;
otherwise, it returns -1. In the case where all buffers are
flushed, the return value is zero only if all buffers were flushed
successfully. Otherwise, it is -1, and `gawk' warns about the
@@ -10363,12 +10512,12 @@ parameters are enclosed in square brackets ([ ]):
`gawk' also issues a warning message if you attempt to flush a
file or pipe that was opened for reading (such as with `getline'),
or if FILENAME is not an open file, pipe, or coprocess. In such a
- case, `fflush' returns -1, as well.
+ case, `fflush()' returns -1, as well.
`system(COMMAND)'
Executes operating-system commands and then returns to the `awk'
- program. The `system' function executes the command given by the
- string COMMAND. It returns the status returned by the command
+ program. The `system()' function executes the command given by
+ the string COMMAND. It returns the status returned by the command
that was executed as its value.
For example, if the following fragment of code is put in your `awk'
@@ -10390,13 +10539,14 @@ parameters are enclosed in square brackets ([ ]):
print COMMAND | "/bin/sh"
close("/bin/sh")
- However, if your `awk' program is interactive, `system' is useful
- for cranking up large self-contained programs, such as a shell or
- an editor. Some operating systems cannot implement the `system'
- function. `system' causes a fatal error if it is not supported.
+ However, if your `awk' program is interactive, `system()' is
+ useful for cranking up large self-contained programs, such as a
+ shell or an editor. Some operating systems cannot implement the
+ `system()' function. `system()' causes a fatal error if it is not
+ supported.
- NOTE: When `--sandbox' is specified, the `system' function is
- disabled.
+ NOTE: When `--sandbox' is specified, the `system()' function
+ is disabled.
Advanced Notes: Interactive Versus Noninteractive Buffering
@@ -10431,17 +10581,17 @@ this example:
Here, no output is printed until after the `Ctrl-d' is typed, because
it is all buffered and sent down the pipe to `cat' in one shot.
-Advanced Notes: Controlling Output Buffering with `system'
-----------------------------------------------------------
+Advanced Notes: Controlling Output Buffering with `system()'
+------------------------------------------------------------
-The `fflush' function provides explicit control over output buffering
+The `fflush()' function provides explicit control over output buffering
for individual files and pipes. However, its use is not portable to
many other `awk' implementations. An alternative method to flush output
-buffers is to call `system' with a null string as its argument:
+buffers is to call `system()' with a null string as its argument:
system("") # flush output
-`gawk' treats this use of the `system' function as a special case and
+`gawk' treats this use of the `system()' function as a special case and
is smart enough not to run a shell (or other command interpreter) with
the empty command. Therefore, with `gawk', this idiom is not only
useful, it is also efficient. While this method should work with other
@@ -10451,7 +10601,7 @@ associated with the standard output and not necessarily all buffered
output.)
If you think about what a programmer expects, it makes sense that
-`system' should flush any pending output. The following program:
+`system()' should flush any pending output. The following program:
BEGIN {
print "first print"
@@ -10471,7 +10621,7 @@ and not:
first print
second print
- If `awk' did not flush its buffers before calling `system', you
+ If `awk' did not flush its buffers before calling `system()', you
would see the latter (undesirable) output.
---------- Footnotes ----------
@@ -10510,7 +10660,7 @@ Optional parameters are enclosed in square brackets ([ ]):
`mktime(DATESPEC)'
This function turns DATESPEC into a timestamp in the same form as
- is returned by `systime'. It is similar to the function of the
+ is returned by `systime()'. It is similar to the function of the
same name in ISO C. The argument, DATESPEC, is a string of the
form `"YYYY MM DD HH MM SS [DST]"'. The string consists of six or
seven numbers representing, respectively, the full year including
@@ -10525,11 +10675,11 @@ Optional parameters are enclosed in square brackets ([ ]):
assumed to be in the local timezone. If the daylight-savings flag
is positive, the time is assumed to be daylight savings time; if
zero, the time is assumed to be standard time; and if negative
- (the default), `mktime' attempts to determine whether daylight
+ (the default), `mktime()' attempts to determine whether daylight
savings time is in effect for the specified time.
If DATESPEC does not contain enough elements or if the resulting
- time is out of range, `mktime' returns -1.
+ time is out of range, `mktime()' returns -1.
`strftime([FORMAT [, TIMESTAMP [, UTC-FLAG]]])'
This function returns a string. It is similar to the function of
@@ -10539,32 +10689,32 @@ Optional parameters are enclosed in square brackets ([ ]):
is formatted as UTC (Coordinated Universal Time, formerly GMT or
Greenwich Mean Time). Otherwise, the value is formatted for the
local time zone. The TIMESTAMP is in the same format as the value
- returned by the `systime' function. If no TIMESTAMP argument is
+ returned by the `systime()' function. If no TIMESTAMP argument is
supplied, `gawk' uses the current time of day as the timestamp.
- If no FORMAT argument is supplied, `strftime' uses
+ If no FORMAT argument is supplied, `strftime()' uses
`"%a %b %d %H:%M:%S %Z %Y"'. This format string produces output
that is (almost) equivalent to that of the `date' utility.
(Versions of `gawk' prior to 3.0 require the FORMAT argument.)
- The `systime' function allows you to compare a timestamp from a log
-file with the current time of day. In particular, it is easy to
+ The `systime()' function allows you to compare a timestamp from a
+log file with the current time of day. In particular, it is easy to
determine how long ago a particular record was logged. It also allows
you to produce log records using the "seconds since the epoch" format.
- The `mktime' function allows you to convert a textual representation
-of a date and time into a timestamp. This makes it easy to do
-before/after comparisons of dates and times, particularly when dealing
-with date and time data coming from an external source, such as a log
-file.
+ The `mktime()' function allows you to convert a textual
+representation of a date and time into a timestamp. This makes it
+easy to do before/after comparisons of dates and times, particularly
+when dealing with date and time data coming from an external source,
+such as a log file.
- The `strftime' function allows you to easily turn a timestamp into
-human-readable information. It is similar in nature to the `sprintf'
+ The `strftime()' function allows you to easily turn a timestamp into
+human-readable information. It is similar in nature to the `sprintf()'
function (*note String Functions::), in that it copies nonformat
specification characters verbatim to the returned string, while
substituting date and time values for format specifications in the
FORMAT string.
- `strftime' is guaranteed by the 1999 ISO C standard(4) to support
+ `strftime()' is guaranteed by the 1999 ISO C standard(4) to support
the following date format specifications:
`%a'
@@ -10718,9 +10868,9 @@ defines a default `"C"' locale, which is an environment that is typical
of what most C programmers are used to.
For systems that are not yet fully standards-compliant, `gawk'
-supplies a copy of `strftime' from the GNU C Library. It supports all
-of the just listed format specifications. If that version is used to
-compile `gawk' (*note Installation::), then the following additional
+supplies a copy of `strftime()' from the GNU C Library. It supports
+all of the just listed format specifications. If that version is used
+to compile `gawk' (*note Installation::), then the following additional
format specifications are available:
`%k'
@@ -10788,7 +10938,7 @@ shell scripts.
(3) Occasionally there are minutes in a year with a leap second,
which is why the seconds can go up to 60.
- (4) As this is a recent standard, not every system's `strftime'
+ (4) As this is a recent standard, not every system's `strftime()'
necessarily supports all of the conversions listed here.
(5) If you don't understand any of this, don't worry about it; these
@@ -10797,9 +10947,9 @@ Other internationalization features are described in *note
Internationalization::.
(6) This is because ISO C leaves the behavior of the C version of
-`strftime' undefined and `gawk' uses the system's version of `strftime'
-if it's there. Typically, the conversion specifier either does not
-appear in the returned string or appears literally.
+`strftime()' undefined and `gawk' uses the system's version of
+`strftime()' if it's there. Typically, the conversion specifier either
+does not appear in the returned string or appears literally.

File: gawk.info, Node: Bitwise Functions, Next: I18N Functions, Prev: Time Functions, Up: Built-in
@@ -10915,7 +11065,7 @@ at the end, it pads the value with zeros to represent multiples of
The main code in the `BEGIN' rule shows the difference between the
decimal and octal values for the same numbers (*note
Nondecimal-numbers::), and then demonstrates the results of the
-`compl', `lshift', and `rshift' functions.
+`compl()', `lshift()', and `rshift()' functions.
---------- Footnotes ----------
@@ -10956,8 +11106,8 @@ brackets ([ ]):
testing). It returns the directory in which DOMAIN is "bound."
The default DOMAIN is the value of `TEXTDOMAIN'. If DIRECTORY is
- the null string (`""'), then `bindtextdomain' returns the current
- binding for the given DOMAIN.
+ the null string (`""'), then `bindtextdomain()' returns the
+ current binding for the given DOMAIN.

File: gawk.info, Node: User-defined, Next: Indirect Calls, Prev: Built-in, Up: Functions
@@ -11145,7 +11295,7 @@ way:
The C `ctime' function takes a timestamp and returns it in a string,
formatted in a well-known fashion. The following example uses the
-built-in `strftime' function (*note Time Functions::) to create an
+built-in `strftime()' function (*note Time Functions::) to create an
`awk' version of `ctime':
# ctime.awk
@@ -11711,7 +11861,7 @@ File: gawk.info, Node: Explaining gettext, Next: Programmer i18n, Prev: I18N
The facilities in GNU `gettext' focus on messages; strings printed by a
program, either directly or via formatting with `printf' or
-`sprintf'.(1)
+`sprintf()'.(1)
When using GNU `gettext', each application has its own "text
domain". This is a unique name, such as `kpilot' or `gawk', that
@@ -11752,7 +11902,7 @@ in this order:
7. For testing and development, it is possible to tell `gettext' to
use `.mo' files in a different directory than the standard one by
- using the `bindtextdomain' function.
+ using the `bindtextdomain()' function.
8. At runtime, `guide' looks up each string via a call to `gettext'.
The returned string is the translated string if available, or the
@@ -11864,9 +12014,9 @@ internationalization:
if you want to use the current domain.
*Caution:* The order of arguments to the `awk' version of the
- `dcgettext' function is purposely different from the order for the
- C version. The `awk' version's order was chosen to be simple and
- to allow for reasonable `awk'-style default arguments.
+ `dcgettext()' function is purposely different from the order for
+ the C version. The `awk' version's order was chosen to be simple
+ and to allow for reasonable `awk'-style default arguments.
`dcngettext(STRING1, STRING2, NUMBER [, DOMAIN [, CATEGORY]])'
This built-in function returns the plural form used for NUMBER of
@@ -11876,7 +12026,7 @@ internationalization:
message. The default value for DOMAIN is the current value of
`TEXTDOMAIN'. The default value for CATEGORY is `"LC_MESSAGES"'.
- The same remarks as for the `dcgettext' function apply.
+ The same remarks as for the `dcgettext()' function apply.
`bindtextdomain(DIRECTORY [, DOMAIN])'
This built-in function allows you to specify the directory in which
@@ -11885,8 +12035,8 @@ internationalization:
returns the directory in which DOMAIN is "bound."
The default DOMAIN is the value of `TEXTDOMAIN'. If DIRECTORY is
- the null string (`""'), then `bindtextdomain' returns the current
- binding for the given DOMAIN.
+ the null string (`""'), then `bindtextdomain()' returns the
+ current binding for the given DOMAIN.
To use these facilities in your `awk' program, follow the steps
outlined in *note Explaining gettext::, like so:
@@ -11909,19 +12059,19 @@ outlined in *note Explaining gettext::, like so:
printf(_"Number of users is %d\n", nusers)
3. If you are creating strings dynamically, you can still translate
- them, using the `dcgettext' built-in function:
+ them, using the `dcgettext()' built-in function:
message = nusers " users logged in"
message = dcgettext(message, "adminprog")
print message
- Here, the call to `dcgettext' supplies a different text domain
+ Here, the call to `dcgettext()' supplies a different text domain
(`"adminprog"') in which to find the message, but it uses the
default `"LC_MESSAGES"' category.
4. During development, you might want to put the `.mo' file in a
private directory for testing. This is done with the
- `bindtextdomain' built-in function:
+ `bindtextdomain()' built-in function:
BEGIN {
TEXTDOMAIN = "guide" # our text domain
@@ -11976,9 +12126,9 @@ option to create the initial `.po' file:
Instead, it parses it as usual and prints all marked strings to
standard output in the format of a GNU `gettext' Portable Object file.
Also included in the output are any constant strings that appear as the
-first argument to `dcgettext' or as the first and second argument to
-`dcngettext'.(1) *Note I18N Example::, for the full list of steps to go
-through to create and test translations for `guide'.
+first argument to `dcgettext()' or as the first and second argument to
+`dcngettext()'.(1) *Note I18N Example::, for the full list of steps to
+go through to create and test translations for `guide'.
---------- Footnotes ----------
@@ -11991,7 +12141,7 @@ File: gawk.info, Node: Printf Ordering, Next: I18N Portability, Prev: String
9.4.2 Rearranging `printf' Arguments
------------------------------------
-Format strings for `printf' and `sprintf' (*note Printf::) present a
+Format strings for `printf' and `sprintf()' (*note Printf::) present a
special problem for translation. Consider the following:(1)
printf(_"String `%s' has %d characters\n",
@@ -12090,9 +12240,10 @@ actually almost portable, requiring very little change:
it.(1) Typically, the variable `_' has the null string (`""') as
its value, leaving the original string constant as the result.
- * By defining "dummy" functions to replace `dcgettext', `dcngettext'
- and `bindtextdomain', the `awk' program can be made to run, but
- all the messages are output in the original language. For example:
+ * By defining "dummy" functions to replace `dcgettext()',
+ `dcngettext()' and `bindtextdomain()', the `awk' program can be
+ made to run, but all the messages are output in the original
+ language. For example:
function bindtextdomain(dir, domain)
{
@@ -12109,16 +12260,16 @@ actually almost portable, requiring very little change:
return (number == 1 ? string1 : string2)
}
- * The use of positional specifications in `printf' or `sprintf' is
+ * The use of positional specifications in `printf' or `sprintf()' is
_not_ portable. To support `gettext' at the C level, many
- systems' C versions of `sprintf' do support positional specifiers.
- But it works only if enough arguments are supplied in the function
- call. Many versions of `awk' pass `printf' formats and arguments
- unchanged to the underlying C library version of `sprintf', but
- only one format and argument at a time. What happens if a
- positional specification is used is anybody's guess. However,
- since the positional specifications are primarily for use in
- _translated_ format strings, and since non-GNU `awk's never
+ systems' C versions of `sprintf()' do support positional
+ specifiers. But it works only if enough arguments are supplied in
+ the function call. Many versions of `awk' pass `printf' formats
+ and arguments unchanged to the underlying C library version of
+ `sprintf()', but only one format and argument at a time. What
+ happens if a positional specification is used is anybody's guess.
+ However, since the positional specifications are primarily for use
+ in _translated_ format strings, and since non-GNU `awk's never
retrieve the translated string, this should not be a problem in
practice.
@@ -12203,8 +12354,8 @@ proper directory so that `gawk' can find it:
-| Like, the scoop is 42
-| Pardon me, Zaphod who?
- If the three replacement functions for `dcgettext', `dcngettext' and
-`bindtextdomain' (*note I18N Portability::) are in a file named
+ If the three replacement functions for `dcgettext()', `dcngettext()'
+and `bindtextdomain()' (*note I18N Portability::) are in a file named
`libintl.awk', then we can run `guide.awk' unchanged as follows:
$ gawk --posix -f guide.awk -f libintl.awk
@@ -12246,9 +12397,9 @@ of a "grab bag" of items that are otherwise unrelated to each other.
First, a command-line option allows `gawk' to recognize nondecimal
numbers in input data, not just in `awk' programs. Next, two-way I/O,
discussed briefly in earlier parts of this Info file, is described in
-full detail, along with the basics of TCP/IP networking and BSD portal
-files. Finally, `gawk' can "profile" an `awk' program, making it
-possible to tune it for performance.
+full detail, along with the basics of TCP/IP networking. Finally,
+`gawk' can "profile" an `awk' program, making it possible to tune it
+for performance.
*note Dynamic Extensions::, discusses the ability to dynamically add
new built-in functions to `gawk'. As this feature is still immature
@@ -12259,7 +12410,6 @@ and likely to change, its description is relegated to an appendix.
* Nondecimal Data:: Allowing nondecimal input data.
* Two-way I/O:: Two-way communications with another process.
* TCP/IP Networking:: Using `gawk' for network programming.
-* Portal Files:: Using `gawk' with BSD portals.
* Profiling:: Profiling your `awk' programs.

@@ -12299,7 +12449,7 @@ leave this facility disabled. If you want it, you must explicitly
request it.
*Caution:* _Use of this option is not recommended._ It can break old
-programs very badly. Instead, use the `strtonum' function to convert
+programs very badly. Instead, use the `strtonum()' function to convert
your data (*note Nondecimal-numbers::). This makes your programs
easier to write and easier to read, and leads to less surprising
results.
@@ -12383,7 +12533,7 @@ or pipeline of programs, that can be started by the shell.
waiting for the other one to do something.
It is possible to close just one end of the two-way pipe to a
-coprocess, by supplying a second argument to the `close' function of
+coprocess, by supplying a second argument to the `close()' function of
either `"to"' or `"from"' (*note Close Files And Pipes::). These
strings tell `gawk' to close the end of the pipe that sends data to the
process or the end that reads from it, respectively.
@@ -12442,7 +12592,7 @@ regular pipes.
`csh'.

-File: gawk.info, Node: TCP/IP Networking, Next: Portal Files, Prev: Two-way I/O, Up: Advanced Features
+File: gawk.info, Node: TCP/IP Networking, Next: Profiling, Prev: Two-way I/O, Up: Advanced Features
10.3 Using `gawk' for Network Programming
=========================================
@@ -12517,24 +12667,9 @@ programming is documented separately. *Note Top::, for a much more
complete introduction and discussion, as well as extensive examples.

-File: gawk.info, Node: Portal Files, Next: Profiling, Prev: TCP/IP Networking, Up: Advanced Features
-
-10.4 Using `gawk' with BSD Portals
-==================================
-
-Similar to the `/inet' special files, if `gawk' is configured with the
-`--enable-portals' option (*note Quick Installation::), then `gawk'
-treats files whose pathnames begin with `/p' as 4.4 BSD-style portals.
-
- When used with the `|&' operator, `gawk' opens the file for two-way
-communications. The operating system's portal mechanism then manages
-creating the process associated with the portal and the corresponding
-communications with the portal's process.
-
-
-File: gawk.info, Node: Profiling, Prev: Portal Files, Up: Advanced Features
+File: gawk.info, Node: Profiling, Prev: TCP/IP Networking, Up: Advanced Features
-10.5 Profiling Your `awk' Programs
+10.4 Profiling Your `awk' Programs
==================================
Beginning with version 3.1 of `gawk', you may produce execution traces
@@ -12774,6 +12909,7 @@ full details.
* AWKPATH Variable:: Searching directories for `awk'
programs.
* Exit Status:: `gawk''s exit status.
+* Include Files:: Including other files into your program.
* Obsolete:: Obsolete Options and/or features.
* Undocumented:: Undocumented Options and Features.
* Known Bugs:: Known Bugs in `gawk'.
@@ -12876,7 +13012,6 @@ The following list describes `gawk'-specific options:
an easy way to tell `gawk': "hands off my data!".
`-c'
-`--compat'
`--traditional'
Specifies "compatibility mode", in which the GNU extensions to the
`awk' language are disabled, so that `gawk' behaves just like the
@@ -12886,7 +13021,6 @@ The following list describes `gawk'-specific options:
`-C'
`--copyright'
-`--copyleft'
Print the short version of the General Public License and then
exit.
@@ -12940,11 +13074,10 @@ The following list describes `gawk'-specific options:
`-h'
`--help'
-`--usage'
Prints a "usage" message summarizing the short and long style
options that `gawk' accepts and then exit.
-`-l [value]'
+`-L [value]'
`--lint[=value]'
Warns about constructs that are dubious or nonportable to other
`awk' implementations. Some warnings are issued when `gawk' first
@@ -12963,11 +13096,6 @@ The following list describes `gawk'-specific options:
inappropriate construct. As `awk' programs are usually short,
doing so is not burdensome.
-`-L'
-`--lint-old'
- Warns about constructs that are not available in the original
- version of `awk' from Version 7 Unix (*note V7/SVR3.1::).
-
`-n'
`--non-decimal-data'
Enable automatic interpretation of octal and hexadecimal values in
@@ -13029,7 +13157,7 @@ The following list describes `gawk'-specific options:
* The locale's decimal point character is used for parsing input
data (*note Locales::).
- * The `fflush' built-in function is not supported (*note I/O
+ * The `fflush()' built-in function is not supported (*note I/O
Functions::).
If you supply both `--traditional' and `--posix' on the command
@@ -13045,13 +13173,18 @@ The following list describes `gawk'-specific options:
`-S'
`--sandbox'
- In sandbox mode, the `system' function, input redirections with
+ In sandbox mode, the `system()' function, input redirections with
`getline', output redirections with `print' and `printf' and
dynamic extensions are disabled. This is particularly useful when
you want to run `awk' scripts from questionable sources and need
to make sure the scripts can't access your system (other then the
specified input data file).
+`-t'
+`--lint-old'
+ Warns about constructs that are not available in the original
+ version of `awk' from Version 7 Unix (*note V7/SVR3.1::).
+
`-V'
`--version'
Prints version information for this particular copy of `gawk'.
@@ -13099,7 +13232,7 @@ environment variable to turn on strict POSIX mode. If `--lint' is
supplied on the command line and `gawk' turns on POSIX mode because of
`POSIXLY_CORRECT', then it issues a warning message indicating that
POSIX mode is in effect. You would typically set this variable in your
-shell's startup file. For a Bourne-compatible shell (such as `bash'),
+shell's startup file. For a Bourne-compatible shell (such as Bash),
you would add these lines to the `.profile' file in your home directory:
POSIXLY_CORRECT=true
@@ -13235,7 +13368,7 @@ the value of `$(datadir)' generated when `gawk' was configured. You
probably don't need to worry about this, though.

-File: gawk.info, Node: Exit Status, Next: Obsolete, Prev: AWKPATH Variable, Up: Invoking Gawk
+File: gawk.info, Node: Exit Status, Next: Include Files, Prev: AWKPATH Variable, Up: Invoking Gawk
11.5 `gawk''s Exit Status
=========================
@@ -13253,9 +13386,105 @@ with the value of the C constant `EXIT_SUCCESS'. This is usually zero.
non-POSIX systems, this value may be mapped to `EXIT_FAILURE'.

-File: gawk.info, Node: Obsolete, Next: Undocumented, Prev: Exit Status, Up: Invoking Gawk
+File: gawk.info, Node: Include Files, Next: Obsolete, Prev: Exit Status, Up: Invoking Gawk
-11.6 Obsolete Options and/or Features
+11.6 Including Other Files Into Your Program
+============================================
+
+*FIXME:* This section still needs some editing.
+
+ Beginning with version *FIXME:* 3.1.8-bc of `gawk', the `@include'
+keyword can be used to read external source `awk' files. That gives
+the ability to split huge `awk' source files into smaller and
+manageable files and also to reuse common `awk' code from various `awk'
+scripts. In other words, you can group together `awk' functions, used
+to carry out some sort of tasks, in external files. These files can be
+used just like function libraries, using the `@include' keyword in
+conjuction with the `AWKPATH' environment variable.
+
+ Let's see an example to demonstrate file inclusion in `gawk'. To do
+so, we'll use two (trivial) `awk' scripts, namely the `test1' and
+`test2' `gawk' scripts. Here follows the `test1' `gawk' script file:
+
+ BEGIN {
+ print "This is script test1."
+ }
+
+and the `test2' file:
+
+ @include "test1"
+ BEGIN {
+ print "This is script test2."
+ }
+
+ Running `gawk' with the `test2' script you'll get the following
+result:
+
+ $ gawk -f test2
+ -| This is file test1.
+ -| This is file test2.
+
+ `gawk' runs the `test2' script where `test1' has been included in
+the source of `test2' by means of the `@include' keyword. So, to
+include external `awk' source files you just use `@include' followed by
+the name of the file to be included in double quotes.
+
+ NOTE: Keep in mind that this is a language construct and the file
+ name cannot be a string variable, but rather just a literal string
+ in double quotes.
+
+ The files to be included may be nested; e.g. given a third script,
+namely `test3':
+
+ @include "test2"
+ BEGIN {
+ print "This is script test3."
+ }
+
+and running `gawk' with the `test3' script you'll get the following
+result:
+
+ $ gawk -f test3
+ -| This is file test1.
+ -| This is file test2.
+ -| This is file test3.
+
+ The file name can, of course, be a pathname, e.g.
+
+ @include "../io_funcs"
+
+or
+
+ @include "/usr/awklib/network"
+
+are valid. The `AWKPATH' environment variable can be of great value in
+`@include' constructs. The same rules dominating the use of `AWKPATH'
+variable in command line file searches are valid in `@include'
+constructs too. That can be prooved very helpful in constructing `gawk'
+function libraries. You can edit huge scripts containing usefull
+`gawk' libraries and put those files in a special directory. You can
+then include those "libraries" using either the full pathnames of the
+files or by setting accordingly the `AWKPATH' environment variable and
+then use `@include' with just the name part of the full file pathname.
+Of course you can have more than one directory to keep library files;
+the more complex the working enviroment is, the more directories you
+need to organize the files to be included.
+
+ The whole stuff of file inclusion can, of course, be carried out in
+the command line, using as many `-f' options as required with the files
+to be included as arguments, but the `@include' keyword can help you in
+constructing self-contained `gawk' programs, thus reducing the need of
+writing complex and tedious command lines.
+
+ `AWKPATH' is also used by the `@include' mechanism, that is the
+files to be included will be seeked in the directories specified. Keep
+in mind, however, that the current directory is been searched first,
+either it's listed in the `AWKPATH' string or not.
+
+
+File: gawk.info, Node: Obsolete, Next: Undocumented, Prev: Include Files, Up: Invoking Gawk
+
+11.7 Obsolete Options and/or Features
=====================================
This minor node describes features and/or command-line options from
@@ -13274,7 +13503,7 @@ worked. As of version 3.2, they are no longer interpreted specially by

File: gawk.info, Node: Undocumented, Next: Known Bugs, Prev: Obsolete, Up: Invoking Gawk
-11.7 Undocumented Options and Features
+11.8 Undocumented Options and Features
======================================
Use the Source, Luke!
@@ -13285,7 +13514,7 @@ File: gawk.info, Node: Undocumented, Next: Known Bugs, Prev: Obsolete, Up: I

File: gawk.info, Node: Known Bugs, Prev: Undocumented, Up: Invoking Gawk
-11.8 Known Bugs in `gawk'
+11.9 Known Bugs in `gawk'
=========================
* The `-F' option for changing the value of `FS' (*note Options::)
@@ -13462,12 +13691,12 @@ programming use.
* Nextfile Function:: Two implementations of a `nextfile'
function.
-* Strtonum Function:: A replacement for the built-in `strtonum'
- function.
+* Strtonum Function:: A replacement for the built-in
+ `strtonum()' function.
* Assert Function:: A function for assertions in `awk'
programs.
-* Round Function:: A function for rounding if `sprintf' does
- not do it correctly.
+* Round Function:: A function for rounding if `sprintf()'
+ does not do it correctly.
* Cliff Random Function:: The Cliff Random Number Generator.
* Ordinal Functions:: Functions for using characters as numbers and
vice versa.
@@ -13568,7 +13797,7 @@ File: gawk.info, Node: Strtonum Function, Next: Assert Function, Prev: Nextfi
12.2.2 Converting Strings To Numbers
------------------------------------
-The `strtonum' function (*note String Functions::) is a `gawk'
+The `strtonum()' function (*note String Functions::) is a `gawk'
extension. The following function provides an implementation for other
versions of `awk':
@@ -13633,7 +13862,7 @@ computing the return value.
Similar logic applies to the code that checks for and converts a
hexadecimal value, which starts with `0x' or `0X'. The use of
-`tolower' simplifies the computation for finding the correct numeric
+`tolower()' simplifies the computation for finding the correct numeric
value for each hexadecimal digit.
Finally, if the string matches the (rather complicated) regex for a
@@ -13642,7 +13871,7 @@ regular decimal integer or floating-point number, the computation `ret
A commented-out test program is included, so that the function can
be tested with `gawk' and the results compared to the built-in
-`strtonum' function.
+`strtonum()' function.

File: gawk.info, Node: Assert Function, Next: Round Function, Prev: Strtonum Function, Up: General Functions
@@ -13735,15 +13964,15 @@ File: gawk.info, Node: Round Function, Next: Cliff Random Function, Prev: Ass
12.2.4 Rounding Numbers
-----------------------
-The way `printf' and `sprintf' (*note Printf::) perform rounding often
-depends upon the system's C `sprintf' subroutine. On many machines,
-`sprintf' rounding is "unbiased," which means it doesn't always round a
-trailing `.5' up, contrary to naive expectations. In unbiased
-rounding, `.5' rounds to even, rather than always up, so 1.5 rounds to
-2 but 4.5 rounds to 4. This means that if you are using a format that
-does rounding (e.g., `"%.0f"'), you should check what your system does.
-The following function does traditional rounding; it might be useful if
-your awk's `printf' does unbiased rounding:
+The way `printf' and `sprintf()' (*note Printf::) perform rounding
+often depends upon the system's C `sprintf()' subroutine. On many
+machines, `sprintf()' rounding is "unbiased," which means it doesn't
+always round a trailing `.5' up, contrary to naive expectations. In
+unbiased rounding, `.5' rounds to even, rather than always up, so 1.5
+rounds to 2 but 4.5 rounds to 4. This means that if you are using a
+format that does rounding (e.g., `"%.0f"'), you should check what your
+system does. The following function does traditional rounding; it
+might be useful if your awk's `printf' does unbiased rounding:
# round.awk --- do normal rounding
function round(x, ival, aval, fraction)
@@ -13799,7 +14028,7 @@ less than 10 lines of `awk' code:
This algorithm requires an initial "seed" of 0.1. Each new value
uses the current seed as input for the calculation. If the built-in
-`rand' function (*note Numeric Functions::) isn't random enough, you
+`rand()' function (*note Numeric Functions::) isn't random enough, you
might try using this function instead.

@@ -13909,7 +14138,7 @@ but it should also have a reasonable default behavior. It is called
with an array as well as the beginning and ending indices of the
elements in the array to be merged. This assumes that the array
indices are numeric--a reasonable assumption since the array was likely
-created with `split' (*note String Functions::):
+created with `split()' (*note String Functions::):
# join.awk --- join an array into a string
function join(array, start, end, sep, result, i)
@@ -13945,9 +14174,9 @@ File: gawk.info, Node: Gettimeofday Function, Prev: Join Function, Up: Genera
12.2.8 Managing the Time of Day
-------------------------------
-The `systime' and `strftime' functions described in *note Time
+The `systime()' and `strftime()' functions described in *note Time
Functions::, provide the minimum functionality necessary for dealing
-with the time of day in human readable form. While `strftime' is
+with the time of day in human readable form. While `strftime()' is
extensive, the control formats are not necessarily easy to remember or
intuitively obvious when reading a program.
@@ -14016,9 +14245,9 @@ current time formatted in the same way as the `date' utility:
}
The string indices are easier to use and read than the various
-formats required by `strftime'. The `alarm' program presented in *note
-Alarm Program::, uses this function. A more general design for the
-`gettimeofday' function would have allowed the user to supply an
+formats required by `strftime()'. The `alarm' program presented in
+*note Alarm Program::, uses this function. A more general design for
+the `gettimeofday' function would have allowed the user to supply an
optional timestamp value to use instead of the current time.

@@ -14388,7 +14617,7 @@ to process both normal and GNU-style long options (*note Options::).
handy in `awk' programs as well. Following is an `awk' version of
`getopt'. This function highlights one of the greatest weaknesses in
`awk', which is that it is very poor at manipulating single characters.
-Repeated calls to `substr' are necessary for accessing individual
+Repeated calls to `substr()' are necessary for accessing individual
characters (*note String Functions::).(1)
The discussion that follows walks through the code a bit at a time:
@@ -14468,7 +14697,7 @@ one at a time.
If `_opti' is equal to zero, it is set to two, which is the index in
the string of the next character to look at (we skip the `-', which is
at position one). The variable `thisopt' holds the character, obtained
-with `substr'. It is saved in `Optopt' for the main program to use.
+with `substr()'. It is saved in `Optopt' for the main program to use.
If `thisopt' is not in the `options' string, then it is an invalid
option. If `Opterr' is nonzero, `getopt' prints an error message on
@@ -14575,7 +14804,7 @@ use `getopt' to process their arguments.
(1) This function was written before `gawk' acquired the ability to
split strings into single characters using `""' as the separator. We
-have left it alone, since using `substr' is more portable.
+have left it alone, since using `substr()' is more portable.

File: gawk.info, Node: Passwd Functions, Next: Group Functions, Prev: Getopt Function, Up: Library Functions
@@ -14649,7 +14878,7 @@ Full name The user's full name, and perhaps other
Home directory The user's login (or "home") directory
(familiar to shell programmers as `$HOME').
Login shell The program that is run when the user logs in.
- This is usually a shell, such as `bash'.
+ This is usually a shell, such as Bash.
A few lines representative of `pwcat''s output are as follows:
@@ -15045,7 +15274,7 @@ very simple, relying on `awk''s associative arrays to do work.
The `id' program in *note Id Program::, uses these functions.

-File: gawk.info, Node: Sample Programs, Next: Language History, Prev: Library Functions, Up: Top
+File: gawk.info, Node: Sample Programs, Next: Debugger, Prev: Library Functions, Up: Top
13 Practical `awk' Programs
***************************
@@ -15366,8 +15595,8 @@ out between the fields:
This version of `cut' relies on `gawk''s `FIELDWIDTHS' variable to
do the character-based cutting. While it is possible in other `awk'
-implementations to use `substr' (*note String Functions::), it is also
-extremely painful. The `FIELDWIDTHS' variable supplies an elegant
+implementations to use `substr()' (*note String Functions::), it is
+also extremely painful. The `FIELDWIDTHS' variable supplies an elegant
solution to the problem of picking the input line apart by characters.

@@ -15713,8 +15942,8 @@ File: gawk.info, Node: Split Program, Next: Tee Program, Prev: Id Program, U
13.2.4 Splitting a Large File into Pieces
-----------------------------------------
-The `split' program splits large text files into smaller pieces. Usage
-is as follows:
+The `split()' program splits large text files into smaller pieces.
+Usage is as follows:
split [-COUNT] file [ PREFIX ]
@@ -15726,7 +15955,7 @@ lines in them instead of 1000. To change the name of the output files
to something like `myfileaa', `myfileab', and so on, supply an
additional argument that specifies the file name prefix.
- Here is a version of `split' in `awk'. It uses the `ord' and `chr'
+ Here is a version of `split()' in `awk'. It uses the `ord' and `chr'
functions presented in *note Ordinal Functions::.
The program first sets its defaults, and then tests to make sure
@@ -15911,7 +16140,7 @@ usage is as follows:
The options for `uniq' are:
`-d'
- Pnly print only repeated lines.
+ Print only repeated lines.
`-u'
Print only nonrepeated lines.
@@ -16024,13 +16253,13 @@ characters. If no field count and no character count are specified,
`are_equal' simply returns one or zero depending upon the result of a
simple string comparison of `last' and `$0'. Otherwise, things get more
complicated. If fields have to be skipped, each line is broken into an
-array using `split' (*note String Functions::); the desired fields are
-then joined back into a line using `join'. The joined lines are stored
-in `clast' and `cline'. If no fields are skipped, `clast' and `cline'
-are set to `last' and `$0', respectively. Finally, if characters are
-skipped, `substr' is used to strip off the leading `charcount'
-characters in `clast' and `cline'. The two strings are then compared
-and `are_equal' returns the result:
+array using `split()' (*note String Functions::); the desired fields
+are then joined back into a line using `join'. The joined lines are
+stored in `clast' and `cline'. If no fields are skipped, `clast' and
+`cline' are set to `last' and `$0', respectively. Finally, if
+characters are skipped, `substr()' is used to strip off the leading
+`charcount' characters in `clast' and `cline'. The two strings are
+then compared and `are_equal' returns the result:
function are_equal( n, m, clast, cline, alast, aline)
{
@@ -16429,7 +16658,7 @@ alarm:
exit 1
}
- Finally, the program uses the `system' function (*note I/O
+ Finally, the program uses the `system()' function (*note I/O
Functions::) to call the `sleep' utility. The `sleep' utility simply
pauses for the given number of seconds. If the exit status is not zero,
the program assumes that `sleep' was interrupted and exits. If `sleep'
@@ -16481,9 +16710,9 @@ most of the job.
The `translate' program demonstrates one of the few weaknesses of
standard `awk': dealing with individual characters is very painful,
-requiring repeated use of the `substr', `index', and `gsub' built-in
-functions (*note String Functions::).(2) There are two functions. The
-first, `stranslate', takes three arguments:
+requiring repeated use of the `substr()', `index()', and `gsub()'
+built-in functions (*note String Functions::).(2) There are two
+functions. The first, `stranslate', takes three arguments:
`from'
A list of characters from which to translate.
@@ -16559,10 +16788,10 @@ record:
function, it is not necessarily efficient, and we (the `gawk' authors)
started to consider adding a built-in function. However, shortly after
writing this program, we learned that the System V Release 4 `awk' had
-added the `toupper' and `tolower' functions (*note String Functions::).
-These functions handle the vast majority of the cases where character
-transliteration is necessary, and so we chose to simply add those
-functions to `gawk' as well and then leave well enough alone.
+added the `toupper()' and `tolower()' functions (*note String
+Functions::). These functions handle the vast majority of the cases
+where character transliteration is necessary, and so we chose to simply
+add those functions to `gawk' as well and then leave well enough alone.
An obvious improvement to this program would be to set up the `t_ar'
array only once, in a `BEGIN' rule. However, this assumes that the
@@ -16741,8 +16970,8 @@ itself on real text files:
having an alphabetized table of how frequently each word occurs.
The way to solve these problems is to use some of `awk''s more
-advanced features. First, we use `tolower' to remove case
-distinctions. Next, we use `gsub' to remove punctuation characters.
+advanced features. First, we use `tolower()' to remove case
+distinctions. Next, we use `gsub()' to remove punctuation characters.
Finally, we use the system `sort' utility to process the output of the
`awk' script. Here is the new version of the program:
@@ -16874,9 +17103,9 @@ input files:
The following program, `extract.awk', reads through a Texinfo source
file and does two things, based on the special comments. Upon seeing
`@c system ...', it runs a command, by extracting the command text from
-the control line and passing it on to the `system' function (*note I/O
-Functions::). Upon seeing `@c file FILENAME', each subsequent line is
-sent to the file FILENAME, until `@c endfile' is encountered. The
+the control line and passing it on to the `system()' function (*note
+I/O Functions::). Upon seeing `@c file FILENAME', each subsequent line
+is sent to the file FILENAME, until `@c endfile' is encountered. The
rules in `extract.awk' match either `@c' or `@comment' by letting the
`omment' part be optional. Lines containing `@group' and `@end group'
are simply removed. `extract.awk' uses the `join' library function
@@ -16911,7 +17140,7 @@ looks something like this:
`extract.awk' begins by setting `IGNORECASE' to one, so that mixed
upper- and lowercase letters in the directives won't matter.
- The first rule handles calling `system', checking that a command is
+ The first rule handles calling `system()', checking that a command is
given (`NF' is at least three) and also checking that the command exits
with a zero exit status, signifying OK:
@@ -16956,7 +17185,7 @@ comments within examples are also ignored.
Most of the work is in the following few lines. If the line has no
`@' symbols, the program can print it directly. Otherwise, each
leading `@' must be stripped off. To remove the `@' symbols, the line
-is split into separate elements of the array `a', using the `split'
+is split into separate elements of the array `a', using the `split()'
function (*note String Functions::). The `@' symbol is used as the
separator character. Each element of `a' that is empty indicates two
successive `@' symbols in the original line. For each two empty
@@ -17047,7 +17276,7 @@ middle of a pipeline:
Here, `s/old/new/g' tells `sed' to look for the regexp `old' on each
input line and globally replace it with the text `new', i.e., all the
-occurrences on a line. This is similar to `awk''s `gsub' function
+occurrences on a line. This is similar to `awk''s `gsub()' function
(*note String Functions::).
The following program, `awksed.awk', accepts at least two
@@ -17525,7 +17754,1042 @@ following copyright terms:
We leave it to you to determine what the program does.

-File: gawk.info, Node: Language History, Next: Installation, Prev: Sample Programs, Up: Top
+File: gawk.info, Node: Debugger, Next: Language History, Prev: Sample Programs, Up: Top
+
+14 `dgawk': The `awk' Debugger
+******************************
+
+It would be nice if computer programs worked perfectly the first time
+they were run, but in real life, this rarely happens for programs of
+any complexity. Thus, most programming languages have facilities
+available for "debugging" programs, and now `awk' is no exception.
+
+ The `dgawk' debugger is purposely modeled after the GNU Debugger
+(GDB) command-line debugger. If you are familiar with GDB, learning
+`dgawk' is easy.
+
+* Menu:
+
+* Debugging:: Introduction to `dgawk'.
+* Sample dgawk session:: Sample `dgawk' session.
+* List of Debugger Commands:: Main `dgawk' Commands.
+* Readline Support:: Readline Support.
+* Dgawk Limitations:: Limitations and future plans.
+
+
+File: gawk.info, Node: Debugging, Next: Sample dgawk session, Up: Debugger
+
+14.1 Introduction to `dgawk'
+============================
+
+* Menu:
+
+* Debugging Concepts:: Debugging In General.
+* Debugging Terms:: Additional Debugging Concepts.
+* Awk Debugging:: Awk Debugging.
+
+
+File: gawk.info, Node: Debugging Concepts, Next: Debugging Terms, Up: Debugging
+
+14.1.1 Debugging In General
+---------------------------
+
+(If you have used debuggers in other languages, you may want to skip
+ahead to the next section on the specific features of the `awk'
+debugger.)
+
+ Of course, a debugging program cannot remove bugs for you, since it
+has no way of knowing what you or your users consider a "bug" and what
+is a "feature." (Sometimes, we humans have a hard time with this
+ourselves.) In that case, what can you expect from such a tool? The
+answer to that depends on the language being debugged, but in general,
+it includes at least the following:
+
+ * The ability to watch a program execute its instructions one by one,
+ giving you, the programmer, the opportunity to think about what is
+ happening on a time scale of seconds, minutes, or hours, rather
+ than the nanosecond time scale at which the code usually runs.
+
+ * The opportunity to not only passively observe the operation of your
+ program, but to control it and try different paths of execution,
+ without having to change your source files.
+
+ * The chance to see the values of data in the program at any point in
+ execution, and also to change that data on the fly, to see how that
+ effects what happens afterwards. (This often includes the ability
+ to look at internal data structures besides the variables you
+ actually defined in your code.)
+
+ * The ability to obtain additional information about your program's
+ state or even its internal structure.
+
+ All of these tools provide a great amount of help in using your own
+skills and understanding of the goals of your program to find where it
+is going wrong (or, for that matter, to better comprehend a perfectly
+functional program that you or someone else wrote.)
+
+
+File: gawk.info, Node: Debugging Terms, Next: Awk Debugging, Prev: Debugging Concepts, Up: Debugging
+
+14.1.2 Additional Debugging Concepts
+------------------------------------
+
+Before diving in to the details, we need to introduce a few more
+important concepts that apply to just about all debuggers, including
+`dgawk'.
+
+"Stack Frame"
+ Programs generally call functions during the course of their
+ execution. One function can call another, or a function can call
+ itself (recursion). You can view the chain of called functions
+ (main program calls A, which calls B, which calls C), as a stack
+ of executing functions: the currently running function is the
+ topmost one on the stack, and when it finishes (returns), the next
+ one down then becomes the active function. Such a stack is termed
+ a "call stack".
+
+ For each function on the call stack, the system maintains a data
+ area that contains the function's parameters, local variables, and
+ return value, as well as any other "bookkeeping" information
+ needed to manage the call stack. This data area is termed a
+ "stack frame".
+
+ `gawk' also follows this model, and `dgawk' gives you access to
+ the call stack and to each stack frame. You can see the call
+ stack, as well as from where each function on the stack was
+ invoked. Commands that print the call stack print information about
+ each stack frame (as detailed later on).
+
+"Breakpoint"
+ During debugging, you often wish to let the program run until it
+ reaches a certain point, and then continue execution from there one
+ statement (or instruction) at a time. The way to do this is to set
+ a "breakpoint" within the program. A breakpoint is where the
+ execution of the program should break off (stop), so that you can
+ take over control of the program's execution. You can add and
+ remove as many breakpoints as you like.
+
+"Watchpoint"
+ A watchpoint is similar to a breakpoint. The difference is that
+ breakpoints are oriented around the code: stop when a certain
+ point in the code is reached. A watchpoint, however, specifies
+ that program execution should stop when a _data value_ is changed.
+ This is useful, since sometimes it happens that a variable
+ receives an erroneous value, and it's hard to track down where
+ this happens just by looking at the code. By using a watchpoint,
+ you can stop whenever a variable is assigned to, and usually find
+ the errant code quite quickly.
+
+
+File: gawk.info, Node: Awk Debugging, Prev: Debugging Terms, Up: Debugging
+
+14.1.3 Awk Debugging
+--------------------
+
+Debugging an `awk' program has some specific aspects that are not
+shared with other programming languages.
+
+ First of all, the fact that `awk' programs usually take input
+line-by-line from a file or files and operate on those lines using
+specific rules makes it especially useful to organize viewing the
+execution of the program in terms of these rules. As we will see, each
+`awk' rule is treated almost like a function call, with its own
+specific block of instructions.
+
+ In addition, since `awk' is by design a very concise language, it is
+easy to lose sight of everything that is going on "inside" each line of
+`awk' code. The debugger provides the opportunity to look at the
+individual primitive instructions carried out by the higher-level `awk'
+commands.
+
+
+File: gawk.info, Node: Sample dgawk session, Next: List of Debugger Commands, Prev: Debugging, Up: Debugger
+
+14.2 Sample `dgawk' session
+===========================
+
+In order to illustrate the use of `dgawk', let's look at a sample
+debugging session. We will use the `awk' implementation of the POSIX
+`uniq' command described earlier (*note Uniq Program::) as our example.
+
+* Menu:
+
+* dgawk invocation:: `dgawk' Invocation.
+* Finding The Bug:: Finding The Bug.
+
+
+File: gawk.info, Node: dgawk invocation, Next: Finding The Bug, Up: Sample dgawk session
+
+14.2.1 `dgawk' Invocation
+-------------------------
+
+Starting `dgawk' is exactly like running `awk'. The file(s) containing
+the program and any supporting code are given on the command line as
+arguments to one or more `-f' options. (`dgawk' is not designed to
+debug command-line programs, only programs contained in files.) In our
+case, we call `dgawk' like this:
+
+ $ dgawk -f getopt.awk -f join.awk -f uniq.awk inputfile
+
+where both `getopt.awk' and `uniq.awk' are in `$AWKPATH'. (Experienced
+users of `gdb' or similar debuggers should note that this syntax is
+slightly different from what they are used to. With `dgawk', the
+arguments for running the program are given in the command line to the
+debugger rather than as part of the `run' command at the debugger
+prompt.)
+
+ Instead of immediately running the program on `inputfile', as `gawk'
+would ordinarily do, `dgawk' merely loads all the program source files,
+compiles them internally, and then gives us a prompt:
+
+ dgawk>
+
+from which we can issue commands to the debugger. At this point, no
+code has been executed.
+
+
+File: gawk.info, Node: Finding The Bug, Prev: dgawk invocation, Up: Sample dgawk session
+
+14.2.2 Finding The Bug
+----------------------
+
+Let's say that we are having a problem using (a faulty version of)
+`uniq.awk' in the "field-skipping" mode, and it doesn't seem to be
+catching lines which should be identical when skipping the first field,
+such as:
+
+ awk is a wonderful program!
+ gawk is a wonderful program!
+
+ This could happen if we were thinking (C-like) of the fields in a
+record as being numbered in a zero-based fashion, so instead of the
+lines:
+
+ clast = join(alast, fcount+1, n)
+ cline = join(aline, fcount+1, m)
+
+we wrote:
+
+ clast = join(alast, fcount, n)
+ cline = join(aline, fcount, m)
+
+ The first thing we usually want to do when trying to investigate a
+problem like this is to put a breakpoint in the program so that we can
+watch it at work and catch what it is doing wrong. A reasonable spot
+for a breakpoint in `uniq.awk' is at the beginning of the function
+`are_equal', which compares the current line with the previous one. To
+set the breakpoint, use the `b' (breakpoint) command:
+
+ dgawk> b are_equal
+ -| Breakpoint 1 set at file `awklib/eg/prog/uniq.awk', line 64
+
+ The debugger tells us the file and line number where the breakpoint
+is. Now type `r' or `run' and the program runs until it hits the
+breakpoint the first time:
+
+ dgawk> r
+ -| Starting program:
+ -| Stopping in Rule ...
+ -| Breakpoint 1, are_equal(n, m, clast, cline, alast, aline) at `awklib/eg/prog/uniq.awk':64
+ -| 64 if (fcount == 0 && charcount == 0)
+ dgawk>
+
+ Now we can look at what's going on inside our program. First of all,
+let's see how we got to where we are. At the prompt, we type `bt'
+(short for "backtrace"), and `dgawk' responds with a listing of the
+current stack frames:
+
+ dgawk> bt
+ -| #0 are_equal(n, m, clast, cline, alast, aline) at `awklib/eg/prog/uniq.awk':69
+ -| #1 in main() at `awklib/eg/prog/uniq.awk':89
+
+ This tells us that `are_equal' was called by the main program at
+line 89 of `uniq.awk'. (This is not a big surprise, since this is the
+only call to `are_equal' in the program, but in more complex programs,
+knowing who called a function and with what parameters can be the key
+to finding the source of the problem.)
+
+ Now that we're in `are_equal', we can start looking at the values of
+some variables. Let's say we type `p n' (`p' is short for "print").
+We would expect to see the value of `n', a parameter to `are_equal'.
+Actually, `dgawk' gives us:
+
+ dgawk> p n
+ -| n = untyped variable
+
+In this case, `n' is an uninitialized local variable, since the
+function was called without arguments (*note Function Calls::).
+
+ A more useful variable to display might be the current record:
+
+ dgawk> p $0
+ -| $0 = string ("gawk is a wonderful program!")
+
+This might be a bit puzzling at first since this is the second line of
+our test input above. Let's look at `NR':
+
+ dgawk> p NR
+ -| NR = number (2)
+
+So we can see that `are_equal' was only called for the second record of
+the file. Of course, this is because our program contained a rule for
+`NR == 1':
+
+ NR == 1 {
+ last = $0
+ next
+ }
+
+ OK, let's just check that that rule worked correctly:
+
+ dgawk> p last
+ -| last = string ("awk is a wonderful program!")
+
+ Everything we have done so far has verified that the program has
+worked as planned, up to and including the call to `are_equal', so the
+problem must be inside this function. To investigate further, we have
+to begin "stepping through" the lines of `are_equal'. We start by
+typing `n' (for "next"):
+
+ dgawk> n
+ -| 67 if (fcount > 0) {
+
+ This tells us that `gawk' is now ready to execute line 67, which
+decides whether to give the lines the special "field skipping" treatment
+indicated by the `-f' command-line option. (Notice that we skipped
+from where we were before at line 64 to here, since the condition in
+line 64
+
+ if (fcount == 0 && charcount == 0)
+
+was false.)
+
+ Continuing to step, we now get to the splitting of the current and
+last records:
+
+ dgawk> n
+ -| 68 n = split(last, alast)
+ dgawk> n
+ -| 69 m = split($0, aline)
+
+ At this point, we should be curious to see what our records were
+split into, so we try to look:
+
+ dgawk> p n m alast aline
+ -| n = number (5)
+ -| m = number (5)
+ -| alast = array, 5 elements
+ -| aline = array, 5 elements
+
+(The `p' command can take more than one argument, similar to `awk''s
+`print' statement.)
+
+ This is kind of disappointing, though. All we found out is that
+there are five elements in each of our arrays. Useful enough (we now
+know that none of the words were accidentally left out), but what if we
+want to see inside the array?
+
+ The first choice would be to use subscripts:
+
+ dgawk> p alast[0]
+ -| "0" not in array `alast'
+
+Oops!
+
+ dgawk> p alast[1]
+ -| alast["1"] = string ("awk")
+
+ This would be kind of slow for a 100-member array, though, so
+`dgawk' provides a shortcut (reminiscent of another language not to be
+mentioned):
+
+ dgawk> p @alast
+ -| alast["4"] = string ("wonderful")
+ -| alast["5"] = string ("program!")
+ -| alast["1"] = string ("awk")
+ -| alast["2"] = string ("is")
+ -| alast["3"] = string ("a")
+
+ Ignoring the ordering of the elements for now (a `dgawk' internals
+issue), it looks like we got this far OK. Let's take another step or
+two:
+
+ dgawk> n
+ -| 70 clast = join(alast, fcount, n)
+ dgawk> n
+ -| 71 cline = join(aline, fcount, m)
+
+ Well, here we are at our error (sorry to spoil the supense). What we
+had in mind was to join the fields starting from the second one to make
+the virtual record to compare, and if the first field was numbered zero,
+this would work. Let's look at what we've got:
+
+ dgawk> p cline clast
+ -| cline = string ("gawk is a wonderful program!")
+ -| clast = string ("awk is a wonderful program!")
+
+ Hey, those look pretty familiar! They're just our original,
+unaltered, input records. A little thinking (the human brain is still
+the best debugging tool), and we realize that we were off by one!
+
+ We get out of `dgawk':
+
+ dgawk> q
+ -| The program is running. Exit anyway (y/n)? y
+
+Then we get into an editor:
+
+ clast = join(alast, fcount+1, n)
+ cline = join(aline, fcount+1, m)
+
+and problem solved!
+
+
+File: gawk.info, Node: List of Debugger Commands, Next: Readline Support, Prev: Sample dgawk session, Up: Debugger
+
+14.3 Main `dgawk' Commands
+==========================
+
+The `dgawk' command set can be divided into the following categories:
+
+ * Breakpoint control
+
+ * Execution control
+
+ * Viewing and changing data
+
+ * Working with the stack
+
+ * Getting information
+
+ * Miscellaneous
+
+ Each of these are discussed in the following subsections. In the
+following descriptions, commands which may be abbreviated show the
+abbreviation on a second description line. A `dgawk' command name may
+also be truncated if that partial name is unambiguous. `dgawk' does
+have a built-in capability to automatically repeat the previous command
+when just hitting <Enter>. This works for the commands `list', `next',
+`nexti', `step', `stepi' and `continue' executed without any argument.
+
+* Menu:
+
+* Breakpoint Control:: Control of breakpoints.
+* Dgawk Execution Control:: Control of execution.
+* Viewing And Changing Data:: Viewing and changing data.
+* Dgawk Stack:: Dealing with the stack.
+* Dgawk Info:: Obtaining information about the program and
+ the debugger state.
+* Miscellaneous Dgawk Commands:: Miscellaneous Commands.
+
+
+File: gawk.info, Node: Breakpoint Control, Next: Dgawk Execution Control, Up: List of Debugger Commands
+
+14.3.1 Control Of Breakpoints
+-----------------------------
+
+As we saw above, the first thing you probably want to do in a debugging
+session is to get your breakpoints set up, since otherwise your program
+will just run as if it was not under the debugger. The commands for
+controlling breakpoints are:
+
+`break' [[FILENAME`:']N | FUNCTION] [`"EXPRESSION"']
+`b' [[FILENAME`:']N | FUNCTION] [`"EXPRESSION"']
+ Without any argument, set a breakpoint at the next instruction to
+ be executed in the selected stack frame. Arguments can be one of
+ the following:
+
+ N
+ Set a breakpoint at line number N in the current source file.
+
+ FILENAME`:'N
+ Set a breakpoint at line number N in source file FILENAME.
+
+ FUNCTION
+ Set a breakpoint at entry to (the first instruction of)
+ function FUNCTION.
+
+ With a breakpoint, you may also supply a condition. This is an
+ `awk' expression that `dgawk' evaluates whenever the breakpoint is
+ reached. If the condition is true, then `dgawk' stops execution
+ and prompts for a command. Otherwise, `dgawk' continues executing
+ the program.
+
+`clear' [[FILENAME`:']N | FUNCTION]
+ Without any argument, delete any breakpoint at the next instruction
+ to be executed in the selected stack frame. If the program stops at
+ a breakpoint, this deletes that breakpoint so that the program
+ does not stop at that location again.
+
+ N
+ Delete breakpoint(s) set at line number N in the current
+ source file.
+
+ FILENAME`:'N
+ Delete breakpoint(s) set at line number N in source file
+ FILENAME.
+
+ FUNCTION
+ Delete breakpoint(s) set at entry to function FUNCTION.
+
+`condition' N `"EXPRESSION"'
+ Add a condition to existing breakpoint or watchpoint N. The
+ condition is an `awk' expression that `dgawk' evaluates whenever
+ the breakpoint is reached. If the condition is true, then `dgawk'
+ stops execution and prompts for a command. Otherwise, `dgawk'
+ continues executing the program.
+
+`delete' [N1 N2 ...] [N-M]
+`d' [N1 N2 ...] [N-M]
+ Delete specified breakpoints or a range of breakpoints. Deletes
+ all defined breakpoints if no argument is supplied.
+
+`disable' [N1 N2 ... | N-M]
+ Disable specified breakpoints or a range of breakpoints. Without
+ any argument, disables all breakpoints.
+
+`enable' [`once' | `del'] [N1 N2 ...] [N-M]
+`e' [`once' | `del'] [N1 N2 ...] [N-M]
+ Enable specified breakpoints or a range of breakpoints. Without
+ any argument, enables all breakpoints. Optionally, you can
+ specify how to enable the breakpoint:
+
+ `del'
+ Enable breakpoint(s) tempoarily, then delete it when the
+ program stops at the breakpoint.
+
+ `once'
+ Enable breakpoint(s) temporarily, then disable it when the
+ program stops at the breakpoint.
+
+`ignore' N COUNT
+ Ignore breakpoint number N the next COUNT times it is hit.
+
+`tbreak' [[FILENAME`:']N | FUNCTION]
+`t' [[FILENAME`:']N | FUNCTION]
+ Set a temporary breakpoint (enabled for only one stop).
+
+
+File: gawk.info, Node: Dgawk Execution Control, Next: Viewing And Changing Data, Prev: Breakpoint Control, Up: List of Debugger Commands
+
+14.3.2 Control of Execution
+---------------------------
+
+Now that your breakpoints are ready, you can start running the program
+and observing its behavior. There are more commands for controlling
+execution of the program than we saw in our earlier example:
+
+`commands' [N]
+`silent'
+...
+`end'
+ Set a list of commands to be executed upon stopping at a
+ breakpoint or watchpoint. N is the breakpoint or watchpoint
+ number. Without a number, last one set is used. The actual
+ commands follow starting on the next line and are terminated by
+ the `end' command. If the command `silent' is in the list, the
+ usual messages about stopping at a breakpoint and the source line
+ are not printed. Any command in the list that resumes execution
+ (e.g. `continue') terminates the list (an implicit `end'), and
+ subsequent commands are ignored. For example:
+
+ dgawk> commands
+ > silent
+ > printf "A silent breakpoint; i = %d\n", i
+ > info locals
+ > set i = 10
+ > continue
+ > end
+ dgawk>
+
+`continue' [COUNT]
+`c' [COUNT]
+ Resume program execution. If continued from a breakpoint and COUNT
+ is specified, ignores the breakpoint at that location the next
+ COUNT times before stopping.
+
+`finish'
+ Execute until the selected stack frame returns. Prints the
+ returned value.
+
+`next' [COUNT]
+`n' [COUNT]
+ Continue execution to the next source line, stepping over function
+ calls. The argument COUNT controls how many times to repeat the
+ action, as in `step'.
+
+`nexti' [COUNT]
+`ni' [COUNT]
+ Execute one (or COUNT) instruction(s), stepping over function
+ calls.
+
+`return' [VALUE]
+ Cancel execution of a function call. If VALUE (either a string or a
+ number) is specified, it is used as the function's return value.
+ If used in a frame other than the innermost one (the currently
+ executing function, i.e., frame number 0), discard all inner
+ frames in addition to the selected one, and the caller of that
+ frame becomes the innermost frame.
+
+`run'
+`r'
+ Start/restart execution of the program. When restarting, `dgawk'
+ retains the current breakpoints, watchpoints, command history,
+ automatic display variables, and debugger options.
+
+`step' [COUNT]
+`s' [COUNT]
+ Continue execution until control reaches a different source line
+ in the current stack frame. `step' steps inside any function
+ called within the line. If the argument COUNT is supplied, steps
+ that many times before stopping, unless it encounters a breakpoint
+ or watchpoint.
+
+`stepi' [COUNT]
+`si' [COUNT]
+ Execute one (or COUNT) instruction(s), stepping inside function
+ calls. (For illustration of what is meant by an "instruction" in
+ `gawk', see the output shown under `dump' in *note Miscellaneous
+ Dgawk Commands::).
+
+`until' [[FILENAME`:']N | FUNCTION]
+`u' [[FILENAME`:']N | FUNCTION]
+ Without any argument, continues execution until a line past the
+ current line in current stack frame is reached. With argument,
+ continues execution until the specified location is reached, or
+ the current stack frame returns.
+
+
+File: gawk.info, Node: Viewing And Changing Data, Next: Dgawk Stack, Prev: Dgawk Execution Control, Up: List of Debugger Commands
+
+14.3.3 Viewing and Changing Data
+--------------------------------
+
+The commands for viewing and changing variables inside of `gawk' are:
+
+`display' [VAR | `$'N]
+ Add variable VAR (or field `$N') to the display list. The value
+ of the variable or field is displayed each time the program stops.
+ Each variable added to the list is identified by a unique number:
+
+ dgawk> display x
+ -| 10: x = 1
+
+ displays the assigned item number, the variable name and its
+ current value. If the display variable refers to a function
+ parameter, it is silently deleted from the list as soon as the
+ execution reaches a context where no such variable of the given
+ name exists. Without argument, `display' displays the current
+ values of items on the list.
+
+`eval "AWK STATEMENTS"'
+ Evaluate AWK STATEMENTS in the context of the running program.
+ You can do anything that an `awk' program would do: assign values
+ to variables, call functions, and so on.
+
+`eval' PARAM, ...
+AWK STATEMENTS
+`end'
+ This form of `eval' is similar, but it allows you to define "local
+ variables" that exist in the context of the AWK STATEMENTS,
+ instead of using variables or function parameters defined by the
+ program.
+
+`print' VAR1[`,' VAR2 ...]
+`p' VAR1[`,' VAR2 ...]
+ Print the value of a `gawk' variable or field. Fields must be
+ referenced by constants:
+
+ dgawk> print $3
+
+ prints the third field in the input record (if the specified field
+ does not exist, it prints `Null field'). A variable can be an
+ array element, with the subscripts being constant values. To print
+ the contents of an array, prefix the name of the array with the
+ `@' symbol:
+
+ gawk> print @a
+
+ prints the index and the corresponding value for all elements in
+ the array `a'.
+
+`printf' FORMAT [`,' ARG ...]
+ Print formatted text. The FORMAT may include escape sequences,
+ such as `\n' (*note Escape Sequences::). No newline is printed
+ unless one is specified.
+
+`set' VAR`='VALUE
+ Assign a constant (number or string) value to an `awk' variable or
+ field. String values must be enclosed between double quotes
+ (`"..."').
+
+ You can also set special `awk' variables, such as `FS', `NF',
+ `NR', etc.
+
+`watch' VAR | `$'N [`"EXPRESSION"']
+`w' VAR | `$'N [`"EXPRESSION"']
+ Add variable VAR (or field `$N') to the watch list. `dgawk' then
+ stops whenever the value of the variable or field changes. Each
+ watched item is assigned a number which can be used to delete it
+ from the watch list using the `unwatch' command.
+
+ With a watchpoint, you may also supply a condition. This is an
+ `awk' expression that `dgawk' evaluates whenever the watchpoint is
+ reached. If the condition is true, then `dgawk' stops execution
+ and prompts for a command. Otherwise, `dgawk' continues executing
+ the program.
+
+`undisplay' [N]
+ Remove item number N (or all items, if no argument) from the
+ automatic display list.
+
+`unwatch' [N]
+ Remove item number N (or all items, if no argument) from the watch
+ list.
+
+
+
+File: gawk.info, Node: Dgawk Stack, Next: Dgawk Info, Prev: Viewing And Changing Data, Up: List of Debugger Commands
+
+14.3.4 Dealing With The Stack
+-----------------------------
+
+Whenever you run a program which contains any function calls, `gawk'
+maintains a stack which has all of the functions leading up to where
+the program is right now. You can see how you got to where you are,
+and also move around in the stack to see what the state of things was
+in the functions which called the one you are in. The commands for
+doing this are:
+
+`backtrace' [COUNT]
+`bt' [COUNT]
+ Print a backtrace of all function calls (stack frames), or
+ innermost COUNT frames if COUNT > 0. Print the outermost COUNT
+ frames if COUNT < 0. The backtrace displays the name and
+ arguments to each function, the source file name, and the line
+ number.
+
+`down' [COUNT]
+ Move COUNT (default 1) frames down the stack toward the innermost
+ frame. Then select and print the frame.
+
+`frame' [N]
+`f' [N]
+ Select and print (frame number, function and argument names,
+ source file, and the source line) stack frame N. Frame 0 is the
+ currently executing, or "innermost", frame (function call), frame
+ 1 is the frame that called the innermost one. The highest numbered
+ frame is the one for the main program.
+
+`up' [COUNT]
+ Move COUNT (default 1) frames up the stack toward the outermost
+ frame. The select and print the frame.
+
+
+File: gawk.info, Node: Dgawk Info, Next: Miscellaneous Dgawk Commands, Prev: Dgawk Stack, Up: List of Debugger Commands
+
+14.3.5 Obtaining Information About The Program and The Debugger State
+---------------------------------------------------------------------
+
+Besides looking at the values of variables, there is often a need to get
+other sorts of information about the state of your program and of the
+debugging environment itself. `dgawk' has one command which provides
+this information, appropriately called `info'. `info' is used with one
+of a number of arguments which tell it exactly what you want to know:
+
+`info' WHAT
+`i' WHAT
+ The value for WHAT should be one of the following:
+
+ `args'
+ Arguments of the selected frame.
+
+ `break'
+ List all currently set breakpoints.
+
+ `display'
+ List of all items in the automatic display list.
+
+ `frame'
+ Description of the selected stack frame.
+
+ `functions'
+ List all function definitions including source file names and
+ line numbers.
+
+ `locals'
+ Local variables of the selected frame.
+
+ `source'
+ The name of the current source file. Each time the program
+ stops, the current source file is the file containing the
+ current instruction. When `dgawk' first starts, the current
+ source file is the first file included via the `-f' option.
+ The `list FILENAME:LINENO' command can be used at any time to
+ change the current source.
+
+ `sources'
+ List all program sources.
+
+ `variables'
+ List all global variables.
+
+ `watch'
+ List of all items in the watch list.
+
+ Additional commands give you control over the debugger, the ability
+to save the debugger's state, and the ability to run debugger commands
+from a file. The commands are:
+
+`option' [NAME[`='VALUE]]
+`o' [NAME[`='VALUE]]
+ Without an argument, display the available debugger options and
+ their current values. `option NAME' shows the current value of the
+ named option. `option NAME=VALUE' assigns a new value to the named
+ option. The available options are:
+
+ `history_size'
+ The maximum number of lines to keep in the history file
+ `./.dgawk_history'. The default is 100.
+
+ `listsize'
+ The number of lines that `list' prints. The default is 15.
+
+ `outfile'
+ Sends `gawk' output to a file; debugger output still goes to
+ standard output. An empty string (`""') resets output to
+ standard output.
+
+ `prompt'
+ The debugger prompt. The default is `dgawk>'.
+
+ `save_history [on | off]'
+ Save command history to file `./.dgawk_history'. The default
+ is `on'.
+
+ `save_options [on | off]'
+ Save current options to file `./.dgawkrc' upon exit. The
+ default is `on'. Options are read back in to the next
+ session upon startup.
+
+ `trace [on | off]'
+ Turn instruction tracing on or off. The default is `off'.
+
+`save' FILENAME
+ Save the commands from the current session to the given file name,
+ so that they can be replayed using the `source' command.
+
+`source' FILENAME
+ Run command(s) from a file; an error in any command does not
+ terminate execution of subsequent commands. Comments (lines
+ starting with `#') are allowed in a command file. Empty lines are
+ ignored; they do _not_ repeat the last command. You can't restart
+ the program by having more than one `run' command in the file.
+ Also, the list of commands may include additional `source'
+ commands; however, `dgawk' will not source the same file more than
+ once in order to avoid infinite recursion.
+
+ In addition to, or instead of the `source' command, you can use
+ the `-R FILE' or `--command=FILE' command-line options to execute
+ commands from a file non-interactively.
+
+
+File: gawk.info, Node: Miscellaneous Dgawk Commands, Prev: Dgawk Info, Up: List of Debugger Commands
+
+14.3.6 Miscellaneous Commands
+-----------------------------
+
+There are a few more commands which do not fit into the previous
+categories, as follows:
+
+`dump' [FILENAME]
+ Dump bytecode of the program to standard output or to the file
+ named in FILENAME. This prints a representation of the internal
+ instructions which `gawk' executes to implement the `awk' commands
+ in a program. This can be very enlightening, as the following
+ partial dump of Davide Brini's obfuscated code (*note Signature
+ Program::) demonstrates:
+
+ dgawk> dump
+ -| # BEGIN
+ -|
+ -| [ 2:0x1d4355f0] Op_rule : [in_rule = BEGIN] [source_file = brini.awk]
+ -| [ 3:0x1d435710] Op_push_i : "~" [MALLOC|PERM|STRING|STRCUR]
+ -| [ 3:0x1d4357c0] Op_push_i : "~" [MALLOC|PERM|STRING|STRCUR]
+ -| [ 3:0x1d435790] Op_match :
+ -| [ 3:0x1d435680] Op_push_lhs : O [do_reference = FALSE]
+ -| [ 3:0x1d4356b0] Op_assign :
+ -| [ :0x1d4356e0] Op_pop :
+ -| [ 4:0x1d4358c0] Op_push_i : "==" [MALLOC|PERM|STRING|STRCUR]
+ -| [ 4:0x1d435970] Op_push_i : "==" [MALLOC|PERM|STRING|STRCUR]
+ -| [ 4:0x1d435940] Op_equal :
+ -| [ 4:0x1d435810] Op_push_lhs : o [do_reference = FALSE]
+ -| [ 4:0x1d435860] Op_assign :
+ -| [ :0x1d435890] Op_pop :
+ -| [ 5:0x1d435a70] Op_push : o
+ -| [ 5:0x1d435a40] Op_plus_i : 0 [MALLOC|NUMCUR|NUMBER]
+ -| [ 5:0x1d4359c0] Op_push_lhs : o [do_reference = TRUE]
+ -| [ 5:0x1d435910] Op_assign_plus :
+ -| [ :0x1d435a10] Op_pop :
+ -| [ 6:0x1d435b50] Op_push : O
+ -| [ 6:0x1d435b80] Op_push_i : "" [MALLOC|PERM|STRING|STRCUR]
+ -| [ :0x1d435c60] Op_no_op :
+ -| [ 6:0x1d435c30] Op_push : O
+ -| [ :0x1d435c90] Op_concat : [expr_count = 3]
+ -| [ 6:0x1d435ad0] Op_push_lhs : x [do_reference = FALSE]
+ -| [ 6:0x1d435aa0] Op_assign :
+ -| [ :0x1d435b00] Op_pop :
+ -| [ 7:0x1d435c00] Op_push_loop : [target_continue = 0x1d435bd0] [target_break = 0x1d435fc0]
+ -| [ 7:0x1d435bd0] Op_push_lhs : X [do_reference = TRUE]
+ -| [ 7:0x1d435cc0] Op_postincrement :
+ -| [ 7:0x1d435d70] Op_push : x
+ -| [ 7:0x1d435e00] Op_push : o
+ -| [ 7:0x1d435da0] Op_plus :
+ -| [ 7:0x1d435e60] Op_push : o
+ -| [ 7:0x1d435e30] Op_plus :
+ -| [ 7:0x1d435d20] Op_leq :
+ -| [ :0x1d435cf0] Op_jmp_false : [target_jmp = 0x1d435fc0]
+ -| [ 8:0x1d435f40] Op_push_i : "%c" [MALLOC|PERM|STRING|STRCUR]
+ -| [ :0x1d435ff0] Op_no_op :
+ -| [ 8:0x1d435dd0] Op_push_lhs : c [do_reference = FALSE]
+ -| [ 8:0x1d435e90] Op_assign_concat :
+ -| [ :0x1d435ec0] Op_pop :
+ -| [ :0x1d435f90] Op_jmp : [target_jmp = 0x1d435bd0]
+ -| [ :0x1d435fc0] Op_pop_loop :
+ -|
+ -| ...
+ -|
+ -| [ 9:0x1d435f10] Op_K_printf : [expr_count = 17] [redir_type = Op_illegal]
+ -| [ :0x1d435180] Op_no_op :
+ -| [ :0x1d435240] Op_exit : [exit_value = 0]
+ dgawk>
+
+`help'
+`h'
+ Print a list of all of the `dgawk' commands with a short summary
+ of their usage. `help COMMAND' prints the information about the
+ command COMMAND.
+
+`list' [`-' | `+' | N | FILENAME`:'N | N--M | FUNCTION]
+`l' [`-' | `+' | N | FILENAME`:'N | N--M | FUNCTION]
+ Print the specified lines (default 15) from the current source file
+ or the file named FILENAME. The possible arguments to `list' are
+ as follows:
+
+ `-'
+ Print lines before the lines last printed.
+
+ `+'
+ Print lines after the lines last printed. `list' without any
+ argument does the same thing.
+
+ N
+ Print lines centered around line number N.
+
+ N--M
+ Print lines from N to M.
+
+ FILENAME`:'N
+ Print lines centered around line number N in source file
+ FILENAME. This command may change the current source file.
+
+ FUNCTION
+ Print lines centered around beginning of the function
+ FUNCTION. This command may change the current source file.
+
+`quit'
+`q'
+ Exit the debugger. Debugging is great fun, but sometimes we all
+ have to tend to other obligations in life (and sometimes we find
+ the bug, and are free to go on to the next one!). As we saw
+ above, if you are running a program, `dgawk' warns you if you
+ accidentally type `q' or `quit', to make sure you really want to
+ quit.
+
+`trace' `on' | `off'
+ Turn on or off a continuous printing of instructions which are
+ about to be executed, along with printing the `awk' line which they
+ implement. The default is `off'.
+
+ It is to be hoped that most of the "opcodes" in these instructions
+ are fairly self-explanatory, and using `stepi' and `nexti' while
+ `trace' is on will make them into familiar friends.
+
+
+
+File: gawk.info, Node: Readline Support, Next: Dgawk Limitations, Prev: List of Debugger Commands, Up: Debugger
+
+14.4 Readline Support
+=====================
+
+If compiled with the `readline' library, you can take advantage of its
+command completion and history expansion features. The following types
+of completion are available:
+
+Command completion
+ Command names.
+
+Source file name completion
+ Source file names. Relevant commands are `break', `clear', `list',
+ `tbreak', and `until'.
+
+Argument completion
+ Non-numeric arguments to a command. Relevant commands are `info'
+ and `enable'.
+
+Variable name completion
+ Global variable names, and function arguments in the current
+ context if the program is running. Relevant commands are `display',
+ `print', `set', and `watch'.
+
+
+
+File: gawk.info, Node: Dgawk Limitations, Prev: Readline Support, Up: Debugger
+
+14.5 Limitations and Future Plans
+=================================
+
+We hope you find `dgawk' useful and enjoyable to work with, but as with
+any program, especially in its early releases, it still has some
+limitations. A few which are worth being aware of are:
+
+ * At this point, `dgawk' does not give a detailed explanation of
+ what you did wrong when you type in something it doesn't like.
+ Rather, it just responds `syntax error'. When you do figure out
+ what your mistake was, though, you'll feel like a real guru.
+
+ * If you perused the dump of opcodes in *Note Miscellaneous Dgawk
+ Commands::, (or you are already familiar with `gawk' internals),
+ you will realize that much of the internal manipulation of data in
+ `gawk', as in many interpreters, is done on a stack. `Op_push',
+ `Op_pop', etc., are the "bread and butter" of most `gawk' code.
+ Unfortunately, as of now, `dgawk' does not provide the capability
+ of examining the stack's contents.
+
+ That is, the intermediate results of expression evaluation are on
+ the stack, but cannot be printed. Rather, only variables which
+ are defined in the program can actually be printed. Of course, a
+ workaround for this is to use more explicit variables at the
+ debugging stage and then change back to obscure, perhaps more
+ optimal code later.
+
+ * There is no way right now to look "inside" the process of compiling
+ regular expressions to see if you got it right. As an `awk'
+ programmer, you are expected to know what `/[^[:alnum:][:blank:]]/'
+ means.
+
+ * `dgawk' is designed to be used by running a program (with all its
+ parameters) on the command line, as described in *note dgawk
+ invocation::. There is no way (as of now) to attach or "break in"
+ to a running program. This seems reasonable for a language which
+ is used mainly for quickly executing, short programs.
+
+ Look forward to a future release when these and other missing
+features may be added, and of course feel free to try to add them
+yourself if you want.
+
+
+File: gawk.info, Node: Language History, Next: Installation, Prev: Debugger, Up: Top
Appendix A The Evolution of the `awk' Language
**********************************************
@@ -17574,13 +18838,13 @@ the changes, with cross-references to further details:
* The `do'-`while' statement (*note Do Statement::).
- * The built-in functions `atan2', `cos', `sin', `rand', and `srand'
- (*note Numeric Functions::).
+ * The built-in functions `atan2()', `cos()', `sin()', `rand()', and
+ `srand()' (*note Numeric Functions::).
- * The built-in functions `gsub', `sub', and `match' (*note String
- Functions::).
+ * The built-in functions `gsub()', `sub()', and `match()' (*note
+ String Functions::).
- * The built-in functions `close' and `system' (*note I/O
+ * The built-in functions `close()' and `system()' (*note I/O
Functions::).
* The `ARGC', `ARGV', `FNR', `RLENGTH', `RSTART', and `SUBSEP'
@@ -17601,8 +18865,8 @@ the changes, with cross-references to further details:
programs (*note Precedence::).
* Regexps as the value of `FS' (*note Field Separators::) and as the
- third argument to the `split' function (*note String Functions::),
- rather than using only the first character of `FS'.
+ third argument to the `split()' function (*note String
+ Functions::), rather than using only the first character of `FS'.
* Dynamic regexps as operands of the `~' and `!~' operators (*note
Regexp Usage::).
@@ -17639,10 +18903,10 @@ The System V Release 4 (1989) version of Unix `awk' added these features
* The `\a', `\v', and `\x' escape sequences (*note Escape
Sequences::).
- * A defined return value for the `srand' built-in function (*note
+ * A defined return value for the `srand()' built-in function (*note
Numeric Functions::).
- * The `toupper' and `tolower' built-in string functions for case
+ * The `toupper()' and `tolower()' built-in string functions for case
translation (*note String Functions::).
* A cleaner specification for the `%c' format-control letter in the
@@ -17704,9 +18968,12 @@ standard:
* The locale's decimal point character is used for parsing input
data (*note Locales::).
- * The `fflush' built-in function is not supported (*note I/O
+ * The `fflush()' built-in function is not supported (*note I/O
Functions::).
+ The 2008 POSIX standard can be found online at
+`http://www.opengroup.org/onlinepubs/9699919799/'.
+

File: gawk.info, Node: BTL, Next: POSIX/GNU, Prev: POSIX, Up: Language History
@@ -17724,8 +18991,8 @@ POSIX `awk':
options; it continues to accept them to avoid breaking old
programs.
- * The `fflush' built-in function for flushing buffered output (*note
- I/O Functions::).
+ * The `fflush()' built-in function for flushing buffered output
+ (*note I/O Functions::).
* The `**' and `**=' operators (*note Arithmetic Ops:: and *note
Assignment Ops::).
@@ -17742,16 +19009,17 @@ extensions, originally developed for `gawk':
* The `/dev/stdin', `/dev/stdout', and `/dev/stderr' special files
(*note Special Files::).
- * The ability for `FS' and for the third argument to `split' to be
+ * The ability for `FS' and for the third argument to `split()' to be
null strings (*note Single Character Fields::).
* The `nextfile' statement (*note Nextfile Statement::).
* The ability to delete all of an array at once with `delete ARRAY'
- (*note String Functions::).
+ (*note Delete::).
- * The ability for the `length' function to accept an array argument
- and return the number of elements in the array. (*note Delete::).
+ * The ability for the `length()' function to accept an array
+ argument and return the number of elements in the array. (*note
+ String Functions::).

File: gawk.info, Node: POSIX/GNU, Next: Contributors, Prev: BTL, Up: Language History
@@ -17779,8 +19047,8 @@ all be disabled with either the `--traditional' or `--posix' options
* The `FIELDWIDTHS' variable and its effects (*note Constant Size::).
- * The `systime' and `strftime' built-in functions for obtaining and
- printing timestamps (*note Time Functions::).
+ * The `systime()' and `strftime()' built-in functions for obtaining
+ and printing timestamps (*note Time Functions::).
* The `-W lint' option to provide error and portability checking for
both the source code and at runtime (*note Options::).
@@ -17801,7 +19069,8 @@ all be disabled with either the `--traditional' or `--posix' options
through `ARGV' (*note Built-in Variables::).
* The `ERRNO' variable, which contains the system error message when
- `getline' returns -1 or `close' fails (*note Built-in Variables::).
+ `getline' returns -1 or `close()' fails (*note Built-in
+ Variables::).
* The `/dev/pid', `/dev/ppid', `/dev/pgrpid', and `/dev/user' file
name interpretation. (As of version 3.2, these names are no
@@ -17826,13 +19095,13 @@ all be disabled with either the `--traditional' or `--posix' options
* Full support for both POSIX and GNU regexps (*note Regexp::).
- * The `gensub' function for more powerful text manipulation (*note
+ * The `gensub()' function for more powerful text manipulation (*note
String Functions::).
- * The `strftime' function acquired a default time format, allowing
+ * The `strftime()' function acquired a default time format, allowing
it to be called with no arguments (*note Time Functions::).
- * The ability for `FS' and for the third argument to `split' to be
+ * The ability for `FS' and for the third argument to `split()' to be
null strings (*note Single Character Fields::).
* The ability for `RS' to be a regexp (*note Records::).
@@ -17844,7 +19113,7 @@ all be disabled with either the `--traditional' or `--posix' options
available in the original Version 7 Unix version of `awk' (*note
V7/SVR3.1::).
- * The `-m' option and the `fflush' function from the Bell
+ * The `-m' option and the `fflush()' function from the Bell
Laboratories research version of `awk' (*note Options::; also
*note I/O Functions::).
@@ -17882,30 +19151,30 @@ all be disabled with either the `--traditional' or `--posix' options
* The `/inet' special files for TCP/IP networking using `|&' (*note
TCP/IP Networking::).
- * The optional second argument to `close' that allows closing one end
- of a two-way pipe to a coprocess (*note Two-way I/O::).
+ * The optional second argument to `close()' that allows closing one
+ end of a two-way pipe to a coprocess (*note Two-way I/O::).
- * The optional third argument to the `match' function for capturing
- text-matching subexpressions within a regexp (*note String
- Functions::).
+ * The optional third argument to the `match()' function for
+ capturing text-matching subexpressions within a regexp (*note
+ String Functions::).
* Positional specifiers in `printf' formats for making translations
easier (*note Printf Ordering::).
- * The `asort' and `asorti' functions for sorting arrays (*note Array
- Sorting::).
+ * The `asort()' and `asorti()' functions for sorting arrays (*note
+ Array Sorting::).
- * The `bindtextdomain', `dcgettext' and `dcngettext' functions for
- internationalization (*note Programmer i18n::).
+ * The `bindtextdomain()', `dcgettext()' and `dcngettext()' functions
+ for internationalization (*note Programmer i18n::).
- * The `extension' built-in function and the ability to add new
+ * The `extension()' built-in function and the ability to add new
built-in functions dynamically (*note Dynamic Extensions::).
- * The `mktime' built-in function for creating timestamps (*note Time
- Functions::).
+ * The `mktime()' built-in function for creating timestamps (*note
+ Time Functions::).
- * The `and', `or', `xor', `compl', `lshift', `rshift', and
- `strtonum' built-in functions (*note Bitwise Functions::).
+ * The `and()', `or()', `xor()', `compl()', `lshift()', `rshift()',
+ and `strtonum()' built-in functions (*note Bitwise Functions::).
* The support for `next file' as two words was removed completely
(*note Nextfile Statement::).
@@ -17928,8 +19197,9 @@ all be disabled with either the `--traditional' or `--posix' options
decimal point for parsing input data (*note Conversion::).
* The `--enable-portals' configuration option to enable special
- treatment of pathnames that begin with `/p' as BSD portals (*note
- Portal Files::).
+ treatment of pathnames that begin with `/p' as BSD portals. (This
+ option is no longer available; the related code was removed since
+ it was never used.)
* The use of GNU Automake to help in standardizing the configuration
process (*note Quick Installation::).
@@ -17950,18 +19220,18 @@ all be disabled with either the `--traditional' or `--posix' options
at compile time (*note Additional Configuration Options::).
* The `--with-whiny-user-strftime' configuration option to force the
- use of the included version of the `strftime' function for
+ use of the included version of the `strftime()' function for
deficient systems (*note Additional Configuration Options::).
- * POSIX compliance for `sub' and `gsub' (*note Gory Details::).
+ * POSIX compliance for `sub()' and `gsub()' (*note Gory Details::).
* The `--exec' option, for use in CGI scripts (*note Options::).
- * The `length' function was extended to accept an array argument and
- return the number of elements in the array (*note String
+ * The `length()' function was extended to accept an array argument
+ and return the number of elements in the array (*note String
Functions::).
- * The `strftime' function acquired a third argument to enable
+ * The `strftime()' function acquired a third argument to enable
printing times as UTC (*note Time Functions::).
Version 3.2 of `gawk' introduced the following features:
@@ -17999,12 +19269,20 @@ all be disabled with either the `--traditional' or `--posix' options
* The `FPAT' variable and its effects (*note Splitting By Content::).
- * The `patsplit' function (*note String Functions::).
+ * The `patsplit()' function (*note String Functions::).
* The `/inet4' and `/inet6' special files for TCP/IP networking
using `|&' to specify which version of the IP protocol to use.
(*note TCP/IP Networking::).
+ * The `--compat', `--copyleft' and `--usage' options were removed.
+
+ * The `break' and `continue' statements may no longer be used
+ outside a loop, even with `--traditional' (*note Break
+ Statement::, and *note Continue Statement::).
+
+ * The `--enable-portals' configuration option was removed.
+

File: gawk.info, Node: Contributors, Prev: POSIX/GNU, Up: Language History
@@ -18068,7 +19346,7 @@ Info file, in approximate chronological order:
various PC operating systems. He is also instrumental in keeping
the documentation up to date for the various PC platforms.
- * Christos Zoulas provided the `extension' built-in function for
+ * Christos Zoulas provided the `extension()' built-in function for
dynamically adding new modules.
* Ju"rgen Kahrs contributed the initial version of the TCP/IP
@@ -18086,9 +19364,9 @@ Info file, in approximate chronological order:
* Arno Peters did the initial work to convert `gawk' to use GNU
Automake and `gettext'.
- * Alan J. Broder provided the initial version of the `asort' function
- as well as the code for the new optional third argument to the
- `match' function.
+ * Alan J. Broder provided the initial version of the `asort()'
+ function as well as the code for the new optional third argument
+ to the `match()' function.
* Andreas Buening updated the `gawk' port for OS/2.
@@ -18338,8 +19616,8 @@ Various `.c', `.y', and `.h' files
Files needed for building `gawk' on POSIX-compliant systems.
`pc/*'
- Files needed for building `gawk' under MS-DOS, MS Windows and OS/2
- (*note PC Installation::, for details).
+ Files needed for building `gawk' under MS Windows and OS/2 (*note
+ PC Installation::, for details).
`vms/*'
Files needed for building `gawk' under VMS (*note VMS
@@ -18420,12 +19698,8 @@ B.2.2 Additional Configuration Options
There are several additional options you may use on the `configure'
command line when compiling `gawk' from scratch, including:
-`--enable-portals'
- Treat pathnames that begin with `/p' as BSD portal files when
- doing two-way I/O with the `|&' operator (*note Portal Files::).
-
`--with-whiny-user-strftime'
- Force use of the included version of the `strftime' function for
+ Force use of the included version of the `strftime()' function for
deficient systems
`--disable-lint'
@@ -18704,7 +19978,7 @@ for `DYN_MAKEXP': pick the one that matches your target.
To build some of the example extension libraries, `cd' to the
extension directory and copy `Makefile.pc' to `Makefile'. You can then
build using the same two targets. To run the example `awk' scripts,
-you'll need to either change the call to the `extension' function to
+you'll need to either change the call to the `extension()' function to
match the name of the library (for instance, change `"./ordchr.so"' to
`"ordchr.dll"' or simply `"ordchr"'), or rename the library to match
the call (for instance, rename `ordchr.dll' to `ordchr.so').
@@ -18768,8 +20042,8 @@ is set to `e:' the complete default search path is
An `sh'-like shell (as opposed to `command.com' under MS-DOS or
`cmd.exe' under OS/2) may be useful for `awk' programming. Ian
Stewartson has written an excellent shell for MS-DOS and OS/2, Daisuke
-Aoyama has ported GNU `bash' to MS-DOS using the DJGPP tools, and
-several shells are available for OS/2, including `ksh'. The file
+Aoyama has ported GNU Bash to MS-DOS using the DJGPP tools, and several
+shells are available for OS/2, including `ksh'. The file
`README_d/README.pc' in the `gawk' distribution contains information on
these shells. Users of Stewartson's shell on DOS should examine its
documentation for handling command lines; in particular, the setting
@@ -18843,8 +20117,8 @@ B.3.1.5 Using `gawk' In The Cygwin Environment
`gawk' can be used "out of the box" under Windows if you are using the
Cygwin environment (http://www.cygwin.com). This environment provides
-an excellent simulation of Unix, using the GNU tools, such as `bash',
-the GNU Compiler Collection (GCC), GNU Make, and other GNU tools.
+an excellent simulation of Unix, using the GNU tools, such as Bash, the
+GNU Compiler Collection (GCC), GNU Make, and other GNU tools.
Compilation and installation for Cygwin is the same as for a Unix
system:
@@ -18859,7 +20133,7 @@ the `make' proceeds as usual.
NOTE: The `|&' operator and TCP/IP networking (*note TCP/IP
Networking::) are fully supported in the Cygwin environment. This
- is not true for any other environment for MS-DOS or MS-Windows.
+ is not true for any other environment for MS-Windows.

File: gawk.info, Node: MSYS, Prev: Cygwin, Up: PC Installation
@@ -19108,22 +20382,22 @@ B.4.1.1 Compiling `gawk' on the Atari ST
A proper compilation of `gawk' sources when `sizeof(int)' differs from
`sizeof(void *)' requires an ISO C compiler. An initial port was done
-with `gcc'. You may actually prefer executables where `int's are four
-bytes wide but the other variant works as well.
+with `gcc'. You may actually prefer executables where `int()'s are
+four bytes wide but the other variant works as well.
You may need quite a bit of memory when trying to recompile the
`gawk' sources, as some source files (`regex.c' in particular) are quite
big. If you run out of memory compiling such a file, try reducing the
optimization level for this particular file, which may help.
- With a reasonable shell (`bash' will do), you have a pretty good
-chance that the `configure' utility will succeed, and in particular if
-you run GNU/Linux, MiNT or a similar operating system. Otherwise
-sample versions of `config.h' and `Makefile.st' are given in the
-`atari' subdirectory and can be edited and copied to the corresponding
-files in the main source directory. Even if `configure' produces
-something, it might be advisable to compare its results with the sample
-versions and possibly make adjustments.
+ With a reasonable shell (Bash will do), you have a pretty good chance
+that the `configure' utility will succeed, and in particular if you run
+GNU/Linux, MiNT or a similar operating system. Otherwise sample
+versions of `config.h' and `Makefile.st' are given in the `atari'
+subdirectory and can be edited and copied to the corresponding files in
+the main source directory. Even if `configure' produces something, it
+might be advisable to compare its results with the sample versions and
+possibly make adjustments.
Some `gawk' source code fragments depend on a preprocessor define
`atarist'. This basically assumes the TOS environment with `gcc'.
@@ -19131,12 +20405,12 @@ Modify these sections as appropriate if they are not right for your
environment. Also see the remarks about `AWKPATH' and `envsep' in
*note Atari Using::.
- As shipped, the sample `config.h' claims that the `system' function
-is missing from the libraries, which is not true, and an alternative
-implementation of this function is provided in
+ As shipped, the sample `config.h' claims that the `system()'
+function is missing from the libraries, which is not true, and an
+alternative implementation of this function is provided in
`unsupported/atari/system.c'. Depending upon your particular
combination of shell and operating system, you might want to change the
-file to indicate that `system' is available.
+file to indicate that `system()' is available.

File: gawk.info, Node: Atari Using, Prev: Atari Compiling, Up: Atari Installation
@@ -19184,12 +20458,12 @@ output, and a calling shell has redirected standard output to a file.
libraries, it accepts both `/' and `\' as path separators. While this
is convenient, it should be remembered that this removes one
technically valid character (`/') from your file name. It may also
-create problems for external programs called via the `system' function,
-which may not support this convention. Whenever it is possible that a
-file created by `gawk' will be used by some other program, use only
-backslashes. Also remember that in `awk', backslashes in strings have
-to be doubled in order to get literal backslashes (*note Escape
-Sequences::).
+create problems for external programs called via the `system()'
+function, which may not support this convention. Whenever it is
+possible that a file created by `gawk' will be used by some other
+program, use only backslashes. Also remember that in `awk',
+backslashes in strings have to be doubled in order to get literal
+backslashes (*note Escape Sequences::).

File: gawk.info, Node: BeOS Installation, Next: Tandem Installation, Prev: Atari Installation, Up: Unsupported
@@ -19219,7 +20493,7 @@ then `make install':
...
$ make install
- BeOS uses `bash' as its shell; thus, you use `gawk' the same way you
+ BeOS uses Bash as its shell; thus, you use `gawk' the same way you
would under Unix. If these steps do not work, please send in a bug
report (*note Bugs::).
@@ -19391,7 +20665,7 @@ Unix `awk'
`mawk' has the following extensions that are not in POSIX `awk':
- * The `fflush' built-in function for flushing buffered output
+ * The `fflush()' built-in function for flushing buffered output
(*note I/O Functions::).
* The `**' and `**=' operators (*note Arithmetic Ops:: and also
@@ -19406,8 +20680,8 @@ Unix `awk'
Special Files::). Use `"-"' instead of `"/dev/stdin"' with
`mawk'.
- * The ability for `FS' and for the third argument to `split' to
- be null strings (*note Single Character Fields::).
+ * The ability for `FS' and for the third argument to `split()'
+ to be null strings (*note Single Character Fields::).
* The ability to delete all of an array at once with `delete
ARRAY' (*note Delete::).
@@ -19501,7 +20775,7 @@ option.
If `gawk' is compiled for debugging with `-DDEBUG', then there is
one more option available on the command line:
-`-W parsedebug'
+`-Y'
`--parsedebug'
Prints out the parse stack information as the program is being
parsed.
@@ -19574,8 +20848,8 @@ possible for me to include your changes:
* Put the name of the function at the beginning of its own line.
- * Put the return type of the function, even if it is `int', on
- the line above the line with the name and arguments of the
+ * Put the return type of the function, even if it is `int()',
+ on the line above the line with the name and arguments of the
function.
* Put spaces around parentheses used in control structures
@@ -19820,12 +21094,12 @@ when writing extensions. The next minor node shows how they are used:
This function returns the actual number of parameters passed to
the current function. Inside the code of an extension this can be
used to determine the maximum index which is safe to use with
- `stack_ptr'. If this value is greater than `tree->param_cnt', the
+ `get_actual_argument'. If this value is greater than `nargs', the
function was called incorrectly from the `awk' program.
*Caution:* This function is new as of `gawk' 3.1.4.
-`n->param_cnt'
+`nargs'
Inside an extension function, this is the maximum number of
expected parameters, as set by the `make_builtin' function.
@@ -19852,8 +21126,8 @@ when writing extensions. The next minor node shows how they are used:
`NODE **assoc_lookup(NODE *symbol, NODE *subs, int reference)'
Finds, and installs if necessary, array elements. `symbol' is the
array, `subs' is the subscript. This is usually a value created
- with `tmp_string' (see below). `reference' should be `TRUE' if it
- is an error to use the value before it is created. Typically,
+ with `make_string' (see below). `reference' should be `TRUE' if
+ it is an error to use the value before it is created. Typically,
`FALSE' is the correct value to use from extension functions.
`NODE *make_string(char *s, size_t len)'
@@ -19866,25 +21140,15 @@ when writing extensions. The next minor node shows how they are used:
be stored appropriately. This is permanent storage; understanding
of `gawk' memory management is helpful.
-`NODE *tmp_string(char *s, size_t len);'
- Take a C string and turn it into a pointer to a `NODE' that can be
- stored appropriately. This is temporary storage; understanding of
- `gawk' memory management is helpful.
-
-`NODE *tmp_number(AWKNUM val)'
- Take an `AWKNUM' and turn it into a pointer to a `NODE' that can
- be stored appropriately. This is temporary storage; understanding
- of `gawk' memory management is helpful.
-
`NODE *dupnode(NODE *n)'
Duplicate a node. In most cases, this increments an internal
reference count instead of actually duplicating the entire `NODE';
understanding of `gawk' memory management is helpful.
-`void free_temp(NODE *n)'
+`void unref(NODE *n)'
This macro releases the memory associated with a `NODE' allocated
- with `tmp_string' or `tmp_number'. Understanding of `gawk' memory
- management is helpful.
+ with `make_string' or `make_number'. Understanding of `gawk'
+ memory management is helpful.
`void make_builtin(char *name, NODE *(*func)(NODE *), int count)'
Register a C function pointed to by `func' as new built-in
@@ -19895,17 +21159,17 @@ when writing extensions. The next minor node shows how they are used:
/* do_xxx --- do xxx function for gawk */
NODE *
- do_xxx(NODE *tree)
+ do_xxx(int nargs)
{
...
}
-`NODE *get_argument(NODE *tree, int i)'
+`NODE *get_argument(int i)'
This function is called from within a C extension function to get
the `i'-th argument from the function call. The first argument is
argument zero.
-`NODE *get_actual_argument(NODE *tree, unsigned int i,'
+`NODE *get_actual_argument(int i,'
` int optional, int wantarray);'
This function retrieves a particular argument `i'. `wantarray' is
`TRUE' if the argument should be an array, `FALSE' otherwise. If
@@ -19915,22 +21179,16 @@ when writing extensions. The next minor node shows how they are used:
*Caution:* This function is new as of `gawk' 3.1.4.
-`get_scalar_argument(t, i, opt)'
+`get_scalar_argument(i, opt)'
This is a convenience macro that calls `get_actual_argument'.
*Caution:* This macro is new as of `gawk' 3.1.4.
-`get_array_argument(t, i, opt)'
+`get_array_argument(i, opt)'
This is a convenience macro that calls `get_actual_argument'.
*Caution:* This macro is new as of `gawk' 3.1.4.
-`void set_value(NODE *tree)'
- This function is called from within a C extension function to set
- the return value from the extension function. This value is what
- the `awk' program sees as the return value from the new `awk'
- function.
-
`void update_ERRNO(void)'
This function is called from within a C extension function to set
the value of `gawk''s `ERRNO' variable, based on the current value
@@ -20031,13 +21289,19 @@ boilerplate code now suffices:
/* if necessary, clear it: */
assoc_clear(the_arg);
- As of version 3.1.4, the internals improved again, and became even
+ In version 3.1.4, the internals improved again, and became even
simpler:
NODE *the_arg;
the_arg = get_array_argument(tree, 2, FALSE); /* assume need 3rd arg, 0-based */
+ As of version 4.0, the internals changed again:
+
+ NODE *the_arg;
+
+ the_arg = get_array_argument(2, FALSE); /* assume need 3rd arg, 0-based */
+
Again, you should spend time studying the `gawk' internals; don't
just blindly copy this code.
@@ -20130,7 +21394,7 @@ fails. It fills in the following elements:
`"ctime"'
The file's last access, modification, and inode update times,
respectively. These are numeric timestamps, suitable for
- formatting with `strftime' (*note Built-in::).
+ formatting with `strftime()' (*note Built-in::).
`"pmode"'
The file's "printable mode." This is a string representation of
@@ -20199,8 +21463,7 @@ other POSIX-compliant systems:(1)
chdir() builtin for gawk */
static NODE *
- do_chdir(tree)
- NODE *tree;
+ do_chdir(int nargs)
{
NODE *newdir;
int ret = -1;
@@ -20208,39 +21471,32 @@ other POSIX-compliant systems:(1)
if (do_lint && get_curfunc_arg_count() != 1)
lintwarn("chdir: called with incorrect number of arguments");
- newdir = get_scalar_argument(tree, 0);
+ newdir = get_scalar_argument(0, FALSE);
The file includes the `"awk.h"' header file for definitions for the
`gawk' internals. It includes `<sys/sysmacros.h>' for access to the
`major' and `minor' macros.
By convention, for an `awk' function `foo', the function that
-implements it is called `do_foo'. The function should take a `NODE *'
-argument, usually called `tree', that represents the argument list to
-the function. The `newdir' variable represents the new directory to
-change to, retrieved with `get_argument'. Note that the first argument
-is numbered zero.
+implements it is called `do_foo'. The function should take a `int'
+argument, usually called `nargs', that represents the number of defined
+arguments for the function. The `newdir' variable represents the new
+directory to change to, retrieved with `get_scalar_argument'. Note
+that the first argument is numbered zero.
This code actually accomplishes the `chdir'. It first forces the
argument to be a string and passes the string value to the `chdir'
-system call. If the `chdir' fails, `ERRNO' is updated. The result of
-`force_string' has to be freed with `free_temp':
+system call. If the `chdir' fails, `ERRNO' is updated.
(void) force_string(newdir);
ret = chdir(newdir->stptr);
if (ret < 0)
update_ERRNO();
- free_temp(newdir);
- Finally, the function returns the return value to the `awk' level,
-using `set_value'. Then it must return a value from the call to the new
-built-in (this value ignored by the interpreter):
+ Finally, the function returns the return value to the `awk' level:
/* Set the return value */
- set_value(tmp_number((AWKNUM) ret));
-
- /* Just to make the interpreter happy */
- return tmp_number((AWKNUM) 0);
+ return make_number((AWKNUM) ret);
}
The `stat' built-in is more involved. First comes a function that
@@ -20263,10 +21519,9 @@ variable declarations and argument checking:
/* do_stat --- provide a stat() function for gawk */
static NODE *
- do_stat(tree)
- NODE *tree;
+ do_stat(int nargs)
{
- NODE *file, *array;
+ NODE *file, *array, *tmp;
struct stat sbuf;
int ret;
NODE **aptr;
@@ -20283,8 +21538,8 @@ in case the file is a symbolic link. If there's an error, we set
`ERRNO' and return:
/* directory is first arg, array to hold results is second */
- file = get_scalar_argument(tree, 0, FALSE);
- array = get_array_argument(tree, 1, FALSE);
+ file = get_scalar_argument(0, FALSE);
+ array = get_array_argument(1, FALSE);
/* empty out the array */
assoc_clear(array);
@@ -20294,37 +21549,31 @@ in case the file is a symbolic link. If there's an error, we set
ret = lstat(file->stptr, & sbuf);
if (ret < 0) {
update_ERRNO();
-
- set_value(tmp_number((AWKNUM) ret));
-
- free_temp(file);
- return tmp_number((AWKNUM) 0);
+ return make_number((AWKNUM) ret);
}
Now comes the tedious part: filling in the array. Only a few of the
calls are shown here, since they all follow the same pattern:
/* fill in the array */
- aptr = assoc_lookup(array, tmp_string("name", 4), FALSE);
+ aptr = assoc_lookup(array, tmp = make_string("name", 4), FALSE);
*aptr = dupnode(file);
+ unref(tmp);
- aptr = assoc_lookup(array, tmp_string("mode", 4), FALSE);
+ aptr = assoc_lookup(array, tmp = make_string("mode", 4), FALSE);
*aptr = make_number((AWKNUM) sbuf.st_mode);
+ unref(tmp);
- aptr = assoc_lookup(array, tmp_string("pmode", 5), FALSE);
+ aptr = assoc_lookup(array, tmp = make_string("pmode", 5), FALSE);
pmode = format_mode(sbuf.st_mode);
*aptr = make_string(pmode, strlen(pmode));
+ unref(tmp);
- When done, we free the temporary value containing the file name, set
-the return value, and return:
+ When done, return the `lstat' return value:
- free_temp(file);
/* Set the return value */
- set_value(tmp_number((AWKNUM) ret));
-
- /* Just to make the interpreter happy */
- return tmp_number((AWKNUM) 0);
+ return make_number((AWKNUM) ret);
}
Finally, it's necessary to provide the "glue" that loads the new
@@ -20340,7 +21589,7 @@ named `dlload' that does the job:
{
make_builtin("chdir", do_chdir, 1);
make_builtin("stat", do_stat, 2);
- return tmp_number((AWKNUM) 0);
+ return make_number((AWKNUM) 0);
}
And that's it! As an exercise, consider adding functions to
@@ -20367,7 +21616,7 @@ a GNU/Linux shared library:
$ gcc -shared -DHAVE_CONFIG_H -c -O -g -IIDIR filefuncs.c
$ ld -o filefuncs.so -shared filefuncs.o
- Once the library exists, it is loaded by calling the `extension'
+ Once the library exists, it is loaded by calling the `extension()'
built-in function. This function takes two arguments: the name of the
library to load and the name of a function to call when the library is
first loaded. This function adds the new functions to `gawk'. It
@@ -20854,9 +22103,9 @@ definition of the language and the original POSIX standards specified
that `awk' only understands decimal numbers (base 10), and not octal
(base 8) or hexadecimal numbers (base 16).
- As of this writing (February, 2007), changes in the language of the
-current POSIX standard can be interpreted to imply that `awk' should
-support additional features. These features are:
+ Changes in the language of the 2001 and 2004 POSIX standard can be
+interpreted to imply that `awk' should support additional features.
+These features are:
* Interpretation of floating point data values specified in
hexadecimal notation (`0xDEADBEEF'). (Note: data values, _not_
@@ -20885,9 +22134,15 @@ interpretation of the standard, which requires a certain amount of
by the standard developers, either. In other words, "we see how you
got where you are, but we don't think that that's where you want to be."
- Nevertheless, on systems that support IEEE floating point, it seems
-reasonable to provide _some_ way to support NaN and Infinity values.
-The solution implemented in `gawk', as of version 3.1.6, is as follows:
+ The 2008 POSIX standard added explicit wording to allow, but not
+require, that `awk' support hexadecimal floating point values and
+special values for "Not A Number" and infinity.
+
+ Although the `gawk' maintainer continues to feel that providing
+those features is inadvisable, nevertheless, on systems that support
+IEEE floating point, it seems reasonable to provide _some_ way to
+support NaN and Infinity values. The solution implemented in `gawk' is
+as follows:
1. With the `--posix' command-line option, `gawk' becomes "hands
off." String values are passed directly to the system library's
@@ -21015,14 +22270,14 @@ Boolean Expression
Bourne Shell
The standard shell (`/bin/sh') on Unix and Unix-like systems,
- originally written by Steven R. Bourne. Many shells (`bash',
- `ksh', `pdksh', `zsh') are generally upwardly compatible with the
- Bourne shell.
+ originally written by Steven R. Bourne. Many shells (Bash, `ksh',
+ `pdksh', `zsh') are generally upwardly compatible with the Bourne
+ shell.
Built-in Function
The `awk' language provides built-in functions that perform various
numerical, I/O-related, and string computations. Examples are
- `sqrt' (for the square root of a number) and `substr' (for a
+ `sqrt()' (for the square root of a number) and `substr()' (for a
substring of a string). `gawk' provides functions for timestamp
management, bit manipulation, and runtime string translation.
(*Note Built-in::.)
@@ -21189,10 +22444,10 @@ Floating-Point Number
Format
Format strings are used to control the appearance of output in the
- `strftime' and `sprintf' functions, and are used in the `printf'
- statement as well. Also, data conversions from numbers to strings
- are controlled by the format string contained in the built-in
- variable `CONVFMT'. (*Note Control Letters::.)
+ `strftime()' and `sprintf()' functions, and are used in the
+ `printf' statement as well. Also, data conversions from numbers
+ to strings are controlled by the format string contained in the
+ built-in variable `CONVFMT'. (*Note Control Letters::.)
Free Documentation License
This document describes the terms under which this Info file is
@@ -21500,8 +22755,8 @@ Text Domain
Timestamp
A value in the "seconds since the epoch" format used by Unix and
- POSIX systems. Used for the `gawk' functions `mktime',
- `strftime', and `systime'. See also "Epoch" and "UTC."
+ POSIX systems. Used for the `gawk' functions `mktime()',
+ `strftime()', and `systime()'. See also "Epoch" and "UTC."
Unix
A computer operating system originally developed in the early
@@ -22939,7 +24194,8 @@ Index
* % (percent sign), %= operator: Assignment Ops. (line 129)
* & (ampersand), && operator <1>: Precedence. (line 86)
* & (ampersand), && operator: Boolean Ops. (line 57)
-* & (ampersand), gsub/gensub/sub functions and: Gory Details. (line 6)
+* & (ampersand), gsub()/gensub()/sub() functions and: Gory Details.
+ (line 6)
* ' (single quote) <1>: Quoting. (line 31)
* ' (single quote) <2>: Long. (line 33)
* ' (single quote): One-shot. (line 15)
@@ -22953,10 +24209,10 @@ Index
(line 86)
* * (asterisk), * operator, null strings, matching: Gory Details.
(line 159)
-* * (asterisk), ** operator <1>: Options. (line 216)
+* * (asterisk), ** operator <1>: Options. (line 208)
* * (asterisk), ** operator <2>: Precedence. (line 49)
* * (asterisk), ** operator: Arithmetic Ops. (line 81)
-* * (asterisk), **= operator <1>: Options. (line 216)
+* * (asterisk), **= operator <1>: Options. (line 208)
* * (asterisk), **= operator <2>: Precedence. (line 95)
* * (asterisk), **= operator: Assignment Ops. (line 129)
* * (asterisk), *= operator <1>: Precedence. (line 95)
@@ -22976,79 +24232,73 @@ Index
* - (hyphen), -= operator <1>: Precedence. (line 95)
* - (hyphen), -= operator: Assignment Ops. (line 129)
* - (hyphen), filenames beginning with: Options. (line 56)
-* - (hyphen), in character lists: Character Lists. (line 17)
+* - (hyphen), in character lists: Character Lists. (line 16)
* --assign option: Options. (line 30)
-* --c option: Options. (line 76)
+* --c option: Options. (line 75)
* --characters-as-bytes option: Options. (line 65)
-* --compat option: Options. (line 76)
-* --copyleft option: Options. (line 85)
-* --copyright option: Options. (line 85)
+* --copyright option: Options. (line 83)
* --disable-lint configuration option: Additional Configuration Options.
- (line 17)
+ (line 13)
* --disable-nls configuration option: Additional Configuration Options.
- (line 32)
+ (line 28)
* --dump-variables option <1>: Library Names. (line 45)
-* --dump-variables option: Options. (line 90)
-* --enable-portals configuration option <1>: Additional Configuration Options.
- (line 9)
-* --enable-portals configuration option: Portal Files. (line 6)
-* --exec option: Options. (line 112)
+* --dump-variables option: Options. (line 88)
+* --exec option: Options. (line 110)
* --field-separator option: Options. (line 21)
* --file option: Options. (line 25)
-* --gen-pot option <1>: Options. (line 131)
+* --gen-pot option <1>: Options. (line 129)
* --gen-pot option: String Extraction. (line 6)
-* --help option: Options. (line 139)
-* --L option: Options. (line 163)
-* --lint option <1>: Options. (line 144)
+* --help option: Options. (line 136)
+* --L option: Options. (line 244)
+* --lint option <1>: Options. (line 141)
* --lint option: Command Line. (line 20)
-* --lint-old option: Options. (line 163)
-* --non-decimal-data option <1>: Options. (line 168)
+* --lint-old option: Options. (line 244)
+* --non-decimal-data option <1>: Options. (line 160)
* --non-decimal-data option: Nondecimal Data. (line 6)
-* --non-decimal-data option, strtonum function and: Nondecimal Data.
+* --non-decimal-data option, strtonum() function and: Nondecimal Data.
(line 36)
-* --optimize option: Options. (line 181)
-* --posix option: Options. (line 200)
-* --posix option, --traditional option and: Options. (line 230)
-* --profile option <1>: Options. (line 188)
+* --optimize option: Options. (line 173)
+* --posix option: Options. (line 192)
+* --posix option, --traditional option and: Options. (line 222)
+* --profile option <1>: Options. (line 180)
* --profile option: Profiling. (line 15)
-* --re-interval option: Options. (line 236)
-* --sandbox option: Options. (line 243)
+* --re-interval option: Options. (line 228)
+* --sandbox option: Options. (line 235)
* --sandbox option, disabling system function: I/O Functions. (line 88)
* --sandbox option, input redirection with getline: Getline. (line 19)
* --sandbox option, output redirection with print, printf: Redirection.
(line 6)
-* --source option: Options. (line 104)
-* --traditional option: Options. (line 76)
-* --traditional option, --posix option and: Options. (line 230)
-* --usage option: Options. (line 139)
-* --use-lc-numeric option: Options. (line 176)
-* --version option: Options. (line 252)
+* --source option: Options. (line 102)
+* --traditional option: Options. (line 75)
+* --traditional option, --posix option and: Options. (line 222)
+* --use-lc-numeric option: Options. (line 168)
+* --version option: Options. (line 249)
* --with-whiny-user-strftime configuration option: Additional Configuration Options.
- (line 13)
+ (line 9)
* -b option: Options. (line 65)
-* -C option: Options. (line 85)
-* -d option: Options. (line 90)
-* -E option: Options. (line 112)
-* -e option: Options. (line 104)
+* -C option: Options. (line 83)
+* -d option: Options. (line 88)
+* -E option: Options. (line 110)
+* -e option: Options. (line 102)
* -f option: Options. (line 25)
* -F option <1>: Options. (line 21)
* -F option: Command Line Field Separator.
(line 6)
* -f option: Long. (line 12)
-* -F option, -Ft sets FS to TAB: Options. (line 260)
-* -f option, on command line: Options. (line 265)
+* -F option, -Ft sets FS to TAB: Options. (line 257)
+* -f option, on command line: Options. (line 262)
* -F option, troubleshooting: Known Bugs. (line 6)
-* -g option: Options. (line 131)
-* -h option: Options. (line 139)
-* -l option: Options. (line 144)
-* -N option: Options. (line 176)
-* -n option: Options. (line 168)
-* -O option: Options. (line 181)
-* -P option: Options. (line 200)
-* -p option: Options. (line 188)
-* -r option: Options. (line 236)
-* -S option: Options. (line 243)
-* -V option: Options. (line 252)
+* -g option: Options. (line 129)
+* -h option: Options. (line 136)
+* -l option: Options. (line 141)
+* -N option: Options. (line 168)
+* -n option: Options. (line 160)
+* -O option: Options. (line 173)
+* -P option: Options. (line 192)
+* -p option: Options. (line 180)
+* -r option: Options. (line 228)
+* -S option: Options. (line 235)
+* -V option: Options. (line 249)
* -v option: Options. (line 30)
* -v option, variables, assigning: Assignment Options. (line 12)
* -W option: Options. (line 44)
@@ -23068,11 +24318,10 @@ Index
(line 148)
* / (forward slash), patterns and: Expression Patterns. (line 24)
* /= operator vs. /=.../ regexp constant: Assignment Ops. (line 148)
-* /dev/... special files (gawk): Special FD. (line 41)
+* /dev/... special files (gawk): Special FD. (line 44)
* /inet/ files (gawk): TCP/IP Networking. (line 6)
* /inet4/ files (gawk): TCP/IP Networking. (line 6)
* /inet6/ files (gawk): TCP/IP Networking. (line 6)
-* /p files (gawk): Portal Files. (line 6)
* ; (semicolon): Statements/Lines. (line 90)
* ; (semicolon), AWKPATH variable and: PC Using. (line 11)
* ; (semicolon), separating statements in actions <1>: Statements.
@@ -23145,11 +24394,11 @@ Index
* \ (backslash), continuing lines and: Statements/Lines. (line 19)
* \ (backslash), continuing lines and, comments and: Statements/Lines.
(line 75)
-* \ (backslash), continuing lines and, in csh <1>: Statements/Lines.
+* \ (backslash), continuing lines and, in csh: Statements/Lines.
(line 44)
-* \ (backslash), continuing lines and, in csh: More Complex. (line 15)
-* \ (backslash), gsub/gensub/sub functions and: Gory Details. (line 6)
-* \ (backslash), in character lists: Character Lists. (line 17)
+* \ (backslash), gsub()/gensub()/sub() functions and: Gory Details.
+ (line 6)
+* \ (backslash), in character lists: Character Lists. (line 16)
* \ (backslash), in escape sequences: Escape Sequences. (line 6)
* \ (backslash), in escape sequences, POSIX and: Escape Sequences.
(line 113)
@@ -23157,12 +24406,12 @@ Index
* ^ (caret) <1>: GNU Regexp Operators.
(line 59)
* ^ (caret): Regexp Operators. (line 22)
-* ^ (caret), ^ operator <1>: Options. (line 216)
+* ^ (caret), ^ operator <1>: Options. (line 208)
* ^ (caret), ^ operator: Precedence. (line 49)
-* ^ (caret), ^= operator <1>: Options. (line 216)
+* ^ (caret), ^= operator <1>: Options. (line 208)
* ^ (caret), ^= operator <2>: Precedence. (line 95)
* ^ (caret), ^= operator: Assignment Ops. (line 129)
-* ^ (caret), in character lists: Character Lists. (line 17)
+* ^ (caret), in character lists: Character Lists. (line 16)
* ^, in FS: Regexp Field Splitting.
(line 59)
* _ (underscore), _ C macro: Explaining gettext. (line 68)
@@ -23181,16 +24430,15 @@ Index
* adding, features to gawk: Adding Code. (line 6)
* adding, fields: Changing Fields. (line 53)
* adding, functions to gawk: Dynamic Extensions. (line 10)
-* advanced features, buffering: I/O Functions. (line 100)
-* advanced features, close function: Close Files And Pipes.
- (line 130)
+* advanced features, buffering: I/O Functions. (line 101)
+* advanced features, close() function: Close Files And Pipes.
+ (line 131)
* advanced features, constants, values of: Nondecimal-numbers.
(line 67)
-* advanced features, data files as single record: Records. (line 170)
+* advanced features, data files as single record: Records. (line 172)
* advanced features, fixed-width data: Constant Size. (line 9)
-* advanced features, FNR/NR variables: Auto-set. (line 193)
+* advanced features, FNR/NR variables: Auto-set. (line 192)
* advanced features, gawk: Advanced Features. (line 6)
-* advanced features, gawk, BSD portals: Portal Files. (line 6)
* advanced features, gawk, network programming: TCP/IP Networking.
(line 6)
* advanced features, gawk, nondecimal input data: Nondecimal Data.
@@ -23217,10 +24465,11 @@ Index
(line 148)
* ampersand (&), && operator: Boolean Ops. (line 57)
* ampersand (&), &&operator: Precedence. (line 86)
-* ampersand (&), gsub/gensub/sub functions and: Gory Details. (line 6)
+* ampersand (&), gsub()/gensub()/sub() functions and: Gory Details.
+ (line 6)
* AND bitwise operation: Bitwise Functions. (line 6)
* and Boolean-logic operator: Boolean Ops. (line 6)
-* and function (gawk): Bitwise Functions. (line 39)
+* and() function (gawk): Bitwise Functions. (line 39)
* ANSI: Glossary. (line 30)
* archeologists: Bugs. (line 6)
* ARGC/ARGV variables <1>: ARGC and ARGV. (line 6)
@@ -23236,7 +24485,7 @@ Index
* arguments, command-line, invoking awk: Command Line. (line 6)
* arguments, in function calls: Function Calls. (line 16)
* arguments, processing: Getopt Function. (line 6)
-* arguments, retrieving: Internals. (line 121)
+* arguments, retrieving: Internals. (line 111)
* arithmetic operators: Arithmetic Ops. (line 6)
* arrays: Arrays. (line 6)
* arrays, as parameters to functions: Function Caveats. (line 55)
@@ -23269,10 +24518,10 @@ Index
* artificial intelligence, gawk and: Distribution contents.
(line 47)
* ASCII: Ordinal Functions. (line 44)
-* asort function (gawk) <1>: String Functions. (line 18)
-* asort function (gawk): Array Sorting. (line 6)
-* asort function (gawk), arrays, sorting: Array Sorting. (line 6)
-* asorti function (gawk): String Functions. (line 47)
+* asort() function (gawk) <1>: String Functions. (line 18)
+* asort() function (gawk): Array Sorting. (line 6)
+* asort() function (gawk), arrays, sorting: Array Sorting. (line 6)
+* asorti() function (gawk): String Functions. (line 47)
* assert function (C library): Assert Function. (line 6)
* assert user-defined function: Assert Function. (line 28)
* assertions: Assert Function. (line 6)
@@ -23289,22 +24538,22 @@ Index
(line 86)
* asterisk (*), * operator, null strings, matching: Gory Details.
(line 159)
-* asterisk (*), ** operator <1>: Options. (line 216)
+* asterisk (*), ** operator <1>: Options. (line 208)
* asterisk (*), ** operator <2>: Precedence. (line 49)
* asterisk (*), ** operator: Arithmetic Ops. (line 81)
-* asterisk (*), **= operator <1>: Options. (line 216)
+* asterisk (*), **= operator <1>: Options. (line 208)
* asterisk (*), **= operator <2>: Precedence. (line 95)
* asterisk (*), **= operator: Assignment Ops. (line 129)
* asterisk (*), *= operator <1>: Precedence. (line 95)
* asterisk (*), *= operator: Assignment Ops. (line 129)
-* atan2 function: Numeric Functions. (line 37)
+* atan2() function: Numeric Functions. (line 37)
* atari: Atari Installation. (line 9)
* awf (amazingly workable formatter) program: Glossary. (line 20)
* awk language, POSIX version: Assignment Ops. (line 136)
* awk programs <1>: Two Rules. (line 6)
* awk programs <2>: Executable Scripts. (line 6)
* awk programs: Getting Started. (line 12)
-* awk programs, complex: When. (line 31)
+* awk programs, complex: When. (line 29)
* awk programs, documenting <1>: Library Names. (line 6)
* awk programs, documenting: Comments. (line 6)
* awk programs, examples of: Sample Programs. (line 6)
@@ -23316,7 +24565,7 @@ Index
* awk programs, location of: Options. (line 25)
* awk programs, one-line examples: Very Simple. (line 45)
* awk programs, profiling: Profiling. (line 6)
-* awk programs, profiling, enabling: Options. (line 188)
+* awk programs, profiling, enabling: Options. (line 180)
* awk programs, running <1>: Long. (line 6)
* awk programs, running: Running gawk. (line 6)
* awk programs, running, from shell scripts: One-shot. (line 22)
@@ -23324,7 +24573,7 @@ Index
* awk programs, shell variables in: Using Shell Variables.
(line 6)
* awk, function of: Getting Started. (line 6)
-* awk, gawk and <1>: This Manual. (line 13)
+* awk, gawk and <1>: This Manual. (line 14)
* awk, gawk and: Preface. (line 22)
* awk, history of: History. (line 17)
* awk, implementation issues, pipes: Redirection. (line 135)
@@ -23356,7 +24605,8 @@ Index
* AWKPATH environment variable: AWKPATH Variable. (line 6)
* awkprof.out file: Profiling. (line 10)
* awksed.awk program: Simple Sed. (line 25)
-* awkvars.out file: Options. (line 90)
+* awkvars.out file: Options. (line 88)
+* b debugger command (alias for break): Breakpoint Control. (line 11)
* backslash (\) <1>: Regexp Operators. (line 18)
* backslash (\) <2>: Quoting. (line 31)
* backslash (\) <3>: Comments. (line 50)
@@ -23398,20 +24648,21 @@ Index
* backslash (\), continuing lines and: Statements/Lines. (line 19)
* backslash (\), continuing lines and, comments and: Statements/Lines.
(line 75)
-* backslash (\), continuing lines and, in csh <1>: Statements/Lines.
+* backslash (\), continuing lines and, in csh: Statements/Lines.
(line 44)
-* backslash (\), continuing lines and, in csh: More Complex. (line 15)
-* backslash (\), gsub/gensub/sub functions and: Gory Details. (line 6)
-* backslash (\), in character lists: Character Lists. (line 17)
+* backslash (\), gsub()/gensub()/sub() functions and: Gory Details.
+ (line 6)
+* backslash (\), in character lists: Character Lists. (line 16)
* backslash (\), in escape sequences: Escape Sequences. (line 6)
* backslash (\), in escape sequences, POSIX and: Escape Sequences.
(line 113)
* backslash (\), regexp constants: Computed Regexps. (line 28)
+* backtrace debugger command: Dgawk Stack. (line 13)
* BBS-list file: Sample Data Files. (line 6)
-* Beebe, Nelson: Acknowledgments. (line 53)
+* Beebe, Nelson: Acknowledgments. (line 59)
* Beebe, Nelson H.F.: Other Versions. (line 93)
* BEGIN pattern <1>: BEGIN/END. (line 6)
-* BEGIN pattern <2>: Field Separators. (line 43)
+* BEGIN pattern <2>: Field Separators. (line 44)
* BEGIN pattern: Records. (line 29)
* BEGIN pattern, assert user-defined function and: Assert Function.
(line 82)
@@ -23436,13 +24687,13 @@ Index
* Bell Laboratories awk extensions: BTL. (line 6)
* Benzinger, Michael: Contributors. (line 89)
* BeOS: BeOS Installation. (line 6)
-* Berry, Karl: Acknowledgments. (line 30)
+* Berry, Karl: Acknowledgments. (line 32)
* binary input/output: User-modified. (line 10)
-* bindtextdomain function (C library): Explaining gettext. (line 47)
-* bindtextdomain function (gawk) <1>: Programmer i18n. (line 45)
-* bindtextdomain function (gawk): I18N Functions. (line 26)
-* bindtextdomain function (gawk), portability and: I18N Portability.
- (line 32)
+* bindtextdomain() function (C library): Explaining gettext. (line 47)
+* bindtextdomain() function (gawk) <1>: Programmer i18n. (line 45)
+* bindtextdomain() function (gawk): I18N Functions. (line 26)
+* bindtextdomain() function (gawk), portability and: I18N Portability.
+ (line 33)
* BINMODE variable <1>: PC Using. (line 40)
* BINMODE variable: User-modified. (line 10)
* bits2str user-defined function: Bitwise Functions. (line 60)
@@ -23459,6 +24710,7 @@ Index
* braces ({}), pgawk program: Profiling. (line 140)
* braces ({}), statements, grouping: Statements. (line 10)
* bracket expressions, See character lists: Regexp Operators. (line 55)
+* break debugger command: Breakpoint Control. (line 11)
* break statement: Break Statement. (line 6)
* Brennan, Michael <1>: Other Versions. (line 6)
* Brennan, Michael <2>: Simple Sed. (line 25)
@@ -23466,14 +24718,14 @@ Index
* Brennan, Michael: Delete. (line 51)
* Broder, Alan J.: Contributors. (line 80)
* Brown, Martin: Contributors. (line 75)
-* BSD portals: Portal Files. (line 6)
* BSD-based operating systems: Glossary. (line 582)
+* bt debugger command (alias for backtrace): Dgawk Stack. (line 13)
* Buening, Andreas <1>: Bugs. (line 70)
* Buening, Andreas <2>: Contributors. (line 84)
-* Buening, Andreas: Acknowledgments. (line 53)
+* Buening, Andreas: Acknowledgments. (line 59)
* buffering, input/output <1>: Two-way I/O. (line 71)
-* buffering, input/output: I/O Functions. (line 132)
-* buffering, interactive vs. noninteractive: I/O Functions. (line 100)
+* buffering, input/output: I/O Functions. (line 133)
+* buffering, interactive vs. noninteractive: I/O Functions. (line 101)
* buffers, flushing: I/O Functions. (line 29)
* buffers, operators for: GNU Regexp Operators.
(line 48)
@@ -23490,12 +24742,12 @@ Index
* caret (^) <1>: GNU Regexp Operators.
(line 59)
* caret (^): Regexp Operators. (line 22)
-* caret (^), ^ operator <1>: Options. (line 216)
+* caret (^), ^ operator <1>: Options. (line 208)
* caret (^), ^ operator: Precedence. (line 49)
-* caret (^), ^= operator <1>: Options. (line 216)
+* caret (^), ^= operator <1>: Options. (line 208)
* caret (^), ^= operator <2>: Precedence. (line 95)
* caret (^), ^= operator: Assignment Ops. (line 129)
-* caret (^), in character lists: Character Lists. (line 17)
+* caret (^), in character lists: Character Lists. (line 16)
* case keyword: Switch Statement. (line 6)
* case sensitivity, array indices and: Array Intro. (line 93)
* case sensitivity, converting case: String Functions. (line 492)
@@ -23504,16 +24756,16 @@ Index
* case sensitivity, regexps and <1>: User-modified. (line 82)
* case sensitivity, regexps and: Case-sensitivity. (line 6)
* case sensitivity, string comparisons and: User-modified. (line 82)
-* CGI, awk scripts for: Options. (line 112)
+* CGI, awk scripts for: Options. (line 110)
* character encodings: Ordinal Functions. (line 44)
* character lists <1>: Character Lists. (line 6)
* character lists: Regexp Operators. (line 55)
-* character lists, character classes: Character Lists. (line 30)
-* character lists, collating elements: Character Lists. (line 71)
-* character lists, collating symbols: Character Lists. (line 78)
+* character lists, character classes: Character Lists. (line 29)
+* character lists, collating elements: Character Lists. (line 70)
+* character lists, collating symbols: Character Lists. (line 77)
* character lists, complemented: Regexp Operators. (line 62)
-* character lists, equivalence classes: Character Lists. (line 84)
-* character lists, non-ASCII: Character Lists. (line 71)
+* character lists, equivalence classes: Character Lists. (line 83)
+* character lists, non-ASCII: Character Lists. (line 70)
* character lists, range expressions: Character Lists. (line 6)
* character sets: Ordinal Functions. (line 44)
* character sets (machine character encodings): Glossary. (line 137)
@@ -23521,29 +24773,30 @@ Index
* characters, counting: Wc Program. (line 6)
* characters, transliterating: Translate Program. (line 6)
* characters, values of as numbers: Ordinal Functions. (line 6)
-* Chassell, Robert J.: Acknowledgments. (line 30)
+* Chassell, Robert J.: Acknowledgments. (line 32)
* chdir function, implementing in gawk: Sample Library. (line 6)
* chem utility: Glossary. (line 145)
* chr user-defined function: Ordinal Functions. (line 16)
+* clear debugger command: Breakpoint Control. (line 33)
* Cliff random numbers: Cliff Random Function.
(line 6)
* cliff_rand user-defined function: Cliff Random Function.
(line 12)
-* close function <1>: I/O Functions. (line 10)
-* close function <2>: Close Files And Pipes.
+* close() function <1>: I/O Functions. (line 10)
+* close() function <2>: Close Files And Pipes.
(line 18)
-* close function <3>: Getline/Pipe. (line 24)
-* close function: Getline/Variable/File.
+* close() function <3>: Getline/Pipe. (line 24)
+* close() function: Getline/Variable/File.
(line 30)
-* close function, return values: Close Files And Pipes.
- (line 130)
-* close function, two-way pipes and: Two-way I/O. (line 78)
+* close() function, return values: Close Files And Pipes.
+ (line 131)
+* close() function, two-way pipes and: Two-way I/O. (line 78)
* Close, Diane <1>: Contributors. (line 21)
-* Close, Diane: Manual History. (line 40)
-* close_func input method: Internals. (line 178)
-* collating elements: Character Lists. (line 71)
-* collating symbols: Character Lists. (line 78)
-* Colombo, Antonio: Acknowledgments. (line 53)
+* Close, Diane: Manual History. (line 39)
+* close_func input method: Internals. (line 162)
+* collating elements: Character Lists. (line 70)
+* collating symbols: Character Lists. (line 77)
+* Colombo, Antonio: Acknowledgments. (line 59)
* columns, aligning: Print Examples. (line 70)
* columns, cutting: Cut Program. (line 6)
* comma (,), in range patterns: Ranges. (line 6)
@@ -23564,8 +24817,11 @@ Index
* command line, variables, assigning on: Assignment Options. (line 6)
* command-line options, processing: Getopt Function. (line 6)
* command-line options, string extraction: String Extraction. (line 6)
+* commands debugger command: Dgawk Execution Control.
+ (line 10)
* commenting: Comments. (line 6)
* commenting, backslash continuation and: Statements/Lines. (line 75)
+* common extensions, \x escape sequence: Escape Sequences. (line 61)
* comp.lang.awk newsgroup: Bugs. (line 37)
* comparison expressions: Typing and Comparison.
(line 9)
@@ -23578,22 +24834,21 @@ Index
(line 60)
* compatibility mode (gawk), octal numbers: Nondecimal-numbers.
(line 60)
-* compatibility mode (gawk), specifying: Options. (line 76)
+* compatibility mode (gawk), specifying: Options. (line 75)
* compiled programs <1>: Glossary. (line 155)
* compiled programs: Basic High Level. (line 15)
-* compl function (gawk): Bitwise Functions. (line 43)
+* compl() function (gawk): Bitwise Functions. (line 43)
* complement, bitwise: Bitwise Functions. (line 25)
* compound statements, control statements and: Statements. (line 10)
* concatenating: Concatenation. (line 9)
+* condition debugger command: Breakpoint Control. (line 50)
* conditional expressions: Conditional Exp. (line 6)
* configuration option, --disable-lint: Additional Configuration Options.
- (line 17)
+ (line 13)
* configuration option, --disable-nls: Additional Configuration Options.
- (line 32)
-* configuration option, --enable-portals: Additional Configuration Options.
- (line 9)
+ (line 28)
* configuration option, --with-whiny-user-strftime: Additional Configuration Options.
- (line 13)
+ (line 9)
* configuration options, gawk: Additional Configuration Options.
(line 6)
* constants, nondecimal: Nondecimal Data. (line 6)
@@ -23616,11 +24871,10 @@ Index
* coprocesses, closing: Close Files And Pipes.
(line 6)
* coprocesses, getline from: Getline/Coprocess. (line 6)
-* cos function: Numeric Functions. (line 34)
+* cos() function: Numeric Functions. (line 34)
* counting: Wc Program. (line 6)
* csh utility: Statements/Lines. (line 44)
-* csh utility, backslash continuation and: More Complex. (line 15)
-* csh utility, POSIXLY_CORRECT environment variable: Options. (line 303)
+* csh utility, POSIXLY_CORRECT environment variable: Options. (line 300)
* csh utility, |& operator, comparison with: Two-way I/O. (line 44)
* ctime user-defined function: Function Example. (line 72)
* currency symbols, localization: Explaining gettext. (line 99)
@@ -23628,6 +24882,7 @@ Index
(line 29)
* cut utility: Cut Program. (line 6)
* cut.awk program: Cut Program. (line 44)
+* d debugger command (alias for break): Breakpoint Control. (line 57)
* d.c., See dark corner: Conventions. (line 37)
* dark corner <1>: Glossary. (line 187)
* dark corner <2>: Truth Values. (line 24)
@@ -23638,8 +24893,8 @@ Index
* dark corner, array subscripts: Uninitialized Subscripts.
(line 42)
* dark corner, break statement: Break Statement. (line 47)
-* dark corner, close function: Close Files And Pipes.
- (line 130)
+* dark corner, close() function: Close Files And Pipes.
+ (line 131)
* dark corner, command-line arguments: Assignment Options. (line 43)
* dark corner, continue statement: Continue Statement. (line 43)
* dark corner, CONVFMT variable: Conversion. (line 40)
@@ -23649,15 +24904,15 @@ Index
* dark corner, exit statement: Exit Statement. (line 29)
* dark corner, field separators: Field Splitting Summary.
(line 47)
-* dark corner, FILENAME variable <1>: Auto-set. (line 93)
+* dark corner, FILENAME variable <1>: Auto-set. (line 92)
* dark corner, FILENAME variable: Getline Notes. (line 19)
-* dark corner, FNR/NR variables: Auto-set. (line 193)
+* dark corner, FNR/NR variables: Auto-set. (line 192)
* dark corner, format-control characters: Control Letters. (line 18)
* dark corner, FS as null string: Single Character Fields.
(line 20)
* dark corner, input files: Records. (line 98)
* dark corner, invoking awk: Command Line. (line 16)
-* dark corner, length function: String Functions. (line 88)
+* dark corner, length() function: String Functions. (line 87)
* dark corner, multiline records: Multiple Line. (line 35)
* dark corner, NF variable, decrementing: Changing Fields. (line 107)
* dark corner, OFMT variable: OFMT. (line 27)
@@ -23667,8 +24922,8 @@ Index
(line 148)
* dark corner, regexp constants, as arguments to user-defined functions: Using Constant Regexps.
(line 44)
-* dark corner, split function: String Functions. (line 259)
-* dark corner, strings, storing: Records. (line 186)
+* dark corner, split() function: String Functions. (line 259)
+* dark corner, strings, storing: Records. (line 188)
* data, fixed-width: Constant Size. (line 9)
* data-driven languages: Basic High Level. (line 85)
* database, group, reading: Group Functions. (line 6)
@@ -23678,28 +24933,127 @@ Index
* dates, converting to timestamps: Time Functions. (line 72)
* dates, information related to, localization: Explaining gettext.
(line 111)
-* Davies, Stephen: Contributors. (line 69)
-* dcgettext function (gawk) <1>: Programmer i18n. (line 19)
-* dcgettext function (gawk): I18N Functions. (line 12)
-* dcgettext function (gawk), portability and: I18N Portability.
- (line 32)
-* dcngettext function (gawk) <1>: Programmer i18n. (line 35)
-* dcngettext function (gawk): I18N Functions. (line 18)
-* dcngettext function (gawk), portability and: I18N Portability.
- (line 32)
+* Davies, Stephen <1>: Contributors. (line 69)
+* Davies, Stephen: Acknowledgments. (line 59)
+* dcgettext() function (gawk) <1>: Programmer i18n. (line 19)
+* dcgettext() function (gawk): I18N Functions. (line 12)
+* dcgettext() function (gawk), portability and: I18N Portability.
+ (line 33)
+* dcngettext() function (gawk) <1>: Programmer i18n. (line 35)
+* dcngettext() function (gawk): I18N Functions. (line 18)
+* dcngettext() function (gawk), portability and: I18N Portability.
+ (line 33)
* deadlocks: Two-way I/O. (line 71)
+* debugger commands, b (break): Breakpoint Control. (line 11)
+* debugger commands, backtrace: Dgawk Stack. (line 13)
+* debugger commands, break: Breakpoint Control. (line 11)
+* debugger commands, bt (backtrace): Dgawk Stack. (line 13)
+* debugger commands, c (continue): Dgawk Execution Control.
+ (line 33)
+* debugger commands, clear: Breakpoint Control. (line 33)
+* debugger commands, commands: Dgawk Execution Control.
+ (line 10)
+* debugger commands, condition: Breakpoint Control. (line 50)
+* debugger commands, continue: Dgawk Execution Control.
+ (line 33)
+* debugger commands, d (delete): Breakpoint Control. (line 57)
+* debugger commands, delete: Breakpoint Control. (line 57)
+* debugger commands, disable: Breakpoint Control. (line 62)
+* debugger commands, display: Viewing And Changing Data.
+ (line 8)
+* debugger commands, down: Dgawk Stack. (line 21)
+* debugger commands, dump: Miscellaneous Dgawk Commands.
+ (line 9)
+* debugger commands, e (enable): Breakpoint Control. (line 66)
+* debugger commands, enable: Breakpoint Control. (line 66)
+* debugger commands, end: Dgawk Execution Control.
+ (line 10)
+* debugger commands, eval: Viewing And Changing Data.
+ (line 23)
+* debugger commands, f (frame): Dgawk Stack. (line 25)
+* debugger commands, finish: Dgawk Execution Control.
+ (line 39)
+* debugger commands, frame: Dgawk Stack. (line 25)
+* debugger commands, h (help): Miscellaneous Dgawk Commands.
+ (line 71)
+* debugger commands, help: Miscellaneous Dgawk Commands.
+ (line 71)
+* debugger commands, i (info): Dgawk Info. (line 12)
+* debugger commands, ignore: Breakpoint Control. (line 80)
+* debugger commands, info: Dgawk Info. (line 12)
+* debugger commands, l (list): Miscellaneous Dgawk Commands.
+ (line 77)
+* debugger commands, list: Miscellaneous Dgawk Commands.
+ (line 77)
+* debugger commands, n (next): Dgawk Execution Control.
+ (line 43)
+* debugger commands, next: Dgawk Execution Control.
+ (line 43)
+* debugger commands, nexti: Dgawk Execution Control.
+ (line 49)
+* debugger commands, ni (nexti): Dgawk Execution Control.
+ (line 49)
+* debugger commands, o (option): Dgawk Info. (line 56)
+* debugger commands, option: Dgawk Info. (line 56)
+* debugger commands, p (print): Viewing And Changing Data.
+ (line 36)
+* debugger commands, print: Viewing And Changing Data.
+ (line 36)
+* debugger commands, printf: Viewing And Changing Data.
+ (line 54)
+* debugger commands, q (quit): Miscellaneous Dgawk Commands.
+ (line 104)
+* debugger commands, quit: Miscellaneous Dgawk Commands.
+ (line 104)
+* debugger commands, r (run): Dgawk Execution Control.
+ (line 62)
+* debugger commands, return: Dgawk Execution Control.
+ (line 54)
+* debugger commands, run: Dgawk Execution Control.
+ (line 62)
+* debugger commands, s (step): Dgawk Execution Control.
+ (line 68)
+* debugger commands, set: Viewing And Changing Data.
+ (line 59)
+* debugger commands, si (stepi): Dgawk Execution Control.
+ (line 76)
+* debugger commands, silent: Dgawk Execution Control.
+ (line 10)
+* debugger commands, step: Dgawk Execution Control.
+ (line 68)
+* debugger commands, stepi: Dgawk Execution Control.
+ (line 76)
+* debugger commands, t (tbreak): Breakpoint Control. (line 83)
+* debugger commands, tbreak: Breakpoint Control. (line 83)
+* debugger commands, trace: Miscellaneous Dgawk Commands.
+ (line 113)
+* debugger commands, u (until): Dgawk Execution Control.
+ (line 83)
+* debugger commands, undisplay: Viewing And Changing Data.
+ (line 80)
+* debugger commands, until: Dgawk Execution Control.
+ (line 83)
+* debugger commands, unwatch: Viewing And Changing Data.
+ (line 84)
+* debugger commands, up: Dgawk Stack. (line 33)
+* debugger commands, w (watch): Viewing And Changing Data.
+ (line 67)
+* debugger commands, watch: Viewing And Changing Data.
+ (line 67)
* debugging gawk: Known Bugs. (line 6)
* debugging gawk, bug reports: Bugs. (line 9)
-* decimal point character, locale specific: Options. (line 224)
+* decimal point character, locale specific: Options. (line 216)
* decrement operators: Increment Ops. (line 35)
* default keyword: Switch Statement. (line 6)
* Deifik, Scott <1>: Bugs. (line 69)
* Deifik, Scott <2>: Contributors. (line 53)
-* Deifik, Scott: Acknowledgments. (line 53)
+* Deifik, Scott: Acknowledgments. (line 59)
+* delete debugger command: Breakpoint Control. (line 57)
* delete statement: Delete. (line 6)
* deleting elements in arrays: Delete. (line 6)
* deleting entire arrays: Delete. (line 39)
-* differences between gawk and awk: String Functions. (line 102)
+* dgawk: Debugger. (line 6)
+* differences between gawk and awk: String Functions. (line 101)
* differences in awk and gawk, ARGC/ARGV variables: ARGC and ARGV.
(line 86)
* differences in awk and gawk, ARGIND variable: Auto-set. (line 40)
@@ -23713,7 +25067,7 @@ Index
(line 40)
* differences in awk and gawk, BINMODE variable: User-modified.
(line 23)
-* differences in awk and gawk, close function: Close Files And Pipes.
+* differences in awk and gawk, close() function: Close Files And Pipes.
(line 81)
* differences in awk and gawk, ERRNO variable: Auto-set. (line 72)
* differences in awk and gawk, error messages: Special FD. (line 15)
@@ -23738,27 +25092,27 @@ Index
* differences in awk and gawk, line continuations: Conditional Exp.
(line 34)
* differences in awk and gawk, LINT variable: User-modified. (line 97)
-* differences in awk and gawk, match function: String Functions.
+* differences in awk and gawk, match() function: String Functions.
(line 165)
* differences in awk and gawk, next/nextfile statements: Nextfile Statement.
(line 6)
* differences in awk and gawk, print/printf statements: Format Modifiers.
(line 13)
-* differences in awk and gawk, PROCINFO array: Auto-set. (line 124)
+* differences in awk and gawk, PROCINFO array: Auto-set. (line 123)
* differences in awk and gawk, record separators: Records. (line 112)
* differences in awk and gawk, regexp constants: Using Constant Regexps.
(line 44)
* differences in awk and gawk, regular expressions: Case-sensitivity.
(line 26)
-* differences in awk and gawk, RS/RT variables: Records. (line 162)
-* differences in awk and gawk, RT variable: Auto-set. (line 182)
+* differences in awk and gawk, RS/RT variables: Records. (line 164)
+* differences in awk and gawk, RT variable: Auto-set. (line 181)
* differences in awk and gawk, single-character fields: Single Character Fields.
(line 6)
-* differences in awk and gawk, split function: String Functions.
+* differences in awk and gawk, split() function: String Functions.
(line 248)
* differences in awk and gawk, strings: Scalar Constants. (line 20)
-* differences in awk and gawk, strings, storing: Records. (line 182)
-* differences in awk and gawk, strtonum function (gawk): String Functions.
+* differences in awk and gawk, strings, storing: Records. (line 184)
+* differences in awk and gawk, strtonum() function (gawk): String Functions.
(line 286)
* differences in awk and gawk, TEXTDOMAIN variable: User-modified.
(line 152)
@@ -23769,6 +25123,9 @@ Index
(line 6)
* directories, searching <1>: Igawk Program. (line 358)
* directories, searching: AWKPATH Variable. (line 6)
+* disable debugger command: Breakpoint Control. (line 62)
+* display debugger command: Viewing And Changing Data.
+ (line 8)
* division: Arithmetic Ops. (line 44)
* do-while statement <1>: Do Statement. (line 6)
* do-while statement: Regexp Usage. (line 19)
@@ -23784,13 +25141,17 @@ Index
* double quote ("): Read Terminal. (line 25)
* double quote ("), regexp constants: Computed Regexps. (line 28)
* double-precision floating-point: Basic Data Typing. (line 33)
-* Drepper, Ulrich: Acknowledgments. (line 49)
-* DuBois, John: Acknowledgments. (line 53)
-* dupnode internal function: Internals. (line 97)
+* down debugger command: Dgawk Stack. (line 21)
+* Drepper, Ulrich: Acknowledgments. (line 51)
+* DuBois, John: Acknowledgments. (line 59)
+* dump debugger command: Miscellaneous Dgawk Commands.
+ (line 9)
+* dupnode internal function: Internals. (line 87)
* dupword.awk program: Dupword Program. (line 31)
+* e debugger command (alias for break): Breakpoint Control. (line 66)
* EBCDIC: Ordinal Functions. (line 44)
* egrep utility <1>: Egrep Program. (line 6)
-* egrep utility: Character Lists. (line 24)
+* egrep utility: Character Lists. (line 23)
* egrep.awk program: Egrep Program. (line 54)
* elements in arrays: Reference to Elements.
(line 6)
@@ -23803,6 +25164,9 @@ Index
* empty pattern: Empty. (line 6)
* empty strings, See null strings: Regexp Field Splitting.
(line 43)
+* enable debugger command: Breakpoint Control. (line 66)
+* end debugger command: Dgawk Execution Control.
+ (line 10)
* END pattern: BEGIN/END. (line 6)
* END pattern, assert user-defined function and: Assert Function.
(line 74)
@@ -23822,7 +25186,7 @@ Index
* endgrent user-defined function: Group Functions. (line 218)
* endpwent function (C library): Passwd Functions. (line 199)
* endpwent user-defined function: Passwd Functions. (line 202)
-* ENVIRON variable <1>: Internals. (line 165)
+* ENVIRON variable <1>: Internals. (line 149)
* ENVIRON variable: Auto-set. (line 60)
* environment variables: Auto-set. (line 60)
* epoch, definition of: Glossary. (line 229)
@@ -23830,16 +25194,19 @@ Index
* equals sign (=), == operator <1>: Precedence. (line 65)
* equals sign (=), == operator: Comparison Operators.
(line 11)
-* EREs (Extended Regular Expressions): Character Lists. (line 24)
-* ERRNO variable <1>: Internals. (line 152)
+* EREs (Extended Regular Expressions): Character Lists. (line 23)
+* ERRNO variable <1>: Internals. (line 136)
* ERRNO variable <2>: Auto-set. (line 72)
* ERRNO variable: Getline. (line 19)
* error handling: Special FD. (line 15)
* error handling, ERRNO variable and: Auto-set. (line 72)
* error output: Special FD. (line 6)
-* escape processing, gsub/gensub/sub functions: Gory Details. (line 6)
+* escape processing, gsub()/gensub()/sub() functions: Gory Details.
+ (line 6)
* escape sequences: Escape Sequences. (line 6)
-* escape sequences, unrecognized: Options. (line 204)
+* escape sequences, unrecognized: Options. (line 196)
+* eval debugger command: Viewing And Changing Data.
+ (line 23)
* evaluation order: Increment Ops. (line 61)
* evaluation order, concatenation: Concatenation. (line 42)
* evaluation order, functions: Calling Built-in. (line 30)
@@ -23861,7 +25228,7 @@ Index
* exclamation point (!), !~ operator: Regexp Usage. (line 19)
* exit statement: Exit Statement. (line 6)
* exit status, of gawk: Exit Status. (line 6)
-* exp function: Numeric Functions. (line 22)
+* exp() function: Numeric Functions. (line 22)
* expand utility: Very Simple. (line 69)
* expressions: Expressions. (line 6)
* expressions, as patterns: Expression Patterns. (line 6)
@@ -23873,15 +25240,17 @@ Index
* expressions, matching, See comparison expressions: Typing and Comparison.
(line 9)
* expressions, selecting: Conditional Exp. (line 6)
-* Extended Regular Expressions (EREs): Character Lists. (line 24)
-* extension function (gawk): Using Internal File Ops.
+* Extended Regular Expressions (EREs): Character Lists. (line 23)
+* extension() function (gawk): Using Internal File Ops.
(line 15)
* extensions, Bell Laboratories awk: BTL. (line 6)
+* extensions, common, \x escape sequence: Escape Sequences. (line 61)
* extensions, in gawk, not in POSIX awk: POSIX/GNU. (line 6)
* extensions, mawk: Other Versions. (line 51)
* extract.awk program: Extract Program. (line 77)
* extraction, of marked strings (internationalization): String Extraction.
(line 6)
+* f debugger command (alias for frame): Dgawk Stack. (line 25)
* false, logical: Truth Values. (line 6)
* FDL (Free Documentation License): GNU Free Documentation License.
(line 6)
@@ -23891,14 +25260,14 @@ Index
* features, undocumented: Undocumented. (line 6)
* Fenlason, Jay <1>: Contributors. (line 19)
* Fenlason, Jay: History. (line 30)
-* fflush function: I/O Functions. (line 25)
-* fflush function, unsupported: Options. (line 227)
+* fflush() function: I/O Functions. (line 25)
+* fflush() function, unsupported: Options. (line 219)
* field numbers: Nonconstant Fields. (line 6)
* field operator $: Fields. (line 19)
* field operators, dollar sign as: Fields. (line 19)
* field separators <1>: User-modified. (line 56)
-* field separators: Field Separators. (line 13)
-* field separators, choice of: Field Separators. (line 49)
+* field separators: Field Separators. (line 14)
+* field separators, choice of: Field Separators. (line 50)
* field separators, FIELDWIDTHS variable and: User-modified. (line 35)
* field separators, FPAT variable and: User-modified. (line 45)
* field separators, in multiline records: Multiple Line. (line 41)
@@ -23909,7 +25278,7 @@ Index
* field separators, POSIX and: Fields. (line 6)
* field separators, regular expressions as <1>: Regexp Field Splitting.
(line 6)
-* field separators, regular expressions as: Field Separators. (line 49)
+* field separators, regular expressions as: Field Separators. (line 50)
* field separators, See Also OFS: Changing Fields. (line 64)
* field separators, spaces as: Cut Program. (line 106)
* fields <1>: Basic High Level. (line 73)
@@ -23922,7 +25291,7 @@ Index
* fields, number of: Fields. (line 33)
* fields, numbers: Nonconstant Fields. (line 6)
* fields, printing: Print Examples. (line 21)
-* fields, separating: Field Separators. (line 13)
+* fields, separating: Field Separators. (line 14)
* fields, single-character: Single Character Fields.
(line 6)
* FIELDWIDTHS variable <1>: User-modified. (line 35)
@@ -23930,8 +25299,8 @@ Index
* file descriptors: Special FD. (line 6)
* file names, distinguishing: Auto-set. (line 52)
* file names, in compatibility mode: Special Caveats. (line 9)
-* file names, standard streams in gawk: Special FD. (line 41)
-* FILENAME variable <1>: Auto-set. (line 93)
+* file names, standard streams in gawk: Special FD. (line 44)
+* FILENAME variable <1>: Auto-set. (line 92)
* FILENAME variable: Reading Files. (line 6)
* FILENAME variable, getline, setting with: Getline Notes. (line 19)
* filenames, assignments as: Ignoring Assigns. (line 6)
@@ -23942,15 +25311,14 @@ Index
* files, .po <1>: Translator i18n. (line 6)
* files, .po: Explaining gettext. (line 36)
* files, .po, converting to .mo: I18N Example. (line 62)
-* files, /dev/... special files: Special FD. (line 41)
+* files, /dev/... special files: Special FD. (line 44)
* files, /inet/ (gawk): TCP/IP Networking. (line 6)
* files, /inet4/ (gawk): TCP/IP Networking. (line 6)
* files, /inet6/ (gawk): TCP/IP Networking. (line 6)
-* files, /p (gawk): Portal Files. (line 6)
-* files, as single records: Records. (line 191)
+* files, as single records: Records. (line 193)
* files, awk programs in: Long. (line 6)
* files, awkprof.out: Profiling. (line 10)
-* files, awkvars.out: Options. (line 90)
+* files, awkvars.out: Options. (line 88)
* files, closing: I/O Functions. (line 10)
* files, descriptors, See file descriptors: Special FD. (line 6)
* files, group: Group Functions. (line 6)
@@ -23977,8 +25345,7 @@ Index
* files, portable object: Explaining gettext. (line 36)
* files, portable object, converting to message object files: I18N Example.
(line 62)
-* files, portable object, generating: Options. (line 131)
-* files, portal: Portal Files. (line 6)
+* files, portable object, generating: Options. (line 129)
* files, processing, ARGIND variable and: Auto-set. (line 47)
* files, reading: Rewind Function. (line 6)
* files, reading, multiline records: Multiple Line. (line 6)
@@ -23987,6 +25354,8 @@ Index
* files, source, search path for: Igawk Program. (line 358)
* files, splitting: Split Program. (line 6)
* files, Texinfo, extracting programs from: Extract Program. (line 6)
+* finish debugger command: Dgawk Execution Control.
+ (line 39)
* Fish, Fred: Contributors. (line 50)
* fixed-width data: Constant Size. (line 9)
* flag variables <1>: Tee Program. (line 20)
@@ -23994,9 +25363,9 @@ Index
* floating-point: Unexpected Results. (line 6)
* floating-point, numbers: Basic Data Typing. (line 21)
* floating-point, numbers, AWKNUM internal type: Internals. (line 19)
-* FNR variable <1>: Auto-set. (line 103)
+* FNR variable <1>: Auto-set. (line 102)
* FNR variable: Records. (line 6)
-* FNR variable, changing: Auto-set. (line 193)
+* FNR variable, changing: Auto-set. (line 192)
* for statement: For Statement. (line 6)
* for statement, in arrays: Scanning an Array. (line 20)
* force_number internal function: Internals. (line 27)
@@ -24004,7 +25373,7 @@ Index
* format specifiers, mixing regular with positional specifiers: Printf Ordering.
(line 57)
* format specifiers, printf statement: Control Letters. (line 6)
-* format specifiers, strftime function (gawk): Time Functions.
+* format specifiers, strftime() function (gawk): Time Functions.
(line 85)
* format strings: Basic Printf. (line 15)
* formats, numeric output: OFMT. (line 6)
@@ -24017,26 +25386,28 @@ Index
(line 148)
* forward slash (/), patterns and: Expression Patterns. (line 24)
* FPAT variable: User-modified. (line 45)
+* frame debugger command: Dgawk Stack. (line 25)
* Free Documentation License (FDL): GNU Free Documentation License.
(line 6)
* Free Software Foundation (FSF) <1>: Glossary. (line 286)
+* Free Software Foundation (FSF) <2>: Getting. (line 10)
* Free Software Foundation (FSF): Manual History. (line 6)
-* free_temp internal macro: Internals. (line 102)
* FreeBSD: Glossary. (line 582)
* FS variable <1>: User-modified. (line 56)
-* FS variable: Field Separators. (line 13)
+* FS variable: Field Separators. (line 14)
* FS variable, --field-separator option and: Options. (line 21)
* FS variable, as null string: Single Character Fields.
(line 20)
-* FS variable, as TAB character: Options. (line 220)
+* FS variable, as TAB character: Options. (line 212)
* FS variable, changing value of <1>: Known Bugs. (line 6)
-* FS variable, changing value of: Field Separators. (line 33)
+* FS variable, changing value of: Field Separators. (line 34)
* FS variable, running awk programs and: Cut Program. (line 66)
* FS variable, setting from command line: Command Line Field Separator.
(line 6)
* FS, containing ^: Regexp Field Splitting.
(line 59)
* FSF (Free Software Foundation) <1>: Glossary. (line 286)
+* FSF (Free Software Foundation) <2>: Getting. (line 10)
* FSF (Free Software Foundation): Manual History. (line 6)
* function calls: Function Calls. (line 6)
* function calls, indirect: Indirect Calls. (line 6)
@@ -24073,7 +25444,7 @@ Index
* functions, names of <1>: Definition Syntax. (line 21)
* functions, names of: Arrays. (line 17)
* functions, recursive: Definition Syntax. (line 73)
-* functions, return values, setting: Internals. (line 146)
+* functions, return values, setting: Internals. (line 136)
* functions, string-translation: I18N Functions. (line 6)
* functions, undefined: Function Caveats. (line 79)
* functions, user-defined: User-defined. (line 6)
@@ -24084,14 +25455,14 @@ Index
(line 39)
* functions, user-defined, next/nextfile statements and: Next Statement.
(line 39)
-* G-d: Acknowledgments. (line 72)
+* G-d: Acknowledgments. (line 79)
* Garfinkle, Scott: Contributors. (line 37)
-* gawk, awk and <1>: This Manual. (line 13)
+* gawk, awk and <1>: This Manual. (line 14)
* gawk, awk and: Preface. (line 22)
* gawk, bitwise operations in: Bitwise Functions. (line 39)
* gawk, break statement in: Break Statement. (line 47)
* gawk, built-in variables and: Built-in Variables. (line 14)
-* gawk, character classes and: Character Lists. (line 92)
+* gawk, character classes and: Character Lists. (line 91)
* gawk, coding style in: Adding Code. (line 32)
* gawk, command-line options: GNU Regexp Operators.
(line 70)
@@ -24106,10 +25477,10 @@ Index
* gawk, distribution: Distribution contents.
(line 6)
* gawk, escape sequences: Escape Sequences. (line 125)
-* gawk, extensions, disabling: Options. (line 200)
+* gawk, extensions, disabling: Options. (line 192)
* gawk, features, adding: Adding Code. (line 6)
* gawk, features, advanced: Advanced Features. (line 6)
-* gawk, fflush function in: I/O Functions. (line 45)
+* gawk, fflush() function in: I/O Functions. (line 45)
* gawk, field separators and: User-modified. (line 77)
* gawk, FIELDWIDTHS variable in: User-modified. (line 41)
* gawk, file names in: Special Files. (line 6)
@@ -24156,21 +25527,21 @@ Index
* gawk, string-translation functions: I18N Functions. (line 6)
* gawk, timestamps: Time Functions. (line 6)
* gawk, uses for: Preface. (line 35)
-* gawk, versions of, information about, printing: Options. (line 252)
+* gawk, versions of, information about, printing: Options. (line 249)
* gawk, word-boundary operator: GNU Regexp Operators.
(line 63)
* General Public License (GPL): Glossary. (line 295)
* General Public License, See GPL: Manual History. (line 11)
-* gensub function (gawk) <1>: String Functions. (line 400)
-* gensub function (gawk): Using Constant Regexps.
+* gensub() function (gawk) <1>: String Functions. (line 400)
+* gensub() function (gawk): Using Constant Regexps.
(line 44)
-* gensub function (gawk), escape processing: Gory Details. (line 6)
-* get_actual_argument internal function: Internals. (line 126)
-* get_argument internal function: Internals. (line 121)
-* get_array_argument internal macro: Internals. (line 141)
+* gensub() function (gawk), escape processing: Gory Details. (line 6)
+* get_actual_argument internal function: Internals. (line 116)
+* get_argument internal function: Internals. (line 111)
+* get_array_argument internal macro: Internals. (line 131)
* get_curfunc_arg_count internal function: Internals. (line 37)
-* get_record input method: Internals. (line 178)
-* get_scalar_argument internal macro: Internals. (line 136)
+* get_record input method: Internals. (line 162)
+* get_scalar_argument internal macro: Internals. (line 126)
* getgrent function (C library): Group Functions. (line 6)
* getgrent user-defined function: Group Functions. (line 6)
* getgrgid function (C library): Group Functions. (line 182)
@@ -24206,7 +25577,7 @@ Index
* gettext library, locale categories: Explaining gettext. (line 78)
* gettimeofday user-defined function: Gettimeofday Function.
(line 16)
-* GNITS mailing list: Acknowledgments. (line 49)
+* GNITS mailing list: Acknowledgments. (line 51)
* GNU awk, See gawk: Preface. (line 48)
* GNU Free Documentation License: GNU Free Documentation License.
(line 6)
@@ -24214,7 +25585,7 @@ Index
* GNU Lesser General Public License: Glossary. (line 373)
* GNU long options <1>: Options. (line 6)
* GNU long options: Command Line. (line 13)
-* GNU long options, printing list of: Options. (line 139)
+* GNU long options, printing list of: Options. (line 136)
* GNU Project <1>: Glossary. (line 304)
* GNU Project: Manual History. (line 11)
* GNU/Linux <1>: Glossary. (line 582)
@@ -24223,26 +25594,31 @@ Index
* GNU/Linux: Manual History. (line 28)
* GPL (General Public License) <1>: Glossary. (line 295)
* GPL (General Public License): Manual History. (line 11)
-* GPL (General Public License), printing: Options. (line 85)
+* GPL (General Public License), printing: Options. (line 83)
* grcat program: Group Functions. (line 15)
* Grigera, Juan: Contributors. (line 55)
* group database, reading: Group Functions. (line 6)
* group file: Group Functions. (line 6)
* groups, information about: Group Functions. (line 6)
-* gsub function <1>: String Functions. (line 384)
-* gsub function: Using Constant Regexps.
+* gsub() function <1>: String Functions. (line 384)
+* gsub() function: Using Constant Regexps.
(line 44)
-* gsub function, arguments of: String Functions. (line 364)
-* gsub function, escape processing: Gory Details. (line 6)
+* gsub() function, arguments of: String Functions. (line 364)
+* gsub() function, escape processing: Gory Details. (line 6)
+* h debugger command (alias for help): Miscellaneous Dgawk Commands.
+ (line 71)
* Hankerson, Darrel <1>: Contributors. (line 57)
-* Hankerson, Darrel: Acknowledgments. (line 53)
-* Hartholz, Elaine: Acknowledgments. (line 35)
-* Hartholz, Marshall: Acknowledgments. (line 35)
+* Hankerson, Darrel: Acknowledgments. (line 59)
+* Haque, John: Acknowledgments. (line 59)
+* Hartholz, Elaine: Acknowledgments. (line 37)
+* Hartholz, Marshall: Acknowledgments. (line 37)
* Hasegawa, Isamu: Contributors. (line 86)
+* help debugger command: Miscellaneous Dgawk Commands.
+ (line 71)
* hexadecimal numbers: Nondecimal-numbers. (line 6)
-* hexadecimal values, enabling interpretation of: Options. (line 168)
+* hexadecimal values, enabling interpretation of: Options. (line 160)
* histsort.awk program: History Sorting. (line 25)
-* Hughes, Phil: Acknowledgments. (line 40)
+* Hughes, Phil: Acknowledgments. (line 42)
* HUP signal: Profiling. (line 207)
* hyphen (-), - operator: Precedence. (line 52)
* hyphen (-), -- (decrement/increment) operators: Precedence. (line 46)
@@ -24250,13 +25626,15 @@ Index
* hyphen (-), -= operator <1>: Precedence. (line 95)
* hyphen (-), -= operator: Assignment Ops. (line 129)
* hyphen (-), filenames beginning with: Options. (line 56)
-* hyphen (-), in character lists: Character Lists. (line 17)
+* hyphen (-), in character lists: Character Lists. (line 16)
+* i debugger command (alias for info): Dgawk Info. (line 12)
* id utility: Id Program. (line 6)
* id.awk program: Id Program. (line 30)
* if statement <1>: If Statement. (line 6)
* if statement: Regexp Usage. (line 19)
* if statement, actions, changing: Ranges. (line 25)
* igawk.sh program: Igawk Program. (line 118)
+* ignore debugger command: Breakpoint Control. (line 80)
* IGNORECASE variable <1>: User-modified. (line 82)
* IGNORECASE variable: Case-sensitivity. (line 26)
* IGNORECASE variable, array sorting and: Array Sorting. (line 86)
@@ -24276,9 +25654,10 @@ Index
* in operator, arrays and: Reference to Elements.
(line 25)
* increment operators: Increment Ops. (line 6)
-* index function: String Functions. (line 60)
+* index() function: String Functions. (line 60)
* indexing arrays: Array Intro. (line 51)
* indirect function calls: Indirect Calls. (line 6)
+* info debugger command: Dgawk Info. (line 12)
* initialization, automatic: More Complex. (line 38)
* input files: Reading Files. (line 6)
* input files, closing: Close Files And Pipes.
@@ -24307,8 +25686,8 @@ Index
* installation, tandem: Tandem Installation. (line 6)
* installation, vms: VMS Installation. (line 6)
* installing gawk: Installation. (line 6)
-* int function: Numeric Functions. (line 11)
* INT signal (MS-DOS): Profiling. (line 210)
+* int() function: Numeric Functions. (line 11)
* integers: Basic Data Typing. (line 21)
* integers, unsigned: Basic Data Typing. (line 28)
* interacting with other programs: I/O Functions. (line 64)
@@ -24318,7 +25697,7 @@ Index
(line 13)
* internationalization, localization: User-modified. (line 152)
* internationalization, localization, character classes: Character Lists.
- (line 92)
+ (line 91)
* internationalization, localization, gawk and: Internationalization.
(line 13)
* internationalization, localization, locale categories: Explaining gettext.
@@ -24332,40 +25711,42 @@ Index
* interpreted programs: Basic High Level. (line 15)
* interval expressions: Regexp Operators. (line 115)
* inventory-shipped file: Sample Data Files. (line 32)
-* IOBUF internal structure: Internals. (line 178)
-* iop_alloc internal function: Internals. (line 178)
+* IOBUF internal structure: Internals. (line 162)
+* iop_alloc internal function: Internals. (line 162)
* ISO: Glossary. (line 355)
* ISO 8859-1: Glossary. (line 137)
* ISO Latin-1: Glossary. (line 137)
* Jacobs, Andrew: Passwd Functions. (line 76)
* Jaegermann, Michal <1>: Contributors. (line 45)
-* Jaegermann, Michal: Acknowledgments. (line 53)
+* Jaegermann, Michal: Acknowledgments. (line 59)
* Java implementation of awk: Other Versions. (line 111)
* jawk: Other Versions. (line 111)
* Jedi knights: Undocumented. (line 6)
* join user-defined function: Join Function. (line 18)
* Kahrs, Ju"rgen <1>: Contributors. (line 65)
-* Kahrs, Ju"rgen: Acknowledgments. (line 53)
-* Kasal, Stepan: Acknowledgments. (line 53)
+* Kahrs, Ju"rgen: Acknowledgments. (line 59)
+* Kasal, Stepan: Acknowledgments. (line 59)
* Kenobi, Obi-Wan: Undocumented. (line 6)
* Kernighan, Brian <1>: Basic Data Typing. (line 71)
* Kernighan, Brian <2>: Other Versions. (line 13)
* Kernighan, Brian <3>: Contributors. (line 12)
* Kernighan, Brian <4>: BTL. (line 6)
* Kernighan, Brian <5>: Concatenation. (line 6)
-* Kernighan, Brian <6>: Acknowledgments. (line 62)
+* Kernighan, Brian <6>: Acknowledgments. (line 73)
* Kernighan, Brian <7>: Conventions. (line 33)
* Kernighan, Brian: History. (line 17)
* kill command, dynamic profiling: Profiling. (line 185)
* Knights, jedi: Undocumented. (line 6)
* Kwok, Conrad: Contributors. (line 37)
+* l debugger command (alias for list): Miscellaneous Dgawk Commands.
+ (line 77)
* labels.awk program: Labels Program. (line 48)
* languages, data-driven: Basic High Level. (line 85)
* LC_ALL locale category: Explaining gettext. (line 116)
* LC_COLLATE locale category: Explaining gettext. (line 89)
* LC_CTYPE locale category: Explaining gettext. (line 93)
* LC_MESSAGES locale category: Explaining gettext. (line 83)
-* LC_MESSAGES locale category, bindtextdomain function (gawk): Programmer i18n.
+* LC_MESSAGES locale category, bindtextdomain() function (gawk): Programmer i18n.
(line 86)
* LC_MONETARY locale category: Explaining gettext. (line 99)
* LC_NUMERIC locale category: Explaining gettext. (line 103)
@@ -24380,7 +25761,7 @@ Index
(line 11)
* left shift, bitwise: Bitwise Functions. (line 32)
* leftmost longest match: Multiple Line. (line 26)
-* length function: String Functions. (line 71)
+* length() function: String Functions. (line 71)
* Lesser General Public License (LGPL): Glossary. (line 373)
* LGPL (Lesser General Public License): Glossary. (line 373)
* libraries of awk functions: Library Functions. (line 6)
@@ -24422,23 +25803,25 @@ Index
* lint checking, array subscripts: Uninitialized Subscripts.
(line 42)
* lint checking, empty programs: Command Line. (line 16)
-* lint checking, issuing warnings: Options. (line 144)
+* lint checking, issuing warnings: Options. (line 141)
* lint checking, POSIXLY_CORRECT environment variable: Options.
- (line 290)
+ (line 287)
* lint checking, undefined functions: Function Caveats. (line 96)
* LINT variable: User-modified. (line 97)
* Linux <1>: Glossary. (line 582)
* Linux <2>: Atari Compiling. (line 16)
* Linux <3>: I18N Example. (line 55)
* Linux: Manual History. (line 28)
+* list debugger command: Miscellaneous Dgawk Commands.
+ (line 77)
* locale categories: Explaining gettext. (line 78)
-* locale decimal point character: Options. (line 224)
+* locale decimal point character: Options. (line 216)
* locale, definition of: Locales. (line 6)
* localization: I18N and L10N. (line 6)
* localization, See internationalization, localization: I18N and L10N.
(line 6)
* log files, timestamps in: Time Functions. (line 6)
-* log function: Numeric Functions. (line 27)
+* log() function: Numeric Functions. (line 27)
* logical false/true: Truth Values. (line 6)
* logical operators, See Boolean expressions: Boolean Ops. (line 6)
* login information: Passwd Functions. (line 16)
@@ -24450,11 +25833,11 @@ Index
* loops, See Also while statement: While Statement. (line 6)
* Lost In Space: Dynamic Extensions. (line 6)
* ls utility: More Complex. (line 15)
-* lshift function (gawk): Bitwise Functions. (line 45)
+* lshift() function (gawk): Bitwise Functions. (line 45)
* lvalues/rvalues: Assignment Ops. (line 32)
* mailing labels, printing: Labels Program. (line 6)
-* mailing list, GNITS: Acknowledgments. (line 49)
-* make_builtin internal function: Internals. (line 107)
+* mailing list, GNITS: Acknowledgments. (line 51)
+* make_builtin internal function: Internals. (line 97)
* make_number internal function: Internals. (line 82)
* make_string internal function: Internals. (line 77)
* mark parity: Ordinal Functions. (line 44)
@@ -24462,15 +25845,16 @@ Index
(line 6)
* marked strings, extracting: String Extraction. (line 6)
* Marx, Groucho: Increment Ops. (line 61)
-* match function: String Functions. (line 112)
-* match function, RSTART/RLENGTH variables: String Functions. (line 129)
+* match() function: String Functions. (line 111)
+* match() function, RSTART/RLENGTH variables: String Functions.
+ (line 129)
* matching, expressions, See comparison expressions: Typing and Comparison.
(line 9)
* matching, leftmost longest: Multiple Line. (line 26)
* matching, null strings: Gory Details. (line 159)
* mawk program: Other Versions. (line 34)
* McPhee, Patrick: Contributors. (line 92)
-* memory, releasing: Internals. (line 102)
+* memory, releasing: Internals. (line 92)
* message object files: Explaining gettext. (line 39)
* message object files, converting from portable object files: I18N Example.
(line 62)
@@ -24479,10 +25863,12 @@ Index
* message object files, specifying directory of: Explaining gettext.
(line 51)
* metacharacters, escape sequences for: Escape Sequences. (line 132)
-* mktime function (gawk): Time Functions. (line 30)
+* mktime() function (gawk): Time Functions. (line 30)
* modifiers, in format specifiers: Format Modifiers. (line 6)
* monetary information, localization: Explaining gettext. (line 99)
* msgfmt utility: I18N Example. (line 62)
+* n debugger command (alias for next): Dgawk Execution Control.
+ (line 43)
* names, arrays/variables <1>: Library Names. (line 6)
* names, arrays/variables: Arrays. (line 17)
* names, functions <1>: Library Names. (line 6)
@@ -24490,15 +25876,17 @@ Index
* namespace issues <1>: Library Names. (line 6)
* namespace issues: Arrays. (line 17)
* namespace issues, functions: Definition Syntax. (line 21)
+* nargs internal variable: Internals. (line 46)
* nawk utility: Names. (line 17)
* negative zero: Unexpected Results. (line 28)
* NetBSD: Glossary. (line 582)
* networks, programming: TCP/IP Networking. (line 6)
* networks, support for: Special Network. (line 6)
-* newlines <1>: Options. (line 207)
+* newlines <1>: Options. (line 199)
* newlines <2>: Boolean Ops. (line 67)
* newlines: Statements/Lines. (line 6)
-* newlines, as field separators: Field Separators. (line 63)
+* newlines, as field separators: Default Field Splitting.
+ (line 6)
* newlines, as record separators: Records. (line 20)
* newlines, in dynamic regexps: Computed Regexps. (line 59)
* newlines, in regexp constants: Computed Regexps. (line 69)
@@ -24506,7 +25894,9 @@ Index
* newlines, separating statements in actions <1>: Statements. (line 10)
* newlines, separating statements in actions: Action Overview.
(line 19)
-* next file statement: POSIX/GNU. (line 154)
+* next debugger command: Dgawk Execution Control.
+ (line 43)
+* next file statement: POSIX/GNU. (line 155)
* next file statement, in gawk: Nextfile Statement. (line 46)
* next statement <1>: Next Statement. (line 6)
* next statement: Boolean Ops. (line 85)
@@ -24520,16 +25910,20 @@ Index
* nextfile statement, user-defined functions and: Nextfile Statement.
(line 39)
* nextfile user-defined function: Nextfile Function. (line 38)
-* NF variable <1>: Auto-set. (line 108)
+* nexti debugger command: Dgawk Execution Control.
+ (line 49)
+* NF variable <1>: Auto-set. (line 107)
* NF variable: Fields. (line 33)
* NF variable, decrementing: Changing Fields. (line 107)
+* ni debugger command (alias for nexti): Dgawk Execution Control.
+ (line 49)
* noassign.awk program: Ignoring Assigns. (line 15)
* NODE internal type: Internals. (line 23)
-* nodes, duplicating: Internals. (line 97)
+* nodes, duplicating: Internals. (line 87)
* not Boolean-logic operator: Boolean Ops. (line 6)
-* NR variable <1>: Auto-set. (line 119)
+* NR variable <1>: Auto-set. (line 118)
* NR variable: Records. (line 6)
-* NR variable, changing: Auto-set. (line 193)
+* NR variable, changing: Auto-set. (line 192)
* null strings <1>: Basic Data Typing. (line 47)
* null strings <2>: Truth Values. (line 6)
* null strings <3>: Regexp Field Splitting.
@@ -24566,10 +25960,11 @@ Index
* numeric, output format: OFMT. (line 6)
* numeric, strings: Variable Typing. (line 6)
* numeric, values: Internals. (line 27)
+* o debugger command (alias for option): Dgawk Info. (line 56)
* oawk utility: Names. (line 17)
* obsolete features: Obsolete. (line 6)
* octal numbers: Nondecimal-numbers. (line 6)
-* octal values, enabling interpretation of: Options. (line 168)
+* octal values, enabling interpretation of: Options. (line 160)
* OFMT variable <1>: User-modified. (line 114)
* OFMT variable <2>: Conversion. (line 54)
* OFMT variable: OFMT. (line 15)
@@ -24579,7 +25974,6 @@ Index
* OFS variable: Changing Fields. (line 64)
* OpenBSD: Glossary. (line 582)
* OpenSolaris: Other Versions. (line 101)
-* operating systems, BSD-based <1>: Portal Files. (line 6)
* operating systems, BSD-based: Manual History. (line 28)
* operating systems, PC, gawk on: PC Using. (line 6)
* operating systems, PC, gawk on, installing: PC Installation.
@@ -24612,6 +26006,7 @@ Index
(line 48)
* operators, word-boundary (gawk): GNU Regexp Operators.
(line 63)
+* option debugger command: Dgawk Info. (line 56)
* options, command-line <1>: Options. (line 6)
* options, command-line <2>: Command Line Field Separator.
(line 6)
@@ -24622,10 +26017,10 @@ Index
* options, deprecated: Obsolete. (line 6)
* options, long <1>: Options. (line 6)
* options, long: Command Line. (line 13)
-* options, printing list of: Options. (line 139)
+* options, printing list of: Options. (line 136)
* OR bitwise operation: Bitwise Functions. (line 6)
* or Boolean-logic operator: Boolean Ops. (line 6)
-* or function (gawk): Bitwise Functions. (line 39)
+* or() function (gawk): Bitwise Functions. (line 39)
* ord user-defined function: Ordinal Functions. (line 16)
* order of evaluation, concatenation: Concatenation. (line 42)
* ORS variable <1>: User-modified. (line 128)
@@ -24644,13 +26039,14 @@ Index
* output, printing, See printing: Printing. (line 6)
* output, records: Output Separators. (line 20)
* output, standard: Special FD. (line 6)
+* p debugger command (alias for print): Viewing And Changing Data.
+ (line 36)
* P1003.2 POSIX standard: Glossary. (line 426)
-* param_cnt internal variable: Internals. (line 46)
* parameters, number of: Internals. (line 46)
* parentheses (): Regexp Operators. (line 78)
* parentheses (), pgawk program: Profiling. (line 144)
* password file: Passwd Functions. (line 16)
-* patsplit function: String Functions. (line 200)
+* patsplit() function: String Functions. (line 200)
* patterns: Patterns and Actions.
(line 6)
* patterns, comparison expressions as: Expression Patterns. (line 14)
@@ -24678,8 +26074,8 @@ Index
(line 6)
* pipes, input: Getline/Pipe. (line 6)
* pipes, output: Redirection. (line 57)
-* Pitts, Dave: Bugs. (line 72)
-* Pitts, Davi: Acknowledgments. (line 53)
+* Pitts, Dave <1>: Bugs. (line 72)
+* Pitts, Dave: Acknowledgments. (line 59)
* plus sign (+): Regexp Operators. (line 101)
* plus sign (+), + operator: Precedence. (line 52)
* plus sign (+), ++ operator <1>: Precedence. (line 46)
@@ -24697,31 +26093,30 @@ Index
* portability, backslash continuation and: Statements/Lines. (line 30)
* portability, backslash in escape sequences: Escape Sequences.
(line 113)
-* portability, close function and: Close Files And Pipes.
+* portability, close() function and: Close Files And Pipes.
(line 81)
-* portability, data files as single record: Records. (line 170)
+* portability, data files as single record: Records. (line 172)
* portability, deleting array elements: Delete. (line 51)
* portability, example programs: Library Functions. (line 31)
-* portability, fflush function and: I/O Functions. (line 29)
+* portability, fflush() function and: I/O Functions. (line 29)
* portability, functions, defining: Definition Syntax. (line 94)
* portability, gawk: New Ports. (line 6)
* portability, gettext library and: Explaining gettext. (line 10)
* portability, internationalization and: I18N Portability. (line 6)
-* portability, length function: String Functions. (line 80)
+* portability, length() function: String Functions. (line 80)
* portability, new awk vs. old awk: Conversion. (line 54)
* portability, next statement in user-defined functions: Function Caveats.
(line 99)
-* portability, NF variable, decrementing: Changing Fields. (line 116)
+* portability, NF variable, decrementing: Changing Fields. (line 115)
* portability, operators: Increment Ops. (line 61)
* portability, operators, not in POSIX awk: Precedence. (line 98)
-* portability, POSIXLY_CORRECT environment variable: Options. (line 308)
-* portability, substr function: String Functions. (line 482)
+* portability, POSIXLY_CORRECT environment variable: Options. (line 305)
+* portability, substr() function: String Functions. (line 482)
* portable object files <1>: Translator i18n. (line 6)
* portable object files: Explaining gettext. (line 36)
* portable object files, converting to message object files: I18N Example.
(line 62)
-* portable object files, generating: Options. (line 131)
-* portal files: Portal Files. (line 6)
+* portable object files, generating: Options. (line 129)
* porting gawk: New Ports. (line 6)
* positional specifiers, printf statement <1>: Printf Ordering.
(line 6)
@@ -24730,7 +26125,7 @@ Index
(line 57)
* positive zero: Unexpected Results. (line 28)
* POSIX awk <1>: Assignment Ops. (line 136)
-* POSIX awk: This Manual. (line 13)
+* POSIX awk: This Manual. (line 14)
* POSIX awk, **= operator and: Assignment Ops. (line 142)
* POSIX awk, < operator and: Getline/File. (line 26)
* POSIX awk, arithmetic operators and: Arithmetic Ops. (line 36)
@@ -24739,9 +26134,9 @@ Index
* POSIX awk, BEGIN/END patterns: I/O And BEGIN/END. (line 16)
* POSIX awk, break statement and: Break Statement. (line 47)
* POSIX awk, changes in awk versions: POSIX. (line 6)
-* POSIX awk, character lists and: Character Lists. (line 24)
+* POSIX awk, character lists and: Character Lists. (line 23)
* POSIX awk, character lists and, character classes: Character Lists.
- (line 30)
+ (line 29)
* POSIX awk, continue statement and: Continue Statement. (line 43)
* POSIX awk, CONVFMT variable and: User-modified. (line 28)
* POSIX awk, date utility and: Time Functions. (line 259)
@@ -24750,8 +26145,8 @@ Index
* POSIX awk, field separators and: Fields. (line 6)
* POSIX awk, FS variable and: User-modified. (line 66)
* POSIX awk, function keyword in: Definition Syntax. (line 78)
-* POSIX awk, functions and, gsub/sub: Gory Details. (line 53)
-* POSIX awk, functions and, length: String Functions. (line 80)
+* POSIX awk, functions and, gsub()/sub(): Gory Details. (line 53)
+* POSIX awk, functions and, length(): String Functions. (line 80)
* POSIX awk, GNU long options and: Options. (line 15)
* POSIX awk, interval expressions in: Regexp Operators. (line 134)
* POSIX awk, next/nextfile statements and: Next Statement. (line 39)
@@ -24763,14 +26158,16 @@ Index
* POSIX awk, regular expressions and: Regexp Operators. (line 156)
* POSIX awk, timestamps and: Time Functions. (line 6)
* POSIX awk, | I/O operator and: Getline/Pipe. (line 52)
-* POSIX mode: Options. (line 200)
+* POSIX mode: Options. (line 192)
* POSIX, awk and: Preface. (line 22)
* POSIX, gawk extensions not included in: POSIX/GNU. (line 6)
* POSIX, programs, implementing in awk: Clones. (line 6)
-* POSIXLY_CORRECT environment variable: Options. (line 290)
+* POSIXLY_CORRECT environment variable: Options. (line 287)
* precedence <1>: Precedence. (line 6)
* precedence: Increment Ops. (line 61)
* precedence, regexp operators: Regexp Operators. (line 151)
+* print debugger command: Viewing And Changing Data.
+ (line 36)
* print statement: Printing. (line 16)
* print statement, BEGIN/END patterns and: I/O And BEGIN/END. (line 16)
* print statement, commas, omitting: Print Examples. (line 31)
@@ -24779,7 +26176,9 @@ Index
* print statement, OFMT variable and: User-modified. (line 123)
* print statement, See Also redirection, of output: Redirection.
(line 17)
-* print statement, sprintf function and: Round Function. (line 6)
+* print statement, sprintf() function and: Round Function. (line 6)
+* printf debugger command: Viewing And Changing Data.
+ (line 54)
* printf statement <1>: Printf. (line 6)
* printf statement: Printing. (line 16)
* printf statement, columns, aligning: Print Examples. (line 70)
@@ -24794,10 +26193,10 @@ Index
(line 57)
* printf statement, See Also redirection, of output: Redirection.
(line 17)
-* printf statement, sprintf function and: Round Function. (line 6)
+* printf statement, sprintf() function and: Round Function. (line 6)
* printf statement, syntax of: Basic Printf. (line 6)
* printing: Printing. (line 6)
-* printing, list of options: Options. (line 139)
+* printing, list of options: Options. (line 136)
* printing, mailing labels: Labels Program. (line 6)
* printing, unduplicated lines of text: Uniq Program. (line 6)
* printing, user information: Id Program. (line 6)
@@ -24806,9 +26205,8 @@ Index
* processing data: Basic High Level. (line 6)
* PROCINFO array <1>: Group Functions. (line 6)
* PROCINFO array <2>: Passwd Functions. (line 6)
-* PROCINFO array <3>: Auto-set. (line 124)
-* PROCINFO array: Special Caveats. (line 12)
-* PROCINFO variable: Internals. (line 165)
+* PROCINFO array: Auto-set. (line 123)
+* PROCINFO variable: Internals. (line 149)
* profiling awk programs: Profiling. (line 6)
* profiling awk programs, dynamically: Profiling. (line 177)
* profiling gawk, See pgawk program: Profiling. (line 6)
@@ -24824,7 +26222,7 @@ Index
(line 10)
* programming conventions, functions, writing: Definition Syntax.
(line 55)
-* programming conventions, gawk internals: Internal File Ops. (line 33)
+* programming conventions, gawk internals: Internal File Ops. (line 32)
* programming conventions, nextfile statement: Nextfile Function.
(line 20)
* programming conventions, private variable names: Library Names.
@@ -24835,30 +26233,37 @@ Index
* programming, basic steps: Basic High Level. (line 20)
* programming, concepts: Basic Concepts. (line 6)
* pwcat program: Passwd Functions. (line 23)
+* q debugger command (alias for quit): Miscellaneous Dgawk Commands.
+ (line 104)
* QSE Awk: Other Versions. (line 126)
* question mark (?) <1>: GNU Regexp Operators.
(line 59)
* question mark (?): Regexp Operators. (line 110)
* question mark (?), ?: operator: Precedence. (line 92)
* QuikTrim Awk: Other Versions. (line 119)
+* quit debugger command: Miscellaneous Dgawk Commands.
+ (line 104)
* QUIT signal (MS-DOS): Profiling. (line 210)
* quoting <1>: Comments. (line 27)
* quoting <2>: Long. (line 26)
* quoting: Read Terminal. (line 25)
* quoting, rules for: Quoting. (line 6)
* quoting, tricks for: Quoting. (line 71)
+* r debugger command (alias for run): Dgawk Execution Control.
+ (line 62)
* Rakitzis, Byron: History Sorting. (line 25)
-* rand function: Numeric Functions. (line 40)
+* rand() function: Numeric Functions. (line 40)
* random numbers, Cliff: Cliff Random Function.
(line 6)
-* random numbers, rand/srand functions: Numeric Functions. (line 40)
+* random numbers, rand()/srand() functions: Numeric Functions.
+ (line 40)
* random numbers, seed of: Numeric Functions. (line 70)
* range expressions: Character Lists. (line 6)
* range patterns: Ranges. (line 6)
* Rankin, Pat <1>: Bugs. (line 71)
* Rankin, Pat <2>: Contributors. (line 35)
* Rankin, Pat <3>: Assignment Ops. (line 100)
-* Rankin, Pat: Acknowledgments. (line 53)
+* Rankin, Pat: Acknowledgments. (line 59)
* raw sockets: TCP/IP Networking. (line 36)
* readable data files, checking: File Checking. (line 6)
* readable.awk program: File Checking. (line 11)
@@ -24874,7 +26279,7 @@ Index
* records, printing: Print. (line 22)
* records, splitting input into: Records. (line 6)
* records, terminating: Records. (line 112)
-* records, treating files as: Records. (line 191)
+* records, treating files as: Records. (line 193)
* recursive functions: Definition Syntax. (line 73)
* redirection of input: Getline/File. (line 6)
* redirection of output: Redirection. (line 6)
@@ -24882,7 +26287,7 @@ Index
* regexp constants <1>: Comparison Operators.
(line 102)
* regexp constants <2>: Regexp Constants. (line 6)
-* regexp constants: Regexp Usage. (line 58)
+* regexp constants: Regexp Usage. (line 57)
* regexp constants, /=.../, /= operator and: Assignment Ops. (line 148)
* regexp constants, as patterns: Expression Patterns. (line 36)
* regexp constants, in gawk: Using Constant Regexps.
@@ -24890,10 +26295,10 @@ Index
* regexp constants, slashes vs. quotes: Computed Regexps. (line 28)
* regexp constants, vs. string constants: Computed Regexps. (line 38)
* regexp, See regular expressions: Regexp. (line 6)
-* register_deferred_variable internal function: Internals. (line 165)
-* register_open_hook internal function: Internals. (line 178)
+* register_deferred_variable internal function: Internals. (line 149)
+* register_open_hook internal function: Internals. (line 162)
* regular expressions: Regexp. (line 6)
-* regular expressions as field separators: Field Separators. (line 49)
+* regular expressions as field separators: Field Separators. (line 50)
* regular expressions, anchors in: Regexp Operators. (line 22)
* regular expressions, as field separators: Regexp Field Splitting.
(line 6)
@@ -24904,13 +26309,13 @@ Index
* regular expressions, case sensitivity: Case-sensitivity. (line 6)
* regular expressions, computed: Computed Regexps. (line 6)
* regular expressions, constants, See regexp constants: Regexp Usage.
- (line 58)
+ (line 57)
* regular expressions, dynamic: Computed Regexps. (line 6)
* regular expressions, dynamic, with embedded newlines: Computed Regexps.
(line 59)
* regular expressions, gawk, command-line options: GNU Regexp Operators.
(line 70)
-* regular expressions, interval expressions and: Options. (line 236)
+* regular expressions, interval expressions and: Options. (line 228)
* regular expressions, leftmost longest match: Leftmost Longest.
(line 6)
* regular expressions, operators <1>: Regexp Operators. (line 6)
@@ -24926,9 +26331,11 @@ Index
* regular expressions, searching for: Egrep Program. (line 6)
* relational operators, See comparison operators: Typing and Comparison.
(line 9)
+* return debugger command: Dgawk Execution Control.
+ (line 54)
* return statement, user-defined functions: Return Statement. (line 6)
-* return values, close function: Close Files And Pipes.
- (line 130)
+* return values, close() function: Close Files And Pipes.
+ (line 131)
* rev user-defined function: Function Example. (line 52)
* rewind user-defined function: Rewind Function. (line 16)
* right angle bracket (>), > operator <1>: Precedence. (line 65)
@@ -24942,8 +26349,8 @@ Index
* right angle bracket (>), >> operator (I/O): Redirection. (line 50)
* right shift, bitwise: Bitwise Functions. (line 32)
* Ritchie, Dennis: Basic Data Typing. (line 71)
-* RLENGTH variable: Auto-set. (line 169)
-* RLENGTH variable, match function and: String Functions. (line 129)
+* RLENGTH variable: Auto-set. (line 168)
+* RLENGTH variable, match() function and: String Functions. (line 129)
* Robbins, Arnold <1>: Future Extensions. (line 6)
* Robbins, Arnold <2>: Bugs. (line 29)
* Robbins, Arnold <3>: Contributors. (line 95)
@@ -24953,11 +26360,11 @@ Index
* Robbins, Arnold: Command Line Field Separator.
(line 80)
* Robbins, Bill: Getline/Pipe. (line 36)
-* Robbins, Harry: Acknowledgments. (line 72)
-* Robbins, Jean: Acknowledgments. (line 72)
+* Robbins, Harry: Acknowledgments. (line 79)
+* Robbins, Jean: Acknowledgments. (line 79)
* Robbins, Miriam <1>: Passwd Functions. (line 76)
* Robbins, Miriam <2>: Getline/Pipe. (line 36)
-* Robbins, Miriam: Acknowledgments. (line 72)
+* Robbins, Miriam: Acknowledgments. (line 79)
* Robinson, Will: Dynamic Extensions. (line 6)
* robot, the: Dynamic Extensions. (line 6)
* Rommel, Kai Uwe: Contributors. (line 42)
@@ -24967,21 +26374,25 @@ Index
* RS variable <1>: User-modified. (line 133)
* RS variable: Records. (line 20)
* RS variable, multiline records and: Multiple Line. (line 17)
-* rshift function (gawk): Bitwise Functions. (line 46)
-* RSTART variable: Auto-set. (line 175)
-* RSTART variable, match function and: String Functions. (line 129)
-* RT variable <1>: Auto-set. (line 182)
+* rshift() function (gawk): Bitwise Functions. (line 46)
+* RSTART variable: Auto-set. (line 174)
+* RSTART variable, match() function and: String Functions. (line 129)
+* RT variable <1>: Auto-set. (line 181)
* RT variable <2>: Multiple Line. (line 129)
* RT variable: Records. (line 112)
* Rubin, Paul <1>: Contributors. (line 16)
* Rubin, Paul: History. (line 30)
* rule, definition of: Getting Started. (line 21)
+* run debugger command: Dgawk Execution Control.
+ (line 62)
* rvalues/lvalues: Assignment Ops. (line 32)
-* sandbox mode: Options. (line 243)
+* s debugger command (alias for step): Dgawk Execution Control.
+ (line 68)
+* sandbox mode: Options. (line 235)
* scalar values: Basic Data Typing. (line 13)
-* Schorr, Andrew: Acknowledgments. (line 53)
-* Schreiber, Bert: Acknowledgments. (line 35)
-* Schreiber, Rita: Acknowledgments. (line 35)
+* Schorr, Andrew: Acknowledgments. (line 59)
+* Schreiber, Bert: Acknowledgments. (line 37)
+* Schreiber, Rita: Acknowledgments. (line 37)
* search paths <1>: VMS Running. (line 28)
* search paths: PC Using. (line 11)
* search paths, for source files <1>: VMS Running. (line 28)
@@ -25009,7 +26420,8 @@ Index
* separators, for statements in actions: Action Overview. (line 19)
* separators, record: User-modified. (line 133)
* separators, subscript: User-modified. (line 146)
-* set_value internal function: Internals. (line 146)
+* set debugger command: Viewing And Changing Data.
+ (line 59)
* shells, piping commands into: Redirection. (line 143)
* shells, quoting: Using Shell Variables.
(line 12)
@@ -25019,11 +26431,13 @@ Index
(line 6)
* shift, bitwise: Bitwise Functions. (line 32)
* short-circuit operators: Boolean Ops. (line 57)
+* si debugger command (alias for stepi): Dgawk Execution Control.
+ (line 76)
* side effects <1>: Increment Ops. (line 11)
* side effects: Concatenation. (line 42)
* side effects, array indexing: Reference to Elements.
(line 30)
-* side effects, asort function: Array Sorting. (line 25)
+* side effects, asort() function: Array Sorting. (line 25)
* side effects, assignment expressions: Assignment Ops. (line 23)
* side effects, Boolean operators: Boolean Ops. (line 30)
* side effects, conditional expressions: Conditional Exp. (line 22)
@@ -25035,7 +26449,9 @@ Index
* signals, INT/SIGINT (MS-DOS): Profiling. (line 210)
* signals, QUIT/SIGQUIT (MS-DOS): Profiling. (line 210)
* signals, USR1/SIGUSR1: Profiling. (line 185)
-* sin function: Numeric Functions. (line 31)
+* silent debugger command: Dgawk Execution Control.
+ (line 10)
+* sin() function: Numeric Functions. (line 31)
* single quote (') <1>: Quoting. (line 31)
* single quote (') <2>: Long. (line 33)
* single quote ('): One-shot. (line 15)
@@ -25057,22 +26473,22 @@ Index
* source code, Bell Laboratories awk: Other Versions. (line 13)
* source code, gawk: Gawk Distribution. (line 6)
* source code, mawk: Other Versions. (line 34)
-* source code, mixing: Options. (line 104)
+* source code, mixing: Options. (line 102)
* source files, search path for: Igawk Program. (line 358)
* sparse arrays: Array Intro. (line 72)
* Spencer, Henry: Glossary. (line 12)
-* split function: String Functions. (line 215)
-* split function, array elements, deleting: Delete. (line 56)
-* split utility: Split Program. (line 6)
+* split() function: String Functions. (line 215)
+* split() function, array elements, deleting: Delete. (line 56)
+* split() utility: Split Program. (line 6)
* split.awk program: Split Program. (line 30)
-* sprintf function <1>: String Functions. (line 278)
-* sprintf function: OFMT. (line 15)
-* sprintf function, OFMT variable and: User-modified. (line 123)
-* sprintf function, print/printf statements and: Round Function.
+* sprintf() function <1>: String Functions. (line 278)
+* sprintf() function: OFMT. (line 15)
+* sprintf() function, OFMT variable and: User-modified. (line 123)
+* sprintf() function, print/printf statements and: Round Function.
(line 6)
-* sqrt function: Numeric Functions. (line 18)
+* sqrt() function: Numeric Functions. (line 18)
* square brackets ([]): Regexp Operators. (line 55)
-* srand function: Numeric Functions. (line 80)
+* srand() function: Numeric Functions. (line 80)
* Stallman, Richard <1>: Glossary. (line 286)
* Stallman, Richard <2>: Contributors. (line 24)
* Stallman, Richard <3>: Acknowledgments. (line 18)
@@ -25084,12 +26500,16 @@ Index
* statements, compound, control statements and: Statements. (line 10)
* statements, control, in actions: Statements. (line 6)
* statements, multiple: Statements/Lines. (line 90)
+* step debugger command: Dgawk Execution Control.
+ (line 68)
+* stepi debugger command: Dgawk Execution Control.
+ (line 76)
* stlen internal variable: Internals. (line 50)
* stptr internal variable: Internals. (line 50)
* stream editors <1>: Simple Sed. (line 6)
* stream editors: Field Splitting Summary.
(line 47)
-* strftime function (gawk): Time Functions. (line 53)
+* strftime() function (gawk): Time Functions. (line 53)
* string constants: Scalar Constants. (line 15)
* string constants, vs. regexp constants: Computed Regexps. (line 38)
* string extraction (internationalization): String Extraction.
@@ -25110,14 +26530,14 @@ Index
(line 43)
* strings, numeric: Variable Typing. (line 6)
* strings, splitting: String Functions. (line 234)
-* strtonum function (gawk): String Functions. (line 286)
-* strtonum function (gawk), --non-decimal-data option and: Nondecimal Data.
+* strtonum() function (gawk): String Functions. (line 286)
+* strtonum() function (gawk), --non-decimal-data option and: Nondecimal Data.
(line 36)
-* sub function <1>: String Functions. (line 307)
-* sub function: Using Constant Regexps.
+* sub() function <1>: String Functions. (line 307)
+* sub() function: Using Constant Regexps.
(line 44)
-* sub function, arguments of: String Functions. (line 364)
-* sub function, escape processing: Gory Details. (line 6)
+* sub() function, arguments of: String Functions. (line 364)
+* sub() function, escape processing: Gory Details. (line 6)
* subscript separators: User-modified. (line 146)
* subscripts in arrays, multidimensional: Multi-dimensional. (line 10)
* subscripts in arrays, multidimensional, scanning: Multi-scanning.
@@ -25129,14 +26549,16 @@ Index
* SUBSEP variable: User-modified. (line 146)
* SUBSEP variable, multidimensional arrays: Multi-dimensional.
(line 16)
-* substr function: String Functions. (line 451)
+* substr() function: String Functions. (line 451)
* Sumner, Andrew: Other Versions. (line 81)
* switch statement: Switch Statement. (line 6)
* syntactic ambiguity: /= operator vs. /=.../ regexp constant: Assignment Ops.
(line 148)
-* system function: I/O Functions. (line 64)
-* systime function (gawk): Time Functions. (line 24)
+* system() function: I/O Functions. (line 64)
+* systime() function (gawk): Time Functions. (line 24)
+* t debugger command (alias for tbreak): Breakpoint Control. (line 83)
* tandem: Tandem Installation. (line 6)
+* tbreak debugger command: Breakpoint Control. (line 83)
* Tcl: Library Names. (line 57)
* TCP/IP: TCP/IP Networking. (line 6)
* TCP/IP, support for: Special Network. (line 6)
@@ -25179,17 +26601,17 @@ Index
* timestamps, converting dates to: Time Functions. (line 72)
* timestamps, formatted: Gettimeofday Function.
(line 6)
-* tmp_number internal function: Internals. (line 92)
-* tmp_string internal function: Internals. (line 87)
-* tolower function: String Functions. (line 493)
-* toupper function: String Functions. (line 499)
+* tolower() function: String Functions. (line 493)
+* toupper() function: String Functions. (line 499)
* tr utility: Translate Program. (line 6)
+* trace debugger command: Miscellaneous Dgawk Commands.
+ (line 113)
* translate.awk program: Translate Program. (line 55)
-* troubleshooting, --non-decimal-data option: Options. (line 171)
+* troubleshooting, --non-decimal-data option: Options. (line 163)
* troubleshooting, -F option: Known Bugs. (line 6)
* troubleshooting, == operator: Comparison Operators.
(line 37)
-* troubleshooting, awk uses FS not IFS: Field Separators. (line 28)
+* troubleshooting, awk uses FS not IFS: Field Separators. (line 29)
* troubleshooting, backslash before nonspecial character: Escape Sequences.
(line 113)
* troubleshooting, division: Arithmetic Ops. (line 44)
@@ -25197,7 +26619,7 @@ Index
(line 22)
* troubleshooting, fatal errors, printf format strings: Format Modifiers.
(line 159)
-* troubleshooting, fflush function: I/O Functions. (line 52)
+* troubleshooting, fflush() function: I/O Functions. (line 52)
* troubleshooting, function call syntax: Function Calls. (line 28)
* troubleshooting, gawk <1>: Compatibility Mode. (line 6)
* troubleshooting, gawk: Known Bugs. (line 6)
@@ -25205,33 +26627,37 @@ Index
* troubleshooting, gawk, fatal errors, function arguments: Calling Built-in.
(line 16)
* troubleshooting, getline function: File Checking. (line 24)
-* troubleshooting, gsub/sub functions: String Functions. (line 374)
-* troubleshooting, match function: String Functions. (line 195)
+* troubleshooting, gsub()/sub() functions: String Functions. (line 374)
+* troubleshooting, match() function: String Functions. (line 195)
* troubleshooting, print statement, omitting commas: Print Examples.
(line 31)
* troubleshooting, printing: Redirection. (line 118)
-* troubleshooting, quotes with file names: Special FD. (line 63)
+* troubleshooting, quotes with file names: Special FD. (line 66)
* troubleshooting, readable data files: File Checking. (line 6)
* troubleshooting, regexp constants vs. string constants: Computed Regexps.
(line 38)
* troubleshooting, string concatenation: Concatenation. (line 27)
-* troubleshooting, substr function: String Functions. (line 469)
-* troubleshooting, system function: I/O Functions. (line 88)
+* troubleshooting, substr() function: String Functions. (line 469)
+* troubleshooting, system() function: I/O Functions. (line 88)
* troubleshooting, typographical errors, global variables: Options.
- (line 94)
+ (line 92)
* true, logical: Truth Values. (line 6)
* Trueman, David <1>: Contributors. (line 31)
-* Trueman, David <2>: Acknowledgments. (line 44)
+* Trueman, David <2>: Acknowledgments. (line 46)
* Trueman, David: History. (line 30)
* trunc-mod operation: Arithmetic Ops. (line 66)
* truth values: Truth Values. (line 6)
* type conversion: Conversion. (line 21)
* type internal variable: Internals. (line 58)
+* u debugger command (alias for until): Dgawk Execution Control.
+ (line 83)
* undefined functions: Function Caveats. (line 79)
* underscore (_), _ C macro: Explaining gettext. (line 68)
* underscore (_), in names of private variables: Library Names.
(line 29)
* underscore (_), translatable string: Programmer i18n. (line 67)
+* undisplay debugger command: Viewing And Changing Data.
+ (line 80)
* undocumented features: Undocumented. (line 6)
* uninitialized variables, as array subscripts: Uninitialized Subscripts.
(line 6)
@@ -25240,14 +26666,20 @@ Index
* Unix: Glossary. (line 582)
* Unix awk, backslashes in escape sequences: Escape Sequences.
(line 125)
-* Unix awk, close function and: Close Files And Pipes.
- (line 130)
+* Unix awk, close() function and: Close Files And Pipes.
+ (line 131)
* Unix awk, password files, field separators and: Command Line Field Separator.
(line 72)
* Unix, awk scripts and: Executable Scripts. (line 6)
+* unref internal function: Internals. (line 92)
* unsigned integers: Basic Data Typing. (line 28)
-* update_ERRNO internal function: Internals. (line 152)
-* update_ERRNO_saved internal function: Internals. (line 157)
+* until debugger command: Dgawk Execution Control.
+ (line 83)
+* unwatch debugger command: Viewing And Changing Data.
+ (line 84)
+* up debugger command: Dgawk Stack. (line 33)
+* update_ERRNO internal function: Internals. (line 136)
+* update_ERRNO_saved internal function: Internals. (line 141)
* user database, reading: Passwd Functions. (line 6)
* user-defined, functions: User-defined. (line 6)
* user-defined, functions, counts: Profiling. (line 135)
@@ -25276,7 +26708,7 @@ Index
(line 6)
* variables, getline command into, using: Getline/Variable. (line 6)
* variables, global, for library functions: Library Names. (line 11)
-* variables, global, printing list of: Options. (line 90)
+* variables, global, printing list of: Options. (line 88)
* variables, initializing: Using Variables. (line 18)
* variables, names of: Arrays. (line 17)
* variables, private: Library Names. (line 11)
@@ -25294,26 +26726,29 @@ Index
* vertical bar (|), |& I/O operator (I/O): Two-way I/O. (line 44)
* vertical bar (|), |& operator (I/O) <1>: Precedence. (line 65)
* vertical bar (|), |& operator (I/O): Getline/Coprocess. (line 6)
-* vertical bar (|), |& operator (I/O), two-way communications: Portal Files.
- (line 10)
* vertical bar (|), || operator <1>: Precedence. (line 89)
* vertical bar (|), || operator: Boolean Ops. (line 57)
-* Vinschen, Corinna: Acknowledgments. (line 53)
+* Vinschen, Corinna: Acknowledgments. (line 59)
* vname internal variable: Internals. (line 62)
+* w debugger command (alias for watch): Viewing And Changing Data.
+ (line 67)
* w utility: Constant Size. (line 22)
* Wall, Larry <1>: Future Extensions. (line 6)
* Wall, Larry: Array Intro. (line 6)
-* Wallin, Anders: Acknowledgments. (line 53)
-* warnings, issuing: Options. (line 144)
+* Wallin, Anders: Acknowledgments. (line 59)
+* warnings, issuing: Options. (line 141)
+* watch debugger command: Viewing And Changing Data.
+ (line 67)
* wc utility: Wc Program. (line 6)
* wc.awk program: Wc Program. (line 45)
* Weinberger, Peter <1>: Contributors. (line 12)
* Weinberger, Peter: History. (line 17)
* while statement <1>: While Statement. (line 6)
* while statement: Regexp Usage. (line 19)
-* whitespace, as field separators: Field Separators. (line 63)
+* whitespace, as field separators: Default Field Splitting.
+ (line 6)
* whitespace, functions, calling: Calling Built-in. (line 10)
-* whitespace, newlines as: Options. (line 207)
+* whitespace, newlines as: Options. (line 199)
* Williams, Kent: Contributors. (line 37)
* Woehlke, Matthew: Contributors. (line 72)
* Woods, John: Contributors. (line 28)
@@ -25328,11 +26763,11 @@ Index
* words, duplicate, searching for: Dupword Program. (line 6)
* words, usage counts, generating: Word Sorting. (line 6)
* xgettext utility: String Extraction. (line 13)
-* XML: Internals. (line 178)
+* XML: Internals. (line 162)
* XOR bitwise operation: Bitwise Functions. (line 6)
-* xor function (gawk): Bitwise Functions. (line 41)
+* xor() function (gawk): Bitwise Functions. (line 41)
* Zaretskii, Eli <1>: Bugs. (line 69)
-* Zaretskii, Eli: Acknowledgments. (line 53)
+* Zaretskii, Eli: Acknowledgments. (line 59)
* zero, negative vs. positive: Unexpected Results. (line 28)
* zerofile.awk program: Empty Files. (line 21)
* Zoulas, Christos: Contributors. (line 62)
@@ -25348,9 +26783,7 @@ Index
* | (vertical bar), |& operator (I/O) <3>: Redirection. (line 102)
* | (vertical bar), |& operator (I/O): Getline/Coprocess. (line 6)
* | (vertical bar), |& operator (I/O), pipes, closing: Close Files And Pipes.
- (line 117)
-* | (vertical bar), |& operator (I/O), two-way communications: Portal Files.
- (line 10)
+ (line 118)
* | (vertical bar), || operator <1>: Precedence. (line 89)
* | (vertical bar), || operator: Boolean Ops. (line 57)
* ~ (tilde), ~ operator <1>: Expression Patterns. (line 24)
@@ -25359,385 +26792,406 @@ Index
(line 11)
* ~ (tilde), ~ operator <4>: Regexp Constants. (line 6)
* ~ (tilde), ~ operator <5>: Computed Regexps. (line 6)
-* ~ (tilde), ~ operator: Case-sensitivity. (line 26)
+* ~ (tilde), ~ operator <6>: Case-sensitivity. (line 26)
+* ~ (tilde), ~ operator: Regexp Usage. (line 19)

Tag Table:
Node: Top1340
-Node: Foreword28547
-Node: Preface32868
-Ref: Preface-Footnote-135737
-Node: History35969
-Node: Names38185
-Ref: Names-Footnote-139657
-Node: This Manual39729
-Ref: This Manual-Footnote-144484
-Node: Conventions44584
-Node: Manual History46458
-Ref: Manual History-Footnote-149911
-Ref: Manual History-Footnote-249952
-Node: How To Contribute50026
-Node: Acknowledgments51170
-Node: Getting Started55048
-Node: Running gawk57420
-Node: One-shot58606
-Node: Read Terminal59831
-Ref: Read Terminal-Footnote-161492
-Ref: Read Terminal-Footnote-261768
-Node: Long61939
-Node: Executable Scripts63315
-Ref: Executable Scripts-Footnote-165211
-Ref: Executable Scripts-Footnote-265362
-Node: Comments65813
-Node: Quoting68181
-Node: DOS Quoting72758
-Node: Sample Data Files73430
-Node: Very Simple76462
-Node: Two Rules81067
-Node: More Complex83214
-Ref: More Complex-Footnote-186137
-Ref: More Complex-Footnote-286585
-Node: Statements/Lines86668
-Ref: Statements/Lines-Footnote-191050
-Node: Other Features91315
-Node: When92167
-Node: Regexp94423
-Node: Regexp Usage95877
-Node: Escape Sequences97929
-Node: Regexp Operators103668
-Ref: Regexp Operators-Footnote-1110877
-Ref: Regexp Operators-Footnote-2111024
-Node: Character Lists111122
-Ref: table-char-classes113079
-Node: GNU Regexp Operators115704
-Node: Case-sensitivity119434
-Ref: Case-sensitivity-Footnote-1122607
-Node: Leftmost Longest122842
-Node: Computed Regexps124033
-Node: Locales127414
-Node: Reading Files129680
-Node: Records131692
-Ref: Records-Footnote-1140250
-Node: Fields140287
-Ref: Fields-Footnote-1143317
-Node: Nonconstant Fields143403
-Node: Changing Fields145605
-Node: Field Separators150926
-Node: Regexp Field Splitting154417
-Node: Single Character Fields157970
-Node: Command Line Field Separator159021
-Node: Field Splitting Summary162460
-Ref: Field Splitting Summary-Footnote-1165646
-Node: Constant Size165747
-Node: Splitting By Content170231
-Ref: Splitting By Content-Footnote-1173460
-Node: Multiple Line173500
-Ref: Multiple Line-Footnote-1179238
-Node: Getline179417
-Node: Plain Getline181620
-Node: Getline/Variable183707
-Node: Getline/File184848
-Node: Getline/Variable/File186172
-Ref: Getline/Variable/File-Footnote-1187769
-Node: Getline/Pipe187856
-Node: Getline/Variable/Pipe190453
-Node: Getline/Coprocess191560
-Node: Getline/Variable/Coprocess192803
-Node: Getline Notes193517
-Node: Getline Summary195160
-Ref: table-getline-variants195444
-Node: BEGINFILE/ENDFILE196010
-Node: Command line directories198848
-Node: Printing199525
-Node: Print201154
-Node: Print Examples202480
-Node: Output Separators205275
-Node: OFMT207036
-Node: Printf208391
-Node: Basic Printf209310
-Node: Control Letters210845
-Node: Format Modifiers214728
-Node: Printf Examples220738
-Node: Redirection223455
-Node: Special Files230451
-Node: Special FD231014
-Node: Special Network234207
-Node: Special Caveats235062
-Ref: Special Caveats-Footnote-1236260
-Node: Close Files And Pipes236643
-Ref: Close Files And Pipes-Footnote-1243564
-Ref: Close Files And Pipes-Footnote-2243712
-Node: Expressions243860
-Node: Values244929
-Node: Constants245601
-Node: Scalar Constants246281
-Ref: Scalar Constants-Footnote-1247140
-Node: Nondecimal-numbers247322
-Node: Regexp Constants250384
-Node: Using Constant Regexps250859
-Node: Variables253941
-Node: Using Variables254596
-Node: Assignment Options256170
-Node: Conversion258051
-Ref: table-locale-affects263458
-Ref: Conversion-Footnote-1264082
-Node: All Operators264191
-Node: Arithmetic Ops264821
-Node: Concatenation267320
-Ref: Concatenation-Footnote-1270108
-Node: Assignment Ops270199
-Ref: table-assign-ops275183
-Node: Increment Ops276584
-Node: Truth Values and Conditions280062
-Node: Truth Values281145
-Node: Typing and Comparison282193
-Node: Variable Typing282914
-Ref: Variable Typing-Footnote-1286602
-Node: Comparison Operators286746
-Ref: table-relational-ops287124
-Node: Boolean Ops290673
-Ref: Boolean Ops-Footnote-1294751
-Node: Conditional Exp294842
-Node: Function Calls296574
-Node: Precedence300125
-Node: Patterns and Actions303775
-Node: Pattern Overview304829
-Node: Regexp Patterns306266
-Node: Expression Patterns306809
-Node: Ranges310359
-Node: BEGIN/END313448
-Node: Using BEGIN/END314198
-Ref: Using BEGIN/END-Footnote-1316930
-Node: I/O And BEGIN/END317044
-Node: Empty319311
-Node: Using Shell Variables319619
-Node: Action Overview321900
-Node: Statements324258
-Node: If Statement326114
-Node: While Statement327613
-Node: Do Statement329645
-Node: For Statement330794
-Node: Switch Statement333934
-Node: Break Statement335982
-Node: Continue Statement338039
-Node: Next Statement339943
-Node: Nextfile Statement342223
-Node: Exit Statement344939
-Node: Built-in Variables347210
-Node: User-modified348305
-Ref: User-modified-Footnote-1356230
-Node: Auto-set356292
-Ref: Auto-set-Footnote-1364980
-Node: ARGC and ARGV365185
-Node: Arrays368946
-Node: Array Basics370393
-Node: Array Intro371104
-Node: Reference to Elements375490
-Node: Assigning Elements377389
-Node: Array Example377880
-Node: Scanning an Array379612
-Node: Delete381887
-Ref: Delete-Footnote-1384275
-Node: Numeric Array Subscripts384332
-Node: Uninitialized Subscripts386519
-Node: Multi-dimensional388125
-Node: Multi-scanning391216
-Node: Array Sorting392796
-Node: Functions396578
-Node: Built-in397387
-Node: Calling Built-in398357
-Node: Numeric Functions400324
-Ref: Numeric Functions-Footnote-1404066
-Ref: Numeric Functions-Footnote-2404392
-Node: String Functions404661
-Ref: String Functions-Footnote-1426447
-Ref: String Functions-Footnote-2426576
-Ref: String Functions-Footnote-3426824
-Node: Gory Details426911
-Ref: table-sub-escapes428546
-Ref: table-sub-posix-92429881
-Ref: table-sub-proposed431220
-Ref: table-posix-2001-sub432572
-Ref: table-gensub-escapes433841
-Ref: Gory Details-Footnote-1435027
-Node: I/O Functions435078
-Ref: I/O Functions-Footnote-1441823
-Node: Time Functions441914
-Ref: Time Functions-Footnote-1452704
-Ref: Time Functions-Footnote-2452772
-Ref: Time Functions-Footnote-3452930
-Ref: Time Functions-Footnote-4453041
-Ref: Time Functions-Footnote-5453166
-Ref: Time Functions-Footnote-6453393
-Node: Bitwise Functions453655
-Ref: table-bitwise-ops454233
-Ref: Bitwise Functions-Footnote-1458467
-Node: I18N Functions458651
-Node: User-defined460372
-Node: Definition Syntax461176
-Node: Function Example465874
-Node: Function Caveats468454
-Node: Return Statement472379
-Node: Dynamic Typing475036
-Node: Indirect Calls475773
-Node: Internationalization485408
-Node: I18N and L10N486827
-Node: Explaining gettext487511
-Ref: Explaining gettext-Footnote-1492418
-Ref: Explaining gettext-Footnote-2492657
-Node: Programmer i18n492826
-Node: Translator i18n497049
-Node: String Extraction497840
-Ref: String Extraction-Footnote-1498793
-Node: Printf Ordering498919
-Ref: Printf Ordering-Footnote-1501697
-Node: I18N Portability501761
-Ref: I18N Portability-Footnote-1504189
-Node: I18N Example504252
-Ref: I18N Example-Footnote-1506866
-Node: Gawk I18N506938
-Node: Advanced Features507516
-Node: Nondecimal Data508915
-Node: Two-way I/O510474
-Ref: Two-way I/O-Footnote-1515955
-Node: TCP/IP Networking516032
-Node: Portal Files518825
-Node: Profiling519469
-Node: Invoking Gawk526925
-Node: Command Line528159
-Node: Options528944
-Ref: Options-Footnote-1542064
-Node: Other Arguments542089
-Node: AWKPATH Variable544770
-Ref: AWKPATH Variable-Footnote-1547545
-Node: Exit Status547805
-Node: Obsolete548472
-Node: Undocumented549271
-Node: Known Bugs549533
-Node: Library Functions550135
-Ref: Library Functions-Footnote-1553116
-Node: Library Names553287
-Ref: Library Names-Footnote-1556760
-Ref: Library Names-Footnote-2556979
-Node: General Functions557065
-Node: Nextfile Function558124
-Node: Strtonum Function562488
-Node: Assert Function565423
-Node: Round Function568727
-Node: Cliff Random Function570260
-Node: Ordinal Functions571273
-Ref: Ordinal Functions-Footnote-1574333
-Node: Join Function574549
-Ref: Join Function-Footnote-1576309
-Node: Gettimeofday Function576509
-Node: Data File Management580212
-Node: Filetrans Function580844
-Node: Rewind Function584270
-Node: File Checking585716
-Node: Empty Files586746
-Node: Ignoring Assigns588971
-Node: Getopt Function590519
-Ref: Getopt Function-Footnote-1601797
-Node: Passwd Functions601998
-Ref: Passwd Functions-Footnote-1610978
-Node: Group Functions611066
-Node: Sample Programs619163
-Node: Running Examples619840
-Node: Clones620568
-Node: Cut Program621700
-Node: Egrep Program631457
-Ref: Egrep Program-Footnote-1639207
-Node: Id Program639317
-Node: Split Program642924
-Node: Tee Program646388
-Node: Uniq Program649131
-Node: Wc Program656499
-Ref: Wc Program-Footnote-1660743
-Node: Miscellaneous Programs660939
-Node: Dupword Program662059
-Node: Alarm Program664090
-Node: Translate Program668630
-Ref: Translate Program-Footnote-1672998
-Ref: Translate Program-Footnote-2673235
-Node: Labels Program673369
-Ref: Labels Program-Footnote-1676660
-Node: Word Sorting676744
-Node: History Sorting681087
-Node: Extract Program682925
-Node: Simple Sed690277
-Node: Igawk Program693332
-Ref: Igawk Program-Footnote-1708063
-Ref: Igawk Program-Footnote-2708264
-Node: Signature Program708402
-Node: Language History709482
-Node: V7/SVR3.1710866
-Node: SVR4713139
-Node: POSIX714578
-Node: BTL716186
-Node: POSIX/GNU717865
-Node: Contributors727081
-Node: Installation730680
-Node: Gawk Distribution731651
-Node: Getting732135
-Node: Extracting732961
-Node: Distribution contents734349
-Node: Unix Installation739430
-Node: Quick Installation740021
-Node: Additional Configuration Options741723
-Node: Configuration Philosophy743641
-Node: Non-Unix Installation746005
-Node: PC Installation746470
-Node: PC Binary Installation747776
-Node: PC Compiling749619
-Node: PC Dynamic754124
-Node: PC Using756485
-Node: Cygwin761035
-Node: MSYS762031
-Node: VMS Installation762537
-Node: VMS Compilation763141
-Node: VMS Installation Details764718
-Node: VMS Running766348
-Node: VMS POSIX767945
-Node: VMS Old Gawk769243
-Node: Unsupported769712
-Node: Atari Installation770174
-Node: Atari Compiling771461
-Node: Atari Using773346
-Node: BeOS Installation776191
-Node: Tandem Installation777338
-Node: Bugs779017
-Node: Other Versions782849
-Node: Notes788067
-Node: Compatibility Mode788759
-Node: Additions789553
-Node: Adding Code790303
-Node: New Ports796353
-Node: Dynamic Extensions800485
-Node: Internals801810
-Node: Sample Library812813
-Node: Internal File Description813472
-Node: Internal File Ops817165
-Ref: Internal File Ops-Footnote-1822491
-Node: Using Internal File Ops822639
-Node: Future Extensions824662
-Node: Basic Concepts828699
-Node: Basic High Level829456
-Ref: Basic High Level-Footnote-1833572
-Node: Basic Data Typing833766
-Node: Floating Point Issues838203
-Node: String Conversion Precision839286
-Ref: String Conversion Precision-Footnote-1840980
-Node: Unexpected Results841089
-Node: POSIX Floating Point Problems842915
-Ref: POSIX Floating Point Problems-Footnote-1846389
-Node: Glossary846427
-Node: Copying870183
-Node: GNU Free Documentation License907740
-Node: next-edition932884
-Node: unresolved933236
-Node: revision933736
-Node: consistency934159
-Node: Index937512
+Node: Foreword29812
+Node: Preface34128
+Ref: Preface-Footnote-137080
+Ref: Preface-Footnote-237186
+Node: History37418
+Node: Names39650
+Ref: Names-Footnote-141127
+Node: This Manual41199
+Ref: This Manual-Footnote-146097
+Node: Conventions46197
+Node: Manual History48256
+Ref: Manual History-Footnote-151434
+Ref: Manual History-Footnote-251475
+Node: How To Contribute51549
+Node: Acknowledgments52693
+Node: Getting Started56962
+Node: Running gawk59334
+Node: One-shot60520
+Node: Read Terminal61745
+Ref: Read Terminal-Footnote-163395
+Ref: Read Terminal-Footnote-263669
+Node: Long63840
+Node: Executable Scripts65216
+Ref: Executable Scripts-Footnote-167077
+Ref: Executable Scripts-Footnote-267179
+Node: Comments67630
+Node: Quoting69998
+Node: DOS Quoting74615
+Node: Sample Data Files75283
+Node: Very Simple78315
+Node: Two Rules82912
+Node: More Complex85059
+Ref: More Complex-Footnote-187989
+Node: Statements/Lines88069
+Ref: Statements/Lines-Footnote-192425
+Node: Other Features92690
+Node: When93559
+Node: Regexp95702
+Node: Regexp Usage97156
+Node: Escape Sequences99182
+Node: Regexp Operators104925
+Ref: Regexp Operators-Footnote-1112097
+Ref: Regexp Operators-Footnote-2112244
+Node: Character Lists112342
+Ref: table-char-classes114117
+Node: GNU Regexp Operators116742
+Node: Case-sensitivity120455
+Ref: Case-sensitivity-Footnote-1123410
+Ref: Case-sensitivity-Footnote-2123645
+Node: Leftmost Longest123753
+Node: Computed Regexps124954
+Node: Locales128371
+Node: Reading Files131453
+Node: Records133469
+Ref: Records-Footnote-1142035
+Node: Fields142072
+Ref: Fields-Footnote-1145104
+Node: Nonconstant Fields145190
+Node: Changing Fields147392
+Node: Field Separators152677
+Node: Default Field Splitting155306
+Node: Regexp Field Splitting156423
+Node: Single Character Fields159773
+Node: Command Line Field Separator160824
+Node: Field Splitting Summary164263
+Ref: Field Splitting Summary-Footnote-1167449
+Node: Constant Size167550
+Node: Splitting By Content172021
+Ref: Splitting By Content-Footnote-1175623
+Node: Multiple Line175663
+Ref: Multiple Line-Footnote-1181403
+Node: Getline181582
+Node: Plain Getline183803
+Node: Getline/Variable185892
+Node: Getline/File187033
+Node: Getline/Variable/File188355
+Ref: Getline/Variable/File-Footnote-1189954
+Node: Getline/Pipe190041
+Node: Getline/Variable/Pipe192589
+Node: Getline/Coprocess193696
+Node: Getline/Variable/Coprocess194939
+Node: Getline Notes195653
+Node: Getline Summary197595
+Ref: table-getline-variants197879
+Node: BEGINFILE/ENDFILE198784
+Node: Command line directories201639
+Node: Printing202274
+Node: Print203905
+Node: Print Examples205242
+Node: Output Separators208026
+Node: OFMT209785
+Node: Printf211143
+Node: Basic Printf212049
+Node: Control Letters213586
+Node: Format Modifiers217335
+Node: Printf Examples223346
+Node: Redirection226061
+Node: Special Files233039
+Node: Special FD233572
+Ref: Special FD-Footnote-1237147
+Node: Special Network237221
+Node: Special Caveats238076
+Node: Close Files And Pipes238870
+Ref: Close Files And Pipes-Footnote-1245814
+Ref: Close Files And Pipes-Footnote-2245962
+Node: Expressions246112
+Node: Values247181
+Node: Constants247853
+Node: Scalar Constants248533
+Ref: Scalar Constants-Footnote-1249392
+Node: Nondecimal-numbers249574
+Node: Regexp Constants252638
+Node: Using Constant Regexps253113
+Node: Variables256210
+Node: Using Variables256865
+Node: Assignment Options258439
+Node: Conversion260320
+Ref: table-locale-affects265731
+Ref: Conversion-Footnote-1266355
+Node: All Operators266464
+Node: Arithmetic Ops267094
+Node: Concatenation269593
+Ref: Concatenation-Footnote-1272381
+Node: Assignment Ops272472
+Ref: table-assign-ops277460
+Node: Increment Ops278861
+Node: Truth Values and Conditions282339
+Node: Truth Values283422
+Node: Typing and Comparison284470
+Node: Variable Typing285191
+Ref: Variable Typing-Footnote-1288883
+Node: Comparison Operators289027
+Ref: table-relational-ops289405
+Node: Boolean Ops292954
+Ref: Boolean Ops-Footnote-1297032
+Node: Conditional Exp297123
+Node: Function Calls298855
+Node: Precedence302413
+Node: Patterns and Actions306063
+Node: Pattern Overview307117
+Node: Regexp Patterns308554
+Node: Expression Patterns309097
+Node: Ranges312647
+Node: BEGIN/END315736
+Node: Using BEGIN/END316486
+Ref: Using BEGIN/END-Footnote-1319217
+Node: I/O And BEGIN/END319331
+Node: Empty321598
+Node: Using Shell Variables321906
+Node: Action Overview324187
+Node: Statements326545
+Node: If Statement328401
+Node: While Statement329900
+Node: Do Statement331932
+Node: For Statement333081
+Node: Switch Statement336221
+Node: Break Statement338269
+Node: Continue Statement340089
+Node: Next Statement341787
+Node: Nextfile Statement344067
+Node: Exit Statement346785
+Node: Built-in Variables349056
+Node: User-modified350151
+Ref: User-modified-Footnote-1358097
+Node: Auto-set358159
+Ref: Auto-set-Footnote-1366821
+Node: ARGC and ARGV367026
+Node: Arrays370787
+Node: Array Basics372296
+Node: Array Intro373007
+Node: Reference to Elements377394
+Node: Assigning Elements379293
+Node: Array Example379784
+Node: Scanning an Array381516
+Node: Delete383793
+Ref: Delete-Footnote-1386183
+Node: Numeric Array Subscripts386240
+Node: Uninitialized Subscripts388427
+Node: Multi-dimensional390033
+Node: Multi-scanning393124
+Node: Array Sorting394708
+Node: Arrays of Arrays398538
+Node: Functions402646
+Node: Built-in403455
+Node: Calling Built-in404469
+Node: Numeric Functions406445
+Ref: Numeric Functions-Footnote-1410199
+Ref: Numeric Functions-Footnote-2410533
+Node: String Functions410802
+Ref: String Functions-Footnote-1432636
+Ref: String Functions-Footnote-2432765
+Ref: String Functions-Footnote-3433013
+Node: Gory Details433100
+Ref: table-sub-escapes434757
+Ref: table-sub-posix-92436103
+Ref: table-sub-proposed437446
+Ref: table-posix-2001-sub438806
+Ref: table-gensub-escapes440081
+Ref: Gory Details-Footnote-1441284
+Node: I/O Functions441335
+Ref: I/O Functions-Footnote-1448123
+Node: Time Functions448214
+Ref: Time Functions-Footnote-1459026
+Ref: Time Functions-Footnote-2459094
+Ref: Time Functions-Footnote-3459252
+Ref: Time Functions-Footnote-4459363
+Ref: Time Functions-Footnote-5459490
+Ref: Time Functions-Footnote-6459717
+Node: Bitwise Functions459983
+Ref: table-bitwise-ops460561
+Ref: Bitwise Functions-Footnote-1464801
+Node: I18N Functions464985
+Node: User-defined466708
+Node: Definition Syntax467512
+Node: Function Example472210
+Node: Function Caveats474792
+Node: Return Statement478717
+Node: Dynamic Typing481374
+Node: Indirect Calls482111
+Node: Internationalization491746
+Node: I18N and L10N493165
+Node: Explaining gettext493849
+Ref: Explaining gettext-Footnote-1498760
+Ref: Explaining gettext-Footnote-2498999
+Node: Programmer i18n499168
+Node: Translator i18n503403
+Node: String Extraction504194
+Ref: String Extraction-Footnote-1505151
+Node: Printf Ordering505277
+Ref: Printf Ordering-Footnote-1508057
+Node: I18N Portability508121
+Ref: I18N Portability-Footnote-1510566
+Node: I18N Example510629
+Ref: I18N Example-Footnote-1513249
+Node: Gawk I18N513321
+Node: Advanced Features513899
+Node: Nondecimal Data515214
+Node: Two-way I/O516775
+Ref: Two-way I/O-Footnote-1522258
+Node: TCP/IP Networking522335
+Node: Profiling525125
+Node: Invoking Gawk532586
+Node: Command Line533893
+Node: Options534678
+Ref: Options-Footnote-1547766
+Node: Other Arguments547791
+Node: AWKPATH Variable550472
+Ref: AWKPATH Variable-Footnote-1553247
+Node: Exit Status553507
+Node: Include Files554179
+Node: Obsolete557780
+Node: Undocumented558581
+Node: Known Bugs558843
+Node: Library Functions559445
+Ref: Library Functions-Footnote-1562426
+Node: Library Names562597
+Ref: Library Names-Footnote-1566070
+Ref: Library Names-Footnote-2566289
+Node: General Functions566375
+Node: Nextfile Function567438
+Node: Strtonum Function571802
+Node: Assert Function574743
+Node: Round Function578047
+Node: Cliff Random Function579587
+Node: Ordinal Functions580602
+Ref: Ordinal Functions-Footnote-1583662
+Node: Join Function583878
+Ref: Join Function-Footnote-1585640
+Node: Gettimeofday Function585840
+Node: Data File Management589551
+Node: Filetrans Function590183
+Node: Rewind Function593609
+Node: File Checking595055
+Node: Empty Files596085
+Node: Ignoring Assigns598310
+Node: Getopt Function599858
+Ref: Getopt Function-Footnote-1611140
+Node: Passwd Functions611343
+Ref: Passwd Functions-Footnote-1620321
+Node: Group Functions620409
+Node: Sample Programs628506
+Node: Running Examples629175
+Node: Clones629903
+Node: Cut Program631035
+Node: Egrep Program640794
+Ref: Egrep Program-Footnote-1648544
+Node: Id Program648654
+Node: Split Program652261
+Node: Tee Program655728
+Node: Uniq Program658471
+Node: Wc Program665838
+Ref: Wc Program-Footnote-1670082
+Node: Miscellaneous Programs670278
+Node: Dupword Program671398
+Node: Alarm Program673429
+Node: Translate Program677971
+Ref: Translate Program-Footnote-1682350
+Ref: Translate Program-Footnote-2682587
+Node: Labels Program682721
+Ref: Labels Program-Footnote-1686012
+Node: Word Sorting686096
+Node: History Sorting690443
+Node: Extract Program692281
+Node: Simple Sed699639
+Node: Igawk Program702696
+Ref: Igawk Program-Footnote-1717427
+Ref: Igawk Program-Footnote-2717628
+Node: Signature Program717766
+Node: Debugger718846
+Node: Debugging719722
+Node: Debugging Concepts720036
+Node: Debugging Terms721889
+Node: Awk Debugging724437
+Node: Sample dgawk session725329
+Node: dgawk invocation725821
+Node: Finding The Bug727005
+Node: List of Debugger Commands733520
+Node: Breakpoint Control734835
+Node: Dgawk Execution Control738045
+Node: Viewing And Changing Data741394
+Node: Dgawk Stack744690
+Node: Dgawk Info746151
+Node: Miscellaneous Dgawk Commands750089
+Node: Readline Support755805
+Node: Dgawk Limitations756621
+Node: Language History758793
+Node: V7/SVR3.1760170
+Node: SVR4762465
+Node: POSIX763910
+Node: BTL765622
+Node: POSIX/GNU767312
+Node: Contributors776976
+Node: Installation780581
+Node: Gawk Distribution781552
+Node: Getting782036
+Node: Extracting782862
+Node: Distribution contents784250
+Node: Unix Installation789323
+Node: Quick Installation789914
+Node: Additional Configuration Options791616
+Node: Configuration Philosophy793379
+Node: Non-Unix Installation795743
+Node: PC Installation796208
+Node: PC Binary Installation797514
+Node: PC Compiling799357
+Node: PC Dynamic803862
+Node: PC Using806225
+Node: Cygwin810773
+Node: MSYS811757
+Node: VMS Installation812263
+Node: VMS Compilation812867
+Node: VMS Installation Details814444
+Node: VMS Running816074
+Node: VMS POSIX817671
+Node: VMS Old Gawk818969
+Node: Unsupported819438
+Node: Atari Installation819900
+Node: Atari Compiling821187
+Node: Atari Using823076
+Node: BeOS Installation825923
+Node: Tandem Installation827068
+Node: Bugs828747
+Node: Other Versions832579
+Node: Notes837801
+Node: Compatibility Mode838493
+Node: Additions839276
+Node: Adding Code840026
+Node: New Ports846078
+Node: Dynamic Extensions850210
+Node: Internals851535
+Node: Sample Library861940
+Node: Internal File Description862599
+Node: Internal File Ops866294
+Ref: Internal File Ops-Footnote-1871134
+Node: Using Internal File Ops871282
+Node: Future Extensions873307
+Node: Basic Concepts877344
+Node: Basic High Level878101
+Ref: Basic High Level-Footnote-1882217
+Node: Basic Data Typing882411
+Node: Floating Point Issues886848
+Node: String Conversion Precision887931
+Ref: String Conversion Precision-Footnote-1889625
+Node: Unexpected Results889734
+Node: POSIX Floating Point Problems891560
+Ref: POSIX Floating Point Problems-Footnote-1895259
+Node: Glossary895297
+Node: Copying919065
+Node: GNU Free Documentation License956622
+Node: next-edition981766
+Node: unresolved982118
+Node: revision982618
+Node: consistency983041
+Node: Index986394

End Tag Table
diff --git a/doc/gawk.texi b/doc/gawk.texi
index 329718e7..47d2ba7a 100644
--- a/doc/gawk.texi
+++ b/doc/gawk.texi
@@ -1,4 +1,9 @@
\input texinfo @c -*-texinfo-*-
+@ignore
+TODO:
+ Globally add () after built in and awk function names.
+DONE:
+@end ignore
@c %**start of header (This is for running Texinfo on a region.)
@setfilename gawk.info
@settitle The GNU Awk User's Guide
@@ -28,7 +33,7 @@
@set TITLE GAWK: Effective AWK Programming
@set SUBTITLE A User's Guide for GNU Awk
-@set EDITION 3
+@set EDITION 4
@iftex
@set DOCUMENT book
@@ -37,6 +42,7 @@
@set SECTION section
@set SUBSECTION subsection
@set DARKCORNER @inmargin{@image{lflashlight,1cm}, @image{rflashlight,1cm}}
+@set COMMONEXT (c.e.)
@end iftex
@ifinfo
@set DOCUMENT Info file
@@ -45,6 +51,7 @@
@set SECTION minor node
@set SUBSECTION node
@set DARKCORNER (d.c.)
+@set COMMONEXT (c.e.)
@end ifinfo
@ifhtml
@set DOCUMENT Web page
@@ -53,6 +60,7 @@
@set SECTION section
@set SUBSECTION subsection
@set DARKCORNER (d.c.)
+@set COMMONEXT (c.e.)
@end ifhtml
@ifdocbook
@set DOCUMENT book
@@ -61,6 +69,7 @@
@set SECTION section
@set SUBSECTION subsection
@set DARKCORNER (d.c.)
+@set COMMONEXT (c.e.)
@end ifdocbook
@c some special symbols
@@ -164,25 +173,6 @@ supports it in developing GNU and promoting software freedom.''
@page
@vskip 0pt plus 1filll
-@ignore
-The programs and applications presented in this book have been
-included for their instructional value. They have been tested with care
-but are not guaranteed for any particular purpose. The publisher does not
-offer any warranties or representations, nor does it accept any
-liabilities with respect to the programs or applications.
-So there.
-@sp 2
-UNIX is a registered trademark of The Open Group in the United States and other countries. @*
-Linux is a registered trademark of Linus Torvalds in the United States and other countries. @*
-Microsoft, MS and MS-DOS are registered trademarks, and Windows is a
-trademark of Microsoft Corporation in the United States and other
-countries. @*
-Atari, 520ST, 1040ST, TT, STE, Mega and Falcon are registered trademarks
-or trademarks of Atari Corporation. @*
-Once upon a time,
-DEC, Digital, OpenVMS, ULTRIX and VMS were trademarks of Digital Equipment
-Corporation. Now they belong to Hewlett-Packard Corporation. @*
-@end ignore
``To boldly go where no man has gone before'' is a
Registered Trademark of Paramount Pictures Corporation. @*
@c sorry, i couldn't resist
@@ -202,8 +192,6 @@ URL: @uref{http://www.gnu.org/} @*
ISBN 1-882114-28-0 @*
@sp 2
@insertcopying
-@sp 2
-Cover art by Etienne Suvasa.
@end titlepage
@c Thanks to Bob Chassell for directions on doing dedications.
@@ -279,6 +267,7 @@ particular records in a file and perform operations upon them.
* Library Functions:: A Library of @command{awk} Functions.
* Sample Programs:: Many @command{awk} programs with complete
explanations.
+* Debugger:: The @code{dgawk} debugger.
* Language History:: The evolution of the @command{awk}
language.
* Installation:: Installing @command{gawk} under various
@@ -318,7 +307,7 @@ particular records in a file and perform operations upon them.
* Comments:: Adding documentation to @command{gawk}
programs.
* Quoting:: More discussion of shell quoting issues.
-* DOS Quoting:: Quoting in MS-DOS Batch Files.
+* DOS Quoting:: Quoting in Windows Batch Files.
* Sample Data Files:: Sample data files for use in the
@command{awk} programs illustrated in this
@value{DOCUMENT}.
@@ -345,6 +334,7 @@ particular records in a file and perform operations upon them.
* Nonconstant Fields:: Nonconstant Field Numbers.
* Changing Fields:: Changing the Contents of a Field.
* Field Separators:: The field separator and how to change it.
+* Default Field Splitting:: How fields are normally separated.
* Regexp Field Splitting:: Using regexps as the field separator.
* Single Character Fields:: Making each character a separate field.
* Command Line Field Separator:: Setting @code{FS} from the command-line.
@@ -484,16 +474,18 @@ particular records in a file and perform operations upon them.
@command{awk}.
* Multi-scanning:: Scanning multidimensional arrays.
* Array Sorting:: Sorting array values and indices.
+* Arrays of Arrays:: True multidimensional arrays.
* Built-in:: Summarizes the built-in functions.
* Calling Built-in:: How to call built-in functions.
* Numeric Functions:: Functions that work with numbers, including
- @code{int}, @code{sin} and @code{rand}.
+ @code{int()}, @code{sin()} and
+ @code{rand()}.
* String Functions:: Functions for string manipulation, such as
- @code{split}, @code{match} and
- @code{sprintf}.
+ @code{split()}, @code{match()} and
+ @code{sprintf()}.
* Gory Details:: More than you want to know about @samp{\}
- and @samp{&} with @code{sub}, @code{gsub},
- and @code{gensub}.
+ and @samp{&} with @code{sub()},
+ @code{gsub()}, and @code{gensub()}.
* I/O Functions:: Functions for files and shell commands.
* Time Functions:: Functions for dealing with timestamps.
* Bitwise Functions:: Functions for bitwise operations.
@@ -521,7 +513,6 @@ particular records in a file and perform operations upon them.
process.
* TCP/IP Networking:: Using @command{gawk} for network
programming.
-* Portal Files:: Using @command{gawk} with BSD portals.
* Profiling:: Profiling your @command{awk} programs.
* Command Line:: How to run @command{awk}.
* Options:: Command-line options and their meanings.
@@ -529,6 +520,7 @@ particular records in a file and perform operations upon them.
* AWKPATH Variable:: Searching directories for @command{awk}
programs.
* Exit Status:: @command{gawk}'s exit status.
+* Include Files:: Including other files into your program.
* Obsolete:: Obsolete Options and/or features.
* Undocumented:: Undocumented Options and Features.
* Known Bugs:: Known Bugs in @command{gawk}.
@@ -538,10 +530,10 @@ particular records in a file and perform operations upon them.
* Nextfile Function:: Two implementations of a @code{nextfile}
function.
* Strtonum Function:: A replacement for the built-in
- @code{strtonum} function.
+ @code{strtonum()} function.
* Assert Function:: A function for assertions in @command{awk}
programs.
-* Round Function:: A function for rounding if @code{sprintf}
+* Round Function:: A function for rounding if @code{sprintf()}
does not do it correctly.
* Cliff Random Function:: The Cliff Random Number Generator.
* Ordinal Functions:: Functions for using characters as numbers
@@ -585,6 +577,23 @@ particular records in a file and perform operations upon them.
files.
* Signature Program:: People do amazing things with too much time
on their hands.
+* Debugging:: Introduction to @command{dgawk}.
+* Debugging Concepts:: Debugging In General.
+* Debugging Terms:: Additional Debugging Concepts.
+* Awk Debugging:: Awk Debugging.
+* Sample dgawk session:: Sample @command{dgawk} session.
+* dgawk invocation:: @command{dgawk} Invocation.
+* Finding The Bug:: Finding The Bug.
+* List of Debugger Commands:: Main @command{dgawk} Commands.
+* Breakpoint Control:: Control of breakpoints.
+* Dgawk Execution Control:: Control of execution.
+* Viewing And Changing Data:: Viewing and changing data.
+* Dgawk Stack:: Dealing with the stack.
+* Dgawk Info:: Obtaining information about the program and
+ the debugger state.
+* Miscellaneous Dgawk Commands:: Miscellaneous Commands.
+* Readline Support:: Readline Support.
+* Dgawk Limitations:: Limitations and future plans.
* V7/SVR3.1:: The major changes between V7 and System V
Release 3.1.
* SVR4:: Minor changes between System V Releases 3.1
@@ -683,7 +692,9 @@ particular records in a file and perform operations upon them.
@node Foreword
@unnumbered Foreword
-Arnold Robbins and I are good friends. We were introduced 11 years ago
+Arnold Robbins and I are good friends. We were introduced
+@c 11 years ago
+in 1990
by circumstances---and our favorite programming language, AWK.
The circumstances started a couple of years
earlier. I was working at a new job and noticed an unplugged
@@ -806,16 +817,20 @@ when working with text files.
You might want to extract certain lines and discard the rest.
Or you may need to make changes wherever certain patterns appear,
but leave the rest of the file alone.
-Writing single-use programs for these tasks in languages such as C, C++, or Pascal
-is time-consuming and inconvenient.
+Writing single-use programs for these tasks in languages such as C, C++,
+or Java is time-consuming and inconvenient.
Such jobs are often easier with @command{awk}.
The @command{awk} utility interprets a special-purpose programming language
that makes it easy to handle simple data-reformatting jobs.
The GNU implementation of @command{awk} is called @command{gawk}; it is fully
-compatible with the System V Release 4 version of
-@command{awk}. @command{gawk} is also compatible with the POSIX
-specification of the @command{awk} language. This means that all
+compatible with
+the POSIX@footnote{The 2008 POSIX standard can be found online at
+@url{http://www.opengroup.org/onlinepubs/9699919799/}.}
+specification of the @command{awk} language
+and with the Unix version of @command{awk} maintained
+by Brian Kernighan.
+This means that all
properly written @command{awk} programs should work with @command{gawk}.
Thus, we usually don't distinguish between @command{gawk} and other
@command{awk} implementations.
@@ -878,11 +893,14 @@ different computing environments. This @value{DOCUMENT}, while describing
the @command{awk} language in general, also describes the particular
implementation of @command{awk} called @command{gawk} (which stands for
``GNU awk''). @command{gawk} runs on a broad range of Unix systems,
-ranging from 80386 PC-based computers up through large-scale systems,
+ranging from Intel@registeredsymbol{}-architecture PC-based computers
+up through large-scale systems,
such as Crays. @command{gawk} has also been ported to Mac OS X,
-MS-DOS, Microsoft Windows (all versions) and OS/2 PCs, Atari
-@c and Amiga
-microcomputers, BeOS, Tandem D20, and VMS.
+Microsoft Windows (all versions) and OS/2 PCs,
+and VMS.
+(Other systems to which @command{gawk} was once ported
+are no longer supported and the code for those systems
+has been removed.)
@menu
* History:: The history of @command{gawk} and
@@ -927,8 +945,8 @@ In 1985, a new version made the programming
language more powerful, introducing user-defined functions, multiple input
streams, and computed regular expressions.
This new version became widely available with Unix System V
-Release 3.1 (SVR3.1).
-The version in SVR4 added some new features and cleaned
+Release 3.1 (1987)
+The version in System V Release 4 (1989) added some new features and cleaned
up the behavior in some of the ``dark corners'' of the language.
The specification for @command{awk} in the POSIX Command Language
and Utilities standard further clarified the language.
@@ -943,7 +961,7 @@ Jay Fenlason completed it, with advice from Richard Stallman. John Woods
contributed parts of the code as well. In 1988 and 1989, David Trueman, with
help from me, thoroughly reworked @command{gawk} for compatibility
with the newer @command{awk}.
-Circa 1995, I became the primary maintainer.
+Circa 1994, I became the primary maintainer.
Current development focuses on bug fixes,
performance improvements, standards compliance, and occasionally, new features.
@@ -969,12 +987,11 @@ The language described in this @value{DOCUMENT}
is often referred to as ``new @command{awk}'' (@command{nawk}).
@cindex @command{awk}, versions of
-Because of this, many systems have multiple
+Because of this, there are systems with multiple
versions of @command{awk}.
Some systems have an @command{awk} utility that implements the
original version of the @command{awk} language and a @command{nawk} utility
-for the new
-version.
+for the new version.
Others have an @command{oawk} version for the ``old @command{awk}''
language and plain @command{awk} for the new one. Still others only
have one version, which is usually the new one.@footnote{Often, these systems
@@ -984,7 +1001,7 @@ use @command{gawk} for their @command{awk} implementation!}
@cindex @command{oawk} utility
All in all, this makes it difficult for you to know which version of
@command{awk} you should run when writing your programs. The best advice
-I can give here is to check your local documentation. Look for @command{awk},
+we can give here is to check your local documentation. Look for @command{awk},
@command{oawk}, and @command{nawk}, as well as for @command{gawk}.
It is likely that you already
have some version of new @command{awk} on your system, which is what
@@ -1005,14 +1022,14 @@ use to tell this program what to do. When we need to be careful, we call
the language ``the @command{awk} language,''
and the program ``the @command{awk} utility.''
This @value{DOCUMENT} explains
-both the @command{awk} language and how to run the @command{awk} utility.
+both how to write program in the @command{awk} language and how to run the @command{awk} utility.
The term @dfn{@command{awk} program} refers to a program written by you in
the @command{awk} programming language.
@cindex @command{gawk}, @command{awk} and
@cindex @command{awk}, @command{gawk} and
@cindex POSIX @command{awk}
-Primarily, this @value{DOCUMENT} explains the features of @command{awk},
+Primarily, this @value{DOCUMENT} explains the features of @command{awk}
as defined in the POSIX standard. It does so in the context of the
@command{gawk} implementation. While doing so, it also
attempts to describe important differences between @command{gawk}
@@ -1026,7 +1043,7 @@ the POSIX standard for @command{awk} are noted.
This @value{DOCUMENT} has the difficult task of being both a tutorial and a reference.
If you are a novice, feel free to skip over details that seem too complex.
You should also ignore the many cross-references; they are for the
-expert user and for the online Info version of the document.
+expert user and for the online Info and HTML versions of the document.
@end ifnotinfo
There are
@@ -1062,6 +1079,7 @@ describes how @command{awk} reads your data.
It introduces the concepts of records and fields, as well
as the @code{getline} command.
I/O redirection is first described here.
+Network I/O is also briefly introduced here.
@ref{Printing},
describes how @command{awk} programs can produce output with
@@ -1108,17 +1126,21 @@ provide many sample @command{awk} programs.
Reading them allows you to see @command{awk}
solving real problems.
+@ref{Debugger}, describes the @command{awk} debugger,
+@command{dgawk}.
+
@ref{Language History},
describes how the @command{awk} language has evolved since
-first release to present. It also describes how @command{gawk}
+its first release to present. It also describes how @command{gawk}
has acquired features over time.
@ref{Installation},
describes how to get @command{gawk}, how to compile it
-under Unix, and how to compile and use it on different
-non-Unix systems. It also describes how to report bugs
-in @command{gawk} and where to get three other freely
-available implementations of @command{awk}.
+on POSIX-compatible systems,
+and how to compile and use it on different
+non-POSIX systems. It also describes how to report bugs
+in @command{gawk} and where to get other freely
+available @command{awk} implementations.
@ref{Notes},
describes how to disable @command{gawk}'s extensions, as
@@ -1161,21 +1183,24 @@ This @value{SECTION} briefly documents the typographical conventions used in Tex
Examples you would type at the command-line are preceded by the common
shell primary and secondary prompts, @samp{$} and @samp{>}.
+Input that you type is shown @kbd{like this}.
Output from the command is preceded by the glyph ``@print{}''.
This typically represents the command's standard output.
Error messages, and other output on the command's standard error, are preceded
by the glyph ``@error{}''. For example:
@example
-$ echo hi on stdout
+$ @kbd{echo hi on stdout}
@print{} hi on stdout
-$ echo hello on stderr 1>&2
+$ @kbd{echo hello on stderr 1>&2}
@error{} hello on stderr
@end example
@ifnotinfo
In the text, command names appear in @code{this font}, while code segments
-appear in the same font and quoted, @samp{like this}. Some things are
+appear in the same font and quoted, @samp{like this}.
+Options look like this: @option{-f}.
+Some things are
emphasized @emph{like this}, and if a point needs to be made
strongly, it is done @strong{like this}. The first occurrence of
a new term is usually its @dfn{definition} and appears in the same
@@ -1201,7 +1226,7 @@ Brian Kernighan
@cindex d.c., See dark corner
@cindex dark corner
-Until the POSIX standard (and @cite{The Gawk Manual}),
+Until the POSIX standard (and @cite{@value{TITLE}}),
many features of @command{awk} were either poorly documented or not
documented at all. Descriptions of such features
(often called ``dark corners'') are noted in this @value{DOCUMENT} with
@@ -1216,7 +1241,11 @@ They also appear in the index under the heading ``dark corner.''
As noted by the opening quote, though, any
coverage of dark corners
-is, by definition, something that is incomplete.
+is, by definition, incomplete.
+
+Extensions to the standard @command{awk} language are marked
+``@value{COMMONEXT},'' and listed in the index under ``common extensions''
+and ``extensions, common.''
@node Manual History
@unnumberedsec The GNU Project and This Book
@@ -1256,7 +1285,7 @@ A shell, an editor (Emacs), highly portable optimizing C, C++, and
Objective-C compilers, a symbolic debugger and dozens of large and
small utilities (such as @command{gawk}), have all been completed and are
freely available. The GNU operating
-system kernel (the HURD), has been released but is still in an early
+system kernel (the HURD), has been released but remains in an early
stage of development.
@cindex Linux
@@ -1265,18 +1294,20 @@ stage of development.
@cindex Alpha (DEC)
Until the GNU operating system is more fully developed, you should
consider using GNU/Linux, a freely distributable, Unix-like operating
-system for Intel 80386, DEC Alpha, Sun SPARC, IBM S/390, and other
+system for Intel@registeredsymbol{},
+Power Architecture,
+Sun SPARC, IBM S/390, and other
systems.@footnote{The terminology ``GNU/Linux'' is explained
in the @ref{Glossary}.}
-There are
-many books on GNU/Linux. One that is freely available is @cite{Linux
-Installation and Getting Started}, by Matt Welsh.
-Many GNU/Linux distributions are often available in computer stores or
-bundled on CD-ROMs with books about Linux.
-(There are three other freely available, Unix-like operating systems for
-80386 and other systems: NetBSD, FreeBSD, and OpenBSD. All are based on the
-4.4-Lite Berkeley Software Distribution, and they use recent versions
-of @command{gawk} for their versions of @command{awk}.)
+Many GNU/Linux distributions are
+available for download from the Internet.
+
+(There are numerous other freely available, Unix-like operating systems
+based on the
+Berkeley Software Distribution, and they use recent versions
+of @command{gawk} for their versions of @command{awk}.
+NetBSD, FreeBSD and OpenBSD are three of the most popular ones, but there
+are others.)
@ifnotinfo
The @value{DOCUMENT} you are reading is actually free---at least, the
@@ -1285,11 +1316,6 @@ source code for the @value{DOCUMENT} comes with @command{gawk}; anyone
may take this @value{DOCUMENT} to a copying machine and make as many
copies as they like. (Take a moment to check the Free Documentation
License in @ref{GNU Free Documentation License}.)
-
-Although you could just print it out yourself, bound books are much
-easier to read and use. Furthermore,
-the proceeds from sales of this book go back to the FSF
-to help fund development of more free software.
@end ifnotinfo
@ignore
@@ -1351,25 +1377,18 @@ In 1996, Edition 1.0 was released with @command{gawk} 3.0.0.
The FSF published the first two editions under
the title @cite{The GNU Awk User's Guide}.
-This edition maintains the basic structure of Edition 1.0,
-but with significant additional material, reflecting the host of new features
-in @command{gawk} @value{PVERSION} @value{VERSION}.
-Of particular note is
-@ref{Array Sorting},
-as well as
-@ref{Bitwise Functions},
-@ref{Internationalization},
-and also
-@ref{Advanced Features},
-and
-@ref{Dynamic Extensions}.
+This edition maintains the basic structure of Edition 1.0.
+For Edition 4.0, the content has been thoroughly reviewed
+and updated. All references to versions prior to 4.0 have been
+removed.
+Of significant note for this edition is @ref{Debugger}.
@cite{@value{TITLE}} will undoubtedly continue to evolve.
An electronic version
comes with the @command{gawk} distribution from the FSF.
If you find an error in this @value{DOCUMENT}, please report it!
@xref{Bugs}, for information on submitting
-problem reports electronically, or write to me in care of the publisher.
+problem reports electronically.
@node How To Contribute
@unnumberedsec How to Contribute
@@ -1416,9 +1435,12 @@ I would like to acknowledge Richard M.@: Stallman, for his vision of a
better world and for his courage in founding the FSF and starting the
GNU Project.
+Earlier editins of this @value{DOCUMENT} had the following acknowledgements:
+
+@quotation
The following people (in alphabetical order)
provided helpful comments on various
-versions of this book, up to and including this edition.
+versions of this book,
Rick Adams,
Nelson H.F. Beebe,
Karl Berry,
@@ -1477,23 +1499,23 @@ The intrepid members of the GNITS mailing list, and most notably Ulrich
Drepper, provided invaluable help and feedback for the design of the
internationalization features.
-@c @cindex Brown, Martin
-@c @cindex Hasegawa, Isamu
-@c @cindex Rommel, Kai Uwe
-@c Martin Brown,
-@c Isamu Hasegawa,
-@c Kai Uwe Rommel,
+Chuck Toporek, Mary Sheehan, and Claire Coutier of O'Reilly & Associates contributed
+significant editorial help for this @value{DOCUMENT} for the
+3.1 release of @command{gawk}.
+@end quotation
@cindex Beebe, Nelson
@cindex Buening, Andreas
@cindex Colombo, Antonio
+@cindex Davies, Stephen
@cindex Deifik, Scott
@cindex DuBois, John
@cindex Hankerson, Darrel
+@cindex Haque, John
@cindex Jaegermann, Michal
@cindex Kahrs, J@"urgen
@cindex Kasal, Stepan
-@cindex Pitts, Davi
+@cindex Pitts, Dave
@cindex Rankin, Pat
@cindex Schorr, Andrew
@cindex Vinschen, Corinna
@@ -1502,6 +1524,7 @@ internationalization features.
Nelson Beebe,
Andreas Buening,
Antonio Colombo,
+Stephen Davies,
Scott Deifik,
John H. DuBois III,
Darrel Hankerson,
@@ -1521,17 +1544,19 @@ help, @command{gawk} would not be nearly the fine program it is today. It
has been and continues to be a pleasure working with this team of fine
people.
+John Haque contributed the modifications to convert @command{gawk}
+into a byte-code interpreter, including the debugger. Stephen Davies
+contributed to the effort to bring the byte-code changes into the mainstream
+code base.
+
@cindex Kernighan, Brian
-David and I would like to thank Brian Kernighan of Bell Laboratories for
+I would like to thank Brian Kernighan of Bell Laboratories for
invaluable assistance during the testing and debugging of @command{gawk}, and for
+ongoing
help in clarifying numerous points about the language. We could not have
done nearly as good a job on either @command{gawk} or its documentation without
his help.
-Chuck Toporek, Mary Sheehan, and Claire Coutier of O'Reilly & Associates contributed
-significant editorial help for this @value{DOCUMENT} for the
-3.1 release of @command{gawk}.
-
@cindex Robbins, Miriam
@cindex Robbins, Jean
@cindex Robbins, Harry
@@ -1549,7 +1574,7 @@ take advantage of those opportunities.
Arnold Robbins @*
Nof Ayalon @*
ISRAEL @*
-February, 2010
+December, 2010
@ignore
@c Try this
@@ -1741,23 +1766,6 @@ later in this @value{CHAPTER},
presents several short,
self-contained programs.
-@c Removed for gawk 3.1, doesn't really add anything here.
-@ignore
-As an interesting side point, the command
-
-@example
-awk '/foo/' @var{files} @dots{}
-@end example
-
-@noindent
-is essentially the same as
-
-@cindex @command{egrep} utility
-@example
-egrep foo @var{files} @dots{}
-@end example
-@end ignore
-
@node Read Terminal
@subsection Running @command{awk} Without Input Files
@@ -1776,7 +1784,7 @@ awk '@var{program}'
which usually means whatever you type on the terminal. This continues
until you indicate end-of-file by typing @kbd{@value{CTL}-d}.
(On other operating systems, the end-of-file character may be different.
-For example, on OS/2 and MS-DOS, it is @kbd{@value{CTL}-z}.)
+For example, on OS/2, it is @kbd{@value{CTL}-z}.)
@cindex files, input, See input files
@cindex input files, running @command{awk} without
@@ -1784,7 +1792,7 @@ For example, on OS/2 and MS-DOS, it is @kbd{@value{CTL}-z}.)
As an example, the following program prints a friendly piece of advice
(from Douglas Adams's @cite{The Hitchhiker's Guide to the Galaxy}),
to keep you from worrying about the complexities of computer
-programming@footnote{If you use @command{bash} as your shell, you should execute
+programming@footnote{If you use Bash as your shell, you should execute
the command @samp{set +H} before running this program interactively,
to disable the @command{csh}-style command history, which treats
@samp{!} as a special character. We recommend putting this command into
@@ -1792,7 +1800,7 @@ your personal startup file.}
(@code{BEGIN} is a feature we haven't discussed yet):
@example
-$ awk "BEGIN @{ print \"Don't Panic!\" @}"
+$ @kbd{awk "BEGIN @{ print \"Don't Panic!\" @}"}
@print{} Don't Panic!
@end example
@@ -1813,14 +1821,14 @@ emulates the @command{cat} utility; it copies whatever you type on the
keyboard to its standard output (why this works is explained shortly).
@example
-$ awk '@{ print @}'
-Now is the time for all good men
+$ @kbd{awk '@{ print @}'}
+@kbd{Now is the time for all good men}
@print{} Now is the time for all good men
-to come to the aid of their country.
+@kbd{to come to the aid of their country.}
@print{} to come to the aid of their country.
-Four score and seven years ago, ...
+@kbd{Four score and seven years ago, ...}
@print{} Four score and seven years ago, ...
-What, me worry?
+@kbd{What, me worry?}
@print{} What, me worry?
@kbd{@value{CTL}-d}
@end example
@@ -1894,10 +1902,8 @@ affect the execution of the @command{awk} program but it does make
Once you have learned @command{awk}, you may want to write self-contained
@command{awk} scripts, using the @samp{#!} script mechanism. You can do
-this on many Unix systems@footnote{The @samp{#!} mechanism works on
-Linux systems,
-systems derived from the 4.4-Lite Berkeley Software Distribution,
-and most commercial Unix systems.} as well as on the GNU system.
+this on many systems.@footnote{The @samp{#!} mechanism works on
+GNU/Linux systems, BSD-based systems and commercial Unix systems.}
For example, you could update the file @file{advice} to look like this:
@example
@@ -1920,8 +1926,8 @@ or both.} as if you had
typed @samp{awk -f advice}:
@example
-$ chmod +x advice
-$ advice
+$ @kbd{chmod +x advice}
+$ @kbd{advice}
@print{} Don't Panic!
@end example
@@ -2003,7 +2009,7 @@ runs, it will probably print strange messages about syntax errors.
For example, look at the following:
@example
-$ awk '@{ print "hello" @} # let's be cute'
+$ @kbd{awk '@{ print "hello" @} # let's be cute'}
>
@end example
@@ -2013,8 +2019,8 @@ It therefore prompts with the secondary prompt, waiting for more input.
With Unix @command{awk}, closing the quoted string produces this result:
@example
-$ awk '@{ print "hello" @} # let's be cute'
-> '
+$ @kbd{awk '@{ print "hello" @} # let's be cute'}
+> @kbd{'}
@error{} awk: can't open file be
@error{} source line number 1
@end example
@@ -2030,7 +2036,7 @@ The next @value{SUBSECTION} describes the shell's quoting rules.
@cindex quoting, rules for
@menu
-* DOS Quoting:: Quoting in MS-DOS Batch Files.
+* DOS Quoting:: Quoting in Windows Batch Files.
@end menu
For short to medium length @command{awk} programs, it is most convenient
@@ -2047,7 +2053,7 @@ awk '@var{program text}' @var{input-file1} @var{input-file2} @dots{}
@cindex Bourne shell, quoting rules for
Once you are working with the shell, it is helpful to have a basic
knowledge of shell quoting rules. The following rules apply only to
-POSIX-compliant, Bourne-style shells (such as @command{bash}, the GNU Bourne-Again
+POSIX-compliant, Bourne-style shells (such as Bash, the GNU Bourne-Again
Shell). If you use @command{csh}, you're on your own.
@itemize @bullet
@@ -2131,7 +2137,7 @@ Mixing single and double quotes is difficult. You have to resort
to shell quoting tricks, like this:
@example
-$ awk 'BEGIN @{ print "Here is a single quote <'"'"'>" @}'
+$ @kbd{awk 'BEGIN @{ print "Here is a single quote <'"'"'>" @}'}
@print{} Here is a single quote <'>
@end example
@@ -2142,7 +2148,7 @@ third are single-quoted, the second is double-quoted.
This can be ``simplified'' to:
@example
-$ awk 'BEGIN @{ print "Here is a single quote <'\''>" @}'
+$ @kbd{awk 'BEGIN @{ print "Here is a single quote <'\''>" @}'}
@print{} Here is a single quote <'>
@end example
@@ -2153,7 +2159,7 @@ Another option is to use double quotes, escaping the embedded, @command{awk}-lev
double quotes:
@example
-$ awk "BEGIN @{ print \"Here is a single quote <'>\" @}"
+$ @kbd{awk "BEGIN @{ print \"Here is a single quote <'>\" @}"}
@print{} Here is a single quote <'>
@end example
@@ -2161,15 +2167,17 @@ $ awk "BEGIN @{ print \"Here is a single quote <'>\" @}"
@c ENDOFRANGE sq1x
@c ENDOFRANGE qs2x
This option is also painful, because double quotes, backslashes, and dollar signs
-are very common in @command{awk} programs.
+are very common in more advanced @command{awk} programs.
-A third option is to use the octal escape sequence equivalents for the
+A third option is to use the octal escape sequence equivalents
+(@pxref{Escape Sequences})
+for the
single- and double-quote characters, like so:
@example
-$ awk 'BEGIN @{ print "Here is a single quote <\47>" @}'
+$ @kbd{awk 'BEGIN @{ print "Here is a single quote <\47>" @}'}
@print{} Here is a single quote <'>
-$ awk 'BEGIN @{ print "Here is a double quote <\42>" @}'
+$ @kbd{awk 'BEGIN @{ print "Here is a double quote <\42>" @}'}
@print{} Here is a double quote <">
@end example
@@ -2189,7 +2197,7 @@ program, it is probably best to move it into a separate file, where
the shell won't be part of the picture, and you can say what you mean.
@node DOS Quoting
-@subsubsection Quoting in MS-DOS Batch Files
+@subsubsection Quoting in Windows Batch Files
@ignore
Date: Wed, 21 May 2008 09:58:43 +0200 (CEST)
@@ -2223,7 +2231,7 @@ Although this @value{DOCUMENT} generally only worries about POSIX systems and th
POSIX shell, the following issue arises often enough for many users that
it is worth addressing.
-Systems providing an MS-DOS compatible ``shell'' use the double-quote
+The ``shell'' on Microsoft Windows systems use the double-quote
character for quoting, and make it difficult or impossible to include an
escaped double-quote character in a command-line script.
The following example, courtesy of Jeroen Brink, shows
@@ -2454,9 +2462,11 @@ ls -l @var{files} | awk '@{ x += $5 @}
Print the total number of kilobytes used by @var{files}:
@c Don't use \ continuation, not discussed yet
+@c Remember that awk does floating point division,
+@c no need for (x+1023) / 1024
@example
ls -l @var{files} | awk '@{ x += $5 @}
- END @{ print "total K-bytes: " (x + 1023)/1024 @}'
+ END @{ print "total K-bytes:", x /1024 @}'
@end example
@item
@@ -2552,24 +2562,13 @@ features that haven't been covered yet, so don't worry if you don't
understand all the details:
@example
-ls -l | awk '$6 == "Nov" @{ sum += $5 @}
- END @{ print sum @}'
+LC_ALL=C ls -l | awk '$6 == "Nov" @{ sum += $5 @}
+ END @{ print sum @}'
@end example
-@cindex @command{csh} utility, backslash continuation and
@cindex @command{ls} utility
-@cindex backslash (@code{\}), continuing lines and, in @command{csh}
-@cindex @code{\} (backslash), continuing lines and, in @command{csh}
This command prints the total number of bytes in all the files in the
current directory that were last modified in November (of any year).
-@footnote{In the C shell (@command{csh}), you need to type
-a semicolon and then a backslash at the end of the first line; see
-@ref{Statements/Lines}, for an
-explanation. In a POSIX-compliant shell, such as the Bourne
-shell or @command{bash}, you can type the example as shown. If the command
-@samp{echo $path} produces an empty output line, you are most likely
-using a POSIX-compliant shell. Otherwise, you are probably using the
-C shell or a shell derived from it.}
The @w{@samp{ls -l}} part of this example is a system command that gives
you a listing of the files in a directory, including each file's size and the date
the file was last modified. Its output looks like this:
@@ -2593,8 +2592,8 @@ the file. The fourth field identifies the group of the file.
The fifth field contains the size of the file in bytes. The
sixth, seventh, and eighth fields contain the month, day, and time,
respectively, that the file was last modified. Finally, the ninth field
-contains the name of the file.@footnote{On some
-very old systems, you may need to use @samp{ls -lg} to get this output.}
+contains the @value{FN}.@footnote{The @samp{LC_ALL=C} is
+needed to produce traditional-style output from @command{ls}.}
@c @cindex automatic initialization
@cindex initialization, automatic
@@ -2665,8 +2664,8 @@ awk '/This regular expression is too long, so continue it\
@noindent
@cindex portability, backslash continuation and
-We have generally not used backslash continuation in the sample programs
-in this @value{DOCUMENT}. In @command{gawk}, there is no limit on the
+We have generally not used backslash continuation in our sample programs.
+@command{gawk} places no limit on the
length of a line, so backslash continuation is never strictly necessary;
it just makes programs more readable. For this same reason, as well as
for clarity, we have kept most statements short in the sample programs
@@ -2687,16 +2686,16 @@ lines in the middle of a regular expression or a string.
@strong{Caution:} @emph{Backslash continuation does not work as described
with the C shell.} It works for @command{awk} programs in files and
for one-shot programs, @emph{provided} you are using a POSIX-compliant
-shell, such as the Unix Bourne shell or @command{bash}. But the C shell behaves
+shell, such as the Unix Bourne shell or Bash. But the C shell behaves
differently! There, you must use two backslashes in a row, followed by
a newline. Note also that when using the C shell, @emph{every} newline
in your awk program must be escaped with a backslash. To illustrate:
@example
-% awk 'BEGIN @{ \
-? print \\
-? "hello, world" \
-? @}'
+% @kbd{awk 'BEGIN @{ \}
+? @kbd{ print \\}
+? @kbd{ "hello, world" \}
+? @kbd{@}'}
@print{} hello, world
@end example
@@ -2774,10 +2773,11 @@ as well to control how @command{awk} processes your data.
In addition, @command{awk} provides a number of built-in functions for doing
common computational and string-related operations.
@command{gawk} provides built-in functions for working with timestamps,
-performing bit manipulation, and for runtime string translation.
+performing bit manipulation, for runtime string translation,
+and array sorting.
As we develop our presentation of the @command{awk} language, we introduce
-most of the variables and many of the functions. They are defined
+most of the variables and many of the functions. They are described
systematically in @ref{Built-in Variables}, and
@ref{Built-in}.
@@ -2796,7 +2796,7 @@ from the output of other utility programs like @command{ls}.
Programs written with @command{awk} are usually much smaller than they would
be in other languages. This makes @command{awk} programs easy to compose and
-use. Often, @command{awk} programs can be quickly composed at your terminal,
+use. Often, @command{awk} programs can be quickly composed at your keyboard,
used once, and thrown away. Because @command{awk} programs are interpreted, you
can avoid the (usually lengthy) compilation part of the typical
edit-compile-test-debug cycle of software development.
@@ -2804,8 +2804,9 @@ edit-compile-test-debug cycle of software development.
Complex programs have been written in @command{awk}, including a complete
retargetable assembler for eight-bit microprocessors (@pxref{Glossary}, for
more information), and a microcode assembler for a special-purpose Prolog
-computer. More recently, @command{gawk} was used for writing a
-@uref{http://www.awk-scripting.de/cgi-bin/wiki.cgi/yawk/, a Wiki clone}.
+computer.
+@c More recently, @command{gawk} was used for writing a
+@c @uref{http://www.awk-scripting.de/cgi-bin/wiki.cgi/yawk/, a Wiki clone}.
While the original @command{awk}'s capabilities were strained by tasks
of such complexity, modern versions are more capable. Even the Bell
Labs version of @command{awk} has fewer predefined limits, and those
@@ -2849,7 +2850,7 @@ kinds of regexps let you specify more complicated classes of strings.
@ifnotinfo
Initially, the examples in this @value{CHAPTER} are simple.
As we explain more about how
-regular expressions work, we will present more complicated instances.
+regular expressions work, we present more complicated instances.
@end ifnotinfo
@menu
@@ -2876,7 +2877,7 @@ following prints the second field of each record that contains the string
@samp{foo} anywhere in it:
@example
-$ awk '/foo/ @{ print $2 @}' BBS-list
+$ @kbd{awk '/foo/ @{ print $2 @}' BBS-list}
@print{} 555-1234
@print{} 555-6699
@print{} 555-6480
@@ -2887,7 +2888,7 @@ $ awk '/foo/ @{ print $2 @}' BBS-list
@cindex operators, string-matching
@c @cindex operators, @code{~}
@cindex string-matching operators
-@code{~} (tilde), @code{~} operator
+@cindex @code{~} (tilde), @code{~} operator
@cindex tilde (@code{~}), @code{~} operator
@cindex @code{!} (exclamation point), @code{!~} operator
@cindex exclamation point (@code{!}), @code{!~} operator
@@ -2918,7 +2919,7 @@ all input records with the uppercase letter @samp{J} somewhere in the
first field:
@example
-$ awk '$1 ~ /J/' inventory-shipped
+$ @kbd{awk '$1 ~ /J/' inventory-shipped}
@print{} Jan 13 25 15 115
@print{} Jun 31 42 75 492
@print{} Jul 24 34 67 436
@@ -2974,7 +2975,7 @@ must use @samp{\"} to represent an actual double-quote character as a
part of the string. For example:
@example
-$ awk 'BEGIN @{ print "He said \"hi!\" to her." @}'
+$ @kbd{awk 'BEGIN @{ print "He said \"hi!\" to her." @}'}
@print{} He said "hi!" to her.
@end example
@@ -3046,12 +3047,15 @@ between @samp{0} and @samp{7}. For example, the code for the ASCII ESC
@c @cindex @command{awk} language, POSIX version
@cindex @code{\} (backslash), @code{\x} escape sequence
@cindex backslash (@code{\}), @code{\x} escape sequence
+@cindex common extensions, @code{\x} escape sequence
+@cindex extensions, common@comma{} @code{\x} escape sequence
@item \x@var{hh}@dots{}
The hexadecimal value @var{hh}, where @var{hh} stands for a sequence
of hexadecimal digits (@samp{0}--@samp{9}, and either @samp{A}--@samp{F}
or @samp{a}--@samp{f}). Like the same construct
in ISO C, the escape sequence continues until the first nonhexadecimal
-digit is seen. However, using more than two hexadecimal digits produces
+digit is seen. @value{COMMONEXT}
+However, using more than two hexadecimal digits produces
undefined results. (The @samp{\x} escape sequence is not allowed in
POSIX @command{awk}.)
@@ -3059,7 +3063,7 @@ POSIX @command{awk}.)
@cindex backslash (@code{\}), @code{\/} escape sequence
@item \/
A literal slash (necessary for regexp constants only).
-This expression is used when you want to write a regexp
+This sequence is used when you want to write a regexp
constant that contains a slash. Because the regexp is delimited by
slashes, you need to escape the slash that is part of the pattern,
in order to tell @command{awk} to keep processing the rest of the regexp.
@@ -3068,7 +3072,7 @@ in order to tell @command{awk} to keep processing the rest of the regexp.
@cindex backslash (@code{\}), @code{\"} escape sequence
@item \"
A literal double quote (necessary for string constants only).
-This expression is used when you want to write a string
+This sequence is used when you want to write a string
constant that contains a double quote. Because the string is delimited by
double quotes, you need to escape the quote that is part of the string,
in order to tell @command{awk} to keep processing the rest of the string.
@@ -3132,7 +3136,7 @@ For example, @code{"a\qc"} is the same as @code{"aqc"}.
@command{gawk} warns you about it.)
Consider @samp{FS = @w{"[ \t]+\|[ \t]+"}} to use vertical bars
surrounded by whitespace as the field separator. There should be
-two backslashes in the string @samp{FS = @w{"[ \t]+\\|[ \t]+"}}.)
+two backslashes in the string: @samp{FS = @w{"[ \t]+\\|[ \t]+"}}.)
@c I did this! This is why I added the warning.
@cindex @command{gawk}, escape sequences
@@ -3226,7 +3230,7 @@ if ("line1\nLINE 2" ~ /1$/) @dots{}
@cindex @code{.} (period)
@cindex period (@code{.})
-@item .
+@item . @asis{(period)}
This matches any single character,
@emph{including} the newline character. For example, @samp{.P}
matches any single character followed by a @samp{P} in a string. Using
@@ -3362,8 +3366,7 @@ constants,
@command{gawk} did @emph{not} match interval expressions
in regexps.
-However,
-beginning with version 3.2 @strong{(FIXME: version)}
+However, beginning with @value{PVERSION} 4.0,
@command{gawk} does match interval expressions by default.
This is because compatibility with POSIX has become more
important to most @command{gawk} users than compatibility with
@@ -3393,7 +3396,7 @@ For example, @samp{/+/} matches a literal plus sign. However, many other versio
If @command{gawk} is in compatibility mode
(@pxref{Options}),
-POSIX character classes and interval expressions are not available in
+interval expressions are not available in
regular expressions.
@c ENDOFRANGE regexpo
@@ -3407,14 +3410,12 @@ regular expressions.
Within a character list, a @dfn{range expression} consists of two
characters separated by a hyphen. It matches any single character that
sorts between the two characters, using the locale's
-collating sequence and character set. For example, in the default C
-locale, @samp{[a-dx-z]} is equivalent to @samp{[abcdxyz]}. Many locales
-sort characters in dictionary order, and in these locales,
-@samp{[a-dx-z]} is typically not equivalent to @samp{[abcdxyz]}; instead it
-might be equivalent to @samp{[aBbCcDdxXyYz]}, for example. To obtain
-the traditional interpretation of bracket expressions, you can use the C
-locale by setting the @env{LC_ALL} environment variable to the value
-@samp{C}.
+collating sequence and character set.
+For example, @samp{[0-9]} is equivalent to @samp{[0123456789]}.
+
+Unfortunately, providing simple character ranges such as @samp{[a-z]}
+usually does not work like you might expect, due to locale-related issues.
+This is discussed more fully, in @ref{Locales}.
@cindex @code{\} (backslash), in character lists
@cindex backslash (@code{\}), in character lists
@@ -3446,7 +3447,7 @@ traditional @command{egrep} utility.
@cindex character lists, character classes
@cindex POSIX @command{awk}, character lists and, character classes
-@dfn{Character classes} are a new feature introduced in the POSIX standard.
+@dfn{Character classes} are a feature introduced in the POSIX standard.
A character class is a special notation for describing
lists of characters that have a specific attribute, but the
actual characters can vary from country to country and/or
@@ -3691,11 +3692,11 @@ are allowed.
@item @code{--traditional}
Traditional Unix @command{awk} regexps are matched. The GNU operators
-are not special, interval expressions are not available, nor
-are the POSIX character classes (@code{[[:alnum:]]}, etc.).
+are not special, and interval expressions are not available.
+The POSIX character classes (@code{[[:alnum:]]}, etc.) are supported,
+as modern Unix @command{awk} does support them.
Characters described by octal and hexadecimal escape sequences are
treated literally, even if they represent regexp metacharacters.
-Also, @command{gawk} silently skips directories named on the command line.
@item @code{--re-interval}
Allow interval expressions in regexps, if @option{--traditional}
@@ -3724,7 +3725,7 @@ to read. There are two alternatives that you might prefer.
One way to perform a case-insensitive match at a particular point in the
program is to convert the data to a single case, using the
-@code{tolower} or @code{toupper} built-in string functions (which we
+@code{tolower()} or @code{toupper()} built-in string functions (which we
haven't discussed yet;
@pxref{String Functions}).
For example:
@@ -3772,7 +3773,7 @@ that it is possible, using something like
and
@samp{IGNORECASE = 0 || /foobar/ @{ @dots{} @}}.
However, this is somewhat obscure and we don't recommend it.}
-To do this, use either character lists or @code{tolower}. However, one
+To do this, use either character lists or @code{tolower()}. However, one
thing you can do with @code{IGNORECASE} only is dynamically turn
case-sensitivity on or off for all the rules at once.
@@ -3782,24 +3783,22 @@ case-sensitivity on or off for all the rules at once.
Setting @code{IGNORECASE} from the command line is a way to make
a program case-insensitive without having to edit it.
-Prior to @command{gawk} 3.0, the value of @code{IGNORECASE}
-affected regexp operations only. It did not affect string comparison
-with @samp{==}, @samp{!=}, and so on.
-Beginning with @value{PVERSION} 3.0, both regexp and string comparison
-operations are also affected by @code{IGNORECASE}.
+Both regexp and string comparison
+operations are affected by @code{IGNORECASE}.
@c @cindex ISO 8859-1
@c @cindex ISO Latin-1
-Beginning with @command{gawk} 3.0,
+In multibyte locales,
the equivalences between upper-
-and lowercase characters are based on the ISO-8859-1 (ISO Latin-1)
+and lowercase characters are tested based on the wide-character values of
+the locale's character set.
+Otherwise, the characters are tested based
+on the ISO-8859-1 (ISO Latin-1)
character set. This character set is a superset of the traditional 128
ASCII characters, which also provides a number of characters suitable
-for use with European languages.
-
-As of @command{gawk} 3.1.4, the case equivalences are fully
-locale-aware. They are based on the C @code{<ctype.h>} facilities,
-such as @code{isalpha()} and @code{toupper()}.
+for use with European languages.@footnote{If you don't understand this,
+don't worry about it; it just means that @command{gawk} does
+the right thing.}
The value of @code{IGNORECASE} has no effect if @command{gawk} is in
compatibility mode (@pxref{Options}).
@@ -3818,7 +3817,7 @@ Consider the following:
echo aaaabcd | awk '@{ sub(/a+/, "<A>"); print @}'
@end example
-This example uses the @code{sub} function (which we haven't discussed yet;
+This example uses the @code{sub()} function (which we haven't discussed yet;
@pxref{String Functions})
to make a change to the input record. Here, the regexp @code{/a+/}
indicates ``one or more @samp{a} characters,'' and the replacement
@@ -3831,13 +3830,13 @@ match. Thus, all four @samp{a} characters are
replaced with @samp{<A>} in this example:
@example
-$ echo aaaabcd | awk '@{ sub(/a+/, "<A>"); print @}'
+$ @kbd{echo aaaabcd | awk '@{ sub(/a+/, "<A>"); print @}'}
@print{} <A>bcd
@end example
For simple match/no-match tests, this is not so important. But when doing
-text matching and substitutions with the @code{match}, @code{sub}, @code{gsub},
-and @code{gensub} functions, it is very important.
+text matching and substitutions with the @code{match()}, @code{sub()}, @code{gsub()},
+and @code{gensub()} functions, it is very important.
@ifinfo
@xref{String Functions},
for more information on these functions.
@@ -3875,7 +3874,8 @@ $0 ~ digits_regexp @{ print @}
This sets @code{digits_regexp} to a regexp that describes one or more digits,
and tests whether the input record matches this regexp.
-@strong{Caution:} When using the @samp{~} and @samp{!~}
+@quotation NOTE
+When using the @samp{~} and @samp{!~}
operators, there is a difference between a regexp constant
enclosed in slashes and a string constant enclosed in double quotes.
If you are going to use a string constant, you have to understand that
@@ -3884,6 +3884,7 @@ the string is, in essence, scanned @emph{twice}: the first time when
match the string on the lefthand side of the operator with the pattern
on the right. This is true of any string-valued expression (such as
@code{digits_regexp}, shown previously), not just string constants.
+@end quotation
@cindex regexp constants, slashes vs.@: quotes
@cindex @code{\} (backslash), regexp constants
@@ -3936,7 +3937,7 @@ Some commercial versions of @command{awk} do not allow the newline
character to be used inside a character list for a dynamic regexp:
@example
-$ awk '$0 ~ "[ \t\n]"'
+$ @kbd{awk '$0 ~ "[ \t\n]"'}
@error{} awk: newline in character class [
@error{} ]...
@error{} source line number 1
@@ -3948,8 +3949,8 @@ $ awk '$0 ~ "[ \t\n]"'
But a newline in a regexp constant works with no problem:
@example
-$ awk '$0 ~ /[ \t\n]/'
-here is a sample line
+$ @kbd{awk '$0 ~ /[ \t\n]/'}
+@kbd{here is a sample line}
@print{} here is a sample line
@kbd{@value{CTL}-d}
@end example
@@ -3967,30 +3968,43 @@ occur often in practice, but it's worth noting for future reference.
Modern systems support the notion of @dfn{locales}: a way to tell
the system about the local character set and language. The current
locale setting can affect the way regexp matching works, often
-in surprising ways. In particular, many locales do case-insensitive
-matching, even when you may have specified characters of only
-one particular case.
+in surprising ways.
-The following example uses the @code{sub} function, which
-does text replacement
-(@pxref{String Functions}).
-Here, the intent is to remove trailing uppercase characters:
+For example, in the default C locale, @samp{[a-dx-z]} is equivalent to
+@samp{[abcdxyz]}. Many locales sort characters in dictionary order,
+and in these locales, @samp{[a-dx-z]} is typically not equivalent to
+@samp{[abcdxyz]}; instead it might be equivalent to @samp{[aBbCcdXxYyz]},
+for example.
+
+This point needs to be emphasized: Much literature teaches that one should
+use @samp{[a-z]} to match a lower case character. But on systems with
+non-ASCII locales, this also matches all of the upper case characters
+except @samp{Z}! This is a continuous cause of confusion, even well
+into the twenty-first century.
+
+To obtain the traditional interpretation of bracket expressions, you can
+use the C locale by setting the @env{LC_ALL} environment variable to the
+value @samp{C}. However, it is best to just use POSIX character classes,
+such as @samp{[[:lower:]]} to match specific classes of characters.
+
+To demonstrate these issues, the following example uses the @code{sub()}
+function, which does text replacement (@pxref{String Functions}). Here,
+the intent is to remove trailing uppercase characters:
@example
-$ echo something1234abc | gawk '@{ sub("[A-Z]*$", ""); print @}'
+$ @kbd{echo something1234abc | gawk '@{ sub("[A-Z]*$", ""); print @}'}
@print{} something1234
@end example
@noindent
-This output is unexpected, since the @samp{abc} at the end of @samp{something1234abc}
-should not normally match @samp{[A-Z]*}. This result is due to the
-locale setting (and thus you may not see it on your system).
-There are two fixes. The first is to use the POSIX character
-class @samp{[[:upper:]]}, instead of @samp{[A-Z]}.
+This output is unexpected, since the @samp{abc} at the end of
+@samp{something1234abc} should not normally match @samp{[A-Z]*}.
+This result is due to the locale setting (and thus you may not see
+it on your system). There are two fixes. The first is to use the
+POSIX character class @samp{[[:upper:]]}, instead of @samp{[A-Z]}.
(This is preferred, since then your program will work everywhere.)
-The second is to change the locale setting in the environment,
-before running @command{gawk},
-by using the shell statements:
+The second is to change the locale setting in the environment, before
+running @command{gawk}, by using the shell statements:
@example
LANG=C LC_ALL=C
@@ -4008,6 +4022,7 @@ Unicode locales, such as @samp{en_US.UTF-8}. (In general, such
ranges should be avoided; either list the characters individually,
or use a POSIX character class such as @samp{[[:punct:]]}.)
+An additional factor relates to splitting recoreds.
For the normal case of @samp{RS = "\n"}, the locale is largely irrelevant.
For other single-character record separators, using @samp{LC_ALL=C}
will give you much better performance when reading records. Otherwise,
@@ -4025,7 +4040,8 @@ detail in @ref{Conversion}.
@cindex input files, reading
@cindex input files
@cindex @code{FILENAME} variable
-In the typical @command{awk} program, all input is read either from the
+In the typical @command{awk} program,
+@command{awk} reads all input either from the
standard input (by default, this is the keyboard, but often it is a pipe from another
command) or from files whose names you specify on the @command{awk}
command line. If you specify input files, @command{awk} reads them
@@ -4081,7 +4097,7 @@ been read
so far
from the current input file. This value is stored in a
built-in variable called @code{FNR}. It is reset to zero when a new
-file is started. Another built-in variable, @code{NR}, is the total
+file is started. Another built-in variable, @code{NR}, records the total
number of input records read so far from all @value{DF}s. It starts at zero,
but is never automatically reset to zero.
@@ -4124,8 +4140,8 @@ with each slash changed to a newline. Here are the results of running
the program on @file{BBS-list}:
@example
-$ awk 'BEGIN @{ RS = "/" @}
-> @{ print $0 @}' BBS-list
+$ @kbd{awk 'BEGIN @{ RS = "/" @}}
+> @kbd{@{ print $0 @}' BBS-list}
@print{} aardvark 555-5553 1200
@print{} 300 B
@print{} alpo-net 555-3412 2400
@@ -4225,6 +4241,7 @@ affected.
After the end of the record has been determined, @command{gawk}
sets the variable @code{RT} to the text in the input that matched
@code{RS}.
+
When using @command{gawk},
the value of @code{RS} is not limited to a one-character
string. It can be any regular expression
@@ -4344,11 +4361,11 @@ record onto the end of the previous ones.
@cindex field separators, POSIX and
@cindex separators, field, POSIX and
When @command{awk} reads an input record, the record is
-automatically @dfn{parsed} or separated by the interpreter into chunks
+automatically @dfn{parsed} or separated by the @command{awk} utility into chunks
called @dfn{fields}. By default, fields are separated by @dfn{whitespace},
like words in a line.
Whitespace in @command{awk} means any string of one or more spaces,
-tabs, or newlines;@footnote{In POSIX @command{awk}, newlines are not
+TABs, or newlines;@footnote{In POSIX @command{awk}, newlines are not
considered whitespace for separating fields.} other characters, such as
formfeed, vertical tab, etc.@: that are
considered whitespace by other languages, are @emph{not} considered
@@ -4400,7 +4417,7 @@ when you are not interested in specific fields.
Here are some more examples:
@example
-$ awk '$1 ~ /foo/ @{ print $0 @}' BBS-list
+$ @kbd{awk '$1 ~ /foo/ @{ print $0 @}' BBS-list}
@print{} fooey 555-1234 2400/1200/300 B
@print{} foot 555-6699 1200/300 B
@print{} macfoo 555-6480 1200/300 A
@@ -4420,7 +4437,7 @@ looks for @samp{foo} in @emph{the entire record} and prints the first
field and the last field for each matching input record:
@example
-$ awk '/foo/ @{ print $1, $NF @}' BBS-list
+$ @kbd{awk '/foo/ @{ print $1, $NF @}' BBS-list}
@print{} fooey B
@print{} foot B
@print{} macfoo A
@@ -4492,8 +4509,8 @@ modifies the input file.)
Consider the following example and its output:
@example
-$ awk '@{ nboxes = $3 ; $3 = $3 - 10
-> print nboxes, $3 @}' inventory-shipped
+$ @kbd{awk '@{ nboxes = $3 ; $3 = $3 - 10}
+> @kbd{print nboxes, $3 @}' inventory-shipped}
@print{} 25 15
@print{} 32 22
@print{} 24 14
@@ -4525,7 +4542,7 @@ prints a copy of the input file, with 10 subtracted from the second
field of each line:
@example
-$ awk '@{ $2 = $2 - 10; print $0 @}' inventory-shipped
+$ @kbd{awk '@{ $2 = $2 - 10; print $0 @}' inventory-shipped}
@print{} Jan 3 25 15 115
@print{} Feb 5 32 24 226
@print{} Mar 5 24 34 228
@@ -4594,8 +4611,8 @@ value of @code{$0} but does not change the value of @code{NF},
even when you assign the empty string to a field. For example:
@example
-$ echo a b c d | awk '@{ OFS = ":"; $2 = ""
-> print $0; print NF @}'
+$ @kbd{echo a b c d | awk '@{ OFS = ":"; $2 = ""}
+> @kbd{print $0; print NF @}'}
@print{} a::c:d
@print{} 4
@end example
@@ -4606,8 +4623,8 @@ the two colons between @samp{a} and @samp{c}.
This example shows what happens if you create a new field:
@example
-$ echo a b c d | awk '@{ OFS = ":"; $2 = ""; $6 = "new"
-> print $0; print NF @}'
+$ @kbd{echo a b c d | awk '@{ OFS = ":"; $2 = ""; $6 = "new"}
+> @kbd{print $0; print NF @}'}
@print{} a::c:d::new
@print{} 6
@end example
@@ -4617,7 +4634,6 @@ The intervening field, @code{$5}, is created with an empty value
(indicated by the second pair of adjacent colons),
and @code{NF} is updated with the value six.
-@strong{FIXME:} Verify that this is in POSIX.
@cindex dark corner, @code{NF} variable, decrementing
@cindex @code{NF} variable, decrementing
Decrementing @code{NF} throws away the values of the fields
@@ -4654,7 +4670,7 @@ There is a flip side to the relationship between @code{$0} and
the fields. Any assignment to @code{$0} causes the record to be
reparsed into fields using the @emph{current} value of @code{FS}.
This also applies to any built-in function that updates @code{$0},
-such as @code{sub} and @code{gsub}
+such as @code{sub()} and @code{gsub()}
(@pxref{String Functions}).
@c ENDOFRANGE ficon
@@ -4662,6 +4678,7 @@ such as @code{sub} and @code{gsub}
@section Specifying How Fields Are Separated
@menu
+* Default Field Splitting:: How fields are normally separated.
* Regexp Field Splitting:: Using regexps as the field separator.
* Single Character Fields:: Making each character a separate field.
* Command Line Field Separator:: Setting @code{FS} from the command-line.
@@ -4696,7 +4713,7 @@ Note the leading spaces in the values of the second and third fields.
The field separator is represented by the built-in variable @code{FS}.
Shell programmers take note: @command{awk} does @emph{not} use the
name @code{IFS} that is used by the POSIX-compliant shells (such as
-the Unix Bourne shell, @command{sh}, or @command{bash}).
+the Unix Bourne shell, @command{sh}, or Bash).
@cindex @code{FS} variable, changing value of
The value of @code{FS} can be changed in the @command{awk} program with the
@@ -4746,6 +4763,10 @@ separator characters carefully to prevent such problems.
(If the data is not in a form that is easy to process, perhaps you
can massage it first with a separate @command{awk} program.)
+
+@node Default Field Splitting
+@subsection Whitespace Normally Separates Fields
+
@cindex newlines, as field separators
@cindex whitespace, as field separators
Fields are normally separated by whitespace sequences
@@ -4810,7 +4831,7 @@ the record and then decides where the fields are.
For example, the following pipeline prints @samp{b}:
@example
-$ echo ' a b c d ' | awk '@{ print $2 @}'
+$ @kbd{echo ' a b c d ' | awk '@{ print $2 @}'}
@print{} b
@end example
@@ -4819,8 +4840,8 @@ However, this pipeline prints @samp{a} (note the extra spaces around
each letter):
@example
-$ echo ' a b c d ' | awk 'BEGIN @{ FS = "[ \t\n]+" @}
-> @{ print $2 @}'
+$ @kbd{echo ' a b c d ' | awk 'BEGIN @{ FS = "[ \t\n]+" @}}
+> @kbd{@{ print $2 @}'}
@print{} a
@end example
@@ -4834,7 +4855,7 @@ The stripping of leading and trailing whitespace also comes into
play whenever @code{$0} is recomputed. For instance, study this pipeline:
@example
-$ echo ' a b c d' | awk '@{ print; $2 = $2; print @}'
+$ @kbd{echo ' a b c d' | awk '@{ print; $2 = $2; print @}'}
@print{} a b c d
@print{} a b c d
@end example
@@ -4860,28 +4881,19 @@ should not rely on any specific behavior in your programs.
@value{DARKCORNER}
As a point of information, the Bell Labs @command{awk} allows @samp{^}
-to match only at the beginning of the record. Versions of @command{gawk}
-after 3.1.6 also work this way. For example:
+to match only at the beginning of the record. @command{gawk}
+also works this way. For example:
@example
-$ echo 'xxAA xxBxx C' |
-> nawk -F '(^x+)|( +)' '@{ for (i = 1; i <= NF; i++) printf "-->%s<--\n", $i @}'
-@print{} --><--
-@print{} -->AA<--
-@print{} -->xxBxx<--
-@print{} -->C<--
-
-$ echo 'xxAA xxBxx C' |
-> gawk-3.1.6 -F '(^x+)|( +)' '@{ for (i = 1; i <= NF; i++) printf "-->%s<--\n", $i @}'
+$ @kbd{echo 'xxAA xxBxx C' |}
+> @kbd{gawk -F '(^x+)|( +)' '@{ for (i = 1; i <= NF; i++)}
+> @kbd{printf "-->%s<--\n", $i @}'}
@print{} --><--
@print{} -->AA<--
@print{} --><--
@print{} -->Bxx<--
@print{} -->C<--
@end example
-
-@noindent
-As mentioned, @command{gawk} now behaves like the Bell Labs @command{awk}.
@c ENDOFRANGE regexpfs
@c ENDOFRANGE fsregexp
@@ -4898,11 +4910,11 @@ each individual character in the record becomes a separate field.
For example:
@example
-$ echo a b | gawk 'BEGIN @{ FS = "" @}
-> @{
-> for (i = 1; i <= NF; i = i + 1)
-> print "Field", i, "is", $i
-> @}'
+$ @kbd{echo a b | gawk 'BEGIN @{ FS = "" @}}
+> @kbd{@{}
+> @kbd{for (i = 1; i <= NF; i = i + 1)}
+> @kbd{print "Field", i, "is", $i}
+> @kbd{@}'}
@print{} Field 1 is a
@print{} Field 2 is
@print{} Field 3 is b
@@ -4988,7 +5000,7 @@ the first three digits of their phone numbers:
@c tweaked to make the tex output look better in @smallbook
@example
-$ awk -F- -f baud.awk BBS-list
+$ @kbd{awk -F- -f baud.awk BBS-list}
@print{} aardvark 555
@print{} alpo
@print{} barfly 555
@@ -5163,7 +5175,7 @@ the first reading.)
@cindex data, fixed-width
@cindex fixed-width data
@cindex advanced features, fixed-width data
-@command{gawk} @value{PVERSION} 2.13 introduced a facility for dealing with
+@command{gawk} provides a facility for dealing with
fixed-width fields with no distinctive field separator. For example,
data of this nature arises in the input for old Fortran programs where
numbers are run together, or in the output of programs that did not
@@ -5173,7 +5185,7 @@ An example of the latter is a table where all the columns are lined up by
the use of a variable number of spaces and @emph{empty fields are just
spaces}. Clearly, @command{awk}'s normal field splitting based on @code{FS}
does not work well in this case. Although a portable @command{awk} program
-can use a series of @code{substr} calls on @code{$0}
+can use a series of @code{substr()} calls on @code{$0}
(@pxref{String Functions}),
this is awkward and inefficient for a large number of fields.
@@ -5302,13 +5314,13 @@ the first reading.)
@cindex advanced features, specifying field content
Normally, when using @code{FS}, @command{gawk} defines the fields as the
parts of the record that occur in between each field separator. In other
-words, @code{FS} defines what a field @emph{is not}, and not what a field
+words, @code{FS} defines what a field @emph{is not}, instead of what a field
@emph{is}.
However, there are times when you really want to define the fields by
what they are, and not by what they are not.
The most notorious such case
-is so-called Comma-Separated-Value (CSV) data. Many spreadsheet programs,
+is so-called @dfn{comma separated value} (CSV) data. Many spreadsheet programs,
for example, can export their data into text files, where each record is
terminated with a newline, and fields are separated by commas. If only
commas separated the data, there wouldn't be an issue. The problem comes when
@@ -5393,6 +5405,17 @@ the @code{FPAT} mechanism provides an elegant solution for the majority
of cases, and the @command{gawk} maintainer is satisfied with that.
@end quotation
+As written, the regexp used for @code{FPATH} requires that each field
+have a least one character. A straightforward modification
+(changing changed the first @samp{+} to @samp{*}) allows fields to be empty:
+
+@example
+FPAT = "([^,]*)|(\"[^\"]+\")"
+@end example
+
+Finally, the @code{patsplit()} function makes the same functionality
+available for splitting regular strings (@pxref{String Functions}).
+
@node Multiple Line
@section Multiple-Line Records
@@ -5464,7 +5487,7 @@ The original motivation for this special exception was probably to provide
useful behavior in the default case (i.e., @code{FS} is equal
to @w{@code{" "}}). This feature can be a problem if you really don't
want the newline character to separate fields, because there is no way to
-prevent it. However, you can work around this by using the @code{split}
+prevent it. However, you can work around this by using the @code{split()}
function to break up the record manually
(@pxref{String Functions}).
If you have a single character field separator, you can work around
@@ -5605,7 +5628,8 @@ In the following examples, @var{command} stands for a string value that
represents a shell command.
@quotation NOTE
-When @option{--sandbox} is specified, reading lines from files, pipes and coprocesses is disabled.
+When @option{--sandbox} is specified (@pxref{Options}),
+reading lines from files, pipes and coprocesses is disabled.
@end quotation
@menu
@@ -5650,7 +5674,7 @@ processing on the next record @emph{right now}. For example:
u = index($0, "*/")
offset = 0
@}
- # substr expression will be "" if */
+ # substr() expression will be "" if */
# occurred at end of line
$0 = tmp substr($0, offset + u + 2)
@}
@@ -5771,7 +5795,7 @@ According to POSIX, @samp{getline < @var{expression}} is ambiguous if
@samp{$}; for example, @samp{getline < dir "/" file} is ambiguous
because the concatenation operator is not parenthesized. You should
write it as @samp{getline < (dir "/" file)} if you want your program
-to be portable to other @command{awk} implementations.
+to be portable to all @command{awk} implementations.
@node Getline/Variable/File
@subsection Using @code{getline} into a Variable from a File
@@ -5806,8 +5830,8 @@ Note here how the name of the extra input file is not built into
the program; it is taken directly from the data, specifically from the second field on
the @samp{@@include} line.
-@cindex @code{close} function
-The @code{close} function is called to ensure that if two identical
+@cindex @code{close()} function
+The @code{close()} function is called to ensure that if two identical
@samp{@@include} lines appear in the input, the entire specified file is
included twice.
@xref{Close Files And Pipes}.
@@ -5839,7 +5863,7 @@ produced by running the rest of the line as a shell command:
@example
@{
if ($1 == "@@execute") @{
- tmp = substr($0, 10)
+ tmp = substr($0, 10) # Remove "@@execute"
while ((tmp | getline) > 0)
print
close(tmp)
@@ -5849,8 +5873,8 @@ produced by running the rest of the line as a shell command:
@end example
@noindent
-@cindex @code{close} function
-The @code{close} function is called to ensure that if two identical
+@cindex @code{close()} function
+The @code{close()} function is called to ensure that if two identical
@samp{@@execute} lines appear in the input, the command is run for
each one.
@ifnottex
@@ -5900,18 +5924,17 @@ According to POSIX, @samp{@var{expression} | getline} is ambiguous if
@samp{$}---for example, @samp{@w{"echo "} "date" | getline} is ambiguous
because the concatenation operator is not parenthesized. You should
write it as @samp{(@w{"echo "} "date") | getline} if you want your program
-to be portable to other @command{awk} implementations.
+to be portable to all @command{awk} implementations.
@quotation NOTE
Unfortunately, @command{gawk} has not been consistent in its treatment
-of a construct like @samp{@w{"echo "} "date" | getline}. Up to and including
-@value{PVERSION} 3.1.1 of @command{gawk}, it was treated as
+of a construct like @samp{@w{"echo "} "date" | getline}.
+Most versions, including the current version, treat it at as
@samp{@w{("echo "} "date") | getline}.
(This how Unix @command{awk} behaves.)
-From 3.1.2 through 3.1.5, it was treated as
+Some versions changed and treated it as
@samp{@w{"echo "} ("date" | getline)}.
(This is how @command{mawk} behaves.)
-Starting with @value{PVERSION} 3.1.6, the earlier behavior was reinstated.
In short, @emph{always} use explicit parentheses, and then you won't
have to worry.
@end quotation
@@ -6055,6 +6078,13 @@ current input file. However, by not using a variable, @code{$0}
and @code{NR} are still updated. If you're doing this, it's
probably by accident, and you should reconsider what it is you're
trying to accomplish.
+
+@item
+@ref{Getline Summary}, presents a table summarizing the
+@code{getline} variants and which variables they can affect.
+It is worth noting that those variants which do not use redirection
+can cause @code{FILENAME} to be updated if they cause
+@command{awk} to start reading a new input file.
@end itemize
@node Getline Summary
@@ -6067,16 +6097,16 @@ listing which built-in variables are set by each one.
@float Table,table-getline-variants
@caption{getline Variants and What They Set}
-@multitable @columnfractions .35 .65
-@headitem Variant @tab Effect
-@item @code{getline} @tab Sets @code{$0}, @code{NF}, @code{FNR}, and @code{NR}
-@item @code{getline} @var{var} @tab Sets @var{var}, @code{FNR}, and @code{NR}
-@item @code{getline <} @var{file} @tab Sets @code{$0} and @code{NF}
-@item @code{getline @var{var} < @var{file}} @tab Sets @var{var}
-@item @var{command} @code{| getline} @tab Sets @code{$0} and @code{NF}
-@item @var{command} @code{| getline} @var{var} @tab Sets @var{var}
-@item @var{command} @code{|& getline} @tab Sets @code{$0} and @code{NF}. This is a @command{gawk} extension
-@item @var{command} @code{|& getline} @var{var} @tab Sets @var{var}. This is a @command{gawk} extension
+@multitable @columnfractions .33 .43 .22
+@headitem Variant @tab Effect @tab Standad / Extenstion
+@item @code{getline} @tab Sets @code{$0}, @code{NF}, @code{FNR}, and @code{NR} @tab Standard
+@item @code{getline} @var{var} @tab Sets @var{var}, @code{FNR}, and @code{NR} @tab Standard
+@item @code{getline <} @var{file} @tab Sets @code{$0} and @code{NF} @tab Standard
+@item @code{getline @var{var} < @var{file}} @tab Sets @var{var} @tab Standard
+@item @var{command} @code{| getline} @tab Sets @code{$0} and @code{NF} @tab Standard
+@item @var{command} @code{| getline} @var{var} @tab Sets @var{var} @tab Standard
+@item @var{command} @code{|& getline} @tab Sets @code{$0} and @code{NF} @tab Extension
+@item @var{command} @code{|& getline} @var{var} @tab Sets @var{var} @tab Extension
@end multitable
@end float
@c ENDOFRANGE getl
@@ -6088,39 +6118,36 @@ listing which built-in variables are set by each one.
@cindex @code{BEGINFILE} special pattern
@cindex @code{ENDFILE} special pattern
-@strong{FIXME:} Get the version right.
@quotation NOTE
-This @value{SECTION} describes a @command{gawk}-specific feature
-added in @command{gawk} 3.X.
+This @value{SECTION} describes a @command{gawk}-specific feature.
@end quotation
-Two special kinds of rule, @code{BEGINFILE} and @code{ENDFILE}, give you ``hooks''
-into @command{gawk}'s command-line file processing loop. As with the @code{BEGIN}
-and @code{END} rules (@pxref{BEGIN/END}),
-all @code{BEGINFILE} rules in a program are merged,
-in the order they are read by @command{gawk}, and all @code{ENDFILE} rules are
-merged as well.
+Two special kinds of rule, @code{BEGINFILE} and @code{ENDFILE}, give
+you ``hooks'' into @command{gawk}'s command-line file processing loop.
+As with the @code{BEGIN} and @code{END} rules (@pxref{BEGIN/END}), all
+@code{BEGINFILE} rules in a program are merged, in the order they are
+read by @command{gawk}, and all @code{ENDFILE} rules are merged as well.
-The body of the @code{BEGINFILE} rules is executed just before @command{gawk}
-reads the first record from a file. @code{FILENAME} is set to the name of the current file,
-and @code{FNR} is set to zero.
+The body of the @code{BEGINFILE} rules is executed just before
+@command{gawk} reads the first record from a file. @code{FILENAME}
+is set to the name of the current file, and @code{FNR} is set to zero.
-The @code{BEGINFILE} rule provides you the opportunity for two
-tasks that would otherwise be difficult or impossible to perform:
+The @code{BEGINFILE} rule provides you the opportunity for two tasks
+that would otherwise be difficult or impossible to perform:
@enumerate 1
@item
-You can test if the file is readable.
-Normally, it is a fatal error if a file named on the command line cannot be
-opened for reading. However, you can
-bypass the fatal error and move on to the next file on the command line.
+You can test if the file is readable. Normally, it is a fatal error if a
+file named on the command line cannot be opened for reading. However,
+you can bypass the fatal error and move on to the next file on the
+command line.
-You do this by checking if
-the @code{ERRNO} variable is not
-the empty string; if so, then @command{gawk} was not able to open the file. In
-this case, your program can execute the @code{nextfile} statement (@pxref{Nextfile Statement}).
-This casuses @command{gawk} to skip the file entirely.
-Otherwise, @command{gawk} will exit with the usual fatal error.
+You do this by checking if the @code{ERRNO} variable is not the empty
+string; if so, then @command{gawk} was not able to open the file. In
+this case, your program can execute the @code{nextfile} statement
+(@pxref{Nextfile Statement}). This casuses @command{gawk} to skip
+the file entirely. Otherwise, @command{gawk} exits with the usual
+fatal error.
@item
If you have written extensions that modify the record handling (by inserting
@@ -6130,42 +6157,42 @@ currently used only by the @uref{http://xgawk.sourceforge.net, XMLgawk project}.
@end enumerate
The @code{ENDFILE} rule is called when @command{gawk} has finished processing
-the last record in an input file. It will be called before any @code{END} rules.
+the last record in an input file. For the last input file,
+it will be called before any @code{END} rules.
-Normally, when an error occurs when reading input in the normal input processing
-loop, the error is fatal. However, if an @code{ENDFILE} rule is present, the
-error becomes non-fatal, and instead @code{ERRNO} is set. This makes it possible
-to catch and process I/O errors at the level of the @command{awk} program.
+Normally, when an error occurs when reading input in the normal input
+processing loop, the error is fatal. However, if an @code{ENDFILE}
+rule is present, the error becomes non-fatal, and instead @code{ERRNO}
+is set. This makes it possible to catch and process I/O errors at the
+level of the @command{awk} program.
-The @code{next} statement is not allowed inside either a @code{BEGINFILE} or
-and @code{ENDFILE} rule. The @code{nextfile} statement is allowed only inside
-a @code{BEGINFILE} rule, but not inside an @code{ENDFILE} rule.
+The @code{next} statement (@pxref{Next Statement}) is not allowed inside
+either a @code{BEGINFILE} or and @code{ENDFILE} rule. The @code{nextfile}
+statement (@pxref{Nextfile Statement}) is allowed only inside a
+@code{BEGINFILE} rule, but not inside an @code{ENDFILE} rule.
-The @code{getline} statement (@pxref{Getline}) is restricted inside both @code{BEGINFILE}
-and @code{ENDFILE}. Only the @samp{getline @var{variable} < @var{file}} form is
-allowed.
+The @code{getline} statement (@pxref{Getline}) is restricted inside
+both @code{BEGINFILE} and @code{ENDFILE}. Only the @samp{getline
+@var{variable} < @var{file}} form is allowed.
@code{BEGINFILE} and @code{ENDFILE} are @command{gawk} extensions.
-In most other @command{awk} implementations,
-or if @command{gawk} is in compatibility mode
-(@pxref{Options}),
-they are not special.
-
+In most other @command{awk} implementations, or if @command{gawk} is in
+compatibility mode (@pxref{Options}), they are not special.
@node Command line directories
@section Directories On The Command Line
@cindex directories, command line
@cindex command line, directories on
-According to POSIX, files named on the @command{awk} command line must be
-text files. The behavior is ``undefined'' if they are not. Most versions
-of @command{awk} treat a directory on the command line as a fatal error.
+According to the POSIX standard, files named on the @command{awk}
+command line must be text files. It is a fatal error if they are not.
+Most versions of @command{awk} treat a directory on the command line as
+a fatal error.
-@strong{FIXME:} Get the version right.
-Starting with version 3.x of @command{gawk}, a directory on the command line
-produces a warning, but is otherwise skipped. If either of the @option{--posix}
-or @option{--traditional} options is given, then @command{gawk} reverts to
-treating directories on the command line as a fatal error.
+By default, @command{gawk} produces a warning for a directory on the
+command line, but otherwise ignores it. If either of the @option{--posix}
+or @option{--traditional} options is given, then @command{gawk} reverts
+to treating a directory on the command line as a fatal error.
@node Printing
@chapter Printing Output
@@ -6192,7 +6219,7 @@ For printing with specifications, you need the @code{printf} statement
Besides basic and formatted printing, this @value{CHAPTER}
also covers I/O redirections to files and pipes, introduces
the special @value{FN}s that @command{gawk} processes internally,
-and discusses the @code{close} built-in function.
+and discusses the @code{close()} built-in function.
@menu
* Print:: The @code{print} statement.
@@ -6211,7 +6238,7 @@ and discusses the @code{close} built-in function.
@node Print
@section The @code{print} Statement
-The @code{print} statement is used to produce output with simple, standardized
+The @code{print} statement is used for producing output with simple, standardized
formatting. Specify only the strings or numbers to print, in a
list separated by commas. They are output, separated by single spaces,
followed by a newline. The statement looks like this:
@@ -6223,7 +6250,7 @@ print @var{item1}, @var{item2}, @dots{}
@noindent
The entire list of items may be optionally enclosed in parentheses. The
parentheses are necessary if any of the item expressions uses the @samp{>}
-relational operator; otherwise it could be confused with a redirection
+relational operator; otherwise it could be confused with an output redirection
(@pxref{Redirection}).
The items to print can be constant strings or numbers, fields of the
@@ -6243,10 +6270,10 @@ expression, and you will probably get an error. Keep in mind that a
space is printed between any two items.
@node Print Examples
-@section Examples of @code{print} Statements
+@section @code{print} Statement Examples
Each @code{print} statement makes at least one line of output. However, it
-isn't limited to only one line. If an item value is a string that contains a
+isn't limited to only one line. If an item value is a string containing a
newline, the newline is output along with the rest of the string. A
single @code{print} statement can make any number of lines this way.
@@ -6256,7 +6283,7 @@ The following is an example of printing a string that contains embedded newlines
character; @pxref{Escape Sequences}):
@example
-$ awk 'BEGIN @{ print "line one\nline two\nline three" @}'
+$ @kbd{awk 'BEGIN @{ print "line one\nline two\nline three" @}'}
@print{} line one
@print{} line two
@print{} line three
@@ -6268,7 +6295,7 @@ prints the first two fields of each input record, with a space between
them:
@example
-$ awk '@{ print $1, $2 @}' inventory-shipped
+$ @kbd{awk '@{ print $1, $2 @}' inventory-shipped}
@print{} Jan 13
@print{} Feb 15
@print{} Mar 15
@@ -6284,7 +6311,7 @@ juxtaposing two string expressions in @command{awk} means to concatenate
them. Here is the same program, without the comma:
@example
-$ awk '@{ print $1 $2 @}' inventory-shipped
+$ @kbd{awk '@{ print $1 $2 @}' inventory-shipped}
@print{} Jan13
@print{} Feb15
@print{} Mar15
@@ -6396,8 +6423,8 @@ program by using a new value of @code{OFS}.
@end ignore
@example
-$ awk 'BEGIN @{ OFS = ";"; ORS = "\n\n" @}
-> @{ print $1, $2 @}' BBS-list
+$ @kbd{awk 'BEGIN @{ OFS = ";"; ORS = "\n\n" @}}
+> @kbd{@{ print $1, $2 @}' BBS-list}
@print{} aardvark;555-5553
@print{}
@print{} alpo-net;555-3412
@@ -6407,29 +6434,29 @@ $ awk 'BEGIN @{ OFS = ";"; ORS = "\n\n" @}
@end example
If the value of @code{ORS} does not contain a newline, the program's output
-is run together on a single line.
+runs together on a single line.
@node OFMT
@section Controlling Numeric Output with @code{print}
@cindex numeric, output format
@cindex formats@comma{} numeric output
-When the @code{print} statement is used to print numeric values,
+When printing numeric values with the @code{print} statement,
@command{awk} internally converts the number to a string of characters
-and prints that string. @command{awk} uses the @code{sprintf} function
+and prints that string. @command{awk} uses the @code{sprintf()} function
to do this conversion
(@pxref{String Functions}).
-For now, it suffices to say that the @code{sprintf}
+For now, it suffices to say that the @code{sprintf()}
function accepts a @dfn{format specification} that tells it how to format
numbers (or strings), and that there are a number of different ways in which
numbers can be formatted. The different format specifications are discussed
more fully in
@ref{Control Letters}.
-@cindex @code{sprintf} function
+@cindex @code{sprintf()} function
@cindex @code{OFMT} variable
@cindex output, format specifier@comma{} @code{OFMT}
The built-in variable @code{OFMT} contains the default format specification
-that @code{print} uses with @code{sprintf} when it wants to convert a
+that @code{print} uses with @code{sprintf()} when it wants to convert a
number to a string for printing.
The default value of @code{OFMT} is @code{"%.6g"}.
The way @code{print} prints numbers can be changed
@@ -6437,9 +6464,9 @@ by supplying different format specifications
as the value of @code{OFMT}, as shown in the following example:
@example
-$ awk 'BEGIN @{
-> OFMT = "%.0f" # print numbers as integers (rounds)
-> print 17.23, 17.54 @}'
+$ @kbd{awk 'BEGIN @{}
+> @kbd{OFMT = "%.0f" # print numbers as integers (rounds)}
+> @kbd{print 17.23, 17.54 @}'}
@print{} 17 18
@end example
@@ -6459,12 +6486,12 @@ if @code{OFMT} contains anything but a floating-point conversion specification.
@cindex output, formatted
@cindex formatting output
For more precise control over the output format than what is
-normally provided by @code{print}, use @code{printf}.
-@code{printf} can be used to
+provided by @code{print}, use @code{printf}.
+With @code{printf} you can
specify the width to use for each item, as well as various
formatting choices for numbers (such as what output base to use, whether to
print an exponent, whether to print a sign, and how many digits to print
-after the decimal point). This is done by supplying a string, called
+after the decimal point). You do this by supplying a string, called
the @dfn{format string}, that controls how and where to print the other
arguments.
@@ -6488,7 +6515,7 @@ printf @var{format}, @var{item1}, @var{item2}, @dots{}
@noindent
The entire list of arguments may optionally be enclosed in parentheses. The
parentheses are necessary if any of the item expressions use the @samp{>}
-relational operator; otherwise, it can be confused with a redirection
+relational operator; otherwise, it can be confused with an output redirection
(@pxref{Redirection}).
@cindex format strings
@@ -6510,17 +6537,17 @@ The output separator variables @code{OFS} and @code{ORS} have no effect
on @code{printf} statements. For example:
@example
-$ awk 'BEGIN @{
-> ORS = "\nOUCH!\n"; OFS = "+"
-> msg = "Dont Panic!"
-> printf "%s\n", msg
-> @}'
+$ @kbd{awk 'BEGIN @{}
+> @kbd{ORS = "\nOUCH!\n"; OFS = "+"}
+> @kbd{msg = "Dont Panic!"}
+> @kbd{printf "%s\n", msg}
+> @kbd{@}'}
@print{} Dont Panic!
@end example
@noindent
-Here, neither the @samp{+} nor the @samp{OUCH} appear when
-the message is printed.
+Here, neither the @samp{+} nor the @samp{OUCH} appear in
+the output message.
@node Control Letters
@subsection Format-Control Letters
@@ -6536,13 +6563,14 @@ the field width. Here is a list of the format-control letters:
@table @code
@item %c
-This prints a number as an ASCII character; thus, @samp{printf "%c",
-65} outputs the letter @samp{A}. (The output for a string value is
-the first character of the string.)
+Print a number as an ASCII character; thus, @samp{printf "%c",
+65} outputs the letter @samp{A}. The output for a string value is
+the first character of the string.
@cindex dark corner, format-control characters
@cindex @command{gawk}, format-control characters
@quotation NOTE
+@ignore
The @samp{%c} format does @emph{not} handle values outside the range
0--255. On most systems, values from 0--127 are within the range of
ASCII and will yield an ASCII character. Values in the range 128--255
@@ -6551,15 +6579,28 @@ System 390 (IBM architecture mainframe) systems use 8-bit characters,
and thus values from 0--255 yield the corresponding EBCDIC character.
Any value above 255 is treated as modulo 255; i.e., the lowest eight bits
of the value are used. The locale and character set are always ignored.
+@end ignore
+The POSIX standard says the first character of a string is printed.
+In locales with multibyte characters, @command{gawk} attempts to
+convert the leading bytes of the string into a valid wide character
+and then to print the multibyte encoding of that character.
+Similarly, when printing a numeric value, @command{gawk} allows the
+value to be within the numeric range of values that can be held
+in a wide character.
+
+Other @command{awk} versions generally restrict themselves to printing
+the first byte of a string or to numeric values within the range of
+a single byte (0--255).
@end quotation
@item %d@r{,} %i
-These are equivalent; they both print a decimal integer.
+Print a decimal integer.
+The two control letters are equivalent.
(The @samp{%i} specification is for compatibility with ISO C.)
@item %e@r{,} %E
-These print a number in scientific (exponential) notation;
+Print a number in scientific (exponential) notation;
for example:
@example
@@ -6574,7 +6615,7 @@ discussed in the next @value{SUBSECTION}.)
@samp{%E} uses @samp{E} instead of @samp{e} in the output.
@item %f
-This prints a number in floating-point notation.
+Print a number in floating-point notation.
For example:
@example
@@ -6603,29 +6644,29 @@ The @code{%F} format is a POSIX extension to ISO C; not all systems
support it. On those that don't, @command{gawk} uses @code{%f} instead.
@item %g@r{,} %G
-These print a number in either scientific notation or in floating-point
+Print a number in either scientific notation or in floating-point
notation, whichever uses fewer characters; if the result is printed in
scientific notation, @samp{%G} uses @samp{E} instead of @samp{e}.
@item %o
-This prints an unsigned octal integer.
+Print an unsigned octal integer.
@item %s
-This prints a string.
+Print a string.
@item %u
-This prints an unsigned decimal integer.
+Print an unsigned decimal integer.
(This format is of marginal use, because all numbers in @command{awk}
are floating-point; it is provided primarily for compatibility with C.)
@item %x@r{,} %X
-These print an unsigned hexadecimal integer;
+Print an unsigned hexadecimal integer;
@samp{%X} uses the letters @samp{A} through @samp{F}
instead of @samp{a} through @samp{f}.
@item %%
-This isn't a format-control letter, but it does have meaning---the
-sequence @samp{%%} outputs one @samp{%}; it does not consume an
+Print a single @samp{%}.
+This does not consume an
argument and it ignores any modifiers.
@end table
@@ -6712,8 +6753,8 @@ Use an ``alternate form'' for certain control letters.
For @samp{%o}, supply a leading zero.
For @samp{%x} and @samp{%X}, supply a leading @samp{0x} or @samp{0X} for
a nonzero result.
-For @samp{%e}, @samp{%E}, and @samp{%f}, the result always contains a
-decimal point.
+For @samp{%e}, @samp{%E}, @samp{%f}, and @samp{%F}, the result always
+contains a decimal point.
For @samp{%g} and @samp{%G}, trailing zeros are not removed from the result.
@item 0
@@ -6782,15 +6823,15 @@ specifies the precision to use when printing.
The meaning of the precision varies by control letter:
@table @asis
-@item @code{%e}, @code{%E}, @code{%f}
+@item @code{%d}, @code{%i}, @code{%o}, @code{%u}, @code{%x}, @code{%X}
+Minimum number of digits to print.
+
+@item @code{%e}, @code{%E}, @code{%f}, @code{%F}
Number of digits to the right of the decimal point.
@item @code{%g}, @code{%G}
Maximum number of significant digits.
-@item @code{%d}, @code{%i}, @code{%o}, @code{%u}, @code{%x}, @code{%X}
-Minimum number of digits to print.
-
@item @code{%s}
Maximum number of characters from the string that should print.
@end table
@@ -6847,7 +6888,7 @@ This is not particularly easy to read but it does work.
C programmers may be used to supplying additional
@samp{l}, @samp{L}, and @samp{h}
modifiers in @code{printf} format strings. These are not valid in @command{awk}.
-Most @command{awk} implementations silently ignore these modifiers.
+Most @command{awk} implementations silently ignore them.
If @option{--lint} is provided on the command line
(@pxref{Options}),
@command{gawk} warns about their use. If @option{--posix} is supplied,
@@ -6857,7 +6898,7 @@ their use is a fatal error.
@node Printf Examples
@subsection Examples Using @code{printf}
-The following is a simple example of
+The following simple example shows
how to use @code{printf} to make an aligned table:
@example
@@ -6873,7 +6914,7 @@ produces an aligned two-column table of names and phone numbers,
as shown here:
@example
-$ awk '@{ printf "%-10s %s\n", $1, $2 @}' BBS-list
+$ @kbd{awk '@{ printf "%-10s %s\n", $1, $2 @}' BBS-list}
@print{} aardvark 555-5553
@print{} alpo-net 555-3412
@print{} barfly 555-7685
@@ -6908,7 +6949,7 @@ awk 'BEGIN @{ print "Name Number"
@{ printf "%-10s %s\n", $1, $2 @}' BBS-list
@end example
-The above example mixed @code{print} and @code{printf} statements in
+The above example mixes @code{print} and @code{printf} statements in
the same program. Using just @code{printf} statements can produce the
same results:
@@ -6946,15 +6987,16 @@ on the @code{print} statement
@cindex output redirection
@cindex redirection of output
-@cindex @code{--sandbox} option, output redirection with @command{print}, @command{printf}
+@cindex @code{--sandbox} option, output redirection with @code{print}, @code{printf}
So far, the output from @code{print} and @code{printf} has gone
to the standard
-output, usually the terminal. Both @code{print} and @code{printf} can
+output, usually the screen. Both @code{print} and @code{printf} can
also send their output to other places.
This is called @dfn{redirection}.
@quotation NOTE
-When @option{--sandbox} is specified, redirecting output to files and pipes is disabled.
+When @option{--sandbox} is specified (@pxref{Options}),
+redirecting output to files and pipes is disabled.
@end quotation
A redirection appears after the @code{print} or @code{printf} statement.
@@ -6974,7 +7016,7 @@ but they work identically for @code{printf}:
@cindex right angle bracket (@code{>}), @code{>} operator (I/O)
@cindex operators, input/output
@item print @var{items} > @var{output-file}
-This type of redirection prints the items into the output file named
+This redirection prints the items into the output file named
@var{output-file}. The @value{FN} @var{output-file} can be any
expression. Its value is changed to a string and then used as a
@value{FN} (@pxref{Expressions}).
@@ -6989,13 +7031,13 @@ file named @file{name-list}, and a list of phone numbers to another file
named @file{phone-list}:
@example
-$ awk '@{ print $2 > "phone-list"
-> print $1 > "name-list" @}' BBS-list
-$ cat phone-list
+$ @kbd{awk '@{ print $2 > "phone-list"}
+> @kbd{print $1 > "name-list" @}' BBS-list}
+$ @kbd{cat phone-list}
@print{} 555-5553
@print{} 555-3412
@dots{}
-$ cat name-list
+$ @kbd{cat name-list}
@print{} aardvark
@print{} alpo-net
@dots{}
@@ -7007,7 +7049,7 @@ Each output file contains one name or number per line.
@cindex @code{>} (right angle bracket), @code{>>} operator (I/O)
@cindex right angle bracket (@code{>}), @code{>>} operator (I/O)
@item print @var{items} >> @var{output-file}
-This type of redirection prints the items into the pre-existing output file
+This redirection prints the items into the pre-existing output file
named @var{output-file}. The difference between this and the
single-@samp{>} redirection is that the old contents (if any) of
@var{output-file} are not erased. Instead, the @command{awk} output is
@@ -7018,8 +7060,8 @@ If @var{output-file} does not exist, then it is created.
@cindex pipes, output
@cindex output, pipes
@item print @var{items} | @var{command}
-It is also possible to send output to another program through a pipe
-instead of into a file. This type of redirection opens a pipe to
+It is possible to send output to another program through a pipe
+instead of into a file. This redirection opens a pipe to
@var{command}, and writes the values of @var{items} through this pipe
to another process created to execute @var{command}.
@@ -7062,7 +7104,7 @@ The message is built using string concatenation and saved in the variable
(The parentheses group the items to concatenate---see
@ref{Concatenation}.)
-The @code{close} function is called here because it's a good idea to close
+The @code{close()} function is called here because it's a good idea to close
the pipe as soon as all the intended output has been sent to it.
@xref{Close Files And Pipes},
for more information.
@@ -7079,7 +7121,7 @@ every time.
@cindex operators, input/output
@cindex differences in @command{awk} and @command{gawk}, input/output operators
@item print @var{items} |& @var{command}
-This type of redirection prints the items to the input of @var{command}.
+This redirection prints the items to the input of @var{command}.
The difference between this and the
single-@samp{|} redirection is that the output from @var{command}
can be read with @code{getline}.
@@ -7155,7 +7197,7 @@ all lowercase. The following program is both simple and efficient:
END @{ close("sh") @}
@end example
-The @code{tolower} function returns its argument string with all
+The @code{tolower()} function returns its argument string with all
uppercase characters converted to lowercase
(@pxref{String Functions}).
The program builds up a list of command lines,
@@ -7170,8 +7212,8 @@ It then sends the list to the shell for execution.
@cindex @command{gawk}, @value{FN}s in
@command{gawk} provides a number of special @value{FN}s that it interprets
-internally. These @value{FN}s provide access to standard file descriptors,
-process-related information, and TCP/IP networking.
+internally. These @value{FN}s provide access to standard file descriptors
+and TCP/IP networking.
@menu
* Special FD:: Special files for I/O.
@@ -7192,7 +7234,7 @@ process-related information, and TCP/IP networking.
Running programs conventionally have three input and output streams
already available to them for reading and writing. These are known as
the @dfn{standard input}, @dfn{standard output}, and @dfn{standard error
-output}. These streams are, by default, connected to your terminal, but
+output}. These streams are, by default, connected to your screen, but
they are often redirected with the shell, via the @samp{<}, @samp{<<},
@samp{>}, @samp{>>}, @samp{>&}, and @samp{|} operators. Standard error
is typically used for writing error messages; the reason there are two separate
@@ -7214,17 +7256,23 @@ standard error stream that it inherits from the @command{awk} process.
This is far from elegant, and it is also inefficient, because it requires a
separate process. So people writing @command{awk} programs often
don't do this. Instead, they send the error messages to the
-terminal, like this:
+screen, like this:
@example
print "Serious error detected!" > "/dev/tty"
@end example
@noindent
+(@file{/dev/tty} is a special file supplied by the operating system
+that is connected to your keyboard and screen. It represents the
+``terminal,''@footnote{The ``tty'' in @file{/dev/tty} stands for
+``Teletype,'' a serial terminal.} which on modern systems is a keyboard
+and screen, not a serial console.)
This usually has the same effect but not always: although the
-standard error stream is usually the terminal, it can be redirected; when
-that happens, writing to the terminal is not correct. In fact, if
-@command{awk} is run from a background job, it may not have a terminal at all.
+standard error stream is usually the screen, it can be redirected; when
+that happens, writing to the screen is not correct. In fact, if
+@command{awk} is run from a background job, it may not have a
+terminal at all.
Then opening @file{/dev/tty} fails.
@command{gawk} provides special @value{FN}s for accessing the three standard
@@ -7275,10 +7323,14 @@ It is a common error to omit the quotes, which leads
to confusing results.
@c Exercise: What does it do? :-)
-Finally, usng the @code{close} function on a @value{FN} of the
+Finally, usng the @code{close()} function on a @value{FN} of the
form @code{"/dev/fd/@var{N}"}, for file descriptor numbers
above two, will actually close the given file descriptor.
+The @file{/dev/stdin}, @file{/dev/stdout}, and @file{/dev/stderr}
+special files are also recognized internally by several other
+versions of @command{awk}.
+
@node Special Network
@subsection Special Files for Network Communications
@cindex networks, support for
@@ -7317,35 +7369,9 @@ special @value{FN}s that @command{gawk} provides:
Recognition of these special @value{FN}s is disabled if @command{gawk} is in
compatibility mode (@pxref{Options}).
-@c @cindex automatic warnings
-@c @cindex warnings, automatic
-@cindex @code{PROCINFO} array
-@item
-@ifnottex
-The
-@end ifnottex
-@ifnotinfo
-As mentioned earlier, the
-@end ifnotinfo
-special files that provide process-related information are now considered
-obsolete and will disappear entirely
-in the next release of @command{gawk}.
-@command{gawk} prints a warning message every time you use one of
-these files.
-@ifnottex
-To obtain process-related information, use the @code{PROCINFO} array.
-@xref{Built-in Variables}.
-@end ifnottex
-
@item
-Starting with @value{PVERSION} 3.1, @command{gawk} @emph{always}
-interprets these special @value{FN}s.@footnote{Older versions of
-@command{gawk} would interpret these names internally only if the system
-did not actually have a @file{/dev/fd} directory or any of the other
-special files listed earlier. Usually this didn't make a difference,
-but sometimes it did; thus, it was decided to make @command{gawk}'s
-behavior consistent on all systems and to have it always interpret
-the special @value{FN}s itself.}
+@command{gawk} @emph{always}
+interprets these special @value{FN}s.
For example, using @samp{/dev/fd/4}
for output actually writes on file descriptor 4, and not on a new
file descriptor that is @code{dup}'ed from file descriptor 4. Most of
@@ -7376,15 +7402,15 @@ At that time, the first record of input is read from that file or command.
The next time the same file or command is used with @code{getline},
another record is read from it, and so on.
-Similarly, when a file or pipe is opened for output, the @value{FN} or
-command associated with it is remembered by @command{awk}, and subsequent
+Similarly, when a file or pipe is opened for output, @command{awk} remembers
+the @value{FN} or command associated with it, and subsequent
writes to the same file or command are appended to the previous writes.
The file or pipe stays open until @command{awk} exits.
-@cindex @code{close} function
+@cindex @code{close()} function
This implies that special steps are necessary in order to read the same
file again from the beginning, or to rerun a shell command (rather than
-reading more output from the same command). The @code{close} function
+reading more output from the same command). The @code{close()} function
makes these things possible:
@example
@@ -7464,14 +7490,14 @@ program closes the pipe after each line of output, then each line makes
a separate message.
@end itemize
-@cindex differences in @command{awk} and @command{gawk}, @code{close} function
-@cindex portability, @code{close} function and
+@cindex differences in @command{awk} and @command{gawk}, @code{close()} function
+@cindex portability, @code{close()} function and
If you use more files than the system allows you to have open,
@command{gawk} attempts to multiplex the available open files among
your @value{DF}s. @command{gawk}'s ability to do this depends upon the
facilities of your operating system, so it may not always work. It is
therefore both good practice and good portability advice to always
-use @code{close} on your files when you are done with them.
+use @code{close()} on your files when you are done with them.
In fact, if you are using a lot of pipes, it is essential that
you close commands when done. For example, consider something like this:
@@ -7487,7 +7513,7 @@ you close commands when done. For example, consider something like this:
@end example
This example creates a new pipeline based on data in @emph{each} record.
-Without the call to @code{close} indicated in the comment, @command{awk}
+Without the call to @code{close()} indicated in the comment, @command{awk}
creates child processes to run the commands, until it eventually
runs out of file descriptors for more pipelines.
@@ -7498,10 +7524,10 @@ The finished child is called a ``zombie,'' and cleaning up after
it is referred to as ``reaping.''}
@c Good old UNIX: give the marketing guys fits, that's the ticket
more importantly, the file descriptor for the pipe
-is not closed and released until @code{close} is called or
+is not closed and released until @code{close()} is called or
@command{awk} exits.
-@code{close} will silently do nothing if given an argument that
+@code{close()} will silently do nothing if given an argument that
does not represent a file, pipe or coprocess that was opened with
a redirection.
@@ -7515,8 +7541,8 @@ does nothing.
When using the @samp{|&} operator to communicate with a coprocess,
it is occasionally useful to be able to close one end of the two-way
pipe without closing the other.
-This is done by supplying a second argument to @code{close}.
-As in any other call to @code{close},
+This is done by supplying a second argument to @code{close()}.
+As in any other call to @code{close()},
the first argument is the name of the command or special file used
to start the coprocess.
The second argument should be a string, with either of the values
@@ -7527,26 +7553,26 @@ delayed until
which discusses it in more detail and gives an example.
@c fakenode --- for prepinfo
-@subheading Advanced Notes: Using @code{close}'s Return Value
-@cindex advanced features, @code{close} function
-@cindex dark corner, @code{close} function
-@cindex @code{close} function, return values
-@cindex return values@comma{} @code{close} function
-@cindex differences in @command{awk} and @command{gawk}, @code{close} function
-@cindex Unix @command{awk}, @code{close} function and
-
-In many versions of Unix @command{awk}, the @code{close} function
+@subheading Advanced Notes: Using @code{close()}'s Return Value
+@cindex advanced features, @code{close()} function
+@cindex dark corner, @code{close()} function
+@cindex @code{close()} function, return values
+@cindex return values@comma{} @code{close()} function
+@cindex differences in @command{awk} and @command{gawk}, @code{close()} function
+@cindex Unix @command{awk}, @code{close()} function and
+
+In many versions of Unix @command{awk}, the @code{close()} function
is actually a statement. It is a syntax error to try and use the return
-value from @code{close}:
+value from @code{close()}:
@value{DARKCORNER}
@example
command = "@dots{}"
command | getline info
-retval = close(command) # syntax error in most Unix awks
+retval = close(command) # syntax error in many Unix awks
@end example
-@command{gawk} treats @code{close} as a function.
+@command{gawk} treats @code{close()} as a function.
The return value is @minus{}1 if the argument names something
that was never opened with a redirection, or if there is
a system problem closing the file or process.
@@ -7556,16 +7582,16 @@ In these cases, @command{gawk} sets the built-in variable
In @command{gawk},
when closing a pipe or coprocess (input or output),
the return value is the exit status of the command.@footnote{
-This is a full 16-bit value as returned by the @code{wait}
+This is a full 16-bit value as returned by the @code{wait()}
system call. See the system manual pages for information on
how to decode this value.}
-Otherwise, it is the return value from the system's @code{close} or
-@code{fclose} C functions when closing input or output
+Otherwise, it is the return value from the system's @code{close()} or
+@code{fclose()} C functions when closing input or output
files, respectively.
This value is zero if the close succeeds, or @minus{}1 if
it fails.
-The POSIX standard is very vague; it says that @code{close}
+The POSIX standard is very vague; it says that @code{close()}
returns zero on success and non-zero otherwise. In general,
different implementations vary in what they report when closing
pipes; thus the return value cannot be used portably.
@@ -7731,7 +7757,7 @@ programs.
command-line option;
@pxref{Nondecimal Data}.)
If you have octal or hexadecimal data,
-you can use the @code{strtonum} function
+you can use the @code{strtonum()} function
(@pxref{String Functions})
to convert the data into a number.
Most of the time, you will want to use octal or hexadecimal constants
@@ -7854,15 +7880,15 @@ POSIX specification.
@cindex differences in @command{awk} and @command{gawk}, regexp constants
@cindex dark corner, regexp constants, as arguments to user-defined functions
-@cindex @code{gensub} function (@command{gawk})
-@cindex @code{sub} function
-@cindex @code{gsub} function
+@cindex @code{gensub()} function (@command{gawk})
+@cindex @code{sub()} function
+@cindex @code{gsub()} function
Constant regular expressions are also used as the first argument for
-the @code{gensub}, @code{sub}, and @code{gsub} functions, and as the
-second argument of the @code{match} function
+the @code{gensub()}, @code{sub()}, and @code{gsub()} functions, and as the
+second argument of the @code{match()} function
(@pxref{String Functions}).
Modern implementations of @command{awk}, including @command{gawk}, allow
-the third argument of @code{split} to be a regexp constant, but some
+the third argument of @code{split()} to be a regexp constant, but some
older implementations do not.
@value{DARKCORNER}
This can lead to confusion when attempting to use regexp constants
@@ -7892,7 +7918,7 @@ function mysub(pat, repl, str, global)
@c @cindex warnings, automatic
In this example, the programmer wants to pass a regexp constant to the
user-defined function @code{mysub}, which in turn passes it on to
-either @code{sub} or @code{gsub}. However, what really happens is that
+either @code{sub()} or @code{gsub()}. However, what really happens is that
the @code{pat} parameter is either one or zero, depending upon whether
or not @code{$0} matches @code{/hi/}.
@command{gawk} issues a warning when it sees a regexp constant used as
@@ -8054,7 +8080,7 @@ Strings that can't be interpreted as valid numbers convert to zero.
@cindex @code{CONVFMT} variable
The exact manner in which numbers are converted into strings is controlled
by the @command{awk} built-in variable @code{CONVFMT} (@pxref{Built-in Variables}).
-Numbers are converted using the @code{sprintf} function
+Numbers are converted using the @code{sprintf()} function
with @code{CONVFMT} as the format
specifier
(@pxref{String Functions}).
@@ -8070,7 +8096,7 @@ most of the time.@footnote{Pathological cases can require up to
@cindex dark corner, @code{CONVFMT} variable
Strange results can occur if you set @code{CONVFMT} to a string that doesn't
-tell @code{sprintf} how to format floating-point numbers in a useful way.
+tell @code{sprintf()} how to format floating-point numbers in a useful way.
For example, if you forget the @samp{%} in the format, @command{awk} converts
all numbers to the same constant string.
As a special case, if a number is an integer, then the result of converting
@@ -8162,7 +8188,7 @@ features have not been described yet.
@item @samp{%'g} @tab Use locale @tab Use locale
@item @samp{%g} @tab Use period @tab Use locale
@item Input @tab Use period @tab Use locale
-@item @code{strtonum} @tab Use period @tab Use locale
+@item @code{strtonum()} @tab Use period @tab Use locale
@end multitable
@end float
@@ -8589,8 +8615,8 @@ BEGIN @{
@cindex assignment operators, evaluation order
@noindent
The indices of @code{bar} are practically guaranteed to be different, because
-@code{rand} returns different values each time it is called.
-(Arrays and the @code{rand} function haven't been covered yet.
+@code{rand()} returns different values each time it is called.
+(Arrays and the @code{rand()} function haven't been covered yet.
@xref{Arrays},
and see @ref{Numeric Functions}, for more information).
This example illustrates an important fact about assignment
@@ -8924,7 +8950,7 @@ attribute.
@item
Fields, @code{getline} input, @code{FILENAME}, @code{ARGV} elements,
@code{ENVIRON} elements, and the
-elements of an array created by @code{split} and @code{match} that are numeric strings
+elements of an array created by @code{split()} and @code{match()} that are numeric strings
have the @var{strnum} attribute. Otherwise, they have the @var{string}
attribute.
Uninitialized variables also have the @var{strnum} attribute.
@@ -9425,11 +9451,11 @@ If @option{--posix} is specified
A @dfn{function} is a name for a particular calculation.
This enables you to
ask for it by name at any point in the program. For
-example, the function @code{sqrt} computes the square root of a number.
+example, the function @code{sqrt()} computes the square root of a number.
@cindex functions, built-in
A fixed set of functions are @dfn{built-in}, which means they are
-available in every @command{awk} program. The @code{sqrt} function is one
+available in every @command{awk} program. The @code{sqrt()} function is one
of these. @xref{Built-in}, for a list of built-in
functions and their descriptions. In addition, you can define
functions for use in your program.
@@ -9461,7 +9487,7 @@ a variable with an expression inside parentheses.
With built-in functions, space before the parenthesis is harmless, but
it is best not to get into the habit of using space to avoid mistakes
with user-defined functions. Each function expects a particular number
-of arguments. For example, the @code{sqrt} function must be called with
+of arguments. For example, the @code{sqrt()} function must be called with
a single argument, the number of which to take the square root:
@example
@@ -10078,7 +10104,7 @@ using library functions.
@xref{Library Functions},
for a number of useful library functions.
-If an @command{awk} program has only a @code{BEGIN} rule and no
+If an @command{awk} program has only @code{BEGIN} rules and no
other rules, then the program exits after the @code{BEGIN} rule is
run.@footnote{The original version of @command{awk} used to keep
reading and ignoring input until the end of the file was seen.} However, if an
@@ -10733,14 +10759,8 @@ used outside the body of a loop. However, although it was never documented,
historical implementations of @command{awk} treated the @code{break}
statement outside of a loop as if it were a @code{next} statement
(@pxref{Next Statement}).
-Recent versions of Unix @command{awk} no longer allow this usage.
-@command{gawk} supports this use of @code{break} only
-if @option{--traditional}
-has been specified on the command line
-(@pxref{Options}).
-Otherwise, it is treated as an error, since the POSIX standard
-specifies that @code{break} should only be used inside the body of a
-loop.
+Recent versions of Unix @command{awk} no longer allow this usage,
+nor does @command{gawk}.
@value{DARKCORNER}
@node Continue Statement
@@ -10803,11 +10823,8 @@ statement outside a loop the same way they treated a @code{break}
statement outside a loop: as if it were a @code{next}
statement
(@pxref{Next Statement}).
-Recent versions of Unix @command{awk} no longer work this way, and
-@command{gawk} allows it only if @option{--traditional} is specified on
-the command line (@pxref{Options}). Just like the
-@code{break} statement, the POSIX standard specifies that @code{continue}
-should only be used inside the body of a loop.
+Recent versions of Unix @command{awk} no longer work this way, nor
+does @command{gawk}.
@value{DARKCORNER}
@node Next Statement
@@ -10908,7 +10925,7 @@ has to continue scanning the unwanted records. The @code{nextfile}
statement accomplishes this much more efficiently.
While one might think that @samp{close(FILENAME)} would accomplish
-the same as @code{nextfile}, this isn't true. @code{close} is
+the same as @code{nextfile}, this isn't true. @code{close()} is
reserved for closing files, pipes, and coprocesses that are
opened with redirections. It is not related to the main processing that
@command{awk} does with the files listed in @code{ARGV}.
@@ -11092,7 +11109,7 @@ it is not special.
This string controls conversion of numbers to
strings (@pxref{Conversion}).
It works by being passed, in effect, as the first argument to the
-@code{sprintf} function
+@code{sprintf()} function
(@pxref{String Functions}).
Its default value is @code{"%.6g"}.
@code{CONVFMT} was introduced by the POSIX standard.
@@ -11173,8 +11190,8 @@ is to simply say @samp{FS = FS}, perhaps with an explanatory comment.
@item IGNORECASE #
If @code{IGNORECASE} is nonzero or non-null, then all string comparisons
and all regular expression matching are case independent. Thus, regexp
-matching with @samp{~} and @samp{!~}, as well as the @code{gensub},
-@code{gsub}, @code{index}, @code{match}, @code{split}, and @code{sub}
+matching with @samp{~} and @samp{!~}, as well as the @code{gensub()},
+@code{gsub()}, @code{index()}, @code{match()}, @code{split()}, and @code{sub()}
functions, record termination with @code{RS}, and field splitting with
@code{FS}, all ignore case when doing their particular regexp operations.
However, the value of @code{IGNORECASE} does @emph{not} affect array subscripting
@@ -11218,13 +11235,13 @@ of @command{awk} being executed.
This string controls conversion of numbers to
strings (@pxref{Conversion}) for
printing with the @code{print} statement. It works by being passed
-as the first argument to the @code{sprintf} function
+as the first argument to the @code{sprintf()} function
(@pxref{String Functions}).
Its default value is @code{"%.6g"}. Earlier versions of @command{awk}
also used @code{OFMT} to specify the format for converting numbers to
strings in general expressions; this is now done by @code{CONVFMT}.
-@cindex @code{sprintf} function, @code{OFMT} variable and
+@cindex @code{sprintf()} function, @code{OFMT} variable and
@cindex @code{print} statement, @code{OFMT} variable and
@cindex @code{OFS} variable
@cindex separators, field
@@ -11277,7 +11294,7 @@ really accesses @code{foo["A\034B"]}
This variable is used for internationalization of programs at the
@command{awk} level. It sets the default text domain for specially
marked string constants in the source text, as well as for the
-@code{dcgettext}, @code{dcngettext} and @code{bindtextdomain} functions
+@code{dcgettext()}, @code{dcngettext()} and @code{bindtextdomain()} functions
(@pxref{Internationalization}).
The default value of @code{TEXTDOMAIN} is @code{"messages"}.
@@ -11377,7 +11394,7 @@ indices are the environment variable names; the elements are the values of
the particular environment variables. For example,
@code{ENVIRON["HOME"]} might be @file{/home/arnold}. Changing this array
does not affect the environment passed on to any programs that
-@command{awk} may spawn via redirection or the @code{system} function.
+@command{awk} may spawn via redirection or the @code{system()} function.
@c (In a future version of @command{gawk}, it may do so.)
Some operating systems may not have environment variables.
@@ -11390,11 +11407,10 @@ On such systems, the @code{ENVIRON} array is empty (except for
@cindex error handling, @code{ERRNO} variable and
@item ERRNO #
If a system error occurs during a redirection for @code{getline},
-during a read for @code{getline}, or during a @code{close} operation,
+during a read for @code{getline}, or during a @code{close()} operation,
then @code{ERRNO} contains a string describing the error.
-@strong{FIXME:} Get the version right.
-Starting with @value{PVERSION} 3.X, @command{gawk} clears @code{ERRNO}
+Starting with @value{PVERSION} 4.0, @command{gawk} clears @code{ERRNO}
before opening each command line input file. This enables checking if
the file is readable inside a @code{BEGINFILE} pattern (@pxref{BEGINFILE/ENDFILE}).
@@ -11504,7 +11520,7 @@ The value of the @code{getuid} system call.
@item PROCINFO["version"]
The version of @command{gawk}. This is available from
-version 3.1.4 and later.
+@value{PVERSION} 3.1.4 and later.
@end table
On some systems, there may be elements in the array, @code{"group1"}
@@ -11522,17 +11538,17 @@ it is not special.
@cindex @code{RLENGTH} variable
@item RLENGTH
The length of the substring matched by the
-@code{match} function
+@code{match()} function
(@pxref{String Functions}).
-@code{RLENGTH} is set by invoking the @code{match} function. Its value
+@code{RLENGTH} is set by invoking the @code{match()} function. Its value
is the length of the matched string, or @minus{}1 if no match is found.
@cindex @code{RSTART} variable
@item RSTART
The start-index in characters of the substring that is matched by the
-@code{match} function
+@code{match()} function
(@pxref{String Functions}).
-@code{RSTART} is set by invoking the @code{match} function. Its value
+@code{RSTART} is set by invoking the @code{match()} function. Its value
is the position of the string where the matched substring starts, or zero
if no match was found.
@@ -11742,6 +11758,7 @@ same @command{awk} program.
* Multi-dimensional:: Emulating multidimensional arrays in
@command{awk}.
* Array Sorting:: Sorting array values and indices.
+* Arrays of Arrays:: True multidimensional arrays.
@end menu
@node Array Basics
@@ -11766,7 +11783,7 @@ an array.
@cindex Wall, Larry
@quotation
-@i{Doing linear scans over an associateive array is like tryinng to club someone
+@i{Doing linear scans over an associative array is like tryinng to club someone
to death with a loaded Uzi.}@*
Larry Wall
@end quotation
@@ -11910,7 +11927,7 @@ automatically converts it to a string.
The value of @code{IGNORECASE} has no effect upon array subscripting.
The identical string value used to store an array element must be used
to retrieve it.
-When @command{awk} creates an array (e.g., with the @code{split}
+When @command{awk} creates an array (e.g., with the @code{split()}
built-in function),
that array's indices are consecutive integers starting at one.
(@xref{String Functions}.)
@@ -12102,7 +12119,7 @@ find all the distinct words that appear in the input. It prints each
word that is more than 10 characters long and also prints the number of
such words.
@xref{String Functions},
-for more information on the built-in function @code{length}.
+for more information on the built-in function @code{length()}.
@example
# Record a 1 for each word that is used at least once
@@ -12218,8 +12235,8 @@ out an array:@footnote{Thanks to Michael Brennan for pointing this out.}
split("", array)
@end example
-@cindex @code{split} function, array elements@comma{} deleting
-The @code{split} function
+@cindex @code{split()} function, array elements@comma{} deleting
+The @code{split()} function
(@pxref{String Functions})
clears out the target array first. This call asks it to split
apart the null string. Because there is no data to split out, the
@@ -12474,7 +12491,7 @@ However, if your program has an array that is always accessed as
multidimensional, you can get the effect of scanning it by combining
the scanning @code{for} statement
(@pxref{Scanning an Array}) with the
-built-in @code{split} function
+built-in @code{split()} function
(@pxref{String Functions}).
It works in the following manner:
@@ -12497,7 +12514,7 @@ an element with index @code{"1\034foo"} exists in @code{array}. (Recall
that the default value of @code{SUBSEP} is the character with code 034.)
Sooner or later, the @code{for} statement finds that index and does an
iteration with the variable @code{combined} set to @code{"1\034foo"}.
-Then the @code{split} function is called as follows:
+Then the @code{split()} function is called as follows:
@example
split("1\034foo", separate, "\034")
@@ -12512,8 +12529,8 @@ separate indices is recovered.
@section Sorting Array Values and Indices with @command{gawk}
@cindex arrays, sorting
-@cindex @code{asort} function (@command{gawk})
-@cindex @code{asort} function (@command{gawk}), arrays@comma{} sorting
+@cindex @code{asort()} function (@command{gawk})
+@cindex @code{asort()} function (@command{gawk}), arrays@comma{} sorting
@cindex sort function, arrays, sorting
The order in which an array is scanned with a @samp{for (i in array)}
loop is essentially arbitrary.
@@ -12521,8 +12538,8 @@ In most @command{awk} implementations, sorting an array requires
writing a @code{sort} function.
While this can be educational for exploring different sorting algorithms,
usually that's not the point of the program.
-@command{gawk} provides the built-in @code{asort}
-and @code{asorti} functions
+@command{gawk} provides the built-in @code{asort()}
+and @code{asorti()} functions
(@pxref{String Functions})
for sorting arrays. For example:
@@ -12533,18 +12550,18 @@ for (i = 1; i <= n; i++)
@var{do something with} data[i]
@end example
-After the call to @code{asort}, the array @code{data} is indexed from 1
+After the call to @code{asort()}, the array @code{data} is indexed from 1
to some number @var{n}, the total number of elements in @code{data}.
-(This count is @code{asort}'s return value.)
+(This count is @code{asort()}'s return value.)
@code{data[1]} @value{LEQ} @code{data[2]} @value{LEQ} @code{data[3]}, and so on.
The comparison of array elements is done
using @command{gawk}'s usual comparison rules
(@pxref{Typing and Comparison}).
-@cindex side effects, @code{asort} function
-An important side effect of calling @code{asort} is that
+@cindex side effects, @code{asort()} function
+An important side effect of calling @code{asort()} is that
@emph{the array's original indices are irrevocably lost}.
-As this isn't always desirable, @code{asort} accepts a
+As this isn't always desirable, @code{asort()} accepts a
second argument:
@example
@@ -12561,8 +12578,8 @@ However, the @code{source} array is not affected.
Often, what's needed is to sort on the values of the @emph{indices}
instead of the values of the elements.
To do that, starting with @command{gawk} 3.1.2, use the
-@code{asorti} function. The interface is identical to that of
-@code{asort}, except that the index values are used for sorting, and
+@code{asorti()} function. The interface is identical to that of
+@code{asort()}, except that the index values are used for sorting, and
become the values of the result array:
@example
@@ -12579,7 +12596,7 @@ END @{
@end example
If your version of @command{gawk} is 3.1.0 or 3.1.1, you don't
-have @code{asorti}. Instead, use a helper array
+have @code{asorti()}. Instead, use a helper array
to hold the sorted index values, and then access the original array's
elements. It works in the following way:
@@ -12606,7 +12623,7 @@ To traverse the elements in decreasing order, use a loop that goes from
@cindex reference counting, sorting arrays
Copying array indices and elements isn't expensive in terms of memory.
Internally, @command{gawk} maintains @dfn{reference counts} to data.
-For example, when @code{asort} copies the first array to the second one,
+For example, when @code{asort()} copies the first array to the second one,
there is only one copy of the original array elements' data, even though
both arrays use the values. Similarly, when copying the indices from
@code{data} to @code{ind}, there is only one copy of the actual index
@@ -12618,10 +12635,144 @@ strings.
We said previously that comparisons are done using @command{gawk}'s
``usual comparison rules.'' Because @code{IGNORECASE} affects
string comparisons, the value of @code{IGNORECASE} also
-affects sorting for both @code{asort} and @code{asorti}.
+affects sorting for both @code{asort()} and @code{asorti()}.
Note also that the locale's sorting order does @emph{not}
come into play; comparisons are based on character values only.
Caveat Emptor.
+
+@node Arrays of Arrays
+@section Arrays of Arrays
+
+@command{gawk} supports arrays of
+arrays. Elements of a subarray are referred to by their own indices
+enclosed in square brackets, just like the elements of the main array.
+For example, the following creates a two-element subarray at index @samp{1}
+of the main array @code{a}:
+
+@example
+a[1][1] = 1
+a[1][2] = 2
+@end example
+
+This simulates a true two-dimensional array. Each subarray element can
+contain another subarray as a value, which in turn can hold other arrays
+as well. In this way, you can create arrays of three or more dimensions.
+The indices can be any @command{awk} expression, including scalars
+seperated by commas (that is, a regular @command{awk} simulated
+multidimensional subscript). So the following is valid in
+@command{gawk}:
+
+@example
+a[1][3][1, "name"] = "barney"
+@end example
+
+Each subarray and the main array can be of different length. In fact, the
+elements of an array or its subarray do not all have to have the same
+type. This means that the main array and any of its subarrays can be
+non-rectangular, or jagged in structure. One can assign a scalar value to
+the index @samp{4} of the main array @code{a}:
+
+@example
+a[4] = "An element in a jagged array"
+@end example
+
+The terms @dfn{dimension}, @dfn{row} and @dfn{column} are
+meaningless when applied
+to such an array, but we will use ``dimension'' henceforth to imply the
+maximum number of indices needed to refer to an existing element. The
+type of any element that has already been assigned cannot be changed
+by assigning a value of a different type. You have to first delete the
+current element, which effectively makes @command{gawk} forget about
+the element at that index:
+
+@example
+delete a[4]
+a[4][5][6][7] = "An element in a four-dimensional array"
+@end example
+
+@noindent
+This removes the scalar value from index @samp{4} and then inserts a
+subarray of subarray of subarray containing a scalar. You can also
+delete an entire subarray or subarray of subarrays:
+
+@example
+delete a[4][5]
+a[4][5] = "An element in subarray a[4]"
+@end example
+
+But recall that you can not delete the main array @code{a} and then use it
+as a scalar.
+
+The built-in functions which take array arguments can also be used
+with subarrays. For example, the following code fragment uses @code{length()}
+to determine the number of elements in the main array @code{a} and
+its subarrays:
+
+@example
+print length(a), length(a[1]), length(a[1][3])
+@end example
+
+@noindent
+This results in the following output for our main array @code{a}:
+
+@example
+2, 3, 1
+@end example
+
+@noindent
+The @samp{@var{subscript} in @var{array}} expression
+(@pxref{Reference to Elements}) works similarly for both
+regular @command{awk}-style
+arrays and arrays of arrays. For example, the tests @samp{1 in a},
+@samp{3 in a[1]}, and @samp{(1, "name") in a[1][3]} all evaluate to
+one (true) for our array @code{a}.
+
+The @samp{for (item in array)} statement (@pxref{Scanning an Array})
+can be nested to scan all the
+elements of an array of arrays if it is rectangular in structure. In order
+to print the contents (scalar values) of a two-dimensional array of arrays
+with each subarray having the same length, you could use the following
+code:
+
+@example
+for (i in array)
+ for (j in array[j])
+ print array[i][j]
+@end example
+
+If the structure of a jagged array of arrays is known in advance,
+you can often devise workarounds using control statements. For example,
+the following code prints the elements of our main array @code{a}:
+
+@example
+for (i in a) @{
+ for (j in a[j]) @{
+ if (j == 3) @{
+ for (k in a[i][j])
+ print a[i][j][k]
+ @} else
+ print a[i][j]
+ @}
+@}
+@end example
+
+Recall that a reference to an uninitialized array element yields a value
+of @code{""}, the null string. This has one important implication when you
+intend to use a subarray as an argument to a function, as illustrated by
+the following example:
+
+@example
+$ @kbd{gawk 'BEGIN @{ split("a b c d", b[1]); print b[1][1] @}'}
+@error{} gawk: cmd. line:1: fatal: split: second argument is not an array
+@end example
+
+The way to work around this is to first force @code{b[1]} to be an array by
+creating an arbitray index:
+
+@example
+$ @kbd{gawk 'BEGIN @{ b[1][1] = ""; split("a b c d", b[1]); print b[1][1] @}'}
+@print{} a
+@end example
@c ENDOFRANGE arrs
@node Functions
@@ -12661,9 +12812,10 @@ but are summarized here for your convenience.
@menu
* Calling Built-in:: How to call built-in functions.
* Numeric Functions:: Functions that work with numbers, including
- @code{int}, @code{sin} and @code{rand}.
+ @code{int()}, @code{sin()} and @code{rand()}.
* String Functions:: Functions for string manipulation, such as
- @code{split}, @code{match} and @code{sprintf}.
+ @code{split()}, @code{match()} and
+ @code{sprintf()}.
* I/O Functions:: Functions for files and shell commands.
* Time Functions:: Functions for dealing with timestamps.
* Bitwise Functions:: Functions for bitwise operations.
@@ -12676,7 +12828,7 @@ but are summarized here for your convenience.
To call one of @command{awk}'s built-in functions, write the name of
the function followed
by arguments in parentheses. For example, @samp{atan2(y + z, 1)}
-is a call to the function @code{atan2} and has two arguments.
+is a call to the function @code{atan2()} and has two arguments.
@cindex programming conventions, functions, calling
@cindex whitespace, functions@comma{} calling
@@ -12709,7 +12861,7 @@ j = sqrt(i++)
@cindex functions, built-in, evaluation order
@cindex built-in functions, evaluation order
@noindent
-the variable @code{i} is incremented to the value five before @code{sqrt}
+the variable @code{i} is incremented to the value five before @code{sqrt()}
is called with a value of four for its actual parameter.
The order of evaluation of the expressions used for the function's
parameters is undefined. Thus, avoid writing programs that
@@ -12722,9 +12874,9 @@ j = atan2(i++, i *= 2)
@end example
If the order of evaluation is left to right, then @code{i} first becomes
-6, and then 12, and @code{atan2} is called with the two arguments 6
+6, and then 12, and @code{atan2()} is called with the two arguments 6
and 12. But if the order of evaluation is right to left, @code{i}
-first becomes 10, then 11, and @code{atan2} is called with the
+first becomes 10, then 11, and @code{atan2()} is called with the
two arguments 11 and 10.
@node Numeric Functions
@@ -12736,7 +12888,7 @@ Optional parameters are enclosed in square brackets@w{ ([ ]):}
@table @code
@item int(@var{x})
-@cindex @code{int} function
+@cindex @code{int()} function
This returns the nearest integer to @var{x}, located between @var{x} and zero and
truncated toward zero.
@@ -12744,45 +12896,45 @@ For example, @code{int(3)} is 3, @code{int(3.9)} is 3, @code{int(-3.9)}
is @minus{}3, and @code{int(-3)} is @minus{}3 as well.
@item sqrt(@var{x})
-@cindex @code{sqrt} function
+@cindex @code{sqrt()} function
This returns the positive square root of @var{x}.
@command{gawk} reports an error
if @var{x} is negative. Thus, @code{sqrt(4)} is 2.
@item exp(@var{x})
-@cindex @code{exp} function
+@cindex @code{exp()} function
This returns the exponential of @var{x} (@code{e ^ @var{x}}) or reports
an error if @var{x} is out of range. The range of values @var{x} can have
depends on your machine's floating-point representation.
@item log(@var{x})
-@cindex @code{log} function
+@cindex @code{log()} function
This returns the natural logarithm of @var{x}, if @var{x} is positive;
otherwise, it reports an error.
@item sin(@var{x})
-@cindex @code{sin} function
+@cindex @code{sin()} function
This returns the sine of @var{x}, with @var{x} in radians.
@item cos(@var{x})
-@cindex @code{cos} function
+@cindex @code{cos()} function
This returns the cosine of @var{x}, with @var{x} in radians.
@item atan2(@var{y}, @var{x})
-@cindex @code{atan2} function
+@cindex @code{atan2()} function
This returns the arctangent of @code{@var{y} / @var{x}} in radians.
@item rand()
-@cindex @code{rand} function
-@cindex random numbers, @code{rand}/@code{srand} functions
-This returns a random number. The values of @code{rand} are
+@cindex @code{rand()} function
+@cindex random numbers, @code{rand()}/@code{srand()} functions
+This returns a random number. The values of @code{rand()} are
uniformly distributed between zero and one.
-The value could be zero but is never one.@footnote{The C version of @code{rand}
+The value could be zero but is never one.@footnote{The C version of @code{rand()}
is known to produce fairly poor sequences of random numbers.
However, nothing requires that an @command{awk} implementation use the C
-@code{rand} to implement the @command{awk} version of @code{rand}.
+@code{rand()} to implement the @command{awk} version of @code{rand()}.
In fact, @command{gawk} uses the BSD @code{random} function, which is
-considerably better than @code{rand}, to produce random numbers.}
+considerably better than @code{rand()}, to produce random numbers.}
Often random integers are needed instead. Following is a user-defined function
that can be used to obtain a random non-negative integer less than @var{n}:
@@ -12795,7 +12947,7 @@ function randint(n) @{
@noindent
The multiplication produces a random number greater than zero and less
-than @code{n}. Using @code{int}, this result is made into
+than @code{n}. Using @code{int()}, this result is made into
an integer between zero and @code{n} @minus{} 1, inclusive.
The following example uses a similar function to produce random integers
@@ -12818,18 +12970,18 @@ function roll(n) @{ return 1 + int(rand() * n) @}
@cindex random numbers, seed of
@c MAWK uses a different seed each time.
@strong{Caution:} In most @command{awk} implementations, including @command{gawk},
-@code{rand} starts generating numbers from the same
+@code{rand()} starts generating numbers from the same
starting number, or @dfn{seed}, each time you run @command{awk}. Thus,
a program generates the same results each time you run it.
The numbers are random within one @command{awk} run but predictable
from run to run. This is convenient for debugging, but if you want
a program to do different things each time it is used, you must change
the seed to a value that is different in each run. To do this,
-use @code{srand}.
+use @code{srand()}.
@item srand(@r{[}@var{x}@r{]})
-@cindex @code{srand} function
-The function @code{srand} sets the starting point, or seed,
+@cindex @code{srand()} function
+The function @code{srand()} sets the starting point, or seed,
for generating random numbers to the value @var{x}.
Each seed value leads to a particular sequence of random
@@ -12849,7 +13001,7 @@ If the argument @var{x} is omitted, as in @samp{srand()}, then the current
date and time of day are used for a seed. This is the way to get random
numbers that are truly unpredictable.
-The return value of @code{srand} is the previous seed. This makes it
+The return value of @code{srand()} is the previous seed. This makes it
easy to keep track of the seeds in case you need to consistently reproduce
sequences of random numbers.
@end table
@@ -12865,15 +13017,15 @@ specific to @command{gawk} are marked with a pound sign@w{ (@samp{#}):}
@menu
* Gory Details:: More than you want to know about @samp{\} and
- @samp{&} with @code{sub}, @code{gsub}, and
- @code{gensub}.
+ @samp{&} with @code{sub()}, @code{gsub()}, and
+ @code{gensub()}.
@end menu
@table @code
@item asort(@var{source} @r{[}, @var{dest}@r{]}) #
@cindex arrays, elements, retrieving number of
-@cindex @code{asort} function (@command{gawk})
-@code{asort} is a @command{gawk}-specific extension, returning the number of
+@cindex @code{asort()} function (@command{gawk})
+@code{asort()} is a @command{gawk}-specific extension, returning the number of
elements in the array @var{source}. The contents of @var{source} are
sorted using @command{gawk}'s normal rules for comparing values
(in particular, @code{IGNORECASE} affects the sorting)
@@ -12891,7 +13043,7 @@ a["middle"] = "cul"
@end example
@noindent
-A call to @code{asort}:
+A call to @code{asort()}:
@example
asort(a)
@@ -12906,28 +13058,28 @@ a[2] = "de"
a[3] = "sac"
@end example
-The @code{asort} function is described in more detail in
+The @code{asort()} function is described in more detail in
@ref{Array Sorting}.
-@code{asort} is a @command{gawk} extension; it is not available
+@code{asort()} is a @command{gawk} extension; it is not available
in compatibility mode (@pxref{Options}).
@item asorti(@var{source} @r{[}, @var{dest}@r{]}) #
-@cindex @code{asorti} function (@command{gawk})
-@code{asorti} is a @command{gawk}-specific extension, returning the number of
+@cindex @code{asorti()} function (@command{gawk})
+@code{asorti()} is a @command{gawk}-specific extension, returning the number of
elements in the array @var{source}.
-It works similarly to @code{asort}, however, the @emph{indices}
+It works similarly to @code{asort()}, however, the @emph{indices}
are sorted, instead of the values. As array indices are always strings,
the comparison performed is always a string comparison. (Here too,
@code{IGNORECASE} affects the sorting.)
-The @code{asorti} function is described in more detail in
+The @code{asorti()} function is described in more detail in
@ref{Array Sorting}.
It was added in @command{gawk} 3.1.2.
-@code{asorti} is a @command{gawk} extension; it is not available
+@code{asorti()} is a @command{gawk} extension; it is not available
in compatibility mode (@pxref{Options}).
@item index(@var{in}, @var{find})
-@cindex @code{index} function
+@cindex @code{index()} function
@cindex searching
This searches the string @var{in} for the first occurrence of the string
@var{find}, and returns the position in characters where that occurrence
@@ -12939,11 +13091,11 @@ $ awk 'BEGIN @{ print index("peanut", "an") @}'
@end example
@noindent
-If @var{find} is not found, @code{index} returns zero.
+If @var{find} is not found, @code{index()} returns zero.
(Remember that string indices in @command{awk} start at one.)
@item length(@r{[}@var{string}@r{]})
-@cindex @code{length} function
+@cindex @code{length()} function
This returns the number of characters in @var{string}. If
@var{string} is a number, the length of the digit string representing
that number is returned. For example, @code{length("abcde")} is 5. By
@@ -12951,23 +13103,22 @@ contrast, @code{length(15 * 35)} works out to 3. In this example, 15 * 35 =
525, and 525 is then converted to the string @code{"525"}, which has
three characters.
-If no argument is supplied, @code{length} returns the length of @code{$0}.
+If no argument is supplied, @code{length()} returns the length of @code{$0}.
@c @cindex historical features
-@cindex portability, @code{length} function
-@cindex POSIX @command{awk}, functions and, @code{length}
+@cindex portability, @code{length()} function
+@cindex POSIX @command{awk}, functions and, @code{length()}
@quotation NOTE
-In older versions of @command{awk}, the @code{length} function could
+In older versions of @command{awk}, the @code{length()} function could
be called
-without any parentheses. Doing so is marked as ``deprecated'' in the
-POSIX standard. This means that while a program can do this,
-it is a feature that can eventually be removed from a future
-version of the standard. Therefore, for programs to be maximally portable,
+without any parentheses. Doing so is considered poor practice,
+although the 2008 POSIX standard explicitly allows it, to
+support historical practice. For programs to be maximally portable,
always supply the parentheses.
@end quotation
-@cindex dark corner, @code{length} function
-If @code{length} is called with a variable that has not been used,
+@cindex dark corner, @code{length()} function
+If @code{length()} is called with a variable that has not been used,
@command{gawk} forces the variable to be a scalar. Other
implementations of @command{awk} leave the variable without a type.
@value{DARKCORNER}
@@ -12990,7 +13141,7 @@ warning about this.
@cindex differences between @command{gawk} and @command{awk}
Beginning with @command{gawk} @value{PVERSION} 3.1.5, when supplied an
-array argument, the @code{length} function returns the number of elements
+array argument, the @code{length()} function returns the number of elements
in the array. This is less useful than it might seem at first, as the
array is not guaranteed to be indexed from one to the number of elements
in it.
@@ -13001,8 +13152,8 @@ If @option{--posix} is supplied, using an array argument is a fatal error
(@pxref{Arrays}).
@item match(@var{string}, @var{regexp} @r{[}, @var{array}@r{]})
-@cindex @code{match} function
-The @code{match} function searches @var{string} for the
+@cindex @code{match()} function
+The @code{match()} function searches @var{string} for the
longest, leftmost substring matched by the regular expression,
@var{regexp}. It returns the character position, or @dfn{index},
at which that substring begins (one, if it starts at the beginning of
@@ -13017,14 +13168,14 @@ implications for writing your program correctly.
The order of the first two arguments is backwards from most other string
functions that work with regular expressions, such as
-@code{sub} and @code{gsub}. It might help to remember that
-for @code{match}, the order is the same as for the @samp{~} operator:
+@code{sub()} and @code{gsub()}. It might help to remember that
+for @code{match()}, the order is the same as for the @samp{~} operator:
@samp{@var{string} ~ @var{regexp}}.
-@cindex @code{RSTART} variable, @code{match} function and
-@cindex @code{RLENGTH} variable, @code{match} function and
-@cindex @code{match} function, @code{RSTART}/@code{RLENGTH} variables
-The @code{match} function sets the built-in variable @code{RSTART} to
+@cindex @code{RSTART} variable, @code{match()} function and
+@cindex @code{RLENGTH} variable, @code{match()} function and
+@cindex @code{match()} function, @code{RSTART}/@code{RLENGTH} variables
+The @code{match()} function sets the built-in variable @code{RSTART} to
the index. It also sets the built-in variable @code{RLENGTH} to the
length in characters of the matched substring. If no match is found,
@code{RSTART} is set to zero, and @code{RLENGTH} to @minus{}1.
@@ -13072,7 +13223,7 @@ Match of ru+n found at 12 in My program runs
Match of Melvin found at 1 in Melvin was here.
@end example
-@cindex differences in @command{awk} and @command{gawk}, @code{match} function
+@cindex differences in @command{awk} and @command{gawk}, @code{match()} function
If @var{array} is present, it is cleared, and then the 0th element
of @var{array} is set to the entire portion of @var{string}
matched by @var{regexp}. If @var{regexp} contains parentheses,
@@ -13110,14 +13261,14 @@ subexpressions, since they may not all have matched text; thus they
should be tested for with the @code{in} operator
(@pxref{Reference to Elements}).
-@cindex troubleshooting, @code{match} function
-The @var{array} argument to @code{match} is a
+@cindex troubleshooting, @code{match()} function
+The @var{array} argument to @code{match()} is a
@command{gawk} extension. In compatibility mode
(@pxref{Options}),
using a third argument is a fatal error.
@item patsplit(@var{string}, @var{array} @r{[}, @var{fieldpat} @r{[}, @var{seps} @r{]} @r{]})
-@cindex @code{patsplit} function
+@cindex @code{patsplit()} function
This function divides @var{string} into pieces defined by @var{fieldpat}
and stores the pieces in @var{array} and the separator strings in the
@var{seps} array. The first piece is stored in
@@ -13126,17 +13277,17 @@ forth. The string value of the third argument, @var{fieldpat}, is
a regexp describing the fields in @var{string} (just as @code{FPAT} is
a regexp describing the fields in input records). If
@var{fieldpat} is omitted, the value of @code{FPAT} is used.
-@code{patsplit} returns the number of elements created.
+@code{patsplit()} returns the number of elements created.
@code{@var{seps}[@var{i}]} is
the separator string
between @code{@var{array}[@var{i}]} and @code{@var{array}[@var{i}+1]}.
Any leading separator will be in @code{@var{seps}[0]}.
-The @code{patsplit} function splits strings into pieces in a
+The @code{patsplit()} function splits strings into pieces in a
manner similar to the way input lines are split into fields using @code{FPAT}.
@item split(@var{string}, @var{array} @r{[}, @var{fieldsep} @r{[}, @var{seps} @r{]} @r{]})
-@cindex @code{split} function
+@cindex @code{split()} function
This function divides @var{string} into pieces separated by @var{fieldsep}
and stores the pieces in @var{array} and the separator strings in the
@var{seps} array. The first piece is stored in
@@ -13145,7 +13296,7 @@ forth. The string value of the third argument, @var{fieldsep}, is
a regexp describing where to split @var{string} (much as @code{FS} can
be a regexp describing where to split input records). If
@var{fieldsep} is omitted, the value of @code{FS} is used.
-@code{split} returns the number of elements created.
+@code{split()} returns the number of elements created.
@var{seps} is a @command{gawk} extension with @code{@var{seps}[@var{i}]}
being the separator string
between @code{@var{array}[@var{i}]} and @code{@var{array}[@var{i}+1]}.
@@ -13156,7 +13307,7 @@ whitespace goes into @code{@var{seps}[@var{n}]} where @var{n} is the
return value of
@code{split()} (that is, the number of elements in @var{array}).
-The @code{split} function splits strings into pieces in a
+The @code{split()} function splits strings into pieces in a
manner similar to the way input lines are split into fields. For example:
@example
@@ -13182,9 +13333,9 @@ seps[2] = "-"
@end example
@noindent
-The value returned by this call to @code{split} is three.
+The value returned by this call to @code{split()} is three.
-@cindex differences in @command{awk} and @command{gawk}, @code{split} function
+@cindex differences in @command{awk} and @command{gawk}, @code{split()} function
As with input field-splitting, when the value of @var{fieldsep} is
@w{@code{" "}}, leading and trailing whitespace is ignored in
@var{array} but not in @var{seps}, and the elements
@@ -13193,11 +13344,11 @@ Also as with input field-splitting, if @var{fieldsep} is the null string, each
individual character in the string is split into its own array element.
(This is a @command{gawk}-specific extension.)
-Note, however, that @code{RS} has no effect on the way @code{split}
+Note, however, that @code{RS} has no effect on the way @code{split()}
works. Even though @samp{RS = ""} causes newline to also be an input
-field separator, this does not affect how @code{split} splits strings.
+field separator, this does not affect how @code{split()} splits strings.
-@cindex dark corner, @code{split} function
+@cindex dark corner, @code{split()} function
Modern implementations of @command{awk}, including @command{gawk}, allow
the third argument to be a regexp constant (@code{/abc/}) as well as a
string.
@@ -13207,7 +13358,7 @@ The POSIX standard allows this as well.
discussion of the difference between using a string constant or a regexp constant,
and the implications for writing your program correctly.
-Before splitting the string, @code{split} deletes any previously existing
+Before splitting the string, @code{split()} deletes any previously existing
elements in the arrays @var{array} and @var{seps}.
If @var{string} is null, the array has no elements. (So this is a portable
@@ -13219,7 +13370,7 @@ If @var{string} does not match @var{fieldsep} at all (but is not null),
@var{string}.
@item sprintf(@var{format}, @var{expression1}, @dots{})
-@cindex @code{sprintf} function
+@cindex @code{sprintf()} function
This returns (without printing) the string that @code{printf} would
have printed out with the same arguments
(@pxref{Printf}).
@@ -13232,13 +13383,13 @@ pival = sprintf("pi = %.2f (approx.)", 22/7)
@noindent
assigns the string @w{@code{"pi = 3.14 (approx.)"}} to the variable @code{pival}.
-@cindex differences in @command{awk} and @command{gawk}, @code{strtonum} function (@command{gawk})
-@cindex @code{strtonum} function (@command{gawk})
+@cindex differences in @command{awk} and @command{gawk}, @code{strtonum()} function (@command{gawk})
+@cindex @code{strtonum()} function (@command{gawk})
@item strtonum(@var{str}) #
Examines @var{str} and returns its numeric value. If @var{str}
-begins with a leading @samp{0}, @code{strtonum} assumes that @var{str}
+begins with a leading @samp{0}, @code{strtonum()} assumes that @var{str}
is an octal number. If @var{str} begins with a leading @samp{0x} or
-@samp{0X}, @code{strtonum} assumes that @var{str} is a hexadecimal number.
+@samp{0X}, @code{strtonum()} assumes that @var{str} is a hexadecimal number.
For example:
@example
@@ -13247,22 +13398,22 @@ $ echo 0x11 |
@print{} 17
@end example
-Using the @code{strtonum} function is @emph{not} the same as adding zero
+Using the @code{strtonum()} function is @emph{not} the same as adding zero
to a string value; the automatic coercion of strings to numbers
works only for decimal data, not for octal or hexadecimal.@footnote{Unless
you use the @option{--non-decimal-data} option, which isn't recommended.
@xref{Nondecimal Data}, for more information.}
-Note also that @code{strtonum} uses the current locale's decimal point
+Note also that @code{strtonum()} uses the current locale's decimal point
for recognizing numbers.
-@cindex differences in @command{awk} and @command{gawk}, @code{strtonum} function (@command{gawk})
-@code{strtonum} is a @command{gawk} extension; it is not available
+@cindex differences in @command{awk} and @command{gawk}, @code{strtonum()} function (@command{gawk})
+@code{strtonum()} is a @command{gawk} extension; it is not available
in compatibility mode (@pxref{Options}).
@item sub(@var{regexp}, @var{replacement} @r{[}, @var{target}@r{]})
-@cindex @code{sub} function
-The @code{sub} function alters the value of @var{target}.
+@cindex @code{sub()} function
+The @code{sub()} function alters the value of @var{target}.
It searches this value, which is treated as a string, for the
leftmost, longest substring matched by the regular expression @var{regexp}.
Then the entire string is
@@ -13278,7 +13429,7 @@ implications for writing your program correctly.
This function is peculiar because @var{target} is not simply
used to compute a value, and not just any expression will do---it
-must be a variable, field, or array element so that @code{sub} can
+must be a variable, field, or array element so that @code{sub()} can
store a modified value there. If this argument is omitted, then the
default is to use and alter @code{$0}.@footnote{Note that this means
that the record will first be regenerated using the value of @code{OFS} if
@@ -13296,7 +13447,7 @@ sub(/at/, "ith", str)
sets @code{str} to @w{@code{"wither, water, everywhere"}}, by replacing the
leftmost longest occurrence of @samp{at} with @samp{ith}.
-The @code{sub} function returns the number of substitutions made (either
+The @code{sub()} function returns the number of substitutions made (either
one or zero).
If the special character @samp{&} appears in @var{replacement}, it
@@ -13338,12 +13489,12 @@ an @samp{&}:
@{ sub(/\|/, "\\&"); print @}
@end example
-@cindex @code{sub} function, arguments of
-@cindex @code{gsub} function, arguments of
-As mentioned, the third argument to @code{sub} must
+@cindex @code{sub()} function, arguments of
+@cindex @code{gsub()} function, arguments of
+As mentioned, the third argument to @code{sub()} must
be a variable, field or array reference.
Some versions of @command{awk} allow the third argument to
-be an expression that is not an lvalue. In such a case, @code{sub}
+be an expression that is not an lvalue. In such a case, @code{sub()}
still searches for the pattern and returns zero or one, but the result of
the substitution (if any) is thrown away because there is no place
to put it. Such versions of @command{awk} accept expressions
@@ -13354,7 +13505,7 @@ sub(/USA/, "United States", "the USA and Canada")
@end example
@noindent
-@cindex troubleshooting, @code{gsub}/@code{sub} functions
+@cindex troubleshooting, @code{gsub()}/@code{sub()} functions
For historical compatibility, @command{gawk} accepts erroneous code,
such as in the previous example. However, using any other nonchangeable
object as the third parameter causes a fatal error and your program
@@ -13364,10 +13515,10 @@ Finally, if the @var{regexp} is not a regexp constant, it is converted into a
string, and then the value of that string is treated as the regexp to match.
@item gsub(@var{regexp}, @var{replacement} @r{[}, @var{target}@r{]})
-@cindex @code{gsub} function
-This is similar to the @code{sub} function, except @code{gsub} replaces
+@cindex @code{gsub()} function
+This is similar to the @code{sub()} function, except @code{gsub()} replaces
@emph{all} of the longest, leftmost, @emph{nonoverlapping} matching
-substrings it can find. The @samp{g} in @code{gsub} stands for
+substrings it can find. The @samp{g} in @code{gsub()} stands for
``global,'' which means replace everywhere. For example:
@example
@@ -13378,17 +13529,17 @@ substrings it can find. The @samp{g} in @code{gsub} stands for
replaces all occurrences of the string @samp{Britain} with @samp{United
Kingdom} for all input records.
-The @code{gsub} function returns the number of substitutions made. If
+The @code{gsub()} function returns the number of substitutions made. If
the variable to search and alter (@var{target}) is
omitted, then the entire input record (@code{$0}) is used.
-As in @code{sub}, the characters @samp{&} and @samp{\} are special,
+As in @code{sub()}, the characters @samp{&} and @samp{\} are special,
and the third argument must be assignable.
@item gensub(@var{regexp}, @var{replacement}, @var{how} @r{[}, @var{target}@r{]}) #
-@cindex @code{gensub} function (@command{gawk})
-@code{gensub} is a general substitution function. Like @code{sub} and
-@code{gsub}, it searches the target string @var{target} for matches of
-the regular expression @var{regexp}. Unlike @code{sub} and @code{gsub},
+@cindex @code{gensub()} function (@command{gawk})
+@code{gensub()} is a general substitution function. Like @code{sub()} and
+@code{gsub()}, it searches the target string @var{target} for matches of
+the regular expression @var{regexp}. Unlike @code{sub()} and @code{gsub()},
the modified string is returned as the result of the function and the
original target string is @emph{not} changed. If @var{how} is a string
beginning with @samp{g} or @samp{G}, then it replaces all matches of
@@ -13396,8 +13547,8 @@ beginning with @samp{g} or @samp{G}, then it replaces all matches of
as a number that indicates which match of @var{regexp} to replace. If
no @var{target} is supplied, @code{$0} is used.
-@code{gensub} provides an additional feature that is not available
-in @code{sub} or @code{gsub}: the ability to specify components of a
+@code{gensub()} provides an additional feature that is not available
+in @code{sub()} or @code{gsub()}: the ability to specify components of a
regexp in the replacement text. This is done by using parentheses in
the regexp to mark the components and then specifying @samp{\@var{N}}
in the replacement text, where @var{N} is a digit from 1 to 9.
@@ -13414,7 +13565,7 @@ $ gawk '
@end example
@noindent
-As with @code{sub}, you must type two backslashes in order
+As with @code{sub()}, you must type two backslashes in order
to get one into the string.
In the replacement text, the sequence @samp{\0} represents the entire
matched text, as does the character @samp{&}.
@@ -13429,7 +13580,7 @@ $ echo a b c a b c |
@end example
In this case, @code{$0} is used as the default target string.
-@code{gensub} returns the new string as its result, which is
+@code{gensub()} returns the new string as its result, which is
passed directly to @code{print} for printing.
@c @cindex automatic warnings
@@ -13439,14 +13590,14 @@ If the @var{how} argument is a string that does not begin with @samp{g} or
substitution is performed. If @var{how} is zero, @command{gawk} issues
a warning message.
-If @var{regexp} does not match @var{target}, @code{gensub}'s return value
+If @var{regexp} does not match @var{target}, @code{gensub()}'s return value
is the original unchanged value of @var{target}.
-@code{gensub} is a @command{gawk} extension; it is not available
+@code{gensub()} is a @command{gawk} extension; it is not available
in compatibility mode (@pxref{Options}).
@item substr(@var{string}, @var{start} @r{[}, @var{length}@r{]})
-@cindex @code{substr} function
+@cindex @code{substr()} function
This returns a @var{length}-character-long substring of @var{string},
starting at character number @var{start}. The first character of a
string is character number one.@footnote{This is different from
@@ -13460,17 +13611,17 @@ suffix is also returned
if @var{length} is greater than the number of characters remaining
in the string, counting from character @var{start}.
-If @var{start} is less than one, @code{substr} treats it as
+If @var{start} is less than one, @code{substr()} treats it as
if it was one. (POSIX doesn't specify what to do in this case:
Unix @command{awk} acts this way, and therefore @command{gawk}
does too.)
If @var{start} is greater than the number of characters
-in the string, @code{substr} returns the null string.
+in the string, @code{substr()} returns the null string.
Similarly, if @var{length} is present but less than or equal to zero,
the null string is returned.
-@cindex troubleshooting, @code{substr} function
-The string returned by @code{substr} @emph{cannot} be
+@cindex troubleshooting, @code{substr()} function
+The string returned by @code{substr()} @emph{cannot} be
assigned. Thus, it is a mistake to attempt to change a portion of
a string, as shown in the following example:
@@ -13481,18 +13632,18 @@ substr(string, 3, 3) = "CDE"
@end example
@noindent
-It is also a mistake to use @code{substr} as the third argument
-of @code{sub} or @code{gsub}:
+It is also a mistake to use @code{substr()} as the third argument
+of @code{sub()} or @code{gsub()}:
@example
gsub(/xyz/, "pdq", substr($0, 5, 20)) # WRONG
@end example
-@cindex portability, @code{substr} function
+@cindex portability, @code{substr()} function
(Some commercial versions of @command{awk} do in fact let you use
-@code{substr} this way, but doing so is not portable.)
+@code{substr()} this way, but doing so is not portable.)
-If you need to replace bits and pieces of a string, combine @code{substr}
+If you need to replace bits and pieces of a string, combine @code{substr()}
with string concatenation, in the following manner:
@example
@@ -13504,14 +13655,14 @@ string = substr(string, 1, 2) "CDE" substr(string, 6)
@cindex case sensitivity, converting case
@cindex converting, case
@item tolower(@var{string})
-@cindex @code{tolower} function
+@cindex @code{tolower()} function
This returns a copy of @var{string}, with each uppercase character
in the string replaced with its corresponding lowercase character.
Nonalphabetic characters are left unchanged. For example,
@code{tolower("MiXeD cAsE 123")} returns @code{"mixed case 123"}.
@item toupper(@var{string})
-@cindex @code{toupper} function
+@cindex @code{toupper()} function
This returns a copy of @var{string}, with each lowercase character
in the string replaced with its corresponding uppercase character.
Nonalphabetic characters are left unchanged. For example,
@@ -13519,17 +13670,17 @@ Nonalphabetic characters are left unchanged. For example,
@end table
@node Gory Details
-@subsubsection More About @samp{\} and @samp{&} with @code{sub}, @code{gsub}, and @code{gensub}
-
-@cindex escape processing, @code{gsub}/@code{gensub}/@code{sub} functions
-@cindex @code{sub} function, escape processing
-@cindex @code{gsub} function, escape processing
-@cindex @code{gensub} function (@command{gawk}), escape processing
-@cindex @code{\} (backslash), @code{gsub}/@code{gensub}/@code{sub} functions and
-@cindex backslash (@code{\}), @code{gsub}/@code{gensub}/@code{sub} functions and
-@cindex @code{&} (ampersand), @code{gsub}/@code{gensub}/@code{sub} functions and
-@cindex ampersand (@code{&}), @code{gsub}/@code{gensub}/@code{sub} functions and
-When using @code{sub}, @code{gsub}, or @code{gensub}, and trying to get literal
+@subsubsection More About @samp{\} and @samp{&} with @code{sub()}, @code{gsub()}, and @code{gensub()}
+
+@cindex escape processing, @code{gsub()}/@code{gensub()}/@code{sub()} functions
+@cindex @code{sub()} function, escape processing
+@cindex @code{gsub()} function, escape processing
+@cindex @code{gensub()} function (@command{gawk}), escape processing
+@cindex @code{\} (backslash), @code{gsub()}/@code{gensub()}/@code{sub()} functions and
+@cindex backslash (@code{\}), @code{gsub()}/@code{gensub()}/@code{sub()} functions and
+@cindex @code{&} (ampersand), @code{gsub()}/@code{gensub()}/@code{sub()} functions and
+@cindex ampersand (@code{&}), @code{gsub()}/@code{gensub()}/@code{sub()} functions and
+When using @code{sub()}, @code{gsub()}, or @code{gensub()}, and trying to get literal
backslashes and ampersands into the replacement text, you need to remember
that there are several levels of @dfn{escape processing} going on.
@@ -13551,7 +13702,7 @@ example, @code{"a\qb"} is treated as @code{"aqb"}.
At the runtime level, the various functions handle sequences of
@samp{\} and @samp{&} differently. The situation is (sadly) somewhat complex.
-Historically, the @code{sub} and @code{gsub} functions treated the two
+Historically, the @code{sub()} and @code{gsub()} functions treated the two
character sequence @samp{\&} specially; this sequence was replaced in
the generated text with a single @samp{&}. Any other @samp{\} within
the @var{replacement} string that did not precede an @samp{&} was passed
@@ -13567,7 +13718,7 @@ through unchanged. This is illustrated in @ref{table-sub-escapes}.
% But then we need character for escape and tab.
@catcode`! = 4
@halign{@hfil#!@qquad@hfil#!@qquad#@hfil@cr
- You type!@code{sub} sees!@code{sub} generates@cr
+ You type!@code{sub()} sees!@code{sub()} generates@cr
@hrulefill!@hrulefill!@hrulefill@cr
@code{\&}! @code{&}!the matched text@cr
@code{\\&}! @code{\&}!a literal @samp{&}@cr
@@ -13581,7 +13732,7 @@ through unchanged. This is illustrated in @ref{table-sub-escapes}.
@end tex
@ifdocbook
@multitable @columnfractions .20 .20 .60
-@headitem You type @tab @code{sub} sees @tab @code{sub} generates
+@headitem You type @tab @code{sub()} sees @tab @code{sub()} generates
@item @code{\&} @tab @code{&} @tab the matched text
@item @code{\\&} @tab @code{\&} @tab a literal @samp{&}
@item @code{\\\&} @tab @code{\&} @tab a literal @samp{&}
@@ -13594,7 +13745,7 @@ through unchanged. This is illustrated in @ref{table-sub-escapes}.
@ifnottex
@ifnotdocbook
@display
- You type @code{sub} sees @code{sub} generates
+ You type @code{sub()} sees @code{sub()} generates
-------- ---------- ---------------
@code{\&} @code{&} the matched text
@code{\\&} @code{\&} a literal @samp{&}
@@ -13611,7 +13762,7 @@ through unchanged. This is illustrated in @ref{table-sub-escapes}.
@noindent
This table shows both the lexical-level processing, where
an odd number of backslashes becomes an even number at the runtime level,
-as well as the runtime processing done by @code{sub}.
+as well as the runtime processing done by @code{sub()}.
(For the sake of simplicity, the rest of the following tables only show the
case of even numbers of backslashes entered at the lexical level.)
@@ -13619,9 +13770,9 @@ The problem with the historical approach is that there is no way to get
a literal @samp{\} followed by the matched text.
@c @cindex @command{awk} language, POSIX version
-@cindex POSIX @command{awk}, functions and, @code{gsub}/@code{sub}
+@cindex POSIX @command{awk}, functions and, @code{gsub()}/@code{sub()}
The 1992 POSIX standard attempted to fix this problem. That standard
-says that @code{sub} and @code{gsub} look for either a @samp{\} or an @samp{&}
+says that @code{sub()} and @code{gsub()} look for either a @samp{\} or an @samp{&}
after the @samp{\}. If either one follows a @samp{\}, that character is
output literally. The interpretation of @samp{\} and @samp{&} then becomes
as shown in @ref{table-sub-posix-92}.
@@ -13636,7 +13787,7 @@ as shown in @ref{table-sub-posix-92}.
% But then we need character for escape and tab.
@catcode`! = 4
@halign{@hfil#!@qquad@hfil#!@qquad#@hfil@cr
- You type!@code{sub} sees!@code{sub} generates@cr
+ You type!@code{sub()} sees!@code{sub()} generates@cr
@hrulefill!@hrulefill!@hrulefill@cr
@code{&}! @code{&}!the matched text@cr
@code{\\&}! @code{\&}!a literal @samp{&}@cr
@@ -13647,7 +13798,7 @@ as shown in @ref{table-sub-posix-92}.
@end tex
@ifdocbook
@multitable @columnfractions .20 .20 .60
-@headitem You type @tab @code{sub} sees @tab @code{sub} generates
+@headitem You type @tab @code{sub()} sees @tab @code{sub()} generates
@item @code{&} @tab @code{&} @tab the matched text
@item @code{\\&} @tab @code{\&} @tab a literal @samp{&}
@item @code{\\\\&} @tab @code{\\&} @tab a literal @samp{\}, then the matched text
@@ -13657,7 +13808,7 @@ as shown in @ref{table-sub-posix-92}.
@ifnottex
@ifnotdocbook
@display
- You type @code{sub} sees @code{sub} generates
+ You type @code{sub()} sees @code{sub()} generates
-------- ---------- ---------------
@code{&} @code{&} the matched text
@code{\\&} @code{\&} a literal @samp{&}
@@ -13704,7 +13855,7 @@ to produce a @samp{\} preceding the matched text. This is shown in
% But then we need character for escape and tab.
@catcode`! = 4
@halign{@hfil#!@qquad@hfil#!@qquad#@hfil@cr
- You type!@code{sub} sees!@code{sub} generates@cr
+ You type!@code{sub()} sees!@code{sub()} generates@cr
@hrulefill!@hrulefill!@hrulefill@cr
@code{\\\\\\&}! @code{\\\&}!a literal @samp{\&}@cr
@code{\\\\&}! @code{\\&}!a literal @samp{\}, followed by the matched text@cr
@@ -13716,7 +13867,7 @@ to produce a @samp{\} preceding the matched text. This is shown in
@end tex
@ifdocbook
@multitable @columnfractions .20 .20 .60
-@headitem You type @tab @code{sub} sees @tab @code{sub} generates
+@headitem You type @tab @code{sub()} sees @tab @code{sub()} generates
@item @code{\\\\\\&} @tab @code{\\\&} @tab a literal @samp{\&}
@item @code{\\\\&} @tab @code{\\&} @tab a literal @samp{\}, followed by the matched text
@item @code{\\&} @tab @code{\&} @tab a literal @samp{&}
@@ -13727,7 +13878,7 @@ to produce a @samp{\} preceding the matched text. This is shown in
@ifnottex
@ifnotdocbook
@display
- You type @code{sub} sees @code{sub} generates
+ You type @code{sub()} sees @code{sub()} generates
-------- ---------- ---------------
@code{\\\\\\&} @code{\\\&} a literal @samp{\&}
@code{\\\\&} @code{\\&} a literal @samp{\}, followed by the matched text
@@ -13745,8 +13896,8 @@ there was only one. However, as in the historical case, any @samp{\} that
is not part of one of these three sequences is not special and appears
in the output literally.
-@command{gawk} 3.0 and 3.1 follow these proposed POSIX rules for @code{sub} and
-@code{gsub}.
+@command{gawk} 3.0 and 3.1 follow these proposed POSIX rules for @code{sub()} and
+@code{gsub()}.
@c As much as we think it's a lousy idea. You win some, you lose some. Sigh.
The POSIX standard took much longer to be revised than was expected in 1996.
The 2001 standard does not follow the above rules. Instead, the rules
@@ -13766,7 +13917,7 @@ These rules are presented in @ref{table-posix-2001-sub}.
% But then we need character for escape and tab.
@catcode`! = 4
@halign{@hfil#!@qquad@hfil#!@qquad#@hfil@cr
- You type!@code{sub} sees!@code{sub} generates@cr
+ You type!@code{sub()} sees!@code{sub()} generates@cr
@hrulefill!@hrulefill!@hrulefill@cr
@code{\\\\\\&}! @code{\\\&}!a literal @samp{\&}@cr
@code{\\\\&}! @code{\\&}!a literal @samp{\}, followed by the matched text@cr
@@ -13778,7 +13929,7 @@ These rules are presented in @ref{table-posix-2001-sub}.
@end tex
@ifdocbook
@multitable @columnfractions .20 .20 .60
-@headitem You type @tab @code{sub} sees @tab @code{sub} generates
+@headitem You type @tab @code{sub()} sees @tab @code{sub()} generates
@item @code{\\\\\\&} @tab @code{\\\&} @tab a literal @samp{\&}
@item @code{\\\\&} @tab @code{\\&} @tab a literal @samp{\}, followed by the matched text
@item @code{\\&} @tab @code{\&} @tab a literal @samp{&}
@@ -13789,7 +13940,7 @@ These rules are presented in @ref{table-posix-2001-sub}.
@ifnottex
@ifnotdocbook
@display
- You type @code{sub} sees @code{sub} generates
+ You type @code{sub()} sees @code{sub()} generates
-------- ---------- ---------------
@code{\\\\\\&} @code{\\\&} a literal @samp{\&}
@code{\\\\&} @code{\\&} a literal @samp{\}, followed by the matched text
@@ -13804,14 +13955,14 @@ These rules are presented in @ref{table-posix-2001-sub}.
The only case where the difference is noticeable is the last one: @samp{\\\\}
is seen as @samp{\\} and produces @samp{\} instead of @samp{\\}.
-Starting with version 3.1.4, @command{gawk} followed the POSIX rules
+Starting with @value{PVERSION} 3.1.4, @command{gawk} followed the POSIX rules
when @option{--posix} is specified (@pxref{Options}). Otherwise,
it continued to follow the 1996 proposed rules, since
that had been its behavior for many seven years.
-As of version 3.2, @command{gawk} uses the POSIX 2001 rules.
+As of @value{PVERSION} 4.0, @command{gawk} uses the POSIX 2001 rules.
-The rules for @code{gensub} are considerably simpler. At the runtime
+The rules for @code{gensub()} are considerably simpler. At the runtime
level, whenever @command{gawk} sees a @samp{\}, if the following character
is a digit, then the text that matched the corresponding parenthesized
subexpression is placed in the generated output. Otherwise,
@@ -13828,7 +13979,7 @@ as shown in @ref{table-gensub-escapes}.
% But then we need character for escape and tab.
@catcode`! = 4
@halign{@hfil#!@qquad@hfil#!@qquad#@hfil@cr
- You type!@code{gensub} sees!@code{gensub} generates@cr
+ You type!@code{gensub()} sees!@code{gensub()} generates@cr
@hrulefill!@hrulefill!@hrulefill@cr
@code{&}! @code{&}!the matched text@cr
@code{\\&}! @code{\&}!a literal @samp{&}@cr
@@ -13841,7 +13992,7 @@ as shown in @ref{table-gensub-escapes}.
@end tex
@ifdocbook
@multitable @columnfractions .20 .20 .60
-@headitem You type @tab @code{gensub} sees @tab @code{gensub} generates
+@headitem You type @tab @code{gensub()} sees @tab @code{gensub()} generates
@item @code{&} @tab @code{&} @tab the matched text
@item @code{\\&} @tab @code{\&} @tab a literal @samp{&}
@item @code{\\\\} @tab @code{\\} @tab a literal @samp{\}
@@ -13853,7 +14004,7 @@ as shown in @ref{table-gensub-escapes}.
@ifnottex
@ifnotdocbook
@display
- You type @code{gensub} sees @code{gensub} generates
+ You type @code{gensub()} sees @code{gensub()} generates
-------- ------------- ------------------
@code{&} @code{&} the matched text
@code{\\&} @code{\&} a literal @samp{&}
@@ -13867,8 +14018,8 @@ as shown in @ref{table-gensub-escapes}.
@end float
Because of the complexity of the lexical and runtime level processing
-and the special cases for @code{sub} and @code{gsub},
-we recommend the use of @command{gawk} and @code{gensub} when you have
+and the special cases for @code{sub()} and @code{gsub()},
+we recommend the use of @command{gawk} and @code{gensub()} when you have
to do substitutions.
@c fakenode --- for prepinfo
@@ -13880,8 +14031,8 @@ to do substitutions.
@cindex asterisk (@code{*}), @code{*} operator, null strings@comma{} matching
In @command{awk}, the @samp{*} operator can match the null string.
-This is particularly important for the @code{sub}, @code{gsub},
-and @code{gensub} functions. For example:
+This is particularly important for the @code{sub()}, @code{gsub()},
+and @code{gensub()} functions. For example:
@example
$ echo abc | awk '@{ gsub(/m*/, "X"); print @}'
@@ -13899,7 +14050,7 @@ Optional parameters are enclosed in square brackets ([ ]):
@table @code
@item close(@var{filename} @r{[}, @var{how}@r{]})
-@cindex @code{close} function
+@cindex @code{close()} function
@cindex files, closing
Close the file @var{filename} for input or output. Alternatively, the
argument may be a shell command that was used for creating a coprocess, or
@@ -13909,7 +14060,7 @@ for more information.
When closing a coprocess, it is occasionally useful to first close
one end of the two-way pipe and then to close the other. This is done
-by providing a second argument to @code{close}. This second argument
+by providing a second argument to @code{close()}. This second argument
should be one of the two string values @code{"to"} or @code{"from"},
indicating which end of the pipe to close. Case in the string does
not matter.
@@ -13917,12 +14068,12 @@ not matter.
which discusses this feature in more detail and gives an example.
@item fflush(@r{[}@var{filename}@r{]})
-@cindex @code{fflush} function
+@cindex @code{fflush()} function
Flush any buffered output associated with @var{filename}, which is either a
file opened for writing or a shell command for redirecting output to
a pipe or coprocess.
-@cindex portability, @code{fflush} function and
+@cindex portability, @code{fflush()} function and
@cindex buffers, flushing
@cindex output, buffering
Many utility programs @dfn{buffer} their output; i.e., they save information
@@ -13932,17 +14083,17 @@ This is often more efficient than writing
every little bit of information as soon as it is ready. However, sometimes
it is necessary to force a program to @dfn{flush} its buffers; that is,
write the information to its destination, even if a buffer is not full.
-This is the purpose of the @code{fflush} function---@command{gawk} also
-buffers its output and the @code{fflush} function forces
+This is the purpose of the @code{fflush()} function---@command{gawk} also
+buffers its output and the @code{fflush()} function forces
@command{gawk} to flush its buffers.
-@code{fflush} was added to the Bell Laboratories research
+@code{fflush()} was added to the Bell Laboratories research
version of @command{awk} in 1994; it is not part of the POSIX standard and is
not available if @option{--posix} has been specified on the
command line (@pxref{Options}).
-@cindex @command{gawk}, @code{fflush} function in
-@command{gawk} extends the @code{fflush} function in two ways. The first
+@cindex @command{gawk}, @code{fflush()} function in
+@command{gawk} extends the @code{fflush()} function in two ways. The first
is to allow no argument at all. In this case, the buffer for the
standard output is flushed. The second is to allow the null string
(@w{@code{""}}) as the argument. In this case, the buffers for
@@ -13953,8 +14104,8 @@ support these extensions.
@c @cindex automatic warnings
@c @cindex warnings, automatic
-@cindex troubleshooting, @code{fflush} function
-@code{fflush} returns zero if the buffer is successfully flushed;
+@cindex troubleshooting, @code{fflush()} function
+@code{fflush()} returns zero if the buffer is successfully flushed;
otherwise, it returns @minus{}1.
In the case where all buffers are flushed, the return value is zero
only if all buffers were flushed successfully. Otherwise, it is
@@ -13963,13 +14114,13 @@ only if all buffers were flushed successfully. Otherwise, it is
@command{gawk} also issues a warning message if you attempt to flush
a file or pipe that was opened for reading (such as with @code{getline}),
or if @var{filename} is not an open file, pipe, or coprocess.
-In such a case, @code{fflush} returns @minus{}1, as well.
+In such a case, @code{fflush()} returns @minus{}1, as well.
@item system(@var{command})
-@cindex @code{system} function
+@cindex @code{system()} function
@cindex interacting with other programs
Executes operating-system
-commands and then returns to the @command{awk} program. The @code{system}
+commands and then returns to the @command{awk} program. The @code{system()}
function executes the command given by the string @var{command}.
It returns the status returned by the command that was executed as
its value.
@@ -13998,16 +14149,16 @@ close("/bin/sh")
@end example
@noindent
-@cindex troubleshooting, @code{system} function
+@cindex troubleshooting, @code{system()} function
@cindex @code{--sandbox} option, disabling @command{system} function
However, if your @command{awk}
-program is interactive, @code{system} is useful for cranking up large
+program is interactive, @code{system()} is useful for cranking up large
self-contained programs, such as a shell or an editor.
-Some operating systems cannot implement the @code{system} function.
-@code{system} causes a fatal error if it is not supported.
+Some operating systems cannot implement the @code{system()} function.
+@code{system()} causes a fatal error if it is not supported.
@quotation NOTE
-When @option{--sandbox} is specified, the @code{system} function is disabled.
+When @option{--sandbox} is specified, the @code{system()} function is disabled.
@end quotation
@end table
@@ -14057,23 +14208,23 @@ Here, no output is printed until after the @kbd{@value{CTL}-d} is typed, because
it is all buffered and sent down the pipe to @command{cat} in one shot.
@c fakenode --- for prepinfo
-@subheading Advanced Notes: Controlling Output Buffering with @code{system}
+@subheading Advanced Notes: Controlling Output Buffering with @code{system()}
@cindex advanced features, buffering
@cindex buffers, flushing
@cindex buffering, input/output
@cindex output, buffering
-The @code{fflush} function provides explicit control over output buffering for
+The @code{fflush()} function provides explicit control over output buffering for
individual files and pipes. However, its use is not portable to many other
@command{awk} implementations. An alternative method to flush output
-buffers is to call @code{system} with a null string as its argument:
+buffers is to call @code{system()} with a null string as its argument:
@example
system("") # flush output
@end example
@noindent
-@command{gawk} treats this use of the @code{system} function as a special
+@command{gawk} treats this use of the @code{system()} function as a special
case and is smart enough not to run a shell (or other command
interpreter) with the empty command. Therefore, with @command{gawk}, this
idiom is not only useful, it is also efficient. While this method should work
@@ -14083,7 +14234,7 @@ flush the buffer associated with the standard output and not necessarily
all buffered output.)
If you think about what a programmer expects, it makes sense that
-@code{system} should flush any pending output. The following program:
+@code{system()} should flush any pending output. The following program:
@example
BEGIN @{
@@ -14111,7 +14262,7 @@ first print
second print
@end example
-If @command{awk} did not flush its buffers before calling @code{system},
+If @command{awk} did not flush its buffers before calling @code{system()},
you would see the latter (undesirable) output.
@node Time Functions
@@ -14153,7 +14304,7 @@ Optional parameters are enclosed in square brackets ([ ]):
@table @code
@item systime()
-@cindex @code{systime} function (@command{gawk})
+@cindex @code{systime()} function (@command{gawk})
@cindex timestamps
This function returns the current time as the number of seconds since
the system epoch. On POSIX systems, this is the number of seconds
@@ -14162,9 +14313,9 @@ It may be a different number on
other systems.
@item mktime(@var{datespec})
-@cindex @code{mktime} function (@command{gawk})
+@cindex @code{mktime()} function (@command{gawk})
This function turns @var{datespec} into a timestamp in the same form
-as is returned by @code{systime}. It is similar to the function of the
+as is returned by @code{systime()}. It is similar to the function of the
same name in ISO C. The argument, @var{datespec}, is a string of the form
@w{@code{"@var{YYYY} @var{MM} @var{DD} @var{HH} @var{MM} @var{SS} [@var{DST}]"}}.
The string consists of six or seven numbers representing, respectively,
@@ -14182,15 +14333,15 @@ year 1 and year @minus{}1 preceding year 0.
The time is assumed to be in the local timezone.
If the daylight-savings flag is positive, the time is assumed to be
daylight savings time; if zero, the time is assumed to be standard
-time; and if negative (the default), @code{mktime} attempts to determine
+time; and if negative (the default), @code{mktime()} attempts to determine
whether daylight savings time is in effect for the specified time.
If @var{datespec} does not contain enough elements or if the resulting time
-is out of range, @code{mktime} returns @minus{}1.
+is out of range, @code{mktime()} returns @minus{}1.
@item strftime(@r{[}@var{format} @r{[}, @var{timestamp} @r{[}, @var{utc-flag}@r{]]]})
@c STARTOFRANGE strf
-@cindex @code{strftime} function (@command{gawk})
+@cindex @code{strftime()} function (@command{gawk})
This function returns a string. It is similar to the function of the
same name in ISO C. The time specified by @var{timestamp} is used to
produce a string, based on the contents of the @var{format} string.
@@ -14198,15 +14349,15 @@ If @var{utc-flag} is present and is either non-zero or non-null, the value
is formatted as UTC (Coordinated Universal Time, formerly GMT or Greenwich
Mean Time). Otherwise, the value is formatted for the local time zone.
The @var{timestamp} is in the same format as the value returned by the
-@code{systime} function. If no @var{timestamp} argument is supplied,
+@code{systime()} function. If no @var{timestamp} argument is supplied,
@command{gawk} uses the current time of day as the timestamp.
-If no @var{format} argument is supplied, @code{strftime} uses
+If no @var{format} argument is supplied, @code{strftime()} uses
@code{@w{"%a %b %d %H:%M:%S %Z %Y"}}. This format string produces
output that is (almost) equivalent to that of the @command{date} utility.
(Versions of @command{gawk} prior to 3.0 require the @var{format} argument.)
@end table
-The @code{systime} function allows you to compare a timestamp from a
+The @code{systime()} function allows you to compare a timestamp from a
log file with the current time of day. In particular, it is easy to
determine how long ago a particular record was logged. It also allows
you to produce log records using the ``seconds since the epoch'' format.
@@ -14214,22 +14365,22 @@ you to produce log records using the ``seconds since the epoch'' format.
@cindex converting, dates to timestamps
@cindex dates, converting to timestamps
@cindex timestamps, converting dates to
-The @code{mktime} function allows you to convert a textual representation
+The @code{mktime()} function allows you to convert a textual representation
of a date and time into a timestamp. This makes it easy to do before/after
comparisons of dates and times, particularly when dealing with date and
time data coming from an external source, such as a log file.
-The @code{strftime} function allows you to easily turn a timestamp
-into human-readable information. It is similar in nature to the @code{sprintf}
+The @code{strftime()} function allows you to easily turn a timestamp
+into human-readable information. It is similar in nature to the @code{sprintf()}
function
(@pxref{String Functions}),
in that it copies nonformat specification characters verbatim to the
returned string, while substituting date and time values for format
specifications in the @var{format} string.
-@cindex format specifiers, @code{strftime} function (@command{gawk})
-@code{strftime} is guaranteed by the 1999 ISO C standard@footnote{As this
-is a recent standard, not every system's @code{strftime} necessarily
+@cindex format specifiers, @code{strftime()} function (@command{gawk})
+@code{strftime()} is guaranteed by the 1999 ISO C standard@footnote{As this
+is a recent standard, not every system's @code{strftime()} necessarily
supports all of the conversions listed here.}
to support the following date format specifications:
@@ -14382,8 +14533,8 @@ A literal @samp{%}.
If a conversion specifier is not one of the above, the behavior is
undefined.@footnote{This is because ISO C leaves the
-behavior of the C version of @code{strftime} undefined and @command{gawk}
-uses the system's version of @code{strftime} if it's there.
+behavior of the C version of @code{strftime()} undefined and @command{gawk}
+uses the system's version of @code{strftime()} if it's there.
Typically, the conversion specifier either does not appear in the
returned string or appears literally.}
@@ -14400,7 +14551,7 @@ are used to.
For systems that are not yet fully standards-compliant,
@command{gawk} supplies a copy of
-@code{strftime} from the GNU C Library.
+@code{strftime()} from the GNU C Library.
It supports all of the just listed format specifications.
If that version is
used to compile @command{gawk} (@pxref{Installation}),
@@ -14651,57 +14802,29 @@ with @samp{11001000}.
@command{gawk} provides built-in functions that implement the
bitwise operations just described. They are:
-@ignore
-@table @code
-@cindex @code{and} function (@command{gawk})
-@item and(@var{v1}, @var{v2})
-Return the bitwise AND of the values provided by @var{v1} and @var{v2}.
-
-@cindex @code{or} function (@command{gawk})
-@item or(@var{v1}, @var{v2})
-Return the bitwise OR of the values provided by @var{v1} and @var{v2}.
-
-@cindex @code{xor} function (@command{gawk})
-@item xor(@var{v1}, @var{v2})
-Return the bitwise XOR of the values provided by @var{v1} and @var{v2}.
-
-@cindex @code{compl} function (@command{gawk})
-@item compl(@var{val})
-Return the bitwise complement of @var{val}.
-
-@cindex @code{lshift} function (@command{gawk})
-@item lshift(@var{val}, @var{count})
-Return the value of @var{val}, shifted left by @var{count} bits.
-
-@cindex @code{rshift} function (@command{gawk})
-@item rshift(@var{val}, @var{count})
-Return the value of @var{val}, shifted right by @var{count} bits.
-@end table
-@end ignore
-
@cindex @command{gawk}, bitwise operations in
@multitable {@code{rshift(@var{val}, @var{count})}} {Return the value of @var{val}, shifted right by @var{count} bits.}
-@cindex @code{and} function (@command{gawk})
+@cindex @code{and()} function (@command{gawk})
@item @code{and(@var{v1}, @var{v2})}
@tab Returns the bitwise AND of the values provided by @var{v1} and @var{v2}.
-@cindex @code{or} function (@command{gawk})
+@cindex @code{or()} function (@command{gawk})
@item @code{or(@var{v1}, @var{v2})}
@tab Returns the bitwise OR of the values provided by @var{v1} and @var{v2}.
-@cindex @code{xor} function (@command{gawk})
+@cindex @code{xor()} function (@command{gawk})
@item @code{xor(@var{v1}, @var{v2})}
@tab Returns the bitwise XOR of the values provided by @var{v1} and @var{v2}.
-@cindex @code{compl} function (@command{gawk})
+@cindex @code{compl()} function (@command{gawk})
@item @code{compl(@var{val})}
@tab Returns the bitwise complement of @var{val}.
-@cindex @code{lshift} function (@command{gawk})
+@cindex @code{lshift()} function (@command{gawk})
@item @code{lshift(@var{val}, @var{count})}
@tab Returns the value of @var{val}, shifted left by @var{count} bits.
-@cindex @code{rshift} function (@command{gawk})
+@cindex @code{rshift()} function (@command{gawk})
@item @code{rshift(@var{val}, @var{count})}
@tab Returns the value of @var{val}, shifted right by @var{count} bits.
@end multitable
@@ -14812,7 +14935,7 @@ The main code in the @code{BEGIN} rule shows the difference between the
decimal and octal values for the same numbers
(@pxref{Nondecimal-numbers}),
and then demonstrates the
-results of the @code{compl}, @code{lshift}, and @code{rshift} functions.
+results of the @code{compl()}, @code{lshift()}, and @code{rshift()} functions.
@c ENDOFRANGE bit
@c ENDOFRANGE and
@c ENDOFRANGE oro
@@ -14834,14 +14957,14 @@ for the full story.
Optional parameters are enclosed in square brackets ([ ]):
@table @code
-@cindex @code{dcgettext} function (@command{gawk})
+@cindex @code{dcgettext()} function (@command{gawk})
@item dcgettext(@var{string} @r{[}, @var{domain} @r{[}, @var{category}@r{]]})
This function returns the translation of @var{string} in
text domain @var{domain} for locale category @var{category}.
The default value for @var{domain} is the current value of @code{TEXTDOMAIN}.
The default value for @var{category} is @code{"LC_MESSAGES"}.
-@cindex @code{dcngettext} function (@command{gawk})
+@cindex @code{dcngettext()} function (@command{gawk})
@item dcngettext(@var{string1}, @var{string2}, @var{number} @r{[}, @var{domain} @r{[}, @var{category}@r{]]})
This function returns the plural form used for @var{number} of the
translation of @var{string1} and @var{string2} in text domain
@@ -14851,7 +14974,7 @@ variant of the same message.
The default value for @var{domain} is the current value of @code{TEXTDOMAIN}.
The default value for @var{category} is @code{"LC_MESSAGES"}.
-@cindex @code{bindtextdomain} function (@command{gawk})
+@cindex @code{bindtextdomain()} function (@command{gawk})
@item bindtextdomain(@var{directory} @r{[}, @var{domain}@r{]})
This function allows you to specify the directory in which
@command{gawk} will look for message translation files, in case they
@@ -14861,7 +14984,7 @@ It returns the directory in which @var{domain} is ``bound.''
The default @var{domain} is the value of @code{TEXTDOMAIN}.
If @var{directory} is the null string (@code{""}), then
-@code{bindtextdomain} returns the current binding for the
+@code{bindtextdomain()} returns the current binding for the
given @var{domain}.
@end table
@c ENDOFRANGE funcbi
@@ -15091,7 +15214,7 @@ $ echo "Don't Panic!" |
The C @code{ctime} function takes a timestamp and returns it in a string,
formatted in a well-known fashion.
-The following example uses the built-in @code{strftime} function
+The following example uses the built-in @code{strftime()} function
(@pxref{Time Functions})
to create an @command{awk} version of @code{ctime}:
@@ -15778,7 +15901,7 @@ monetary values are printed and read.
@cindex @code{gettext} library
The facilities in GNU @code{gettext} focus on messages; strings printed
by a program, either directly or via formatting with @code{printf} or
-@code{sprintf}.@footnote{For some operating systems, the @command{gawk}
+@code{sprintf()}.@footnote{For some operating systems, the @command{gawk}
port doesn't support GNU @code{gettext}. This applies most notably to
the PC operating systems. As such, these features are not available
if you are using one of those operating systems. Sorry.}
@@ -15842,11 +15965,11 @@ at runtime.
When @command{guide} is built and installed, the binary translation files
are installed in a standard place.
-@cindex @code{bindtextdomain} function (C library)
+@cindex @code{bindtextdomain()} function (C library)
@item
For testing and development, it is possible to tell @code{gettext}
to use @file{.mo} files in a different directory than the standard
-one by using the @code{bindtextdomain} function.
+one by using the @code{bindtextdomain()} function.
@cindex @code{.mo} files, specifying directory of
@cindex files, @code{.mo}, specifying directory of
@@ -15976,7 +16099,7 @@ String constants marked with a leading underscore
are candidates for translation at runtime.
String constants without a leading underscore are not translated.
-@cindex @code{dcgettext} function (@command{gawk})
+@cindex @code{dcgettext()} function (@command{gawk})
@item dcgettext(@var{string} @r{[}, @var{domain} @r{[}, @var{category}@r{]]})
This built-in function returns the translation of @var{string} in
text domain @var{domain} for locale category @var{category}.
@@ -15995,12 +16118,12 @@ You must also supply a text domain. Use @code{TEXTDOMAIN} if
you want to use the current domain.
@strong{Caution:} The order of arguments to the @command{awk} version
-of the @code{dcgettext} function is purposely different from the order for
+of the @code{dcgettext()} function is purposely different from the order for
the C version. The @command{awk} version's order was
chosen to be simple and to allow for reasonable @command{awk}-style
default arguments.
-@cindex @code{dcngettext} function (@command{gawk})
+@cindex @code{dcngettext()} function (@command{gawk})
@item dcngettext(@var{string1}, @var{string2}, @var{number} @r{[}, @var{domain} @r{[}, @var{category}@r{]]})
This built-in function returns the plural form used for @var{number} of the
translation of @var{string1} and @var{string2} in text domain
@@ -16010,13 +16133,13 @@ variant of the same message.
The default value for @var{domain} is the current value of @code{TEXTDOMAIN}.
The default value for @var{category} is @code{"LC_MESSAGES"}.
-The same remarks as for the @code{dcgettext} function apply.
+The same remarks as for the @code{dcgettext()} function apply.
@cindex @code{.mo} files, specifying directory of
@cindex files, @code{.mo}, specifying directory of
@cindex message object files, specifying directory of
@cindex files, message object, specifying directory of
-@cindex @code{bindtextdomain} function (@command{gawk})
+@cindex @code{bindtextdomain()} function (@command{gawk})
@item bindtextdomain(@var{directory} @r{[}, @var{domain}@r{]})
This built-in function allows you to specify the directory in which
@code{gettext} looks for @file{.mo} files, in case they
@@ -16026,7 +16149,7 @@ It returns the directory in which @var{domain} is ``bound.''
The default @var{domain} is the value of @code{TEXTDOMAIN}.
If @var{directory} is the null string (@code{""}), then
-@code{bindtextdomain} returns the current binding for the
+@code{bindtextdomain()} returns the current binding for the
given @var{domain}.
@end table
@@ -16072,7 +16195,7 @@ printf(_"Number of users is %d\n", nusers)
@item
If you are creating strings dynamically, you can
-still translate them, using the @code{dcgettext}
+still translate them, using the @code{dcgettext()}
built-in function:
@example
@@ -16081,15 +16204,15 @@ message = dcgettext(message, "adminprog")
print message
@end example
-Here, the call to @code{dcgettext} supplies a different
+Here, the call to @code{dcgettext()} supplies a different
text domain (@code{"adminprog"}) in which to find the
message, but it uses the default @code{"LC_MESSAGES"} category.
-@cindex @code{LC_MESSAGES} locale category, @code{bindtextdomain} function (@command{gawk})
+@cindex @code{LC_MESSAGES} locale category, @code{bindtextdomain()} function (@command{gawk})
@item
During development, you might want to put the @file{.mo}
file in a private directory for testing. This is done
-with the @code{bindtextdomain} built-in function:
+with the @code{bindtextdomain()} built-in function:
@example
BEGIN @{
@@ -16160,8 +16283,8 @@ When run with @option{--gen-pot}, @command{gawk} does not execute your
program. Instead, it parses it as usual and prints all marked strings
to standard output in the format of a GNU @code{gettext} Portable Object
file. Also included in the output are any constant strings that
-appear as the first argument to @code{dcgettext} or as the first and
-second argument to @code{dcngettext}.@footnote{Starting with @code{gettext}
+appear as the first argument to @code{dcgettext()} or as the first and
+second argument to @code{dcngettext()}.@footnote{Starting with @code{gettext}
version 0.11.5, the @command{xgettext} utility that comes with GNU
@code{gettext} can handle @file{.awk} files.}
@xref{I18N Example},
@@ -16173,7 +16296,7 @@ translations for @command{guide}.
@cindex @code{printf} statement, positional specifiers
@cindex positional specifiers@comma{} @code{printf} statement
-Format strings for @code{printf} and @code{sprintf}
+Format strings for @code{printf} and @code{sprintf()}
(@pxref{Printf})
present a special problem for translation.
Consider the following:@footnote{This example is borrowed
@@ -16302,14 +16425,14 @@ the null string (@code{""}) as its value, leaving the original string constant a
the result.
@item
-By defining ``dummy'' functions to replace @code{dcgettext}, @code{dcngettext}
-and @code{bindtextdomain}, the @command{awk} program can be made to run, but
+By defining ``dummy'' functions to replace @code{dcgettext()}, @code{dcngettext()}
+and @code{bindtextdomain()}, the @command{awk} program can be made to run, but
all the messages are output in the original language.
For example:
-@cindex @code{bindtextdomain} function (@command{gawk}), portability and
-@cindex @code{dcgettext} function (@command{gawk}), portability and
-@cindex @code{dcngettext} function (@command{gawk}), portability and
+@cindex @code{bindtextdomain()} function (@command{gawk}), portability and
+@cindex @code{dcgettext()} function (@command{gawk}), portability and
+@cindex @code{dcngettext()} function (@command{gawk}), portability and
@example
@c file eg/lib/libintl.awk
function bindtextdomain(dir, domain)
@@ -16331,12 +16454,12 @@ function dcngettext(string1, string2, number, domain, category)
@item
The use of positional specifications in @code{printf} or
-@code{sprintf} is @emph{not} portable.
+@code{sprintf()} is @emph{not} portable.
To support @code{gettext} at the C level, many systems' C versions of
-@code{sprintf} do support positional specifiers. But it works only if
+@code{sprintf()} do support positional specifiers. But it works only if
enough arguments are supplied in the function call. Many versions of
@command{awk} pass @code{printf} formats and arguments unchanged to the
-underlying C library version of @code{sprintf}, but only one format and
+underlying C library version of @code{sprintf()}, but only one format and
argument at a time. What happens if a positional specification is
used is anybody's guess.
However, since the positional specifications are primarily for use in
@@ -16465,8 +16588,8 @@ $ gawk -f guide.awk
@print{} Pardon me, Zaphod who?
@end example
-If the three replacement functions for @code{dcgettext}, @code{dcngettext}
-and @code{bindtextdomain}
+If the three replacement functions for @code{dcgettext()}, @code{dcngettext()}
+and @code{bindtextdomain()}
(@pxref{I18N Portability})
are in a file named @file{libintl.awk},
then we can run @file{guide.awk} unchanged as follows:
@@ -16529,7 +16652,7 @@ First, a command-line option allows @command{gawk} to recognize
nondecimal numbers in input data, not just in @command{awk}
programs. Next, two-way I/O, discussed briefly in earlier parts of this
@value{DOCUMENT}, is described in full detail, along with the basics
-of TCP/IP networking and BSD portal files. Finally, @command{gawk}
+of TCP/IP networking. Finally, @command{gawk}
can @dfn{profile} an @command{awk} program, making it possible to tune
it for performance.
@@ -16542,7 +16665,6 @@ its description is relegated to an appendix.
* Nondecimal Data:: Allowing nondecimal input data.
* Two-way I/O:: Two-way communications with another process.
* TCP/IP Networking:: Using @command{gawk} for network programming.
-* Portal Files:: Using @command{gawk} with BSD portals.
* Profiling:: Profiling your @command{awk} programs.
@end menu
@@ -16592,12 +16714,12 @@ using it could lead to surprising results, the default is to leave this
facility disabled. If you want it, you must explicitly request it.
@cindex programming conventions, @code{--non-decimal-data} option
-@cindex @code{--non-decimal-data} option, @code{strtonum} function and
-@cindex @code{strtonum} function (@command{gawk}), @code{--non-decimal-data} option and
+@cindex @code{--non-decimal-data} option, @code{strtonum()} function and
+@cindex @code{strtonum()} function (@command{gawk}), @code{--non-decimal-data} option and
@strong{Caution:}
@emph{Use of this option is not recommended.}
It can break old programs very badly.
-Instead, use the @code{strtonum} function to convert your data
+Instead, use the @code{strtonum()} function to convert your data
(@pxref{Nondecimal-numbers}).
This makes your programs easier to write and easier to read, and
leads to less surprising results.
@@ -16713,9 +16835,9 @@ known as @dfn{deadlock}, where each process is waiting for the
other one to do something.
@end itemize
-@cindex @code{close} function, two-way pipes and
+@cindex @code{close()} function, two-way pipes and
It is possible to close just one end of the two-way pipe to
-a coprocess, by supplying a second argument to the @code{close}
+a coprocess, by supplying a second argument to the @code{close()}
function of either @code{"to"} or @code{"from"}
(@pxref{Close Files And Pipes}).
These strings tell @command{gawk} to close the end of the pipe
@@ -16883,29 +17005,6 @@ which comes as part of the @command{gawk} distribution,
for a much more complete introduction and discussion, as well as
extensive examples.
-@node Portal Files
-@section Using @command{gawk} with BSD Portals
-@cindex advanced features, @command{gawk}, BSD portals
-@cindex portal files
-@cindex files, portal
-@cindex BSD portals
-@cindex @code{/p} files (@command{gawk})
-@cindex files, @code{/p} (@command{gawk})
-@cindex @code{--enable-portals} configuration option
-@cindex operating systems, BSD-based
-
-Similar to the @file{/inet} special files, if @command{gawk}
-is configured with the @option{--enable-portals} option
-(@pxref{Quick Installation}),
-then @command{gawk} treats
-files whose pathnames begin with @code{/p} as 4.4 BSD-style portals.
-
-@cindex @code{|} (vertical bar), @code{|&} operator (I/O), two-way communications
-@cindex vertical bar (@code{|}), @code{|&} operator (I/O), two-way communications
-When used with the @samp{|&} operator, @command{gawk} opens the file
-for two-way communications. The operating system's portal mechanism
-then manages creating the process associated with the portal and
-the corresponding communications with the portal's process.
@c ENDOFRANGE tcpip
@node Profiling
@@ -17239,6 +17338,7 @@ full details.
* AWKPATH Variable:: Searching directories for @command{awk}
programs.
* Exit Status:: @command{gawk}'s exit status.
+* Include Files:: Including other files into your program.
* Obsolete:: Obsolete Options and/or features.
* Undocumented:: Undocumented Options and Features.
* Known Bugs:: Known Bugs in @command{gawk}.
@@ -17407,10 +17507,8 @@ multi-byte characters. This option is an easy way to tell @command{gawk}:
``hands off my data!''.
@item -c
-@itemx --compat
@itemx --traditional
@cindex @code{--c} option
-@cindex @code{--compat} option
@cindex @code{--traditional} option
@cindex compatibility mode (@command{gawk}), specifying
Specifies @dfn{compatibility mode}, in which the GNU extensions to
@@ -17423,10 +17521,8 @@ which summarizes the extensions. Also see
@item -C
@itemx --copyright
-@itemx --copyleft
@cindex @code{-C} option
@cindex @code{--copyright} option
-@cindex @code{--copyleft} option
@cindex GPL (General Public License), printing
Print the short version of the General Public License and then exit.
@@ -17500,17 +17596,15 @@ for information about this option.
@item -h
@itemx --help
-@itemx --usage
@cindex @code{-h} option
@cindex @code{--help} option
-@cindex @code{--usage} option
@cindex GNU long options, printing list of
@cindex options, printing list of
@cindex printing, list of options
Prints a ``usage'' message summarizing the short and long style options
that @command{gawk} accepts and then exit.
-@item -l @r{[}value@r{]}
+@item -L @r{[}value@r{]}
@itemx --lint@r{[}=value@r{]}
@cindex @code{-l} option
@cindex @code{--lint} option
@@ -17524,22 +17618,14 @@ With an optional argument of @samp{fatal},
lint warnings become fatal errors.
This may be drastic, but its use will certainly encourage the
development of cleaner @command{awk} programs.
-With an optional argument of @samp{invalid}, only warnings about things that are
-actually invalid are issued. (This is not fully implemented yet.)
+With an optional argument of @samp{invalid}, only warnings about things
+that are actually invalid are issued. (This is not fully implemented yet.)
-Some warnings are only printed once, even if the dubious constructs they warn
-about occur multiple times in your @command{awk} program. Thus, when eliminating
-problems pointed out by @option{--lint}, you should take care to search for all
-occurrences of each inappropriate construct. As @command{awk} programs are
-usually short, doing so is not burdensome.
-
-@item -L
-@itemx --lint-old
-@cindex @code{--L} option
-@cindex @code{--lint-old} option
-Warns about constructs that are not available in the original version of
-@command{awk} from Version 7 Unix
-(@pxref{V7/SVR3.1}).
+Some warnings are only printed once, even if the dubious constructs they
+warn about occur multiple times in your @command{awk} program. Thus,
+when eliminating problems pointed out by @option{--lint}, you should take
+care to search for all occurrences of each inappropriate construct. As
+@command{awk} programs are usually short, doing so is not burdensome.
@item -n
@itemx --non-decimal-data
@@ -17644,9 +17730,9 @@ of @code{FS} to be a single TAB character
The locale's decimal point character is used for parsing input
data (@pxref{Locales}).
-@cindex @code{fflush} function@comma{} unsupported
+@cindex @code{fflush()} function@comma{} unsupported
@item
-The @code{fflush} built-in function is not supported
+The @code{fflush()} built-in function is not supported
(@pxref{I/O Functions}).
@end itemize
@@ -17675,14 +17761,22 @@ and for use in combination with the @option{--traditional} option.
@cindex @code{-S} option
@cindex @code{--sandbox} option
@cindex sandbox mode
-In sandbox mode, the @command{system} function,
-input redirections with @command{getline},
-output redirections with @command{print} and @command{printf}
+In sandbox mode, the @code{system()} function,
+input redirections with @code{getline},
+output redirections with @code{print} and @code{printf}
and dynamic extensions are disabled.
This is particularly useful when you want to run @command{awk} scripts
from questionable sources and need to make sure the scripts
can't access your system (other then the specified input data file).
+@item -t
+@itemx --lint-old
+@cindex @code{--L} option
+@cindex @code{--lint-old} option
+Warns about constructs that are not available in the original version of
+@command{awk} from Version 7 Unix
+(@pxref{V7/SVR3.1}).
+
@item -V
@itemx --version
@cindex @code{-V} option
@@ -17749,7 +17843,7 @@ and @command{gawk} turns on POSIX mode because of @env{POSIXLY_CORRECT},
then it issues a warning message indicating that POSIX
mode is in effect.
You would typically set this variable in your shell's startup file.
-For a Bourne-compatible shell (such as @command{bash}), you would add these
+For a Bourne-compatible shell (such as Bash), you would add these
lines to the @file{.profile} file in your home directory:
@example
@@ -17928,6 +18022,124 @@ If @command{gawk} exits because of a fatal error, the exit
status is 2. On non-POSIX systems, this value may be mapped
to @code{EXIT_FAILURE}.
+@node Include Files
+@section Including Other Files Into Your Program
+
+@c Panos Papadopoulos <panos1962@gmail.com> contributed the original
+@c text for this section.
+
+@strong{FIXME:} This section still needs some editing.
+
+Beginning with version @strong{FIXME:} 3.1.8-bc of @command{gawk}, the
+@samp{@@include} keyword can be used to read external source @command{awk}
+files. That gives the ability to split huge @command{awk} source files
+into smaller and manageable files and also to reuse common @command{awk}
+code from various @command{awk} scripts. In other words, you can group
+together @command{awk} functions, used to carry out some sort of tasks,
+in external files. These files can be used just like function libraries,
+using the @samp{@@include} keyword in conjuction with the @code{AWKPATH}
+environment variable.
+
+Let's see an example to demonstrate file inclusion in @command{gawk}.
+To do so, we'll use two (trivial) @command{awk} scripts, namely the
+@file{test1} and @file{test2} @command{gawk} scripts. Here follows the
+@file{test1} @command{gawk} script file:
+
+@example
+BEGIN @{
+ print "This is script test1."
+@}
+@end example
+
+@noindent
+and the @file{test2} file:
+
+@example
+@@include "test1"
+BEGIN @{
+ print "This is script test2."
+@}
+@end example
+
+Running @command{gawk} with the @file{test2}
+script you'll get the following result:
+
+@example
+$ @kbd{gawk -f test2}
+@print{} This is file test1.
+@print{} This is file test2.
+@end example
+
+@code{gawk} runs the @file{test2} script where @file{test1} has been
+included in the source of @file{test2} by means of the @samp{@@include}
+keyword. So, to include external @command{awk} source files you just
+use @samp{@@include} followed by the name of the file to be included in
+double quotes.
+
+@quotation NOTE
+Keep in mind that this is a language construct and the @value{FN} cannot
+be a string variable, but rather just a literal string in double quotes.
+@end quotation
+
+The files to be included may be nested; e.g. given a third
+script, namely @file{test3}:
+
+@example
+@@include "test2"
+BEGIN @{
+ print "This is script test3."
+@}
+@end example
+
+@noindent
+and running @command{gawk} with the @file{test3} script you'll get the
+following result:
+
+@example
+$ @kbd{gawk -f test3}
+@print{} This is file test1.
+@print{} This is file test2.
+@print{} This is file test3.
+@end example
+
+The @value{FN} can, of course, be a pathname, e.g.
+
+@example
+@@include "../io_funcs"
+@end example
+
+@noindent
+or
+
+@example
+@@include "/usr/awklib/network"
+@end example
+
+@noindent
+are valid. The @code{AWKPATH} environment variable can be of great
+value in @samp{@@include} constructs. The same rules dominating the use
+of @code{AWKPATH} variable in command line file searches are valid in
+@samp{@@include} constructs too. That can be prooved very helpful in
+constructing @command{gawk} function libraries. You can edit huge
+scripts containing usefull @command{gawk} libraries and put those
+files in a special directory. You can then include those ``libraries''
+using either the full pathnames of the files or by setting accordingly
+the @code{AWKPATH} environment variable and then use @samp{@@include}
+with just the name part of the full file pathname. Of course you can
+have more than one directory to keep library files; the more complex
+the working enviroment is, the more directories you need to organize
+the files to be included.
+
+The whole stuff of file inclusion can, of course, be carried out in the
+command line, using as many @option{-f} options as required with the
+files to be included as arguments, but the @samp{@@include} keyword
+can help you in constructing self-contained @command{gawk} programs,
+thus reducing the need of writing complex and tedious command lines.
+
+@code{AWKPATH} is also used by the @samp{@@include} mechanism, that is
+the files to be included will be seeked in the directories specified.
+Keep in mind, however, that the current directory is been searched first,
+either it's listed in the @code{AWKPATH} string or not.
@node Obsolete
@section Obsolete Options and/or Features
@@ -18290,12 +18502,12 @@ programming use.
@menu
* Nextfile Function:: Two implementations of a @code{nextfile}
function.
-* Strtonum Function:: A replacement for the built-in @code{strtonum}
- function.
+* Strtonum Function:: A replacement for the built-in
+ @code{strtonum()} function.
* Assert Function:: A function for assertions in @command{awk}
programs.
-* Round Function:: A function for rounding if @code{sprintf} does
- not do it correctly.
+* Round Function:: A function for rounding if @code{sprintf()}
+ does not do it correctly.
* Cliff Random Function:: The Cliff Random Number Generator.
* Ordinal Functions:: Functions for using characters as numbers and
vice versa.
@@ -18438,7 +18650,7 @@ computations).
@node Strtonum Function
@subsection Converting Strings To Numbers
-The @code{strtonum} function (@pxref{String Functions})
+The @code{strtonum()} function (@pxref{String Functions})
is a @command{gawk} extension. The following function
provides an implementation for other versions of @command{awk}:
@@ -18518,7 +18730,7 @@ adjusts @code{k} so it can be used in computing the return value.
Similar logic applies to the code that checks for and converts a
hexadecimal value, which starts with @samp{0x} or @samp{0X}.
-The use of @code{tolower} simplifies the computation for finding
+The use of @code{tolower()} simplifies the computation for finding
the correct numeric value for each hexadecimal digit.
Finally, if the string matches the (rather complicated) regex for a
@@ -18528,7 +18740,7 @@ number.
A commented-out test program is included, so that the function can
be tested with @command{gawk} and the results compared to the built-in
-@code{strtonum} function.
+@code{strtonum()} function.
@node Assert Function
@subsection Assertions
@@ -18668,13 +18880,13 @@ with an @code{exit} statement.
@cindex numbers, rounding
@cindex libraries of @command{awk} functions, rounding numbers
@cindex functions, library, rounding numbers
-@cindex @code{print} statement, @code{sprintf} function and
-@cindex @code{printf} statement, @code{sprintf} function and
-@cindex @code{sprintf} function, @code{print}/@code{printf} statements and
-The way @code{printf} and @code{sprintf}
+@cindex @code{print} statement, @code{sprintf()} function and
+@cindex @code{printf} statement, @code{sprintf()} function and
+@cindex @code{sprintf()} function, @code{print}/@code{printf} statements and
+The way @code{printf} and @code{sprintf()}
(@pxref{Printf})
-perform rounding often depends upon the system's C @code{sprintf}
-subroutine. On many machines, @code{sprintf} rounding is ``unbiased,''
+perform rounding often depends upon the system's C @code{sprintf()}
+subroutine. On many machines, @code{sprintf()} rounding is ``unbiased,''
which means it doesn't always round a trailing @samp{.5} up, contrary
to naive expectations. In unbiased rounding, @samp{.5} rounds to even,
rather than always up, so 1.5 rounds to 2 but 4.5 rounds to 4. This means
@@ -18769,7 +18981,7 @@ function cliff_rand()
This algorithm requires an initial ``seed'' of 0.1. Each new value
uses the current seed as input for the calculation.
-If the built-in @code{rand} function
+If the built-in @code{rand()} function
(@pxref{Numeric Functions})
isn't random enough, you might try using this function instead.
@@ -18910,7 +19122,7 @@ Good function design is important; this function needs to be general but it
should also have a reasonable default behavior. It is called with an array
as well as the beginning and ending indices of the elements in the array to be
merged. This assumes that the array indices are numeric---a reasonable
-assumption since the array was likely created with @code{split}
+assumption since the array was likely created with @code{split()}
(@pxref{String Functions}):
@cindex @code{join} user-defined function
@@ -18960,10 +19172,10 @@ more difficult than they really need to be.}
@cindex functions, library, managing time
@cindex timestamps, formatted
@cindex time, managing
-The @code{systime} and @code{strftime} functions described in
+The @code{systime()} and @code{strftime()} functions described in
@ref{Time Functions},
provide the minimum functionality necessary for dealing with the time of day
-in human readable form. While @code{strftime} is extensive, the control
+in human readable form. While @code{strftime()} is extensive, the control
formats are not necessarily easy to remember or intuitively obvious when
reading a program.
@@ -19046,7 +19258,7 @@ function gettimeofday(time, ret, now, i)
@end example
The string indices are easier to use and read than the various formats
-required by @code{strftime}. The @code{alarm} program presented in
+required by @code{strftime()}. The @code{alarm} program presented in
@ref{Alarm Program},
uses this function.
A more general design for the @code{gettimeofday} function would have
@@ -19576,12 +19788,12 @@ The abstraction provided by @code{getopt} is very useful and is quite
handy in @command{awk} programs as well. Following is an @command{awk}
version of @code{getopt}. This function highlights one of the
greatest weaknesses in @command{awk}, which is that it is very poor at
-manipulating single characters. Repeated calls to @code{substr} are
+manipulating single characters. Repeated calls to @code{substr()} are
necessary for accessing individual characters
(@pxref{String Functions}).@footnote{This
function was written before @command{gawk} acquired the ability to
split strings into single characters using @code{""} as the separator.
-We have left it alone, since using @code{substr} is more portable.}
+We have left it alone, since using @code{substr()} is more portable.}
The discussion that follows walks through the code a bit at a time:
@@ -19689,7 +19901,7 @@ to return them to the user one at a time.
If @code{_opti} is equal to zero, it is set to two, which is the index in
the string of the next character to look at (we skip the @samp{-}, which
is at position one). The variable @code{thisopt} holds the character,
-obtained with @code{substr}. It is saved in @code{Optopt} for the main
+obtained with @code{substr()}. It is saved in @code{Optopt} for the main
program to use.
If @code{thisopt} is not in the @code{options} string, then it is an
@@ -19954,12 +20166,12 @@ The user's encrypted password. This may not be available on some systems.
@item User-ID
The user's numeric user ID number.
-(On some systems it's a C @code{long}, and not an @code{int}. Thus
+(On some systems it's a C @code{long}, and not an @code{int()}. Thus
we cast it to @code{long} for all cases.)
@item Group-ID
The user's numeric group ID number.
-(Similar comments about @code{long} vs.@: @code{int} apply here.)
+(Similar comments about @code{long} vs.@: @code{int()} apply here.)
@item Full name
The user's full name, and perhaps other information associated with the
@@ -19971,7 +20183,7 @@ The user's login (or ``home'') directory (familiar to shell programmers as
@item Login shell
The program that is run when the user logs in. This is usually a
-shell, such as @command{bash}.
+shell, such as Bash.
@end table
@end ignore
@@ -19991,7 +20203,7 @@ user.
@code{$HOME}).
@item Login shell @tab The program that is run when the user logs in. This is usually a
-shell, such as @command{bash}.
+shell, such as Bash.
@end multitable
A few lines representative of @command{pwcat}'s output are as follows:
@@ -20337,7 +20549,7 @@ usually empty or set to @samp{*}.
@item Group ID Number
The numeric group ID number. This number is unique within the file.
-(On some systems it's a C @code{long}, and not an @code{int}. Thus
+(On some systems it's a C @code{long}, and not an @code{int()}. Thus
we cast it to @code{long} for all cases.)
@item Group Member List
@@ -21015,7 +21227,7 @@ written out between the fields:
This version of @command{cut} relies on @command{gawk}'s @code{FIELDWIDTHS}
variable to do the character-based cutting. While it is possible in
-other @command{awk} implementations to use @code{substr}
+other @command{awk} implementations to use @code{substr()}
(@pxref{String Functions}),
it is also extremely painful.
The @code{FIELDWIDTHS} variable supplies an elegant solution to the problem
@@ -21467,8 +21679,8 @@ arguments and perform in the same way.
@c STARTOFRANGE filspl
@cindex files, splitting
-@cindex @code{split} utility
-The @code{split} program splits large text files into smaller pieces.
+@cindex @code{split()} utility
+The @code{split()} program splits large text files into smaller pieces.
Usage is as follows:
@example
@@ -21484,7 +21696,7 @@ instead of 1000. To change the name of the output files to something like
@file{myfileaa}, @file{myfileab}, and so on, supply an additional
argument that specifies the @value{FN} prefix.
-Here is a version of @code{split} in @command{awk}. It uses the @code{ord} and
+Here is a version of @code{split()} in @command{awk}. It uses the @code{ord} and
@code{chr} functions presented in
@ref{Ordinal Functions}.
@@ -21746,7 +21958,7 @@ The options for @command{uniq} are:
@table @code
@item -d
-Pnly print only repeated lines.
+Print only repeated lines.
@item -u
Print only nonrepeated lines.
@@ -21883,13 +22095,13 @@ simply returns one or zero depending upon the result of a simple string
comparison of @code{last} and @code{$0}. Otherwise, things get more
complicated.
If fields have to be skipped, each line is broken into an array using
-@code{split}
+@code{split()}
(@pxref{String Functions});
the desired fields are then joined back into a line using @code{join}.
The joined lines are stored in @code{clast} and @code{cline}.
If no fields are skipped, @code{clast} and @code{cline} are set to
@code{last} and @code{$0}, respectively.
-Finally, if characters are skipped, @code{substr} is used to strip off the
+Finally, if characters are skipped, @code{substr()} is used to strip off the
leading @code{charcount} characters in @code{clast} and @code{cline}. The
two strings are then compared and @code{are_equal} returns the result:
@@ -22393,7 +22605,7 @@ is how long to wait before setting off the alarm:
@end example
@cindex @command{sleep} utility
-Finally, the program uses the @code{system} function
+Finally, the program uses the @code{system()} function
(@pxref{I/O Functions})
to call the @command{sleep} utility. The @command{sleep} utility simply pauses
for the given number of seconds. If the exit status is not zero,
@@ -22465,8 +22677,8 @@ but it does most of the job.
The @command{translate} program demonstrates one of the few weaknesses
of standard @command{awk}: dealing with individual characters is very
-painful, requiring repeated use of the @code{substr}, @code{index},
-and @code{gsub} built-in functions
+painful, requiring repeated use of the @code{substr()}, @code{index()},
+and @code{gsub()} built-in functions
(@pxref{String Functions}).@footnote{This
program was written before @command{gawk} acquired the ability to
split each character in a string into separate array elements.}
@@ -22567,7 +22779,7 @@ While it is possible to do character transliteration in a user-level
function, it is not necessarily efficient, and we (the @command{gawk}
authors) started to consider adding a built-in function. However,
shortly after writing this program, we learned that the System V Release 4
-@command{awk} had added the @code{toupper} and @code{tolower} functions
+@command{awk} had added the @code{toupper()} and @code{tolower()} functions
(@pxref{String Functions}).
These functions handle the vast majority of the
cases where character transliteration is necessary, and so we chose to
@@ -22769,8 +22981,8 @@ table of how frequently each word occurs.
@cindex @command{sort} utility
The way to solve these problems is to use some of @command{awk}'s more advanced
-features. First, we use @code{tolower} to remove
-case distinctions. Next, we use @code{gsub} to remove punctuation
+features. First, we use @code{tolower()} to remove
+case distinctions. Next, we use @code{gsub()} to remove punctuation
characters. Finally, we use the system @command{sort} utility to process the
output of the @command{awk} script. Here is the new version of
the program:
@@ -22967,7 +23179,7 @@ The following program, @file{extract.awk}, reads through a Texinfo source
file and does two things, based on the special comments.
Upon seeing @samp{@w{@@c system @dots{}}},
it runs a command, by extracting the command text from the
-control line and passing it on to the @code{system} function
+control line and passing it on to the @code{system()} function
(@pxref{I/O Functions}).
Upon seeing @samp{@@c file @var{filename}}, each subsequent line is sent to
the file @var{filename}, until @samp{@@c endfile} is encountered.
@@ -23008,7 +23220,7 @@ END @@@{ print "Always avoid bored archeologists!" @@@}
@file{extract.awk} begins by setting @code{IGNORECASE} to one, so that
mixed upper- and lowercase letters in the directives won't matter.
-The first rule handles calling @code{system}, checking that a command is
+The first rule handles calling @code{system()}, checking that a command is
given (@code{NF} is at least three) and also checking that the command
exits with a zero exit status, signifying OK:
@@ -23080,7 +23292,7 @@ Most of the work is in the following few lines. If the line has no @samp{@@}
symbols, the program can print it directly.
Otherwise, each leading @samp{@@} must be stripped off.
To remove the @samp{@@} symbols, the line is split into separate elements of
-the array @code{a}, using the @code{split} function
+the array @code{a}, using the @code{split()} function
(@pxref{String Functions}).
The @samp{@@} symbol is used as the separator character.
Each element of @code{a} that is empty indicates two successive @samp{@@}
@@ -23187,7 +23399,7 @@ command1 < orig.data | sed 's/old/new/g' | command2 > result
Here, @samp{s/old/new/g} tells @command{sed} to look for the regexp
@samp{old} on each input line and globally replace it with the text
@samp{new}, i.e., all the occurrences on a line. This is similar to
-@command{awk}'s @code{gsub} function
+@command{awk}'s @code{gsub()} function
(@pxref{String Functions}).
The following program, @file{awksed.awk}, accepts at least two command-line
@@ -23805,6 +24017,1242 @@ O+X*(o*(o+O)+O),+x+O+X*o,x*(x-o),(o+X+x)*o*o-(x-O-O),O+(X-x)*(X+O),x-O@}'
We leave it to you to determine what the program does.
+@c The original text for this chapter was contributed by Efraim Yawitz.
+@c FIXME: Add more indexing.
+
+@node Debugger
+@chapter @command{dgawk}: The @command{awk} Debugger
+@cindex @command{dgawk}
+
+It would be nice if computer programs worked perfectly the first time they
+were run, but in real life, this rarely happens for programs of
+any complexity. Thus, most programming languages have facilities available
+for ``debugging'' programs, and now @command{awk} is no exception.
+
+The @command{dgawk} debugger is purposely modeled after the GNU Debugger
+(GDB) command-line debugger. If you are familiar with GDB, learning
+@command{dgawk} is easy.
+
+@menu
+* Debugging:: Introduction to @command{dgawk}.
+* Sample dgawk session:: Sample @command{dgawk} session.
+* List of Debugger Commands:: Main @command{dgawk} Commands.
+* Readline Support:: Readline Support.
+* Dgawk Limitations:: Limitations and future plans.
+@end menu
+
+@node Debugging
+@section Introduction to @command{dgawk}
+
+@menu
+* Debugging Concepts:: Debugging In General.
+* Debugging Terms:: Additional Debugging Concepts.
+* Awk Debugging:: Awk Debugging.
+@end menu
+
+@node Debugging Concepts
+@subsection Debugging In General
+
+(If you have used debuggers in other languages, you may want to skip
+ahead to the next section on the specific features of the @command{awk}
+debugger.)
+
+Of course, a debugging program cannot remove bugs for you, since it has
+no way of knowing what you or your users consider a ``bug'' and what is a
+``feature.'' (Sometimes, we humans have a hard time with this ourselves.)
+In that case, what can you expect from such a tool? The answer to that
+depends on the language being debugged, but in general, it includes at
+least the following:
+
+@itemize @bullet
+@item
+The ability to watch a program execute its instructions one by one,
+giving you, the programmer, the opportunity to think about what is happening
+on a time scale of seconds, minutes, or hours, rather than the nanosecond
+time scale at which the code usually runs.
+
+@item
+The opportunity to not only passively observe the operation of your
+program, but to control it and try different paths of execution, without
+having to change your source files.
+
+@item
+The chance to see the values of data in the program at any point in
+execution, and also to change that data on the fly, to see how that
+effects what happens afterwards. (This often includes the ability
+to look at internal data structures besides the variables you actually
+defined in your code.)
+
+@item
+The ability to obtain additional information about your program's state
+or even its internal structure.
+@end itemize
+
+All of these tools provide a great amount of help in using your own
+skills and understanding of the goals of your program to find where it
+is going wrong (or, for that matter, to better comprehend a perfectly
+functional program that you or someone else wrote.)
+
+@node Debugging Terms
+@subsection Additional Debugging Concepts
+
+Before diving in to the details, we need to introduce a few more
+important concepts that apply to just about all debuggers, including
+@command{dgawk}.
+
+@table @dfn
+@item Stack Frame
+Programs generally call functions during the course of their execution.
+One function can call another, or a function can call itself (recursion).
+You can view the chain of called functions (main program calls A, which
+calls B, which calls C), as a stack of executing functions: the currently
+running function is the topmost one on the stack, and when it finishes
+(returns), the next one down then becomes the active function.
+Such a stack is termed a @dfn{call stack}.
+
+For each function on the call stack, the system maintains a data area
+that contains the function's parameters, local variables, and return value,
+as well as any other ``bookkeeping'' information needed to manage the
+call stack. This data area is termed a @dfn{stack frame}.
+
+@command{gawk} also follows this model, and @command{dgawk} gives you
+access to the call stack and to each stack frame. You can see the
+call stack, as well as from where each function on the stack was
+invoked. Commands that print the call stack print information about
+each stack frame (as detailed later on).
+
+@item Breakpoint
+During debugging, you often wish to let the program run until it
+reaches a certain point, and then continue execution from there one
+statement (or instruction) at a time. The way to do this is to set
+a @dfn{breakpoint} within the program. A breakpoint is where the
+execution of the program should break off (stop), so that you can
+take over control of the program's execution. You can add and remove
+as many breakpoints as you like.
+
+@item Watchpoint
+A watchpoint is similar to a breakpoint. The difference is that
+breakpoints are oriented around the code: stop when a certain point in the
+code is reached. A watchpoint, however, specifies that program execution
+should stop when a @emph{data value} is changed. This is useful, since
+sometimes it happens that a variable receives an erroneous value, and it's
+hard to track down where this happens just by looking at the code.
+By using a watchpoint, you can stop whenever a variable is assigned to,
+and usually find the errant code quite quickly.
+@end table
+
+@node Awk Debugging
+@subsection Awk Debugging
+
+Debugging an @command{awk} program has some specific aspects that are
+not shared with other programming languages.
+
+First of all, the fact that @command{awk} programs usually take input
+line-by-line from a file or files and operate on those lines using specific
+rules makes it especially useful to organize viewing the execution of
+the program in terms of these rules. As we will see, each @command{awk}
+rule is treated almost like a function call, with its own specific block
+of instructions.
+
+In addition, since @command{awk} is by design a very concise language,
+it is easy to lose sight of everything that is going on ``inside''
+each line of @command{awk} code. The debugger provides the opportunity
+to look at the individual primitive instructions carried out
+by the higher-level @command{awk} commands.
+
+@node Sample dgawk session
+@section Sample @command{dgawk} session
+
+In order to illustrate the use of @command{dgawk}, let's look at a sample
+debugging session. We will use the @command{awk} implementation of the
+POSIX @command{uniq} command described earlier (@pxref{Uniq Program})
+as our example.
+
+@menu
+* dgawk invocation:: @command{dgawk} Invocation.
+* Finding The Bug:: Finding The Bug.
+@end menu
+
+@node dgawk invocation
+@subsection @command{dgawk} Invocation
+
+Starting @command{dgawk} is exactly like running @command{awk}. The
+file(s) containing the program and any supporting code are given on the
+command line as arguments to one or more @option{-f} options.
+(@command{dgawk} is not designed to debug command-line
+programs, only programs contained in files.) In our case,
+we call @command{dgawk} like this:
+
+@example
+$ @kbd{dgawk -f getopt.awk -f join.awk -f uniq.awk inputfile}
+@end example
+
+@noindent
+where both @file{getopt.awk} and @file{uniq.awk} are in @env{$AWKPATH}.
+(Experienced users of @command{gdb} or similar debuggers should note that
+this syntax is slightly different from what they are used to.
+With @command{dgawk}, the arguments for running the program are given
+in the command line to the debugger rather than as part of the @code{run}
+command at the debugger prompt.)
+
+Instead of immediately running the program on @file{inputfile}, as
+@command{gawk} would ordinarily do, @command{dgawk} merely loads all
+the program source files, compiles them internally, and then gives
+us a prompt:
+
+@example
+dgawk>
+@end example
+
+@noindent
+from which we can issue commands to the debugger. At this point, no
+code has been executed.
+
+@node Finding The Bug
+@subsection Finding The Bug
+
+Let's say that we are having a problem using (a faulty version of)
+@file{uniq.awk} in the ``field-skipping'' mode, and it doesn't seem to be
+catching lines which should be identical when skipping the first field,
+such as:
+
+@example
+awk is a wonderful program!
+gawk is a wonderful program!
+@end example
+
+This could happen if we were thinking (C-like) of the fields in a record
+as being numbered in a zero-based fashion, so instead of the lines:
+
+@example
+clast = join(alast, fcount+1, n)
+cline = join(aline, fcount+1, m)
+@end example
+
+@noindent
+we wrote:
+
+@example
+clast = join(alast, fcount, n)
+cline = join(aline, fcount, m)
+@end example
+
+The first thing we usually want to do when trying to investigate a
+problem like this is to put a breakpoint in the program so that we can
+watch it at work and catch what it is doing wrong. A reasonable spot for
+a breakpoint in @file{uniq.awk} is at the beginning of the function
+@code{are_equal}, which compares the current line with the previous one. To set
+the breakpoint, use the @code{b} (breakpoint) command:
+
+@example
+dgawk> @kbd{b are_equal}
+@print{} Breakpoint 1 set at file `awklib/eg/prog/uniq.awk', line 64
+@end example
+
+The debugger tells us the file and line number where the breakpoint is.
+Now type @code{r} or @code{run} and the program runs until it hits
+the breakpoint the first time:
+
+@example
+dgawk> @kbd{r}
+@print{} Starting program:
+@print{} Stopping in Rule ...
+@print{} Breakpoint 1, are_equal(n, m, clast, cline, alast, aline) at `awklib/eg/prog/uniq.awk':64
+@print{} 64 if (fcount == 0 && charcount == 0)
+dgawk>
+@end example
+
+Now we can look at what's going on inside our program. First of all,
+let's see how we got to where we are. At the prompt, we type @code{bt}
+(short for ``backtrace''), and @command{dgawk} responds with a
+listing of the current stack frames:
+
+@example
+dgawk> @kbd{bt}
+@print{} #0 are_equal(n, m, clast, cline, alast, aline) at `awklib/eg/prog/uniq.awk':69
+@print{} #1 in main() at `awklib/eg/prog/uniq.awk':89
+@end example
+
+This tells us that @code{are_equal} was called by the main program at
+line 89 of @file{uniq.awk}. (This is not a big surprise, since this
+is the only call to @code{are_equal} in the program, but in more complex
+programs, knowing who called a function and with what parameters can be
+the key to finding the source of the problem.)
+
+Now that we're in @code{are_equal}, we can start looking at the values
+of some variables. Let's say we type @samp{p n}
+(@code{p} is short for ``print''). We would expect to see the value of
+@code{n}, a parameter to @code{are_equal}. Actually, @command{dgawk}
+gives us:
+
+@example
+dgawk> @kbd{p n}
+@print{} n = untyped variable
+@end example
+
+@noindent
+In this case, @code{n} is an uninitialized local variable, since the
+function was called without arguments (@pxref{Function Calls}).
+
+A more useful variable to display might be the current record:
+
+@example
+dgawk> @kbd{p $0}
+@print{} $0 = string ("gawk is a wonderful program!")
+@end example
+
+@noindent
+This might be a bit puzzling at first since this is the second line of
+our test input above. Let's look at @code{NR}:
+
+@example
+dgawk> @kbd{p NR}
+@print{} NR = number (2)
+@end example
+
+@noindent
+So we can see that @code{are_equal} was only called for the second record
+of the file. Of course, this is because our program contained a rule for
+@samp{NR == 1}:
+
+@example
+NR == 1 @{
+ last = $0
+ next
+@}
+@end example
+
+OK, let's just check that that rule worked correctly:
+
+@example
+dgawk> @kbd{p last}
+@print{} last = string ("awk is a wonderful program!")
+@end example
+
+Everything we have done so far has verified that the program has worked as
+planned, up to and including the call to @code{are_equal}, so the problem must
+be inside this function. To investigate further, we have to begin
+``stepping through'' the lines of @code{are_equal}. We start by typing
+@code{n} (for ``next''):
+
+@example
+dgawk> @kbd{n}
+@print{} 67 if (fcount > 0) @{
+@end example
+
+This tells us that @command{gawk} is now ready to execute line 67, which
+decides whether to give the lines the special ``field skipping'' treatment
+indicated by the @option{-f} command-line option. (Notice that we skipped
+from where we were before at line 64 to here, since the condition in line 64
+
+@example
+if (fcount == 0 && charcount == 0)
+@end example
+
+@noindent
+was false.)
+
+Continuing to step, we now get to the splitting of the current and
+last records:
+
+@example
+dgawk> @kbd{n}
+@print{} 68 n = split(last, alast)
+dgawk> @kbd{n}
+@print{} 69 m = split($0, aline)
+@end example
+
+At this point, we should be curious to see what our records were split
+into, so we try to look:
+
+@example
+dgawk> @kbd{p n m alast aline}
+@print{} n = number (5)
+@print{} m = number (5)
+@print{} alast = array, 5 elements
+@print{} aline = array, 5 elements
+@end example
+
+@noindent
+(The @code{p} command can take more than one argument, similar to
+@command{awk}'s @code{print} statement.)
+
+This is kind of disappointing, though. All we found out is that there
+are five elements in each of our arrays. Useful enough (we now know that
+none of the words were accidentally left out), but what if we want to see
+inside the array?
+
+The first choice would be to use subscripts:
+
+@example
+dgawk> @kbd{p alast[0]}
+@print{} "0" not in array `alast'
+@end example
+
+@noindent
+Oops!
+
+@example
+dgawk> @kbd{p alast[1]}
+@print{} alast["1"] = string ("awk")
+@end example
+
+This would be kind of slow for a 100-member array, though, so
+@command{dgawk} provides a shortcut (reminiscent of another language
+not to be mentioned):
+
+@example
+dgawk> @kbd{p @@alast}
+@print{} alast["4"] = string ("wonderful")
+@print{} alast["5"] = string ("program!")
+@print{} alast["1"] = string ("awk")
+@print{} alast["2"] = string ("is")
+@print{} alast["3"] = string ("a")
+@end example
+
+Ignoring the ordering of the elements for now (a @command{dgawk} internals
+issue), it looks like we got this far OK. Let's take another step
+or two:
+
+@example
+dgawk> @kbd{n}
+@print{} 70 clast = join(alast, fcount, n)
+dgawk> @kbd{n}
+@print{} 71 cline = join(aline, fcount, m)
+@end example
+
+Well, here we are at our error (sorry to spoil the supense). What we
+had in mind was to join the fields starting from the second one to make
+the virtual record to compare, and if the first field was numbered zero,
+this would work. Let's look at what we've got:
+
+@example
+dgawk> @kbd{p cline clast}
+@print{} cline = string ("gawk is a wonderful program!")
+@print{} clast = string ("awk is a wonderful program!")
+@end example
+
+Hey, those look pretty familiar! They're just our original, unaltered,
+input records. A little thinking (the human brain is still the best
+debugging tool), and we realize that we were off by one!
+
+We get out of @command{dgawk}:
+
+@example
+dgawk> @kbd{q}
+@print{} The program is running. Exit anyway (y/n)? @kbd{y}
+@end example
+
+@noindent
+Then we get into an editor:
+
+@example
+clast = join(alast, fcount+1, n)
+cline = join(aline, fcount+1, m)
+@end example
+
+@noindent
+and problem solved!
+
+@node List of Debugger Commands
+@section Main @command{dgawk} Commands
+
+The @command{dgawk} command set can be divided into the
+following categories:
+
+@itemize @bullet{}
+
+@item
+Breakpoint control
+
+@item
+Execution control
+
+@item
+Viewing and changing data
+
+@item
+Working with the stack
+
+@item
+Getting information
+
+@item
+Miscellaneous
+@end itemize
+
+Each of these are discussed in the following subsections.
+In the following descriptions, commands which may be abbreviated
+show the abbreviation on a second description line.
+A @command{dgawk} command name may also be truncated if that partial
+name is unambiguous. @command{dgawk} does have a built-in capability to
+automatically repeat the previous command when just hitting @key{Enter}.
+This works for the commands @code{list}, @code{next}, @code{nexti}, @code{step}, @code{stepi}
+and @code{continue} executed without any argument.
+
+@menu
+* Breakpoint Control:: Control of breakpoints.
+* Dgawk Execution Control:: Control of execution.
+* Viewing And Changing Data:: Viewing and changing data.
+* Dgawk Stack:: Dealing with the stack.
+* Dgawk Info:: Obtaining information about the program and
+ the debugger state.
+* Miscellaneous Dgawk Commands:: Miscellaneous Commands.
+@end menu
+
+@node Breakpoint Control
+@subsection Control Of Breakpoints
+
+As we saw above, the first thing you probably want to do in a debugging
+session is to get your breakpoints set up, since otherwise your program
+will just run as if it was not under the debugger. The commands for
+controlling breakpoints are:
+
+@table @asis
+@cindex debugger commands, @code{b} (@code{break})
+@cindex debugger commands, @code{break}
+@cindex @code{break} debugger command
+@cindex @code{b} debugger command (alias for @code{break})
+@item @code{break} [[@var{filename}@code{:}]@var{n} | @var{function}] [@code{"@var{expression}"}]
+@itemx @code{b} [[@var{filename}@code{:}]@var{n} | @var{function}] [@code{"@var{expression}"}]
+Without any argument, set a breakpoint at the next instruction
+to be executed in the selected stack frame.
+Arguments can be one of the following:
+
+@c nested table
+@table @var
+@item n
+Set a breakpoint at line number @var{n} in the current source file.
+
+@item filename@code{:}n
+Set a breakpoint at line number @var{n} in source file @var{filename}.
+
+@item function
+Set a breakpoint at entry to (the first instruction of)
+function @var{function}.
+@end table
+
+With a breakpoint, you may also supply a condition. This is an
+@command{awk} expression that @command{dgawk} evaluates whenever
+the breakpoint is reached. If the condition is true, then @command{dgawk}
+stops execution and prompts for a command. Otherwise, @command{dgawk}
+continues executing the program.
+
+@cindex debugger commands, @code{clear}
+@cindex @code{clear} debugger command
+@item @code{clear} [[@var{filename}@code{:}]@var{n} | @var{function}]
+Without any argument, delete any breakpoint at the next instruction
+to be executed in the selected stack frame. If the program stops at
+a breakpoint, this deletes that breakpoint so that the program
+does not stop at that location again.
+
+@c nested table
+@table @var
+@item n
+Delete breakpoint(s) set at line number @var{n} in the current source file.
+
+@item filename@code{:}n
+Delete breakpoint(s) set at line number @var{n} in source file @var{filename}.
+
+@item function
+Delete breakpoint(s) set at entry to function @var{function}.
+@end table
+
+@cindex debugger commands, @code{condition}
+@cindex @code{condition} debugger command
+@item @code{condition} @var{n} @code{"@var{expression}"}
+Add a condition to existing breakpoint or watchpoint @var{n}. The
+condition is an @command{awk} expression that @command{dgawk} evaluates
+whenever the breakpoint is reached. If the condition is true, then
+@command{dgawk} stops execution and prompts for a command. Otherwise,
+@command{dgawk} continues executing the program.
+
+@cindex debugger commands, @code{d} (@code{delete})
+@cindex debugger commands, @code{delete}
+@cindex @code{delete} debugger command
+@cindex @code{d} debugger command (alias for @code{break})
+@item @code{delete} [@var{n1 n2} @dots{}] [@var{n}--@var{m}]
+@itemx @code{d} [@var{n1 n2} @dots{}] [@var{n}--@var{m}]
+Delete specified breakpoints or a range of breakpoints. Deletes
+all defined breakpoints if no argument is supplied.
+
+@cindex debugger commands, @code{disable}
+@cindex @code{disable} debugger command
+@item @code{disable} [@var{n1 n2} @dots{} | @var{n}--@var{m}]
+Disable specified breakpoints or a range of breakpoints. Without
+any argument, disables all breakpoints.
+
+@cindex debugger commands, @code{e} (@code{enable})
+@cindex debugger commands, @code{enable}
+@cindex @code{enable} debugger command
+@cindex @code{e} debugger command (alias for @code{break})
+@item @code{enable} [@code{once} | @code{del}] [@var{n1 n2} @dots{}] [@var{n}--@var{m}]
+@itemx @code{e} [@code{once} | @code{del}] [@var{n1 n2} @dots{}] [@var{n}--@var{m}]
+Enable specified breakpoints or a range of breakpoints. Without
+any argument, enables all breakpoints.
+Optionally, you can specify how to enable the breakpoint:
+
+@c nested table
+@table @code
+@item del
+Enable breakpoint(s) tempoarily, then delete it when
+the program stops at the breakpoint.
+
+@item once
+Enable breakpoint(s) temporarily, then disable it when
+the program stops at the breakpoint.
+@end table
+
+@cindex debugger commands, @code{ignore}
+@cindex @code{ignore} debugger command
+@item @code{ignore} @var{n} @var{count}
+Ignore breakpoint number @var{n} the next @var{count} times it is
+hit.
+
+@cindex debugger commands, @code{t} (@code{tbreak})
+@cindex debugger commands, @code{tbreak}
+@cindex @code{tbreak} debugger command
+@cindex @code{t} debugger command (alias for @code{tbreak})
+@item @code{tbreak} [[@var{filename}@code{:}]@var{n} | @var{function}]
+@itemx @code{t} [[@var{filename}@code{:}]@var{n} | @var{function}]
+Set a temporary breakpoint (enabled for only one stop).
+@end table
+
+@node Dgawk Execution Control
+@subsection Control of Execution
+
+Now that your breakpoints are ready, you can start running the program
+and observing its behavior. There are more commands for controlling
+execution of the program than we saw in our earlier example:
+
+@table @asis
+@cindex debugger commands, @code{commands}
+@cindex @code{commands} debugger command
+@cindex debugger commands, @code{silent}
+@cindex @code{silent} debugger command
+@cindex debugger commands, @code{end}
+@cindex @code{end} debugger command
+@item @code{commands} [@var{n}]
+@itemx @code{silent}
+@itemx @dots{}
+@itemx @code{end}
+Set a list of commands to be executed upon stopping at
+a breakpoint or watchpoint. @var{n} is the breakpoint or watchpoint number.
+Without a number, last one set is used. The actual commands follow
+starting on the next line and are terminated by the @code{end} command.
+If the command @code{silent} is in the list, the usual messages about
+stopping at a breakpoint and the source line are not printed. Any command
+in the list that resumes execution (e.g. @code{continue}) terminates the list
+(an implicit @code{end}), and subsequent commands are ignored.
+For example:
+
+@example
+dgawk> @kbd{commands}
+> @kbd{silent}
+> @kbd{printf "A silent breakpoint; i = %d\n", i}
+> @kbd{info locals}
+> @kbd{set i = 10}
+> @kbd{continue}
+> @kbd{end}
+dgawk>
+@end example
+
+@cindex debugger commands, @code{c} (@code{continue})
+@cindex debugger commands, @code{continue}
+@item @code{continue} [@var{count}]
+@itemx @code{c} [@var{count}]
+Resume program execution. If continued from a breakpoint and @var{count} is
+specified, ignores the breakpoint at that location the next @var{count} times
+before stopping.
+
+@cindex debugger commands, @code{finish}
+@cindex @code{finish} debugger command
+@item @code{finish}
+Execute until the selected stack frame returns.
+Prints the returned value.
+
+@cindex debugger commands, @code{n} (@code{next})
+@cindex debugger commands, @code{next}
+@cindex @code{next} debugger command
+@cindex @code{n} debugger command (alias for @code{next})
+@item @code{next} [@var{count}]
+@itemx @code{n} [@var{count}]
+Continue execution to the next source line, stepping over function calls.
+The argument @var{count} controls how many times to repeat the action, as
+in @code{step}.
+
+@cindex debugger commands, @code{ni} (@code{nexti})
+@cindex debugger commands, @code{nexti}
+@cindex @code{nexti} debugger command
+@cindex @code{ni} debugger command (alias for @code{nexti})
+@item @code{nexti} [@var{count}]
+@itemx @code{ni} [@var{count}]
+Execute one (or @var{count}) instruction(s), stepping over function calls.
+
+@cindex debugger commands, @code{return}
+@cindex @code{return} debugger command
+@item @code{return} [@var{value}]
+Cancel execution of a function call. If @var{value} (either a string or a
+number) is specified, it is used as the function's return value. If used in a
+frame other than the innermost one (the currently executing function, i.e.,
+frame number 0), discard all inner frames in addition to the selected one,
+and the caller of that frame becomes the innermost frame.
+
+@cindex debugger commands, @code{r} (@code{run})
+@cindex debugger commands, @code{run}
+@cindex @code{run} debugger command
+@cindex @code{r} debugger command (alias for @code{run})
+@item @code{run}
+@itemx @code{r}
+Start/restart execution of the program. When restarting, @command{dgawk}
+retains the current breakpoints, watchpoints, command history,
+automatic display variables, and debugger options.
+
+@cindex debugger commands, @code{s} (@code{step})
+@cindex debugger commands, @code{step}
+@cindex @code{step} debugger command
+@cindex @code{s} debugger command (alias for @code{step})
+@item @code{step} [@var{count}]
+@itemx @code{s} [@var{count}]
+Continue execution until control reaches a different source line in the
+current stack frame. @code{step} steps inside any function called within
+the line. If the argument @var{count} is supplied, steps that many times before
+stopping, unless it encounters a breakpoint or watchpoint.
+
+@cindex debugger commands, @code{si} (@code{stepi})
+@cindex debugger commands, @code{stepi}
+@cindex @code{stepi} debugger command
+@cindex @code{si} debugger command (alias for @code{stepi})
+@item @code{stepi} [@var{count}]
+@itemx @code{si} [@var{count}]
+Execute one (or @var{count}) instruction(s), stepping inside function calls.
+(For illustration of what is meant by an ``instruction'' in @command{gawk},
+see the output shown under @code{dump} in @ref{Miscellaneous Dgawk Commands}).
+
+@cindex debugger commands, @code{u} (@code{until})
+@cindex debugger commands, @code{until}
+@cindex @code{until} debugger command
+@cindex @code{u} debugger command (alias for @code{until})
+@item @code{until} [[@var{filename}@code{:}]@var{n} | @var{function}]
+@itemx @code{u} [[@var{filename}@code{:}]@var{n} | @var{function}]
+Without any argument, continues execution until a line past the current
+line in current stack frame is reached. With argument,
+continues execution until the specified location is reached, or the current
+stack frame returns.
+@end table
+
+@node Viewing And Changing Data
+@subsection Viewing and Changing Data
+
+The commands for viewing and changing variables inside of @command{gawk} are:
+
+@table @asis
+@cindex debugger commands, @code{display}
+@cindex @code{display} debugger command
+@item @code{display} [@var{var} | @code{$}@var{n}]
+Add variable @var{var} (or field @code{$@var{n}}) to the display list.
+The value of the variable or field is displayed each time the program stops.
+Each variable added to the list is identified by a unique number:
+
+@example
+dgawk> @kbd{display x}
+@print{} 10: x = 1
+@end example
+
+@noindent
+displays the assigned item number, the variable name and its current value.
+If the display variable refers to a function parameter, it is silently
+deleted from the list as soon as the execution reaches a context where
+no such variable of the given name exists.
+Without argument, @code{display} displays the current values of
+items on the list.
+
+@cindex debugger commands, @code{eval}
+@cindex @code{eval} debugger command
+@item @code{eval "@var{awk statements}"}
+Evaluate @var{awk statements} in the context of the running program.
+You can do anything that an @command{awk} program would do: assign
+values to variables, call functions, and so on.
+
+@item @code{eval} @var{param}, @dots{}
+@itemx @var{awk statements}
+@itemx @code{end}
+This form of @code{eval} is similar, but it allows you to define
+``local variables'' that exist in the context of the
+@var{awk statements}, instead of using variables or function
+parameters defined by the program.
+
+@cindex debugger commands, @code{p} (@code{print})
+@cindex debugger commands, @code{print}
+@cindex @code{print} debugger command
+@cindex @code{p} debugger command (alias for @code{print})
+@item @code{print} @var{var1}[@code{,} @var{var2} @dots{}]
+@itemx @code{p} @var{var1}[@code{,} @var{var2} @dots{}]
+Print the value of a @command{gawk} variable or field.
+Fields must be referenced by constants:
+
+@example
+dgawk> @kbd{print $3}
+@end example
+
+@noindent
+prints the third field in the input record (if the specified field does not
+exist, it prints @samp{Null field}). A variable can be an array element, with
+the subscripts being constant values. To print the contents of an array,
+prefix the name of the array with the @samp{@@} symbol:
+
+@example
+gawk> @kbd{print @@a}
+@end example
+
+@noindent
+prints the index and the corresponding value for all elements in
+the array @code{a}.
+
+@cindex debugger commands, @code{printf}
+@cindex @code{printf} debugger command
+@item @code{printf} @var{format} [@code{,} @var{arg} @dots{}]
+Print formatted text. The @var{format} may include escape sequences,
+such as @samp{\n}
+(@pxref{Escape Sequences}).
+No newline is printed unless one is specified.
+
+@cindex debugger commands, @code{set}
+@cindex @code{set} debugger command
+@item @code{set} @var{var}@code{=}@var{value}
+Assign a constant (number or string) value to an @command{awk} variable
+or field.
+String values must be enclosed between double quotes (@code{"@dots{}"}).
+
+You can also set special @command{awk} variables, such as @code{FS},
+@code{NF}, @code{NR}, etc.
+
+@cindex debugger commands, @code{w} (@code{watch})
+@cindex debugger commands, @code{watch}
+@cindex @code{watch} debugger command
+@cindex @code{w} debugger command (alias for @code{watch})
+@item @code{watch} @var{var} | @code{$}@var{n} [@code{"@var{expression}"}]
+@itemx @code{w} @var{var} | @code{$}@var{n} [@code{"@var{expression}"}]
+Add variable @var{var} (or field @code{$@var{n}}) to the watch list.
+@command{dgawk} then stops whenever
+the value of the variable or field changes. Each watched item is assigned a
+number which can be used to delete it from the watch list using the
+@code{unwatch} command.
+
+With a watchpoint, you may also supply a condition. This is an
+@command{awk} expression that @command{dgawk} evaluates whenever
+the watchpoint is reached. If the condition is true, then @command{dgawk}
+stops execution and prompts for a command. Otherwise, @command{dgawk}
+continues executing the program.
+
+@cindex debugger commands, @code{undisplay}
+@cindex @code{undisplay} debugger command
+@item @code{undisplay} [@var{n}]
+Remove item number @var{n} (or all items, if no argument) from the
+automatic display list.
+
+@cindex debugger commands, @code{unwatch}
+@cindex @code{unwatch} debugger command
+@item @code{unwatch} [@var{n}]
+Remove item number @var{n} (or all items, if no argument) from the
+watch list.
+
+@end table
+
+@node Dgawk Stack
+@subsection Dealing With The Stack
+
+Whenever you run a program which contains any function calls,
+@command{gawk} maintains a stack which has all of the functions leading up
+to where the program is right now. You can see how you got to where you are,
+and also move around in the stack to see what the state of things was in the
+functions which called the one you are in. The commands for doing this are:
+
+@table @asis
+@cindex debugger commands, @code{bt} (@code{backtrace})
+@cindex debugger commands, @code{backtrace}
+@cindex @code{backtrace} debugger command
+@cindex @code{bt} debugger command (alias for @code{backtrace})
+@item @code{backtrace} [@var{count}]
+@itemx @code{bt} [@var{count}]
+Print a backtrace of all function calls (stack frames), or innermost @var{count}
+frames if @var{count} > 0. Print the outermost @var{count} frames if
+@var{count} < 0. The backtrace displays the name and arguments to each
+function, the source @value{FN}, and the line number.
+
+@cindex debugger commands, @code{down}
+@cindex @code{down} debugger command
+@item @code{down} [@var{count}]
+Move @var{count} (default 1) frames down the stack toward the innermost frame.
+Then select and print the frame.
+
+@cindex debugger commands, @code{f} (@code{frame})
+@cindex debugger commands, @code{frame}
+@cindex @code{frame} debugger command
+@cindex @code{f} debugger command (alias for @code{frame})
+@item @code{frame} [@var{n}]
+@itemx @code{f} [@var{n}]
+Select and print (frame number, function and argument names, source file,
+and the source line) stack frame @var{n}. Frame 0 is the currently executing,
+or @dfn{innermost}, frame (function call), frame 1 is the frame that called the
+innermost one. The highest numbered frame is the one for the main program.
+
+@cindex debugger commands, @code{up}
+@cindex @code{up} debugger command
+@item @code{up} [@var{count}]
+Move @var{count} (default 1) frames up the stack toward the outermost frame.
+The select and print the frame.
+@end table
+
+@node Dgawk Info
+@subsection Obtaining Information About The Program and The Debugger State
+
+Besides looking at the values of variables, there is often a need to get
+other sorts of information about the state of your program and of the
+debugging environment itself. @command{dgawk} has one command which
+provides this information, appropriately called @code{info}. @code{info}
+is used with one of a number of arguments which tell it exactly what
+you want to know:
+
+@table @asis
+@cindex debugger commands, @code{i} (@code{info})
+@cindex debugger commands, @code{info}
+@cindex @code{info} debugger command
+@cindex @code{i} debugger command (alias for @code{info})
+@item @code{info} @var{what}
+@itemx @code{i} @var{what}
+The value for @var{what} should be one of the following:
+
+@c nested table
+@table @code
+@item args
+Arguments of the selected frame.
+
+@item break
+List all currently set breakpoints.
+
+@item display
+List of all items in the automatic display list.
+
+@item frame
+Description of the selected stack frame.
+
+@item functions
+List all function definitions including source file names and
+line numbers.
+
+@item locals
+Local variables of the selected frame.
+
+@item source
+The name of the current source file. Each time the program stops, the
+current source file is the file containing the current instruction.
+When @command{dgawk} first starts, the current source file is the first file
+included via the @option{-f} option. The
+@samp{list @var{filename}:@var{lineno}} command can
+be used at any time to change the current source.
+
+@item sources
+List all program sources.
+
+@item variables
+List all global variables.
+
+@item watch
+List of all items in the watch list.
+@end table
+@end table
+
+Additional commands give you control over the debugger, the ability to
+save the debugger's state, and the ability to run debugger commands
+from a file. The commands are:
+
+@table @asis
+@cindex debugger commands, @code{o} (@code{option})
+@cindex debugger commands, @code{option}
+@cindex @code{option} debugger command
+@cindex @code{o} debugger command (alias for @code{option})
+@item @code{option} [@var{name}[@code{=}@var{value}]]
+@itemx @code{o} [@var{name}[@code{=}@var{value}]]
+Without an argument, display the available debugger options
+and their current values. @samp{option @var{name}} shows the current
+value of the named option. @samp{option @var{name}=@var{value}} assigns
+a new value to the named option.
+The available options are:
+
+@c nested table
+@table @code
+@item history_size
+The maximum number of lines to keep in the history file @file{./.dgawk_history}.
+The default is 100.
+
+@item listsize
+The number of lines that @code{list} prints. The default is 15.
+
+@item outfile
+Sends @command{gawk} output to a file; debugger output still goes
+to standard output. An empty string (@code{""}) resets output to
+standard output.
+
+@item prompt
+The debugger prompt. The default is @samp{dgawk>}.
+
+@item save_history @r{[}on @r{|} off@r{]}
+Save command history to file @file{./.dgawk_history}.
+The default is @code{on}.
+
+@item save_options @r{[}on @r{|} off@r{]}
+Save current options to file @file{./.dgawkrc} upon exit.
+The default is @code{on}.
+Options are read back in to the next session upon startup.
+
+@item trace @r{[}on @r{|} off@r{]}
+Turn instruction tracing on or off. The default is @code{off}.
+@end table
+
+@item @code{save} @var{filename}
+Save the commands from the current session to the given @value{FN},
+so that they can be replayed using the @command{source} command.
+
+@item @code{source} @var{filename}
+Run command(s) from a file; an error in any command does not
+terminate execution of subsequent commands. Comments (lines starting
+with @samp{#}) are allowed in a command file.
+Empty lines are ignored; they do @emph{not}
+repeat the last command.
+You can't restart the program by having more than one @code{run}
+command in the file. Also, the list of commands may include additional
+@code{source} commands; however, @command{dgawk} will not source the
+same file more than once in order to avoid infinite recursion.
+
+In addition to, or instead of the @code{source} command, you can use
+the @option{-R @var{file}} or @option{--command=@var{file}} command-line
+options to execute commands from a file non-interactively.
+@end table
+
+@node Miscellaneous Dgawk Commands
+@subsection Miscellaneous Commands
+
+There are a few more commands which do not fit into the
+previous categories, as follows:
+
+@table @asis
+@cindex debugger commands, @code{dump}
+@cindex @code{dump} debugger command
+@item @code{dump} [@var{filename}]
+Dump bytecode of the program to standard output or to the file
+named in @var{filename}. This prints a representation of the internal
+instructions which @command{gawk} executes to implement the @command{awk}
+commands in a program. This can be very enlightening, as the following
+partial dump of Davide Brini's obfuscated code
+(@pxref{Signature Program}) demonstrates:
+
+@smallexample
+dgawk> @kbd{dump}
+@print{} # BEGIN
+@print{}
+@print{} [ 2:0x1d4355f0] Op_rule : [in_rule = BEGIN] [source_file = brini.awk]
+@print{} [ 3:0x1d435710] Op_push_i : "~" [MALLOC|PERM|STRING|STRCUR]
+@print{} [ 3:0x1d4357c0] Op_push_i : "~" [MALLOC|PERM|STRING|STRCUR]
+@print{} [ 3:0x1d435790] Op_match :
+@print{} [ 3:0x1d435680] Op_push_lhs : O [do_reference = FALSE]
+@print{} [ 3:0x1d4356b0] Op_assign :
+@print{} [ :0x1d4356e0] Op_pop :
+@print{} [ 4:0x1d4358c0] Op_push_i : "==" [MALLOC|PERM|STRING|STRCUR]
+@print{} [ 4:0x1d435970] Op_push_i : "==" [MALLOC|PERM|STRING|STRCUR]
+@print{} [ 4:0x1d435940] Op_equal :
+@print{} [ 4:0x1d435810] Op_push_lhs : o [do_reference = FALSE]
+@print{} [ 4:0x1d435860] Op_assign :
+@print{} [ :0x1d435890] Op_pop :
+@print{} [ 5:0x1d435a70] Op_push : o
+@print{} [ 5:0x1d435a40] Op_plus_i : 0 [MALLOC|NUMCUR|NUMBER]
+@print{} [ 5:0x1d4359c0] Op_push_lhs : o [do_reference = TRUE]
+@print{} [ 5:0x1d435910] Op_assign_plus :
+@print{} [ :0x1d435a10] Op_pop :
+@print{} [ 6:0x1d435b50] Op_push : O
+@print{} [ 6:0x1d435b80] Op_push_i : "" [MALLOC|PERM|STRING|STRCUR]
+@print{} [ :0x1d435c60] Op_no_op :
+@print{} [ 6:0x1d435c30] Op_push : O
+@print{} [ :0x1d435c90] Op_concat : [expr_count = 3]
+@print{} [ 6:0x1d435ad0] Op_push_lhs : x [do_reference = FALSE]
+@print{} [ 6:0x1d435aa0] Op_assign :
+@print{} [ :0x1d435b00] Op_pop :
+@print{} [ 7:0x1d435c00] Op_push_loop : [target_continue = 0x1d435bd0] [target_break = 0x1d435fc0]
+@print{} [ 7:0x1d435bd0] Op_push_lhs : X [do_reference = TRUE]
+@print{} [ 7:0x1d435cc0] Op_postincrement :
+@print{} [ 7:0x1d435d70] Op_push : x
+@print{} [ 7:0x1d435e00] Op_push : o
+@print{} [ 7:0x1d435da0] Op_plus :
+@print{} [ 7:0x1d435e60] Op_push : o
+@print{} [ 7:0x1d435e30] Op_plus :
+@print{} [ 7:0x1d435d20] Op_leq :
+@print{} [ :0x1d435cf0] Op_jmp_false : [target_jmp = 0x1d435fc0]
+@print{} [ 8:0x1d435f40] Op_push_i : "%c" [MALLOC|PERM|STRING|STRCUR]
+@print{} [ :0x1d435ff0] Op_no_op :
+@print{} [ 8:0x1d435dd0] Op_push_lhs : c [do_reference = FALSE]
+@print{} [ 8:0x1d435e90] Op_assign_concat :
+@print{} [ :0x1d435ec0] Op_pop :
+@print{} [ :0x1d435f90] Op_jmp : [target_jmp = 0x1d435bd0]
+@print{} [ :0x1d435fc0] Op_pop_loop :
+@print{}
+@print{} @dots{}
+@print{}
+@print{} [ 9:0x1d435f10] Op_K_printf : [expr_count = 17] [redir_type = Op_illegal]
+@print{} [ :0x1d435180] Op_no_op :
+@print{} [ :0x1d435240] Op_exit : [exit_value = 0]
+dgawk>
+@end smallexample
+
+@cindex debugger commands, @code{h} (@code{help})
+@cindex debugger commands, @code{help}
+@cindex @code{help} debugger command
+@cindex @code{h} debugger command (alias for @code{help})
+@item @code{help}
+@itemx @code{h}
+Print a list of all of the @command{dgawk} commands with a short
+summary of their usage. @samp{help @var{command}} prints the information
+about the command @var{command}.
+
+@cindex debugger commands, @code{l} (@code{list})
+@cindex debugger commands, @code{list}
+@cindex @code{list} debugger command
+@cindex @code{l} debugger command (alias for @code{list})
+@item @code{list} [@code{-} | @code{+} | @var{n} | @var{filename@code{:}n} | @var{n}---@var{m} | @var{function}]
+@itemx @code{l} [@code{-} | @code{+} | @var{n} | @var{filename@code{:}n} | @var{n}---@var{m} | @var{function}]
+Print the specified lines (default 15) from the current source file
+or the file named @var{filename}. The possible arguments to @code{list}
+are as follows:
+
+@c nested table
+@table @asis
+@item @code{-}
+Print lines before the lines last printed.
+
+@item @code{+}
+Print lines after the lines last printed.
+@code{list} without any argument does the same thing.
+
+@item @var{n}
+Print lines centered around line number @var{n}.
+
+@item @var{n}---@var{m}
+Print lines from @var{n} to @var{m}.
+
+@item @var{filename@code{:}n}
+Print lines centered around line number @var{n} in
+source file @var{filename}. This command may change the current source file.
+
+@item @var{function}
+Print lines centered around beginning of the
+function @var{function}. This command may change the current source file.
+@end table
+
+@cindex debugger commands, @code{q} (@code{quit})
+@cindex debugger commands, @code{quit}
+@cindex @code{quit} debugger command
+@cindex @code{q} debugger command (alias for @code{quit})
+@item @code{quit}
+@itemx @code{q}
+Exit the debugger. Debugging is great fun, but sometimes we all have
+to tend to other obligations in life (and sometimes we find the bug,
+and are free to go on to the next one!). As we saw above, if you are
+running a program, @command{dgawk} warns you if you accidentally type
+@code{q} or @code{quit}, to make sure you really want to quit.
+
+@cindex debugger commands, @code{trace}
+@cindex @code{trace} debugger command
+@item @code{trace} @code{on} | @code{off}
+Turn on or off a continuous printing of instructions which are about to
+be executed, along with printing the @command{awk} line which they
+implement. The default is @code{off}.
+
+It is to be hoped that most of the ``opcodes'' in these instructions are
+fairly self-explanatory, and using @code{stepi} and @code{nexti} while
+@code{trace} is on will make them into familiar friends.
+
+@end table
+
+@node Readline Support
+@section Readline Support
+
+If compiled with the @code{readline} library, you can take advantage of
+its command completion and history expansion features. The following types
+of completion are available:
+
+@table @asis
+@item Command completion
+Command names.
+
+@item Source @value{FN} completion
+Source @value{FN}s. Relevant commands are
+@code{break},
+@code{clear},
+@code{list},
+@code{tbreak},
+and
+@code{until}.
+
+@item Argument completion
+Non-numeric arguments to a command.
+Relevant commands are @code{info} and @code{enable}.
+
+@item Variable name completion
+Global variable names, and function arguments in the current context
+if the program is running. Relevant commands are
+@code{display},
+@code{print},
+@code{set},
+and
+@code{watch}.
+
+@end table
+
+@node Dgawk Limitations
+@section Limitations and Future Plans
+
+We hope you find @command{dgawk} useful and enjoyable to work with,
+but as with any program, especially in its early releases, it still has
+some limitations. A few which are worth being aware of are:
+
+@itemize @bullet{}
+@item
+At this point, @command{dgawk} does not give a detailed explanation of
+what you did wrong when you type in something it doesn't like. Rather, it just
+responds @samp{syntax error}. When you do figure out what your mistake was,
+though, you'll feel like a real guru.
+
+@item
+If you perused the dump of opcodes in @xref{Miscellaneous Dgawk Commands},
+(or you are already familiar with @command{gawk} internals),
+you will realize that much of the internal manipulation of data
+in @command{gawk}, as in many interpreters, is done on a stack.
+@code{Op_push}, @code{Op_pop}, etc., are the ``bread and butter'' of
+most @command{gawk} code. Unfortunately, as of now, @command{dgawk}
+does not provide the capability of examining the stack's contents.
+
+That is, the intermediate results of expression evaluation are on the
+stack, but cannot be printed. Rather, only variables which are defined
+in the program can actually be printed. Of course, a workaround for
+this is to use more explicit variables at the debugging stage and then
+change back to obscure, perhaps more optimal code later.
+
+@item
+There is no way right now to look ``inside'' the process of compiling
+regular expressions to see if you got it right. As an @command{awk}
+programmer, you are expected to know what @code{/[^[:alnum:][:blank:]]/}
+means.
+
+@item
+@command{dgawk} is designed to be used by running a program (with all its
+parameters) on the command line, as described in @ref{dgawk invocation}.
+There is no way (as of now) to attach or ``break in'' to a running program.
+This seems reasonable for a language which is used mainly for quickly
+executing, short programs.
+@end itemize
+
+Look forward to a future release when these and other missing features may
+be added, and of course feel free to try to add them yourself if you want.
+
@ignore
@c Try this
@iftex
@@ -23901,15 +25349,15 @@ The @code{do}-@code{while} statement
(@pxref{Do Statement}).
@item
-The built-in functions @code{atan2}, @code{cos}, @code{sin}, @code{rand}, and
-@code{srand} (@pxref{Numeric Functions}).
+The built-in functions @code{atan2()}, @code{cos()}, @code{sin()}, @code{rand()}, and
+@code{srand()} (@pxref{Numeric Functions}).
@item
-The built-in functions @code{gsub}, @code{sub}, and @code{match}
+The built-in functions @code{gsub()}, @code{sub()}, and @code{match()}
(@pxref{String Functions}).
@item
-The built-in functions @code{close} and @code{system}
+The built-in functions @code{close()} and @code{system()}
(@pxref{I/O Functions}).
@item
@@ -23939,7 +25387,7 @@ programs (@pxref{Precedence}).
@item
Regexps as the value of @code{FS}
(@pxref{Field Separators}) and as the
-third argument to the @code{split} function
+third argument to the @code{split()} function
(@pxref{String Functions}), rather than using only the first character
of @code{FS}.
@@ -23999,11 +25447,11 @@ The @samp{\a}, @samp{\v}, and @samp{\x} escape sequences
@c GNU, for ANSI C compat
@item
-A defined return value for the @code{srand} built-in function
+A defined return value for the @code{srand()} built-in function
(@pxref{Numeric Functions}).
@item
-The @code{toupper} and @code{tolower} built-in string functions
+The @code{toupper()} and @code{tolower()} built-in string functions
for case translation
(@pxref{String Functions}).
@@ -24091,9 +25539,13 @@ The locale's decimal point character is used for parsing input
data (@pxref{Locales}).
@item
-The @code{fflush} built-in function is not supported
+The @code{fflush()} built-in function is not supported
(@pxref{I/O Functions}).
@end itemize
+
+The 2008 POSIX standard can be found online at
+@url{http://www.opengroup.org/onlinepubs/9699919799/}.
+
@c ENDOFRANGE gawkv
@node BTL
@@ -24119,7 +25571,7 @@ As a side note, his @command{awk} no longer needs these options;
it continues to accept them to avoid breaking old programs.
@item
-The @code{fflush} built-in function for flushing buffered output
+The @code{fflush()} built-in function for flushing buffered output
(@pxref{I/O Functions}).
@item
@@ -24156,7 +25608,7 @@ special files
@item
The ability for @code{FS} and for the third
-argument to @code{split} to be null strings
+argument to @code{split()} to be null strings
(@pxref{Single Character Fields}).
@item
@@ -24165,12 +25617,12 @@ The @code{nextfile} statement
@item
The ability to delete all of an array at once with @samp{delete @var{array}}
-(@pxref{String Functions}).
+(@pxref{Delete}).
@item
-The ability for the @code{length} function to accept an array argument and
+The ability for the @code{length()} function to accept an array argument and
return the number of elements in the array.
-(@pxref{Delete}).
+(@pxref{String Functions}).
@end itemize
@node POSIX/GNU
@@ -24227,7 +25679,7 @@ The @code{FIELDWIDTHS} variable and its effects
(@pxref{Constant Size}).
@item
-The @code{systime} and @code{strftime} built-in functions for obtaining
+The @code{systime()} and @code{strftime()} built-in functions for obtaining
and printing timestamps
(@pxref{Time Functions}).
@@ -24262,7 +25714,7 @@ through @code{ARGV} (@pxref{Built-in Variables}).
@item
The @code{ERRNO} variable, which contains the system error message when
-@code{getline} returns @minus{}1 or @code{close} fails
+@code{getline} returns @minus{}1 or @code{close()} fails
(@pxref{Built-in Variables}).
@item
@@ -24302,17 +25754,17 @@ Full support for both POSIX and GNU regexps
(@pxref{Regexp}).
@item
-The @code{gensub} function for more powerful text manipulation
+The @code{gensub()} function for more powerful text manipulation
(@pxref{String Functions}).
@item
-The @code{strftime} function acquired a default time format,
+The @code{strftime()} function acquired a default time format,
allowing it to be called with no arguments
(@pxref{Time Functions}).
@item
The ability for @code{FS} and for the third
-argument to @code{split} to be null strings
+argument to @code{split()} to be null strings
(@pxref{Single Character Fields}).
@item
@@ -24330,7 +25782,7 @@ the original Version 7 Unix version of @command{awk}
(@pxref{V7/SVR3.1}).
@item
-The @option{-m} option and the @code{fflush} function from the
+The @option{-m} option and the @code{fflush()} function from the
Bell Laboratories research version of @command{awk}
(@pxref{Options}; also
@pxref{I/O Functions}).
@@ -24392,12 +25844,12 @@ The @file{/inet} special files for TCP/IP networking using @samp{|&}
(@pxref{TCP/IP Networking}).
@item
-The optional second argument to @code{close} that allows closing one end
+The optional second argument to @code{close()} that allows closing one end
of a two-way pipe to a coprocess
(@pxref{Two-way I/O}).
@item
-The optional third argument to the @code{match} function
+The optional third argument to the @code{match()} function
for capturing text-matching subexpressions within a regexp
(@pxref{String Functions}).
@@ -24407,33 +25859,33 @@ making translations easier
(@pxref{Printf Ordering}).
@item
-The @code{asort} and @code{asorti} functions for sorting arrays
+The @code{asort()} and @code{asorti()} functions for sorting arrays
(@pxref{Array Sorting}).
@item
-The @code{bindtextdomain}, @code{dcgettext} and @code{dcngettext} functions
+The @code{bindtextdomain()}, @code{dcgettext()} and @code{dcngettext()} functions
for internationalization
(@pxref{Programmer i18n}).
@item
-The @code{extension} built-in function and the ability to add
+The @code{extension()} built-in function and the ability to add
new built-in functions dynamically
(@pxref{Dynamic Extensions}).
@item
-The @code{mktime} built-in function for creating timestamps
+The @code{mktime()} built-in function for creating timestamps
(@pxref{Time Functions}).
@item
The
-@code{and},
-@code{or},
-@code{xor},
-@code{compl},
-@code{lshift},
-@code{rshift},
+@code{and()},
+@code{or()},
+@code{xor()},
+@code{compl()},
+@code{lshift()},
+@code{rshift()},
and
-@code{strtonum} built-in
+@code{strtonum()} built-in
functions
(@pxref{Bitwise Functions}).
@@ -24468,9 +25920,10 @@ to use the locale's decimal point for parsing input data
(@pxref{Conversion}).
@item
-The @option{--enable-portals} configuration option to enable special treatment of
-pathnames that begin with @file{/p} as BSD portals
-(@pxref{Portal Files}).
+The @option{--enable-portals} configuration option to enable special
+treatment of pathnames that begin with @file{/p} as BSD portals. (This
+option is no longer available; the related code was removed since it
+was never used.)
@item
The use of GNU Automake to help in standardizing the configuration process
@@ -24503,13 +25956,13 @@ at compile time
@item
The @option{--with-whiny-user-strftime} configuration option
to force the use
-of the included version of the @code{strftime}
+of the included version of the @code{strftime()}
function for deficient systems
(@pxref{Additional Configuration Options}).
@item
-POSIX compliance for @code{sub} and @code{gsub}
+POSIX compliance for @code{sub()} and @code{gsub()}
(@pxref{Gory Details}).
@item
@@ -24517,12 +25970,12 @@ The @option{--exec} option, for use in CGI scripts
(@pxref{Options}).
@item
-The @code{length} function was extended to accept an array argument
+The @code{length()} function was extended to accept an array argument
and return the number of elements in the array
(@pxref{String Functions}).
@item
-The @code{strftime} function acquired a third argument to
+The @code{strftime()} function acquired a third argument to
enable printing times as UTC
(@pxref{Time Functions}).
@end itemize
@@ -24578,7 +26031,7 @@ The @code{FPAT} variable and its effects
(@pxref{Splitting By Content}).
@item
-The @code{patsplit} function
+The @code{patsplit()} function
(@pxref{String Functions}).
@item
@@ -24586,6 +26039,19 @@ The @file{/inet4} and @samp{/inet6} special files for TCP/IP networking
using @samp{|&} to specify which version of the IP protocol to use.
(@pxref{TCP/IP Networking}).
+@item
+The @option{--compat}, @option{--copyleft} and @option{--usage}
+options were removed.
+
+@item
+The @code{break} and @code{continue} statements may no longer
+be used outside a loop, even with @option{--traditional}
+(@pxref{Break Statement}, and
+@pxref{Continue Statement}).
+
+@item
+The @option{--enable-portals} configuration option was removed.
+
@end itemize
@c XXX ADD MORE STUFF HERE
@@ -24714,7 +26180,7 @@ the various PC platforms.
@item
@cindex Zoulas, Christos
Christos Zoulas
-provided the @code{extension}
+provided the @code{extension()}
built-in function for dynamically adding new modules.
@item
@@ -24748,9 +26214,9 @@ GNU Automake and @code{gettext}.
@item
@cindex Broder, Alan J.@:
Alan J.@: Broder
-provided the initial version of the @code{asort} function
+provided the initial version of the @code{asort()} function
as well as the code for the new optional third argument to the
-@code{match} function.
+@code{match()} function.
@item
@cindex Buening, Andreas
@@ -24829,6 +26295,8 @@ There are three ways to get GNU software:
@item
Copy it from someone else who already has it.
+@cindex FSF (Free Software Foundation)
+@cindex Free Software Foundation (FSF)
@item
Retrieve @command{gawk}
from the Internet host
@@ -25040,7 +26508,7 @@ Files needed for building @command{gawk} on a Tandem
Files needed for building @command{gawk} on POSIX-compliant systems.
@item pc/*
-Files needed for building @command{gawk} under MS-DOS, MS Windows and OS/2
+Files needed for building @command{gawk} under MS Windows and OS/2
(@pxref{PC Installation}, for details).
@item vms/*
@@ -25143,18 +26611,10 @@ command line when compiling @command{gawk} from scratch, including:
@table @code
-@cindex @code{--enable-portals} configuration option
-@cindex configuration option, @code{--enable-portals}
-@item --enable-portals
-Treat pathnames that begin
-with @file{/p} as BSD portal files when doing two-way I/O with
-the @samp{|&} operator
-(@pxref{Portal Files}).
-
@cindex @code{--with-whiny-user-strftime} configuration option
@cindex configuration option, @code{--with-whiny-user-strftime}
@item --with-whiny-user-strftime
-Force use of the included version of the @code{strftime}
+Force use of the included version of the @code{strftime()}
function for deficient systems
@cindex @code{--disable-lint} configuration option
@@ -25185,11 +26645,11 @@ This is usually not desirable, but it may bring you some slight performance
improvement.
@end table
-As of version 3.1.5, the @option{--with-included-gettext} configuration
+As of @value{PVERSION} 3.1.5, the @option{--with-included-gettext} configuration
option is no longer available, since @command{gawk} expects the
GNU @code{gettext} library to be installed as an external library.
-As of version 3.1.8, the @option{--disable-libsigsegv} configuration
+As of @value{PVERSION} 3.1.8, the @option{--disable-libsigsegv} configuration
option is no longer available, since @command{gawk} expects the
GNU @code{libsigsegv} library to be installed as an external library.
@@ -25468,7 +26928,7 @@ To build some of the example extension libraries, @command{cd} to the
extension directory and copy @file{Makefile.pc} to @file{Makefile}. You
can then build using the same two targets. To run the example
@command{awk} scripts, you'll need to either change the call to
-the @code{extension} function to match the name of the library (for
+the @code{extension()} function to match the name of the library (for
instance, change @code{"./ordchr.so"} to @code{"ordchr.dll"} or simply
@code{"ordchr"}), or rename the library to match the call (for instance,
rename @file{ordchr.dll} to @file{ordchr.so}).
@@ -25542,7 +27002,7 @@ E.g., if @env{UNIXROOT} is set to @file{e:} the complete default search path is
An @command{sh}-like shell (as opposed to @command{command.com} under MS-DOS
or @command{cmd.exe} under OS/2) may be useful for @command{awk} programming.
Ian Stewartson has written an excellent shell for MS-DOS and OS/2,
-Daisuke Aoyama has ported GNU @command{bash} to MS-DOS using the DJGPP tools,
+Daisuke Aoyama has ported GNU Bash to MS-DOS using the DJGPP tools,
and several shells are available for OS/2, including @command{ksh}. The file
@file{README_d/README.pc} in the @command{gawk} distribution contains
information on these shells. Users of Stewartson's shell on DOS should
@@ -25643,7 +27103,7 @@ moved into the @code{BEGIN} rule.
@command{gawk} can be used ``out of the box'' under Windows if you are
using the @uref{http://www.cygwin.com, Cygwin environment}.
This environment provides an excellent simulation of Unix, using the
-GNU tools, such as @command{bash}, the GNU Compiler Collection (GCC),
+GNU tools, such as Bash, the GNU Compiler Collection (GCC),
GNU Make, and other GNU tools. Compilation and installation for Cygwin
is the same as for a Unix system:
@@ -25662,7 +27122,7 @@ and then the @samp{make} proceeds as usual.
The @samp{|&} operator and TCP/IP networking
(@pxref{TCP/IP Networking})
are fully supported in the Cygwin environment. This is not true
-for any other environment for MS-DOS or MS-Windows.
+for any other environment for MS-Windows.
@end quotation
@node MSYS
@@ -25921,7 +27381,7 @@ from other environments. Pipes are nice to have but not vital.
A proper compilation of @command{gawk} sources when @code{sizeof(int)}
differs from @code{sizeof(void *)} requires an ISO C compiler. An initial
port was done with @command{gcc}. You may actually prefer executables
-where @code{int}s are four bytes wide but the other variant works as well.
+where @code{int()}s are four bytes wide but the other variant works as well.
You may need quite a bit of memory when trying to recompile the @command{gawk}
sources, as some source files (@file{regex.c} in particular) are quite
@@ -25930,7 +27390,7 @@ optimization level for this particular file, which may help.
@cindex Linux
@cindex GNU/Linux
-With a reasonable shell (@command{bash} will do), you have a pretty good chance
+With a reasonable shell (Bash will do), you have a pretty good chance
that the @command{configure} utility will succeed, and in particular if
you run GNU/Linux, MiNT or a similar operating system. Otherwise
sample versions of @file{config.h} and @file{Makefile.st} are given in the
@@ -25945,13 +27405,13 @@ Modify these sections as appropriate if they are not right for your
environment. Also see the remarks about @env{AWKPATH} and @code{envsep} in
@ref{Atari Using}.
-As shipped, the sample @file{config.h} claims that the @code{system}
+As shipped, the sample @file{config.h} claims that the @code{system()}
function is missing from the libraries, which is not true, and an
alternative implementation of this function is provided in
@file{unsupported/atari/system.c}.
Depending upon your particular combination of
shell and operating system, you might want to change the file to indicate
-that @code{system} is available.
+that @code{system()} is available.
@node Atari Using
@appendixsubsubsec Running @command{gawk} on the Atari ST
@@ -25999,7 +27459,7 @@ When @command{gawk} is compiled with the ST version of @command{gcc} and its
usual libraries, it accepts both @samp{/} and @samp{\} as path separators.
While this is convenient, it should be remembered that this removes one
technically valid character (@samp{/}) from your @value{FN}.
-It may also create problems for external programs called via the @code{system}
+It may also create problems for external programs called via the @code{system()}
function, which may not support this convention. Whenever it is possible
that a file created by @command{gawk} will be used by some other program,
use only backslashes. Also remember that in @command{awk}, backslashes in
@@ -26037,7 +27497,7 @@ $ make
$ make install
@end example
-BeOS uses @command{bash} as its shell; thus, you use @command{gawk} the same way you would
+BeOS uses Bash as its shell; thus, you use @command{gawk} the same way you would
under Unix.
If these steps do not work, please send in a bug report
(@pxref{Bugs}).
@@ -26198,7 +27658,7 @@ as follows:
@item Tandem @tab Stephen Davies, @email{scldad@@sdc.com.au}.
@cindex Woehlke, Matthew
-@item Tandem (POSIX-compliant) @tab Matthew Woehlke @tab @email{mw_triad@@users.sourceforge.net}
+@item Tandem (POSIX-compliant) @tab Matthew Woehlke, @email{mw_triad@@users.sourceforge.net}
@end ignore
@cindex Rankin, Pat
@@ -26298,7 +27758,7 @@ is similar to @command{gawk}'s
@itemize @bullet
@item
-The @code{fflush} built-in function for flushing buffered output
+The @code{fflush()} built-in function for flushing buffered output
(@pxref{I/O Functions}).
@item
@@ -26323,7 +27783,7 @@ Use @code{"-"} instead of @code{"/dev/stdin"} with @command{mawk}.
@item
The ability for @code{FS} and for the third
-argument to @code{split} to be null strings
+argument to @code{split()} to be null strings
(@pxref{Single Character Fields}).
@item
@@ -26447,7 +27907,7 @@ If @command{gawk} is compiled for debugging with @samp{-DDEBUG}, then there
is one more option available on the command line:
@table @code
-@item -W parsedebug
+@item -Y
@itemx --parsedebug
Prints out the parse stack information as the program is being parsed.
@end table
@@ -26539,7 +27999,7 @@ Use ANSI/ISO style (prototype) function headers when defining functions.
Put the name of the function at the beginning of its own line.
@item
-Put the return type of the function, even if it is @code{int}, on the
+Put the return type of the function, even if it is @code{int()}, on the
line above the line with the name and arguments of the function.
@item
@@ -26851,15 +28311,15 @@ It also guarantees that the string is zero-terminated.
This function returns the actual number of parameters passed
to the current function. Inside the code of an extension
this can be used to determine the maximum index which is
-safe to use with @code{stack_ptr}. If this value is
-greater than @code{tree->param_cnt}, the function was
+safe to use with @code{get_actual_argument}. If this value is
+greater than @code{nargs}, the function was
called incorrectly from the @command{awk} program.
@strong{Caution:} This function is new as of @command{gawk} 3.1.4.
@cindex parameters@comma{} number of
-@cindex @code{param_cnt} internal variable
-@item n->param_cnt
+@cindex @code{nargs} internal variable
+@item nargs
Inside an extension function, this is the maximum number of
expected parameters, as set by the @code{make_builtin} function.
@@ -26895,7 +28355,7 @@ Make sure that @samp{n->type == Node_var_array} first.
@item NODE **assoc_lookup(NODE *symbol, NODE *subs, int reference)
Finds, and installs if necessary, array elements.
@code{symbol} is the array, @code{subs} is the subscript.
-This is usually a value created with @code{tmp_string} (see below).
+This is usually a value created with @code{make_string} (see below).
@code{reference} should be @code{TRUE} if it is an error to use the
value before it is created. Typically, @code{FALSE} is the
correct value to use from extension functions.
@@ -26914,17 +28374,6 @@ Take an @code{AWKNUM} and turn it into a pointer to a @code{NODE} that
can be stored appropriately. This is permanent storage; understanding
of @command{gawk} memory management is helpful.
-@cindex @code{tmp_string} internal function
-@item NODE *tmp_string(char *s, size_t len);
-Take a C string and turn it into a pointer to a @code{NODE} that
-can be stored appropriately. This is temporary storage; understanding
-of @command{gawk} memory management is helpful.
-
-@cindex @code{tmp_number} internal function
-@item NODE *tmp_number(AWKNUM val)
-Take an @code{AWKNUM} and turn it into a pointer to a @code{NODE} that
-can be stored appropriately. This is temporary storage;
-understanding of @command{gawk} memory management is helpful.
@cindex nodes@comma{} duplicating
@cindex @code{dupnode} internal function
@@ -26934,10 +28383,10 @@ reference count instead of actually duplicating the entire @code{NODE};
understanding of @command{gawk} memory management is helpful.
@cindex memory, releasing
-@cindex @code{free_temp} internal macro
-@item void free_temp(NODE *n)
+@cindex @code{unref} internal function
+@item void unref(NODE *n)
This macro releases the memory associated with a @code{NODE}
-allocated with @code{tmp_string} or @code{tmp_number}.
+allocated with @code{make_string} or @code{make_number}.
Understanding of @command{gawk} memory management is helpful.
@cindex @code{make_builtin} internal function
@@ -26951,7 +28400,7 @@ The function should be written in the following manner:
/* do_xxx --- do xxx function for gawk */
NODE *
-do_xxx(NODE *tree)
+do_xxx(int nargs)
@{
@dots{}
@}
@@ -26959,13 +28408,13 @@ do_xxx(NODE *tree)
@cindex arguments, retrieving
@cindex @code{get_argument} internal function
-@item NODE *get_argument(NODE *tree, int i)
+@item NODE *get_argument(int i)
This function is called from within a C extension function to get
the @code{i}-th argument from the function call.
The first argument is argument zero.
@cindex @code{get_actual_argument} internal function
-@item NODE *get_actual_argument(NODE *tree, unsigned int i,
+@item NODE *get_actual_argument(int i,
@itemx @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ int@ optional,@ int@ wantarray);
This function retrieves a particular argument @code{i}. @code{wantarray} is @code{TRUE}
if the argument should be an array, @code{FALSE} otherwise. If @code{optional} is
@@ -26976,24 +28425,18 @@ the argument was not provided.
@strong{Caution:} This function is new as of @command{gawk} 3.1.4.
@cindex @code{get_scalar_argument} internal macro
-@item get_scalar_argument(t, i, opt)
+@item get_scalar_argument(i, opt)
This is a convenience macro that calls @code{get_actual_argument}.
@strong{Caution:} This macro is new as of @command{gawk} 3.1.4.
@cindex @code{get_array_argument} internal macro
-@item get_array_argument(t, i, opt)
+@item get_array_argument(i, opt)
This is a convenience macro that calls @code{get_actual_argument}.
@strong{Caution:} This macro is new as of @command{gawk} 3.1.4.
@cindex functions, return values@comma{} setting
-@cindex @code{set_value} internal function
-@item void set_value(NODE *tree)
-This function is called from within a C extension function to set
-the return value from the extension function. This value is
-what the @command{awk} program sees as the return value from the
-new @command{awk} function.
@cindex @code{ERRNO} variable
@cindex @code{update_ERRNO} internal function
@@ -27113,7 +28556,7 @@ the_arg = get_array(the_arg);
assoc_clear(the_arg);
@end smallexample
-As of version 3.1.4, the internals improved again, and became
+In @value{PVERSION} 3.1.4, the internals improved again, and became
even simpler:
@smallexample
@@ -27122,6 +28565,14 @@ NODE *the_arg;
the_arg = get_array_argument(tree, 2, FALSE); /* assume need 3rd arg, 0-based */
@end smallexample
+As of @value{PVERSION} 4.0, the internals changed again:
+
+@smallexample
+NODE *the_arg;
+
+the_arg = get_array_argument(2, FALSE); /* assume need 3rd arg, 0-based */
+@end smallexample
+
Again, you should spend time studying the @command{gawk} internals;
don't just blindly copy this code.
@c ENDOFRANGE gawint
@@ -27229,7 +28680,7 @@ be a function of the file's size if the file has holes.
@itemx "ctime"
The file's last access, modification, and inode update times,
respectively. These are numeric timestamps, suitable for formatting
-with @code{strftime}
+with @code{strftime()}
(@pxref{Built-in}).
@item "pmode"
@@ -27311,8 +28762,7 @@ slightly for presentation. The complete version can be found in
chdir() builtin for gawk */
static NODE *
-do_chdir(tree)
-NODE *tree;
+do_chdir(int nargs)
@{
NODE *newdir;
int ret = -1;
@@ -27320,7 +28770,7 @@ NODE *tree;
if (do_lint && get_curfunc_arg_count() != 1)
lintwarn("chdir: called with incorrect number of arguments");
- newdir = get_scalar_argument(tree, 0);
+ newdir = get_scalar_argument(0, FALSE);
@end example
The file includes the @code{"awk.h"} header file for definitions
@@ -27330,36 +28780,29 @@ for access to the @code{major} and @code{minor} macros.
@cindex programming conventions, @command{gawk} internals
By convention, for an @command{awk} function @code{foo}, the function that
implements it is called @samp{do_foo}. The function should take
-a @samp{NODE *} argument, usually called @code{tree}, that
-represents the argument list to the function. The @code{newdir}
+a @samp{int} argument, usually called @code{nargs}, that
+represents the number of defined arguments for the function. The @code{newdir}
variable represents the new directory to change to, retrieved
-with @code{get_argument}. Note that the first argument is
+with @code{get_scalar_argument}. Note that the first argument is
numbered zero.
This code actually accomplishes the @code{chdir}. It first forces
the argument to be a string and passes the string value to the
@code{chdir} system call. If the @code{chdir} fails, @code{ERRNO}
is updated.
-The result of @code{force_string} has to be freed with @code{free_temp}:
@example
(void) force_string(newdir);
ret = chdir(newdir->stptr);
if (ret < 0)
update_ERRNO();
- free_temp(newdir);
@end example
-Finally, the function returns the return value to the @command{awk} level,
-using @code{set_value}. Then it must return a value from the call to
-the new built-in (this value ignored by the interpreter):
+Finally, the function returns the return value to the @command{awk} level:
@example
/* Set the return value */
- set_value(tmp_number((AWKNUM) ret));
-
- /* Just to make the interpreter happy */
- return tmp_number((AWKNUM) 0);
+ return make_number((AWKNUM) ret);
@}
@end example
@@ -27391,10 +28834,9 @@ Changed message for page breaking. Used to be:
/* do_stat --- provide a stat() function for gawk */
static NODE *
-do_stat(tree)
-NODE *tree;
+do_stat(int nargs)
@{
- NODE *file, *array;
+ NODE *file, *array, *tmp;
struct stat sbuf;
int ret;
NODE **aptr;
@@ -27414,8 +28856,8 @@ If there's an error, we set @code{ERRNO} and return:
@c comment made multiline for page breaking
@example
/* directory is first arg, array to hold results is second */
- file = get_scalar_argument(tree, 0, FALSE);
- array = get_array_argument(tree, 1, FALSE);
+ file = get_scalar_argument(0, FALSE);
+ array = get_array_argument(1, FALSE);
/* empty out the array */
assoc_clear(array);
@@ -27425,11 +28867,7 @@ If there's an error, we set @code{ERRNO} and return:
ret = lstat(file->stptr, & sbuf);
if (ret < 0) @{
update_ERRNO();
-
- set_value(tmp_number((AWKNUM) ret));
-
- free_temp(file);
- return tmp_number((AWKNUM) 0);
+ return make_number((AWKNUM) ret);
@}
@end example
@@ -27438,28 +28876,26 @@ calls are shown here, since they all follow the same pattern:
@example
/* fill in the array */
- aptr = assoc_lookup(array, tmp_string("name", 4), FALSE);
+ aptr = assoc_lookup(array, tmp = make_string("name", 4), FALSE);
*aptr = dupnode(file);
+ unref(tmp);
- aptr = assoc_lookup(array, tmp_string("mode", 4), FALSE);
+ aptr = assoc_lookup(array, tmp = make_string("mode", 4), FALSE);
*aptr = make_number((AWKNUM) sbuf.st_mode);
+ unref(tmp);
- aptr = assoc_lookup(array, tmp_string("pmode", 5), FALSE);
+ aptr = assoc_lookup(array, tmp = make_string("pmode", 5), FALSE);
pmode = format_mode(sbuf.st_mode);
*aptr = make_string(pmode, strlen(pmode));
+ unref(tmp);
@end example
-When done, we free the temporary value containing the @value{FN},
-set the return value, and return:
+When done, return the @code{lstat} return value:
@example
- free_temp(file);
/* Set the return value */
- set_value(tmp_number((AWKNUM) ret));
-
- /* Just to make the interpreter happy */
- return tmp_number((AWKNUM) 0);
+ return make_number((AWKNUM) ret);
@}
@end example
@@ -27478,7 +28914,7 @@ void *dl;
@{
make_builtin("chdir", do_chdir, 1);
make_builtin("stat", do_stat, 2);
- return tmp_number((AWKNUM) 0);
+ return make_number((AWKNUM) 0);
@}
@end example
@@ -27502,8 +28938,8 @@ $ gcc -shared -DHAVE_CONFIG_H -c -O -g -I@var{idir} filefuncs.c
$ ld -o filefuncs.so -shared filefuncs.o
@end example
-@cindex @code{extension} function (@command{gawk})
-Once the library exists, it is loaded by calling the @code{extension}
+@cindex @code{extension()} function (@command{gawk})
+Once the library exists, it is loaded by calling the @code{extension()}
built-in function.
This function takes two arguments: the name of the
library to load and the name of a function to call when the library
@@ -28237,8 +29673,8 @@ definition of the language and the original POSIX standards specified that
@command{awk} only understands decimal numbers (base 10), and not octal
(base 8) or hexadecimal numbers (base 16).
-As of this writing (February, 2007), changes in the language of the
-current POSIX standard can be interpreted to imply that @command{awk}
+Changes in the language of the
+2001 and 2004 POSIX standard can be interpreted to imply that @command{awk}
should support additional features. These features are:
@itemize @bullet
@@ -28275,10 +29711,15 @@ interpretation of the standard, which requires a certain amount of
by the standard developers, either. In other words, ``we see how you
got where you are, but we don't think that that's where you want to be.''
-Nevertheless, on systems that support IEEE floating point, it seems
+The 2008 POSIX standard added explicit wording to allow, but not require,
+that @command{awk} support hexadecimal floating point values and
+special values for ``Not A Number'' and infinity.
+
+Although the @command{gawk} maintainer continues to feel that
+providing those features is inadvisable,
+nevertheless, on systems that support IEEE floating point, it seems
reasonable to provide @emph{some} way to support NaN and Infinity values.
-The solution implemented in @command{gawk}, as of version 3.1.6, is
-as follows:
+The solution implemented in @command{gawk} is as follows:
@enumerate 1
@item
@@ -28433,13 +29874,13 @@ Named after the English mathematician Boole. See also ``Logical Expression.''
@item Bourne Shell
The standard shell (@file{/bin/sh}) on Unix and Unix-like systems,
originally written by Steven R.@: Bourne.
-Many shells (@command{bash}, @command{ksh}, @command{pdksh}, @command{zsh}) are
+Many shells (Bash, @command{ksh}, @command{pdksh}, @command{zsh}) are
generally upwardly compatible with the Bourne shell.
@item Built-in Function
The @command{awk} language provides built-in functions that perform various
numerical, I/O-related, and string computations. Examples are
-@code{sqrt} (for the square root of a number) and @code{substr} (for a
+@code{sqrt()} (for the square root of a number) and @code{substr()} (for a
substring of a string).
@command{gawk} provides functions for timestamp management, bit manipulation,
and runtime string translation.
@@ -28648,7 +30089,7 @@ See also ``Double-Precision'' and ``Single-Precision.''
@item Format
Format strings are used to control the appearance of output in the
-@code{strftime} and @code{sprintf} functions, and are used in the
+@code{strftime()} and @code{sprintf()} functions, and are used in the
@code{printf} statement as well. Also, data conversions from numbers to strings
are controlled by the format string contained in the built-in variable
@code{CONVFMT}. (@xref{Control Letters}.)
@@ -28992,7 +30433,7 @@ into the local language.
@item Timestamp
A value in the ``seconds since the epoch'' format used by Unix
and POSIX systems. Used for the @command{gawk} functions
-@code{mktime}, @code{strftime}, and @code{systime}.
+@code{mktime()}, @code{strftime()}, and @code{systime()}.
See also ``Epoch'' and ``UTC.''
@cindex Linux
diff --git a/doc/lflashlight.eps b/doc/lflashlight.eps
index 68865f0f..fdb8cf31 100644
--- a/doc/lflashlight.eps
+++ b/doc/lflashlight.eps
@@ -131,5 +131,5 @@ x
%%Trailer
showpage
% Trailer for xpic to PostScript converter
-% $Header: /d/mongo/cvsrep/gawk-devel/doc/lflashlight.eps,v 1.1.1.1 2008/11/16 19:21:15 arnold Exp $
+% $Header: x2ps.tra,v 1.2 89/07/02 15:59:53 moraes Exp $
xpic end restore
diff --git a/doc/rflashlight.eps b/doc/rflashlight.eps
index 1e3ab760..28cb7e25 100644
--- a/doc/rflashlight.eps
+++ b/doc/rflashlight.eps
@@ -137,5 +137,5 @@ x
%%Trailer
showpage
% Trailer for xpic to PostScript converter
-% $Header: /d/mongo/cvsrep/gawk-devel/doc/rflashlight.eps,v 1.1.1.1 2008/11/16 19:21:15 arnold Exp $
+% $Header: x2ps.tra,v 1.2 89/07/02 15:59:53 moraes Exp $
xpic end restore
diff --git a/eval.c b/eval.c
index ebf7f4c1..5279f245 100644
--- a/eval.c
+++ b/eval.c
@@ -1,5 +1,5 @@
/*
- * eval.c - gawk parse tree interpreter
+ * eval.c - gawk bytecode interpreter
*/
/*
@@ -25,31 +25,41 @@
#include "awk.h"
-extern double pow P((double x, double y));
-extern double modf P((double x, double *yp));
-extern double fmod P((double x, double y));
-
-static inline void make_scalar P((NODE *tree));
-static int eval_condition P((NODE *tree));
-static NODE *op_assign P((NODE *tree));
-static NODE *func_call P((NODE *tree));
-static NODE *match_op P((NODE *tree));
-static void pop_forloop P((void));
-static inline void pop_all_forloops P((void));
-static void push_forloop P((const char *varname, NODE **elems, size_t nelems));
-static void push_args P((int count, NODE *arglist, NODE **oldstack,
- const char *func_name, char **varnames));
-static inline void pop_fcall_stack P((void));
-static void pop_fcall P((void));
-static int comp_func P((const void *p1, const void *p2));
+extern void after_beginfile(IOBUF **curfile);
+extern double pow(double x, double y);
+extern double modf(double x, double *yp);
+extern double fmod(double x, double y);
+extern NODE **fcall_list;
+extern long fcall_count;
+IOBUF *curfile = NULL; /* current data file */
+int exiting = FALSE;
+
+#ifdef DEBUGGING
+extern int pre_execute(INSTRUCTION **, int inloop);
+extern void post_execute(INSTRUCTION *, int inloop);
+#else
+#define r_interpret interpret
+#endif
+
+/*
+ * Flag which executable this is; done here because eval.c is compiled
+ * differently for each of them.
+ */
+enum exe_mode which_gawk =
+#ifdef PROFILING
+ exe_profiling /* pgawk */
+#else
+# ifdef DEBUGGING
+ exe_debugging /* dgawk */
+# else
+ exe_normal /* normal gawk */
+# endif
+#endif
+ ; /* which_gawk */
#if __GNUC__ < 2
NODE *_t; /* used as a temporary in macros */
#endif
-#ifdef MSDOS
-double _msc51bug; /* to get around a bug in MSC 5.1 */
-#endif
-NODE *ret_node;
int OFSlen;
int ORSlen;
int OFMTidx;
@@ -62,20 +72,6 @@ int CONVFMTidx;
#define INCREMENT(n) /* nothing */
#endif
-/* Macros and variables to save and restore function and loop bindings */
-/*
- * the val variable allows return/continue/break-out-of-context to be
- * caught and diagnosed
- */
-#define PUSH_BINDING(stack, x, val) (memcpy((char *)(stack), (const char *)(x), sizeof(jmp_buf)), val++)
-#define RESTORE_BINDING(stack, x, val) (memcpy((char *)(x), (const char *)(stack), sizeof(jmp_buf)), val--)
-
-static jmp_buf loop_tag; /* always the current binding */
-static int loop_tag_valid = FALSE; /* nonzero when loop_tag valid */
-static int func_tag_valid = FALSE;
-static jmp_buf func_tag;
-extern int exiting, exit_val;
-
/* This rather ugly macro is for VMS C */
#ifdef C
#undef C
@@ -254,113 +250,155 @@ load_casetable(void)
* This table maps node types to strings for debugging.
* KEEP IN SYNC WITH awk.h!!!!
*/
+
static const char *const nodetypes[] = {
"Node_illegal",
- "Node_times",
- "Node_quotient",
- "Node_mod",
- "Node_plus",
- "Node_minus",
- "Node_cond_pair",
- "Node_subscript",
- "Node_concat",
- "Node_exp",
- "Node_preincrement",
- "Node_predecrement",
- "Node_postincrement",
- "Node_postdecrement",
- "Node_unary_minus",
- "Node_field_spec",
- "Node_assign",
- "Node_assign_times",
- "Node_assign_quotient",
- "Node_assign_mod",
- "Node_assign_plus",
- "Node_assign_minus",
- "Node_assign_exp",
- "Node_assign_concat",
- "Node_and",
- "Node_or",
- "Node_equal",
- "Node_notequal",
- "Node_less",
- "Node_greater",
- "Node_leq",
- "Node_geq",
- "Node_match",
- "Node_nomatch",
- "Node_not",
- "Node_rule_list",
- "Node_rule_node",
- "Node_statement_list",
- "Node_switch_body",
- "Node_case_list",
- "Node_if_branches",
- "Node_expression_list",
- "Node_param_list",
- "Node_K_if",
- "Node_K_switch",
- "Node_K_case",
- "Node_K_default",
- "Node_K_while",
- "Node_K_for",
- "Node_K_arrayfor",
- "Node_K_break",
- "Node_K_continue",
- "Node_K_print",
- "Node_K_print_rec",
- "Node_K_printf",
- "Node_K_next",
- "Node_K_exit",
- "Node_K_do",
- "Node_K_return",
- "Node_K_delete",
- "Node_K_delete_loop",
- "Node_K_getline",
- "Node_K_function",
- "Node_K_nextfile",
- "Node_redirect_output",
- "Node_redirect_append",
- "Node_redirect_pipe",
- "Node_redirect_pipein",
- "Node_redirect_input",
- "Node_redirect_twoway",
- "Node_var_new",
- "Node_var",
- "Node_var_array",
"Node_val",
- "Node_builtin",
- "Node_line_range",
- "Node_in_array",
- "Node_func",
- "Node_func_call",
- "Node_indirect_func_call",
- "Node_cond_exp",
"Node_regex",
"Node_dynregex",
+ "Node_var",
+ "Node_var_array",
+ "Node_var_new",
+ "Node_param_list",
+ "Node_func",
"Node_hashnode",
"Node_ahash",
"Node_array_ref",
- "Node_BINMODE",
- "Node_CONVFMT",
- "Node_FIELDWIDTHS",
- "Node_FNR",
- "Node_FPAT",
- "Node_FS",
- "Node_IGNORECASE",
- "Node_LINT",
- "Node_NF",
- "Node_NR",
- "Node_OFMT",
- "Node_OFS",
- "Node_ORS",
- "Node_RS",
- "Node_SUBSEP",
- "Node_TEXTDOMAIN",
+ "Node_arrayfor",
+ "Node_frame",
+ "Node_instruction",
"Node_final --- this should never appear",
NULL
};
+
+/*
+ * This table maps Op codes to strings.
+ * KEEP IN SYNC WITH awk.h!!!!
+ */
+
+static struct optypetab {
+ char *desc;
+ char *operator;
+} optypes[] = {
+ { "Op_illegal", NULL },
+ { "Op_times", " * " },
+ { "Op_times_i", " * " },
+ { "Op_quotient", " / " },
+ { "Op_quotient_i", " / " },
+ { "Op_mod", " % " },
+ { "Op_mod_i", " % " },
+ { "Op_plus", " + " },
+ { "Op_plus_i", " + " },
+ { "Op_minus", " - " },
+ { "Op_minus_i", " - " },
+ { "Op_exp", " ^ " },
+ { "Op_exp_i", " ^ " },
+ { "Op_concat", " " },
+ { "Op_line_range", NULL },
+ { "Op_cond_pair", ", " },
+ { "Op_subscript", "[]" },
+ { "Op_sub_array", "[]" },
+ { "Op_preincrement", "++" },
+ { "Op_predecrement", "--" },
+ { "Op_postincrement", "++" },
+ { "Op_postdecrement", "--" },
+ { "Op_unary_minus", "-" },
+ { "Op_field_spec", "$" },
+ { "Op_not", "! " },
+ { "Op_assign", " = " },
+ { "Op_store_var", " = " },
+ { "Op_store_sub", " = " },
+ { "Op_store_field", " = " },
+ { "Op_assign_times", " *= " },
+ { "Op_assign_quotient", " /= " },
+ { "Op_assign_mod", " %= " },
+ { "Op_assign_plus", " += " },
+ { "Op_assign_minus", " -= " },
+ { "Op_assign_exp", " ^= " },
+ { "Op_assign_concat", " " },
+ { "Op_and", " && " },
+ { "Op_and_final", NULL },
+ { "Op_or", " || " },
+ { "Op_or_final", NULL },
+ { "Op_equal", " == " },
+ { "Op_notequal", " != " },
+ { "Op_less", " < " },
+ { "Op_greater", " > " },
+ { "Op_leq", " <= " },
+ { "Op_geq", " >= " },
+ { "Op_match", " ~ " },
+ { "Op_match_rec", NULL },
+ { "Op_nomatch", " !~ " },
+ { "Op_rule", NULL },
+ { "Op_K_case", "case" },
+ { "Op_K_default", "default" },
+ { "Op_K_break", "break" },
+ { "Op_K_continue", "continue" },
+ { "Op_K_print", "print" },
+ { "Op_K_print_rec", "print" },
+ { "Op_K_printf", "printf" },
+ { "Op_K_next", "next" },
+ { "Op_K_exit", "exit" },
+ { "Op_K_return", "return" },
+ { "Op_K_delete", "delete" },
+ { "Op_K_delete_loop", NULL },
+ { "Op_K_getline_redir", "getline" },
+ { "Op_K_getline", "getline" },
+ { "Op_K_nextfile", "nextfile" },
+ { "Op_builtin", NULL },
+ { "Op_in_array", " in " },
+ { "Op_func_call", NULL },
+ { "Op_indirect_func_call", NULL },
+ { "Op_push", NULL },
+ { "Op_push_i", NULL },
+ { "Op_push_re", NULL },
+ { "Op_push_array", NULL },
+ { "Op_push_param", NULL },
+ { "Op_push_lhs", NULL },
+ { "Op_subscript_lhs", "[]" },
+ { "Op_field_spec_lhs", "$" },
+ { "Op_no_op", NULL },
+ { "Op_pop", NULL },
+ { "Op_jmp", NULL },
+ { "Op_jmp_true", NULL },
+ { "Op_jmp_false", NULL },
+ { "Op_push_loop", NULL },
+ { "Op_pop_loop", NULL },
+ { "Op_get_record", NULL },
+ { "Op_newfile", NULL },
+ { "Op_arrayfor_init", NULL },
+ { "Op_arrayfor_incr", NULL },
+ { "Op_arrayfor_final", NULL },
+ { "Op_var_update", NULL },
+ { "Op_var_assign", NULL },
+ { "Op_field_assign", NULL },
+ { "Op_after_beginfile", NULL },
+ { "Op_after_endfile", NULL },
+ { "Op_ext_func", NULL },
+ { "Op_func", NULL },
+ { "Op_exec_count", NULL },
+ { "Op_breakpoint", NULL },
+ { "Op_lint", NULL },
+ { "Op_atexit", NULL },
+ { "Op_stop", NULL },
+ { "Op_token", NULL },
+ { "Op_symbol", NULL },
+ { "Op_list", NULL },
+ { "Op_case_list", NULL },
+ { "Op_K_do", "do" },
+ { "Op_K_for", "for" },
+ { "Op_K_arrayfor", "for" },
+ { "Op_K_while", "while" },
+ { "Op_K_switch", "switch" },
+ { "Op_K_if", "if" },
+ { "Op_K_else", "else" },
+ { "Op_K_function", "function" },
+ { "Op_cond_exp", NULL },
+ { "Op_final --- this should never appear", NULL },
+ { NULL, NULL },
+};
+
/* nodetype2str --- convert a node type into a printable value */
const char *
@@ -375,6 +413,32 @@ nodetype2str(NODETYPE type)
return buf;
}
+/* opcode2str --- convert a opcode type into a printable value */
+
+const char *
+opcode2str(OPCODE op)
+{
+ if (op >= Op_illegal && op < Op_final)
+ return optypes[(int) op].desc;
+ fatal(_("unknown opcode %d"), (int) op);
+ return NULL;
+}
+
+const char *
+op2str(OPCODE op)
+{
+ if (op >= Op_illegal && op < Op_final) {
+ if (optypes[(int) op].operator != NULL)
+ return optypes[(int) op].operator;
+ else
+ fatal(_("opcode %s not an operator or keyword"),
+ optypes[(int) op].desc);
+ } else
+ fatal(_("unknown opcode %d"), (int) op);
+ return NULL;
+}
+
+
/* flags2str --- make a flags value readable */
const char *
@@ -382,7 +446,6 @@ flags2str(int flagval)
{
static const struct flagtab values[] = {
{ MALLOC, "MALLOC" },
- { TEMP, "TEMP" },
{ PERM, "PERM" },
{ STRING, "STRING" },
{ STRCUR, "STRCUR" },
@@ -393,8 +456,9 @@ flags2str(int flagval)
{ FUNC, "FUNC" },
{ FIELD, "FIELD" },
{ INTLSTR, "INTLSTR" },
+#ifdef WSTRCUR
{ WSTRCUR, "WSTRCUR" },
- { ASSIGNED, "ASSIGNED" },
+#endif
{ 0, NULL },
};
@@ -436,1075 +500,34 @@ genflags2str(int flagval, const struct flagtab *tab)
return buffer;
}
-/*
- * make_scalar --- make sure that tree is a scalar.
- *
- * tree is in a scalar context. If it is a variable, accomplish
- * what's needed; otherwise, do nothing.
- *
- * Notice that nodes of type Node_var_new have undefined value in var_value
- * (a.k.a. lnode)---even though awkgram.y:variable() initializes it,
- * push_args() doesn't. Thus we have to initialize it.
- */
-
-static inline void
-make_scalar(NODE *tree)
-{
- switch (tree->type) {
- case Node_var_array:
- fatal(_("attempt to use array `%s' in a scalar context"),
- array_vname(tree));
-
- case Node_array_ref:
- switch (tree->orig_array->type) {
- case Node_var_array:
- fatal(_("attempt to use array `%s' in a scalar context"),
- array_vname(tree));
- case Node_var_new:
- tree->orig_array->type = Node_var;
- tree->orig_array->var_value = Nnull_string;
- break;
- case Node_var:
- break;
- default:
- cant_happen();
- }
- /* fall through */
- case Node_var_new:
- tree->type = Node_var;
- tree->var_value = Nnull_string;
- default:
- /* shut up GCC */
- break;
- }
-}
-
-/*
- * interpret:
- * Tree is a bunch of rules to run. Returns zero if it hit an exit()
- * statement
- */
-int
-interpret(register NODE *volatile tree)
-{
- jmp_buf volatile loop_tag_stack; /* shallow binding stack for loop_tag */
- static jmp_buf rule_tag; /* tag the rule currently being run, for NEXT
- * and EXIT statements. It is static because
- * there are no nested rules */
- register NODE *volatile t = NULL; /* temporary */
- NODE **volatile lhs; /* lhs == Left Hand Side for assigns, etc */
- NODE *volatile stable_tree;
- int volatile traverse = TRUE; /* True => loop thru tree (Node_rule_list) */
-
- /* avoid false source indications */
- source = NULL;
- sourceline = 0;
-
- if (tree == NULL)
- return 1;
- sourceline = tree->source_line;
- source = tree->source_file;
- switch (tree->type) {
- case Node_rule_node:
- traverse = FALSE; /* False => one for-loop iteration only */
- /* FALL THROUGH */
- case Node_rule_list:
- for (t = tree; t != NULL; t = t->rnode) {
- if (traverse)
- tree = t->lnode;
- sourceline = tree->source_line;
- source = tree->source_file;
- INCREMENT(tree->exec_count);
- switch (setjmp(rule_tag)) {
- case 0: /* normal non-jump */
- /* test pattern, if any */
- if (tree->lnode == NULL ||
- eval_condition(tree->lnode)) {
- /* using the lnode exec_count is kludgey */
- if (tree->lnode != NULL)
- INCREMENT(tree->lnode->exec_count);
- (void) interpret(tree->rnode);
- }
- break;
- case TAG_CONTINUE: /* NEXT statement */
- pop_all_forloops();
- pop_fcall_stack();
- return 1;
- case TAG_BREAK: /* EXIT statement */
- pop_all_forloops();
- pop_fcall_stack();
- return 0;
- default:
- cant_happen();
- }
- if (! traverse) /* case Node_rule_node */
- break; /* don't loop */
- }
- break;
-
- case Node_statement_list:
- for (t = tree; t != NULL; t = t->rnode)
- (void) interpret(t->lnode);
- break;
-
- case Node_K_if:
- INCREMENT(tree->exec_count);
- if (eval_condition(tree->lnode)) {
- INCREMENT(tree->rnode->exec_count);
- (void) interpret(tree->rnode->lnode);
- } else {
- (void) interpret(tree->rnode->rnode);
- }
- break;
-
- case Node_K_switch:
- {
- NODE *switch_value;
- NODE *switch_body;
- NODE *case_list;
- NODE *default_list;
- NODE *case_stmt;
-
- int match_found = FALSE;
-
- PUSH_BINDING(loop_tag_stack, loop_tag, loop_tag_valid);
- INCREMENT(tree->exec_count);
- stable_tree = tree;
-
- switch_value = tree_eval(stable_tree->lnode);
- switch_body = stable_tree->rnode;
- case_list = switch_body->lnode;
- default_list = switch_body->rnode;
-
- for (; case_list != NULL; case_list = case_list->rnode) {
- case_stmt = case_list->lnode;
-
- /*
- * Once a match is found, all cases will be processed as they fall through,
- * so continue to execute statements until a break is reached.
- */
- if (! match_found) {
- if (case_stmt->type == Node_K_default)
- ; /* do nothing */
- else if (case_stmt->lnode->type == Node_regex) {
- NODE *t1;
- Regexp *rp;
- /* see comments in match_op() code about this. */
- int kludge_need_start = 0;
-
- t1 = force_string(switch_value);
- rp = re_update(case_stmt->lnode);
-
- if (avoid_dfa(tree, t1->stptr, t1->stlen))
- kludge_need_start = RE_NEED_START;
- match_found = (research(rp, t1->stptr, 0, t1->stlen, kludge_need_start) >= 0);
- if (t1 != switch_value)
- free_temp(t1);
- } else
- match_found = (cmp_nodes(switch_value, case_stmt->lnode) == 0);
- }
-
- /* If a match was found, execute the statements associated with the case. */
- if (match_found) {
- INCREMENT(case_stmt->exec_count);
- switch (setjmp(loop_tag)) {
- case 0: /* Normal non-jump */
- (void) interpret(case_stmt->rnode);
- break;
- case TAG_CONTINUE: /* continue statement */
- free_temp(switch_value);
- RESTORE_BINDING(loop_tag_stack, loop_tag, loop_tag_valid);
- longjmp(loop_tag, TAG_CONTINUE);
- break;
- case TAG_BREAK: /* break statement */
- free_temp(switch_value);
- RESTORE_BINDING(loop_tag_stack, loop_tag, loop_tag_valid);
- return 1;
- default:
- cant_happen();
- }
- }
-
- }
-
- free_temp(switch_value);
-
- /*
- * If a default section was found, execute the statements associated with it
- * and execute any trailing case statements if the default falls through.
- */
- if (! match_found && default_list != NULL) {
- for (case_list = default_list;
- case_list != NULL; case_list = case_list->rnode) {
- case_stmt = case_list->lnode;
-
- INCREMENT(case_stmt->exec_count);
- switch (setjmp(loop_tag)) {
- case 0: /* Normal non-jump */
- (void) interpret(case_stmt->rnode);
- break;
- case TAG_CONTINUE: /* continue statement */
- RESTORE_BINDING(loop_tag_stack, loop_tag, loop_tag_valid);
- longjmp(loop_tag, TAG_CONTINUE);
- break;
- case TAG_BREAK: /* break statement */
- RESTORE_BINDING(loop_tag_stack, loop_tag, loop_tag_valid);
- return 1;
- default:
- cant_happen();
- }
- }
- }
-
- RESTORE_BINDING(loop_tag_stack, loop_tag, loop_tag_valid);
- }
- break;
-
- case Node_K_while:
- PUSH_BINDING(loop_tag_stack, loop_tag, loop_tag_valid);
-
- stable_tree = tree;
- while (eval_condition(stable_tree->lnode)) {
- INCREMENT(stable_tree->exec_count);
- switch (setjmp(loop_tag)) {
- case 0: /* normal non-jump */
- (void) interpret(stable_tree->rnode);
- break;
- case TAG_CONTINUE: /* continue statement */
- break;
- case TAG_BREAK: /* break statement */
- RESTORE_BINDING(loop_tag_stack, loop_tag, loop_tag_valid);
- return 1;
- default:
- cant_happen();
- }
- }
- RESTORE_BINDING(loop_tag_stack, loop_tag, loop_tag_valid);
- break;
-
- case Node_K_do:
- PUSH_BINDING(loop_tag_stack, loop_tag, loop_tag_valid);
- stable_tree = tree;
- do {
- INCREMENT(stable_tree->exec_count);
- switch (setjmp(loop_tag)) {
- case 0: /* normal non-jump */
- (void) interpret(stable_tree->rnode);
- break;
- case TAG_CONTINUE: /* continue statement */
- break;
- case TAG_BREAK: /* break statement */
- RESTORE_BINDING(loop_tag_stack, loop_tag, loop_tag_valid);
- return 1;
- default:
- cant_happen();
- }
- } while (eval_condition(stable_tree->lnode));
- RESTORE_BINDING(loop_tag_stack, loop_tag, loop_tag_valid);
- break;
-
- case Node_K_for:
- PUSH_BINDING(loop_tag_stack, loop_tag, loop_tag_valid);
- (void) interpret(tree->forloop->init);
- stable_tree = tree;
- while (eval_condition(stable_tree->forloop->cond)) {
- INCREMENT(stable_tree->exec_count);
- switch (setjmp(loop_tag)) {
- case 0: /* normal non-jump */
- (void) interpret(stable_tree->lnode);
- /* fall through */
- case TAG_CONTINUE: /* continue statement */
- (void) interpret(stable_tree->forloop->incr);
- break;
- case TAG_BREAK: /* break statement */
- RESTORE_BINDING(loop_tag_stack, loop_tag, loop_tag_valid);
- return 1;
- default:
- cant_happen();
- }
- }
- RESTORE_BINDING(loop_tag_stack, loop_tag, loop_tag_valid);
- break;
-
- case Node_K_arrayfor:
- {
- Func_ptr after_assign = NULL;
- NODE **list = NULL;
- NODE *volatile array;
- NODE *volatile save_array;
- volatile size_t i, num_elems;
- size_t j;
- volatile int retval = 0;
- int sort_indices = whiny_users;
-
-#define hakvar forloop->init
-#define arrvar forloop->incr
- /* get the array */
- save_array = tree->arrvar;
- array = get_array(save_array);
-
- /* sanity: do nothing if empty */
- if (array->var_array == NULL || array->table_size == 0)
- break; /* from switch */
-
- /* allocate space for array */
- num_elems = array->table_size;
- emalloc(list, NODE **, num_elems * sizeof(NODE *), "for_loop");
-
- /* populate it */
- for (i = j = 0; i < array->array_size; i++) {
- NODE *t = array->var_array[i];
-
- if (t == NULL)
- continue;
-
- for (; t != NULL; t = t->ahnext) {
- list[j++] = dupnode(t);
- assert(list[j-1] == t);
- }
- }
-
-
- if (sort_indices)
- qsort(list, num_elems, sizeof(NODE *), comp_func); /* shazzam! */
-
- /* now we can run the loop */
- push_forloop(array->vname, list, num_elems);
- PUSH_BINDING(loop_tag_stack, loop_tag, loop_tag_valid);
-
- lhs = get_lhs(tree->hakvar, &after_assign, FALSE);
- stable_tree = tree;
- for (i = 0; i < num_elems; i++) {
- INCREMENT(stable_tree->exec_count);
- unref(*((NODE **) lhs));
- *lhs = make_string(list[i]->ahname_str, list[i]->ahname_len);
- if (after_assign)
- (*after_assign)();
- switch (setjmp(loop_tag)) {
- case 0:
- (void) interpret(stable_tree->lnode);
- case TAG_CONTINUE:
- break;
-
- case TAG_BREAK:
- retval = 1;
- goto done;
-
- default:
- cant_happen();
- }
- }
-
- done:
- RESTORE_BINDING(loop_tag_stack, loop_tag, loop_tag_valid);
- pop_forloop();
-
- if (do_lint && num_elems != array->table_size)
- lintwarn(_("for loop: array `%s' changed size from %ld to %ld during loop execution"),
- array_vname(save_array), (long) num_elems, (long) array->table_size);
-
- if (retval == 1)
- return 1;
- break;
- }
-#undef hakvar
-#undef arrvar
-
- case Node_K_break:
- INCREMENT(tree->exec_count);
- if (! loop_tag_valid) {
- /*
- * Old AT&T nawk treats break outside of loops like
- * next. New ones catch it at parse time. Allow it if
- * do_traditional is on, and complain if lint.
- */
- static short warned = FALSE;
-
- if (do_lint && ! warned) {
- lintwarn(_("`break' outside a loop is not portable"));
- warned = TRUE;
- }
- if (! do_traditional || do_posix)
- fatal(_("`break' outside a loop is not allowed"));
- longjmp(rule_tag, TAG_CONTINUE);
- } else
- longjmp(loop_tag, TAG_BREAK);
- break;
-
- case Node_K_continue:
- INCREMENT(tree->exec_count);
- if (! loop_tag_valid) {
- /*
- * Old AT&T nawk treats continue outside of loops like
- * next. New ones catch it at parse time. Allow it if
- * do_traditional is on, and complain if lint.
- */
- static short warned = FALSE;
-
- if (do_lint && ! warned) {
- lintwarn(_("`continue' outside a loop is not portable"));
- warned = TRUE;
- }
- if (! do_traditional || do_posix)
- fatal(_("`continue' outside a loop is not allowed"));
- longjmp(rule_tag, TAG_CONTINUE);
- } else
- longjmp(loop_tag, TAG_CONTINUE);
- break;
-
- case Node_K_print:
- INCREMENT(tree->exec_count);
- do_print(tree);
- break;
-
- case Node_K_print_rec:
- INCREMENT(tree->exec_count);
- do_print_rec(tree);
- break;
-
- case Node_K_printf:
- INCREMENT(tree->exec_count);
- do_printf(tree);
- break;
-
- case Node_K_delete:
- INCREMENT(tree->exec_count);
- do_delete(tree->lnode, tree->rnode);
- break;
-
- case Node_K_delete_loop:
- INCREMENT(tree->exec_count);
- do_delete_loop(tree->lnode, tree->rnode);
- break;
-
- case Node_K_next:
- INCREMENT(tree->exec_count);
- if (in_begin_rule)
- fatal(_("`next' cannot be called from a BEGIN rule"));
- else if (in_end_rule)
- fatal(_("`next' cannot be called from an END rule"));
- else if (in_beginfile_rule)
- fatal(_("`next' cannot be called from a BEGINFILE rule"));
- else if (in_endfile_rule)
- fatal(_("`next' cannot be called from an ENDFILE rule"));
-
- /* could add a lint check here for in a loop or function */
- longjmp(rule_tag, TAG_CONTINUE);
- break;
-
- case Node_K_nextfile:
- INCREMENT(tree->exec_count);
- if (in_begin_rule && ! in_beginfile_rule)
- fatal(_("`nextfile' cannot be called from a BEGIN rule"));
- else if (in_end_rule)
- fatal(_("`nextfile' cannot be called from an END rule"));
- /*
- else if (in_beginfile_rule)
- fatal(_("`nextfile' cannot be called from a BEGINFILE rule"));
- */
- else if (in_endfile_rule)
- fatal(_("`nextfile' cannot be called from an ENDFILE rule"));
-
- /* could add a lint check here for in a loop or function */
- /*
- * Have to do this cleanup here, since we don't longjump
- * back to the main awk rule loop (rule_tag).
- */
- pop_all_forloops();
- pop_fcall_stack();
-
- do_nextfile();
- break;
-
- case Node_K_exit:
- INCREMENT(tree->exec_count);
- /*
- * In A,K,&W, p. 49, it says that an exit statement "...
- * causes the program to behave as if the end of input had
- * occurred; no more input is read, and the END actions, if
- * any are executed." This implies that the rest of the rules
- * are not done. So we immediately break out of the main loop.
- */
- exiting = TRUE;
- if (tree->lnode != NULL) {
- t = tree_eval(tree->lnode);
- exit_val = (int) force_number(t);
-#ifdef VMS
- if (exit_val == 0)
- exit_val = EXIT_SUCCESS;
- else if (exit_val == 1)
- exit_val = EXIT_FAILURE;
- /* else
- just pass anything else on through */
-#endif
- free_temp(t);
- }
- longjmp(rule_tag, TAG_BREAK);
- break;
-
- case Node_K_return:
- INCREMENT(tree->exec_count);
- t = tree_eval(tree->lnode);
- if ((t->flags & (PERM|TEMP)) != 0)
- ret_node = t;
- else {
- ret_node = copynode(t); /* don't do a dupnode here */
- ret_node->flags |= TEMP;
- }
- longjmp(func_tag, TAG_RETURN);
- break;
-
- default:
- /*
- * Appears to be an expression statement. Throw away the
- * value.
- */
- if (do_lint && (tree->type == Node_var || tree->type == Node_var_new))
- lintwarn(_("statement has no effect"));
- INCREMENT(tree->exec_count);
- t = tree_eval(tree);
- if (t) /* stopme() returns NULL */
- free_temp(t);
- break;
- }
- return 1;
-}
-
-/*
- * calc_exp_posint --- calculate x^n for positive integral n,
- * using exponentiation by squaring without recursion.
- */
-
-static AWKNUM
-calc_exp_posint(AWKNUM x, long n)
-{
- AWKNUM mult = 1;
-
- while (n > 1) {
- if ((n % 2) == 1)
- mult *= x;
- x *= x;
- n /= 2;
- }
- return mult * x;
-}
-
-/* calc_exp --- calculate x1^x2 */
-
-AWKNUM
-calc_exp(AWKNUM x1, AWKNUM x2)
-{
- long lx;
-
- if ((lx = x2) == x2) { /* integer exponent */
- if (lx == 0)
- return 1;
- return (lx > 0) ? calc_exp_posint(x1, lx)
- : 1.0 / calc_exp_posint(x1, -lx);
- }
- return (AWKNUM) pow((double) x1, (double) x2);
-}
-
-/* r_tree_eval --- evaluate a subtree */
-
-NODE *
-r_tree_eval(register NODE *tree, int iscond)
-{
- register NODE *r, *t1, *t2; /* return value & temporary subtrees */
- register NODE **lhs;
- register int di;
- AWKNUM x, x1, x2;
-#ifdef _CRAY
- long lx2;
-#endif
-
-#ifndef TREE_EVAL_MACRO
- if (tree == NULL)
- cant_happen();
- if (tree->type == Node_val) {
- if (tree->stref <= 0)
- cant_happen();
- return ((tree->flags & INTLSTR) != 0
- ? r_force_string(tree)
- : tree);
- } else if (tree->type == Node_var) {
- if (tree->var_value->stref <= 0)
- cant_happen();
- if (! var_uninitialized(tree))
- return tree->var_value;
- }
-#endif
-
- if (tree->type == Node_param_list) {
- if ((tree->flags & FUNC) != 0)
- fatal(_("can't use function name `%s' as variable or array"),
- tree->vname);
-
- tree = stack_ptr[tree->param_cnt];
-
- if (tree == NULL) {
- if (do_lint)
- lintwarn(_("reference to uninitialized argument `%s'"),
- tree->vname);
- return Nnull_string;
- }
-
- if (do_lint && var_uninitialized(tree))
- lintwarn(_("reference to uninitialized argument `%s'"),
- tree->vname);
- }
-
- make_scalar(tree);
-
- switch (tree->type) {
- case Node_var:
- if (do_lint && var_uninitialized(tree))
- lintwarn(_("reference to uninitialized variable `%s'"),
- tree->vname);
- return tree->var_value;
-
- case Node_and:
- return tmp_number((AWKNUM) (eval_condition(tree->lnode)
- && eval_condition(tree->rnode)));
-
- case Node_or:
- return tmp_number((AWKNUM) (eval_condition(tree->lnode)
- || eval_condition(tree->rnode)));
-
- case Node_not:
- return tmp_number((AWKNUM) ! eval_condition(tree->lnode));
-
- /* Builtins */
- case Node_builtin:
- return (*tree->builtin)(tree->subnode);
-
- case Node_K_getline:
- return do_getline(tree);
-
- case Node_in_array:
- return tmp_number((AWKNUM) (in_array(tree->lnode, tree->rnode) != NULL));
-
- case Node_indirect_func_call:
- case Node_func_call:
- return func_call(tree);
-
- /* unary operations */
- case Node_NR:
- case Node_FNR:
- case Node_NF:
- case Node_FIELDWIDTHS:
- case Node_FPAT:
- case Node_FS:
- case Node_RS:
- case Node_field_spec:
- case Node_subscript:
- case Node_IGNORECASE:
- case Node_OFS:
- case Node_ORS:
- case Node_OFMT:
- case Node_CONVFMT:
- case Node_BINMODE:
- case Node_LINT:
- case Node_SUBSEP:
- case Node_TEXTDOMAIN:
- lhs = get_lhs(tree, (Func_ptr *) NULL, TRUE);
- return *lhs;
-
- case Node_unary_minus:
- t1 = tree_eval(tree->subnode);
- x = -force_number(t1);
- free_temp(t1);
- return tmp_number(x);
-
- case Node_cond_exp:
- if (eval_condition(tree->lnode))
- return tree_eval(tree->rnode->lnode);
- return tree_eval(tree->rnode->rnode);
-
- case Node_match:
- case Node_nomatch:
- case Node_regex:
- case Node_dynregex:
- return match_op(tree);
-
- case Node_concat:
- {
- NODE **treelist;
- NODE **strlist;
- NODE *save_tree;
- register NODE **treep;
- register NODE **strp;
- register size_t len;
- register size_t supposed_len;
- char *str;
- register char *dest;
- int alloc_count, str_count;
- int i;
-
- /*
- * This is an efficiency hack for multiple adjacent string
- * concatenations, to avoid recursion and string copies.
- *
- * Node_concat trees grow downward to the left, so
- * descend to lowest (first) node, accumulating nodes
- * to evaluate to strings as we go.
- */
-
- /*
- * But first, no arbitrary limits. Count the number of
- * nodes and malloc the treelist and strlist arrays.
- * There will be alloc_count + 1 items to concatenate. We
- * also leave room for an extra pointer at the end to
- * use as a sentinel. Thus, start alloc_count at 2.
- */
- save_tree = tree;
- for (alloc_count = 2; tree != NULL && tree->type == Node_concat;
- tree = tree->lnode)
- alloc_count++;
- tree = save_tree;
- emalloc(treelist, NODE **, sizeof(NODE *) * alloc_count, "tree_eval");
- emalloc(strlist, NODE **, sizeof(NODE *) * alloc_count, "tree_eval");
-
- /* Now, here we go. */
- treep = treelist;
- while (tree != NULL && tree->type == Node_concat) {
- *treep++ = tree->rnode;
- tree = tree->lnode;
- }
- *treep = tree;
- /*
- * Now, evaluate to strings in LIFO order, accumulating
- * the string length, so we can do a single malloc at the
- * end.
- *
- * Evaluate the expressions first, then get their
- * lengthes, in case one of the expressions has a
- * side effect that changes one of the others.
- * See test/nasty.awk.
- *
- * dupnode the results a la do_print, to give us
- * more predicable behavior; compare gawk 3.0.6 to
- * nawk/mawk on test/nasty.awk.
- */
- strp = strlist;
- supposed_len = len = 0;
- while (treep >= treelist) {
- NODE *n;
-
- /* Here lies the wumpus's brother. R.I.P. */
- n = force_string(tree_eval(*treep--));
- *strp = dupnode(n);
- free_temp(n);
- supposed_len += (*strp)->stlen;
- strp++;
- }
- *strp = NULL;
-
- str_count = strp - strlist;
- strp = strlist;
- for (i = 0; i < str_count; i++) {
- len += (*strp)->stlen;
- strp++;
- }
- if (do_lint && supposed_len != len)
- lintwarn(_("concatenation: side effects in one expression have changed the length of another!"));
- emalloc(str, char *, len+2, "tree_eval");
- str[len] = str[len+1] = '\0'; /* for good measure */
- dest = str;
- strp = strlist;
- while (*strp != NULL) {
- memcpy(dest, (*strp)->stptr, (*strp)->stlen);
- dest += (*strp)->stlen;
- unref(*strp);
- strp++;
- }
- r = make_str_node(str, len, ALREADY_MALLOCED);
- r->flags |= TEMP;
-
- free(strlist);
- free(treelist);
- }
- return r;
-
- /* assignments */
- case Node_assign_concat:
- {
- Func_ptr after_assign = NULL;
- NODE *l, *r, *t;
-
- /*
- * Note that something lovely like this:
- *
- * BEGIN { a = "a"; a = a (a = "b"); print a }
- *
- * is not defined. It could print `ab' or `bb'.
- * Gawk 3.1.3 prints `ab', so we do that too, simply
- * by evaluating the LHS first. Ugh.
- *
- * Thanks to mary1john@earthlink.net for pointing
- * out this issue.
- */
- lhs = get_lhs(tree->lnode, &after_assign, FALSE);
- *lhs = force_string(*lhs);
- l = *lhs;
-
- /*
- * This is a hack. We temporarily increase the reference count
- * on l in case evaluating r might change the original value
- * of l. We have to be careful about reducing it afterwards.
- * In particular, if the lhs changed during evaluation of the
- * rhs, we have to compensate.
- *
- * See test/nasty.awk.
- */
- t = dupnode(l);
- r = force_string(tree_eval(tree->rnode));
-
- if (l != *lhs) {
- /*
- * Something happened to the original
- * during the evaluation of the rhs.
- */
- unref(*lhs);
- *lhs = l;
- }
- else
- unref(t);
-
- /*
- * Don't clobber string constants!
- *
- * Also check stref; see test/strcat1.awk,
- * the test for l->stref == 1 can't be an
- * assertion.
- *
- * Thanks again to mary1john@earthlink.net for pointing
- * out this issue.
- */
- if (l != r && (l->flags & PERM) == 0 && l->stref == 1) {
- size_t nlen = l->stlen + r->stlen + 2;
-
- erealloc(l->stptr, char *, nlen, "interpret");
- memcpy(l->stptr + l->stlen, r->stptr, r->stlen);
- l->stlen += r->stlen;
- l->stptr[l->stlen] = '\0';
- free_wstr(l);
- } else {
- char *nval;
- size_t nlen = l->stlen + r->stlen + 2;
-
- emalloc(nval, char *, nlen, "interpret");
- memcpy(nval, l->stptr, l->stlen);
- memcpy(nval + l->stlen, r->stptr, r->stlen);
- unref(*lhs);
- *lhs = make_str_node(nval, l->stlen + r->stlen, ALREADY_MALLOCED);
- }
- (*lhs)->flags &= ~(NUMCUR|NUMBER);
- (*lhs)->flags |= ASSIGNED; /* for function pointers */
- free_temp(r);
-
- if (after_assign)
- (*after_assign)();
- return *lhs;
- }
- case Node_assign:
- {
- Func_ptr after_assign = NULL;
-
- if (do_lint && iscond)
- lintwarn(_("assignment used in conditional context"));
- r = tree_eval(tree->rnode);
- lhs = get_lhs(tree->lnode, &after_assign, FALSE);
- assign_val(lhs, r);
-
- if (tree->lnode->type == Node_var)
- tree->lnode->var_value->flags |= ASSIGNED; /* needed in handling of indirect function calls */
-
- if (after_assign)
- (*after_assign)();
- return *lhs;
- }
-
- /* other assignment types are easier because they are numeric */
- case Node_preincrement:
- case Node_predecrement:
- case Node_postincrement:
- case Node_postdecrement:
- case Node_assign_exp:
- case Node_assign_times:
- case Node_assign_quotient:
- case Node_assign_mod:
- case Node_assign_plus:
- case Node_assign_minus:
- return op_assign(tree);
- default:
- break; /* handled below */
- }
-
- /*
- * Evaluate subtrees in order to do binary operation, then keep going.
- * Use dupnode to make sure that these values don't disappear out
- * from under us during recursive subexpression evaluation.
- */
- t1 = dupnode(tree_eval(tree->lnode));
- t2 = dupnode(tree_eval(tree->rnode));
-
- switch (tree->type) {
- case Node_geq:
- case Node_leq:
- case Node_greater:
- case Node_less:
- case Node_notequal:
- case Node_equal:
- di = cmp_nodes(t1, t2);
- unref(t1);
- unref(t2);
- switch (tree->type) {
- case Node_equal:
- return tmp_number((AWKNUM) (di == 0));
- case Node_notequal:
- return tmp_number((AWKNUM) (di != 0));
- case Node_less:
- return tmp_number((AWKNUM) (di < 0));
- case Node_greater:
- return tmp_number((AWKNUM) (di > 0));
- case Node_leq:
- return tmp_number((AWKNUM) (di <= 0));
- case Node_geq:
- return tmp_number((AWKNUM) (di >= 0));
- default:
- cant_happen();
- }
- break;
- default:
- break; /* handled below */
- }
-
- x1 = force_number(t1);
- x2 = force_number(t2);
- unref(t1);
- unref(t2);
- switch (tree->type) {
- case Node_exp:
- return tmp_number(calc_exp(x1, x2));
-
- case Node_times:
- return tmp_number(x1 * x2);
-
- case Node_quotient:
- if (x2 == 0)
- fatal(_("division by zero attempted"));
-#ifdef _CRAY
- /* special case for integer division, put in for Cray */
- lx2 = x2;
- if (lx2 == 0)
- return tmp_number(x1 / x2);
- lx = (long) x1 / lx2;
- if (lx * x2 == x1)
- return tmp_number((AWKNUM) lx);
- else
-#endif
- return tmp_number(x1 / x2);
-
- case Node_mod:
- if (x2 == 0)
- fatal(_("division by zero attempted in `%%'"));
-#ifdef HAVE_FMOD
- return tmp_number(fmod(x1, x2));
-#else /* ! HAVE_FMOD */
- (void) modf(x1 / x2, &x);
- return tmp_number(x1 - x * x2);
-#endif /* ! HAVE_FMOD */
-
- case Node_plus:
- return tmp_number(x1 + x2);
-
- case Node_minus:
- return tmp_number(x1 - x2);
-
- default:
- fatal(_("illegal type (%s) in tree_eval"), nodetype2str(tree->type));
- }
- return (NODE *) 0;
-}
-
-/* eval_condition --- is TREE true or false? Returns 0==false, non-zero==true */
-
-static int
-eval_condition(register NODE *tree)
-{
- register NODE *t1;
- register int ret;
-
- if (tree == NULL) /* Null trees are the easiest kinds */
- return TRUE;
- if (tree->type == Node_line_range) {
- /*
- * Node_line_range is kind of like Node_match, EXCEPT: the
- * lnode field (more properly, the condpair field) is a node
- * of a Node_cond_pair; whether we evaluate the lnode of that
- * node or the rnode depends on the triggered word. More
- * precisely: if we are not yet triggered, we tree_eval the
- * lnode; if that returns true, we set the triggered word.
- * If we are triggered (not ELSE IF, note), we tree_eval the
- * rnode, clear triggered if it succeeds, and perform our
- * action (regardless of success or failure). We want to be
- * able to begin and end on a single input record, so this
- * isn't an ELSE IF, as noted above.
- */
- if (! tree->triggered) {
- if (! eval_condition(tree->condpair->lnode))
- return FALSE;
- else
- tree->triggered = TRUE;
- }
- /* Else we are triggered */
- if (eval_condition(tree->condpair->rnode))
- tree->triggered = FALSE;
- return TRUE;
- }
-
- /*
- * Could just be J.random expression. in which case, null and 0 are
- * false, anything else is true
- */
-
- t1 = m_tree_eval(tree, TRUE);
- if (t1->flags & MAYBE_NUM)
- (void) force_number(t1);
- if (t1->flags & NUMBER)
- ret = (t1->numbr != 0.0);
- else
- ret = (t1->stlen != 0);
- free_temp(t1);
- return ret;
-}
/* cmp_nodes --- compare two nodes, returning negative, 0, positive */
int
-cmp_nodes(register NODE *t1, register NODE *t2)
+cmp_nodes(NODE *t1, NODE *t2)
{
- register int ret;
- register size_t len1, len2;
- register int l;
- int ldiff;
+ int ret = 0;
+ size_t len1, len2;
+ int l, ldiff;
if (t1 == t2)
return 0;
+
if (t1->flags & MAYBE_NUM)
(void) force_number(t1);
if (t2->flags & MAYBE_NUM)
(void) force_number(t2);
if ((t1->flags & NUMBER) && (t2->flags & NUMBER)) {
if (t1->numbr == t2->numbr)
- return 0;
+ ret = 0;
/* don't subtract, in case one or both are infinite */
else if (t1->numbr < t2->numbr)
- return -1;
+ ret = -1;
else
- return 1;
+ ret = 1;
+ return ret;
}
+
(void) force_string(t1);
(void) force_string(t2);
len1 = t1->stlen;
@@ -1519,10 +542,8 @@ cmp_nodes(register NODE *t1, register NODE *t2)
#ifdef MBS_SUPPORT
if (gawk_mb_cur_max > 1) {
- mbstate_t mbs;
- memset(&mbs, 0, sizeof(mbstate_t));
- ret = strncasecmpmbs((const char *) cp1, mbs,
- (const char *) cp2, mbs, l);
+ ret = strncasecmpmbs((const char *) cp1,
+ (const char *) cp2, l);
} else
#endif
/* Could use tolower() here; see discussion above. */
@@ -1533,829 +554,79 @@ cmp_nodes(register NODE *t1, register NODE *t2)
return (ret == 0 ? ldiff : ret);
}
-/* op_assign --- do +=, -=, etc. */
-
-static NODE *
-op_assign(register NODE *tree)
-{
- AWKNUM rval, lval;
- NODE **lhs;
- NODE *tmp;
- Func_ptr after_assign = NULL;
- int post = FALSE;
-
- /*
- * For += etc, do the rhs first, since it can rearrange things,
- * and *then* get the lhs.
- */
- if (tree->rnode != NULL) {
- tmp = tree_eval(tree->rnode);
- rval = force_number(tmp);
- free_temp(tmp);
- } else
- rval = (AWKNUM) 1.0;
-
- lhs = get_lhs(tree->lnode, &after_assign, TRUE);
- lval = force_number(*lhs);
- unref(*lhs);
-
- switch(tree->type) {
- case Node_postincrement:
- post = TRUE;
- /* fall through */
- case Node_preincrement:
- case Node_assign_plus:
- *lhs = make_number(lval + rval);
- break;
-
- case Node_postdecrement:
- post = TRUE;
- /* fall through */
- case Node_predecrement:
- case Node_assign_minus:
- *lhs = make_number(lval - rval);
- break;
-
- case Node_assign_exp:
- *lhs = make_number(calc_exp(lval, rval));
- break;
-
- case Node_assign_times:
- *lhs = make_number(lval * rval);
- break;
-
- case Node_assign_quotient:
- if (rval == (AWKNUM) 0)
- fatal(_("division by zero attempted in `/='"));
- {
-#ifdef _CRAY
- long ltemp;
-
- /* special case for integer division, put in for Cray */
- ltemp = rval;
- if (ltemp == 0) {
- *lhs = make_number(lval / rval);
- break;
- }
- ltemp = (long) lval / ltemp;
- if (ltemp * lval == rval)
- *lhs = make_number((AWKNUM) ltemp);
- else
-#endif /* _CRAY */
- *lhs = make_number(lval / rval);
- }
- break;
-
- case Node_assign_mod:
- if (rval == (AWKNUM) 0)
- fatal(_("division by zero attempted in `%%='"));
-#ifdef HAVE_FMOD
- *lhs = make_number(fmod(lval, rval));
-#else /* ! HAVE_FMOD */
- {
- AWKNUM t1, t2;
-
- (void) modf(lval / rval, &t1);
- t2 = lval - rval * t1;
- *lhs = make_number(t2);
- }
-#endif /* ! HAVE_FMOD */
- break;
-
- default:
- cant_happen();
- }
-
- (*lhs)->flags |= ASSIGNED;
-
- if (after_assign)
- (*after_assign)();
-
- /* for postincrement or postdecrement, return the old value */
- return (post ? tmp_number(lval) : *lhs);
-}
-
-/*
- * Avoiding memory leaks is difficult. In paticular, any of `next',
- * `nextfile', `break' or `continue' (when not in a loop), can longjmp
- * out to the outermost level. This leaks memory if it happens in a
- * called function. It also leaks memory if it happens in a
- * `for (iggy in foo)' loop, since such loops malloc an array of the
- * current array indices to loop over, which provides stability.
- *
- * The following code takes care of these problems. First comes the
- * array-loop management code. This can be a stack of arrays being looped
- * on at any one time. This stack serves for both mainline code and
- * function body code. As each loop starts and finishes, it pushes its
- * info onto this stack and off of it; whether the loop is in a function
- * body or not isn't relevant.
- *
- * Since the list of indices is created using dupnode(), when popping
- * this stack it should be safe to unref() things, and then memory
- * will get finally released when the function call stack is popped.
- * This means that the loop_stack should be popped first upon a `next'.
- */
-
-static struct loop_info {
- const char *varname; /* variable name, for debugging */
- NODE **elems; /* list of indices */
- size_t nelems; /* how many there are */
-} *loop_stack = NULL;
-size_t nloops = 0; /* how many slots there are in the stack */
-size_t nloops_active = 0; /* how many loops are actively stacked */
-
-/* pop_forloop --- pop one for loop off the stack */
-
-static void
-pop_forloop()
-{
- int i, curloop;
- struct loop_info *loop;
-
- assert(nloops_active > 0);
-
- curloop = --nloops_active; /* 0-based indexing */
- loop = & loop_stack[curloop];
-
- for (i = 0; i < loop->nelems; i++)
- unref(loop->elems[i]);
-
- free(loop->elems);
-
- loop->elems = NULL;
- loop->varname = NULL;
- loop->nelems = 0;
-}
-
-/* pop_forloops --- pop the for loops stack all the way */
-
-static inline void
-pop_all_forloops()
-{
- while (nloops_active > 0)
- pop_forloop(); /* decrements nloops_active for us */
-}
-
-/* push_forloop --- add a single for loop to the stack */
+#if defined(PROFILING) || defined(DEBUGGING)
static void
-push_forloop(const char *varname, NODE **elems, size_t nelems)
+push_frame(NODE *f)
{
-#define NLOOPS 4 /* seems like a good guess */
- if (loop_stack == NULL) {
- /* allocate stack, set vars */
- nloops = NLOOPS;
- emalloc(loop_stack, struct loop_info *, nloops * sizeof(struct loop_info),
- "push_forloop");
- } else if (nloops_active == nloops) {
- /* grow stack, set vars */
- nloops *= 2;
- erealloc(loop_stack, struct loop_info *, nloops * sizeof(struct loop_info),
- "push_forloop");
- }
-
- loop_stack[nloops_active].varname = varname;
- loop_stack[nloops_active].elems = elems;
- loop_stack[nloops_active].nelems = nelems;
- nloops_active++;
-}
-
-/*
- * 2/2004:
- * N.B. The code that uses fcalls[] *always* uses indexing.
- * This avoids severe problems in case fcalls gets realloc()'ed
- * during recursive tree_eval()'s or whatever, so that we don't
- * have to carefully reassign pointers into the array. The
- * minor speed gain from using a pointer was offset too much
- * by the hassles to get the code right and commented.
- *
- * Thanks and a tip of the hatlo to Brian Kernighan.
- */
-
-static struct fcall {
- const char *fname; /* function name */
- size_t count; /* how many args */
- NODE *arglist; /* list thereof */
- NODE **prevstack; /* function stack frame of previous function */
- NODE **stack; /* function stack frame of current function */
-} *fcalls = NULL;
-
-static long fcall_list_size = 0;
-static long curfcall = -1;
-
-/*
- * get_curfunc_arg_count --- return number actual parameters
- *
- * This is for use by dynamically loaded C extension functions.
- */
-size_t
-get_curfunc_arg_count(void)
-{
- NODE *argp;
- size_t argc;
-
- assert(curfcall >= 0);
+ static long max_fcall;
- /* count the # of expressions in argument expression list */
- for (argc = 0, argp = fcalls[curfcall].arglist;
- argp != NULL; argp = argp->rnode)
- argc++;
+ /* NB: frame numbering scheme as in GDB. frame_ptr => frame #0. */
- return argc;
-}
-
-/* pop_fcall --- pop off a single function call */
-
-static void
-pop_fcall()
-{
- NODE *n, **sp;
- int count;
-
- assert(curfcall >= 0);
- stack_ptr = fcalls[curfcall].prevstack;
-
- sp = fcalls[curfcall].stack;
-
- for (count = fcalls[curfcall].count; count > 0; count--) {
- n = *sp++;
- /*
- * If, while setting the value of an argument in push_args,
- * the recursively evaluating code exits, this argument
- * could never have been set to a value. So check for NULL,
- * first.
- */
- if (n == NULL)
- continue;
- if (n->type == Node_var) /* local variable */
- unref(n->var_value);
- else if (n->type == Node_var_array) /* local array */
- assoc_clear(n);
- freenode(n);
- }
- if (fcalls[curfcall].stack) {
- free((char *) fcalls[curfcall].stack);
- fcalls[curfcall].stack = NULL;
+ fcall_count++;
+ if (fcall_list == NULL) {
+ max_fcall = 10;
+ emalloc(fcall_list, NODE **, (max_fcall + 1) * sizeof(NODE *), "push_frame");
+ } else if (fcall_count == max_fcall) {
+ max_fcall *= 2;
+ erealloc(fcall_list, NODE **, (max_fcall + 1) * sizeof(NODE *), "push_frame");
}
- curfcall--;
-}
-
-/* pop_fcall_stack --- pop off all function args, don't leak memory */
-static inline void
-pop_fcall_stack()
-{
- while (curfcall >= 0)
- pop_fcall();
+ if (fcall_count > 1)
+ memmove(fcall_list + 2, fcall_list + 1, (fcall_count - 1) * sizeof(NODE *));
+ fcall_list[1] = f;
}
-/* push_args --- push function arguments onto the stack */
-
static void
-push_args(int count,
- NODE *argp,
- NODE **oldstack,
- const char *func_name,
- char **varnames)
+pop_frame()
{
- NODE *arg, *r, **sp;
- int i;
-
- if (fcall_list_size == 0) { /* first time */
- emalloc(fcalls, struct fcall *, 10 * sizeof(struct fcall),
- "push_args");
- fcall_list_size = 10;
- }
-
- if (++curfcall >= fcall_list_size) {
- fcall_list_size *= 2;
- erealloc(fcalls, struct fcall *,
- fcall_list_size * sizeof(struct fcall), "push_args");
- }
-
- if (count > 0) {
- size_t nbytes = count * sizeof(NODE *);
-
- emalloc(fcalls[curfcall].stack, NODE **, nbytes, "push_args");
- memset(fcalls[curfcall].stack, 0, nbytes); /* Make sure these are all NULL pointers. */
- } else
- fcalls[curfcall].stack = NULL;
- fcalls[curfcall].count = count;
- fcalls[curfcall].fname = func_name; /* not used, for debugging, just in case */
- fcalls[curfcall].arglist = argp;
- fcalls[curfcall].prevstack = oldstack;
-
- sp = fcalls[curfcall].stack;
-
- /* for each calling arg. add NODE * on stack */
- for (i = 0; i < count; i++) {
- getnode(r);
- memset(r, 0, sizeof(*r));
- *sp++ = r;
- if (argp == NULL) {
- /* local variable */
- r->type = Node_var_new;
- r->var_value = Nnull_string;
- r->vname = varnames[i];
- r->rnode = NULL;
- continue;
- }
- arg = argp->lnode;
- /* call by reference for arrays; see below also */
- if (arg->type == Node_param_list)
- arg = fcalls[curfcall].prevstack[arg->param_cnt];
-
- if (arg->type == Node_var_array || arg->type == Node_var_new) {
- r->type = Node_array_ref;
- r->orig_array = arg;
- r->prev_array = arg;
- } else if (arg->type == Node_array_ref) {
- *r = *arg;
- r->prev_array = arg;
- } else {
- NODE *n = tree_eval(arg);
-
- r->type = Node_var;
- r->lnode = dupnode(n);
- r->rnode = (NODE *) NULL;
- r->var_value->flags |= ASSIGNED; /* For indirect function calls */
- free_temp(n);
- }
- r->vname = varnames[i];
- argp = argp->rnode;
- }
-
- if (argp != NULL) {
- /* Left over calling args. */
- warning(
- _("function `%s' called with more arguments than declared"),
- func_name);
- /* Evaluate them, they may have side effects: */
- do {
- arg = argp->lnode;
- if (arg->type == Node_param_list)
- arg = fcalls[curfcall].prevstack[arg->param_cnt];
- if (arg->type != Node_var_array &&
- arg->type != Node_array_ref &&
- arg->type != Node_var_new)
- free_temp(tree_eval(arg));
- } while ((argp = argp->rnode) != NULL);
- }
-
- stack_ptr = fcalls[curfcall].stack;
+#ifdef DEBUGGING
+ extern void frame_popped();
+#endif
+ if (fcall_count > 1)
+ memmove(fcall_list + 1, fcall_list + 2, (fcall_count - 1) * sizeof(NODE *));
+ fcall_count--;
+ assert(fcall_count >= 0);
+#ifdef DEBUGGING
+ frame_popped();
+#endif
}
-
-/* func_call --- call a function, call by reference for arrays */
-
-NODE **stack_ptr;
-
-static NODE *
-func_call(NODE *tree)
-{
- register NODE *r;
- NODE *name, *arg_list;
- NODE *f;
- jmp_buf volatile func_tag_stack;
- jmp_buf volatile loop_tag_stack;
- int volatile save_loop_tag_valid = FALSE;
- NODE *save_ret_node;
- extern NODE *ret_node;
- size_t current_nloops_active = 0;
-
- /* tree->rnode is a Node_val giving function name */
- /* tree->lnode is Node_expression_list of calling args. */
- name = tree->rnode;
- arg_list = tree->lnode;
-
- /*
- * After several attempts to both get the semantics right
- * and to avoid duplicate code, here is the cleanest code that
- * does the right thing.
- *
- * Pardon the gotos.
- */
-
- /* First, decide if we can use a cached funcbody */
- if (tree->type == Node_func_call) { /* direct function call */
- if (tree->funcbody != NULL) {
- f = tree->funcbody;
- goto out;
- }
-
- /* Get the function body, cache it */
- f = lookup(name->stptr);
- if (f == NULL)
- fatal(_("function `%s' not defined"), name->stptr);
- else if (f->type != Node_func)
- fatal(_("identifier `%s' is not a function"), name->stptr);
-
- tree->funcbody = f; /* save for next call */
- goto out;
- }
-
- /* Indirect function call */
-
- /* Check for parameters first, since they shadow globals */
- if (curfcall >= 0) {
- int n = fcalls[curfcall].count;
- NODE *parm;
- int i;
- int found = FALSE;
-
- for (i = 0; i < n; i++) {
- parm = fcalls[curfcall].stack[i];
- if (strcmp(parm->vname, name->stptr) == 0) {
- found = TRUE;
- break;
- }
- }
-
- if (! found)
- goto look_for_global_symbol;
-
- f = NULL;
- name = stack_ptr[i];
- if (name->type == Node_var) {
- if ((name->var_value->flags & ASSIGNED) == 0 && tree->funcbody) {
- /* Should be safe to use cached value */
- f = tree->funcbody;
- goto out;
- }
-
- force_string(name->var_value);
- f = lookup(name->var_value->stptr);
- }
-
- if (f != NULL) {
- if (f->type == Node_func) {
- tree->funcbody = f; /* save for next call */
- name->var_value->flags &= ~ASSIGNED;
- goto out;
- }
- }
-
- fatal(_("function parameter `%s' is not a scalar and cannot be used for indirect function call"),
- name->stptr);
- }
-
-look_for_global_symbol:
-
- /* not in a function call, or not a parameter, look it up globally */
- f = lookup(name->stptr);
- if (f != NULL) {
- if (f->type == Node_func) {
- tree->funcbody = f; /* save for next call */
- tree->type = Node_func_call; /* make it a direct call */
- /*
- * This may not be so silly; it allows a unified syntax which is good
- * if someone is generating code. So leave it alone for now.
- */
- if (0 && do_lint)
- lintwarn(_("indirect call of real function `%s' is silly"), name->stptr);
- goto out;
- } else if (f->type == Node_var) {
- char *fname;
- NODE *fvalue = f->var_value;
-
- if ((fvalue->flags & ASSIGNED) == 0 && tree->funcbody) {
- f = tree->funcbody;
- goto out;
- }
-
- force_string(f->var_value);
- fname = f->var_value->stptr;
- f = lookup(f->var_value->stptr);
- if (f != NULL && f->type == Node_func) {
- tree->funcbody = f; /* save for next call */
- fvalue->flags &= ~ASSIGNED;
- goto out;
- }
- else
- fatal(_("function `%s' called indirectly through `%s' does not exist"),
- fname, name->stptr);
- }
- }
-
- fatal(_("identifier `%s' cannot be used for indirect function call"), name->stptr);
-
-out:
-
-#ifdef FUNC_TRACE
- fprintf(stderr, "function `%s' called\n", name->stptr);
+#else /* not PROFILING or DEBUGGING */
+#define push_frame(p) /* nothing */
+#define pop_frame() /* nothing */
#endif
- push_args(f->lnode->param_cnt, arg_list, stack_ptr, name->stptr,
- f->parmlist);
- /*
- * Execute function body, saving context, as a return statement
- * will longjmp back here.
- *
- * Have to save and restore the loop_tag stuff so that a return
- * inside a loop in a function body doesn't scrog any loops going
- * on in the main program. We save the necessary info in variables
- * local to this function so that function nesting works OK.
- * We also only bother to save the loop stuff if we're in a loop
- * when the function is called.
- */
- if (loop_tag_valid) {
- int junk = 0;
-
- save_loop_tag_valid = (volatile int) loop_tag_valid;
- PUSH_BINDING(loop_tag_stack, loop_tag, junk);
- loop_tag_valid = FALSE;
- }
- PUSH_BINDING(func_tag_stack, func_tag, func_tag_valid);
- current_nloops_active = nloops_active;
- save_ret_node = ret_node;
- ret_node = Nnull_string; /* default return value */
- INCREMENT(f->exec_count); /* count function calls */
- if (setjmp(func_tag) == 0)
- (void) interpret(f->rnode);
-
- while (nloops_active > current_nloops_active)
- pop_forloop();
-
- r = ret_node;
- ret_node = (NODE *) save_ret_node;
- RESTORE_BINDING(func_tag_stack, func_tag, func_tag_valid);
- pop_fcall();
-
- /* Restore the loop_tag stuff if necessary. */
- if (save_loop_tag_valid) {
- int junk = 0;
-
- loop_tag_valid = (int) save_loop_tag_valid;
- RESTORE_BINDING(loop_tag_stack, loop_tag, junk);
- }
-
- return r;
-}
#ifdef PROFILING
+
/* dump_fcall_stack --- print a backtrace of the awk function calls */
void
dump_fcall_stack(FILE *fp)
{
- int i;
- if (curfcall < 0)
- return;
+ NODE *f, *func;
+ long i = 0;
+ if (fcall_count == 0)
+ return;
fprintf(fp, _("\n\t# Function Call Stack:\n\n"));
- for (i = curfcall; i >= 0; i--)
- fprintf(fp, "\t# %3d. %s\n", i+1, fcalls[i].fname);
- fprintf(fp, _("\t# -- main --\n"));
-}
-#endif /* PROFILING */
-/*
- * r_get_lhs:
- * This returns a POINTER to a node pointer. get_lhs(ptr) is the current
- * value of the var, or where to store the var's new value
- *
- * For the special variables, don't unref their current value if it's
- * the same as the internal copy; perhaps the current one is used in
- * a concatenation or some other expression somewhere higher up in the
- * call chain. Ouch.
- */
-
-NODE **
-r_get_lhs(register NODE *ptr, Func_ptr *assign, int reference)
-{
- register NODE **aptr = NULL;
- register NODE *n;
+ /* current frame */
+ func = frame_ptr->func_node;
+ fprintf(fp, "\t# %3ld. %s\n", i, func->lnode->param);
- if (assign)
- *assign = NULL; /* for safety */
- if (ptr->type == Node_param_list) {
- if ((ptr->flags & FUNC) != 0)
- fatal(_("can't use function name `%s' as variable or array"), ptr->vname);
- ptr = stack_ptr[ptr->param_cnt];
+ /* outer frames except main */
+ for (i = 1; i < fcall_count; i++) {
+ f = fcall_list[i];
+ func = f->func_node;
+ fprintf(fp, "\t# %3ld. %s\n", i, func->lnode->param);
}
- make_scalar(ptr);
-
- switch (ptr->type) {
- case Node_var:
- if (do_lint && reference && var_uninitialized(ptr))
- lintwarn(_("reference to uninitialized variable `%s'"),
- ptr->vname);
-
- aptr = &(ptr->var_value);
-#ifdef GAWKDEBUG
- if (ptr->var_value->stref <= 0)
- cant_happen();
-#endif
- break;
-
- case Node_FIELDWIDTHS:
- aptr = &(FIELDWIDTHS_node->var_value);
- if (assign != NULL)
- *assign = set_FIELDWIDTHS;
- break;
-
- case Node_RS:
- aptr = &(RS_node->var_value);
- if (assign != NULL)
- *assign = set_RS;
- break;
-
- case Node_FS:
- aptr = &(FS_node->var_value);
- if (assign != NULL)
- *assign = set_FS;
- break;
-
- case Node_FPAT:
- aptr = &(FPAT_node->var_value);
- if (assign != NULL)
- *assign = set_FPAT;
- break;
-
- case Node_FNR:
- if (FNR_node->var_value->numbr != FNR) {
- unref(FNR_node->var_value);
- FNR_node->var_value = make_number((AWKNUM) FNR);
- }
- aptr = &(FNR_node->var_value);
- if (assign != NULL)
- *assign = set_FNR;
- break;
-
- case Node_NR:
- if (NR_node->var_value->numbr != NR) {
- unref(NR_node->var_value);
- NR_node->var_value = make_number((AWKNUM) NR);
- }
- aptr = &(NR_node->var_value);
- if (assign != NULL)
- *assign = set_NR;
- break;
-
- case Node_NF:
- if (NF == -1 || NF_node->var_value->numbr != NF) {
- if (NF == -1)
- (void) get_field(UNLIMITED-1, assign); /* parse record */
- unref(NF_node->var_value);
- NF_node->var_value = make_number((AWKNUM) NF);
- }
- aptr = &(NF_node->var_value);
- if (assign != NULL)
- *assign = set_NF;
- break;
-
- case Node_IGNORECASE:
- aptr = &(IGNORECASE_node->var_value);
- if (assign != NULL)
- *assign = set_IGNORECASE;
- break;
-
- case Node_BINMODE:
- aptr = &(BINMODE_node->var_value);
- if (assign != NULL)
- *assign = set_BINMODE;
- break;
-
- case Node_LINT:
- aptr = &(LINT_node->var_value);
- if (assign != NULL)
- *assign = set_LINT;
- break;
-
- case Node_OFMT:
- aptr = &(OFMT_node->var_value);
- if (assign != NULL)
- *assign = set_OFMT;
- break;
-
- case Node_CONVFMT:
- aptr = &(CONVFMT_node->var_value);
- if (assign != NULL)
- *assign = set_CONVFMT;
- break;
-
- case Node_ORS:
- aptr = &(ORS_node->var_value);
- if (assign != NULL)
- *assign = set_ORS;
- break;
-
- case Node_OFS:
- aptr = &(OFS_node->var_value);
- if (assign != NULL)
- *assign = set_OFS;
- break;
-
- case Node_SUBSEP:
- aptr = &(SUBSEP_node->var_value);
- if (assign != NULL)
- *assign = set_SUBSEP;
- break;
-
- case Node_TEXTDOMAIN:
- aptr = &(TEXTDOMAIN_node->var_value);
- if (assign != NULL)
- *assign = set_TEXTDOMAIN;
- break;
-
- case Node_field_spec:
- {
- int field_num;
-
- n = tree_eval(ptr->lnode);
- if (do_lint) {
- if ((n->flags & NUMBER) == 0) {
- lintwarn(_("attempt to field reference from non-numeric value"));
- if (n->stlen == 0)
- lintwarn(_("attempt to reference from null string"));
- }
- }
- field_num = (int) force_number(n);
- free_temp(n);
- if (field_num < 0)
- fatal(_("attempt to access field %d"), field_num);
- if (field_num == 0 && field0_valid) { /* short circuit */
- aptr = &fields_arr[0];
- if (assign != NULL)
- *assign = reset_record;
- } else
- aptr = get_field(field_num, assign);
- if (do_lint && reference && (*aptr == Null_field || *aptr == Nnull_string))
- lintwarn(_("reference to uninitialized field `$%d'"),
- field_num);
- break;
- }
-
- case Node_subscript:
- n = get_array(ptr->lnode);
- aptr = assoc_lookup(n, concat_exp(ptr->rnode), reference);
- break;
-
- case Node_builtin:
-#if 1
- /* in gawk for a while */
- fatal(_("assignment is not allowed to result of builtin function"));
-#else
- /*
- * This is how Christos at Deshaw did it.
- * Does this buy us anything?
- */
- if (ptr->builtin == NULL)
- fatal(_("assignment is not allowed to result of builtin function"));
- ptr->callresult = (*ptr->builtin)(ptr->subnode);
- aptr = &ptr->callresult;
- break;
-#endif
-
- default:
- fprintf(stderr, "type = %s\n", nodetype2str(ptr->type));
- fflush(stderr);
- cant_happen();
- }
- return aptr;
+ fprintf(fp, "\t# %3ld. -- main --\n", fcall_count);
}
-/* match_op --- do ~ and !~ */
-
-static NODE *
-match_op(register NODE *tree)
-{
- register NODE *t1;
- register Regexp *rp;
- int i;
- int match = TRUE;
- int kludge_need_start = 0; /* FIXME: --- see below */
-
- if (tree->type == Node_nomatch)
- match = FALSE;
- if (tree->type == Node_regex)
- t1 = *get_field(0, (Func_ptr *) 0);
- else {
- t1 = force_string(tree_eval(tree->lnode));
- tree = tree->rnode;
- }
- rp = re_update(tree);
- /*
- * FIXME:
- *
- * Any place where research() is called with a last parameter of
- * zero, we need to use the avoid_dfa test. This appears here and
- * in the code for Node_K_switch.
- *
- * A new or improved dfa that distinguishes beginning/end of
- * string from beginning/end of line will allow us to get rid of
- * this temporary hack.
- *
- * The avoid_dfa() function is in re.c; it is not very smart.
- */
- if (avoid_dfa(tree, t1->stptr, t1->stlen))
- kludge_need_start = RE_NEED_START;
- i = research(rp, t1->stptr, 0, t1->stlen, kludge_need_start);
- i = (i == -1) ^ (match == TRUE);
- free_temp(t1);
- return tmp_number((AWKNUM) i);
-}
+#endif /* PROFILING */
/* set_IGNORECASE --- update IGNORECASE as appropriate */
@@ -2485,8 +756,8 @@ set_ORS()
/* fmt_ok --- is the conversion format a valid one? */
NODE **fmt_list = NULL;
-static int fmt_ok P((NODE *n));
-static int fmt_index P((NODE *n));
+static int fmt_ok(NODE *n);
+static int fmt_index(NODE *n);
static int
fmt_ok(NODE *n)
@@ -2528,7 +799,7 @@ fmt_ok(NODE *n)
static int
fmt_index(NODE *n)
{
- register int ix = 0;
+ int ix = 0;
static int fmt_num = 4;
static int fmt_hiwater = 0;
@@ -2641,27 +912,6 @@ set_TEXTDOMAIN()
*/
}
-/*
- * assign_val --- do mechanics of assignment, for calling from multiple
- * places.
- */
-
-NODE *
-assign_val(NODE **lhs_p, NODE *rhs)
-{
- if (rhs != *lhs_p) {
- /*
- * Since we know that the nodes are different,
- * we can do the unref() before the dupnode().
- */
- unref(*lhs_p);
- *lhs_p = dupnode(rhs);
- if ((*lhs_p)->type != Node_val)
- (*lhs_p)->funcbody = NULL;
- }
- return *lhs_p;
-}
-
/* update_ERRNO_saved --- update the value of ERRNO based on argument */
void
@@ -2686,9 +936,44 @@ update_ERRNO()
update_ERRNO_saved(errno);
}
+/* update_NR --- update the value of NR */
+
+void
+update_NR()
+{
+ if (NR_node->var_value->numbr != NR) {
+ unref(NR_node->var_value);
+ NR_node->var_value = make_number((AWKNUM) NR);
+ }
+}
+
+/* update_NF --- update the value of NF */
+
+void
+update_NF()
+{
+ if (NF == -1 || NF_node->var_value->numbr != NF) {
+ if (NF == -1)
+ (void) get_field(UNLIMITED - 1, NULL); /* parse record */
+ unref(NF_node->var_value);
+ NF_node->var_value = make_number((AWKNUM) NF);
+ }
+}
+
+/* update_FNR --- update the value of FNR */
+
+void
+update_FNR()
+{
+ if (FNR_node->var_value->numbr != FNR) {
+ unref(FNR_node->var_value);
+ FNR_node->var_value = make_number((AWKNUM) FNR);
+ }
+}
+
/* comp_func --- array index comparison function for qsort */
-static int
+int
comp_func(const void *p1, const void *p2)
{
size_t len1, len2;
@@ -2699,10 +984,6 @@ comp_func(const void *p1, const void *p2)
t1 = *((const NODE *const *) p1);
t2 = *((const NODE *const *) p2);
-/*
- t1 = force_string(t1);
- t2 = force_string(t2);
-*/
len1 = t1->ahname_len;
str1 = t1->ahname_str;
@@ -2715,3 +996,1619 @@ comp_func(const void *p1, const void *p2)
return (cmp1 != 0 ? cmp1 :
len1 < len2 ? -1 : (len1 > len2));
}
+
+
+NODE *frame_ptr; /* current frame */
+STACK_ITEM *stack_ptr = NULL;
+STACK_ITEM *stack_bottom;
+STACK_ITEM *stack_top;
+static unsigned long STACK_SIZE = 256; /* initial size of stack */
+int max_args = 0; /* maximum # of arguments to printf, print, sprintf,
+ * or # of array subscripts, or adjacent strings
+ * to be concatenated.
+ */
+NODE **args_array = NULL;
+
+/* grow_stack --- grow the size of runtime stack */
+
+/* N.B. stack_ptr points to the topmost occupied location
+ * on the stack, not the first free location.
+ */
+
+STACK_ITEM *
+grow_stack()
+{
+ if (stack_ptr == NULL) {
+ char *val;
+ if ((val = getenv("STACKSIZE")) != NULL) {
+ if (isdigit(*val)) {
+ unsigned long n = 0;
+ for (; *val && isdigit(*val); val++)
+ n = (n * 10) + *val - '0';
+ if (n >= 1)
+ STACK_SIZE = n;
+ }
+ }
+
+ emalloc(stack_bottom, STACK_ITEM *, STACK_SIZE * sizeof(STACK_ITEM), "grow_stack");
+ stack_ptr = stack_bottom - 1;
+ stack_top = stack_bottom + STACK_SIZE - 1;
+
+ /* initialize frame pointer */
+ getnode(frame_ptr);
+ frame_ptr->type = Node_frame;
+ frame_ptr->stack = NULL;
+ frame_ptr->func_node = NULL; /* in main */
+ frame_ptr->vname = NULL;
+ frame_ptr->loop_count = 0;
+ return stack_ptr;
+ }
+
+ STACK_SIZE *= 2;
+ erealloc(stack_bottom, STACK_ITEM *, STACK_SIZE * sizeof(STACK_ITEM), "grow_stack");
+ stack_top = stack_bottom + STACK_SIZE - 1;
+ stack_ptr = stack_bottom + STACK_SIZE / 2;
+ return stack_ptr;
+}
+
+/*
+ * r_get_lhs:
+ * This returns a POINTER to a node pointer (var's value).
+ * used to store the var's new value.
+ */
+
+NODE **
+r_get_lhs(NODE *n, int reference)
+{
+ int isparam = FALSE;
+
+ if (n->type == Node_param_list) {
+ if ((n->flags & FUNC) != 0)
+ fatal(_("can't use function name `%s' as variable or array"),
+ n->vname);
+ isparam = TRUE;
+ n = GET_PARAM(n->param_cnt);
+ }
+
+ switch (n->type) {
+ case Node_var_array:
+ fatal(_("attempt to use array `%s' in a scalar context"),
+ array_vname(n));
+ case Node_array_ref:
+ if (n->orig_array->type == Node_var_array)
+ fatal(_("attempt to use array `%s' in a scalar context"),
+ array_vname(n));
+ n->orig_array->type = Node_var;
+ n->orig_array->var_value = Nnull_string;
+ /* fall through */
+ case Node_var_new:
+ n->type = Node_var;
+ n->var_value = Nnull_string;
+ break;
+
+ case Node_var:
+ break;
+
+#if 0
+ case Node_builtin:
+ /* in gawk for a while */
+ fatal(_("assignment is not allowed to result of builtin function"));
+#endif
+
+ default:
+ cant_happen();
+ }
+
+ if (do_lint && reference && var_uninitialized(n))
+ lintwarn((isparam ?
+ _("reference to uninitialized argument `%s'") :
+ _("reference to uninitialized variable `%s'")),
+ n->vname);
+ return &n->var_value;
+}
+
+
+/* r_get_field --- get the address of a field node */
+
+static inline NODE **
+r_get_field(NODE *n, Func_ptr *assign, int reference)
+{
+ long field_num;
+ NODE **lhs;
+
+ if (assign)
+ *assign = NULL;
+ if (do_lint) {
+ if ((n->flags & NUMBER) == 0) {
+ lintwarn(_("attempt to field reference from non-numeric value"));
+ if (n->stlen == 0)
+ lintwarn(_("attempt to field reference from null string"));
+ }
+ }
+
+ field_num = (long) force_number(n);
+ if (field_num < 0)
+ fatal(_("attempt to access field %ld"), field_num);
+
+ if (field_num == 0 && field0_valid) { /* short circuit */
+ lhs = &fields_arr[0];
+ if (assign)
+ *assign = reset_record;
+ } else
+ lhs = get_field(field_num, assign);
+ if (do_lint && reference && (*lhs == Null_field || *lhs == Nnull_string))
+ lintwarn(_("reference to uninitialized field `$%ld'"),
+ field_num);
+ return lhs;
+}
+
+
+/*
+ * calc_exp_posint --- calculate x^n for positive integral n,
+ * using exponentiation by squaring without recursion.
+ */
+
+static AWKNUM
+calc_exp_posint(AWKNUM x, long n)
+{
+ AWKNUM mult = 1;
+
+ while (n > 1) {
+ if ((n % 2) == 1)
+ mult *= x;
+ x *= x;
+ n /= 2;
+ }
+ return mult * x;
+}
+
+/* calc_exp --- calculate x1^x2 */
+
+AWKNUM
+calc_exp(AWKNUM x1, AWKNUM x2)
+{
+ long lx;
+
+ if ((lx = x2) == x2) { /* integer exponent */
+ if (lx == 0)
+ return 1;
+ return (lx > 0) ? calc_exp_posint(x1, lx)
+ : 1.0 / calc_exp_posint(x1, -lx);
+ }
+ return (AWKNUM) pow((double) x1, (double) x2);
+}
+
+
+/* setup_frame --- setup new frame for function call */
+
+static void
+setup_frame(INSTRUCTION *pc)
+{
+ NODE *r = NULL;
+ NODE *m;
+ NODE *f;
+ NODE **sp = NULL;
+ char **varnames;
+ int pcount, arg_count, i;
+
+ f = pc->func_body;
+ pcount = f->lnode->param_cnt;
+ varnames = f->parmlist;
+ arg_count = (pc + 1)->expr_count;
+
+ /* check for extra args */
+ if (arg_count > pcount) {
+ warning(
+ _("function `%s' called with more arguments than declared"),
+ f->vname);
+ do {
+ r = POP();
+ if (r->type == Node_val)
+ DEREF(r);
+ } while (--arg_count > pcount);
+ }
+
+ if (pcount > 0) {
+ emalloc(sp, NODE **, pcount * sizeof(NODE *), "setup_frame");
+ memset(sp, 0, pcount * sizeof(NODE *));
+ }
+
+ for (i = 0; i < pcount; i++) {
+ getnode(r);
+ memset(r, 0, sizeof(NODE));
+ sp[i] = r;
+ if (i >= arg_count) {
+ /* local variable */
+ r->type = Node_var_new;
+ r->vname = varnames[i];
+ continue;
+ }
+
+ m = PEEK(arg_count - i - 1); /* arguments in reverse order on runtime stack */
+
+ if (m->type == Node_param_list)
+ m = GET_PARAM(m->param_cnt);
+
+ switch (m->type) {
+ case Node_var_new:
+ case Node_var_array:
+ r->type = Node_array_ref;
+ r->orig_array = r->prev_array = m;
+ break;
+
+ case Node_array_ref:
+ r->type = Node_array_ref;
+ r->orig_array = m->orig_array;
+ r->prev_array = m;
+ break;
+
+ case Node_val:
+ r->type = Node_var;
+ r->var_value = m;
+ break;
+
+ default:
+ cant_happen();
+ }
+ r->vname = varnames[i];
+ }
+ stack_adj(-arg_count); /* adjust stack pointer */
+
+ if (pc->opcode == Op_indirect_func_call) {
+ r = POP(); /* indirect var */
+ DEREF(r);
+ }
+
+ push_frame(frame_ptr);
+
+ /* save current frame in stack */
+ PUSH(frame_ptr);
+ /* setup new frame */
+ getnode(frame_ptr);
+ frame_ptr->type = Node_frame;
+ frame_ptr->stack = sp;
+ frame_ptr->func_node = f;
+ frame_ptr->loop_count = 0;
+ frame_ptr->vname = NULL;
+
+ frame_ptr->reti = (unsigned long) pc; /* on return execute pc->nexti */
+}
+
+
+/* restore_frame --- clean up the stack and update frame */
+
+static INSTRUCTION *
+restore_frame(NODE *fp)
+{
+ NODE *r;
+ NODE **sp;
+ int n;
+ NODE *func;
+ INSTRUCTION *ri;
+
+ func = frame_ptr->func_node;
+ n = func->lnode->param_cnt;
+ sp = frame_ptr->stack;
+
+ for (; n > 0; n--) {
+ r = *sp++;
+ if (r->type == Node_var) /* local variable */
+ DEREF(r->var_value);
+ else if (r->type == Node_var_array) /* local array */
+ assoc_clear(r);
+ freenode(r);
+ }
+ if (frame_ptr->stack != NULL)
+ efree(frame_ptr->stack);
+ ri = (INSTRUCTION *) frame_ptr->reti; /* execution in calling frame
+ * resumes from ri->nexti.
+ */
+ freenode(frame_ptr);
+ pop_frame();
+
+ frame_ptr = fp;
+ return ri->nexti;
+}
+
+
+/* free_arrayfor --- free 'for (var in array)' related data */
+
+static inline void
+free_arrayfor(NODE *r)
+{
+ if (r->var_array != NULL) {
+ size_t num_elems = r->table_size;
+ NODE **list = r->var_array;
+ while (num_elems > 0)
+ ahash_unref(list[--num_elems]);
+ efree(list);
+ }
+ freenode(r);
+}
+
+/* unwind_stack --- pop the runtime stack */
+
+void
+unwind_stack(STACK_ITEM *sp_bottom)
+{
+ NODE *r;
+
+ while (stack_ptr >= sp_bottom) {
+ r = POP();
+ switch (r->type) {
+ case Node_instruction:
+ freenode(r);
+ break;
+
+ case Node_frame:
+ (void) restore_frame(r);
+ source = frame_ptr->vname;
+ break;
+
+ case Node_arrayfor:
+ free_arrayfor(r);
+ break;
+
+ case Node_val:
+ DEREF(r);
+ break;
+
+ default:
+ if (get_context()->level == 0)
+ fatal(_("unwind_stack: unexpected type `%s'"),
+ nodetype2str(r->type));
+ /* else
+ * Node_var_array,
+ * Node_param_list,
+ * Node_var (e.g: trying to use scalar for array)
+ * Node_regex/Node_dynregex
+ * ?
+ */
+ break;
+ }
+ }
+}
+
+
+/*
+ * This generated compiler warnings from GCC 4.4. Who knows why.
+ *
+#define eval_condition(t) (((t)->flags & MAYBE_NUM) && force_number(t), \
+ ((t)->flags & NUMBER) ? ((t)->numbr != 0.0) : ((t)->stlen != 0))
+*/
+
+
+static inline int
+eval_condition(NODE *t)
+{
+ if ((t->flags & MAYBE_NUM) != 0)
+ force_number(t);
+
+ if ((t->flags & NUMBER) != 0)
+ return (t->numbr != 0.0);
+
+ return (t->stlen != 0);
+}
+
+/* PUSH_CODE --- push a code onto the runtime stack */
+
+void
+PUSH_CODE(INSTRUCTION *cp)
+{
+ NODE *r;
+ getnode(r);
+ r->type = Node_instruction;
+ r->code_ptr = cp;
+ PUSH(r);
+}
+
+/* POP_CODE --- pop a code off the runtime stack */
+
+INSTRUCTION *
+POP_CODE()
+{
+ NODE *r;
+ INSTRUCTION *cp;
+ r = POP();
+ cp = r->code_ptr;
+ freenode(r);
+ return cp;
+}
+
+
+/*
+ * r_interpret:
+ * code is a list of instructions to run. returns the exit value
+ * from the awk code.
+ */
+
+ /* N.B.:
+ * 1) reference counting done for both number and string values.
+ * 2) TEMP flag no longer needed (consequence of the above; valref = 0
+ * is the replacement).
+ * 3) Stack operations:
+ * Use REPLACE[_XX] if last stack operation was TOP[_XX],
+ * PUSH[_XX] if last operation was POP[_XX] instead.
+ * 4) UPREF and DREF -- see awk.h
+ */
+
+
+int
+r_interpret(INSTRUCTION *code)
+{
+ INSTRUCTION *pc; /* current instruction */
+ NODE *r = NULL;
+ NODE *m;
+ INSTRUCTION *ni;
+ NODE *t1, *t2;
+ NODE *f; /* function definition */
+ NODE **lhs;
+ AWKNUM x, x1, x2;
+ int di, pre = FALSE;
+#ifdef _CRAY
+ long lx;
+ long lx2;
+#endif
+ Regexp *rp;
+ int currule = 0;
+#if defined(GAWKDEBUG) || defined(ARRAYDEBUG)
+ int last_was_stopme = FALSE; /* builtin stopme() called ? */
+#endif
+ long in_loop = 0;
+ int stdio_problem = FALSE;
+
+ if (args_array == NULL)
+ emalloc(args_array, NODE **, (max_args + 2)*sizeof(NODE *), "r_interpret");
+ else
+ erealloc(args_array, NODE **, (max_args + 2)*sizeof(NODE *), "r_interpret");
+
+/* array subscript */
+#define mk_sub(n) (n == 1 ? POP_STRING() : concat_exp(n, TRUE))
+
+#ifdef DEBUGGING
+#define JUMPTO(x) do { post_execute(pc, in_loop); pc = (x); goto top; } while(FALSE)
+#else
+#define JUMPTO(x) do { pc = (x); goto top; } while(FALSE)
+#endif
+
+ pc = code;
+
+ /* N.B.: always use JUMPTO for next instruction, otherwise bad things
+ * may happen. DO NOT add a real loop (for/while) below to
+ * replace ' forever {'; this catches failure to use JUMPTO to execute
+ * next instruction (e.g. continue statement).
+ */
+
+ /* loop until hit Op_stop instruction */
+
+ /* forever { */
+top:
+ if (pc->source_line > 0)
+ sourceline = pc->source_line;
+
+#ifdef DEBUGGING
+ if (! pre_execute(&pc, in_loop))
+ goto top;
+#endif
+
+ switch (pc->opcode) {
+ case Op_rule:
+ currule = pc->in_rule; /* for sole use in Op_K_next, Op_K_nextfile */
+ /* fall through */
+ case Op_func:
+ case Op_ext_func:
+ source = pc->source_file;
+ break;
+
+ case Op_atexit:
+ /* avoid false source indications */
+ source = NULL;
+ sourceline = 0;
+ (void) nextfile(&curfile, TRUE); /* close input data file */
+ /*
+ * This used to be:
+ *
+ * if (close_io() != 0 && ! exiting && exit_val == 0)
+ * exit_val = 1;
+ *
+ * Other awks don't care about problems closing open files
+ * and pipes, in that it doesn't affect their exit status.
+ * So we no longer do either.
+ */
+ (void) close_io(& stdio_problem);
+ /*
+ * However, we do want to exit non-zero if there was a problem
+ * with stdout/stderr, so we reinstate a slightly different
+ * version of the above:
+ */
+ if (stdio_problem && ! exiting && exit_val == 0)
+ exit_val = 1;
+ break;
+
+ case Op_stop:
+ return 0;
+
+ case Op_push_i:
+ m = pc->memory;
+ PUSH((m->flags & INTLSTR) != 0 ? format_val(CONVFMT, CONVFMTidx, m): m);
+ break;
+
+ case Op_push:
+ {
+ NODE *save_symbol;
+ int isparam = FALSE;
+
+ save_symbol = m = pc->memory;
+ if (m->type == Node_param_list) {
+ if ((m->flags & FUNC) != 0)
+ fatal(_("can't use function name `%s' as variable or array"),
+ m->vname);
+ isparam = TRUE;
+ save_symbol = m = GET_PARAM(m->param_cnt);
+ if (m->type == Node_array_ref)
+ m = m->orig_array;
+ }
+
+ switch (m->type) {
+ case Node_var:
+ if (do_lint && var_uninitialized(m))
+ lintwarn(isparam ?
+ _("reference to uninitialized argument `%s'") :
+ _("reference to uninitialized variable `%s'"),
+ save_symbol->vname);
+ m = m->var_value;
+ UPREF(m);
+ PUSH(m);
+ break;
+
+ case Node_var_new:
+ m->type = Node_var;
+ m->var_value = Nnull_string;
+ if (do_lint)
+ lintwarn(isparam ?
+ _("reference to uninitialized argument `%s'") :
+ _("reference to uninitialized variable `%s'"),
+ save_symbol->vname);
+ PUSH(Nnull_string);
+ break;
+
+ case Node_var_array:
+ if (! do_posix
+ && pc->nexti->opcode == Op_builtin
+ && pc->nexti->builtin == do_length) /* length(array) */
+ PUSH(m);
+ else
+ fatal(_("attempt to use array `%s' in a scalar context"),
+ array_vname(save_symbol));
+ break;
+
+ default:
+ cant_happen();
+ }
+ }
+ break;
+
+ case Op_push_param: /* function argument */
+ m = pc->memory;
+ if (m->type == Node_param_list)
+ m = GET_PARAM(m->param_cnt);
+ if (m->type == Node_var) {
+ m = m->var_value;
+ UPREF(m);
+ PUSH(m);
+ break;
+ }
+ /* else
+ fall through */
+ case Op_push_array:
+ PUSH(pc->memory);
+ break;
+
+ case Op_push_lhs:
+ lhs = get_lhs(pc->memory, pc->do_reference);
+ PUSH_ADDRESS(lhs);
+ break;
+
+ case Op_subscript:
+ t2 = mk_sub(pc->sub_count);
+ t1 = POP_ARRAY();
+ r = *assoc_lookup(t1, t2, TRUE);
+ DEREF(t2);
+ if (r->type == Node_val)
+ UPREF(r);
+ PUSH(r);
+ break;
+
+ case Op_sub_array:
+ t2 = mk_sub(pc->sub_count);
+ t1 = POP_ARRAY();
+ r = in_array(t1, t2);
+ if (r == NULL) {
+ const char *arr_name = make_aname(t1, t2);
+ getnode(r);
+ r->type = Node_var_array;
+ r->var_array = NULL;
+ r->vname = estrdup(arr_name, strlen(arr_name));
+ *assoc_lookup(t1, t2, FALSE) = r;
+ } else if (r->type != Node_var_array) {
+ const char *arr_name = make_aname(t1, t2);
+ DEREF(t2);
+ fatal(_("attempt to use scalar `%s' as an array"), arr_name);
+ }
+ DEREF(t2);
+ PUSH(r);
+ break;
+
+ case Op_subscript_lhs:
+ t2 = mk_sub(pc->sub_count);
+ t1 = POP_ARRAY();
+ lhs = assoc_lookup(t1, t2, pc->do_reference);
+ if ((*lhs)->type == Node_var_array) {
+ const char *arr_name = make_aname(t1, t2);
+ DEREF(t2);
+ fatal(_("attempt to use array `%s' in a scalar context"), arr_name);
+ }
+ DEREF(t2);
+ PUSH_ADDRESS(lhs);
+ break;
+
+ case Op_field_spec:
+ t1 = TOP_SCALAR();
+ lhs = r_get_field(t1, (Func_ptr *) 0, TRUE);
+ decr_sp();
+ DEREF(t1);
+ /* This used to look like this:
+ PUSH(dupnode(*lhs));
+ but was changed to bypass an apparent bug in the z/OS C compiler.
+ Please do not remerge. */
+ r = dupnode(*lhs); /* can't use UPREF here */
+ PUSH(r);
+ break;
+
+ case Op_field_spec_lhs:
+ t1 = TOP_SCALAR();
+ lhs = r_get_field(t1, &pc->target_assign->field_assign, pc->do_reference);
+ decr_sp();
+ DEREF(t1);
+ PUSH_ADDRESS(lhs);
+ break;
+
+ case Op_lint:
+ if (do_lint) {
+ switch (pc->lint_type) {
+ case LINT_assign_in_cond:
+ lintwarn(_("assignment used in conditional context"));
+ break;
+
+ case LINT_no_effect:
+ lintwarn(_("statement has no effect"));
+ break;
+
+ default:
+ cant_happen();
+ }
+ }
+ break;
+
+ case Op_push_loop: /* for break/continue in loop, switch */
+ PUSH_CODE(pc);
+ in_loop++;
+ break;
+
+ case Op_pop_loop:
+ (void) POP_CODE();
+ in_loop--;
+ break;
+
+ case Op_jmp:
+ JUMPTO(pc->target_jmp);
+
+ case Op_jmp_false:
+ r = POP_SCALAR();
+ di = eval_condition(r);
+ DEREF(r);
+ if (! di)
+ JUMPTO(pc->target_jmp);
+ break;
+
+ case Op_jmp_true:
+ r = POP_SCALAR();
+ di = eval_condition(r);
+ DEREF(r);
+ if (di)
+ JUMPTO(pc->target_jmp);
+ break;
+
+ case Op_and:
+ case Op_or:
+ t1 = POP_SCALAR();
+ di = eval_condition(t1);
+ DEREF(t1);
+ if ((pc->opcode == Op_and && di)
+ || (pc->opcode == Op_or && ! di))
+ break;
+ r = make_number((AWKNUM) di);
+ PUSH(r);
+ ni = pc->target_jmp;
+ JUMPTO(ni->nexti);
+
+ case Op_and_final:
+ case Op_or_final:
+ t1 = TOP_SCALAR();
+ r = make_number((AWKNUM) eval_condition(t1));
+ DEREF(t1);
+ REPLACE(r);
+ break;
+
+ case Op_not:
+ t1 = TOP_SCALAR();
+ r = make_number((AWKNUM) ! eval_condition(t1));
+ DEREF(t1);
+ REPLACE(r);
+ break;
+
+ case Op_equal:
+
+/* compare two nodes on the stack */
+#define compare(X, Y) \
+t2 = POP_SCALAR(); \
+t1 = TOP_SCALAR(); \
+X = cmp_nodes(t1, t2); \
+DEREF(t1); \
+DEREF(t2); \
+r = make_number((AWKNUM) (Y)); \
+REPLACE(r);
+
+ compare(di, di == 0);
+ break;
+
+ case Op_notequal:
+ compare(di, di != 0);
+ break;
+
+ case Op_less:
+ compare(di, di < 0);
+ break;
+
+ case Op_greater:
+ compare(di, di > 0);
+ break;
+
+ case Op_leq:
+ compare(di, di <= 0);
+ break;
+
+ case Op_geq:
+ compare(di, di >= 0);
+ break;
+#undef compare
+
+ case Op_plus_i:
+ x2 = force_number(pc->memory);
+ goto plus;
+
+ case Op_plus:
+ POP_NUMBER(x2);
+plus:
+ TOP_NUMBER(x1);
+ r = make_number(x1 + x2);
+ REPLACE(r);
+ break;
+
+ case Op_minus_i:
+ x2 = force_number(pc->memory);
+ goto minus;
+
+ case Op_minus:
+ POP_NUMBER(x2);
+minus:
+ TOP_NUMBER(x1);
+ r = make_number(x1 - x2);
+ REPLACE(r);
+ break;
+
+ case Op_times_i:
+ x2 = force_number(pc->memory);
+ goto times;
+
+ case Op_times:
+ POP_NUMBER(x2);
+times:
+ TOP_NUMBER(x1);
+ r = make_number(x1 * x2);
+ REPLACE(r);
+ break;
+
+ case Op_exp_i:
+ x2 = force_number(pc->memory);
+ goto exponent;
+
+ case Op_exp:
+ POP_NUMBER(x2);
+exponent:
+ TOP_NUMBER(x1);
+ x = calc_exp(x1, x2);
+ r = make_number(x);
+ REPLACE(r);
+ break;
+
+ case Op_quotient_i:
+ x2 = force_number(pc->memory);
+ goto quotient;
+
+ case Op_quotient:
+ POP_NUMBER(x2);
+quotient:
+ TOP_NUMBER(x1);
+ if (x2 == 0) {
+ decr_sp();
+ fatal(_("division by zero attempted"));
+ }
+#ifdef _CRAY
+ /* special case for integer division, put in for Cray */
+ lx2 = x2;
+ if (lx2 == 0)
+ x = x1 / x2;
+ else {
+ lx = (long) x1 / lx2;
+ if (lx * x2 == x1)
+ x = lx;
+ else
+ x = x1 / x2;
+ }
+#else
+ x = x1 / x2;
+#endif
+ r = make_number(x);
+ REPLACE(r);
+ break;
+
+ case Op_mod_i:
+ x2 = force_number(pc->memory);
+ goto mod;
+
+ case Op_mod:
+ POP_NUMBER(x2);
+mod:
+ TOP_NUMBER(x1);
+
+ if (x2 == 0) {
+ decr_sp();
+ fatal(_("division by zero attempted in `%%'"));
+ }
+#ifdef HAVE_FMOD
+ x = fmod(x1, x2);
+#else /* ! HAVE_FMOD */
+ (void) modf(x1 / x2, &x);
+ x = x1 - x * x2;
+#endif /* ! HAVE_FMOD */
+ r = make_number(x);
+ REPLACE(r);
+ break;
+
+ case Op_preincrement:
+ pre = TRUE;
+ case Op_postincrement:
+ x2 = 1.0;
+post:
+ lhs = TOP_ADDRESS();
+ x1 = force_number(*lhs);
+ unref(*lhs);
+ r = *lhs = make_number(x1 + x2);
+ if (pre)
+ UPREF(r);
+ else
+ r = make_number(x1);
+ REPLACE(r);
+ pre = FALSE;
+ break;
+
+ case Op_predecrement:
+ pre = TRUE;
+ case Op_postdecrement:
+ x2 = -1.0;
+ goto post;
+
+ case Op_unary_minus:
+ TOP_NUMBER(x1);
+ r = make_number(-x1);
+ REPLACE(r);
+ break;
+
+ case Op_store_sub:
+ /* array[sub] assignment optimization,
+ * see awkgram.y (optimize_assignment)
+ */
+ t1 = get_array(pc->memory, TRUE); /* array */
+ t2 = mk_sub(pc->expr_count); /* subscript */
+ lhs = assoc_lookup(t1, t2, FALSE);
+ if ((*lhs)->type == Node_var_array) {
+ const char *arr_name = make_aname(t1, t2);
+ DEREF(t2);
+ fatal(_("attempt to use array `%s' in a scalar context"), arr_name);
+ }
+ DEREF(t2);
+ unref(*lhs);
+ *lhs = POP_SCALAR();
+ break;
+
+ case Op_store_var:
+ /* simple variable assignment optimization,
+ * see awkgram.y (optimize_assignment)
+ */
+
+ lhs = get_lhs(pc->memory, FALSE);
+ unref(*lhs);
+ *lhs = POP_SCALAR();
+ break;
+
+ case Op_store_field:
+ {
+ /* field assignment optimization,
+ * see awkgram.y (optimize_assignment)
+ */
+
+ Func_ptr assign;
+ t1 = TOP();
+ lhs = r_get_field(t1, &assign, FALSE);
+ decr_sp();
+ DEREF(t1);
+ unref(*lhs);
+ *lhs = POP_SCALAR();
+ assert(assign != NULL);
+ assign();
+ }
+ break;
+
+ case Op_assign_concat:
+ /* x = x ... string concatenation optimization */
+ lhs = get_lhs(pc->memory, FALSE);
+ t1 = force_string(*lhs);
+ t2 = POP_STRING();
+
+ free_wstr(*lhs);
+
+ if (t1 != t2 && t1->valref == 1 && (t1->flags & PERM) == 0) {
+ size_t nlen = t1->stlen + t2->stlen;
+ erealloc(t1->stptr, char *, nlen + 2, "interpret");
+ memcpy(t1->stptr + t1->stlen, t2->stptr, t2->stlen);
+ t1->stlen = nlen;
+ t1->stptr[nlen] = '\0';
+ } else {
+ size_t nlen = t1->stlen + t2->stlen;
+ char *p;
+
+ emalloc(p, char *, nlen + 2, "interpret");
+ memcpy(p, t1->stptr, t1->stlen);
+ memcpy(p + t1->stlen, t2->stptr, t2->stlen);
+ unref(*lhs);
+ t1 = *lhs = make_str_node(p, nlen, ALREADY_MALLOCED);
+ }
+ t1->flags &= ~(NUMCUR|NUMBER);
+ DEREF(t2);
+ break;
+
+ case Op_assign:
+ lhs = POP_ADDRESS();
+ r = TOP_SCALAR();
+ unref(*lhs);
+ *lhs = r;
+ UPREF(r);
+ REPLACE(r);
+ break;
+
+ case Op_assign_plus:
+#define assign_common(X, Y) \
+lhs = POP_ADDRESS(); \
+X = force_number(*lhs); \
+TOP_NUMBER(Y); \
+unref(*lhs)
+
+#define assign(X, Y, Z) \
+assign_common(X, Y); \
+r = *lhs = make_number(Z); \
+UPREF(r); \
+REPLACE(r)
+
+ assign(x1, x2, x1 + x2);
+ break;
+
+ case Op_assign_minus:
+ assign(x1, x2, x1 - x2);
+ break;
+
+ case Op_assign_times:
+ assign(x1, x2, x1 * x2);
+ break;
+
+ case Op_assign_quotient:
+ assign_common(x1, x2);
+ if (x2 == (AWKNUM) 0) {
+ decr_sp();
+ fatal(_("division by zero attempted in `/='"));
+ }
+#ifdef _CRAY
+ /* special case for integer division, put in for Cray */
+ lx = x2;
+ if (lx == 0) {
+ r = *lhs = make_number(x1 / x2);
+ UPREF(r);
+ REPLACE(r);
+ break;
+ }
+ lx = (long) x1 / lx;
+ if (lx * x1 == x2)
+ r = *lhs = make_number((AWKNUM) lx);
+ else
+#endif /* _CRAY */
+ r = *lhs = make_number(x1 / x2);
+ UPREF(r);
+ REPLACE(r);
+ break;
+
+ case Op_assign_mod:
+ assign_common(x1, x2);
+ if (x2 == (AWKNUM) 0) {
+ decr_sp();
+ fatal(_("division by zero attempted in `%%='"));
+ }
+#ifdef HAVE_FMOD
+ r = *lhs = make_number(fmod(x1, x2));
+#else /* ! HAVE_FMOD */
+ (void) modf(x1 / x2, &x);
+ x = x1 - x2 * x;
+ r = *lhs = make_number(x);
+#endif /* ! HAVE_FMOD */
+ UPREF(r);
+ REPLACE(r);
+ break;
+
+ case Op_assign_exp:
+ assign(x1, x2, (AWKNUM) calc_exp((double) x1, (double) x2));
+ break;
+
+#undef assign
+#undef assign_common
+
+ case Op_var_update: /* update value of NR, FNR or NF */
+ pc->memory->var_update();
+ break;
+
+ case Op_var_assign:
+ pc->memory->var_assign();
+ break;
+
+ case Op_field_assign:
+ pc->field_assign();
+ break;
+
+ case Op_concat:
+ r = concat_exp(pc->expr_count, pc->concat_flag & CSUBSEP);
+ PUSH(r);
+ break;
+
+ case Op_K_switch:
+ {
+ INSTRUCTION *curr;
+ int match_found = FALSE;
+
+ t1 = TOP_SCALAR(); /* switch expression */
+ for (curr = pc->case_val; curr != NULL; curr = curr->nexti) {
+ if (curr->opcode == Op_K_case) {
+ m = curr->memory;
+ if (m->type == Node_regex) {
+ (void) force_string(t1);
+ rp = re_update(m);
+ match_found = (research(rp, t1->stptr, 0, t1->stlen,
+ avoid_dfa(m, t1->stptr, t1->stlen)) >= 0);
+ } else
+ match_found = (cmp_nodes(t1, m) == 0);
+ if (match_found)
+ break;
+ }
+ }
+
+ if (! match_found)
+ curr = pc->switch_dflt;
+ decr_sp();
+ DEREF(t1);
+ JUMPTO(curr->target_stmt);
+ }
+
+ case Op_K_continue:
+ assert(in_loop >= 0);
+ while (in_loop) {
+ r = TOP();
+ ni = r->code_ptr;
+ /* assert(ip->opcode == Op_push_loop); */
+ if (ni->target_continue != NULL)
+ break;
+
+ /*
+ * This one is for continue in case statement;
+ * keep searching for one that corresponds
+ * to a loop.
+ */
+ (void) POP_CODE();
+ in_loop--;
+ }
+
+ if (in_loop)
+ JUMPTO(pc->target_jmp);
+ else
+ fatal(_("`continue' outside a loop is not allowed"));
+ break;
+
+ case Op_K_break:
+ assert(in_loop >= 0);
+ if (! in_loop)
+ fatal(_("`break' outside a loop is not allowed"));
+ else {
+ JUMPTO(pc->target_jmp);
+ }
+ break;
+
+ case Op_K_delete:
+ t1 = POP_ARRAY();
+ do_delete(t1, pc->expr_count);
+ stack_adj(-pc->expr_count);
+ break;
+
+ case Op_K_delete_loop:
+ t1 = POP_ARRAY();
+ lhs = POP_ADDRESS(); /* item */
+ do_delete_loop(t1, lhs);
+ break;
+
+ case Op_in_array:
+ t1 = POP_ARRAY();
+ t2 = mk_sub(pc->expr_count);
+ di = (in_array(t1, t2) != NULL);
+ DEREF(t2);
+ PUSH(make_number((AWKNUM) di));
+ break;
+
+ case Op_arrayfor_init:
+ {
+ NODE **list = NULL;
+ NODE *array;
+ size_t num_elems = 0;
+ size_t i, j;
+ int sort_indices = whiny_users;
+
+ /* get the array */
+ array = POP_ARRAY();
+
+ /* sanity: check if empty */
+ if (array->var_array == NULL || array->table_size == 0)
+ goto arrayfor;
+
+ /* allocate space for array */
+ num_elems = array->table_size;
+ emalloc(list, NODE **, (num_elems + 1) * sizeof(NODE *), "interpret");
+
+ /* populate it */
+ for (i = j = 0; i < array->array_size; i++) {
+ r = array->var_array[i];
+ if (r == NULL)
+ continue;
+ for (; r != NULL; r = r->ahnext) {
+ list[j++] = ahash_dupnode(r);
+ assert(list[j-1] == r);
+ }
+ }
+
+ if (sort_indices)
+ qsort(list, num_elems, sizeof(NODE *), comp_func); /* shazzam! */
+ list[num_elems] = array; /* actual array for use in
+ * lint warning in Op_arrayfor_incr
+ */
+
+arrayfor:
+ getnode(r);
+ r->type = Node_arrayfor;
+ r->var_array = list;
+ r->table_size = num_elems; /* # of elements in list */
+ r->array_size = -1; /* current index */
+ PUSH(r);
+
+ if (num_elems == 0)
+ JUMPTO(pc->target_jmp); /* Op_arrayfor_final */
+ }
+ break; /* next instruction is Op_push_loop */
+
+ case Op_arrayfor_incr:
+ r = PEEK(1); /* (break/continue) bytecode from Op_push_loop has
+ * an offset of 0.
+ */
+ /* assert(r->type == Node_arrayfor); */
+ if (++r->array_size == r->table_size) {
+ NODE *array;
+ array = r->var_array[r->table_size]; /* actual array */
+ if (do_lint && array->table_size != r->table_size)
+ lintwarn(_("for loop: array `%s' changed size from %ld to %ld during loop execution"),
+ array_vname(array), (long) r->table_size, (long) array->table_size);
+ JUMPTO(pc->target_jmp); /* Op_pop_loop */
+ }
+
+ t1 = r->var_array[r->array_size];
+ lhs = get_lhs(pc->array_var, FALSE);
+ unref(*lhs);
+ *lhs = make_string(t1->ahname_str, t1->ahname_len);
+ break;
+
+ case Op_arrayfor_final:
+ r = POP();
+ assert(r->type == Node_arrayfor);
+ free_arrayfor(r);
+ break;
+
+ case Op_builtin:
+ r = pc->builtin(pc->expr_count);
+#if defined(GAWKDEBUG) || defined(ARRAYDEBUG)
+ if (! r)
+ last_was_stopme = TRUE;
+ else
+#endif
+ PUSH(r);
+ break;
+
+ case Op_K_print:
+ do_print(pc->expr_count, pc->redir_type);
+ break;
+
+ case Op_K_printf:
+ do_printf(pc->expr_count, pc->redir_type);
+ break;
+
+ case Op_K_print_rec:
+ do_print_rec(pc->expr_count, pc->redir_type);
+ break;
+
+ case Op_push_re:
+ m = pc->memory;
+ if (m->type == Node_dynregex) {
+ r = POP_STRING();
+ unref(m->re_exp);
+ m->re_exp = r;
+ }
+ PUSH(m);
+ break;
+
+ case Op_match_rec:
+ m = pc->memory;
+ t1 = *get_field(0, (Func_ptr *) 0);
+match_re:
+ rp = re_update(m);
+ /*
+ * FIXME:
+ *
+ * Any place where research() is called with a last parameter of
+ * zero, we need to use the avoid_dfa test. This appears here and
+ * in the code for Op_K_switch.
+ *
+ * A new or improved dfa that distinguishes beginning/end of
+ * string from beginning/end of line will allow us to get rid of
+ * this temporary hack.
+ *
+ * The avoid_dfa() function is in re.c; it is not very smart.
+ */
+
+ di = research(rp, t1->stptr, 0, t1->stlen,
+ avoid_dfa(m, t1->stptr, t1->stlen));
+ di = (di == -1) ^ (pc->opcode != Op_nomatch);
+ if(pc->opcode != Op_match_rec) {
+ decr_sp();
+ DEREF(t1);
+ }
+ r = make_number((AWKNUM) di);
+ PUSH(r);
+ break;
+
+ case Op_nomatch:
+ /* fall through */
+ case Op_match:
+ m = pc->memory;
+ t1 = TOP_STRING();
+ if (m->type == Node_dynregex) {
+ unref(m->re_exp);
+ m->re_exp = t1;
+ decr_sp();
+ t1 = TOP_STRING();
+ }
+ goto match_re;
+ break;
+
+ case Op_indirect_func_call:
+ {
+ int arg_count;
+
+ f = NULL;
+ arg_count = (pc + 1)->expr_count;
+ t1 = PEEK(arg_count); /* indirect var */
+ assert(t1->type == Node_val); /* @a[1](p) not allowed in grammar */
+ (void) force_string(t1);
+ if (t1->stlen > 0) {
+ /* retrieve function definition node */
+ f = pc->func_body;
+ if (f != NULL
+ && STREQ(f->vname, t1->stptr) /* indirect var hasn't been reassigned */
+ )
+ goto func_call;
+ f = lookup(t1->stptr);
+ }
+
+ if (f == NULL || f->type != Node_func)
+ fatal(_("function called indirectly through `%s' does not exist"), pc->func_name);
+ pc->func_body = f; /* save for next call */
+
+ goto func_call;
+ }
+
+ case Op_func_call:
+ /* retrieve function definition node */
+ f = pc->func_body;
+ if (f == NULL) {
+ f = lookup(pc->func_name);
+ if (f == NULL || f->type != Node_func)
+ fatal(_("function `%s' not defined"), pc->func_name);
+ pc->func_body = f; /* save for next call */
+ }
+
+ /* save current frame along with source and loop count.
+ * NB: 'function fun() { break; } BEGIN { while (1) fun(); }'
+ * should be fatal.
+ */
+
+func_call:
+ frame_ptr->vname = source; /* save current source */
+ frame_ptr->loop_count = in_loop; /* save loop count */
+ setup_frame(pc);
+ in_loop = 0;
+
+ ni = f->code_ptr; /* function code */
+ if (ni->opcode == Op_ext_func) {
+ /* dynamically set source and line numbers for an extension builtin. */
+ ni->source_file = source;
+ ni->source_line = sourceline;
+ ni->nexti->source_line = sourceline; /* Op_builtin */
+ ni->nexti->nexti->source_line = sourceline; /* Op_K_return */
+ }
+
+ /* run the function instructions */
+ JUMPTO(ni); /* Op_func or Op_ext_func */
+
+ case Op_K_return:
+ m = POP_SCALAR(); /* return value */
+
+ r = POP();
+ while (r->type != Node_frame) {
+ switch (r->type) {
+ case Node_arrayfor:
+ free_arrayfor(r);
+ break;
+ case Node_val:
+ DEREF(r);
+ break;
+ case Node_instruction:
+ freenode(r);
+ break;
+ default:
+ break;
+ }
+ r = POP();
+ }
+
+ ni = restore_frame(r);
+ source = frame_ptr->vname;
+ in_loop = frame_ptr->loop_count;
+
+ /* put the return value back on stack */
+ PUSH(m);
+ JUMPTO(ni);
+
+ case Op_K_getline_redir:
+ r = do_getline_redir(pc->into_var, pc->redir_type);
+ PUSH(r);
+ break;
+
+ case Op_K_getline: /* no redirection */
+ do {
+ int ret;
+ ret = nextfile(&curfile, FALSE);
+ if (ret <= 0)
+ r = do_getline(pc->into_var, curfile);
+ else {
+ PUSH_CODE(pc);
+ if (curfile == NULL)
+ JUMPTO((pc + 1)->target_endfile);
+ else {
+ TOP()->loop_count = in_loop;
+ in_loop = 0;
+ JUMPTO((pc + 1)->target_beginfile);
+ }
+ }
+ } while (r == NULL); /* EOF */
+ PUSH(r);
+ break;
+
+ case Op_after_endfile:
+ ni = POP_CODE();
+ assert(ni->opcode == Op_newfile || ni->opcode == Op_K_getline);
+ JUMPTO(ni);
+
+ case Op_after_beginfile:
+ after_beginfile(&curfile);
+ in_loop = TOP()->loop_count;
+ ni = POP_CODE();
+ if (ni->opcode == Op_K_getline
+ || curfile == NULL /* skipping directory argument */
+ )
+ JUMPTO(ni);
+ PUSH_CODE(ni); /* for use in Op_K_nextfile and Op_get_record */
+ break; /* Op_get_record */
+
+ case Op_newfile:
+ {
+ int ret;
+ ret = nextfile(&curfile, FALSE);
+ if (ret < 0)
+ JUMPTO(pc->target_jmp); /* end block or Op_atexit */
+ else if (ret > 0) {
+ PUSH_CODE(pc);
+ if (curfile == NULL)
+ JUMPTO(pc->target_endfile);
+ TOP()->loop_count = in_loop;
+ in_loop = 0;
+ break; /* beginfile block */
+ } else
+ PUSH_CODE(pc);
+ /* fall through */
+ }
+
+ case Op_get_record:
+ if (curfile == NULL) { /* from getline without redirection */
+ ni = POP_CODE(); /* Op_newfile */
+ ni = ni->target_jmp; /* end_block or Op_atexit */
+ } else if (inrec(curfile) == 0)
+ break; /* prog block */
+ else
+ ni = POP_CODE(); /* Op_newfile */
+ JUMPTO(ni);
+
+ case Op_K_nextfile:
+ if (currule != Rule && currule != BEGINFILE)
+ fatal(_("`nextfile' cannot be called from a `%s' rule"),
+ ruletab[currule]);
+ (void) nextfile(&curfile, TRUE);
+ if (currule == BEGINFILE) {
+ while (TRUE) {
+ r = POP();
+ switch (r->type) {
+ case Node_instruction:
+ ni = r->code_ptr;
+ if (ni->opcode == Op_newfile
+ || ni->opcode == Op_K_getline
+ ) {
+ in_loop = r->loop_count;
+ freenode(r);
+ JUMPTO(ni);
+ }
+ freenode(r);
+ break;
+ case Node_frame:
+ (void) restore_frame(r);
+ source = frame_ptr->vname;
+ break;
+ case Node_arrayfor:
+ free_arrayfor(r);
+ break;
+ case Node_val:
+ DEREF(r);
+ break;
+ default:
+ break;
+ }
+ }
+ }
+
+ unwind_stack(stack_bottom + 1); /* don't pop Op_newfile */
+ in_loop = 0;
+ JUMPTO(pc->target_endfile); /* endfile block */
+
+ case Op_K_exit:
+ exiting = TRUE;
+ POP_NUMBER(x1);
+ exit_val = (int) x1;
+#ifdef VMS
+ if (exit_val == 0)
+ exit_val = EXIT_SUCCESS;
+ else if (exit_val == 1)
+ exit_val = EXIT_FAILURE;
+ /* else
+ just pass anything else on through */
+#endif
+ /* jump to either the first end_block instruction
+ * or to Op_atexit
+ */
+ unwind_stack(stack_bottom);
+ in_loop = 0;
+ JUMPTO(pc->target_jmp);
+
+ case Op_K_next:
+ if (currule != Rule)
+ fatal(_("`next' cannot be called from a `%s' rule"), ruletab[currule]);
+
+ /* jump to Op_get_record */
+ unwind_stack(stack_bottom + 1); /* don't pop Op_newfile */
+ in_loop = 0;
+ JUMPTO(pc->target_jmp);
+
+ case Op_pop:
+#if defined(GAWKDEBUG) || defined(ARRAYDEBUG)
+ if (last_was_stopme)
+ last_was_stopme = FALSE;
+ else
+#endif
+ {
+ r = POP_SCALAR();
+ DEREF(r);
+ }
+ break;
+
+ case Op_line_range:
+ if (pc->triggered) /* evaluate right expression */
+ JUMPTO(pc->target_jmp);
+ /* else
+ evaluate left expression */
+ break;
+
+ case Op_cond_pair:
+ {
+ int result;
+ INSTRUCTION *ip;
+
+ t1 = TOP_SCALAR(); /* from right hand side expression */
+ di = (eval_condition(t1) != 0);
+ DEREF(t1);
+
+ ip = pc->line_range; /* Op_line_range */
+
+ if (! ip->triggered && di) {
+ /* not already triggered and left expression is TRUE */
+ decr_sp();
+ ip->triggered = TRUE;
+ JUMPTO(ip->target_jmp); /* evaluate right expression */
+ }
+
+ result = ip->triggered || di;
+ ip->triggered ^= di; /* update triggered flag */
+ r = make_number((AWKNUM) result); /* final value of condition pair */
+ REPLACE(r);
+ JUMPTO(pc->target_jmp);
+ }
+
+ case Op_exec_count:
+ INCREMENT(pc->exec_count);
+ break;
+
+ case Op_no_op:
+ case Op_K_if:
+ case Op_K_else:
+ case Op_cond_exp:
+ break;
+
+ default:
+ fatal(_("Sorry, don't know how to interpret `%s'"), opcode2str(pc->opcode));
+ }
+
+ JUMPTO(pc->nexti);
+
+/* } forever */
+
+ /* not reached */
+ return 0;
+
+#undef mk_sub
+#undef JUMPTO
+}
diff --git a/eval_d.c b/eval_d.c
new file mode 100644
index 00000000..64a8e55a
--- /dev/null
+++ b/eval_d.c
@@ -0,0 +1,27 @@
+/*
+ * eval_p.c - compile eval.c with debugging turned on.
+ */
+
+/*
+ * Copyright (C) 2001 the Free Software Foundation, Inc.
+ *
+ * This file is part of GAWK, the GNU implementation of the
+ * AWK Programming Language.
+ *
+ * GAWK is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * GAWK is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
+ */
+
+#define DEBUGGING 1
+#include "eval.c"
diff --git a/ext.c b/ext.c
index 4550355f..e7351a2b 100644
--- a/ext.c
+++ b/ext.c
@@ -37,19 +37,20 @@
static unsigned long long dummy; /* fake out gcc for dynamic loading? */
#endif
-extern int errcount;
-
/* do_ext --- load an extension */
NODE *
-do_ext(NODE *tree)
+do_ext(int nargs)
{
NODE *obj;
NODE *fun;
- NODE *(*func) P((NODE *, void *));
+ NODE *tmp = NULL;
+ NODE *(*func)(NODE *, void *);
void *dl;
int flags = RTLD_LAZY;
+#if 0
static short warned = FALSE;
+#endif
#ifdef __GNUC__
AWKNUM junk;
@@ -58,64 +59,81 @@ do_ext(NODE *tree)
#endif
if (do_sandbox)
- fatal(_("extensions not allowed in sandbox mode"));
+ fatal(_("extensions are not allowed in sandbox mode"));
+#if 0
+ /* already done in parser */
if (do_lint && ! warned) {
warned = TRUE;
lintwarn(_("`extension' is a gawk extension"));
}
+#endif
- if (do_traditional || do_posix) {
- errcount++;
+ if (do_traditional || do_posix)
error(_("`extension' is a gawk extension"));
- }
- obj = tree_eval(tree->lnode);
- force_string(obj);
+ fun = POP_STRING();
+ obj = POP_STRING();
#ifdef RTLD_GLOBAL
flags |= RTLD_GLOBAL;
#endif
- if ((dl = dlopen(obj->stptr, flags)) == NULL)
- fatal(_("extension: cannot open `%s' (%s)\n"), obj->stptr,
+ if ((dl = dlopen(obj->stptr, flags)) == NULL) {
+ /* fatal needs `obj', and we need to deallocate it! */
+ msg(_("fatal: extension: cannot open `%s' (%s)\n"), obj->stptr,
dlerror());
+ferror:
+ DEREF(obj);
+ DEREF(fun);
+ gawk_exit(EXIT_FATAL);
+ }
- fun = tree_eval(tree->rnode->lnode);
- force_string(fun);
-
- func = (NODE *(*) P((NODE *, void *))) dlsym(dl, fun->stptr);
- if (func == NULL)
- fatal(_("extension: library `%s': cannot call function `%s' (%s)\n"),
+ func = (NODE *(*)(NODE *, void *)) dlsym(dl, fun->stptr);
+ if (func == NULL) {
+ msg(_("fatal: extension: library `%s': cannot call function `%s' (%s)\n"),
obj->stptr, fun->stptr, dlerror());
- free_temp(obj);
- free_temp(fun);
+ goto ferror;
+ }
- return (*func)(tree, dl);
+ tmp = (*func)(obj, dl);
+ if (tmp == NULL)
+ tmp = Nnull_string;
+ DEREF(obj);
+ DEREF(fun);
+ return tmp;
}
+
/* make_builtin --- register name to be called as func with a builtin body */
void
-make_builtin(char *name, NODE *(*func) P((NODE *)), int count)
+make_builtin(char *name, NODE *(*func)(int), int count)
{
- NODE *p, *b, *f;
- char **vnames, *parm_names, *sp;
+ NODE *p, *symbol, *f;
+ INSTRUCTION *b, *r;
+ char *sp;
+ char *pname;
+ char **vnames = NULL;
char c, buf[200];
- int space_needed, i;
+ size_t space_needed;
+ int i;
sp = name;
if (sp == NULL || *sp == '\0')
- fatal(_("extension: missing function name"));
+ fatal(_("extension: missing function name"));
- while ((c = *sp++) != '\0')
+ while ((c = *sp++) != '\0') {
if ((sp == &name[1] && c != '_' && ! isalpha(c))
|| (sp > &name[1] && ! is_identchar(c)))
fatal(_("extension: illegal character `%c' in function name `%s'"), c, name);
+ }
f = lookup(name);
+
if (f != NULL) {
if (f->type == Node_func) {
- if (f->rnode->type != Node_builtin) /* user-defined function */
+ INSTRUCTION *pc = f->code_ptr;
+ if (pc->opcode != Op_ext_func) /* user-defined function */
fatal(_("extension: can't redefine function `%s'"), name);
else {
/* multiple extension() calls etc. */
@@ -123,133 +141,151 @@ make_builtin(char *name, NODE *(*func) P((NODE *)), int count)
lintwarn(_("extension: function `%s' already defined"), name);
return;
}
- } else {
- if (check_special(name) >= 0)
- fatal(_("extension: can't use gawk built-in `%s' as function name"), name);
+ } else
/* variable name etc. */
fatal(_("extension: function name `%s' previously defined"), name);
+ } else if (check_special(name) >= 0)
+ fatal(_("extension: can't use gawk built-in `%s' as function name"), name);
+ /* count parameters, create artificial list of param names */
+
+ if (count < 0)
+ fatal(_("make_builtin: negative argument count for function `%s'"),
+ name);
+
+ if (count > 0) {
+ sprintf(buf, "p%d", count);
+ space_needed = strlen(buf) + 1;
+ emalloc(vnames, char **, count * sizeof(char *), "make_builtin");
+ for (i = 0; i < count; i++) {
+ emalloc(pname, char *, space_needed, "make_builtin");
+ sprintf(pname, "p%d", i);
+ vnames[i] = pname;
}
}
- /* count parameters, create artificial list of param names */
- space_needed = 0;
- for (i = 0; i < count; i++) {
- sprintf(buf, "p%d", i);
- space_needed += strlen(buf) + 1;
- }
- emalloc(parm_names, char *, space_needed, "make_builtin");
- emalloc(vnames, char **, count * sizeof(char *), "make_builtin");
- sp = parm_names;
- for (i = 0; i < count; i++) {
- sprintf(sp, "p%d",i);
- vnames[i] = sp;
- sp += strlen(sp) + 1;
- }
getnode(p);
p->type = Node_param_list;
p->flags |= FUNC;
- p->rnode = NULL;
- p->param = name;
+ /* get our own copy for name */
+ p->param = estrdup(name, strlen(name));
p->param_cnt = count;
-#if 0
- /* setting these blows away the param_cnt. dang unions! */
- p->source_line = __LINE__;
- p->source_file = __FILE__;
-#endif
- getnode(b);
- b->type = Node_builtin;
+ /* actual source and line numbers set at runtime for these instructions */
+ b = bcalloc(Op_builtin, 1, __LINE__);
b->builtin = func;
- b->subnode = p;
- b->source_line = __LINE__;
- b->source_file = __FILE__;
+ b->expr_count = count;
+ b->nexti = bcalloc(Op_K_return, 1, __LINE__);
+ r = bcalloc(Op_ext_func, 1, __LINE__);
+ r->source_file = __FILE__;
+ r->nexti = b;
+
+ /* NB: extension sub must return something */
+
+ symbol = mk_symbol(Node_func, p);
+ symbol->parmlist = vnames;
+ symbol->code_ptr = r;
+ r->func_body = symbol;
+ (void) install_symbol(p->param, symbol);
+}
- f = node(p, Node_func, b);
- f->parmlist = vnames;
- install(name, f);
+
+/* get_curfunc_arg_count --- return number actual parameters */
+
+size_t
+get_curfunc_arg_count()
+{
+ size_t argc;
+ INSTRUCTION *pc;
+
+ pc = (INSTRUCTION *) frame_ptr->reti; /* Op_func_call instruction */
+ argc = (pc + 1)->expr_count; /* # of arguments supplied */
+ return argc;
}
-/* get_argument --- Get the n'th argument of a dynamically linked function */
+
+/* get_argument --- get the n'th argument of a dynamically linked function */
NODE *
-get_argument(NODE *tree, int i)
+get_argument(int i)
{
- extern NODE **stack_ptr;
+ int pcount;
+ NODE *t, *f;
int actual_args;
-
- actual_args = get_curfunc_arg_count();
- if (i < 0 || i >= tree->param_cnt || i >= actual_args)
+ INSTRUCTION *pc;
+
+ f = frame_ptr->func_node;
+ pcount = f->lnode->param_cnt;
+
+ pc = (INSTRUCTION *) frame_ptr->reti; /* Op_func_call instruction */
+ actual_args = (pc + 1)->expr_count; /* # of arguments supplied */
+
+ if (i < 0 || i >= pcount || i >= actual_args)
return NULL;
- tree = stack_ptr[i];
- if (tree->type == Node_array_ref)
- tree = tree->orig_array;
- if (tree->type == Node_var_new || tree->type == Node_var_array)
- return tree;
+ t = GET_PARAM(i);
- return tree->lnode;
+ if (t->type == Node_array_ref)
+ return t->orig_array; /* Node_var_new or Node_var_array */
+ if (t->type == Node_var_new || t->type == Node_var_array)
+ return t;
+ return t->var_value;
}
+
/* get_actual_argument --- get a scalar or array, allowed to be optional */
NODE *
-get_actual_argument(NODE *tree, unsigned int i, int optional, int want_array)
+get_actual_argument(int i, int optional, int want_array)
{
/* optional : if TRUE and i th argument not present return NULL, else fatal. */
- NODE *t;
+ NODE *t, *f;
+ int pcount;
+ char *fname;
- t = get_argument(tree, i);
+ t = get_argument(i);
+
+ f = frame_ptr->func_node;
+ pcount = f->lnode->param_cnt;
+ fname = f->lnode->param;
if (t == NULL) {
- if (i >= tree->param_cnt) /* must be fatal */
+ if (i >= pcount) /* must be fatal */
fatal(_("function `%s' defined to take no more than %d argument(s)"),
- tree->param, tree->param_cnt);
+ fname, pcount);
if (! optional)
fatal(_("function `%s': missing argument #%d"),
- tree->param, i + 1);
+ fname, i + 1);
return NULL;
}
if (t->type == Node_var_new)
- return (want_array ? get_array(t) : tree_eval(t));
+ return (want_array ? get_array(t, FALSE) : t);
if (want_array) {
if (t->type != Node_var_array)
fatal(_("function `%s': argument #%d: attempt to use scalar as an array"),
- tree->param, i + 1);
+ fname, i + 1);
} else {
if (t->type != Node_val)
fatal(_("function `%s': argument #%d: attempt to use array as a scalar"),
- tree->param, i + 1);
+ fname, i + 1);
}
return t;
}
-/* set_value --- set the return value of a dynamically linked function */
-
-void
-set_value(NODE *tree)
-{
- extern NODE *ret_node;
-
- if (tree)
- ret_node = tree;
- else
- ret_node = Nnull_string;
-}
#else
/* do_ext --- dummy version if extensions not available */
NODE *
-do_ext(NODE *tree)
+do_ext(int nargs)
{
const char *emsg = _("Operation Not Supported");
unref(ERRNO_node->var_value);
ERRNO_node->var_value = make_string((char *) emsg, strlen(emsg));
- return tmp_number((AWKNUM) -1);
+ return make_number((AWKNUM) -1);
}
#endif
diff --git a/extension/arrayparm.c b/extension/arrayparm.c
index ddf1c8c4..281b50a2 100644
--- a/extension/arrayparm.c
+++ b/extension/arrayparm.c
@@ -41,8 +41,7 @@
*/
static NODE *
-do_mkarray(tree)
-NODE *tree;
+do_mkarray(int args)
{
int ret = -1;
NODE *var, *sub, *val;
@@ -51,13 +50,9 @@ NODE *tree;
if (do_lint && get_curfunc_arg_count() > 3)
lintwarn("mkarray: called with too many arguments");
- var = get_argument(tree, 0);
- if (var == NULL)
- var = stack_ptr[0];
-
- var = get_array(var);
- sub = get_argument(tree, 1);
- val = get_argument(tree, 2);
+ var = get_array_argument(0, FALSE);
+ sub = get_scalar_argument(1, FALSE);
+ val = get_scalar_argument(2, FALSE);
printf("var->type = %s\n", nodetype2str(var->type));
printf("sub->type = %s\n", nodetype2str(sub->type));
@@ -69,12 +64,8 @@ NODE *tree;
*elemval = dupnode(val);
ret = 0;
-
/* Set the return value */
- set_value(tmp_number((AWKNUM) ret));
-
- /* Just to make the interpreter happy */
- return tmp_number((AWKNUM) 0);
+ return make_number((AWKNUM) ret);
}
/* dlload --- load new builtins in this library */
@@ -86,5 +77,5 @@ void *dl;
{
make_builtin("mkarray", do_mkarray, 3);
- return tmp_number((AWKNUM) 0);
+ return make_number((AWKNUM) 0);
}
diff --git a/extension/dl.c b/extension/dl.c
index 60f104fa..49938fc8 100644
--- a/extension/dl.c
+++ b/extension/dl.c
@@ -32,8 +32,7 @@
static void *sdl = NULL;
static NODE *
-zaxxon(tree)
-NODE *tree;
+zaxxon(int nargs)
{
NODE *obj;
int i;
@@ -42,11 +41,11 @@ NODE *tree;
/*
* Print the arguments
*/
- printf("External linkage %s(", tree->param);
+ printf("External linkage zaxxon(");
- for (i = 0; i < tree->param_cnt; i++) {
+ for (i = 0; i < nargs; i++) {
- obj = get_argument(tree, i);
+ obj = get_scalar_argument(i, TRUE);
if (obj == NULL)
break;
@@ -54,7 +53,6 @@ NODE *tree;
force_string(obj);
printf(comma ? ", %s" : "%s", obj->stptr);
- free_temp(obj);
comma = 1;
}
@@ -63,7 +61,7 @@ NODE *tree;
/*
* Do something useful
*/
- obj = get_argument(tree, 0);
+ obj = get_scalar_argument(0, FALSE);
if (obj != NULL) {
force_string(obj);
@@ -75,14 +73,10 @@ NODE *tree;
dlclose(sdl);
sdl = NULL;
}
- free_temp(obj);
}
/* Set the return value */
- set_value(tmp_number((AWKNUM) 3.14));
-
- /* Just to make the interpreter happy */
- return tmp_number((AWKNUM) 0);
+ return make_number((AWKNUM) 3.14);
}
NODE *
@@ -92,5 +86,5 @@ void *dl;
{
sdl = dl;
make_builtin("zaxxon", zaxxon, 4);
- return tmp_number((AWKNUM) 0);
+ return make_number((AWKNUM) 0);
}
diff --git a/extension/filefuncs.c b/extension/filefuncs.c
index 5dfd1228..35b1ae62 100644
--- a/extension/filefuncs.c
+++ b/extension/filefuncs.c
@@ -34,8 +34,7 @@
/* do_chdir --- provide dynamically loaded chdir() builtin for gawk */
static NODE *
-do_chdir(tree)
-NODE *tree;
+do_chdir(int nargs)
{
NODE *newdir;
int ret = -1;
@@ -43,18 +42,13 @@ NODE *tree;
if (do_lint && get_curfunc_arg_count() != 1)
lintwarn("chdir: called with incorrect number of arguments");
- newdir = get_scalar_argument(tree, 0, FALSE);
+ newdir = get_scalar_argument(0, FALSE);
(void) force_string(newdir);
ret = chdir(newdir->stptr);
if (ret < 0)
update_ERRNO();
- free_temp(newdir);
-
- /* Set the return value */
- set_value(tmp_number((AWKNUM) ret));
- /* Just to make the interpreter happy */
- return tmp_number((AWKNUM) 0);
+ return make_number((AWKNUM) ret);
}
/* format_mode --- turn a stat mode field into something readable */
@@ -165,10 +159,9 @@ unsigned long fmode;
/* do_stat --- provide a stat() function for gawk */
static NODE *
-do_stat(tree)
-NODE *tree;
+do_stat(int nargs)
{
- NODE *file, *array;
+ NODE *file, *array, *tmp;
struct stat sbuf;
int ret;
NODE **aptr;
@@ -179,8 +172,8 @@ NODE *tree;
lintwarn("stat: called with too many arguments");
/* directory is first arg, array to hold results is second */
- file = get_scalar_argument(tree, 0, FALSE);
- array = get_array_argument(tree, 1, FALSE);
+ file = get_scalar_argument(0, FALSE);
+ array = get_array_argument(1, FALSE);
/* empty out the array */
assoc_clear(array);
@@ -190,70 +183,83 @@ NODE *tree;
ret = lstat(file->stptr, & sbuf);
if (ret < 0) {
update_ERRNO();
-
- set_value(tmp_number((AWKNUM) ret));
-
- free_temp(file);
- return tmp_number((AWKNUM) 0);
+ return make_number((AWKNUM) 0);
}
/* fill in the array */
- aptr = assoc_lookup(array, tmp_string("name", 4), FALSE);
+ aptr = assoc_lookup(array, tmp = make_string("name", 4), FALSE);
*aptr = dupnode(file);
+ unref(tmp);
- aptr = assoc_lookup(array, tmp_string("dev", 3), FALSE);
+ aptr = assoc_lookup(array, tmp = make_string("dev", 3), FALSE);
*aptr = make_number((AWKNUM) sbuf.st_dev);
+ unref(tmp);
- aptr = assoc_lookup(array, tmp_string("ino", 3), FALSE);
+ aptr = assoc_lookup(array, tmp = make_string("ino", 3), FALSE);
*aptr = make_number((AWKNUM) sbuf.st_ino);
+ unref(tmp);
- aptr = assoc_lookup(array, tmp_string("mode", 4), FALSE);
+ aptr = assoc_lookup(array, tmp = make_string("mode", 4), FALSE);
*aptr = make_number((AWKNUM) sbuf.st_mode);
+ unref(tmp);
- aptr = assoc_lookup(array, tmp_string("nlink", 5), FALSE);
+ aptr = assoc_lookup(array, tmp = make_string("nlink", 5), FALSE);
*aptr = make_number((AWKNUM) sbuf.st_nlink);
+ unref(tmp);
- aptr = assoc_lookup(array, tmp_string("uid", 3), FALSE);
+ aptr = assoc_lookup(array, tmp = make_string("uid", 3), FALSE);
*aptr = make_number((AWKNUM) sbuf.st_uid);
+ unref(tmp);
- aptr = assoc_lookup(array, tmp_string("gid", 3), FALSE);
+ aptr = assoc_lookup(array, tmp = make_string("gid", 3), FALSE);
*aptr = make_number((AWKNUM) sbuf.st_gid);
+ unref(tmp);
- aptr = assoc_lookup(array, tmp_string("size", 4), FALSE);
+ aptr = assoc_lookup(array, tmp = make_string("size", 4), FALSE);
*aptr = make_number((AWKNUM) sbuf.st_size);
+ unref(tmp);
- aptr = assoc_lookup(array, tmp_string("blocks", 6), FALSE);
+ aptr = assoc_lookup(array, tmp = make_string("blocks", 6), FALSE);
*aptr = make_number((AWKNUM) sbuf.st_blocks);
+ unref(tmp);
- aptr = assoc_lookup(array, tmp_string("atime", 5), FALSE);
+ aptr = assoc_lookup(array, tmp = make_string("atime", 5), FALSE);
*aptr = make_number((AWKNUM) sbuf.st_atime);
+ unref(tmp);
- aptr = assoc_lookup(array, tmp_string("mtime", 5), FALSE);
+ aptr = assoc_lookup(array, tmp = make_string("mtime", 5), FALSE);
*aptr = make_number((AWKNUM) sbuf.st_mtime);
+ unref(tmp);
- aptr = assoc_lookup(array, tmp_string("ctime", 5), FALSE);
+ aptr = assoc_lookup(array, tmp = make_string("ctime", 5), FALSE);
*aptr = make_number((AWKNUM) sbuf.st_ctime);
+ unref(tmp);
/* for block and character devices, add rdev, major and minor numbers */
if (S_ISBLK(sbuf.st_mode) || S_ISCHR(sbuf.st_mode)) {
- aptr = assoc_lookup(array, tmp_string("rdev", 4), FALSE);
+ aptr = assoc_lookup(array, tmp = make_string("rdev", 4), FALSE);
*aptr = make_number((AWKNUM) sbuf.st_rdev);
+ unref(tmp);
- aptr = assoc_lookup(array, tmp_string("major", 5), FALSE);
+ aptr = assoc_lookup(array, tmp = make_string("major", 5), FALSE);
*aptr = make_number((AWKNUM) major(sbuf.st_rdev));
+ unref(tmp);
- aptr = assoc_lookup(array, tmp_string("minor", 5), FALSE);
+ aptr = assoc_lookup(array, tmp = make_string("minor", 5), FALSE);
*aptr = make_number((AWKNUM) minor(sbuf.st_rdev));
+ unref(tmp);
}
#ifdef HAVE_ST_BLKSIZE
- aptr = assoc_lookup(array, tmp_string("blksize", 7), FALSE);
+ aptr = assoc_lookup(array, tmp = make_string("blksize", 7), FALSE);
*aptr = make_number((AWKNUM) sbuf.st_blksize);
+ unref(tmp);
#endif /* HAVE_ST_BLKSIZE */
- aptr = assoc_lookup(array, tmp_string("pmode", 5), FALSE);
+ aptr = assoc_lookup(array, tmp = make_string("pmode", 5), FALSE);
pmode = format_mode(sbuf.st_mode);
*aptr = make_string(pmode, strlen(pmode));
+ unref(tmp);
/* for symbolic links, add a linkval field */
if (S_ISLNK(sbuf.st_mode)) {
@@ -267,8 +273,9 @@ NODE *tree;
fatal("size of symbolic link too big");
buf[linksize] = '\0';
- aptr = assoc_lookup(array, tmp_string("linkval", 7), FALSE);
+ aptr = assoc_lookup(array, tmp = make_string("linkval", 7), FALSE);
*aptr = make_string(buf, linksize);
+ unref(tmp);
}
}
@@ -308,16 +315,11 @@ NODE *tree;
#endif
}
- aptr = assoc_lookup(array, tmp_string("type", 4), FALSE);
+ aptr = assoc_lookup(array, tmp = make_string("type", 4), FALSE);
*aptr = make_string(type, strlen(type));
+ unref(tmp);
- free_temp(file);
-
- /* Set the return value */
- set_value(tmp_number((AWKNUM) ret));
-
- /* Just to make the interpreter happy */
- return tmp_number((AWKNUM) 0);
+ return make_number((AWKNUM) ret);
}
/* dlload --- load new builtins in this library */
@@ -330,5 +332,5 @@ void *dl;
make_builtin("chdir", do_chdir, 1);
make_builtin("stat", do_stat, 2);
- return tmp_number((AWKNUM) 0);
+ return make_number((AWKNUM) 0);
}
diff --git a/extension/fork.c b/extension/fork.c
index 7ffe857a..c5458c60 100644
--- a/extension/fork.c
+++ b/extension/fork.c
@@ -30,11 +30,11 @@
/* do_fork --- provide dynamically loaded fork() builtin for gawk */
static NODE *
-do_fork(tree)
-NODE *tree;
+do_fork(int nargs)
{
int ret = -1;
NODE **aptr;
+ NODE *tmp;
if (do_lint && get_curfunc_arg_count() > 0)
lintwarn("fork: called with too many arguments");
@@ -46,26 +46,24 @@ NODE *tree;
else if (ret == 0) {
/* update PROCINFO in the child */
- aptr = assoc_lookup(PROCINFO_node, tmp_string("pid", 3), FALSE);
+ aptr = assoc_lookup(PROCINFO_node, tmp = make_string("pid", 3), FALSE);
(*aptr)->numbr = (AWKNUM) getpid();
+ unref(tmp);
- aptr = assoc_lookup(PROCINFO_node, tmp_string("ppid", 4), FALSE);
+ aptr = assoc_lookup(PROCINFO_node, tmp = make_string("ppid", 4), FALSE);
(*aptr)->numbr = (AWKNUM) getppid();
+ unref(tmp);
}
/* Set the return value */
- set_value(tmp_number((AWKNUM) ret));
-
- /* Just to make the interpreter happy */
- return tmp_number((AWKNUM) 0);
+ return make_number((AWKNUM) ret);
}
/* do_waitpid --- provide dynamically loaded waitpid() builtin for gawk */
static NODE *
-do_waitpid(tree)
-NODE *tree;
+do_waitpid(int nargs)
{
NODE *pidnode;
int ret = -1;
@@ -76,7 +74,7 @@ NODE *tree;
if (do_lint && get_curfunc_arg_count() > 1)
lintwarn("waitpid: called with too many arguments");
- pidnode = get_argument(tree, 0);
+ pidnode = get_scalar_argument(0, FALSE);
if (pidnode != NULL) {
pidval = force_number(pidnode);
pid = (int) pidval;
@@ -88,10 +86,7 @@ NODE *tree;
lintwarn("wait: called with no arguments");
/* Set the return value */
- set_value(tmp_number((AWKNUM) ret));
-
- /* Just to make the interpreter happy */
- return tmp_number((AWKNUM) 0);
+ return make_number((AWKNUM) ret);
}
/* dlload --- load new builtins in this library */
@@ -103,5 +98,5 @@ void *dl;
{
make_builtin("fork", do_fork, 0);
make_builtin("waitpid", do_waitpid, 1);
- return tmp_number((AWKNUM) 0);
+ return make_number((AWKNUM) 0);
}
diff --git a/extension/ordchr.c b/extension/ordchr.c
index 723edc70..c5a1375f 100644
--- a/extension/ordchr.c
+++ b/extension/ordchr.c
@@ -33,8 +33,7 @@
/* do_ord --- return numeric value of first char of string */
static NODE *
-do_ord(tree)
-NODE *tree;
+do_ord(int nargs)
{
NODE *str;
int ret = -1;
@@ -42,27 +41,22 @@ NODE *tree;
if (do_lint && get_curfunc_arg_count() > 1)
lintwarn("ord: called with too many arguments");
- str = get_argument(tree, 0);
+ str = get_scalar_argument(0, FALSE);
if (str != NULL) {
(void) force_string(str);
ret = str->stptr[0];
- free_temp(str);
} else if (do_lint)
lintwarn("ord: called with no arguments");
/* Set the return value */
- set_value(tmp_number((AWKNUM) ret));
-
- /* Just to make the interpreter happy */
- return tmp_number((AWKNUM) 0);
+ return make_number((AWKNUM) ret);
}
/* do_chr --- turn numeric value into a string */
static NODE *
-do_chr(tree)
-NODE *tree;
+do_chr(int nargs)
{
NODE *num;
unsigned int ret = 0;
@@ -74,23 +68,18 @@ NODE *tree;
if (do_lint && get_curfunc_arg_count() > 1)
lintwarn("chr: called with too many arguments");
- num = get_argument(tree, 0);
+ num = get_scalar_argument(0, FALSE);
if (num != NULL) {
val = force_number(num);
ret = val; /* convert to int */
- free_temp(num);
ret &= 0xff;
str[0] = ret;
str[1] = '\0';
} else if (do_lint)
lintwarn("chr: called with no arguments");
-
/* Set the return value */
- set_value(tmp_string(str, 1));
-
- /* Just to make the interpreter happy */
- return tmp_number((AWKNUM) 0);
+ return make_string(str, 1);
}
/* dlload --- load new builtins in this library */
@@ -103,5 +92,5 @@ void *dl;
make_builtin("ord", do_ord, 1);
make_builtin("chr", do_chr, 1);
- return tmp_number((AWKNUM) 0);
+ return make_number((AWKNUM) 0);
}
diff --git a/extension/readfile.c b/extension/readfile.c
index 37f39a2c..edab20f8 100644
--- a/extension/readfile.c
+++ b/extension/readfile.c
@@ -40,8 +40,7 @@
/* do_readfile --- read a file into memory */
NODE *
-do_readfile(tree)
-NODE *tree;
+do_readfile(int nargs)
{
NODE *filename;
int ret = -1;
@@ -52,27 +51,24 @@ NODE *tree;
if (do_lint && get_curfunc_arg_count() > 1)
lintwarn("readfile: called with too many arguments");
- filename = get_argument(tree, 0);
+ filename = get_scalar_argument(0, FALSE);
if (filename != NULL) {
(void) force_string(filename);
ret = stat(filename->stptr, & sbuf);
if (ret < 0) {
update_ERRNO();
- free_temp(filename);
goto done;
} else if ((sbuf.st_mode & S_IFMT) != S_IFREG) {
errno = EINVAL;
ret = -1;
update_ERRNO();
- free_temp(filename);
goto done;
}
if ((fd = open(filename->stptr, O_RDONLY|O_BINARY)) < 0) {
ret = -1;
update_ERRNO();
- free_temp(filename);
goto done;
}
@@ -83,24 +79,18 @@ NODE *tree;
(void) close(fd);
ret = -1;
update_ERRNO();
- free_temp(filename);
goto done;
}
close(fd);
- free_temp(filename);
- set_value(tmp_string(text, sbuf.st_size));
- return tmp_number((AWKNUM) 0);
+ return make_string(text, sbuf.st_size);
} else if (do_lint)
lintwarn("filename: called with no arguments");
done:
/* Set the return value */
- set_value(tmp_number((AWKNUM) ret));
-
- /* Just to make the interpreter happy */
- return tmp_number((AWKNUM) 0);
+ return make_number((AWKNUM) ret);
}
@@ -113,5 +103,5 @@ void *dl;
{
make_builtin("readfile", do_readfile, 1);
- return tmp_number((AWKNUM) 0);
+ return make_number((AWKNUM) 0);
}
diff --git a/extension/rwarray.c b/extension/rwarray.c
index 72a331c3..ace5c84e 100644
--- a/extension/rwarray.c
+++ b/extension/rwarray.c
@@ -37,11 +37,13 @@
#define MAJOR 1
#define MINOR 0
+static int write_array(int fd, NODE *array);
static int write_elem(int fd, int index, NODE *item);
static int write_chain(int fd, int index, NODE *item);
static int write_value(int fd, NODE *val);
-static NODE *read_elem(int fd, int *index, int *eof);
+static int read_array(int fd, NODE *array);
+static NODE *read_elem(int fd, int *index, NODE *array);
static NODE *read_value(int fd);
/*
@@ -59,7 +61,7 @@ static NODE *read_value(int fd);
* Hash of index val: 4 bytes - network order
* Length of index val: 4 bytes - network order
* Index val as characters (N bytes)
- * Value type 1 byte (0 = string, 1 = number)
+ * Value type 1 byte (0 = string, 1 = number, 2 = array)
* IF string:
* Length of value 4 bytes
* Value as characters (N bytes)
@@ -70,24 +72,20 @@ static NODE *read_value(int fd);
/* do_writea --- write an array */
static NODE *
-do_writea(tree)
-NODE *tree;
+do_writea(int nargs)
{
NODE *file, *array;
int ret;
int fd;
uint32_t major = MAJOR;
uint32_t minor = MINOR;
- uint32_t count;
- uint32_t array_sz;
- int i;
if (do_lint && get_curfunc_arg_count() > 2)
lintwarn("writea: called with too many arguments");
/* directory is first arg, array to dump is second */
- file = get_scalar_argument(tree, 0, FALSE);
- array = get_array_argument(tree, 1, TRUE);
+ file = get_scalar_argument(0, FALSE);
+ array = get_array_argument(1, FALSE);
/* open the file, if error, set ERRNO and return */
(void) force_string(file);
@@ -107,20 +105,9 @@ NODE *tree;
if (write(fd, & minor, sizeof(minor)) != sizeof(minor))
goto done1;
- count = htonl(array->table_size);
- if (write(fd, & count, sizeof(count)) != sizeof(count))
- goto done1;
-
- array_sz = htonl(array->array_size);
- if (write(fd, & array_sz, sizeof(array_sz)) != sizeof(array_sz))
+ ret = write_array(fd, array);
+ if (ret != 0)
goto done1;
-
- for (i = 0; i < array->array_size; i++) {
- ret = write_chain(fd, i, array->var_array[i]);
- if (ret != 0)
- goto done1;
- }
-
ret = 0;
goto done0;
@@ -130,16 +117,40 @@ done1:
unlink(file->stptr);
done0:
- free_temp(file);
close(fd);
/* Set the return value */
- set_value(tmp_number((AWKNUM) ret));
+ return make_number((AWKNUM) ret);
+}
+
+
+/* write_array --- write out an array or a sub-array */
+
+static int
+write_array(int fd, NODE *array)
+{
+ int ret;
+ uint32_t count;
+ uint32_t array_sz;
+ int i;
+
+ count = htonl(array->table_size);
+ if (write(fd, & count, sizeof(count)) != sizeof(count))
+ return -1;
+
+ array_sz = htonl(array->array_size);
+ if (write(fd, & array_sz, sizeof(array_sz)) != sizeof(array_sz))
+ return -1;
- /* Just to make the interpreter happy */
- return tmp_number((AWKNUM) 0);
+ for (i = 0; i < array->array_size; i++) {
+ ret = write_chain(fd, i, array->var_array[i]);
+ if (ret != 0)
+ return ret;
+ }
+ return 0;
}
+
/* write_chain --- write out a whole hash chain */
/*
@@ -188,13 +199,20 @@ write_elem(int fd, int index, NODE *item)
return write_value(fd, item->ahvalue);
}
-/* write_value --- write a number or a string */
+/* write_value --- write a number or a string or a array */
static int
write_value(int fd, NODE *val)
{
int code, len;
+ if (val->type == Node_var_array) {
+ code = htonl(2);
+ if (write(fd, & code, sizeof(code)) != sizeof(code))
+ return -1;
+ return write_array(fd, val);
+ }
+
if ((val->flags & NUMBER) != 0) {
code = htonl(1);
if (write(fd, & code, sizeof(code)) != sizeof(code))
@@ -221,27 +239,21 @@ write_value(int fd, NODE *val)
/* do_reada --- read an array */
static NODE *
-do_reada(tree)
-NODE *tree;
+do_reada(int nargs)
{
NODE *file, *array;
int ret;
int fd;
uint32_t major;
uint32_t minor;
- uint32_t count;
- uint32_t array_sz;
char magic_buf[30];
- int index;
- NODE *new_elem;
- int eof;
if (do_lint && get_curfunc_arg_count() > 2)
lintwarn("reada: called with too many arguments");
/* directory is first arg, array to dump is second */
- file = get_scalar_argument(tree, 0, FALSE);
- array = get_array_argument(tree, 1, TRUE);
+ file = get_scalar_argument(0, FALSE);
+ array = get_array_argument(1, FALSE);
(void) force_string(file);
fd = open(file->stptr, O_RDONLY);
@@ -277,13 +289,40 @@ NODE *tree;
assoc_clear(array);
+ ret = read_array(fd, array);
+ if (ret == 0)
+ goto done0;
+
+done1:
+ ret = -1;
+ update_ERRNO();
+
+done0:
+ close(fd);
+
+ /* Set the return value */
+ return make_number((AWKNUM) ret);
+}
+
+
+/* read_array --- read in an array or sub-array */
+
+static int
+read_array(int fd, NODE *array)
+{
+ int i;
+ uint32_t count;
+ uint32_t array_sz;
+ int index;
+ NODE *new_elem;
+
if (read(fd, & count, sizeof(count)) != sizeof(count)) {
- goto done1;
+ return -1;
}
array->table_size = ntohl(count);
if (read(fd, & array_sz, sizeof(array_sz)) != sizeof(array_sz)) {
- goto done1;
+ return -1;
}
array->array_size = ntohl(array_sz);
@@ -291,47 +330,32 @@ NODE *tree;
array->var_array = (NODE **) malloc(array->array_size * sizeof(NODE *));
memset(array->var_array, '\0', array->array_size * sizeof(NODE *));
- while ((new_elem = read_elem(fd, & index, & eof)) != NULL) {
- new_elem->ahnext = array->var_array[index];
- array->var_array[index] = new_elem;
- }
-
- if (eof) {
- ret = 0;
- goto done0;
+ for (i = 0; i < array->table_size; i++) {
+ if ((new_elem = read_elem(fd, & index, array)) != NULL) {
+ new_elem->ahnext = array->var_array[index];
+ array->var_array[index] = new_elem;
+ } else
+ break;
}
-
-done1:
- ret = -1;
- update_ERRNO();
-
-done0:
- free_temp(file);
- close(fd);
-
- /* Set the return value */
- set_value(tmp_number((AWKNUM) ret));
-
- /* Just to make the interpreter happy */
- return tmp_number((AWKNUM) 0);
+ if (i != array->table_size)
+ return -1;
+ return 0;
}
+
/* read_elem --- read in a single element */
static NODE *
-read_elem(int fd, int *the_index, int *eof)
+read_elem(int fd, int *the_index, NODE *array)
{
uint32_t hashval, indexval_len, index;
NODE *item;
+ NODE *val;
int ret;
*the_index = 0;
- *eof = FALSE;
if ((ret = read(fd, & index, sizeof(index))) != sizeof(index)) {
- if (ret == 0) {
- *eof = TRUE;
- }
return NULL;
}
*the_index = index = ntohl(index);
@@ -359,10 +383,20 @@ read_elem(int fd, int *the_index, int *eof)
item->ahname_str[item->ahname_len] = '\0';
item->ahname_ref = 1;
- item->ahvalue = read_value(fd);
- if (item->ahvalue == NULL) {
+ item->ahvalue = val = read_value(fd);
+ if (val == NULL) {
return NULL;
}
+ if (val->type == Node_var_array) {
+ char *aname;
+ size_t aname_len;
+
+ /* construct the sub-array name */
+ aname_len = strlen(array->vname) + item->ahname_len + 4;
+ emalloc(aname, char *, aname_len + 2, "read_elem");
+ sprintf(aname, "%s[\"%.*s\"]", array->vname, (int) item->ahname_len, item->ahname_str);
+ val->vname = aname;
+ }
return item;
}
@@ -384,14 +418,15 @@ read_value(int fd)
}
code = ntohl(code);
- /*
- * Very very early versions of this did not write out the code using htonl.
- * Thus this check for `!= 0' instead of '== 1'.
- */
- if (code != 0) {
+ if (code == 2) {
+ val->type = Node_var_array;
+ if (read_array(fd, val) != 0)
+ return NULL;
+ } else if (code == 1) {
if (read(fd, & val->numbr, sizeof(val->numbr)) != sizeof(val->numbr)) {
return NULL;
}
+
val->flags = NUMBER|NUMCUR|MALLOC;
} else {
if (read(fd, & len, sizeof(len)) != sizeof(len)) {
@@ -421,5 +456,5 @@ void *dl;
make_builtin("writea", do_writea, 2);
make_builtin("reada", do_reada, 2);
- return tmp_number((AWKNUM) 0);
+ return make_number((AWKNUM) 0);
}
diff --git a/extension/steps b/extension/steps
index 0ced6657..a6696ddc 100755
--- a/extension/steps
+++ b/extension/steps
@@ -5,14 +5,14 @@
# Mon Jun 21 17:03:37 IDT 2004
# Fri May 15 15:48:45 IDT 2009
-gcc -shared -Wall -DHAVE_CONFIG_H -c -O -g -I.. dl.c
-gcc -shared -Wall -DHAVE_CONFIG_H -c -O -g -I.. filefuncs.c
-gcc -shared -Wall -DHAVE_CONFIG_H -c -O -g -I.. fork.c
-gcc -shared -Wall -DHAVE_CONFIG_H -c -O -g -I.. ordchr.c
-gcc -shared -Wall -DHAVE_CONFIG_H -c -O -g -I.. arrayparm.c
-gcc -shared -Wall -DHAVE_CONFIG_H -c -O -g -I.. readfile.c
-gcc -shared -Wall -DHAVE_CONFIG_H -c -O -g -I.. testarg.c
-gcc -shared -Wall -DHAVE_CONFIG_H -c -O -g -I.. rwarray.c
+gcc -fPIC -shared -Wall -DHAVE_CONFIG_H -c -O -g -I.. dl.c
+gcc -fPIC -shared -Wall -DHAVE_CONFIG_H -c -O -g -I.. filefuncs.c
+gcc -fPIC -shared -Wall -DHAVE_CONFIG_H -c -O -g -I.. fork.c
+gcc -fPIC -shared -Wall -DHAVE_CONFIG_H -c -O -g -I.. ordchr.c
+gcc -fPIC -shared -Wall -DHAVE_CONFIG_H -c -O -g -I.. arrayparm.c
+gcc -fPIC -shared -Wall -DHAVE_CONFIG_H -c -O -g -I.. readfile.c
+gcc -fPIC -shared -Wall -DHAVE_CONFIG_H -c -O -g -I.. testarg.c
+gcc -fPIC -shared -Wall -DHAVE_CONFIG_H -c -O -g -I.. rwarray.c
ld -o dl.so -shared dl.o
ld -o filefuncs.so -shared filefuncs.o
ld -o fork.so -shared fork.o
diff --git a/extension/testarg.c b/extension/testarg.c
index 747dd515..42fd4dd6 100644
--- a/extension/testarg.c
+++ b/extension/testarg.c
@@ -1,31 +1,29 @@
#include "awk.h"
static NODE *
-do_check_arg(tree)
-NODE *tree;
+do_check_arg(int nargs)
{
int ret = 0, argc;
NODE *arg1, *arg2, *arg3;
argc = get_curfunc_arg_count();
- printf("arg count: defined = %d, supplied = %d\n", tree->param_cnt, argc);
+ printf("arg count: defined = %d, supplied = %d\n",
+ nargs, argc);
- arg1 = get_scalar_argument(tree, 0, FALSE);
- arg2 = get_array_argument(tree, 1, FALSE);
- arg3 = get_scalar_argument(tree, 2, TRUE); /* optional */
+ arg1 = get_scalar_argument(0, FALSE);
+ arg2 = get_array_argument(1, FALSE);
+ arg3 = get_scalar_argument(2, TRUE); /* optional */
if (argc > 3) { /* try to use an extra arg */
NODE *arg4;
- arg4 = get_array_argument(tree, 3, TRUE);
+ arg4 = get_array_argument(3, TRUE);
}
if (arg3 != NULL)
printf("3rd arg present\n\n");
else
printf("no 3rd arg\n\n");
- /* Set the return value */
- set_value(tmp_number((AWKNUM) ret));
- /* Just to make the interpreter happy */
- return tmp_number((AWKNUM) 0);
+ /* Set the return value */
+ return make_number((AWKNUM) ret);
}
/* dlload --- load new builtins in this library */
@@ -36,5 +34,5 @@ NODE *tree;
void *dl;
{
make_builtin("check_arg", do_check_arg, 3);
- return tmp_number((AWKNUM) 0);
+ return make_number((AWKNUM) 0);
}
diff --git a/field.c b/field.c
index 46c9c93d..a0074d8a 100644
--- a/field.c
+++ b/field.c
@@ -36,28 +36,28 @@ is_blank(int c)
return c == ' ' || c == '\t';
}
-typedef void (* Setfunc) P((long, char *, long, NODE *));
-
-static long (*parse_field) P((long, char **, int, NODE *,
- Regexp *, Setfunc, NODE *, NODE *, int));
-static void rebuild_record P((void));
-static long re_parse_field P((long, char **, int, NODE *,
- Regexp *, Setfunc, NODE *, NODE *, int));
-static long def_parse_field P((long, char **, int, NODE *,
- Regexp *, Setfunc, NODE *, NODE *, int));
-static long posix_def_parse_field P((long, char **, int, NODE *,
- Regexp *, Setfunc, NODE *, NODE *, int));
-static long null_parse_field P((long, char **, int, NODE *,
- Regexp *, Setfunc, NODE *, NODE *, int));
-static long sc_parse_field P((long, char **, int, NODE *,
- Regexp *, Setfunc, NODE *, NODE *, int));
-static long fw_parse_field P((long, char **, int, NODE *,
- Regexp *, Setfunc, NODE *, NODE *, int));
-static long fpat_parse_field P((long, char **, int, NODE *,
- Regexp *, Setfunc, NODE *, NODE *, int));
-static void set_element P((long num, char * str, long len, NODE *arr));
-static void grow_fields_arr P((long num));
-static void set_field P((long num, char *str, long len, NODE *dummy));
+typedef void (* Setfunc)(long, char *, long, NODE *);
+
+static long (*parse_field)(long, char **, int, NODE *,
+ Regexp *, Setfunc, NODE *, NODE *, int);
+static void rebuild_record(void);
+static long re_parse_field(long, char **, int, NODE *,
+ Regexp *, Setfunc, NODE *, NODE *, int);
+static long def_parse_field(long, char **, int, NODE *,
+ Regexp *, Setfunc, NODE *, NODE *, int);
+static long posix_def_parse_field(long, char **, int, NODE *,
+ Regexp *, Setfunc, NODE *, NODE *, int);
+static long null_parse_field(long, char **, int, NODE *,
+ Regexp *, Setfunc, NODE *, NODE *, int);
+static long sc_parse_field(long, char **, int, NODE *,
+ Regexp *, Setfunc, NODE *, NODE *, int);
+static long fw_parse_field(long, char **, int, NODE *,
+ Regexp *, Setfunc, NODE *, NODE *, int);
+static long fpat_parse_field(long, char **, int, NODE *,
+ Regexp *, Setfunc, NODE *, NODE *, int);
+static void set_element(long num, char * str, long len, NODE *arr);
+static void grow_fields_arr(long num);
+static void set_field(long num, char *str, long len, NODE *dummy);
static char *parse_extent; /* marks where to restart parse of record */
static long parse_high_water = 0; /* field number that we have parsed so far */
@@ -91,7 +91,7 @@ init_fields()
getnode(Null_field);
*Null_field = *Nnull_string;
Null_field->flags |= FIELD;
- Null_field->flags &= ~(NUMCUR|NUMBER|MAYBE_NUM|PERM);
+ Null_field->flags &= ~(NUMCUR|NUMBER|MAYBE_NUM|PERM|MALLOC);
field0_valid = TRUE;
}
@@ -100,8 +100,8 @@ init_fields()
static void
grow_fields_arr(long num)
{
- register int t;
- register NODE *n;
+ int t;
+ NODE *n;
erealloc(fields_arr, NODE **, (num + 1) * sizeof(NODE *), "grow_fields_arr");
for (t = nf_high_water + 1; t <= num; t++) {
@@ -121,7 +121,7 @@ set_field(long num,
long len,
NODE *dummy ATTRIBUTE_UNUSED) /* just to make interface same as set_element */
{
- register NODE *n;
+ NODE *n;
if (num > nf_high_water)
grow_fields_arr(num);
@@ -141,12 +141,12 @@ rebuild_record()
* use explicit unsigned longs for lengths, in case
* a size_t isn't big enough.
*/
- register unsigned long tlen;
- register unsigned long ofslen;
- register NODE *tmp;
+ unsigned long tlen;
+ unsigned long ofslen;
+ NODE *tmp;
NODE *ofs;
char *ops;
- register char *cops;
+ char *cops;
long i;
assert(NF != -1);
@@ -207,7 +207,7 @@ rebuild_record()
}
} else {
*n = *(fields_arr[i]);
- n->flags &= ~(MALLOC|TEMP|PERM|STRING);
+ n->flags &= ~(MALLOC|PERM|STRING);
}
n->stptr = cops;
@@ -271,7 +271,7 @@ set_record(const char *buf, int cnt)
getnode(n);
n->stptr = databuf;
n->stlen = cnt;
- n->stref = 1;
+ n->valref = 1;
n->type = Node_val;
n->stfmt = -1;
n->flags = (STRING|STRCUR|MAYBE_NUM|FIELD);
@@ -286,7 +286,7 @@ set_record(const char *buf, int cnt)
void
reset_record()
{
- register int i;
+ int i;
NODE *n;
(void) force_string(fields_arr[0]);
@@ -317,15 +317,16 @@ reset_record()
void
set_NF()
{
- register int i;
+ int i;
+ long nf;
NODE *n;
assert(NF != -1);
- NF = (long) force_number(NF_node->var_value);
-
- if (NF < 0)
+ nf = (long) force_number(NF_node->var_value);
+ if (nf < 0)
fatal(_("NF set to negative value"));
+ NF = nf;
if (NF > nf_high_water)
grow_fields_arr(NF);
@@ -366,10 +367,10 @@ re_parse_field(long up_to, /* parse only up to this field number */
NODE *sep_arr, /* array of field separators (maybe NULL) */
int in_middle)
{
- register char *scan = *buf;
- register long nf = parse_high_water;
- register char *field;
- register char *end = scan + len;
+ char *scan = *buf;
+ long nf = parse_high_water;
+ char *field;
+ char *end = scan + len;
int regex_flags = RE_NEED_START;
char *sep;
#ifdef MBS_SUPPORT
@@ -405,7 +406,7 @@ re_parse_field(long up_to, /* parse only up to this field number */
regex_flags |= RE_NO_BOL;
if (REEND(rp, scan) == RESTART(rp, scan)) { /* null match */
#ifdef MBS_SUPPORT
- if (gawk_mb_cur_max > 1) {
+ if (gawk_mb_cur_max > 1) {
mbclen = mbrlen(scan, end-scan, &mbs);
if ((mbclen == 1) || (mbclen == (size_t) -1)
|| (mbclen == (size_t) -2) || (mbclen == 0)) {
@@ -460,10 +461,10 @@ def_parse_field(long up_to, /* parse only up to this field number */
NODE *sep_arr, /* array of field separators (maybe NULL) */
int in_middle ATTRIBUTE_UNUSED)
{
- register char *scan = *buf;
- register long nf = parse_high_water;
- register char *field;
- register char *end = scan + len;
+ char *scan = *buf;
+ long nf = parse_high_water;
+ char *field;
+ char *end = scan + len;
char sav;
char *sep;
@@ -488,30 +489,29 @@ def_parse_field(long up_to, /* parse only up to this field number */
*end = ' '; /* sentinel character */
sep = scan;
-
for (; nf < up_to; scan++) {
/*
* special case: fs is single space, strip leading whitespace
*/
while (scan < end && (*scan == ' ' || *scan == '\t' || *scan == '\n'))
scan++;
-
+
if (sep_arr != NULL && scan > sep)
set_element(nf, sep, (long) (scan - sep), sep_arr);
-
+
if (scan >= end)
break;
-
+
field = scan;
-
+
while (*scan != ' ' && *scan != '\t' && *scan != '\n')
scan++;
-
+
(*set)(++nf, field, (long)(scan - field), n);
-
+
if (scan == end)
break;
-
+
sep = scan;
}
@@ -542,10 +542,10 @@ posix_def_parse_field(long up_to, /* parse only up to this field number */
NODE *dummy ATTRIBUTE_UNUSED, /* sep_arr not needed here: hence dummy */
int in_middle ATTRIBUTE_UNUSED)
{
- register char *scan = *buf;
- register long nf = parse_high_water;
- register char *field;
- register char *end = scan + len;
+ char *scan = *buf;
+ long nf = parse_high_water;
+ char *field;
+ char *end = scan + len;
char sav;
if (up_to == UNLIMITED)
@@ -608,9 +608,9 @@ null_parse_field(long up_to, /* parse only up to this field number */
NODE *sep_arr, /* array of field separators (maybe NULL) */
int in_middle ATTRIBUTE_UNUSED)
{
- register char *scan = *buf;
- register long nf = parse_high_water;
- register char *end = scan + len;
+ char *scan = *buf;
+ long nf = parse_high_water;
+ char *end = scan + len;
if (up_to == UNLIMITED)
nf = 0;
@@ -629,7 +629,7 @@ null_parse_field(long up_to, /* parse only up to this field number */
mbclen = 1;
}
if (sep_arr != NULL && nf > 0)
- set_element(nf, scan, 0L, sep_arr);
+ set_element(nf, scan, 0L, sep_arr);
(*set)(++nf, scan, mbclen, n);
scan += mbclen;
}
@@ -663,11 +663,11 @@ sc_parse_field(long up_to, /* parse only up to this field number */
NODE *sep_arr, /* array of field separators (maybe NULL) */
int in_middle ATTRIBUTE_UNUSED)
{
- register char *scan = *buf;
- register char fschar;
- register long nf = parse_high_water;
- register char *field;
- register char *end = scan + len;
+ char *scan = *buf;
+ char fschar;
+ long nf = parse_high_water;
+ char *field;
+ char *end = scan + len;
char sav;
#ifdef MBS_SUPPORT
size_t mbclen = 0;
@@ -744,9 +744,9 @@ fw_parse_field(long up_to, /* parse only up to this field number */
NODE *dummy ATTRIBUTE_UNUSED, /* sep_arr not needed here: hence dummy */
int in_middle ATTRIBUTE_UNUSED)
{
- register char *scan = *buf;
- register long nf = parse_high_water;
- register char *end = scan + len;
+ char *scan = *buf;
+ long nf = parse_high_water;
+ char *end = scan + len;
#ifdef MBS_SUPPORT
int nmbc;
size_t mbclen;
@@ -803,12 +803,20 @@ fw_parse_field(long up_to, /* parse only up to this field number */
return nf;
}
+/* invalidate_field0 --- $0 needs reconstruction */
+
+void
+invalidate_field0()
+{
+ field0_valid = FALSE;
+}
+
/* get_field --- return a particular $n */
/* assign is not NULL if this field is on the LHS of an assign */
NODE **
-get_field(register long requested, Func_ptr *assign)
+get_field(long requested, Func_ptr *assign)
{
int in_middle = FALSE;
/*
@@ -819,7 +827,7 @@ get_field(register long requested, Func_ptr *assign)
if (! field0_valid) {
/* first, parse remainder of input record */
if (NF == -1) {
- NF = (*parse_field)(UNLIMITED-1, &parse_extent,
+ NF = (*parse_field)(UNLIMITED - 1, &parse_extent,
fields_arr[0]->stlen -
(parse_extent - fields_arr[0]->stptr),
save_FS, FS_regexp, set_field,
@@ -837,8 +845,20 @@ get_field(register long requested, Func_ptr *assign)
/* assert(requested > 0); */
+#if 0
if (assign != NULL)
field0_valid = FALSE; /* $0 needs reconstruction */
+#else
+ /* keep things uniform. Also, mere intention of assigning something
+ * to $n should not make $0 invalid. Makes sense to invalidate $0
+ * after the actual assignment is performed. Not a real issue in
+ * the interpreter otherwise, but causes problem in the
+ * debugger when watching or printing fields.
+ */
+
+ if (assign != NULL)
+ *assign = invalidate_field0; /* $0 needs reconstruction */
+#endif
if (requested <= parse_high_water) /* already parsed this field */
return &fields_arr[requested];
@@ -866,7 +886,7 @@ get_field(register long requested, Func_ptr *assign)
*/
if (parse_extent == fields_arr[0]->stptr + fields_arr[0]->stlen)
NF = parse_high_water;
- if (requested == UNLIMITED-1) /* UNLIMITED-1 means set NF */
+ if (requested == UNLIMITED - 1) /* UNLIMITED-1 means set NF */
requested = parse_high_water;
}
if (parse_high_water < requested) { /* requested beyond end of record */
@@ -888,83 +908,75 @@ get_field(register long requested, Func_ptr *assign)
static void
set_element(long num, char *s, long len, NODE *n)
{
- register NODE *it;
+ NODE *it;
+ NODE **lhs;
+ NODE *sub;
it = make_string(s, len);
it->flags |= MAYBE_NUM;
- *assoc_lookup(n, tmp_number((AWKNUM) (num)), FALSE) = it;
+ sub = make_number((AWKNUM) (num));
+ lhs = assoc_lookup(n, sub, FALSE);
+ unref(sub);
+ unref(*lhs);
+ *lhs = it;
}
/* do_split --- implement split(), semantics are same as for field splitting */
NODE *
-do_split(NODE *tree)
+do_split(int nargs)
{
- NODE *src, *arr, *sep, *fs, *sep_arr, *src2, *fs2, *tmp;
+ NODE *src, *arr, *sep, *fs, *tmp, *sep_arr = NULL;
char *s;
- long (*parseit) P((long, char **, int, NODE *,
- Regexp *, Setfunc, NODE *, NODE *, int));
+ long (*parseit)(long, char **, int, NODE *,
+ Regexp *, Setfunc, NODE *, NODE *, int);
Regexp *rp = NULL;
- src = force_string(tree_eval(tree->lnode));
-
- arr = get_param(tree->rnode->lnode);
- if (arr->type != Node_var_array)
- fatal(_("split: second argument is not an array"));
-
- sep = tree->rnode->rnode->lnode;
-
- sep_arr = tree->rnode->rnode->rnode;
- if (sep_arr != NULL) {
+ if (nargs == 4) {
static short warned1 = FALSE, warned2 = FALSE;
if (do_traditional || do_posix) {
fatal(_("split: fourth argument is a gawk extension"));
}
-
- sep_arr = get_param(tree->rnode->rnode->rnode->lnode);
-
+ sep_arr = POP_PARAM();
if (sep_arr->type != Node_var_array)
fatal(_("split: fourth argument is not an array"));
-
if (do_lint && ! warned1) {
warned1 = TRUE;
lintwarn(_("split: fourth argument is a gawk extension"));
}
-
if (do_lint_old && ! warned2) {
- warned2 = TRUE;
+ warned2 = TRUE;
warning(_("split: fourth argument is a gawk extension"));
- }
+ }
}
+ sep = POP();
+ arr = POP_PARAM();
+ if (arr->type != Node_var_array)
+ fatal(_("split: second argument is not an array"));
+
+ assoc_clear(arr);
+ if (sep_arr != NULL)
+ assoc_clear(sep_arr);
+
+ src = TOP_STRING();
if (src->stlen == 0) {
/*
* Skip the work if first arg is the null string.
*/
- free_temp(src);
- /*
- * Evaluate sep if it may have side effects.
- */
- if ((sep->re_flags & (FS_DFLT|CONSTANT)) == 0)
- free_temp(tree_eval(sep->re_exp));
- /*
- * And now we can safely turn off the arrays.
- */
- assoc_clear(arr);
-
- if (sep_arr != NULL)
- assoc_clear(sep_arr);
-
- return tmp_number((AWKNUM) 0);
+ decr_sp();
+ DEREF(src);
+ return make_number((AWKNUM) 0);
}
if ((sep->re_flags & FS_DFLT) != 0 && current_field_sep() != Using_FIELDWIDTHS && ! RS_is_null) {
parseit = parse_field;
- fs = force_string(FS_node->var_value);
+ fs = dupnode(force_string(FS_node->var_value));
rp = FS_regexp;
} else {
- fs = force_string(tree_eval(sep->re_exp));
+ fs = dupnode(sep->re_exp);
+
if (fs->stlen == 0) {
static short warned = FALSE;
@@ -972,7 +984,7 @@ do_split(NODE *tree)
if (do_lint && ! warned) {
warned = TRUE;
- lintwarn(_("split: null string for third argument is a gawk extension"));
+ lintwarn(_("split: null string for third arg is a gawk extension"));
}
} else if (fs->stlen == 1 && (sep->re_flags & CONSTANT) == 0) {
if (fs->stptr[0] == ' ') {
@@ -988,28 +1000,13 @@ do_split(NODE *tree)
}
}
- /*
- * do dupnode(), to avoid problems like
- * x = split(a["LINE"], a, a["FS"])
- * since we assoc_clear the array. gack.
- * this also gives us complete call by value semantics.
- */
- src2 = dupnode(src);
- free_temp(src);
-
- fs2 = dupnode(fs);
- free_temp(fs);
-
- assoc_clear(arr);
-
- if (sep_arr != NULL)
- assoc_clear(sep_arr);
+ s = src->stptr;
+ tmp = make_number((AWKNUM) (*parseit)(UNLIMITED, &s, (int) src->stlen,
+ fs, rp, set_element, arr, sep_arr, FALSE));
- s = src2->stptr;
- tmp = tmp_number((AWKNUM) (*parseit)(UNLIMITED, &s, (int) src2->stlen,
- fs2, rp, set_element, arr, sep_arr, FALSE));
- unref(src2);
- unref(fs2);
+ decr_sp();
+ DEREF(src);
+ unref(fs);
return tmp;
}
@@ -1019,78 +1016,53 @@ do_split(NODE *tree)
*/
NODE *
-do_patsplit(NODE *tree)
+do_patsplit(int nargs)
{
- NODE *src, *arr, *sep, *fpat, *sep_arr, *src2, *fpat2, *tmp;
+ NODE *src, *arr, *sep, *fpat, *tmp, *sep_arr = NULL;
char *s;
Regexp *rp = NULL;
- src = force_string(tree_eval(tree->lnode));
-
- arr = get_param(tree->rnode->lnode);
- if (arr->type != Node_var_array)
- fatal(_("patsplit: second argument is not an array"));
-
- sep = tree->rnode->rnode->lnode;
-
- sep_arr = tree->rnode->rnode->rnode;
- if (sep_arr != NULL) {
- sep_arr = get_param(tree->rnode->rnode->rnode->lnode);
-
+ if (nargs == 4) {
+ sep_arr = POP_PARAM();
if (sep_arr->type != Node_var_array)
fatal(_("patsplit: fourth argument is not an array"));
}
+ sep = POP();
+ arr = POP_PARAM();
+ if (arr->type != Node_var_array)
+ fatal(_("patsplit: second argument is not an array"));
+ src = TOP_STRING();
if (src->stlen == 0) {
/*
* Skip the work if first arg is the null string.
*/
- free_temp(src);
- /*
- * Evaluate sep if it may have side effects.
- */
- if ((sep->re_flags & CONSTANT) == 0)
- free_temp(tree_eval(sep->re_exp));
- /*
- * And now we can safely turn off the arrays.
- */
assoc_clear(arr);
-
if (sep_arr != NULL)
assoc_clear(sep_arr);
-
- return tmp_number((AWKNUM) 0);
+ decr_sp();
+ DEREF(src);
+ return make_number((AWKNUM) 0);
}
- fpat = force_string(tree_eval(sep->re_exp));
+ fpat = dupnode(sep->re_exp);
if (fpat->stlen == 0) {
+ unref(fpat);
fatal(_("patsplit: third argument must be non-null"));
}
- rp = re_update(sep);
-
- /*
- * do dupnode(), to avoid problems like
- * x = split(a["LINE"], a, a["FS"])
- * since we assoc_clear the array. gack.
- * this also gives us complete call by value semantics.
- */
- src2 = dupnode(src);
- free_temp(src);
-
- fpat2 = dupnode(fpat);
- free_temp(fpat);
-
assoc_clear(arr);
-
if (sep_arr != NULL)
assoc_clear(sep_arr);
- s = src2->stptr;
- tmp = tmp_number((AWKNUM) fpat_parse_field(UNLIMITED, &s,
- (int) src2->stlen, fpat2, rp,
+ rp = re_update(sep);
+
+ s = src->stptr;
+ tmp = make_number((AWKNUM) fpat_parse_field(UNLIMITED, &s,
+ (int) src->stlen, fpat, rp,
set_element, arr, sep_arr, FALSE));
- unref(src2);
- unref(fpat2);
+ decr_sp();
+ DEREF(src);
+ unref(fpat);
return tmp;
}
@@ -1099,12 +1071,13 @@ do_patsplit(NODE *tree)
void
set_FIELDWIDTHS()
{
- register char *scan;
+ char *scan;
char *end;
- register int i;
+ int i;
static int fw_alloc = 4;
static short warned = FALSE;
- extern unsigned long strtoul P((const char *, char **endptr, int base));
+ extern unsigned long strtoul(const char *, char **endptr, int base);
+ int fatal_error = FALSE;
if (do_lint && ! warned) {
warned = TRUE;
@@ -1137,10 +1110,10 @@ set_FIELDWIDTHS()
while (is_blank(*scan)) {
++scan;
}
- if (*scan == '-')
- fatal(_("invalid FIELDWIDTHS value, near `%s'"),
- scan);
-
+ if (*scan == '-') {
+ fatal_error = TRUE;
+ break;
+ }
if (*scan == '\0')
break;
@@ -1150,10 +1123,12 @@ set_FIELDWIDTHS()
errno = 0;
tmp = strtoul(scan, &end, 10);
if (errno != 0
- || (*end != '\0' && ! is_blank(*end))
- || !(0 < tmp && tmp <= INT_MAX))
- fatal(_("invalid FIELDWIDTHS value, near `%s'"),
- scan);
+ || (*end != '\0' && ! is_blank(*end))
+ || !(0 < tmp && tmp <= INT_MAX)
+ ) {
+ fatal_error = TRUE;
+ break;
+ }
FIELDWIDTHS[i] = tmp;
scan = end;
/* Skip past any trailing blanks. */
@@ -1168,6 +1143,9 @@ set_FIELDWIDTHS()
FIELDWIDTHS[i+1] = -1;
update_PROCINFO_str("FS", "FIELDWIDTHS");
+ if (fatal_error)
+ fatal(_("invalid FIELDWIDTHS value, near `%s'"),
+ scan);
}
/* set_FS --- handle things when FS is assigned to */
@@ -1182,7 +1160,7 @@ set_FS()
int remake_re = TRUE;
/*
- * If changing the way fields are split, obey least-suprise
+ * If changing the way fields are split, obey least-surprise
* semantics, and force $0 to be split totally.
*/
if (fields_arr != NULL)
@@ -1216,11 +1194,15 @@ set_FS()
unref(save_rs);
save_rs = dupnode(RS_node->var_value);
resave_fs = TRUE;
- if (FS_regexp != NULL) {
- refree(FS_re_yes_case);
- refree(FS_re_no_case);
- FS_re_yes_case = FS_re_no_case = FS_regexp = NULL;
- }
+
+ /* If FS_re_no_case assignment is fatal (make_regexp in remake_re)
+ * FS_regexp will be NULL with a non-null FS_re_yes_case.
+ * refree() handles null argument; no need for `if (FS_regexp != NULL)' below.
+ * Please do not remerge.
+ */
+ refree(FS_re_yes_case);
+ refree(FS_re_no_case);
+ FS_re_yes_case = FS_re_no_case = FS_regexp = NULL;
choose_fs_function:
@@ -1271,20 +1253,18 @@ choose_fs_function:
}
}
if (remake_re) {
- if (FS_regexp != NULL) {
- refree(FS_re_yes_case);
- refree(FS_re_no_case);
- FS_re_yes_case = FS_re_no_case = FS_regexp = NULL;
- }
+ refree(FS_re_yes_case);
+ refree(FS_re_no_case);
+ FS_re_yes_case = FS_re_no_case = FS_regexp = NULL;
if (buf[0] != '\0') {
- FS_re_yes_case = make_regexp(buf, strlen(buf), FALSE, TRUE);
- FS_re_no_case = make_regexp(buf, strlen(buf), TRUE, TRUE);
+ FS_re_yes_case = make_regexp(buf, strlen(buf), FALSE, TRUE, TRUE);
+ FS_re_no_case = make_regexp(buf, strlen(buf), TRUE, TRUE, TRUE);
FS_regexp = (IGNORECASE ? FS_re_no_case : FS_re_yes_case);
parse_field = re_parse_field;
} else if (parse_field == re_parse_field) {
- FS_re_yes_case = make_regexp(fs->stptr, fs->stlen, FALSE, TRUE);
- FS_re_no_case = make_regexp(fs->stptr, fs->stlen, TRUE, TRUE);
+ FS_re_yes_case = make_regexp(fs->stptr, fs->stlen, FALSE, TRUE, TRUE);
+ FS_re_no_case = make_regexp(fs->stptr, fs->stlen, TRUE, TRUE, TRUE);
FS_regexp = (IGNORECASE ? FS_re_no_case : FS_re_yes_case);
} else
FS_re_yes_case = FS_re_no_case = FS_regexp = NULL;
@@ -1320,12 +1300,15 @@ void
update_PROCINFO_str(char *subscript, char *str)
{
NODE **aptr;
+ NODE *tmp;
if (PROCINFO_node == NULL)
return;
-
- aptr = assoc_lookup(PROCINFO_node, tmp_string(subscript, strlen(subscript)), FALSE);
- assign_val(aptr, tmp_string(str, strlen(str)));
+ tmp = make_string(subscript, strlen(subscript));
+ aptr = assoc_lookup(PROCINFO_node, tmp, FALSE);
+ unref(tmp);
+ unref(*aptr);
+ *aptr = make_string(str, strlen(str));
}
/* update_PROCINFO_num --- update PROCINFO[sub] with numeric value */
@@ -1334,11 +1317,14 @@ void
update_PROCINFO_num(char *subscript, AWKNUM val)
{
NODE **aptr;
+ NODE *tmp;
if (PROCINFO_node == NULL)
return;
-
- aptr = assoc_lookup(PROCINFO_node, tmp_string(subscript, strlen(subscript)), FALSE);
+ tmp = make_string(subscript, strlen(subscript));
+ aptr = assoc_lookup(PROCINFO_node, tmp, FALSE);
+ unref(tmp);
+ unref(*aptr);
*aptr = make_number(val);
}
@@ -1388,25 +1374,21 @@ set_FPAT()
unref(save_fpat);
save_fpat = dupnode(FPAT_node->var_value);
- if (FPAT_regexp != NULL) {
- refree(FPAT_re_yes_case);
- refree(FPAT_re_no_case);
- FPAT_re_yes_case = FPAT_re_no_case = FPAT_regexp = NULL;
- }
+ refree(FPAT_re_yes_case);
+ refree(FPAT_re_no_case);
+ FPAT_re_yes_case = FPAT_re_no_case = FPAT_regexp = NULL;
set_fpat_function:
fpat = force_string(FPAT_node->var_value);
parse_field = fpat_parse_field;
if (remake_re) {
- if (FPAT_regexp != NULL) {
- refree(FPAT_re_yes_case);
- refree(FPAT_re_no_case);
- FPAT_re_yes_case = FPAT_re_no_case = FPAT_regexp = NULL;
- }
+ refree(FPAT_re_yes_case);
+ refree(FPAT_re_no_case);
+ FPAT_re_yes_case = FPAT_re_no_case = FPAT_regexp = NULL;
- FPAT_re_yes_case = make_regexp(fpat->stptr, fpat->stlen, FALSE, TRUE);
- FPAT_re_no_case = make_regexp(fpat->stptr, fpat->stlen, TRUE, TRUE);
+ FPAT_re_yes_case = make_regexp(fpat->stptr, fpat->stlen, FALSE, TRUE, TRUE);
+ FPAT_re_no_case = make_regexp(fpat->stptr, fpat->stlen, TRUE, TRUE, TRUE);
FPAT_regexp = (IGNORECASE ? FPAT_re_no_case : FPAT_re_yes_case);
}
diff --git a/floatcomp.c b/floatcomp.c
index 46b3a189..ff6a4708 100644
--- a/floatcomp.c
+++ b/floatcomp.c
@@ -3,7 +3,7 @@
*/
/*
- * Copyright (C) 1986, 1988, 1989, 1991-2010 the Free Software Foundation, Inc.
+ * Copyright (C) 1986, 1988, 1989, 1991-2009 the Free Software Foundation, Inc.
*
* This file is part of GAWK, the GNU implementation of the
* AWK Programming Language.
diff --git a/gawkmisc.c b/gawkmisc.c
index ed765e25..583e80a2 100644
--- a/gawkmisc.c
+++ b/gawkmisc.c
@@ -35,41 +35,27 @@
#ifdef __EMX__
#include "pc/gawkmisc.pc"
#else /* not __EMX__ */
-#if defined(MSDOS) || defined(OS2) || defined(WIN32)
+#if defined(OS2)
#include "gawkmisc.pc"
-#else /* not MSDOS, not OS2, not WIN32 */
+#else /* not OS2 */
#if defined(VMS)
#include "vms/gawkmisc.vms"
#else /* not VMS */
-#if defined(atarist)
-#include "unsupported/atari/gawkmisc.atr"
-#else /* not atarist */
-#if defined(TANDEM)
-#include "tmiscc"
-#else /* not TANDEM */
#include "posix/gawkmisc.c"
-#endif /* not TANDEM */
-#endif /* not atarist */
#endif /* not VMS */
-#endif /* not MSDOS, not OS2, not WIN32 */
+#endif /* not OS2 */
#endif /* not __EMX__ */
/* xmalloc --- provide this so that other GNU library routines work */
-#if __STDC__
typedef void *pointer;
-#else
-typedef char *pointer;
-#endif
-extern pointer xmalloc P((size_t bytes)); /* get rid of gcc warning */
+extern pointer xmalloc(size_t bytes); /* get rid of gcc warning */
pointer
xmalloc(size_t bytes)
{
pointer p;
-
emalloc(p, pointer, bytes, "xmalloc");
-
return p;
}
diff --git a/io.c b/io.c
index 852652ca..441e3808 100644
--- a/io.c
+++ b/io.c
@@ -23,6 +23,11 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
+/* For OSF/1 to get struct sockaddr_storage */
+#if defined(__osf__) && !defined(_OSF_SOURCE)
+#define _OSF_SOURCE
+#endif
+
#include "awk.h"
#ifdef HAVE_SYS_PARAM_H
@@ -111,32 +116,19 @@ extern int MRL;
#endif /* HAVE_SOCKETS */
-#ifdef atarist
-#include <stddef.h>
-#endif
-
#if defined(GAWK_AIX)
#undef TANDEM /* AIX defines this in one of its header files */
-#undef MSDOS /* For good measure, */
-#undef WIN32 /* yes, I'm paranoid */
-#endif
-
-#if defined(MSDOS) || defined(WIN32) || defined(TANDEM)
-#define PIPES_SIMULATED
#endif
typedef enum { CLOSE_ALL, CLOSE_TO, CLOSE_FROM } two_way_close_type;
-/* For internal files, /dev/pid, etc. */
-#define INTERNAL_HANDLE (-42)
-
/* Several macros make the code a bit clearer: */
/* */
/* */
/* <defines and enums>= */
-#define at_eof(iop) ((iop->flag & IOP_AT_EOF) != 0)
-#define has_no_data(iop) (iop->dataend == NULL)
-#define no_data_left(iop) (iop->off >= iop->dataend)
+#define at_eof(iop) (((iop)->flag & IOP_AT_EOF) != 0)
+#define has_no_data(iop) ((iop)->dataend == NULL)
+#define no_data_left(iop) ((iop)->off >= (iop)->dataend)
/* The key point to the design is to split out the code that searches through */
/* a buffer looking for the record and the terminator into separate routines, */
/* with a higher-level routine doing the reading of data and buffer management. */
@@ -175,31 +167,31 @@ struct recmatch {
size_t rt_len; /* length of terminator */
};
-static IOBUF *nextfile P((int skipping));
-static int inrec P((IOBUF *iop));
-static int iop_close P((IOBUF *iop));
-struct redirect *redirect P((NODE *tree, int *errflg));
-static void close_one P((void));
-static int close_redir P((struct redirect *rp, int exitwarn, two_way_close_type how));
+
+static int iop_close(IOBUF *iop);
+struct redirect *redirect(NODE *redir_exp, int redirtype, int *errflg);
+static void close_one(void);
+static int close_redir(struct redirect *rp, int exitwarn, two_way_close_type how);
#ifndef PIPES_SIMULATED
-static int wait_any P((int interesting));
+static int wait_any(int interesting);
#endif
-static IOBUF *gawk_popen P((const char *cmd, struct redirect *rp));
-static IOBUF *iop_alloc P((int fd, const char *name, IOBUF *buf, int do_openhooks));
-static int gawk_pclose P((struct redirect *rp));
-static int do_pathopen P((const char *file));
-static int str2mode P((const char *mode));
-static int two_way_open P((const char *str, struct redirect *rp));
-static int pty_vs_pipe P((const char *command));
-static void find_open_hook P((IOBUF *iop));
-
-static RECVALUE rs1scan P((IOBUF *iop, struct recmatch *recm, SCANSTATE *state));
-static RECVALUE rsnullscan P((IOBUF *iop, struct recmatch *recm, SCANSTATE *state));
-static RECVALUE rsrescan P((IOBUF *iop, struct recmatch *recm, SCANSTATE *state));
-static RECVALUE (*matchrec) P((IOBUF *iop, struct recmatch *recm, SCANSTATE *state)) = rs1scan;
-static int get_a_record P((char **out, IOBUF *iop, int *errcode));
-static void free_rp P((struct redirect *rp));
-static int inetfile P((const char *str, int *length, int *family));
+static IOBUF *gawk_popen(const char *cmd, struct redirect *rp);
+static IOBUF *iop_alloc(int fd, const char *name, IOBUF *buf, int do_openhooks);
+static int gawk_pclose(struct redirect *rp);
+static int str2mode(const char *mode);
+static int two_way_open(const char *str, struct redirect *rp);
+static int pty_vs_pipe(const char *command);
+static void find_open_hook(IOBUF *iop);
+
+static RECVALUE rs1scan(IOBUF *iop, struct recmatch *recm, SCANSTATE *state);
+static RECVALUE rsnullscan(IOBUF *iop, struct recmatch *recm, SCANSTATE *state);
+static RECVALUE rsrescan(IOBUF *iop, struct recmatch *recm, SCANSTATE *state);
+
+static RECVALUE (*matchrec)(IOBUF *iop, struct recmatch *recm, SCANSTATE *state) = rs1scan;
+
+static int get_a_record(char **out, IOBUF *iop, int *errcode);
+
+static void free_rp(struct redirect *rp);
#if defined(HAVE_POPEN_H)
#include "popen.h"
@@ -212,8 +204,7 @@ static Regexp *RS_re_no_case;
static Regexp *RS_regexp;
int RS_is_null;
-int in_beginfile_rule = FALSE; /* we're in a BEGINFILE rule */
-int in_endfile_rule = FALSE; /* we're in an ENDFILE rule */
+int has_endfile = FALSE;
extern int output_is_tty;
extern NODE *ARGC_node;
@@ -222,15 +213,7 @@ extern NODE *ARGIND_node;
extern NODE *ERRNO_node;
extern NODE **fields_arr;
-static jmp_buf filebuf; /* for do_nextfile() */
-
-/* A block of AWK code to be run before each input file */
-NODE *beginfile_block = NULL;
-
-/* A block of AWK code to be run after each input file */
-NODE *endfile_block = NULL;
-
-#if defined(MSDOS) || defined(OS2) || defined(WIN32) || defined(__EMX__) || defined(__CYGWIN__)
+#if defined(OS2) || defined(__EMX__) || defined(__CYGWIN__)
/* binmode --- convert BINMODE to string for fopen */
static const char *
@@ -256,85 +239,86 @@ binmode(const char *mode)
#ifdef VMS
/* File pointers have an extra level of indirection, and there are cases where
`stdin' can be null. That can crash gawk if fileno() is used as-is. */
-static int vmsrtl_fileno P((FILE *));
+static int vmsrtl_fileno(FILE *);
static int vmsrtl_fileno(fp) FILE *fp; { return fileno(fp); }
#undef fileno
#define fileno(FP) (((FP) && *(FP)) ? vmsrtl_fileno(FP) : -1)
#endif /* VMS */
-/* run_beginfile_rule --- run the BEGINFILE rule */
-
-static void
-run_beginfile_rule()
+void
+after_beginfile(IOBUF **curfile)
{
- if (beginfile_block != NULL) {
- in_beginfile_rule = TRUE;
- (void) interpret(beginfile_block);
- }
- in_beginfile_rule = FALSE;
-}
+ IOBUF *iop;
+
+ iop = *curfile;
+ assert(iop != NULL);
+#if 0
+ if (iop == NULL)
+ return;
+#endif
-/* run_endfile_rule --- run the ENDFILE rule */
+ if (iop->fd == INVALID_HANDLE) {
+ const char *fname;
+ int errcode;
-static void
-run_endfile_rule()
-{
- if (endfile_block != NULL) {
- in_endfile_rule = TRUE;
- (void) interpret(endfile_block);
+ fname = iop->name;
+ errcode = iop->errcode;
+ iop->errcode = 0;
+ errno = 0;
+ update_ERRNO();
+ iop_close(iop);
+ *curfile = NULL;
+ if (errcode == EISDIR && ! do_traditional) {
+ warning(_("command line argument `%s' is a directory: skipped"), fname);
+ return; /* read next file */
+ }
+ fatal(_("cannot open file `%s' for reading (%s)"),
+ fname, strerror(errcode));
}
- in_endfile_rule = FALSE;
-}
-/* do_nextfile --- implement gawk "nextfile" extension */
+ /*
+ * Open hooks could have been changed by BEGINFILE,
+ * so delay check until now.
+ */
-void
-do_nextfile()
-{
- (void) nextfile(TRUE);
- if (! in_beginfile_rule)
- longjmp(filebuf, 1);
+ find_open_hook(iop);
}
/* nextfile --- move to the next input data file */
-static IOBUF *
-nextfile(int skipping)
+int
+nextfile(IOBUF **curfile, int skipping)
{
static long i = 1;
static int files = FALSE;
- NODE *arg;
- static IOBUF *curfile = NULL;
+ NODE *arg, *tmp;
static IOBUF mybuf;
const char *fname;
int fd = INVALID_HANDLE;
- static int called_recursively = FALSE;
int errcode;
+ IOBUF *iop = *curfile;
- if (in_beginfile_rule) {
- called_recursively = TRUE;
- return NULL;
+ if (skipping) { /* for 'nextfile' call */
+ if (iop != NULL)
+ (void) iop_close(iop);
+ *curfile = NULL;
+ return 0; /* return value not used */
}
- if (skipping) {
- if (curfile != NULL)
- iop_close(curfile);
- curfile = NULL;
-
- run_endfile_rule();
- return NULL;
+ if (iop != NULL) {
+ if (at_eof(iop)) {
+ assert(iop->fd != INVALID_HANDLE);
+ (void) iop_close(iop);
+ *curfile = NULL;
+ return 1; /* run endfile block */
+ } else
+ return 0;
}
- if (curfile != NULL) {
- if (at_eof(curfile)) {
- (void) iop_close(curfile);
- curfile = NULL;
- run_endfile_rule();
- } else
- return curfile;
- }
for (; i < (long) (ARGC_node->lnode->numbr); i++) {
- arg = *assoc_lookup(ARGV_node, tmp_number((AWKNUM) i), FALSE);
+ tmp = make_number((AWKNUM) i);
+ arg = *assoc_lookup(ARGV_node, tmp, FALSE);
+ unref(tmp);
if (arg->stlen == 0)
continue;
arg->stptr[arg->stlen] = '\0';
@@ -342,16 +326,13 @@ nextfile(int skipping)
unref(ARGIND_node->var_value);
ARGIND_node->var_value = make_number((AWKNUM) i);
}
- if (! arg_assign(arg->stptr, FALSE)) {
- int isdir = FALSE;
+ if (! arg_assign(arg->stptr, FALSE)) {
files = TRUE;
fname = arg->stptr;
errno = 0;
- fd = devopen(fname, binmode("r"), & isdir);
+ fd = devopen(fname, binmode("r"));
errcode = errno;
- if (isdir && errno == 0)
- errcode = errno = EISDIR;
if (! do_traditional)
update_ERRNO();
@@ -359,61 +340,42 @@ nextfile(int skipping)
unref(FILENAME_node->var_value);
FILENAME_node->var_value = dupnode(arg);
FNR = 0;
- /* Another kludge, so BEGINFILE can see FNR */
- FNR_node->var_value->numbr = 0;
-
- run_beginfile_rule();
- if (called_recursively) {
- called_recursively = FALSE;
- if (curfile == NULL)
- continue;
- }
-
- if (fd == INVALID_HANDLE) {
- if (isdir) {
- if (do_traditional)
- goto give_up;
-
- errno = 0;
- update_ERRNO();
- warning(_("command line argument `%s' is a directory: skipped"), fname);
- continue;
- }
- errno = errcode;
- goto give_up;
- }
-
- /*
- * Open hooks could have been changed by BEGINFILE,
- * so delay check until now.
- */
- find_open_hook(curfile);
-
- curfile = iop_alloc(fd, fname, &mybuf, FALSE);
- curfile->flag |= IOP_NOFREE_OBJ;
- i++;
- break;
+ iop = *curfile = iop_alloc(fd, fname, &mybuf, FALSE);
+ if (fd == INVALID_HANDLE)
+ iop->errcode = errcode;
+ else
+ iop->errcode = 0;
+ iop->flag |= IOP_NOFREE_OBJ;
+ return ++i; /* run beginfile block */
}
}
+
if (files == FALSE) {
files = TRUE;
/* no args. -- use stdin */
/* FNR is init'ed to 0 */
+ errno = 0;
+ if (! do_traditional)
+ update_ERRNO();
unref(FILENAME_node->var_value);
FILENAME_node->var_value = make_string("-", 1);
+ FILENAME_node->var_value->flags |= MAYBE_NUM; /* be pedantic */
fname = "-";
- curfile = iop_alloc(fileno(stdin), fname, &mybuf, TRUE);
- if (curfile == NULL)
- goto give_up;
- curfile->flag |= IOP_NOFREE_OBJ;
- }
- return curfile;
-
-give_up:
- fatal(_("cannot open file `%s' for reading (%s)"),
- fname, strerror(errno));
- /* NOTREACHED */
- return (IOBUF *) NULL;
+ iop = *curfile = iop_alloc(fileno(stdin), fname, &mybuf, FALSE);
+ iop->flag |= IOP_NOFREE_OBJ;
+ if (iop->fd == INVALID_HANDLE) {
+ errcode = errno;
+ errno = 0;
+ update_ERRNO();
+ (void) iop_close(iop);
+ *curfile = NULL;
+ fatal(_("cannot open file `%s' for reading (%s)"),
+ fname, strerror(errcode));
+ }
+ return ++i; /* run beginfile block */
+ }
+
+ return -1; /* end of input, run end block or Op_atexit */
}
/* set_FNR --- update internal FNR from awk variable */
@@ -434,32 +396,28 @@ set_NR()
/* inrec --- This reads in a record from the input file */
-static int
+int
inrec(IOBUF *iop)
{
char *begin;
- register int cnt;
+ int cnt;
int retval = 0;
int errcode = 0;
- extern NODE *endfile_block;
-
- if (at_eof(iop) && no_data_left(iop))
+ if (at_eof(iop) && no_data_left(iop))
cnt = EOF;
else if ((iop->flag & IOP_CLOSED) != 0)
cnt = EOF;
- else
+ else
cnt = get_a_record(&begin, iop, & errcode);
if (cnt == EOF) {
- cnt = 0;
retval = 1;
if (errcode > 0) {
- if (do_traditional || endfile_block == NULL)
- fatal(_("error reading input file `%s': %s"),
- iop->name, strerror(errcode));
- else
- update_ERRNO_saved(errcode);
+ update_ERRNO_saved(errcode);
+ if (do_traditional || ! has_endfile)
+ fatal(_("error reading input file `%s': %s"),
+ iop->name, strerror(errcode));
}
} else {
NR += 1;
@@ -479,6 +437,12 @@ iop_close(IOBUF *iop)
if (iop == NULL)
return 0;
+ if (iop->fd == INVALID_HANDLE) { /* from nextfile(...) above */
+ assert(iop->buf == NULL);
+ assert((iop->flag & IOP_NOFREE_OBJ) != 0);
+ return 0;
+ }
+
errno = 0;
iop->flag &= ~IOP_AT_EOF;
@@ -529,49 +493,14 @@ iop_close(IOBUF *iop)
* corrupted and that references to $0 and fields work.
*/
}
- free(iop->buf);
+ efree(iop->buf);
iop->buf = NULL;
}
if ((iop->flag & IOP_NOFREE_OBJ) == 0)
- free((char *) iop);
+ efree((char *) iop);
return ret == -1 ? 1 : 0;
}
-/* do_input --- the main input processing loop */
-
-void
-do_input()
-{
- IOBUF *iop;
- extern int exiting;
- int rval1, rval2, rval3;
-
- (void) setjmp(filebuf); /* for `nextfile' */
-
- while ((iop = nextfile(FALSE)) != NULL) {
- /*
- * This was:
- if (inrec(iop) == 0)
- while (interpret(expression_value) && inrec(iop) == 0)
- continue;
- * Now expand it out for ease of debugging.
- */
- rval1 = inrec(iop);
- if (rval1 == 0) {
- for (;;) {
- rval2 = rval3 = -1; /* for debugging */
- rval2 = interpret(expression_value);
- if (rval2 != 0)
- rval3 = inrec(iop);
- if (rval2 == 0 || rval3 != 0)
- break;
- }
- }
- if (exiting)
- break;
- }
-}
-
/* redflags2str --- turn redirection flags into a string, for debugging */
const char *
@@ -598,80 +527,72 @@ redflags2str(int flags)
/* redirect --- Redirection for printf and print commands */
struct redirect *
-redirect(NODE *tree, int *errflg)
+redirect(NODE *redir_exp, int redirtype, int *errflg)
{
- register NODE *tmp;
- register struct redirect *rp;
- register char *str;
+ struct redirect *rp;
+ char *str;
int tflag = 0;
int outflag = 0;
const char *direction = "to";
const char *mode;
int fd;
const char *what = NULL;
- int isdir = FALSE;
int new_rp = FALSE;
- int len; /* used with /inet */
-
- if (do_sandbox)
- fatal(_("redirection not allowed in sandbox mode"));
+ static struct redirect *save_rp = NULL; /* hold onto rp that should
+ * be freed for reuse
+ */
- switch (tree->type) {
- case Node_redirect_append:
+ switch (redirtype) {
+ case redirect_append:
tflag = RED_APPEND;
/* FALL THROUGH */
- case Node_redirect_output:
+ case redirect_output:
outflag = (RED_FILE|RED_WRITE);
tflag |= outflag;
- if (tree->type == Node_redirect_output)
+ if (redirtype == redirect_output)
what = ">";
else
what = ">>";
break;
- case Node_redirect_pipe:
+ case redirect_pipe:
tflag = (RED_PIPE|RED_WRITE);
what = "|";
break;
- case Node_redirect_pipein:
+ case redirect_pipein:
tflag = (RED_PIPE|RED_READ);
what = "|";
break;
- case Node_redirect_input:
+ case redirect_input:
tflag = (RED_FILE|RED_READ);
what = "<";
break;
- case Node_redirect_twoway:
+ case redirect_twoway:
tflag = (RED_READ|RED_WRITE|RED_TWOWAY);
what = "|&";
break;
default:
- fatal(_("invalid tree type %s in redirect()"),
- nodetype2str(tree->type));
- break;
+ cant_happen();
}
- tmp = tree_eval(tree->subnode);
- if (do_lint && (tmp->flags & STRCUR) == 0)
+ if (do_lint && (redir_exp->flags & STRCUR) == 0)
lintwarn(_("expression in `%s' redirection only has numeric value"),
what);
- tmp = force_string(tmp);
- str = tmp->stptr;
+ redir_exp = force_string(redir_exp);
+ str = redir_exp->stptr;
if (str == NULL || *str == '\0')
fatal(_("expression for `%s' redirection has null string value"),
what);
- if (do_lint
- && (STREQN(str, "0", tmp->stlen) || STREQN(str, "1", tmp->stlen)))
- lintwarn(_("filename `%s' for `%s' redirection may be result of logical expression"), str, what);
+ if (do_lint && (STREQN(str, "0", redir_exp->stlen)
+ || STREQN(str, "1", redir_exp->stlen))
+ )
+ lintwarn(_("filename `%s' for `%s' redirection may be result of logical expression"),
+ str, what);
- /*
- * XXX: Use /inet4 and /inet6 with plain /inet being whatever
- * we get back from the system.
- */
#ifdef HAVE_SOCKETS
- if (inetfile(str, & len, NULL)) {
+ if (STREQN(str, "/inet/", 6)) {
tflag |= RED_SOCKET;
- if (STREQN(str + len, "tcp/", 4))
+ if (STREQN(str + 6, "tcp/", 4))
tflag |= RED_TCP; /* use shutdown when closing */
}
#endif /* HAVE_SOCKETS */
@@ -686,15 +607,15 @@ redirect(NODE *tree, int *errflg)
* we've gotten EOF from a child input pipeline, it's
* good bet that the child has died. So recover it.
*/
- if ((rp->flag & RED_EOF) && tree->type == Node_redirect_pipein) {
+ if ((rp->flag & RED_EOF) && redirtype == redirect_pipein) {
if (rp->pid != -1)
wait_any(0);
}
#endif /* PIPES_SIMULATED */
/* now check for a match */
- if (strlen(rp->value) == tmp->stlen
- && memcmp(rp->value, str, tmp->stlen) == 0
+ if (strlen(rp->value) == redir_exp->stlen
+ && memcmp(rp->value, str, redir_exp->stlen) == 0
&& ((rp->flag & ~(RED_NOBUF|RED_EOF|RED_PTY)) == tflag
|| (outflag != 0
&& (rp->flag & (RED_FILE|RED_WRITE)) == outflag))) {
@@ -705,7 +626,7 @@ redirect(NODE *tree, int *errflg)
if (do_lint && rpflag != newflag)
lintwarn(
_("unnecessary mixing of `>' and `>>' for file `%.*s'"),
- (int) tmp->stlen, rp->value);
+ (int) redir_exp->stlen, rp->value);
break;
}
@@ -713,11 +634,14 @@ redirect(NODE *tree, int *errflg)
if (rp == NULL) {
new_rp = TRUE;
- emalloc(rp, struct redirect *, sizeof(struct redirect),
- "redirect");
- emalloc(str, char *, tmp->stlen+1, "redirect");
- memcpy(str, tmp->stptr, tmp->stlen);
- str[tmp->stlen] = '\0';
+ if (save_rp != NULL) {
+ rp = save_rp;
+ efree(rp->value);
+ } else
+ emalloc(rp, struct redirect *, sizeof(struct redirect), "redirect");
+ emalloc(str, char *, redir_exp->stlen + 1, "redirect");
+ memcpy(str, redir_exp->stptr, redir_exp->stlen);
+ str[redir_exp->stlen] = '\0';
rp->value = str;
rp->flag = tflag;
rp->fp = NULL;
@@ -726,73 +650,77 @@ redirect(NODE *tree, int *errflg)
rp->status = 0;
} else
str = rp->value; /* get \0 terminated string */
+ save_rp = rp;
while (rp->fp == NULL && rp->iop == NULL) {
- if (! new_rp && rp->flag & RED_EOF)
+ if (! new_rp && rp->flag & RED_EOF) {
/*
* encountered EOF on file or pipe -- must be cleared
* by explicit close() before reading more
*/
+ save_rp = NULL;
return rp;
+ }
mode = NULL;
errno = 0;
- switch (tree->type) {
- case Node_redirect_output:
+ switch (redirtype) {
+ case redirect_output:
mode = binmode("w");
if ((rp->flag & RED_USED) != 0)
mode = (rp->mode[1] == 'b') ? "ab" : "a";
break;
- case Node_redirect_append:
+ case redirect_append:
mode = binmode("a");
break;
- case Node_redirect_pipe:
+ case redirect_pipe:
/* synchronize output before new pipe */
(void) flush_io();
os_restore_mode(fileno(stdin));
if ((rp->fp = popen(str, binmode("w"))) == NULL)
fatal(_("can't open pipe `%s' for output (%s)"),
- str, strerror(errno));
+ str, strerror(errno));
+
/* set close-on-exec */
os_close_on_exec(fileno(rp->fp), str, "pipe", "to");
rp->flag |= RED_NOBUF;
break;
- case Node_redirect_pipein:
+ case redirect_pipein:
direction = "from";
if (gawk_popen(str, rp) == NULL)
fatal(_("can't open pipe `%s' for input (%s)"),
str, strerror(errno));
break;
- case Node_redirect_input:
+ case redirect_input:
direction = "from";
- rp->iop = iop_alloc(devopen(str, binmode("r"), & isdir), str, NULL, TRUE);
- if (isdir) {
+ fd = devopen(str, binmode("r"));
+ if (fd == INVALID_HANDLE && errno == EISDIR) {
*errflg = EISDIR;
- free_rp(rp);
return NULL;
}
+ rp->iop = iop_alloc(fd, str, NULL, TRUE);
break;
- case Node_redirect_twoway:
+ case redirect_twoway:
direction = "to/from";
if (! two_way_open(str, rp)) {
#ifdef HAVE_SOCKETS
- if (inetfile(str, NULL, NULL)) {
+ if (STREQN(redir_exp->stptr, "/inet/", 6)) {
*errflg = errno;
- free_temp(tmp);
- free_rp(rp);
return NULL;
} else
#endif
fatal(_("can't open two way pipe `%s' for input/output (%s)"),
- str, strerror(errno));
+ str, strerror(errno));
}
break;
default:
cant_happen();
}
+
if (mode != NULL) {
errno = 0;
- fd = devopen(str, mode, NULL);
+ fd = devopen(str, mode);
+
if (fd > INVALID_HANDLE) {
if (fd == fileno(stdin))
rp->fp = stdin;
@@ -830,6 +758,7 @@ redirect(NODE *tree, int *errflg)
}
}
}
+
if (rp->fp == NULL && rp->iop == NULL) {
/* too many files open -- close one and try again */
if (errno == EMFILE || errno == ENFILE)
@@ -857,8 +786,9 @@ redirect(NODE *tree, int *errflg)
*/
if (errflg != NULL)
*errflg = errno;
- if (tree->type == Node_redirect_output
- || tree->type == Node_redirect_append) {
+ if (redirtype == redirect_output
+ || redirtype == redirect_append
+ ) {
/* multiple messages make life easier for translators */
if (*direction == 'f')
fatal(_("can't redirect from `%s' (%s)"),
@@ -866,15 +796,11 @@ redirect(NODE *tree, int *errflg)
else
fatal(_("can't redirect to `%s' (%s)"),
str, strerror(errno));
- } else {
- free_temp(tmp);
- free_rp(rp);
+ } else
return NULL;
- }
}
}
}
- free_temp(tmp);
if (new_rp) {
/*
@@ -887,7 +813,7 @@ redirect(NODE *tree, int *errflg)
rp->next = red_head;
red_head = rp;
}
-
+ save_rp = NULL;
return rp;
}
@@ -910,8 +836,8 @@ getredirect(const char *str, int len)
static void
close_one()
{
- register struct redirect *rp;
- register struct redirect *rplast = NULL;
+ struct redirect *rp;
+ struct redirect *rplast = NULL;
static short warned = FALSE;
@@ -947,27 +873,29 @@ close_one()
/* do_close --- completely close an open file or pipe */
NODE *
-do_close(NODE *tree)
+do_close(int nargs)
{
NODE *tmp, *tmp2;
- register struct redirect *rp;
+ struct redirect *rp;
two_way_close_type how = CLOSE_ALL; /* default */
- tmp = force_string(tree_eval(tree->lnode)); /* 1st arg: redir to close */
-
- if (tree->rnode != NULL) {
+ if (nargs == 2) {
/* 2nd arg if present: "to" or "from" for two-way pipe */
/* DO NOT use _() on the strings here! */
- tmp2 = force_string(tree->rnode->lnode);
+ tmp2 = POP_STRING();
if (strcasecmp(tmp2->stptr, "to") == 0)
how = CLOSE_TO;
else if (strcasecmp(tmp2->stptr, "from") == 0)
how = CLOSE_FROM;
- else
+ else {
+ DEREF(tmp2);
fatal(_("close: second argument must be `to' or `from'"));
- free_temp(tmp2);
+ }
+ DEREF(tmp2);
}
+ tmp = POP_STRING(); /* 1st arg: redir to close */
+
for (rp = red_head; rp != NULL; rp = rp->next) {
if (strlen(rp->value) == tmp->stlen
&& memcmp(rp->value, tmp->stptr, tmp->stlen) == 0)
@@ -988,12 +916,12 @@ do_close(NODE *tree)
ERRNO_node->var_value = make_string(cp, strlen(cp));
}
- free_temp(tmp);
- return tmp_number((AWKNUM) -1.0);
+ DEREF(tmp);
+ return make_number((AWKNUM) -1.0);
}
- free_temp(tmp);
+ DEREF(tmp);
fflush(stdout); /* synchronize regular output */
- tmp = tmp_number((AWKNUM) close_redir(rp, FALSE, how));
+ tmp = make_number((AWKNUM) close_redir(rp, FALSE, how));
rp = NULL;
/*
* POSIX says close() returns 0 on success, non-zero otherwise.
@@ -1002,8 +930,8 @@ do_close(NODE *tree)
* This whole business is a mess.
*/
if (do_posix) {
- free_temp(tmp);
- return tmp_number((AWKNUM) 0);
+ unref(tmp);
+ return make_number((AWKNUM) 0);
}
return tmp;
}
@@ -1070,7 +998,7 @@ close_rp(struct redirect *rp, two_way_close_type how)
/* close_redir --- close an open file or pipe */
static int
-close_redir(register struct redirect *rp, int exitwarn, two_way_close_type how)
+close_redir(struct redirect *rp, int exitwarn, two_way_close_type how)
{
int status = 0;
@@ -1151,7 +1079,7 @@ checkwarn:
int
flush_io()
{
- register struct redirect *rp;
+ struct redirect *rp;
int status = 0;
errno = 0;
@@ -1189,8 +1117,8 @@ flush_io()
int
close_io(int *stdio_problem)
{
- register struct redirect *rp;
- register struct redirect *next;
+ struct redirect *rp;
+ struct redirect *next;
int status = 0;
errno = 0;
@@ -1267,8 +1195,8 @@ str2mode(const char *mode)
/* socketopen --- open a socket and set it into connected state */
static int
-socketopen(int family, int type, const char *localpname,
- const char *remotepname, const char *remotehostname)
+socketopen(int type, const char *localpname, const char *remotepname,
+ const char *remotehostname)
{
struct addrinfo *lres, *lres0;
struct addrinfo lhints;
@@ -1284,7 +1212,6 @@ socketopen(int family, int type, const char *localpname,
memset (&lhints, '\0', sizeof (lhints));
lhints.ai_flags = AI_PASSIVE | AI_ADDRCONFIG;
lhints.ai_socktype = type;
- lhints.ai_family = family;
lerror = getaddrinfo (NULL, localpname, &lhints, &lres);
if (lerror) {
@@ -1341,6 +1268,11 @@ socketopen(int family, int type, const char *localpname,
break;
} else {
/* /inet/raw client not ready yet */
+ if (socket_fd != INVALID_HANDLE)
+ close(socket_fd);
+ freeaddrinfo(rres0);
+ if (lres0 != NULL)
+ freeaddrinfo(lres0);
fatal(_("/inet/raw client not ready yet, sorry"));
if (geteuid() != 0)
/* FIXME: is this second fatal ever reached? */
@@ -1377,7 +1309,12 @@ socketopen(int family, int type, const char *localpname,
break;
#endif
} else {
- /* /inet/raw server not ready yet */
+ /* /inet/raw server not ready yet */
+ if (socket_fd != INVALID_HANDLE)
+ close(socket_fd);
+ freeaddrinfo(rres0);
+ if (lres0 != NULL)
+ freeaddrinfo(lres0);
fatal(_("/inet/raw server not ready yet, sorry"));
if (geteuid() != 0)
fatal(_("only root may use `/inet/raw'."));
@@ -1405,20 +1342,25 @@ nextrres:
/* devopen --- handle /dev/std{in,out,err}, /dev/fd/N, regular files */
/*
+ * This separate version is still needed for output, since file and pipe
+ * output is done with stdio. iop_open() handles input with IOBUFs of
+ * more "special" files. Those files are not handled here since it makes
+ * no sense to use them for output.
+ */
+
+/*
* Strictly speaking, "name" is not a "const char *" because we temporarily
* change the string.
*/
int
-devopen(const char *name, const char *mode, int *isdir)
+devopen(const char *name, const char *mode)
{
int openfd;
char *cp;
char *ptr;
int flag = 0;
- int len;
- int family;
- extern unsigned long strtoul P((const char *, char **endptr, int base));
+ extern unsigned long strtoul(const char *, char **endptr, int base);
flag = str2mode(mode);
@@ -1445,18 +1387,15 @@ devopen(const char *name, const char *mode, int *isdir)
else if (STREQ(cp, "stderr") && (flag & O_ACCMODE) == O_WRONLY)
openfd = fileno(stderr);
else if (STREQN(cp, "fd/", 3)) {
- struct stat sbuf;
-
cp += 3;
openfd = (int) strtoul(cp, &ptr, 10);
- if (openfd <= INVALID_HANDLE || ptr == cp
- || fstat(openfd, &sbuf) < 0)
+ if (openfd <= INVALID_HANDLE || ptr == cp)
openfd = INVALID_HANDLE;
}
/* do not set close-on-exec for inherited fd's */
if (openfd != INVALID_HANDLE)
return openfd;
- } else if (inetfile(name, & len, & family)) {
+ } else if (STREQN(name, "/inet/", 6)) {
#ifdef HAVE_SOCKETS
/* /inet/protocol/localport/hostname/remoteport */
int protocol;
@@ -1465,7 +1404,7 @@ devopen(const char *name, const char *mode, int *isdir)
char *localpname;
char *localpnamelastcharp;
- cp = (char *) name + len;
+ cp = (char *) name + 6;
/* which protocol? */
if (STREQN(cp, "tcp/", 4))
protocol = SOCK_STREAM;
@@ -1473,10 +1412,11 @@ devopen(const char *name, const char *mode, int *isdir)
protocol = SOCK_DGRAM;
else if (STREQN(cp, "raw/", 4))
protocol = SOCK_RAW;
- else
+ else {
+ protocol = SOCK_STREAM; /* shut up the compiler */
fatal(_("no (known) protocol supplied in special filename `%s'"),
- name);
-
+ name);
+ }
cp += 4;
/* which localport? */
@@ -1489,6 +1429,7 @@ devopen(const char *name, const char *mode, int *isdir)
*/
if (*cp != '/' || cp == localpname)
fatal(_("special file name `%s' is incomplete"), name);
+
/* We change the special file name temporarily because we
* need a 0-terminated string here for conversion with atoi().
* By using atoi() the use of decimal numbers is enforced.
@@ -1535,7 +1476,7 @@ devopen(const char *name, const char *mode, int *isdir)
char *cp, *end;
unsigned long count = 0;
char *ms2;
-
+
first_time = FALSE;
if ((cp = getenv("GAWK_SOCK_RETRIES")) != NULL) {
count = strtoul(cp, &end, 10);
@@ -1559,7 +1500,7 @@ devopen(const char *name, const char *mode, int *isdir)
retries = def_retries;
do {
- openfd = socketopen(family, protocol, localpname, cp, hostname);
+ openfd = socketopen(protocol, localpname, cp, hostname);
retries--;
} while (openfd == INVALID_HANDLE && retries > 0 && usleep(msleep) == 0);
}
@@ -1576,8 +1517,6 @@ strictopen:
openfd = open(name, flag, 0666);
if (openfd != INVALID_HANDLE) {
if (os_isdir(openfd)) {
- if (isdir)
- *isdir = TRUE;
(void) close(openfd); /* don't leak fds */
/* Set useful error number. */
errno = EISDIR;
@@ -1603,10 +1542,10 @@ two_way_open(const char *str, struct redirect *rp)
#ifdef HAVE_SOCKETS
/* case 1: socket */
- if (inetfile(str, NULL, NULL)) {
+ if (STREQN(str, "/inet/", 6)) {
int fd, newfd;
- fd = devopen(str, "rw", NULL);
+ fd = devopen(str, "rw");
if (fd == INVALID_HANDLE)
return FALSE;
rp->fp = fdopen(fd, "w");
@@ -1630,35 +1569,6 @@ two_way_open(const char *str, struct redirect *rp)
}
#endif /* HAVE_SOCKETS */
-#ifdef HAVE_PORTALS
- /* case 1.5: portal */
- if (STREQN(str, "/p/", 3)) {
- int fd, newfd;
-
- fd = open(str, O_RDWR);
- if (fd == INVALID_HANDLE)
- return FALSE;
- rp->fp = fdopen(fd, "w");
- if (rp->fp == NULL) {
- close(fd);
- return FALSE;
- }
- newfd = dup(fd);
- if (newfd < 0) {
- fclose(rp->fp);
- return FALSE;
- }
- os_close_on_exec(newfd, str, "portal", "to/from");
- rp->iop = iop_alloc(newfd, str, NULL, TRUE);
- if (rp->iop == NULL) {
- fclose(rp->fp);
- return FALSE;
- }
- rp->flag |= RED_SOCKET;
- return TRUE;
- }
-#endif /* HAVE_PORTALS */
-
#ifdef HAVE_TERMIOS_H
/* case 2: use ptys for two-way communications to child */
if (! no_ptys && pty_vs_pipe(str)) {
@@ -1755,6 +1665,7 @@ two_way_open(const char *str, struct redirect *rp)
got_the_pty:
if ((slave = open(slavenam, O_RDWR)) < 0) {
+ close(master);
fatal(_("could not open `%s', mode `%s'"),
slavenam, "r+");
}
@@ -1836,8 +1747,11 @@ two_way_open(const char *str, struct redirect *rp)
}
/* parent */
- if (close(slave))
+ if (close(slave)) {
+ close(master);
+ (void) kill(pid, SIGKILL); /* overkill? (pardon pun) */
fatal(_("close of slave pty failed (%s)"), strerror(errno));
+ }
rp->pid = pid;
rp->iop = iop_alloc(master, str, NULL, TRUE);
@@ -1910,13 +1824,20 @@ use_pipes:
/* connect pipes to stdin and stdout */
close(1); /* close stdout */
- if (dup(ctop[1]) != 1) /* connect pipe input to stdout */
+ if (dup(ctop[1]) != 1) { /* connect pipe input to stdout */
+ close(save_stdin); close(save_stdout);
+ close(ptoc[0]); close(ptoc[1]);
+ close(ctop[0]); close(ctop[1]);
fatal(_("moving pipe to stdout in child failed (dup: %s)"), strerror(errno));
-
+ }
close(0); /* close stdin */
- if (dup(ptoc[0]) != 0) /* connect pipe output to stdin */
+ if (dup(ptoc[0]) != 0) { /* connect pipe output to stdin */
+ close(save_stdin); close(save_stdout);
+ close(ptoc[0]); close(ptoc[1]);
+ close(ctop[0]); close(ctop[1]);
fatal(_("moving pipe to stdin in child failed (dup: %s)"), strerror(errno));
-
+ }
+
/* none of these handles must be inherited by the child process */
(void) close(ptoc[0]); /* close pipe output, child will use stdin instead */
(void) close(ctop[1]); /* close pipe input, child will use stdout instead */
@@ -1931,20 +1852,25 @@ use_pipes:
/* restore stdin and stdout */
close(1);
- if (dup(save_stdout) != 1)
+ if (dup(save_stdout) != 1) {
+ close(save_stdin); close(save_stdout);
+ close(ptoc[1]); close(ctop[0]);
fatal(_("restoring stdout in parent process failed\n"));
+ }
close(save_stdout);
close(0);
- if (dup(save_stdin) != 0)
+ if (dup(save_stdin) != 0) {
+ close(save_stdin);
+ close(ptoc[1]); close(ctop[0]);
fatal(_("restoring stdin in parent process failed\n"));
+ }
close(save_stdin);
if (pid < 0) { /* spawnl() failed */
save_errno = errno;
close(ptoc[1]);
close(ctop[0]);
-
errno = save_errno;
return FALSE;
}
@@ -2030,7 +1956,7 @@ use_pipes:
static int
wait_any(int interesting) /* pid of interest, if any */
{
- RETSIGTYPE (*hstat) P((int)), (*istat) P((int)), (*qstat) P((int));
+ RETSIGTYPE (*hstat)(int), (*istat)(int), (*qstat)(int);
int pid;
int status = 0;
struct redirect *redp;
@@ -2043,7 +1969,7 @@ wait_any(int interesting) /* pid of interest, if any */
pid = wait(&status);
#else
pid = wait((union wait *)&status);
-#endif /* NeXT */
+#endif
if (interesting && pid == interesting) {
break;
} else if (pid != -1) {
@@ -2069,7 +1995,7 @@ static IOBUF *
gawk_popen(const char *cmd, struct redirect *rp)
{
int p[2];
- register int pid;
+ int pid;
#ifdef __EMX__
int save_stdout;
#endif
@@ -2087,12 +2013,16 @@ gawk_popen(const char *cmd, struct redirect *rp)
#ifdef __EMX__
save_stdout = dup(1); /* save stdout */
rp->iop = NULL;
- if (save_stdout == -1)
+ if (save_stdout == -1) {
+ close(p[0]); close(p[1]);
return rp->iop; /* failed */
-
+ }
+
close(1); /* close stdout */
- if (dup(p[1]) != 1)
+ if (dup(p[1]) != 1) {
+ close(p[0]); close(p[1]);
fatal(_("moving pipe to stdout in child failed (dup: %s)"), strerror(errno));
+ }
/* none of these handles must be inherited by the child process */
close(p[1]); /* close pipe input */
@@ -2104,8 +2034,10 @@ gawk_popen(const char *cmd, struct redirect *rp)
/* restore stdout */
close(1);
- if (dup(save_stdout) != 1)
+ if (dup(save_stdout) != 1) {
+ close(p[0]);
fatal(_("restoring stdout in parent process failed\n"));
+ }
close(save_stdout);
#else /* NOT __EMX__ */
@@ -2122,12 +2054,16 @@ gawk_popen(const char *cmd, struct redirect *rp)
}
#endif /* NOT __EMX__ */
- if (pid == -1)
+ if (pid == -1) {
+ close(p[0]); close(p[1]);
fatal(_("cannot create child process for `%s' (fork: %s)"), cmd, strerror(errno));
+ }
rp->pid = pid;
#ifndef __EMX__
- if (close(p[1]) == -1)
+ if (close(p[1]) == -1) {
+ close(p[0]);
fatal(_("close of pipe failed (%s)"), strerror(errno));
+ }
#endif
os_close_on_exec(p[0], cmd, "pipe", "from");
rp->iop = iop_alloc(p[0], cmd, NULL, TRUE);
@@ -2161,7 +2097,7 @@ gawk_pclose(struct redirect *rp)
* except if popen() provides real pipes too
*/
-#if defined(VMS) || defined(OS2) || defined (MSDOS) || defined(WIN32) || defined(TANDEM) || defined(__EMX__)
+#if defined(VMS) || defined(OS2) || defined(__EMX__)
/* gawk_popen --- open an IOBUF on a child process */
@@ -2202,7 +2138,7 @@ gawk_pclose(struct redirect *rp)
rp->ifp = NULL;
return (rval < 0 ? rval : aval);
}
-#else /* not (VMS || OS2 || MSDOS || TANDEM) */
+#else /* not (VMS || OS2) */
static struct pipeinfo {
char *command;
@@ -2251,100 +2187,250 @@ gawk_pclose(struct redirect *rp)
if (pipes[cur].name == NULL)
return -1;
unlink(pipes[cur].name);
- free(pipes[cur].name);
+ efree(pipes[cur].name);
pipes[cur].name = NULL;
- free(pipes[cur].command);
+ efree(pipes[cur].command);
return rval;
}
-#endif /* not (VMS || OS2 || MSDOS || TANDEM) */
+#endif /* not (VMS || OS2) */
#endif /* PIPES_SIMULATED */
-/* do_getline --- read in a line, into var and with redirection, as needed */
+/* do_getline --- read in a line, into var and with redirection */
NODE *
-do_getline(NODE *tree)
+do_getline_redir(int intovar, int redirtype)
{
struct redirect *rp = NULL;
IOBUF *iop;
int cnt = EOF;
char *s = NULL;
int errcode;
+ NODE *redir_exp = NULL;
+ NODE **lhs = NULL;
+ int redir_error = 0;
+
+ if (intovar)
+ lhs = POP_ADDRESS();
+
+ assert(redirtype != 0);
+ redir_exp = TOP();
+ rp = redirect(redir_exp, redirtype, &redir_error);
+ DEREF(redir_exp);
+ decr_sp();
+ if (rp == NULL) {
+ if (redir_error) { /* failed redirect */
+ if (! do_traditional)
+ update_ERRNO_saved(redir_error);
+ }
+ return make_number((AWKNUM) -1.0);
+ }
+ iop = rp->iop;
+ if (iop == NULL) /* end of input */
+ return make_number((AWKNUM) 0.0);
+
+ errcode = 0;
+ cnt = get_a_record(&s, iop, &errcode);
+ if (errcode != 0) {
+ if (! do_traditional && (errcode != -1))
+ update_ERRNO_saved(errcode);
+ return make_number((AWKNUM) -1.0);
+ }
+
+ if (cnt == EOF) {
+ /*
+ * Don't do iop_close() here if we are
+ * reading from a pipe; otherwise
+ * gawk_pclose will not be called.
+ */
+ if ((rp->flag & (RED_PIPE|RED_TWOWAY)) == 0) {
+ (void) iop_close(iop);
+ rp->iop = NULL;
+ }
+ rp->flag |= RED_EOF; /* sticky EOF */
+ return make_number((AWKNUM) 0.0);
+ }
+
+ if (lhs == NULL) /* no optional var. */
+ set_record(s, cnt);
+ else { /* assignment to variable */
+ unref(*lhs);
+ *lhs = make_string(s, cnt);
+ (*lhs)->flags |= MAYBE_NUM;
+ }
+
+ return make_number((AWKNUM) 1.0);
+}
+
+/* do_getline --- read in a line, into var and without redirection */
+
+NODE *
+do_getline(int intovar, IOBUF *iop)
+{
+ int cnt = EOF;
+ char *s = NULL;
+ int errcode;
+
+ if (iop == NULL) { /* end of input */
+ if (intovar)
+ (void) POP_ADDRESS();
+ return make_number((AWKNUM) 0.0);
+ }
+
+ errcode = 0;
+ cnt = get_a_record(&s, iop, &errcode);
+ if (errcode != 0) {
+ if (! do_traditional && (errcode != -1))
+ update_ERRNO_saved(errcode);
+ if (intovar)
+ (void) POP_ADDRESS();
+ return make_number((AWKNUM) -1.0);
+ }
+
+ if (cnt == EOF)
+ return NULL; /* try next file */
+ NR++;
+ FNR++;
+
+ if (! intovar) /* no optional var. */
+ set_record(s, cnt);
+ else { /* assignment to variable */
+ NODE **lhs;
+ lhs = POP_ADDRESS();
+ unref(*lhs);
+ *lhs = make_string(s, cnt);
+ (*lhs)->flags |= MAYBE_NUM;
+ }
+ return make_number((AWKNUM) 1.0);
+}
- while (cnt == EOF) {
- if (tree->rnode == NULL) { /* no redirection */
- iop = nextfile(FALSE);
- if (iop == NULL) /* end of input */
- return tmp_number((AWKNUM) 0.0);
- } else {
- int redir_error = 0;
- rp = redirect(tree->rnode, &redir_error);
- if (rp == NULL && redir_error) { /* failed redirect */
- if (! do_traditional)
- update_ERRNO_saved(redir_error);
+static char **awkpath = NULL; /* array containing library search paths */
+static int max_pathlen; /* length of the longest item in awkpath */
- return tmp_number((AWKNUM) -1.0);
+/* init_awkpath --- split path(=$AWKPATH) into components */
+
+static void
+init_awkpath(char *path)
+{
+ char *start, *end, *p;
+ int len, i;
+ static int max_path = 0;
+
+#define INC_PATH 5
+
+ max_pathlen = 0;
+ if (path == NULL || *path == '\0')
+ path = defpath;
+
+ for (i = 0; i < max_path && awkpath[i]; i++) {
+ efree(awkpath[i]);
+ awkpath[i] = NULL;
+ }
+
+ if (max_path == 0) {
+ max_path = INC_PATH;
+ emalloc(awkpath, char **, (max_path + 1) * sizeof(char *), "init_awkpath");
+ memset(awkpath, 0, (max_path + 1) * sizeof(char *));
+ }
+
+ end = start = path;
+ i = 0;
+ while (*start) {
+ while (*end && *end != envsep)
+ end++;
+ len = end - start;
+ if (len > 0) {
+ emalloc(p, char *, len + 2, "init_awkpath");
+ memcpy(p, start, len);
+
+ /* add directory punctuation if necessary */
+ if (! isdirpunct(*(end - 1)))
+ p[len++] = '/';
+ p[len] = '\0';
+
+ if (i == max_path) {
+ max_path += INC_PATH;
+ erealloc(awkpath, char **, (max_path + 1) * sizeof(char *), "init_awkpath");
+ memset(awkpath + i, 0, (INC_PATH + 1) * sizeof(char *));
}
- iop = rp->iop;
- if (iop == NULL) /* end of input */
- return tmp_number((AWKNUM) 0.0);
+ awkpath[i++] = p;
+ if (len > max_pathlen)
+ max_pathlen = len;
}
- errcode = 0;
- cnt = get_a_record(&s, iop, &errcode);
- if (errcode != 0) {
- if (! do_traditional && (errcode != -1))
- update_ERRNO_saved(errcode);
- return tmp_number((AWKNUM) -1.0);
- }
- if (cnt == EOF) {
- if (rp != NULL) {
- /*
- * Don't do iop_close() here if we are
- * reading from a pipe; otherwise
- * gawk_pclose will not be called.
- */
- if ((rp->flag & (RED_PIPE|RED_TWOWAY)) == 0) {
- (void) iop_close(iop);
- rp->iop = NULL;
- }
- rp->flag |= RED_EOF; /* sticky EOF */
- return tmp_number((AWKNUM) 0.0);
- } else
- continue; /* try another file */
- }
- if (rp == NULL) {
- NR++;
- FNR++;
- }
- if (tree->lnode == NULL) /* no optional var. */
- set_record(s, cnt);
- else { /* assignment to variable */
- Func_ptr after_assign = NULL;
- NODE **lhs;
-
- lhs = get_lhs(tree->lnode, &after_assign, FALSE);
- unref(*lhs);
- *lhs = make_string(s, cnt);
- (*lhs)->flags |= MAYBE_NUM;
- /* we may have to regenerate $0 here! */
- if (after_assign != NULL)
- (*after_assign)();
- }
+ /* skip one or more envsep char */
+ while (*end && *end == envsep)
+ end++;
+ start = end;
}
- return tmp_number((AWKNUM) 1.0);
+ awkpath[i] = NULL;
+
+#undef INC_PATH
}
-/* pathopen --- pathopen with default file extension handling */
+/* do_find_source --- search $AWKPATH for file, return NULL if not found */
-int
-pathopen(const char *file)
+static char *
+do_find_source(const char *src, struct stat *stb, int *errcode)
{
- int fd = do_pathopen(file);
+ char *path;
+ int i;
+
+ assert(errcode != NULL);
+
+ /* some kind of path name, no search */
+ if (ispath(src)) {
+ emalloc(path, char *, strlen(src) + 1, "do_find_source");
+ strcpy(path, src);
+ if (stat(path, stb) == 0)
+ return path;
+ *errcode = errno;
+ efree(path);
+ return NULL;
+ }
+
+ /* try current directory before path search */
+ if (stat(src, stb) == 0) {
+ emalloc(path, char *, strlen(src) + 1, "do_find_source");
+ strcpy(path, src);
+ return path;
+ }
+
+ if (awkpath == NULL)
+ init_awkpath(getenv("AWKPATH"));
+
+ emalloc(path, char *, max_pathlen + strlen(src) + 1, "do_find_source");
+ for (i = 0; awkpath[i]; i++) {
+ if (STREQ(awkpath[i], "./") || STREQ(awkpath[i], ".")) {
+ *path = '\0';
+ } else
+ strcpy(path, awkpath[i]);
+ strcat(path, src);
+ if (stat(path, stb) == 0)
+ return path;
+ }
+
+ /* not found, give up */
+ *errcode = errno;
+ efree(path);
+ return NULL;
+}
+
+/* find_source --- find source file with default file extension handling */
+
+char *
+find_source(const char *src, struct stat *stb, int *errcode)
+{
+ char *path;
+
+ *errcode = 0;
+ if (src == NULL || *src == '\0')
+ return NULL;
+ path = do_find_source(src, stb, errcode);
#ifdef DEFAULT_FILETYPE
- if (! do_traditional && fd <= INVALID_HANDLE) {
+ if (! do_traditional && path == NULL) {
char *file_awk;
int save = errno;
#ifdef VMS
@@ -2352,12 +2438,12 @@ pathopen(const char *file)
#endif
/* append ".awk" and try again */
- emalloc(file_awk, char *, strlen(file) +
- sizeof(DEFAULT_FILETYPE) + 1, "pathopen");
- sprintf(file_awk, "%s%s", file, DEFAULT_FILETYPE);
- fd = do_pathopen(file_awk);
- free(file_awk);
- if (fd <= INVALID_HANDLE) {
+ emalloc(file_awk, char *, strlen(src) +
+ sizeof(DEFAULT_FILETYPE) + 1, "find_source");
+ sprintf(file_awk, "%s%s", src, DEFAULT_FILETYPE);
+ path = do_find_source(file_awk, stb, errcode);
+ efree(file_awk);
+ if (path == NULL) {
errno = save;
#ifdef VMS
vaxc$errno = vms_save;
@@ -2366,75 +2452,19 @@ pathopen(const char *file)
}
#endif /*DEFAULT_FILETYPE*/
- return fd;
+ return path;
}
-/* do_pathopen --- search $AWKPATH for source file */
+/* srcopen --- open source file */
-static int
-do_pathopen(const char *file)
+int
+srcopen(SRCFILE *s)
{
- static const char *savepath = NULL;
- static int first = TRUE;
- const char *awkpath;
- char *cp, *trypath;
- int fd;
- int len;
-
- if (STREQ(file, "-"))
- return 0;
-
- if (do_traditional)
- return devopen(file, "r", NULL);
-
- if (first) {
- first = FALSE;
- if ((awkpath = getenv("AWKPATH")) != NULL && *awkpath)
- savepath = awkpath; /* used for restarting */
- else
- savepath = defpath;
- }
- awkpath = savepath;
-
- /* some kind of path name, no search */
- if (ispath(file))
- return devopen(file, "r", NULL);
-
- /* no arbitrary limits: */
- len = strlen(awkpath) + strlen(file) + 2;
- emalloc(trypath, char *, len, "do_pathopen");
-
- do {
- trypath[0] = '\0';
-
- for (cp = trypath; *awkpath && *awkpath != envsep; )
- *cp++ = *awkpath++;
-
- if (cp != trypath) { /* nun-null element in path */
- /* add directory punctuation only if needed */
- if (! isdirpunct(*(cp-1)))
- *cp++ = '/';
- /* append filename */
- strcpy(cp, file);
- } else
- strcpy(trypath, file);
- if ((fd = devopen(trypath, "r", NULL)) > INVALID_HANDLE) {
- free(trypath);
- return fd;
- }
-
- /* no luck, keep going */
- if(*awkpath == envsep && awkpath[1] != '\0')
- awkpath++; /* skip colon */
- } while (*awkpath != '\0');
- free(trypath);
-
- /*
- * You might have one of the awk paths defined, WITHOUT the current
- * working directory in it. Therefore try to open the file in the
- * current directory.
- */
- return devopen(file, "r", NULL);
+ if (s->stype == SRC_STDIN)
+ return (0);
+ if (s->stype == SRC_FILE || s->stype == SRC_INC)
+ return devopen(s->fullpath, "r");
+ return INVALID_HANDLE;
}
#ifdef TEST
@@ -2489,7 +2519,7 @@ iop_alloc(int fd, const char *name, IOBUF *iop, int do_openhooks)
{
struct stat sbuf;
int iop_malloced = FALSE;
-
+
if (iop == NULL) {
emalloc(iop, IOBUF *, sizeof(IOBUF), "iop_alloc");
iop_malloced = TRUE;
@@ -2501,15 +2531,15 @@ iop_alloc(int fd, const char *name, IOBUF *iop, int do_openhooks)
if (do_openhooks)
find_open_hook(iop);
-
- if (iop->fd == INTERNAL_HANDLE)
+ else if (iop->fd == INVALID_HANDLE)
return iop;
if (iop->fd == INVALID_HANDLE) {
if (iop_malloced)
- free(iop);
+ efree(iop);
return NULL;
}
+
if (isatty(iop->fd))
iop->flag |= IOP_IS_TTY;
iop->readsize = iop->size = optimal_bufsize(iop->fd, & sbuf);
@@ -2534,46 +2564,45 @@ iop_alloc(int fd, const char *name, IOBUF *iop, int do_openhooks)
(void)(! do_traditional && (unref(RT_node->var_value), \
RT_node->var_value = make_string(str, len)))
-
/* grow must increase size of buffer, set end, make sure off and dataend point at */
/* right spot. */
/* */
/* */
/* <growbuffer>= */
/* grow_iop_buffer --- grow the buffer */
-
+
static void
grow_iop_buffer(IOBUF *iop)
{
- size_t valid = iop->dataend - iop->off;
- size_t off = iop->off - iop->buf;
+ size_t valid = iop->dataend - iop->off;
+ size_t off = iop->off - iop->buf;
size_t newsize;
-
+
/*
* Lop off original extra two bytes, double the size,
* add them back.
*/
- newsize = ((iop->size - 2) * 2) + 2;
-
+ newsize = ((iop->size - 2) * 2) + 2;
+
/* Check for overflow */
if (newsize <= iop->size)
fatal(_("could not allocate more input memory"));
-
+
/* Make sure there's room for a disk block */
- if (newsize - valid < iop->readsize)
- newsize += iop->readsize + 2;
-
+ if (newsize - valid < iop->readsize)
+ newsize += iop->readsize + 2;
+
/* Check for overflow, again */
if (newsize <= iop->size)
fatal(_("could not allocate more input memory"));
-
+
iop->size = newsize;
- erealloc(iop->buf, char *, iop->size, "grow_iop_buffer");
- iop->off = iop->buf + off;
- iop->dataend = iop->off + valid;
- iop->end = iop->buf + iop->size;
+ erealloc(iop->buf, char *, iop->size, "grow_iop_buffer");
+ iop->off = iop->buf + off;
+ iop->dataend = iop->off + valid;
+ iop->end = iop->buf + iop->size;
}
-
+
/* Here are the routines. */
/* */
/* */
@@ -2583,21 +2612,21 @@ grow_iop_buffer(IOBUF *iop)
static RECVALUE
rs1scan(IOBUF *iop, struct recmatch *recm, SCANSTATE *state)
{
- register char *bp;
- register char rs;
+ char *bp;
+ char rs;
#ifdef MBS_SUPPORT
- size_t mbclen = 0;
- mbstate_t mbs;
+ size_t mbclen = 0;
+ mbstate_t mbs;
#endif
- memset(recm, '\0', sizeof(struct recmatch));
- rs = RS->stptr[0];
- *(iop->dataend) = rs; /* set sentinel */
- recm->start = iop->off; /* beginning of record */
+ memset(recm, '\0', sizeof(struct recmatch));
+ rs = RS->stptr[0];
+ *(iop->dataend) = rs; /* set sentinel */
+ recm->start = iop->off; /* beginning of record */
- bp = iop->off;
- if (*state == INDATA) /* skip over data we've already seen */
- bp += iop->scanoff;
+ bp = iop->off;
+ if (*state == INDATA) /* skip over data we've already seen */
+ bp += iop->scanoff;
#ifdef MBS_SUPPORT
/*
@@ -2654,59 +2683,59 @@ rs1scan(IOBUF *iop, struct recmatch *recm, SCANSTATE *state)
* Bruno
*/
/* Thus, the check for \n here; big speedup ! */
- if (rs != '\n' && gawk_mb_cur_max > 1) {
- int len = iop->dataend - bp;
- int found = 0;
- memset(&mbs, 0, sizeof(mbstate_t));
- do {
- if (*bp == rs)
- found = 1;
- mbclen = mbrlen(bp, len, &mbs);
- if ((mbclen == 1) || (mbclen == (size_t) -1)
- || (mbclen == (size_t) -2) || (mbclen == 0)) {
- /* We treat it as a singlebyte character. */
- mbclen = 1;
- }
- len -= mbclen;
- bp += mbclen;
- } while (len > 0 && ! found);
+ if (rs != '\n' && gawk_mb_cur_max > 1) {
+ int len = iop->dataend - bp;
+ int found = 0;
+ memset(&mbs, 0, sizeof(mbstate_t));
+ do {
+ if (*bp == rs)
+ found = 1;
+ mbclen = mbrlen(bp, len, &mbs);
+ if ((mbclen == 1) || (mbclen == (size_t) -1)
+ || (mbclen == (size_t) -2) || (mbclen == 0)) {
+ /* We treat it as a singlebyte character. */
+ mbclen = 1;
+ }
+ len -= mbclen;
+ bp += mbclen;
+ } while (len > 0 && ! found);
/* Check that newline found isn't the sentinel. */
- if (found && (bp - mbclen) < iop->dataend) {
- /*
+ if (found && (bp - mbclen) < iop->dataend) {
+ /*
* set len to what we have so far, in case this is
* all there is
*/
- recm->len = bp - recm->start - mbclen;
- recm->rt_start = bp - mbclen;
- recm->rt_len = mbclen;
- *state = NOSTATE;
- return REC_OK;
- } else {
+ recm->len = bp - recm->start - mbclen;
+ recm->rt_start = bp - mbclen;
+ recm->rt_len = mbclen;
+ *state = NOSTATE;
+ return REC_OK;
+ } else {
/* also set len */
- recm->len = bp - recm->start;
- *state = INDATA;
- iop->scanoff = bp - iop->off;
- return NOTERM;
- }
- }
+ recm->len = bp - recm->start;
+ *state = INDATA;
+ iop->scanoff = bp - iop->off;
+ return NOTERM;
+ }
+ }
#endif
- while (*bp != rs)
- bp++;
-
- /* set len to what we have so far, in case this is all there is */
- recm->len = bp - recm->start;
-
- if (bp < iop->dataend) { /* found it in the buffer */
- recm->rt_start = bp;
- recm->rt_len = 1;
- *state = NOSTATE;
- return REC_OK;
- } else {
- *state = INDATA;
- iop->scanoff = bp - iop->off;
- return NOTERM;
- }
+ while (*bp != rs)
+ bp++;
+
+ /* set len to what we have so far, in case this is all there is */
+ recm->len = bp - recm->start;
+
+ if (bp < iop->dataend) { /* found it in the buffer */
+ recm->rt_start = bp;
+ recm->rt_len = 1;
+ *state = NOSTATE;
+ return REC_OK;
+ } else {
+ *state = INDATA;
+ iop->scanoff = bp - iop->off;
+ return NOTERM;
+ }
}
/* <rsrescan>= */
@@ -2715,78 +2744,78 @@ rs1scan(IOBUF *iop, struct recmatch *recm, SCANSTATE *state)
static RECVALUE
rsrescan(IOBUF *iop, struct recmatch *recm, SCANSTATE *state)
{
- register char *bp;
- size_t restart = 0, reend = 0;
- Regexp *RSre = RS_regexp;
+ char *bp;
+ size_t restart = 0, reend = 0;
+ Regexp *RSre = RS_regexp;
int regex_flags = RE_NEED_START;
- memset(recm, '\0', sizeof(struct recmatch));
- recm->start = iop->off;
+ memset(recm, '\0', sizeof(struct recmatch));
+ recm->start = iop->off;
- bp = iop->off;
- if (*state == INDATA)
- bp += iop->scanoff;
+ bp = iop->off;
+ if (*state == INDATA)
+ bp += iop->scanoff;
if ((iop->flag & IOP_AT_START) == 0)
regex_flags |= RE_NO_BOL;
again:
- /* case 1, no match */
- if (research(RSre, bp, 0, iop->dataend - bp, regex_flags) == -1) {
- /* set len, in case this all there is. */
- recm->len = iop->dataend - iop->off;
- return NOTERM;
- }
-
- /* ok, we matched within the buffer, set start and end */
- restart = RESTART(RSre, iop->off);
- reend = REEND(RSre, iop->off);
-
- /* case 2, null regex match, grow buffer, try again */
- if (restart == reend) {
- *state = INDATA;
- iop->scanoff = reend + 1;
- /*
- * If still room in buffer, skip over null match
- * and restart search. Otherwise, return.
- */
- if (bp + iop->scanoff < iop->dataend) {
- bp += iop->scanoff;
- goto again;
- }
- recm->len = (bp - iop->off) + restart;
- return NOTERM;
- }
+ /* case 1, no match */
+ if (research(RSre, bp, 0, iop->dataend - bp, regex_flags) == -1) {
+ /* set len, in case this all there is. */
+ recm->len = iop->dataend - iop->off;
+ return NOTERM;
+ }
- /*
- * At this point, we have a non-empty match.
- *
- * First, fill in rest of data. The rest of the cases return
- * a record and terminator.
- */
- recm->len = restart;
- recm->rt_start = bp + restart;
- recm->rt_len = reend - restart;
- *state = NOSTATE;
+ /* ok, we matched within the buffer, set start and end */
+ restart = RESTART(RSre, iop->off);
+ reend = REEND(RSre, iop->off);
- /*
- * 3. Match exactly at end:
- * if re is a simple string match
- * found a simple string match at end, return REC_OK
- * else
- * grow buffer, add more data, try again
- * fi
- */
- if (iop->off + reend >= iop->dataend) {
- if (reisstring(RS->stptr, RS->stlen, RSre, iop->off))
- return REC_OK;
- else
- return TERMATEND;
- }
+ /* case 2, null regex match, grow buffer, try again */
+ if (restart == reend) {
+ *state = INDATA;
+ iop->scanoff = reend + 1;
+ /*
+ * If still room in buffer, skip over null match
+ * and restart search. Otherwise, return.
+ */
+ if (bp + iop->scanoff < iop->dataend) {
+ bp += iop->scanoff;
+ goto again;
+ }
+ recm->len = (bp - iop->off) + restart;
+ return NOTERM;
+ }
- /*
- * 4. Match within xxx bytes of end & maybe islong re:
- * return TERMNEAREND
- */
+ /*
+ * At this point, we have a non-empty match.
+ *
+ * First, fill in rest of data. The rest of the cases return
+ * a record and terminator.
+ */
+ recm->len = restart;
+ recm->rt_start = bp + restart;
+ recm->rt_len = reend - restart;
+ *state = NOSTATE;
+
+ /*
+ * 3. Match exactly at end:
+ * if re is a simple string match
+ * found a simple string match at end, return REC_OK
+ * else
+ * grow buffer, add more data, try again
+ * fi
+ */
+ if (iop->off + reend >= iop->dataend) {
+ if (reisstring(RS->stptr, RS->stlen, RSre, iop->off))
+ return REC_OK;
+ else
+ return TERMATEND;
+ }
+
+ /*
+ * 4. Match within xxx bytes of end & maybe islong re:
+ * return TERMNEAREND
+ */
/*
* case 4, match succeeded, but there may be more in
@@ -2812,15 +2841,15 @@ again:
* then tested as flags here. Maybe one day.
*/
- /* succession of tests is easier to trace in GDB. */
- if (remaybelong(RS->stptr, RS->stlen)) {
- char *matchend = iop->off + reend;
+ /* succession of tests is easier to trace in GDB. */
+ if (remaybelong(RS->stptr, RS->stlen)) {
+ char *matchend = iop->off + reend;
- if (iop->dataend - matchend < RS->stlen)
- return TERMNEAREND;
- }
+ if (iop->dataend - matchend < RS->stlen)
+ return TERMNEAREND;
+ }
- return REC_OK;
+ return REC_OK;
}
/* <rsnullscan>= */
@@ -2829,71 +2858,71 @@ again:
static RECVALUE
rsnullscan(IOBUF *iop, struct recmatch *recm, SCANSTATE *state)
{
- register char *bp;
+ char *bp;
- if (*state == NOSTATE || *state == INLEADER)
- memset(recm, '\0', sizeof(struct recmatch));
+ if (*state == NOSTATE || *state == INLEADER)
+ memset(recm, '\0', sizeof(struct recmatch));
- recm->start = iop->off;
+ recm->start = iop->off;
- bp = iop->off;
- if (*state != NOSTATE)
- bp += iop->scanoff;
+ bp = iop->off;
+ if (*state != NOSTATE)
+ bp += iop->scanoff;
- /* set sentinel */
- *(iop->dataend) = '\n';
+ /* set sentinel */
+ *(iop->dataend) = '\n';
- if (*state == INTERM)
- goto find_longest_terminator;
- else if (*state == INDATA)
- goto scan_data;
- /* else
- fall into things from beginning,
- either NOSTATE or INLEADER */
+ if (*state == INTERM)
+ goto find_longest_terminator;
+ else if (*state == INDATA)
+ goto scan_data;
+ /* else
+ fall into things from beginning,
+ either NOSTATE or INLEADER */
/* skip_leading: */
- /* leading newlines are ignored */
- while (*bp == '\n' && bp < iop->dataend)
- bp++;
-
- if (bp >= iop->dataend) { /* LOTS of leading newlines, sheesh. */
- *state = INLEADER;
- iop->scanoff = bp - iop->off;
- return NOTERM;
- }
+ /* leading newlines are ignored */
+ while (*bp == '\n' && bp < iop->dataend)
+ bp++;
+
+ if (bp >= iop->dataend) { /* LOTS of leading newlines, sheesh. */
+ *state = INLEADER;
+ iop->scanoff = bp - iop->off;
+ return NOTERM;
+ }
- iop->off = recm->start = bp; /* real start of record */
+ iop->off = recm->start = bp; /* real start of record */
scan_data:
- while (*bp++ != '\n')
- continue;
+ while (*bp++ != '\n')
+ continue;
- if (bp >= iop->dataend) { /* no terminator */
- iop->scanoff = recm->len = bp - iop->off - 1;
- *state = INDATA;
- return NOTERM;
- }
+ if (bp >= iop->dataend) { /* no terminator */
+ iop->scanoff = recm->len = bp - iop->off - 1;
+ *state = INDATA;
+ return NOTERM;
+ }
- /* found one newline before end of buffer, check next char */
- if (*bp != '\n')
- goto scan_data;
+ /* found one newline before end of buffer, check next char */
+ if (*bp != '\n')
+ goto scan_data;
- /* we've now seen at least two newlines */
- *state = INTERM;
- recm->len = bp - iop->off - 1;
- recm->rt_start = bp - 1;
+ /* we've now seen at least two newlines */
+ *state = INTERM;
+ recm->len = bp - iop->off - 1;
+ recm->rt_start = bp - 1;
find_longest_terminator:
- /* find as many newlines as we can, to set RT */
- while (*bp == '\n' && bp < iop->dataend)
- bp++;
+ /* find as many newlines as we can, to set RT */
+ while (*bp == '\n' && bp < iop->dataend)
+ bp++;
- recm->rt_len = bp - recm->rt_start;
- iop->scanoff = bp - iop->off;
+ recm->rt_len = bp - recm->rt_start;
+ iop->scanoff = bp - iop->off;
- if (bp >= iop->dataend)
- return TERMATEND;
+ if (bp >= iop->dataend)
+ return TERMATEND;
- return REC_OK;
+ return REC_OK;
}
/* <getarecord>= */
@@ -2904,82 +2933,78 @@ get_a_record(char **out, /* pointer to pointer to data */
IOBUF *iop, /* input IOP */
int *errcode) /* pointer to error variable */
{
- struct recmatch recm;
- SCANSTATE state;
- RECVALUE ret;
- int retval;
- NODE *rtval = NULL;
- static RECVALUE (*lastmatchrec)P((IOBUF *iop, struct recmatch *recm, SCANSTATE *state)) = NULL;
+ struct recmatch recm;
+ SCANSTATE state;
+ RECVALUE ret;
+ int retval;
+ NODE *rtval = NULL;
+ static RECVALUE (*lastmatchrec)(IOBUF *iop, struct recmatch *recm, SCANSTATE *state) = NULL;
- if (at_eof(iop) && no_data_left(iop))
- return EOF;
+ if (at_eof(iop) && no_data_left(iop))
+ return EOF;
if (iop->get_record != NULL)
return (*iop->get_record)(out, iop, errcode);
- /* <fill initial buffer>= */
- if (has_no_data(iop) || no_data_left(iop)) {
- iop->count = read(iop->fd, iop->buf, iop->readsize);
- if (iop->count == 0) {
- iop->flag |= IOP_AT_EOF;
- return EOF;
- } else if (iop->count == -1) {
- iop->flag |= IOP_AT_EOF;
- if (errcode != NULL)
- *errcode = errno;
- return EOF;
- } else {
- iop->dataend = iop->buf + iop->count;
- iop->off = iop->buf;
- }
- }
-
-
-
- /* <loop through file to find a record>= */
- state = NOSTATE;
- for (;;) {
- size_t dataend_off;
+ /* <fill initial buffer>= */
+ if (has_no_data(iop) || no_data_left(iop)) {
+ iop->count = read(iop->fd, iop->buf, iop->readsize);
+ if (iop->count == 0) {
+ iop->flag |= IOP_AT_EOF;
+ return EOF;
+ } else if (iop->count == -1) {
+ iop->flag |= IOP_AT_EOF;
+ if (errcode != NULL)
+ *errcode = errno;
+ return EOF;
+ } else {
+ iop->dataend = iop->buf + iop->count;
+ iop->off = iop->buf;
+ }
+ }
- ret = (*matchrec)(iop, & recm, & state);
+ /* <loop through file to find a record>= */
+ state = NOSTATE;
+ for (;;) {
+ size_t dataend_off;
+ ret = (*matchrec)(iop, & recm, & state);
iop->flag &= ~IOP_AT_START;
+ if (ret == REC_OK)
+ break;
- if (ret == REC_OK)
- break;
-
- /* need to add more data to buffer */
- /* <shift data down in buffer>= */
- dataend_off = iop->dataend - iop->off;
- memmove(iop->buf, iop->off, dataend_off);
- iop->off = iop->buf;
- iop->dataend = iop->buf + dataend_off;
+ /* need to add more data to buffer */
+ /* <shift data down in buffer>= */
+ dataend_off = iop->dataend - iop->off;
+ memmove(iop->buf, iop->off, dataend_off);
+ iop->off = iop->buf;
+ iop->dataend = iop->buf + dataend_off;
- /* <adjust recm contents>= */
- recm.start = iop->off;
- if (recm.rt_start != NULL)
- recm.rt_start = iop->off + recm.len;
+ /* <adjust recm contents>= */
+ recm.start = iop->off;
+ if (recm.rt_start != NULL)
+ recm.rt_start = iop->off + recm.len;
- /* <read more data, break if EOF>= */
+ /* <read more data, break if EOF>= */
{
#define min(x, y) (x < y ? x : y)
- /* subtract one in read count to leave room for sentinel */
- size_t room_left = iop->end - iop->dataend - 1;
- size_t amt_to_read = min(iop->readsize, room_left);
-
- if (amt_to_read < iop->readsize) {
- grow_iop_buffer(iop);
- /* <adjust recm contents>= */
- recm.start = iop->off;
- if (recm.rt_start != NULL)
- recm.rt_start = iop->off + recm.len;
-
- /* recalculate amt_to_read */
- room_left = iop->end - iop->dataend - 1;
- amt_to_read = min(iop->readsize, room_left);
- }
- while (amt_to_read + iop->readsize < room_left)
- amt_to_read += iop->readsize;
+ /* subtract one in read count to leave room for sentinel */
+ size_t room_left = iop->end - iop->dataend - 1;
+ size_t amt_to_read = min(iop->readsize, room_left);
+
+ if (amt_to_read < iop->readsize) {
+ grow_iop_buffer(iop);
+ /* <adjust recm contents>= */
+ recm.start = iop->off;
+ if (recm.rt_start != NULL)
+ recm.rt_start = iop->off + recm.len;
+
+ /* recalculate amt_to_read */
+ room_left = iop->end - iop->dataend - 1;
+ amt_to_read = min(iop->readsize, room_left);
+ }
+ while (amt_to_read + iop->readsize < room_left)
+ amt_to_read += iop->readsize;
#ifdef SSIZE_MAX
/*
@@ -2989,94 +3014,84 @@ get_a_record(char **out, /* pointer to pointer to data */
amt_to_read = min(amt_to_read, SSIZE_MAX);
#endif
- iop->count = read(iop->fd, iop->dataend, amt_to_read);
- if (iop->count == -1) {
- if (! do_traditional && errcode != NULL) {
- *errcode = errno;
- iop->flag |= IOP_AT_EOF;
- break;
- } else
- fatal(_("error reading input file `%s': %s"),
- iop->name, strerror(errno));
- } else if (iop->count == 0) {
- /*
- * hit EOF before matching RS, so end
- * the record and set RT to ""
- */
- iop->flag |= IOP_AT_EOF;
- break;
- } else
- iop->dataend += iop->count;
- }
-
-
- }
-
-
+ iop->count = read(iop->fd, iop->dataend, amt_to_read);
+ if (iop->count == -1) {
+ *errcode = errno;
+ iop->flag |= IOP_AT_EOF;
+ break;
+ } else if (iop->count == 0) {
+ /*
+ * hit EOF before matching RS, so end
+ * the record and set RT to ""
+ */
+ iop->flag |= IOP_AT_EOF;
+ break;
+ } else
+ iop->dataend += iop->count;
+ }
+ }
- /* <set record, RT, return right value>= */
+ /* <set record, RT, return right value>= */
- /*
- * rtval is not a static pointer to avoid dangling pointer problems
- * in case awk code assigns to RT. A remote possibility, to be sure,
- * but Bitter Experience teaches us not to make ``that'll never
- * happen'' kinds of assumptions.
- */
- rtval = RT_node->var_value;
+ /*
+ * rtval is not a static pointer to avoid dangling pointer problems
+ * in case awk code assigns to RT. A remote possibility, to be sure,
+ * but Bitter Experience teaches us not to make ``that'll never
+ * happen'' kinds of assumptions.
+ */
+ rtval = RT_node->var_value;
- if (recm.rt_len == 0) {
- set_RT_to_null();
+ if (recm.rt_len == 0) {
+ set_RT_to_null();
lastmatchrec = NULL;
} else {
- assert(recm.rt_start != NULL);
- /*
- * Optimization. For rs1 case, don't set RT if
- * character is same as last time. This knocks a
- * chunk of time off something simple like
- *
- * gawk '{ print }' /some/big/file
- *
- * Similarly, for rsnull case, if length of new RT is
- * shorter than current RT, just bump length down in RT.
+ assert(recm.rt_start != NULL);
+ /*
+ * Optimization. For rs1 case, don't set RT if
+ * character is same as last time. This knocks a
+ * chunk of time off something simple like
+ *
+ * gawk '{ print }' /some/big/file
+ *
+ * Similarly, for rsnull case, if length of new RT is
+ * shorter than current RT, just bump length down in RT.
*
* Make sure that matchrec didn't change since the last
* check. (Ugh, details, details, details.)
- */
+ */
if (lastmatchrec == NULL || lastmatchrec != matchrec) {
lastmatchrec = matchrec;
set_RT(recm.rt_start, recm.rt_len);
} else if (matchrec == rs1scan) {
- if (rtval->stlen != 1 || rtval->stptr[0] != recm.rt_start[0])
- set_RT(recm.rt_start, recm.rt_len);
- /* else
- leave it alone */
- } else if (matchrec == rsnullscan) {
- if (rtval->stlen <= recm.rt_len)
- rtval->stlen = recm.rt_len;
- else
- set_RT(recm.rt_start, recm.rt_len);
- } else
- set_RT(recm.rt_start, recm.rt_len);
- }
-
- if (recm.len == 0) {
- *out = NULL;
- retval = 0;
- } else {
- assert(recm.start != NULL);
- *out = recm.start;
- retval = recm.len;
- }
+ if (rtval->stlen != 1 || rtval->stptr[0] != recm.rt_start[0])
+ set_RT(recm.rt_start, recm.rt_len);
+ /* else
+ leave it alone */
+ } else if (matchrec == rsnullscan) {
+ if (rtval->stlen <= recm.rt_len)
+ rtval->stlen = recm.rt_len;
+ else
+ set_RT(recm.rt_start, recm.rt_len);
+ } else
+ set_RT(recm.rt_start, recm.rt_len);
+ }
- iop->off += recm.len + recm.rt_len;
+ if (recm.len == 0) {
+ *out = NULL;
+ retval = 0;
+ } else {
+ assert(recm.start != NULL);
+ *out = recm.start;
+ retval = recm.len;
+ }
- if (recm.len == 0 && recm.rt_len == 0 && at_eof(iop))
- return EOF;
- else
- return retval;
+ iop->off += recm.len + recm.rt_len;
+ if (recm.len == 0 && recm.rt_len == 0 && at_eof(iop))
+ return EOF;
+ else
+ return retval;
}
-
/* set_RS --- update things as appropriate when RS is set */
@@ -3104,19 +3119,23 @@ set_RS()
save_rs = dupnode(RS_node->var_value);
RS_is_null = FALSE;
RS = force_string(RS_node->var_value);
- if (RS_regexp != NULL) {
- refree(RS_re_yes_case);
- refree(RS_re_no_case);
- RS_re_yes_case = RS_re_no_case = RS_regexp = NULL;
- }
+
+ /* used to be if (RS_regexp != NULL) { refree(..); refree(..); ...; }.
+ * Please do not remerge the if condition; hinders memory deallocation
+ * in case of fatal error in make_regexp.
+ */
+ refree(RS_re_yes_case); /* NULL argument is ok */
+ refree(RS_re_no_case);
+ RS_re_yes_case = RS_re_no_case = RS_regexp = NULL;
+
if (RS->stlen == 0) {
RS_is_null = TRUE;
matchrec = rsnullscan;
} else if (RS->stlen > 1) {
static short warned = FALSE;
- RS_re_yes_case = make_regexp(RS->stptr, RS->stlen, FALSE, TRUE);
- RS_re_no_case = make_regexp(RS->stptr, RS->stlen, TRUE, TRUE);
+ RS_re_yes_case = make_regexp(RS->stptr, RS->stlen, FALSE, TRUE, TRUE);
+ RS_re_no_case = make_regexp(RS->stptr, RS->stlen, TRUE, TRUE, TRUE);
RS_regexp = (IGNORECASE ? RS_re_no_case : RS_re_yes_case);
matchrec = rsrescan;
@@ -3152,16 +3171,16 @@ pty_vs_pipe(const char *command)
full_len = strlen(command)
+ SUBSEP_node->var_value->stlen
- + 3 /* strlen("pty") */
+ + 3 /* strlen("pty") */
+ 1; /* string terminator */
emalloc(full_index, char *, full_len, "pty_vs_pipe");
sprintf(full_index, "%s%.*spty", command,
(int) SUBSEP_node->var_value->stlen, SUBSEP_node->var_value->stptr);
- sub = tmp_string(full_index, strlen(full_index));
+ sub = make_string(full_index, strlen(full_index));
val = in_array(PROCINFO_node, sub);
- free_temp(sub);
- free(full_index);
+ unref(sub);
+ efree(full_index);
if (val) {
if (val->flags & MAYBE_NUM)
@@ -3197,36 +3216,6 @@ iopflags2str(int flag)
static void
free_rp(struct redirect *rp)
{
- free(rp->value);
- free(rp);
-}
-
-/* is_inet --- return true for a /inet special file, set other values */
-
-static int
-inetfile(const char *str, int *length, int *family)
-{
- int ret = FALSE;
-
- if (STREQN(str, "/inet/", 6)) {
- ret = TRUE;
- if (length != NULL)
- *length = 6;
- if (family != NULL)
- *family = AF_UNSPEC;
- } else if (STREQN(str, "/inet4/", 7)) {
- ret = TRUE;
- if (length != NULL)
- *length = 7;
- if (family != NULL)
- *family = AF_INET;
- } else if (STREQN(str, "/inet6/", 7)) {
- ret = TRUE;
- if (length != NULL)
- *length = 7;
- if (family != NULL)
- *family = AF_INET6;
- }
-
- return ret;
+ efree(rp->value);
+ efree(rp);
}
diff --git a/m4/arch.m4 b/m4/arch.m4
index 97b43e64..2402435e 100644
--- a/m4/arch.m4
+++ b/m4/arch.m4
@@ -64,8 +64,8 @@ AC_MSG_CHECKING([for z/OS USS compilation])
if test "OS/390" = "`uname`"
then
CFLAGS="$CFLAGS -D_ALL_SOURCE -DZOS_USS -DUSE_EBCDIC"
- # Must rebuild awkgram.c from Bison for EBCDIC
- rm -f awkgram.c
+ # Must rebuild awkgram.c and command.c from Bison for EBCDIC
+ rm -f awkgram.c command.c
ac_cv_zos_uss=yes
else
ac_cv_zos_uss=no
diff --git a/m4/readline.m4 b/m4/readline.m4
new file mode 100644
index 00000000..d2523460
--- /dev/null
+++ b/m4/readline.m4
@@ -0,0 +1,63 @@
+dnl Check for readline and dependencies
+dnl Copyright (C) 2004, 2005 Free Software Foundation, Inc.
+dnl
+dnl This file is free software, distributed under the terms of the GNU
+dnl General Public License. As a special exception to the GNU General
+dnl Public License, this file may be distributed as part of a program
+dnl that contains a configuration script generated by Autoconf, under
+dnl the same distribution terms as the rest of that program.
+dnl
+dnl Defines HAVE_LIBREADLINE to 1 if a working readline setup is
+dnl found, and sets @LIBREADLINE@ to the necessary libraries.
+
+AC_DEFUN([GNUPG_CHECK_READLINE],
+[
+ AC_ARG_WITH(readline,
+ AC_HELP_STRING([--with-readline=DIR],
+ [look for the readline library in DIR]),
+ [_do_readline=$withval],[_do_readline=yes])
+
+ if test "$_do_readline" != "no" ; then
+ if test -d "$withval" ; then
+ CPPFLAGS="${CPPFLAGS} -I$withval/include"
+ LDFLAGS="${LDFLAGS} -L$withval/lib"
+ fi
+
+ for _termcap in "" "-ltermcap" "-lcurses" "-lncurses" ; do
+ _readline_save_libs=$LIBS
+ _combo="-lreadline${_termcap:+ $_termcap}"
+ LIBS="$LIBS $_combo"
+
+ AC_MSG_CHECKING([whether readline via \"$_combo\" is present and sane])
+
+ AC_LINK_IFELSE(AC_LANG_PROGRAM([
+#include <stdio.h>
+#include <readline/readline.h>
+#include <readline/history.h>
+],[
+rl_completion_func_t *completer;
+add_history("foobar");
+rl_catch_signals=0;
+rl_inhibit_completion=0;
+rl_attempted_completion_function=NULL;
+rl_completion_matches(NULL,NULL);
+]),_found_readline=yes,_found_readline=no)
+
+ AC_MSG_RESULT([$_found_readline])
+
+ LIBS=$_readline_save_libs
+
+ if test $_found_readline = yes ; then
+ AC_DEFINE(HAVE_LIBREADLINE,1,
+ [Define to 1 if you have a fully functional readline library.])
+ AC_SUBST(LIBREADLINE,$_combo)
+ break
+ fi
+ done
+
+ unset _termcap
+ unset _readline_save_libs
+ unset _combo
+ unset _found_readline
+ fi
+])dnl
diff --git a/main.c b/main.c
index eef8dc56..312cb6be 100644
--- a/main.c
+++ b/main.c
@@ -49,24 +49,26 @@ typedef void *stackoverflow_context_t;
#define DEFAULT_VARFILE "awkvars.out" /* where to put vars */
static const char *varfile = DEFAULT_VARFILE;
-
-static void usage P((int exitval, FILE *fp)) ATTRIBUTE_NORETURN;
-static void copyleft P((void)) ATTRIBUTE_NORETURN;
-static void cmdline_fs P((char *str));
-static void init_args P((int argc0, int argc, const char *argv0, char **argv));
-static void init_vars P((void));
-static NODE *load_environ P((void));
-static NODE *load_procinfo P((void));
-static void add_src P((struct src **data, long *num, long *alloc, enum srctype stype, char *val));
-static RETSIGTYPE catchsig P((int sig)) ATTRIBUTE_NORETURN;
+const char *command_file = NULL; /* debugger commands */
+
+static void usage(int exitval, FILE *fp) ATTRIBUTE_NORETURN;
+static void copyleft(void) ATTRIBUTE_NORETURN;
+static void cmdline_fs(char *str);
+static void init_args(int argc0, int argc, const char *argv0, char **argv);
+static void init_vars(void);
+static NODE *load_environ(void);
+static NODE *load_procinfo(void);
+static RETSIGTYPE catchsig(int sig);
#ifdef HAVE_LIBSIGSEGV
-static int catchsegv P((void *fault_address, int serious));
-static void catchstackoverflow P((int emergency, stackoverflow_context_t scp));
+static int catchsegv(void *fault_address, int serious);
+static void catchstackoverflow(int emergency, stackoverflow_context_t scp);
#endif
-static void nostalgia P((void)) ATTRIBUTE_NORETURN;
-static void version P((void)) ATTRIBUTE_NORETURN;
-static void init_fds P((void));
-static void init_groupset P((void));
+static void nostalgia(void) ATTRIBUTE_NORETURN;
+static void version(void) ATTRIBUTE_NORETURN;
+static void init_fds(void);
+static void init_groupset(void);
+
+static void save_argv(int, char **);
/* These nodes store all the special variables AWK uses */
NODE *ARGC_node, *ARGIND_node, *ARGV_node, *BINMODE_node, *CONVFMT_node;
@@ -75,6 +77,8 @@ NODE *FS_node, *IGNORECASE_node, *NF_node, *NR_node, *OFMT_node, *OFS_node;
NODE *ORS_node, *PROCINFO_node, *RLENGTH_node, *RSTART_node, *RS_node;
NODE *RT_node, *SUBSEP_node, *LINT_node, *TEXTDOMAIN_node, *FPAT_node;
+NODE *_r; /* used as temporary in stack macros */
+
long NF;
long NR;
long FNR;
@@ -94,9 +98,6 @@ int MRL; /* See -mr option for use of this variable */
*/
char *CONVFMT = "%.6g";
-
-int errcount = 0; /* error counter, used by yyerror() */
-
NODE *Nnull_string; /* The global null string */
#if defined(HAVE_LOCALE_H)
@@ -107,34 +108,41 @@ static void init_locale(struct lconv *l);
/* The name the program was invoked under, for error messages */
const char *myname;
-/* A block of AWK code to be run before running the program */
-NODE *begin_block = NULL;
+/* A block of AWK code to be run */
+INSTRUCTION *code_block = NULL;
-/* A block of AWK code to be run after the last input file */
-NODE *end_block = NULL;
+char **d_argv;
+extern NODE **args_array;
+INSTRUCTION *rule_list; /* list of rules and functions with first
+ * and last instruction (source_line) information;
+ * used for profiling and debugging.
+ */
-int exiting = FALSE; /* Was an "exit" statement executed? */
-int exit_val = EXIT_SUCCESS; /* optional exit value */
+NODE **fcall_list = NULL;
+long fcall_count = 0;
+
+int exit_val = EXIT_SUCCESS; /* exit value */
#if defined(YYDEBUG) || defined(GAWKDEBUG)
extern int yydebug;
#endif
-struct src *srcfiles = NULL; /* source file name(s) */
-long numfiles = -1; /* how many source files */
-static long allocfiles; /* for how many is *srcfiles allocated */
+SRCFILE *srcfiles; /* source files */
-#define srcfiles_add(stype, val) \
- add_src(&srcfiles, &numfiles, &allocfiles, stype, val)
+/*
+ * structure to remember variable pre-assignments
+ */
+struct pre_assign {
+ enum asgntype { PRE_ASSIGN = 1, PRE_ASSIGN_FS } type;
+ char *val;
+};
-static struct src *preassigns = NULL; /* requested via -v or -F */
+static struct pre_assign *preassigns = NULL; /* requested via -v or -F */
static long numassigns = -1; /* how many of them */
-static long allocassigns; /* for how many is allocated */
static int disallow_var_assigns = FALSE; /* true for --exec */
-#define preassigns_add(stype, val) \
- add_src(&preassigns, &numassigns, &allocassigns, stype, val)
+static void add_preassign(enum asgntype type, char *val);
#undef do_lint
#undef do_lint_old
@@ -150,12 +158,10 @@ int do_intervals = FALSE; /* allow {...,...} in regexps, see resetup() */
int do_profiling = FALSE; /* profile and pretty print the program */
int do_dump_vars = FALSE; /* dump all global variables at end */
int do_tidy_mem = FALSE; /* release vars when done */
-int do_optimize = FALSE; /* apply any safe optimizations */
+int do_optimize = TRUE; /* apply default optimizations */
int do_binary = FALSE; /* hands off my data! */
int do_sandbox = FALSE; /* sandbox mode - disable 'system' function & redirections */
-int in_begin_rule = FALSE; /* we're in a BEGIN rule */
-int in_end_rule = FALSE; /* we're in an END rule */
int whiny_users = FALSE; /* do things that whiny users want */
int use_lc_numeric = FALSE; /* obey locale for decimal point */
#ifdef MBS_SUPPORT
@@ -164,43 +170,32 @@ int gawk_mb_cur_max; /* MB_CUR_MAX value, see comment in main() */
const int gawk_mb_cur_max = 1;
#endif
+FILE *output_fp;
int output_is_tty = FALSE; /* control flushing of output */
extern const char *version_string;
-extern NODE *beginfile_block;
-extern NODE *endfile_block;
-
#if defined (HAVE_GETGROUPS) && defined(NGROUPS_MAX) && NGROUPS_MAX > 0
GETGROUPS_T *groupset; /* current group set */
int ngroups; /* size of said set */
#endif
-/* The parse tree is stored here. */
-NODE *expression_value;
-
-#if _MSC_VER == 510
-void (*lintfunc) P((va_list va_alist, ...)) = warning;
-#else
-#ifdef CAN_USE_STDARG_H
-void (*lintfunc) P((const char *mesg, ...)) = warning;
-#else
-void (*lintfunc) () = warning;
-#endif
-#endif
+void (*lintfunc)(const char *mesg, ...) = warning;
+/*
+ * Note: reserve -D for future use, to merge dgawk into gawk.
+ */
static const struct option optab[] = {
- { "compat", no_argument, & do_traditional, 1 },
{ "traditional", no_argument, & do_traditional, 1 },
- { "lint", optional_argument, NULL, 'l' },
+ { "lint", optional_argument, NULL, 'L' },
{ "lint-old", no_argument, & do_lint_old, 1 },
{ "optimize", no_argument, & do_optimize, 'O' },
{ "posix", no_argument, & do_posix, 1 },
+ { "command", required_argument, NULL, 'R' },
{ "nostalgia", no_argument, & do_nostalgia, 1 },
{ "gen-pot", no_argument, & do_intl, 1 },
{ "non-decimal-data", no_argument, & do_non_decimal_data, 1 },
{ "profile", optional_argument, NULL, 'p' },
- { "copyleft", no_argument, NULL, 'C' },
{ "copyright", no_argument, NULL, 'C' },
{ "field-separator", required_argument, NULL, 'F' },
{ "file", required_argument, NULL, 'f' },
@@ -209,14 +204,13 @@ static const struct option optab[] = {
{ "dump-variables", optional_argument, NULL, 'd' },
{ "assign", required_argument, NULL, 'v' },
{ "version", no_argument, NULL, 'V' },
- { "usage", no_argument, NULL, 'h' },
{ "help", no_argument, NULL, 'h' },
{ "exec", required_argument, NULL, 'E' },
{ "use-lc-numeric", no_argument, & use_lc_numeric, 1 },
{ "characters-as-bytes", no_argument, & do_binary, 'b' },
{ "sandbox", no_argument, & do_sandbox, 1 },
#if defined(YYDEBUG) || defined(GAWKDEBUG)
- { "parsedebug", no_argument, NULL, 'D' },
+ { "parsedebug", no_argument, NULL, 'Y' },
#endif
{ NULL, 0, NULL, '\0' }
};
@@ -232,16 +226,19 @@ int
main(int argc, char **argv)
{
int c;
- char *scan;
- /* the + on the front tells GNU getopt not to rearrange argv */
- const char *optlist = "+F:f:v:W;m:bcCd::De:E:ghl::LnNOp::PrSV";
+ char *scan, *src;
+ /*
+ * The + on the front tells GNU getopt not to rearrange argv.
+ * Note: reserve -D for future use, to merge dgawk into gawk.
+ * Note: reserve -l for future use, for xgawk's -l option.
+ */
+ const char *optlist = "+F:f:v:W;m:bcCd::e:E:gh:L:nNOp::PrR:StVY";
int stopped_early = FALSE;
int old_optind;
extern int optind;
extern int opterr;
extern char *optarg;
int i;
- int stdio_problem = FALSE;
char *extra_stack;
/* do these checks early */
@@ -306,6 +303,7 @@ main(int argc, char **argv)
#ifdef SIGBUS
(void) signal(SIGBUS, catchsig);
#endif
+
(void) sigsegv_install_handler(catchsegv);
#define STACK_SIZE (16*1024)
extra_stack = malloc(STACK_SIZE);
@@ -333,6 +331,12 @@ main(int argc, char **argv)
/* we do error messages ourselves on invalid options */
opterr = FALSE;
+ /* copy argv before getopt gets to it; used to restart debugger */
+ save_argv(argc, argv);
+
+ /* initialize context */
+ (void) new_context();
+
/* option processing. ready, set, go! */
for (optopt = 0, old_optind = 1;
(c = getopt_long(argc, argv, optlist, optab, NULL)) != EOF;
@@ -342,7 +346,7 @@ main(int argc, char **argv)
switch (c) {
case 'F':
- preassigns_add(PRE_ASSIGN_FS, optarg);
+ add_preassign(PRE_ASSIGN_FS, optarg);
break;
case 'E':
@@ -361,12 +365,15 @@ main(int argc, char **argv)
if (argv[optind-1] != optarg)
while (isspace(*scan))
scan++;
- srcfiles_add(SOURCEFILE,
- (*scan == '\0' ? argv[optind++] : optarg));
+ src = (*scan == '\0' ? argv[optind++] : optarg);
+ (void) add_srcfile((src && src[0] == '-' && src[1] == '\0') ?
+ SRC_STDIN : SRC_FILE,
+ src, srcfiles, NULL, NULL);
+
break;
case 'v':
- preassigns_add(PRE_ASSIGN, optarg);
+ add_preassign(PRE_ASSIGN, optarg);
break;
case 'm':
@@ -418,7 +425,7 @@ main(int argc, char **argv)
if (optarg[0] == '\0')
warning(_("empty argument to `-e/--source' ignored"));
else
- srcfiles_add(CMDLINE, optarg);
+ (void) add_srcfile(SRC_CMDLINE, optarg, srcfiles, NULL, NULL);
break;
case 'g':
@@ -429,7 +436,7 @@ main(int argc, char **argv)
usage(EXIT_SUCCESS, stdout); /* per coding stds */
break;
- case 'l':
+ case 'L':
#ifndef NO_LINT
do_lint = LINT_ALL;
if (optarg != NULL) {
@@ -441,7 +448,7 @@ main(int argc, char **argv)
#endif
break;
- case 'L':
+ case 't':
do_lint_old = TRUE;
break;
@@ -454,7 +461,7 @@ main(int argc, char **argv)
break;
case 'O':
- do_optimize = TRUE;
+ do_optimize++;
break;
case 'p':
@@ -471,11 +478,11 @@ main(int argc, char **argv)
case 'r':
do_intervals = TRUE;
- break;
-
+ break;
+
case 'S':
do_sandbox = TRUE;
- break;
+ break;
case 'V':
version();
@@ -494,12 +501,20 @@ main(int argc, char **argv)
*/
break;
- case 'D':
+ case 'Y':
+ case 'R':
#if defined(YYDEBUG) || defined(GAWKDEBUG)
- yydebug = 2;
- break;
+ if (c == 'Y') {
+ yydebug = 2;
+ break;
+ }
#endif
- /* if not debugging, fall through */
+ if (c == 'R' && which_gawk == exe_debugging) {
+ if (optarg[0] != '\0')
+ command_file = optarg;
+ break;
+ }
+ /* if not debugging or dgawk, fall through */
case '?':
default:
@@ -603,6 +618,8 @@ out:
*/
resetup();
+ (void) grow_stack();
+
/* Set up the special variables */
init_vars();
@@ -610,12 +627,16 @@ out:
init_fields();
/* Now process the pre-assignments */
- for (i = 0; i <= numassigns; i++)
- if (preassigns[i].stype == PRE_ASSIGN)
+ for (i = 0; i <= numassigns; i++) {
+ if (preassigns[i].type == PRE_ASSIGN)
(void) arg_assign(preassigns[i].val, TRUE);
else /* PRE_ASSIGN_FS */
cmdline_fs(preassigns[i].val);
- free(preassigns);
+ efree(preassigns[i].val);
+ }
+
+ if (preassigns != NULL)
+ efree(preassigns);
if ((BINMODE & 1) != 0)
if (os_setbinmode(fileno(stdin), O_BINARY) == -1)
@@ -633,17 +654,16 @@ out:
if (isatty(fileno(stdout)))
output_is_tty = TRUE;
/* No -f or --source options, use next arg */
- if (numfiles == -1) {
+ if (srcfiles->next == srcfiles) {
if (optind > argc - 1 || stopped_early) /* no args left or no program */
usage(EXIT_FAILURE, stderr);
- srcfiles_add(CMDLINE, argv[optind]);
+ (void) add_srcfile(SRC_CMDLINE, argv[optind], srcfiles, NULL, NULL);
optind++;
}
init_args(optind, argc,
do_posix ? argv[0] : myname,
argv);
- (void) tokexpand();
#if defined(LC_NUMERIC)
/*
@@ -653,23 +673,19 @@ out:
*/
setlocale(LC_NUMERIC, "C");
#endif
-
/* Read in the program */
- if (yyparse() != 0 || errcount != 0)
+ if (parse_program(&code_block) != 0)
exit(EXIT_FAILURE);
-
- free(srcfiles);
-
+
if (do_intl)
exit(EXIT_SUCCESS);
- if (do_lint && begin_block == NULL && expression_value == NULL
- && end_block == NULL)
- lintwarn(_("no program text at all!"));
-
if (do_lint)
shadow_funcs();
+ if (do_lint && code_block->nexti->opcode == Op_atexit)
+ lintwarn(_("no program text at all!"));
+
init_profiling_signals();
#if defined(LC_NUMERIC)
@@ -692,41 +708,11 @@ out:
setlocale(LC_NUMERIC, "");
#endif
- /* Whew. Finally, run the program. */
- if (begin_block != NULL) {
- in_begin_rule = TRUE;
- (void) interpret(begin_block);
- }
- in_begin_rule = FALSE;
- if (! exiting && (expression_value != NULL || end_block != NULL
- || beginfile_block != NULL || endfile_block != NULL))
- do_input();
- if (end_block != NULL) {
- in_end_rule = TRUE;
- (void) interpret(end_block);
- }
- in_end_rule = FALSE;
- /*
- * This used to be:
- *
- * if (close_io() != 0 && ! exiting && exit_val == 0)
- * exit_val = 1;
- *
- * Other awks don't care about problems closing open files
- * and pipes, in that it doesn't affect their exit status.
- * So we no longer do either.
- */
- (void) close_io(& stdio_problem);
- /*
- * However, we do want to exit non-zero if there was a problem
- * with stdout/stderr, so we reinstate a slightly different
- * version of the above:
- */
- if (stdio_problem && ! exiting && exit_val == EXIT_SUCCESS)
- exit_val = EXIT_FAILURE;
+ output_fp = stdout;
+ interpret(code_block);
if (do_profiling) {
- dump_prog(begin_block, beginfile_block, expression_value, endfile_block, end_block);
+ dump_prog(code_block);
dump_funcs();
}
@@ -740,25 +726,28 @@ out:
return exit_val; /* to suppress warnings */
}
-/* add_src --- add one element to *srcfiles or *preassigns */
+/* add_preassign --- add one element to preassigns */
static void
-add_src(struct src **data, long *num, long *alloc, enum srctype stype, char *val)
+add_preassign(enum asgntype type, char *val)
{
+ static long allocassigns; /* for how many is allocated */
+
#define INIT_SRC 4
- ++*num;
+ ++numassigns;
- if (*data == NULL) {
- emalloc(*data, struct src *, INIT_SRC * sizeof(struct src), "add_src");
- *alloc = INIT_SRC;
- } else if (*num >= *alloc) {
- (*alloc) *= 2;
- erealloc(*data, struct src *, (*alloc) * sizeof(struct src), "add_src");
+ if (preassigns == NULL) {
+ emalloc(preassigns, struct pre_assign *,
+ INIT_SRC * sizeof(struct pre_assign), "add_preassign");
+ allocassigns = INIT_SRC;
+ } else if (numassigns >= allocassigns) {
+ allocassigns *= 2;
+ erealloc(preassigns, struct pre_assign *,
+ allocassigns * sizeof(struct pre_assign), "add_preassigns");
}
-
- (*data)[*num].stype = stype;
- (*data)[*num].val = val;
+ preassigns[numassigns].type = type;
+ preassigns[numassigns].val = estrdup(val, strlen(val));
#undef INIT_SRC
}
@@ -781,31 +770,33 @@ usage(int exitval, FILE *fp)
fputs(_("\t-f progfile\t\t--file=progfile\n"), fp);
fputs(_("\t-F fs\t\t\t--field-separator=fs\n"), fp);
fputs(_("\t-v var=val\t\t--assign=var=val\n"), fp);
- fputs(_("POSIX options:\t\tGNU long options: (extensions)\n"), fp);
+ fputs(_("Short options:\t\tGNU long options: (extensions)\n"), fp);
fputs(_("\t-m[fr] val\n"), fp);
fputs(_("\t-b\t\t\t--characters-as-bytes\n"), fp);
- fputs(_("\t-c\t\t\t--compat, --traditional\n"), fp);
- fputs(_("\t-C\t\t\t--copyleft, --copyright\n"), fp);
+ fputs(_("\t-c\t\t\t--traditional\n"), fp);
+ fputs(_("\t-C\t\t\t--copyright\n"), fp);
fputs(_("\t-d [file]\t\t--dump-variables[=file]\n"), fp);
fputs(_("\t-e 'program-text'\t--source='program-text'\n"), fp);
fputs(_("\t-E file\t\t\t--exec=file\n"), fp);
fputs(_("\t-g\t\t\t--gen-pot\n"), fp);
- fputs(_("\t-h\t\t\t--help, --usage\n"), fp);
- fputs(_("\t-l [fatal]\t\t--lint[=fatal]\n"), fp);
- fputs(_("\t-L\t\t\t--lint-old\n"), fp);
+ fputs(_("\t-h\t\t\t--help\n"), fp);
+ fputs(_("\t-L [fatal]\t\t--lint[=fatal]\n"), fp);
fputs(_("\t-n\t\t\t--non-decimal-data\n"), fp);
fputs(_("\t-N\t\t\t--use-lc-numeric\n"), fp);
fputs(_("\t-O\t\t\t--optimize\n"), fp);
fputs(_("\t-p [file]\t\t--profile[=file]\n"), fp);
fputs(_("\t-P\t\t\t--posix\n"), fp);
fputs(_("\t-r\t\t\t--re-interval\n"), fp);
+ if (which_gawk == exe_debugging)
+ fputs(_("\t-R file\t\t\t--command=file\n"), fp);
fputs(_("\t-S\t\t\t--sandbox\n"), fp);
+ fputs(_("\t-t\t\t\t--lint-old\n"), fp);
fputs(_("\t-V\t\t\t--version\n"), fp);
#ifdef NOSTALGIA
fputs(_("\t-W nostalgia\t\t--nostalgia\n"), fp);
#endif
#ifdef GAWKDEBUG
- fputs(_("\t-W parsedebug\t\t--parsedebug\n"), fp);
+ fputs(_("\t-Y\t\t--parsedebug\n"), fp);
#endif
/* This is one string to make things easier on translators. */
@@ -883,16 +874,16 @@ along with this program. If not, see http://www.gnu.org/licenses/.\n");
static void
cmdline_fs(char *str)
{
- register NODE **tmp;
+ NODE **tmp;
- tmp = get_lhs(FS_node, (Func_ptr *) 0, FALSE);
+ tmp = &FS_node->var_value;
unref(*tmp);
/*
* Only if in full compatibility mode check for the stupid special
* case so -F\t works as documented in awk book even though the shell
* hands us -Ft. Bleah!
*
- * Thankfully, Posix didn't propagate this "feature".
+ * Thankfully, POSIX didn't propagate this "feature".
*/
if (str[0] == 't' && str[1] == '\0') {
if (do_lint)
@@ -911,19 +902,27 @@ init_args(int argc0, int argc, const char *argv0, char **argv)
{
int i, j;
NODE **aptr;
+ NODE *tmp;
- ARGV_node = install("ARGV", node((NODE *) NULL, Node_var_array, (NODE *) NULL));
- aptr = assoc_lookup(ARGV_node, tmp_number(0.0), FALSE);
+ ARGV_node = install_symbol(estrdup("ARGV", 4), mk_symbol(Node_var_array, (NODE *) NULL));
+ tmp = make_number(0.0);
+ aptr = assoc_lookup(ARGV_node, tmp, FALSE);
+ unref(tmp);
+ unref(*aptr);
*aptr = make_string((char *) argv0, strlen(argv0));
(*aptr)->flags |= MAYBE_NUM;
for (i = argc0, j = 1; i < argc; i++) {
- aptr = assoc_lookup(ARGV_node, tmp_number((AWKNUM) j), FALSE);
+ tmp = make_number((AWKNUM) j);
+ aptr = assoc_lookup(ARGV_node, tmp, FALSE);
+ unref(tmp);
+ unref(*aptr);
*aptr = make_string(argv[i], strlen(argv[i]));
(*aptr)->flags |= MAYBE_NUM;
j++;
}
- ARGC_node = install("ARGC",
- node(make_number((AWKNUM) j), Node_var, (NODE *) NULL));
+
+ ARGC_node = install_symbol(estrdup("ARGC", 4),
+ mk_symbol(Node_var, make_number((AWKNUM) j)));
}
/*
@@ -933,46 +932,48 @@ init_args(int argc0, int argc, const char *argv0, char **argv)
* they have NULL entries in that field. This is notably true of FS
* and IGNORECASE.
*/
+
struct varinit {
NODE **spec;
const char *name;
- NODETYPE type;
const char *strval;
AWKNUM numval;
+ Func_ptr update;
Func_ptr assign;
+ int do_assign;
int flags;
#define NO_INSTALL 0x01
#define NON_STANDARD 0x02
};
static const struct varinit varinit[] = {
-{NULL, "ARGC", Node_illegal, NULL, 0, NULL, NO_INSTALL },
-{&ARGIND_node, "ARGIND", Node_var, NULL, 0, NULL, NON_STANDARD },
-{NULL, "ARGV", Node_illegal, NULL, 0, NULL, NO_INSTALL },
-{&BINMODE_node, "BINMODE", Node_BINMODE, NULL, 0, NULL, NON_STANDARD },
-{&CONVFMT_node, "CONVFMT", Node_CONVFMT, "%.6g", 0, set_CONVFMT, 0 },
-{NULL, "ENVIRON", Node_illegal, NULL, 0, NULL, NO_INSTALL },
-{&ERRNO_node, "ERRNO", Node_var, NULL, 0, NULL, NON_STANDARD },
-{&FIELDWIDTHS_node, "FIELDWIDTHS", Node_FIELDWIDTHS, "", 0, NULL, NON_STANDARD },
-{&FILENAME_node, "FILENAME", Node_var, "", 0, NULL, 0 },
-{&FNR_node, "FNR", Node_FNR, NULL, 0, set_FNR, 0 },
-{&FS_node, "FS", Node_FS, " ", 0, NULL, 0 },
-{&FPAT_node, "FPAT", Node_FPAT, " ", 0, NULL, 0 },
-{&IGNORECASE_node, "IGNORECASE", Node_IGNORECASE, NULL, 0, NULL, NON_STANDARD },
-{&LINT_node, "LINT", Node_LINT, NULL, 0, NULL, NON_STANDARD },
-{&NF_node, "NF", Node_NF, NULL, -1, NULL, 0 },
-{&NR_node, "NR", Node_NR, NULL, 0, set_NR, 0 },
-{&OFMT_node, "OFMT", Node_OFMT, "%.6g", 0, set_OFMT, 0 },
-{&OFS_node, "OFS", Node_OFS, " ", 0, set_OFS, 0 },
-{&ORS_node, "ORS", Node_ORS, "\n", 0, set_ORS, 0 },
-{NULL, "PROCINFO", Node_illegal, NULL, 0, NULL, NO_INSTALL | NON_STANDARD },
-{&RLENGTH_node, "RLENGTH", Node_var, NULL, 0, NULL, 0 },
-{&RS_node, "RS", Node_RS, "\n", 0, set_RS, 0 },
-{&RSTART_node, "RSTART", Node_var, NULL, 0, NULL, 0 },
-{&RT_node, "RT", Node_var, "", 0, NULL, NON_STANDARD },
-{&SUBSEP_node, "SUBSEP", Node_SUBSEP, "\034", 0, NULL, 0 },
-{&TEXTDOMAIN_node, "TEXTDOMAIN", Node_TEXTDOMAIN, "messages", 0, set_TEXTDOMAIN, NON_STANDARD },
-{0, NULL, Node_illegal, NULL, 0, NULL, 0 },
+{NULL, "ARGC", NULL, 0, NULL, NULL, FALSE, NO_INSTALL },
+{&ARGIND_node, "ARGIND", NULL, 0, NULL, NULL, FALSE, NON_STANDARD },
+{NULL, "ARGV", NULL, 0, NULL, NULL, FALSE, NO_INSTALL },
+{&BINMODE_node, "BINMODE", NULL, 0, NULL, set_BINMODE, FALSE, NON_STANDARD },
+{&CONVFMT_node, "CONVFMT", "%.6g", 0, NULL, set_CONVFMT,TRUE, 0 },
+{NULL, "ENVIRON", NULL, 0, NULL, NULL, FALSE, NO_INSTALL },
+{&ERRNO_node, "ERRNO", "", 0, NULL, NULL, FALSE, NON_STANDARD },
+{&FIELDWIDTHS_node, "FIELDWIDTHS", "", 0, NULL, set_FIELDWIDTHS, FALSE, NON_STANDARD },
+{&FILENAME_node, "FILENAME", "", 0, NULL, NULL, FALSE, 0 },
+{&FNR_node, "FNR", NULL, 0, update_FNR, set_FNR, TRUE, 0 },
+{&FS_node, "FS", " ", 0, NULL, set_FS, FALSE, 0 },
+{&FPAT_node, "FPAT", " ", 0, NULL, set_FPAT, FALSE, 0 },
+{&IGNORECASE_node, "IGNORECASE", NULL, 0, NULL, set_IGNORECASE, FALSE, NON_STANDARD },
+{&LINT_node, "LINT", NULL, 0, NULL, set_LINT, FALSE, NON_STANDARD },
+{&NF_node, "NF", NULL, -1, update_NF, set_NF, FALSE, 0 },
+{&NR_node, "NR", NULL, 0, update_NR, set_NR, TRUE, 0 },
+{&OFMT_node, "OFMT", "%.6g", 0, NULL, set_OFMT, TRUE, 0 },
+{&OFS_node, "OFS", " ", 0, NULL, set_OFS, TRUE, 0 },
+{&ORS_node, "ORS", "\n", 0, NULL, set_ORS, TRUE, 0 },
+{NULL, "PROCINFO", NULL, 0, NULL, NULL, FALSE, NO_INSTALL | NON_STANDARD },
+{&RLENGTH_node, "RLENGTH", NULL, 0, NULL, NULL, FALSE, 0 },
+{&RS_node, "RS", "\n", 0, NULL, set_RS, TRUE, 0 },
+{&RSTART_node, "RSTART", NULL, 0, NULL, NULL, FALSE, 0 },
+{&RT_node, "RT", "", 0, NULL, NULL, FALSE, NON_STANDARD },
+{&SUBSEP_node, "SUBSEP", "\034", 0, NULL, set_SUBSEP, TRUE, 0 },
+{&TEXTDOMAIN_node, "TEXTDOMAIN", "messages", 0, NULL, set_TEXTDOMAIN, TRUE, NON_STANDARD },
+{0, NULL, NULL, 0, NULL, NULL, FALSE, 0 },
};
/* init_vars --- actually initialize everything in the symbol table */
@@ -980,18 +981,19 @@ static const struct varinit varinit[] = {
static void
init_vars()
{
- register const struct varinit *vp;
+ const struct varinit *vp;
+ NODE *n;
for (vp = varinit; vp->name; vp++) {
if ((vp->flags & NO_INSTALL) != 0)
continue;
+ n = mk_symbol(Node_var, vp->strval == NULL ? make_number(vp->numval)
+ : make_string((char *) vp->strval, strlen(vp->strval)));
+ n->var_assign = (Func_ptr) vp->assign;
+ n->var_update = (Func_ptr) vp->update;
- *(vp->spec) = install((char *) vp->name,
- node(vp->strval == NULL ? make_number(vp->numval)
- : make_string((char *) vp->strval,
- strlen(vp->strval)),
- vp->type, (NODE *) NULL));
- if (vp->assign)
+ *(vp->spec) = install_symbol(estrdup(vp->name, strlen(vp->name)), n);
+ if (vp->do_assign)
(*(vp->assign))();
}
@@ -1006,18 +1008,17 @@ init_vars()
static NODE *
load_environ()
{
-#if ! defined(TANDEM)
-#if ! (defined(MSDOS) && !defined(DJGPP)) && ! defined(OS2) && ! (defined(VMS) && defined(__DECC))
+#if ! defined(OS2) && ! (defined(VMS) && defined(__DECC))
extern char **environ;
#endif
- register char *var, *val;
+ char *var, *val;
NODE **aptr;
- register int i;
-#endif /* TANDEM */
+ int i;
+ NODE *tmp;
+
+ ENVIRON_node = install_symbol(estrdup("ENVIRON", 7),
+ mk_symbol(Node_var_array, (NODE *) NULL));
- ENVIRON_node = install("ENVIRON",
- node((NODE *) NULL, Node_var_array, (NODE *) NULL));
-#if ! defined(TANDEM)
for (i = 0; environ[i] != NULL; i++) {
static char nullstr[] = "";
@@ -1027,8 +1028,10 @@ load_environ()
*val++ = '\0';
else
val = nullstr;
- aptr = assoc_lookup(ENVIRON_node, tmp_string(var, strlen(var)),
- FALSE);
+ tmp = make_string(var, strlen(var));
+ aptr = assoc_lookup(ENVIRON_node, tmp, FALSE);
+ unref(tmp);
+ unref(*aptr);
*aptr = make_string(val, strlen(val));
(*aptr)->flags |= MAYBE_NUM;
@@ -1040,7 +1043,8 @@ load_environ()
* Put AWKPATH into ENVIRON if it's not there.
* This allows querying it from within awk programs.
*/
- if (! in_array(ENVIRON_node, tmp_string("AWKPATH", 7))) {
+ tmp = make_string("AWKPATH", 7);
+ if (! in_array(ENVIRON_node, tmp)) {
/*
* On VMS, environ[] only holds a subset of what getenv() can
* find, so look AWKPATH up before resorting to default path.
@@ -1048,10 +1052,11 @@ load_environ()
val = getenv("AWKPATH");
if (val == NULL)
val = defpath;
- aptr = assoc_lookup(ENVIRON_node, tmp_string("AWKPATH", 7), FALSE);
+ aptr = assoc_lookup(ENVIRON_node, tmp, FALSE);
+ unref(*aptr);
*aptr = make_string(val, strlen(val));
}
-#endif /* TANDEM */
+ unref(tmp);
return ENVIRON_node;
}
@@ -1064,8 +1069,8 @@ load_procinfo()
char name[100];
AWKNUM value;
- PROCINFO_node = install("PROCINFO",
- node((NODE *) NULL, Node_var_array, (NODE *) NULL));
+ PROCINFO_node = install_symbol(estrdup("PROCINFO", 8),
+ mk_symbol(Node_var_array, (NODE *) NULL));
#ifdef GETPGRP_VOID
#define getpgrp_arg() /* nothing */
@@ -1076,6 +1081,7 @@ load_procinfo()
value = getpgrp(getpgrp_arg());
update_PROCINFO_num("pgrpid", value);
+
/*
* could put a lot of this into a table, but then there's
* portability problems declaring all the functions. so just
@@ -1118,6 +1124,7 @@ load_procinfo()
break;
}
+
#if defined (HAVE_GETGROUPS) && defined(NGROUPS_MAX) && NGROUPS_MAX > 0
for (i = 0; i < ngroups; i++) {
sprintf(name, "group%d", i + 1);
@@ -1125,7 +1132,7 @@ load_procinfo()
update_PROCINFO_num(name, value);
}
if (groupset) {
- free(groupset);
+ efree(groupset);
groupset = NULL;
}
#endif
@@ -1137,7 +1144,7 @@ load_procinfo()
int
is_std_var(const char *var)
{
- register const struct varinit *vp;
+ const struct varinit *vp;
for (vp = varinit; vp->name; vp++) {
if (strcmp(vp->name, var) == 0) {
@@ -1158,7 +1165,6 @@ arg_assign(char *arg, int initing)
{
char *cp, *cp2;
int badvar;
- Func_ptr after_assign = NULL;
NODE *var;
NODE *it;
NODE **lhs;
@@ -1215,12 +1221,26 @@ arg_assign(char *arg, int initing)
if (do_posix)
setlocale(LC_NUMERIC, "");
#endif /* LC_NUMERIC */
- var = variable(arg, FALSE, Node_var);
- lhs = get_lhs(var, &after_assign, FALSE);
+
+ /*
+ * since we are restoring the original text of ARGV later,
+ * need to copy the variable name part if we don't want
+ * name like v=abc instead of just v in var->vname
+ */
+
+ cp2 = estrdup(arg, cp - arg); /* var name */
+
+ var = variable(cp2, Node_var);
+ if (var == NULL) /* error */
+ exit(EXIT_FATAL);
+ if (var->type == Node_var && var->var_update)
+ var->var_update();
+ lhs = get_lhs(var, FALSE);
unref(*lhs);
*lhs = it;
- if (after_assign != NULL)
- (*after_assign)();
+ /* check for set_FOO() routine */
+ if (var->type == Node_var && var->var_assign)
+ var->var_assign();
}
if (! initing)
@@ -1321,7 +1341,7 @@ init_fds()
if (do_lint)
lintwarn(_("no pre-opened fd %d"), fd);
#endif
- newfd = devopen("/dev/null", opposite_mode[fd], NULL);
+ newfd = devopen("/dev/null", opposite_mode[fd]);
/* turn off some compiler warnings "set but not used" */
newfd += 0;
#ifdef MAKE_A_HEROIC_EFFORT
@@ -1362,6 +1382,18 @@ init_groupset()
#endif
}
+/* estrdup --- duplicate a string */
+
+char *
+estrdup(const char *str, size_t len)
+{
+ char *s;
+ emalloc(s, char *, len + 1, "estrdup");
+ memcpy(s, str, len);
+ s[len] = '\0';
+ return s;
+}
+
#if defined(HAVE_LOCALE_H)
/* init_locale --- initialize locale info. */
@@ -1393,3 +1425,28 @@ init_locale(struct lconv *l)
l->negative_sign = strdup(t->negative_sign);
}
#endif /* LOCALE_H */
+
+/* save_argv --- save argv array */
+
+void
+save_argv(int argc, char **argv)
+{
+ int i;
+ emalloc(d_argv, char **, (argc + 1) * sizeof(char *), "save_argv");
+ for (i = 0; i < argc; i++)
+ d_argv[i] = estrdup(argv[i], strlen(argv[i]));
+ d_argv[argc] = NULL;
+}
+
+/* update_global_values --- make sure the symbol table has correct values */
+
+void
+update_global_values()
+{
+ const struct varinit *vp;
+
+ for (vp = varinit; vp->name; vp++) {
+ if (vp->update != NULL)
+ vp->update();
+ }
+}
diff --git a/missing_d/ChangeLog b/missing_d/ChangeLog
index 4197afd9..6430217f 100644
--- a/missing_d/ChangeLog
+++ b/missing_d/ChangeLog
@@ -1,3 +1,8 @@
+Sun Jun 6 21:44:19 2010 Arnold D. Robbins <arnold@skeeve.com>
+
+ * getaddrinfo.h: Add undef for addrinfo, freeaddrinfo, and
+ getaddrinfo, just in case.
+
Thu May 6 20:55:14 2010 Arnold D. Robbins <arnold@skeeve.com>
* Release 3.1.8: Release tar file made.
diff --git a/missing_d/getaddrinfo.h b/missing_d/getaddrinfo.h
index 2d369213..3d816c93 100644
--- a/missing_d/getaddrinfo.h
+++ b/missing_d/getaddrinfo.h
@@ -5,6 +5,11 @@
#define AI_PASSIVE 1
#endif /* AI_PASSIVE */
+/* undef these, just in case, to avoid noisy warnings */
+#undef addrinfo
+#undef freeaddrinfo
+#undef getaddrinfo
+
#define addrinfo xaddrinfo
#define freeaddrinfo xfreeaddrinfo
#define getaddrinfo xgetaddrinfo
diff --git a/missing_d/setenv.c b/missing_d/setenv.c
new file mode 100644
index 00000000..2d1bf10c
--- /dev/null
+++ b/missing_d/setenv.c
@@ -0,0 +1,178 @@
+/* $NetBSD: setenv.c,v 1.1.1.1 2009/04/12 15:33:26 christos Exp $ */
+
+#if defined(LIBC_SCCS) && !defined(lint)
+static const char sccsid[] = "@(#)setenv.c 8.1 (Berkeley) 6/4/93";
+static const char rcsid[] = "Id: setenv.c,v 1.2 2005/04/27 04:56:11 sra Exp";
+#endif /* LIBC_SCCS and not lint */
+
+/*
+ * Copyright (c) 1987, 1993
+ * The Regents of the University of California. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgement:
+ * This product includes software developed by the University of
+ * California, Berkeley and its contributors.
+ * 4. Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+/* #include "port_before.h" */
+
+#include <stddef.h>
+#include <stdlib.h>
+#include <string.h>
+#include <errno.h>
+
+/* #include "port_after.h" */
+
+#define NEED_SETENV
+#if !defined(NEED_SETENV)
+int __bindcompat_setenv;
+#else
+
+/*
+ * Gawk changes:
+ * 1. Comment out "port_before.h" and "port_after.h" includes.
+ * 2. Define NEED_SETENV.
+ * 3. Add leading "int" to setenv() for C99 compilers. Which is worse,
+ * that it wasn't there in the first place, or that C99 now makes
+ * such functions void, breaking 40+ years of historical practice?
+ * 4. Change return type of unsetenv to "int" for standards
+ * conformance and check for name containing an "=" in
+ * which case it return an error. (See unsetenv(3), at least on Linux.)
+ */
+
+extern char **environ;
+
+static char *findenv(const char *name, int *offset);
+
+/*%
+ * setenv --
+ * Set the value of the environmental variable "name" to be
+ * "value". If rewrite is set, replace any current value.
+ */
+int
+setenv(const char *name, const char *value, int rewrite)
+{
+ extern char **environ;
+ static int alloced; /*%< if allocated space before */
+ char *c;
+ int l_value, offset;
+
+ if (*value == '=') /*%< no `=' in value */
+ ++value;
+ l_value = strlen(value);
+ if ((c = findenv(name, &offset))) { /*%< find if already exists */
+ if (!rewrite)
+ return (0);
+ if (strlen(c) >= l_value) { /*%< old larger; copy over */
+ while (*c++ = *value++);
+ return (0);
+ }
+ } else { /*%< create new slot */
+ int cnt;
+ char **p;
+
+ for (p = environ, cnt = 0; *p; ++p, ++cnt);
+ if (alloced) { /*%< just increase size */
+ environ = (char **)realloc((char *)environ,
+ (size_t)(sizeof(char *) * (cnt + 2)));
+ if (!environ)
+ return (-1);
+ }
+ else { /*%< get new space */
+ alloced = 1; /*%< copy old entries into it */
+ p = malloc((size_t)(sizeof(char *) * (cnt + 2)));
+ if (!p)
+ return (-1);
+ memcpy(p, environ, cnt * sizeof(char *));
+ environ = p;
+ }
+ environ[cnt + 1] = NULL;
+ offset = cnt;
+ }
+ for (c = (char *)name; *c && *c != '='; ++c); /*%< no `=' in name */
+ if (!(environ[offset] = /*%< name + `=' + value */
+ malloc((size_t)((int)(c - name) + l_value + 2))))
+ return (-1);
+ for (c = environ[offset]; (*c = *name++) && *c != '='; ++c);
+ for (*c++ = '='; *c++ = *value++;);
+ return (0);
+}
+
+/*%
+ * unsetenv(name) --
+ * Delete environmental variable "name".
+ */
+int
+unsetenv(const char *name)
+{
+ char **p;
+ int offset;
+
+ if (strchr(name, '=') != NULL) {
+ errno = EINVAL;
+ return -1;
+ }
+
+ while (findenv(name, &offset)) /*%< if set multiple times */
+ for (p = &environ[offset];; ++p)
+ if (!(*p = *(p + 1)))
+ break;
+
+ return 0;
+}
+
+/*%
+ * findenv --
+ * Returns pointer to value associated with name, if any, else NULL.
+ * Sets offset to be the offset of the name/value combination in the
+ * environmental array, for use by setenv(3) and unsetenv(3).
+ * Explicitly removes '=' in argument name.
+ *
+ * This routine *should* be a static; don't use it.
+ */
+static char *
+findenv(const char *name, int *offset)
+{
+ const char *np;
+ char **p, *c;
+ int len;
+
+ if (name == NULL || environ == NULL)
+ return (NULL);
+ for (np = name; *np && *np != '='; ++np)
+ continue;
+ len = np - name;
+ for (p = environ; (c = *p) != NULL; ++p)
+ if (strncmp(c, name, len) == 0 && c[len] == '=') {
+ *offset = p - environ;
+ return (c + len + 1);
+ }
+ return (NULL);
+}
+#endif
+
+/*! \file */
diff --git a/msg.c b/msg.c
index f8bb9654..a75396f5 100644
--- a/msg.c
+++ b/msg.c
@@ -1,9 +1,10 @@
/*
- * msg.c - routines for error messages
+ * msg.c - routines for error messages.
*/
/*
- * Copyright (C) 1986, 1988, 1989, 1991-2001, 2003 the Free Software Foundation, Inc.
+ * Copyright (C) 1986, 1988, 1989, 1991-2001, 2003, 2010
+ * the Free Software Foundation, Inc.
*
* This file is part of GAWK, the GNU implementation of the
* AWK Programming Language.
@@ -25,12 +26,15 @@
#include "awk.h"
+extern FILE *output_fp;
int sourceline = 0;
char *source = NULL;
-
static const char *srcfile = NULL;
static int srcline;
+jmp_buf fatal_tag;
+int fatal_tag_valid = FALSE;
+
/* err --- print an error message with source line and file and record */
/* VARARGS2 */
@@ -38,9 +42,13 @@ void
err(const char *s, const char *emsg, va_list argp)
{
char *file;
+ const char *me;
- (void) fflush(stdout);
- (void) fprintf(stderr, "%s: ", myname);
+ (void) fflush(output_fp);
+ me = myname;
+ if (STREQN(me, "dgawk", 5))
+ me = &myname[1];
+ (void) fprintf(stderr, "%s: ", me);
#ifdef GAWKDEBUG
if (srcfile != NULL) {
fprintf(stderr, "%s:%d:", srcfile, srcline);
@@ -70,29 +78,11 @@ err(const char *s, const char *emsg, va_list argp)
/* msg --- take a varargs error message and print it */
-/*
- * Function identifier purposely indented to avoid mangling
- * by ansi2knr. Sigh.
- */
-
void
-#ifdef CAN_USE_STDARG_H
- msg(const char *mesg, ...)
-#else
-/*VARARGS0*/
- msg(va_alist)
- va_dcl
-#endif
+msg(const char *mesg, ...)
{
va_list args;
-#ifdef CAN_USE_STDARG_H
va_start(args, mesg);
-#else
- char *mesg;
-
- va_start(args);
- mesg = va_arg(args, char *);
-#endif
err("", mesg, args);
va_end(args);
}
@@ -100,45 +90,19 @@ void
/* warning --- print a warning message */
void
-#ifdef CAN_USE_STDARG_H
- warning(const char *mesg, ...)
-#else
-/*VARARGS0*/
- warning(va_alist)
- va_dcl
-#endif
+warning(const char *mesg, ...)
{
va_list args;
-#ifdef CAN_USE_STDARG_H
va_start(args, mesg);
-#else
- char *mesg;
-
- va_start(args);
- mesg = va_arg(args, char *);
-#endif
err(_("warning: "), mesg, args);
va_end(args);
}
void
-#ifdef CAN_USE_STDARG_H
- error(const char *mesg, ...)
-#else
-/*VARARGS0*/
- error(va_alist)
- va_dcl
-#endif
+error(const char *mesg, ...)
{
va_list args;
-#ifdef CAN_USE_STDARG_H
va_start(args, mesg);
-#else
- char *mesg;
-
- va_start(args);
- mesg = va_arg(args, char *);
-#endif
err(_("error: "), mesg, args);
va_end(args);
}
@@ -155,30 +119,29 @@ set_loc(const char *file, int line)
file = srcfile; line = srcline;
}
-/* fatal --- print an error message and die */
+/* r_fatal --- print a fatal error message */
void
-#ifdef CAN_USE_STDARG_H
- r_fatal(const char *mesg, ...)
-#else
-/*VARARGS0*/
- r_fatal(va_alist)
- va_dcl
-#endif
+r_fatal(const char *mesg, ...)
{
va_list args;
-#ifdef CAN_USE_STDARG_H
va_start(args, mesg);
-#else
- char *mesg;
-
- va_start(args);
- mesg = va_arg(args, char *);
-#endif
err(_("fatal: "), mesg, args);
va_end(args);
#ifdef GAWKDEBUG
abort();
#endif
- exit(EXIT_FATAL);
+ gawk_exit(EXIT_FATAL);
+}
+
+/* gawk_exit --- longjmp out if necessary */
+
+void
+gawk_exit(int status)
+{
+ if (fatal_tag_valid) {
+ exit_val = status;
+ longjmp(fatal_tag, 1);
+ }
+ exit(status);
}
diff --git a/node.c b/node.c
index 4c824a80..d181bff9 100644
--- a/node.c
+++ b/node.c
@@ -3,7 +3,8 @@
*/
/*
- * Copyright (C) 1986, 1988, 1989, 1991-2001, 2003-2010 the Free Software Foundation, Inc.
+ * Copyright (C) 1986, 1988, 1989, 1991-2001, 2003-2010,
+ * the Free Software Foundation, Inc.
*
* This file is part of GAWK, the GNU implementation of the
* AWK Programming Language.
@@ -26,31 +27,23 @@
#include "awk.h"
#include "math.h"
-static int is_ieee_magic_val P((const char *val));
-static AWKNUM get_ieee_magic_val P((const char *val));
+static int is_ieee_magic_val(const char *val);
+static AWKNUM get_ieee_magic_val(const char *val);
-/* r_force_number --- force a value to be numeric */
+/* force_number --- force a value to be numeric */
AWKNUM
-r_force_number(register NODE *n)
+r_force_number(NODE *n)
{
- register char *cp;
- register char *cpend;
+ char *cp;
+ char *cpend;
char save;
char *ptr;
unsigned int newflags;
extern double strtod();
-#ifdef GAWKDEBUG
- if (n == NULL)
- cant_happen();
- if (n->type != Node_val)
- cant_happen();
- if (n->flags == 0)
- cant_happen();
if (n->flags & NUMCUR)
return n->numbr;
-#endif
/* all the conditionals are an attempt to avoid the expensive strtod */
@@ -59,8 +52,6 @@ r_force_number(register NODE *n)
n->numbr = 0.0;
if (n->stlen == 0) {
- if (0 && do_lint)
- lintwarn(_("can't convert string to float"));
return 0.0;
}
@@ -74,8 +65,6 @@ r_force_number(register NODE *n)
*/
if (! do_posix) {
if (isalpha(*cp)) {
- if (0 && do_lint)
- lintwarn(_("can't convert string to float"));
return 0.0;
} else if (n->stlen == 4 && is_ieee_magic_val(n->stptr)) {
if (n->flags & MAYBE_NUM)
@@ -95,14 +84,12 @@ r_force_number(register NODE *n)
while (cp < cpend && isspace(*cp))
cp++;
- /* FIXME: Simplify this condition! */
- if ( cp == cpend
- || (! do_posix
- && (isalpha(*cp)
+ if ( cp == cpend /* only spaces, or */
+ || (! do_posix /* not POSIXLY paranoid and */
+ && (isalpha(*cp) /* letter, or */
+ /* CANNOT do non-decimal and saw 0x */
|| (! do_non_decimal_data && cp[0] == '0'
&& (cp[1] == 'x' || cp[1] == 'X'))))) {
- if (0 && do_lint)
- lintwarn(_("can't convert string to float"));
return 0.0;
}
@@ -112,13 +99,12 @@ r_force_number(register NODE *n)
} else
newflags = 0;
- if (cpend - cp == 1) {
- if (isdigit(*cp)) {
+ if (cpend - cp == 1) { /* only one character */
+ if (isdigit(*cp)) { /* it's a digit! */
n->numbr = (AWKNUM)(*cp - '0');
n->flags |= newflags;
n->flags |= NUMCUR;
- } else if (0 && do_lint)
- lintwarn(_("can't convert string to float"));
+ }
return n->numbr;
}
@@ -142,13 +128,10 @@ r_force_number(register NODE *n)
ptr++;
*cpend = save;
finish:
- /* the >= should be ==, but for SunOS 3.5 strtod() */
- if (errno == 0 && ptr >= cpend) {
+ if (errno == 0 && ptr == cpend) {
n->flags |= newflags;
n->flags |= NUMCUR;
} else {
- if (0 && do_lint && ptr < cpend)
- lintwarn(_("can't convert string to float"));
errno = 0;
}
@@ -157,9 +140,9 @@ finish:
/*
- * the following lookup table is used as an optimization in force_string
+ * The following lookup table is used as an optimization in force_string;
* (more complicated) variations on this theme didn't seem to pay off, but
- * systematic testing might be in order at some point
+ * systematic testing might be in order at some point.
*/
static const char *values[] = {
"0",
@@ -178,10 +161,10 @@ static const char *values[] = {
/* format_val --- format a numeric value based on format */
NODE *
-format_val(const char *format, int index, register NODE *s)
+format_val(const char *format, int index, NODE *s)
{
char buf[BUFSIZ];
- register char *sp = buf;
+ char *sp = buf;
double val;
char *orig, *trans, save;
@@ -193,7 +176,7 @@ format_val(const char *format, int index, register NODE *s)
trans = dgettext(TEXTDOMAIN, orig);
s->stptr[s->stlen] = save;
- return tmp_string(trans, strlen(trans));
+ return make_string(trans, strlen(trans));
}
/*
@@ -226,38 +209,37 @@ format_val(const char *format, int index, register NODE *s)
* and just always format the value ourselves.
*/
- NODE *dummy, *r;
+ NODE *dummy[2], *r;
unsigned short oflags;
extern NODE **fmt_list; /* declared in eval.c */
/* create dummy node for a sole use of format_tree */
- getnode(dummy);
- dummy->type = Node_expression_list;
- dummy->lnode = s;
- dummy->rnode = NULL;
+ dummy[1] = s;
oflags = s->flags;
- s->flags |= PERM; /* prevent from freeing by format_tree() */
if (val == s->numbr) {
/* integral value, but outside range of %ld, use %.0f */
r = format_tree("%.0f", 4, dummy, 2);
s->stfmt = -1;
} else {
r = format_tree(format, fmt_list[index]->stlen, dummy, 2);
+ assert(r != NULL);
s->stfmt = (char) index;
}
s->flags = oflags;
s->stlen = r->stlen;
if ((s->flags & STRCUR) != 0)
- free(s->stptr);
+ efree(s->stptr);
s->stptr = r->stptr;
- freenode(r); /* Do not free_temp(r)! We want */
- freenode(dummy); /* to keep s->stptr == r->stpr. */
+ freenode(r); /* Do not unref(r)! We want to keep s->stptr == r->stpr. */
goto no_malloc;
} else {
- /* integral value */
- /* force conversion to long only once */
- register long num = (long) val;
+ /*
+ * integral value
+ * force conversion to long only once
+ */
+ long num = (long) val;
+
if (num < NVAL && num >= 0) {
sp = (char *) values[num];
s->stlen = 1;
@@ -267,74 +249,50 @@ format_val(const char *format, int index, register NODE *s)
}
s->stfmt = -1;
}
+ if (s->stptr != NULL)
+ efree(s->stptr);
emalloc(s->stptr, char *, s->stlen + 2, "format_val");
memcpy(s->stptr, sp, s->stlen+1);
no_malloc:
- s->stref = 1;
s->flags |= STRCUR;
free_wstr(s);
return s;
}
-/* r_force_string --- force a value to be a string */
+/* force_string --- force a value to be a string */
NODE *
-r_force_string(register NODE *s)
+r_force_string(NODE *s)
{
- NODE *ret;
-#ifdef GAWKDEBUG
- if (s == NULL)
- cant_happen();
- if (s->type != Node_val)
- cant_happen();
- if (s->stref <= 0)
- cant_happen();
if ((s->flags & STRCUR) != 0
- && (s->stfmt == -1 || s->stfmt == CONVFMTidx))
+ && (s->stfmt == -1 || s->stfmt == CONVFMTidx)
+ )
return s;
-#endif
-
- ret = format_val(CONVFMT, CONVFMTidx, s);
- return ret;
+ return format_val(CONVFMT, CONVFMTidx, s);
}
-/*
- * dupnode:
- * Duplicate a node. (For strings, "duplicate" means crank up the
- * reference count.)
- */
+/* dupnode --- duplicate a node */
NODE *
-r_dupnode(NODE *n)
+dupnode(NODE *n)
{
- register NODE *r;
+ NODE *r;
+
+ assert(n->type == Node_val);
-#ifndef DUPNODE_MACRO
- if ((n->flags & TEMP) != 0) {
- n->flags &= ~TEMP;
- n->flags |= MALLOC;
- return n;
- }
if ((n->flags & PERM) != 0)
return n;
-#endif
- if ((n->flags & (MALLOC|STRCUR)) == (MALLOC|STRCUR)) {
- if (n->stref < LONG_MAX)
- n->stref++;
- else
- n->flags |= PERM;
- return n;
- } else if ((n->flags & MALLOC) != 0 && n->type == Node_ahash) {
- if (n->ahname_ref < LONG_MAX)
- n->ahname_ref++;
- else
- n->flags |= PERM;
+
+ if ((n->flags & MALLOC) != 0) {
+ n->valref++;
return n;
}
+
getnode(r);
*r = *n;
- r->flags &= ~(PERM|TEMP|FIELD);
+ r->flags &= ~FIELD;
r->flags |= MALLOC;
+ r->valref = 1;
#ifdef MBS_SUPPORT
/*
* DON'T call free_wstr(r) here!
@@ -344,74 +302,52 @@ r_dupnode(NODE *n)
r->wstptr = NULL;
r->wstlen = 0;
#endif /* defined MBS_SUPPORT */
- if (n->type == Node_val && (n->flags & STRCUR) != 0) {
- r->stref = 1;
- emalloc(r->stptr, char *, r->stlen + 2, "dupnode");
- memcpy(r->stptr, n->stptr, r->stlen);
- r->stptr[r->stlen] = '\0';
+
+ if ((n->flags & STRCUR) != 0) {
+ emalloc(r->stptr, char *, n->stlen + 2, "dupnode");
+ memcpy(r->stptr, n->stptr, n->stlen);
+ r->stptr[n->stlen] = '\0';
#if defined MBS_SUPPORT
if ((n->flags & WSTRCUR) != 0) {
r->wstlen = n->wstlen;
- emalloc(r->wstptr, wchar_t *, sizeof(wchar_t) * (r->wstlen + 2), "dupnode");
- memcpy(r->wstptr, n->wstptr, r->wstlen * sizeof(wchar_t));
- r->wstptr[r->wstlen] = L'\0';
+ emalloc(r->wstptr, wchar_t *, sizeof(wchar_t) * (n->wstlen + 2), "dupnode");
+ memcpy(r->wstptr, n->wstptr, n->wstlen * sizeof(wchar_t));
+ r->wstptr[n->wstlen] = L'\0';
r->flags |= WSTRCUR;
}
#endif /* defined MBS_SUPPORT */
- } else if (n->type == Node_ahash && (n->flags & MALLOC) != 0) {
- r->ahname_ref = 1;
- emalloc(r->ahname_str, char *, r->ahname_len + 2, "dupnode");
- memcpy(r->ahname_str, n->ahname_str, r->ahname_len);
- r->ahname_str[r->ahname_len] = '\0';
}
+
return r;
}
-/* copy_node --- force a brand new copy of a node to be allocated */
-
-NODE *
-copynode(NODE *old)
-{
- NODE *new;
- int saveflags;
-
- assert(old != NULL);
- saveflags = old->flags;
- old->flags &= ~(MALLOC|PERM);
- new = dupnode(old);
- old->flags = saveflags;
- return new;
-}
-
/* mk_number --- allocate a node with defined number */
NODE *
mk_number(AWKNUM x, unsigned int flags)
{
- register NODE *r;
+ NODE *r;
getnode(r);
r->type = Node_val;
r->numbr = x;
+ r->valref = 1;
r->flags = flags;
-#ifdef GAWKDEBUG
- r->stref = 1;
r->stptr = NULL;
r->stlen = 0;
free_wstr(r);
-#endif /* GAWKDEBUG */
return r;
}
/* make_str_node --- make a string node */
NODE *
-make_str_node(char *s, unsigned long len, int flags)
+r_make_str_node(char *s, unsigned long len, int flags)
{
- register NODE *r;
-
+ NODE *r;
getnode(r);
r->type = Node_val;
+ r->numbr = 0;
r->flags = (STRING|STRCUR|MALLOC);
#ifdef MBS_SUPPORT
r->wstptr = NULL;
@@ -421,16 +357,16 @@ make_str_node(char *s, unsigned long len, int flags)
if (flags & ALREADY_MALLOCED)
r->stptr = s;
else {
- emalloc(r->stptr, char *, len + 2, s);
+ emalloc(r->stptr, char *, len + 2, "make_str_node");
memcpy(r->stptr, s, len);
}
r->stptr[len] = '\0';
-
+
if ((flags & SCAN) != 0) { /* scan for escape sequences */
const char *pf;
- register char *ptm;
- register int c;
- register const char *end;
+ char *ptm;
+ int c;
+ const char *end;
#ifdef MBS_SUPPORT
mbstate_t cur_state;
@@ -472,27 +408,16 @@ make_str_node(char *s, unsigned long len, int flags)
len = ptm - r->stptr;
erealloc(r->stptr, char *, len + 1, "make_str_node");
r->stptr[len] = '\0';
+ r->flags &= ~MALLOC;
r->flags |= PERM;
}
r->stlen = len;
- r->stref = 1;
+ r->valref = 1;
r->stfmt = -1;
return r;
}
-/* tmp_string --- allocate a temporary string */
-
-NODE *
-tmp_string(char *s, size_t len)
-{
- register NODE *r;
-
- r = make_string(s, len);
- r->flags |= TEMP;
- return r;
-}
-
/* more_nodes --- allocate more nodes */
#define NODECHUNK 100
@@ -502,7 +427,7 @@ NODE *nextfree = NULL;
NODE *
more_nodes()
{
- register NODE *np;
+ NODE *np;
/* get more nodes and initialize list */
emalloc(nextfree, NODE *, NODECHUNK * sizeof(NODE), "more_nodes");
@@ -517,62 +442,29 @@ more_nodes()
return np;
}
-#ifdef MEMDEBUG
-#undef freenode
-/* freenode --- release a node back to the pool */
-
-void
-freenode(NODE *it)
-{
-#ifdef MPROF
- it->stref = 0;
- free((char *) it);
-#else /* not MPROF */
-#ifndef NO_PROFILING
- it->exec_count = 0;
-#endif
- /* add it to head of freelist */
- it->nextp = nextfree;
- nextfree = it;
-#endif /* not MPROF */
-}
-#endif /* GAWKDEBUG */
-
/* unref --- remove reference to a particular node */
void
-unref(register NODE *tmp)
+unref(NODE *tmp)
{
if (tmp == NULL)
return;
if ((tmp->flags & PERM) != 0)
return;
- tmp->flags &= ~TEMP;
+
if ((tmp->flags & MALLOC) != 0) {
- if (tmp->type == Node_ahash) {
- if (tmp->ahname_ref > 1) {
- tmp->ahname_ref--;
- return;
- }
- free(tmp->ahname_str);
- } else if ((tmp->flags & STRCUR) != 0) {
- if (tmp->stref > 1) {
- tmp->stref--;
- return;
- }
- free(tmp->stptr);
- free_wstr(tmp);
- }
- freenode(tmp);
- return;
- }
- if ((tmp->flags & FIELD) != 0) {
- free_wstr(tmp);
- freenode(tmp);
- return;
+ if (tmp->valref > 1) {
+ tmp->valref--;
+ return;
+ }
+ if (tmp->flags & STRCUR)
+ efree(tmp->stptr);
}
+ free_wstr(tmp);
+ freenode(tmp);
}
+
/*
* parse_escape:
*
@@ -589,20 +481,21 @@ unref(register NODE *tmp)
* If \ is followed by 000, we return 0 and leave the string pointer after the
* zeros. A value of 0 does not mean end of string.
*
- * Posix doesn't allow \x.
+ * POSIX doesn't allow \x.
*/
int
parse_escape(const char **string_ptr)
{
- register int c = *(*string_ptr)++;
- register int i;
- register int count;
+ int c = *(*string_ptr)++;
+ int i;
+ int count;
int j;
const char *start;
if (do_lint_old) {
switch (c) {
+ case 'a':
case 'b':
case 'f':
case 'r':
@@ -613,7 +506,7 @@ parse_escape(const char **string_ptr)
switch (c) {
case 'a':
- return BELL;
+ return '\a';
case 'b':
return '\b';
case 'f':
@@ -755,9 +648,19 @@ str2wstr(NODE *n, size_t **ptr)
char *sp;
mbstate_t mbs;
wchar_t wc, *wsp;
+ static short warned = FALSE;
assert((n->flags & (STRING|STRCUR)) != 0);
+ /*
+ * Don't convert global null string or global null field
+ * variables to a wide string. They are both zero-length anyway.
+ * This also avoids future double-free errors while releasing
+ * shallow copies, eg. *tmp = *Null_field; free_wstr(tmp);
+ */
+ if (n == Nnull_string || n == Null_field)
+ return n;
+
if ((n->flags & WSTRCUR) != 0) {
if (ptr == NULL)
return n;
@@ -771,11 +674,11 @@ str2wstr(NODE *n, size_t **ptr)
* code trades space for time. We allocate
* an array of wchar_t that is n->stlen long.
* This is needed in the worst case anyway, where
- * each input bytes maps to one wchar_t. The
+ * each input byte maps to one wchar_t. The
* advantage is that we only have to convert the string
* once, instead of twice, once to find out how many
- * wide characters, and then again to actually fill
- * the info in. If there's a lot left over, we can
+ * wide characters, and then again to actually fill in
+ * the info. If there's a lot left over, we can
* realloc the wide string down in size.
*/
@@ -799,11 +702,41 @@ str2wstr(NODE *n, size_t **ptr)
src_count = n->stlen;
memset(& mbs, 0, sizeof(mbs));
for (i = 0; src_count > 0; i++) {
- count = mbrtowc(& wc, sp, src_count, & mbs);
+ /*
+ * 9/2010: Check the current byte; if it's a valid character,
+ * then it doesn't start a multibyte sequence. This brings a
+ * big speed up. Thanks to Ulrich Drepper for the tip.
+ */
+ if ( isprint(*sp)
+ || isgraph(*sp)
+ || iscntrl(*sp)
+ || *sp == '\0' ) {
+ count = 1;
+ wc = *sp;
+ } else
+ count = mbrtowc(& wc, sp, src_count, & mbs);
switch (count) {
case (size_t) -2:
case (size_t) -1:
- goto done;
+ /*
+ * Just skip the bad byte and keep going, so that
+ * we get a more-or-less full string, instead of
+ * stopping early. This is particularly important
+ * for match() where we need to build the indices.
+ */
+ sp++;
+ src_count--;
+ /*
+ * mbrtowc(3) says the state of mbs becomes undefined
+ * after a bad character, so reset it.
+ */
+ memset(& mbs, 0, sizeof(mbs));
+ /* And warn the user something's wrong */
+ if (do_lint && ! warned) {
+ warned = TRUE;
+ lintwarn(_("Invalid multibyte data detected. There may be a mismatch between your data and your locale."));
+ }
+ break;
case 0:
count = 1;
@@ -820,9 +753,8 @@ str2wstr(NODE *n, size_t **ptr)
}
}
-done:
*wsp = L'\0';
- n->wstlen = i;
+ n->wstlen = wsp - n->wstptr;
n->flags |= WSTRCUR;
#define ARBITRARY_AMOUNT_TO_GIVE_BACK 100
if (n->stlen - n->wstlen > ARBITRARY_AMOUNT_TO_GIVE_BACK)
@@ -840,7 +772,7 @@ free_wstr(NODE *n)
if ((n->flags & WSTRCUR) != 0) {
assert(n->wstptr != NULL);
- free(n->wstptr);
+ efree(n->wstptr);
}
n->wstptr = NULL;
n->wstlen = 0;
diff --git a/pc/ChangeLog b/pc/ChangeLog
index aef10213..7a9f9553 100644
--- a/pc/ChangeLog
+++ b/pc/ChangeLog
@@ -1,3 +1,18 @@
+Fri Nov 12 12:36:18 2010 Scott Deifik <scottd.mail@sbcglobal.net>
+
+ * Makefile.tst: Sync with mainline version.
+
+Thu Oct 28 08:17:00 2010 Scott Deifik <scottd.mail@sbcglobal.net>
+
+ * Makefile.tst: Sync with mainline version.
+
+Wed Jul 14 23:05:57 2010 Eli Zaretskii <eliz@gnu.org>
+
+ * config.h (HAVE_USLEEP) [__MINGW32__]: Define.
+
+ * gawkmisc.pc (usleep) [__MINGW32__]: Implementation of `usleep'
+ for MinGW.
+
Thu May 6 20:55:14 2010 Arnold D. Robbins <arnold@skeeve.com>
* Release 3.1.8: Release tar file made.
diff --git a/pc/Makefile b/pc/Makefile
index 585e66ab..33afe284 100644
--- a/pc/Makefile
+++ b/pc/Makefile
@@ -38,6 +38,7 @@ default:
#======================= Configuration ==================================
RSPFILE = gawk.rsp
PRSPFILE = pgawk.rsp
+DRSPFILE = dgawk.rsp
#
# Choose method for passing arguments to the linker.
#
@@ -56,8 +57,10 @@ PRSPFILE = pgawk.rsp
# else use brain-dead approach (emxbnd will need 'tr').
RSP = $(RSPFILE)
PRSP = $(PRSPFILE)
+DRSP = $(DRSPFILE)
LDRSP = @$(RSP)
PLDRSP = @$(PRSP)
+DLDRSP = @$(DRSP)
LNKRSP = $(LDRSP)
#------------------------------------------------------------------------
# Some makes do not define MAKE (and ndmake does not allow a define).
@@ -90,6 +93,8 @@ DO_LNK = $($(LNK))
DO_BIND= $($(BIND))
DO_PLNK = $($(PLNK))
DO_PBIND= $($(PBIND))
+DO_DLNK = $($(DLNK))
+DO_DBIND= $($(DBIND))
#------------------------------------------------------------------------
# For dynamic extension support, uncomment these lines
# pick the appropriate .def file entry for your compiler
@@ -113,19 +118,20 @@ pkgdatadir = $(prefix)/share/awk
endif
LDJG = $(CC) $(LF) -o gawk.exe $(LDRSP) $(LF2)
PLDJG = $(CC) $(LF) -o pgawk.exe $(PLDRSP) $(LF2)
+DLDJG = $(CC) $(LF) -o dgawk.exe $(DLDRSP) $(LF2)
BDJG = stubify -g awk.exe | stubedit awk.exe runfile=gawk
djgpp:
$(MAK) all \
CC=gcc O=.o CF=-O2 \
- LNK=LDJG PLNK=PLDJG LF=-s LF2=-lm \
- BIND=BDJG PBIND=''
+ LNK=LDJG PLNK=PLDJG DLNK=DLDJG LF=-s LF2=-lm \
+ BIND=BDJG PBIND='' DBIND=''
djgpp-debug:
$(MAK) all \
CC=gcc O=.o CF='-O2 -g' \
- LNK=LDJG PLNK=PLDJG LF2=-lm \
- BIND=BDJG PBIND=''
+ LNK=LDJG PLNK=PLDJG DLNK=DLDJG LF2=-lm \
+ BIND=BDJG PBIND='' DBIND=''
LDJGv1 = $(CC) $(LF) -o gawk $(LDRSP) $(LF2)
#BDJGv1 = coff2exe -s /djgpp/bin/go32.exe gawk
@@ -322,6 +328,8 @@ AWKOBJS1 = array$O builtin$O eval$O field$O floatcomp$O gawkmisc$O io$O main$O
AWKOBJS2 = ext$O msg$O node$O profile$O re$O replace$O version$O $(DYN_OBJ)
PAWKOBJS1 = array$O builtin$O eval_p$O field$O floatcomp$O gawkmisc$O io$O main$O
PAWKOBJS2 = ext$O msg$O node$O profile_p$O re$O replace$O version$O $(DYN_OBJ)
+DAWKOBJS1 = array$O builtin$O debug$O eval_d$O field$O floatcomp$O gawkmisc$O io$O main$O
+DAWKOBJS2 = ext$O msg$O node$O profile$O re$O replace$O version$O command$O $(DYN_OBJ)
AWKOBJS = $(AWKOBJS1) $(AWKOBJS2)
ALLOBJS = $(AWKOBJS) awkgram$O getid$O $(OBJ)
@@ -332,6 +340,7 @@ LIBOBJS= getopt$O getopt1$O dfa$O regex$O random$O
GAWKOBJS = $(ALLOBJS) $(LIBOBJS)
PGAWKOBJS = $(PAWKOBJS1) $(PAWKOBJS2) $(LIBOBJS) awkgram$O getid$O $(OBJ)
+DGAWKOBJS = $(DAWKOBJS1) $(DAWKOBJS2) $(LIBOBJS) awkgram$O getid$O $(OBJ)
# clear out suffixes list
# .SUFFIXES:
@@ -341,7 +350,7 @@ PGAWKOBJS = $(PAWKOBJS1) $(PAWKOBJS2) $(LIBOBJS) awkgram$O getid$O $(OBJ)
$(CC) -c $(CFLAGS) $<
# rules to build gawk
-all : gawk.exe pgawk.exe
+all : gawk.exe pgawk.exe dgawk.exe
gawk.exe:: $(GAWKOBJS) $(RSP)
$(DO_LNK)
@@ -351,6 +360,10 @@ pgawk.exe:: $(PGAWKOBJS) $(PRSP)
$(DO_PLNK)
$(DO_PBIND)
+dgawk.exe:: $(DGAWKOBJS) $(DRSP)
+ $(DO_DLNK)
+ $(DO_DBIND)
+
$(RSPFILE) : $(GAWKOBJS)
echo $(AWKOBJS1)$P > $@
echo $(AWKOBJS2)$P >> $@
@@ -361,6 +374,11 @@ $(PRSPFILE) : $(PGAWKOBJS)
echo $(PAWKOBJS2)$P >> $@
echo awkgram$O getid$O $(OBJ) $(LIBOBJS)$P >> $@
+$(DRSPFILE) : $(DGAWKOBJS)
+ echo $(DAWKOBJS1)$P > $@
+ echo $(DAWKOBJS2)$P >> $@
+ echo awkgram$O getid$O $(OBJ) $(LIBOBJS)$P >> $@
+
$(ALLOBJS) eval_p$O profile_p$O: awk.h regex.h config.h
gawkmisc$O: pc/gawkmisc.pc
@@ -407,7 +425,7 @@ install2:
gawk -v prefix=$(prefix) -f install.awk
clean:
- rm -rf gawk pgawk *.exe gawk.map *.o *.obj core a.out $(RSPFILE) $(PRSPFILE) $(DYN_EXP)
+ rm -rf gawk pgawk dgawk *.exe gawk.map *.o *.obj core a.out $(RSPFILE) $(PRSPFILE) $(DRSPFILE) $(DYN_EXP)
# cd doc && $(MAKE) clean
# cd test && $(MAKE) clean
# cd awklib && $(MAKE) clean
diff --git a/pc/Makefile.tst b/pc/Makefile.tst
index 1f91dc59..3cc076d0 100644
--- a/pc/Makefile.tst
+++ b/pc/Makefile.tst
@@ -115,48 +115,51 @@ srcdir = .
CLEANFILES = core core.* fmtspcl.ok
# try to keep these sorted
-BASIC_TESTS = \
- addcomma anchgsub argarray arrayparm arrayprm2 arrayprm3 arrayref \
- arrymem1 arryref2 arryref3 arryref4 arryref5 arynasty arynocls \
- aryprm1 aryprm2 aryprm3 aryprm4 aryprm5 aryprm6 aryprm7 aryprm8 \
- arysubnm asgext awkpath back89 backgsub childin clobber closebad \
- clsflnam compare compare2 concat1 concat2 concat3 concat4 convfmt \
- datanonl defref delarpm2 delarprm delfunc dynlj eofsplit exitval1 \
- exitval2 fcall_exit fcall_exit2 fldchg fldchgnf fnamedat fnarray \
- fnarray2 fnaryscl fnasgnm \
- fnmisc fordel forref forsimp fsbs fsrs fsspcoln fstabplus funsemnl funsmnam \
- funstack getline getline2 getline3 getlnbuf getnr2tb getnr2tm \
- gsubasgn gsubtest gsubtst2 gsubtst3 gsubtst4 gsubtst5 gsubtst6 \
- hex hsprint inputred intest intprec iobug1 leaddig leadnl litoct \
- longsub longwrds manglprm math membug1 messages minusstr mmap8k \
- mtchi18n nasty nasty2 negexp nested nfldstr nfneg nfset nlfldsep \
- nlinstr nlstrina noeffect nofile nofmtch noloop1 noloop2 nonl noparms \
- nors nulrsend numindex numsubstr octsub ofmt ofmtbig ofmtfidl ofmts \
- onlynl opasnidx opasnslf paramdup paramres paramtyp parse1 parsefld \
- parseme pcntplus prdupval prec printf0 printf1 prmarscl prmreuse \
- prt1eval prtoeval psx96sub rand rebt8b1 redfilnm regeq reindops \
- reparse resplit rs rsnul1nl rsnulbig rsnulbig2 rstest1 rstest2 \
- rstest3 rstest4 rstest5 rswhite scalar sclforin sclifin sortempty \
- splitargv splitarr splitdef splitvar splitwht strcat1 strnum1 \
- strtod subamp subi18n subsepnm subslash substr swaplns synerr1 \
- synerr2 tradanch tweakfld uninit2 uninit3 uninit4 uninit5 uninitialized \
- unterm uparrfs wideidx wideidx2 widesub widesub2 widesub3 \
- widesub4 wjposer1 zero2 zeroe0 zeroflag
+BASIC_TESTS = addcomma anchgsub argarray arrayparm arrayprm2 arrayprm3 \
+ arrayref arrymem1 arryref2 arryref3 arryref4 arryref5 arynasty \
+ arynocls aryprm1 aryprm2 aryprm3 aryprm4 aryprm5 aryprm6 aryprm7 \
+ aryprm8 arysubnm asgext awkpath back89 backgsub childin clobber \
+ closebad clsflnam compare compare2 concat1 concat2 concat3 concat4 \
+ convfmt datanonl defref delarpm2 delarprm delfunc dynlj eofsplit \
+ exitval1 exitval2 fcall_exit fcall_exit2 fldchg fldchgnf fnamedat \
+ fnarray fnarray2 fnaryscl fnasgnm fnmisc fordel forref forsimp \
+ fsbs fsrs fsspcoln fstabplus funsemnl funsmnam funstack getline \
+ getline2 getline3 getlnbuf getnr2tb getnr2tm gsubasgn gsubtest gsubtst2 \
+ gsubtst3 gsubtst4 gsubtst5 gsubtst6 hex hsprint inputred intest intprec iobug1 \
+ leaddig leadnl litoct longsub longwrds manglprm math membug1 messages \
+ minusstr mmap8k mtchi18n nasty nasty2 negexp nested nfldstr nfneg \
+ nfset nlfldsep nlinstr nlstrina noeffect nofile nofmtch noloop1 \
+ noloop2 nonl noparms nors nulrsend numindex numsubstr octsub ofmt \
+ ofmtbig ofmtfidl ofmts onlynl opasnidx opasnslf paramdup paramres \
+ paramtyp parse1 parsefld parseme pcntplus prdupval prec printf0 \
+ printf1 prmarscl prmreuse prt1eval prtoeval psx96sub rand range1 \
+ rebt8b1 \
+ redfilnm regeq reindops reparse resplit rs rsnul1nl rsnulbig rsnulbig2 \
+ rstest1 rstest2 rstest3 rstest4 rstest5 rswhite scalar sclforin sclifin \
+ sortempty splitargv splitarr splitdef splitvar splitwht strcat1 strnum1 \
+ strtod subamp subi18n subsepnm subslash substr swaplns synerr1 synerr2 \
+ tradanch tweakfld uninit2 uninit3 uninit4 uninit5 uninitialized unterm \
+ uparrfs wideidx wideidx2 widesub widesub2 widesub3 widesub4 wjposer1 \
+ zero2 zeroe0 zeroflag
UNIX_TESTS = fflush getlnhd localenl pid pipeio1 pipeio2 poundbang space strftlng
GAWK_EXT_TESTS = \
- argtest backw badargs binmode1 clos1way devfd devfd1 devfd2 fieldwdth \
- fsfwfs funlen fwtest fwtest2 gensub gensub2 getlndir gnuops2 gnuops3 \
- gnureops icasefs icasers igncdym igncfs ignrcas2 ignrcase lint lintold \
- manyfiles match1 match2 match3 mbprintf3 mbstr1 nondec nondec2 posix \
- printfbad1 printfbad2 procinfs rebuf regx8bit reint reint2 rsstart1 \
- rsstart2 rsstart3 rstest6 shadow strftime strtonum
+ aadelete1 aadelete2 aarray1 aasort aasorti \
+ argtest backw badargs beginfile1 binmode1 clos1way \
+ devfd devfd1 devfd2 \
+ fieldwdth fpat1 funlen fsfwfs fwtest fwtest2 gensub gensub2 getlndir \
+ gnuops2 gnuops3 gnureops \
+ icasefs icasers igncdym igncfs ignrcas2 ignrcase indirectcall lint \
+ lintold manyfiles match1 match2 match3 mbstr1 nondec nondec2 patsplit \
+ posix printfbad1 printfbad2 \
+ procinfs rebuf regx8bit reint reint2 rsstart1 rsstart2 rsstart3 \
+ rstest6 shadow splitarg4 strftime strtonum switch2
EXTRA_TESTS = regtest inftest
INET_TESTS = inetechu inetecht inetdayu inetdayt
MACHINE_TESTS = double1 double2 fmtspcl intformat
LOCALE_CHARSET_TESTS = asort asorti fmttest fnarydel fnparydl lc_num1 mbfw1 \
- mbprintf1 mbprintf2 rebt8b2 sort1 sprintfc whiny
+ mbprintf1 mbprintf2 mbprintf3 rebt8b2 sort1 sprintfc whiny
# List of the tests which should be run with --lint option:
@@ -165,8 +168,11 @@ NEED_LINT = defref fmtspcl noeffect nofmtch shadow uninit2 uninit3 uninit4 unini
# List of the tests which should be run with --lint-old option:
NEED_LINT_OLD = lintold
+# List of the tests which fail with EXIT CODE 1
+FAIL_CODE1 = fnarray2 fnmisc gsubasgn mixed1 noparms paramdup synerr1 synerr2 unterm
+
# List of the files that appear in manual tests or are for reserve testing:
-GENTESTS_UNUSED = Makefile.in gtlnbufv.awk printfloat.awk switch2.awk
+GENTESTS_UNUSED = Makefile.in gtlnbufv.awk printfloat.awk
# Message stuff is to make it a little easier to follow.
# Make the pass-fail last and dependent on others to avoid
@@ -694,6 +700,12 @@ printfbad2: printfbad2.ok
@echo $@
@$(AWK) --lint -f $(srcdir)/$@.awk $(srcdir)/$@.in 2>&1 | sed 's;\$(srcdir)/;;g' >_$@ || echo EXIT CODE: $$? >>_$@
@-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@
+
+beginfile1::
+ @echo $@
+ @echo Expect beginfile1 to fail with DJGPP.
+ @AWKPATH=$(srcdir) $(AWK) -f $@.awk $(srcdir)/$@.awk . ./no/such/file $(srcdir)/Makefile >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
+ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@
Gt-dummy:
# file Maketests, generated from Makefile.am by the Gentests program
addcomma:
@@ -1312,6 +1324,11 @@ rand:
@AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
@-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@
+range1:
+ @echo range1
+ @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
+ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@
+
rebt8b1:
@echo rebt8b1
@AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
@@ -1529,6 +1546,31 @@ getlnhd:
@AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
@-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@
+aadelete1:
+ @echo aadelete1
+ @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
+ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@
+
+aadelete2:
+ @echo aadelete2
+ @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
+ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@
+
+aarray1:
+ @echo aarray1
+ @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
+ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@
+
+aasort:
+ @echo aasort
+ @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
+ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@
+
+aasorti:
+ @echo aasorti
+ @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
+ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@
+
backw:
@echo backw
@AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
@@ -1545,8 +1587,8 @@ fieldwdth:
@AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
@-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@
-fsfwfs:
- @echo fsfwfs
+fpat1:
+ @echo fpat1
@AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
@-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@
@@ -1555,6 +1597,11 @@ funlen:
@AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
@-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@
+fsfwfs:
+ @echo fsfwfs
+ @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
+ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@
+
fwtest:
@echo fwtest
@AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
@@ -1621,6 +1668,11 @@ ignrcase:
@AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
@-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@
+indirectcall:
+ @echo indirectcall
+ @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
+ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@
+
lint:
@echo lint
@AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
@@ -1651,6 +1703,11 @@ nondec:
@AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
@-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@
+patsplit:
+ @echo patsplit
+ @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
+ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@
+
posix:
@echo posix
@AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
@@ -1686,11 +1743,21 @@ shadow:
@AWKPATH=$(srcdir) $(AWK) -f $@.awk --lint >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
@-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@
+splitarg4:
+ @echo splitarg4
+ @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
+ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@
+
strtonum:
@echo strtonum
@AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
@-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@
+switch2:
+ @echo switch2
+ @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
+ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@
+
double1:
@echo double1
@AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
diff --git a/pc/config.h b/pc/config.h
index 1cdcd72e..c0295f16 100644
--- a/pc/config.h
+++ b/pc/config.h
@@ -556,5 +556,9 @@
#if defined(_MSC_VER) || defined(__MINGW32__)
# define WEXITSTATUS(stat_val) ((stat_val) & ~0xC0000000)
#endif
+
+#ifdef __MINGW32__
+#define HAVE_USLEEP 1
+#endif
/* #define NO_LINT 1 */
diff --git a/pc/gawkmisc.pc b/pc/gawkmisc.pc
index 48d4bc3c..1355449c 100644
--- a/pc/gawkmisc.pc
+++ b/pc/gawkmisc.pc
@@ -280,6 +280,14 @@ int fd;
setmode(fd, orig_tty_mode);
}
}
+
+/* files_are_same --- return true if files are identical */
+
+int
+files_are_same(struct stat *f1, struct stat *f2)
+{
+ return (f1->st_dev == f2->st_dev && f1->st_ino == f2->st_ino);
+}
#ifdef __EMX__
diff --git a/pc/popen.c b/pc/popen.c
index 287b0b9b..3410e2ca 100644
--- a/pc/popen.c
+++ b/pc/popen.c
@@ -87,8 +87,10 @@ scriptify(const char *command)
slashify(name, p);
if (! (i = unixshell(p))) {
char *p = (char *) realloc(name, strlen(name) + 5);
- if (p == NULL)
+ if (p == NULL) {
+ free(cmd);
return NULL;
+ }
name = p;
strcat(name, ".bat");
}
@@ -98,10 +100,14 @@ scriptify(const char *command)
if ((fp = fopen(p, i ? "wb" : "w")) != NULL) {
if (! i) fputs("@echo off\n", fp);
i = strlen(command);
- if ((fwrite(command, 1, i, fp) < i) || (fputc('\n', fp) == EOF))
+ if ((fwrite(command, 1, i, fp) < i) || (fputc('\n', fp) == EOF)) {
+ free(cmd);
cmd = NULL;
- } else
+ {
+ } else {
+ free(cmd);
cmd = NULL;
+ }
if (fp) fclose(fp);
return(cmd);
}
diff --git a/po/ChangeLog b/po/ChangeLog
index febe20e1..3c3929a2 100644
--- a/po/ChangeLog
+++ b/po/ChangeLog
@@ -92,16 +92,3 @@ Wed May 1 16:41:32 2002 Arnold D. Robbins <arnold@skeeve.com>
* Makefile.in.in: Upgrade to gettext-0.11.1.
* remove-potcdate.sin: New file, from gettext-0.11.1.
-Sun Jun 3 13:04:44 2001 Arnold D. Robbins <arnold@skeeve.com>
-
- * Release 3.1.0: Release tar file made. And there was
- rejoicing.
-
-Sun Dec 24 10:35:15 2000 Arnold D. Robbins <arnold@skeeve.com>
-
- * he.po: New file, courtesy of Eli Zaretskii.
-
-Wed Feb 16 14:41:13 2000 Arnold D. Robbins <arnold@skeeve.com>
-
- * ChangeLog: Created to satisfy automake's `make dist'.
- Harumph.
diff --git a/po/ast.gmo b/po/ast.gmo
index 84d9b0da..6dd41740 100644
--- a/po/ast.gmo
+++ b/po/ast.gmo
Binary files differ
diff --git a/po/ast.po b/po/ast.po
index 99d8952f..40ee716c 100644
--- a/po/ast.po
+++ b/po/ast.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: gawk-3.1.7\n"
"Report-Msgid-Bugs-To: arnold@skeeve.com\n"
-"POT-Creation-Date: 2010-11-12 12:20+0200\n"
+"POT-Creation-Date: 2010-11-17 08:48+0200\n"
"PO-Revision-Date: 2009-12-17 16:31+0100\n"
"Last-Translator: Marquinos <maacub@gmail.com>\n"
"Language-Team: Asturian <ubuntu-l10n-ast@lists.ubuntu.com>\n"
@@ -15,413 +15,491 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-#: array.c:112
+#: array.c:103
+#, c-format
+msgid "from %s"
+msgstr "dende %s"
+
+#: array.c:267
+#, fuzzy
+msgid "attempt to use a scalar value as array"
+msgstr "intentóse usar el datu escalar `%s' como una matriz"
+
+#: array.c:270
#, c-format
msgid "attempt to use function `%s' as an array"
msgstr "intentóse usar la función `%s' como una matriz"
-#: array.c:115
+#: array.c:273
#, c-format
msgid "attempt to use scalar parameter `%s' as an array"
msgstr "intentóse usar el parámetru escalar `%s' como una matriz"
-#: array.c:118
+#: array.c:276
#, c-format
msgid "attempt to use scalar `%s' as array"
msgstr "intentóse usar el datu escalar `%s' como una matriz"
-#: array.c:156
+#: array.c:321 array.c:648 eval.c:1075 eval.c:1079 eval.c:1581 eval.c:1649
+#: eval.c:1928
#, c-format
-msgid "from %s"
-msgstr "dende %s"
+msgid "attempt to use array `%s' in a scalar context"
+msgstr "intentóse usar la matriz `%s' nun contestu escalar"
-#: array.c:513
+#: array.c:570
#, fuzzy, c-format
msgid "reference to uninitialized element `%s[\"%.*s\"]'"
msgstr "referencia al elementu ensin anicializar `%s[\"%s\"]'"
-#: array.c:519
+#: array.c:576
#, c-format
msgid "subscript of array `%s' is null string"
msgstr "el subíndiz de la matriz `%s' ye la cadena nula"
-#: array.c:623
+#: array.c:684
#, c-format
msgid "delete: index `%s' not in array `%s'"
msgstr "delete: l'índiz `%s' nun ta na matriz `%s'"
-#: array.c:792
+#: array.c:705
+#, fuzzy, c-format
+msgid "attempt to use scalar `%s[\"%.*s\"]' as an array"
+msgstr "intentóse usar el datu escalar `%s' como una matriz"
+
+#: array.c:868
#, c-format
msgid "%s: empty (null)\n"
msgstr "%s: baleru (nulu)\n"
-#: array.c:797
+#: array.c:873
#, c-format
msgid "%s: empty (zero)\n"
msgstr "%s: baleru (cero)\n"
-#: array.c:801
+#: array.c:877
#, c-format
msgid "%s: table_size = %d, array_size = %d\n"
msgstr "%s: tamañu_tabla = %d, tamañu_matriz = %d\n"
-#: array.c:830
+#: array.c:912
#, c-format
msgid "%s: is parameter\n"
msgstr "%s: ye un parámetru\n"
-#: array.c:835
+#: array.c:916
#, c-format
msgid "%s: array_ref to %s\n"
msgstr "%s: array_ref a %s\n"
-#: awkgram.y:224 awkgram.y:227
+#: array.c:921
+#, fuzzy
+msgid "adump: argument not an array"
+msgstr "match: el tercer argumentu nun ye una matriz"
+
+#: array.c:1139
+#, fuzzy
+msgid "attempt to use array in a scalar context"
+msgstr "intentóse usar la matriz `%s' nun contestu escalar"
+
+#: array.c:1236
+#, fuzzy
+msgid "asort: second argument not an array"
+msgstr "split: el segundu argumentu nun ye una matriz"
+
+#: array.c:1237
+#, fuzzy
+msgid "asorti: second argument not an array"
+msgstr "split: el segundu argumentu nun ye una matriz"
+
+#: array.c:1245
+#, fuzzy
+msgid "asort: first argument not an array"
+msgstr "match: el tercer argumentu nun ye una matriz"
+
+#: array.c:1246
+#, fuzzy
+msgid "asorti: first argument not an array"
+msgstr "match: el tercer argumentu nun ye una matriz"
+
+#: awkgram.y:246
#, c-format
msgid "%s blocks must have an action part"
msgstr "Los bloques %s deben tener una parte d'aición"
-#: awkgram.y:230
+#: awkgram.y:249
msgid "each rule must have a pattern or an action part"
msgstr "cada regla tien de tener un patrón o una parte d'aición"
-#: awkgram.y:266 awkgram.y:275
+#: awkgram.y:320 awkgram.y:330
msgid "old awk does not support multiple `BEGIN' or `END' rules"
msgstr "l'awk antiguu non almite múltiples regles `BEGIN' o `END'"
-#: awkgram.y:304
+#: awkgram.y:367
#, c-format
msgid "`%s' is a built-in function, it cannot be redefined"
msgstr "`%s' ye una función interna, nun puede redefinise"
-#: awkgram.y:350
+#: awkgram.y:427
msgid "regexp constant `//' looks like a C++ comment, but is not"
msgstr ""
"la constante d'espresión regular `//' paez un comentariu de C++, pero nun lo "
"ye"
-#: awkgram.y:353
+#: awkgram.y:430
#, c-format
msgid "regexp constant `/%s/' looks like a C comment, but is not"
msgstr ""
"la constante d'espresión regular `/%s/' paez un comentariu de C, pero nun lo "
"ye"
-#: awkgram.y:380 awkgram.y:692
-msgid "statement may have no effect"
-msgstr "la sentencia puede nun tener efeutu"
+#: awkgram.y:735
+#, fuzzy
+msgid "`break' is not allowed outside a loop or switch"
+msgstr "nun se permite `break' fuera d'un ciclu"
-#: awkgram.y:477 awkgram.y:480 awkgram.y:504 awkgram.y:511 awkgram.y:518
-#, c-format
-msgid "`%s' used in %s action"
+#: awkgram.y:744
+#, fuzzy
+msgid "`continue' is not allowed outside a loop"
+msgstr "nun se permite `continue' fuera d'un ciclu"
+
+#: awkgram.y:753
+#, fuzzy, c-format
+msgid "`next' used in %s action"
msgstr "usóse `%s' na aición %s"
-#: awkgram.y:495 awkgram.y:499
+#: awkgram.y:767 awkgram.y:771
msgid "`nextfile' is a gawk extension"
msgstr "`nextfile' ye una estensión de gawk"
-#: awkgram.y:528
+#: awkgram.y:775
+#, fuzzy, c-format
+msgid "`nextfile' used in %s action"
+msgstr "usóse `%s' na aición %s"
+
+#: awkgram.y:799
msgid "`return' used outside function context"
msgstr "usóse `return' fuera del contestu de la función"
-#: awkgram.y:570
+#: awkgram.y:859
msgid "plain `print' in BEGIN or END rule should probably be `print \"\"'"
msgstr ""
"el `print' simple na regla BEGIN o END probablemente tien de ser `print \"\"'"
-#: awkgram.y:586 awkgram.y:594
+#: awkgram.y:927 awkgram.y:935
msgid "`delete array' is a gawk extension"
msgstr "`delete array' ye una estensión de gawk"
-#: awkgram.y:608 awkgram.y:616
+#: awkgram.y:955 awkgram.y:963
msgid "`delete(array)' is a non-portable tawk extension"
msgstr "`delete(array)' ye una estensión de gawk que nun ye tresportable"
-#: awkgram.y:660
+#: awkgram.y:1004
#, c-format
msgid "duplicate case values in switch body: %s"
msgstr "valores case duplicaos nel cuerpu d'un switch: %s"
-#: awkgram.y:670
-msgid "Duplicate `default' detected in switch body"
+#: awkgram.y:1014
+#, fuzzy
+msgid "duplicate `default' detected in switch body"
msgstr "Detectóse un `default' duplicáu nel cuerpo d'un switch"
-#: awkgram.y:759
+#: awkgram.y:1151
msgid "multistage two-way pipelines don't work"
msgstr "les llínies de trabayu de dos víes multiestáu non furrulen"
-#: awkgram.y:850
+#: awkgram.y:1253
msgid "regular expression on right of assignment"
msgstr "espresión regular del lláu drechu d'una asignación"
-#: awkgram.y:860
+#: awkgram.y:1263
msgid "regular expression on left of `~' or `!~' operator"
msgstr "espresión regular a manzorga del operador `~' o `!~'"
-#: awkgram.y:866 awkgram.y:954
+#: awkgram.y:1278 awkgram.y:1423
msgid "old awk does not support the keyword `in' except after `for'"
msgstr ""
"l'awk antiguu nun almite la pallabra contraseña `in' esceutu dempués de `for'"
-#: awkgram.y:872
+#: awkgram.y:1287
msgid "regular expression on right of comparison"
msgstr "espresión regular a drecha d'una comparación"
-#: awkgram.y:936
+#: awkgram.y:1399
#, c-format
-msgid "`getline var' invalid inside %s rule"
+msgid "`getline var' invalid inside `%s' rule"
msgstr ""
-#: awkgram.y:939
+#: awkgram.y:1401
#, c-format
-msgid "`getline' invalid inside %s rule"
+msgid "`getline' invalid inside `%s' rule"
msgstr ""
-#: awkgram.y:944
+#: awkgram.y:1407
msgid "non-redirected `getline' undefined inside END action"
msgstr "`getline' non redirixíu non definíu dientro de l'aición d'END"
-#: awkgram.y:955
+#: awkgram.y:1424
msgid "old awk does not support multidimensional arrays"
msgstr "l'awk antiguu nun almite matrices multidimensionales"
-#: awkgram.y:1001
+#: awkgram.y:1528
msgid "call of `length' without parentheses is not portable"
msgstr "la llamada de `length' ensin paréntesis nun ye tresportable"
-#: awkgram.y:1006
-msgid "call of `length' without parentheses is deprecated by POSIX"
-msgstr "la llamada de `length' ensin paréntesis ta obsoleta por POSIX"
-
-#: awkgram.y:1051
+#: awkgram.y:1591
#, fuzzy
msgid "indirect function calls are a gawk extension"
-msgstr "`extension' ye una estensión de gawk"
+msgstr "`nextfile' ye una estensión de gawk"
-#: awkgram.y:1084
-msgid "use of non-array as array"
-msgstr "usu d'una matriz que nun ye matriz"
+#: awkgram.y:1605
+#, fuzzy, c-format
+msgid "can not use special variable `%s' for indirect function call"
+msgstr ""
+"función `%s': nun puede usar variable especial `%s' como parámetru de función"
-#: awkgram.y:1087
+#: awkgram.y:1682
msgid "invalid subscript expression"
msgstr "espresión de subíndiz non válida"
-#: awkgram.y:1329
+#: awkgram.y:1722
+msgid "use of non-array as array"
+msgstr "usu d'una matriz que nun ye matriz"
+
+#: awkgram.y:1993
msgid "unexpected newline or end of string"
msgstr "nueva llinia o fin de la cadena inesperaos"
-#: awkgram.y:1446
-msgid "empty program text on command line"
-msgstr "testu de programa baleru na llinia de comandu"
-
-#: awkgram.y:1502
+#: awkgram.y:2248 awkgram.y:2296 awkgram.y:2470
#, c-format
msgid "can't open source file `%s' for reading (%s)"
msgstr "nun puede abrise'l ficheru fonte `%s' pa llectura (%s)"
-#: awkgram.y:1600
+#: awkgram.y:2249 awkgram.y:2297 builtin.c:122
+msgid "reason unknown"
+msgstr "razón desconocía"
+
+#: awkgram.y:2257
+#, fuzzy, c-format
+msgid "already included source file `%s'"
+msgstr "nun puede lleese'l ficheru fonte `%s' (%s)"
+
+#: awkgram.y:2281
+#, fuzzy
+msgid "@include is a gawk extension"
+msgstr "`nextfile' ye una estensión de gawk"
+
+#: awkgram.y:2288
+msgid "empty filename after @include"
+msgstr ""
+
+#: awkgram.y:2422
+msgid "empty program text on command line"
+msgstr "testu de programa baleru na llinia de comandu"
+
+#: awkgram.y:2537
#, c-format
msgid "can't read sourcefile `%s' (%s)"
msgstr "nun puede lleese'l ficheru fonte `%s' (%s)"
-#: awkgram.y:1608
+#: awkgram.y:2547
#, c-format
msgid "source file `%s' is empty"
msgstr "el ficheru fonte `%s' ta baleru"
-#: awkgram.y:1800 awkgram.y:1922 awkgram.y:1940 awkgram.y:2315 awkgram.y:2407
+#: awkgram.y:2732
msgid "source file does not end in newline"
msgstr "el ficheru fonte nun fina con llinia nueva"
-#: awkgram.y:1862
+#: awkgram.y:2809
msgid "unterminated regexp ends with `\\' at end of file"
msgstr "espresión regular ensin finar fina con `\\` al final del ficheru"
-#: awkgram.y:1886
+#: awkgram.y:2833
#, c-format
msgid "%s: %d: tawk regex modifier `/.../%c' doesn't work in gawk"
msgstr ""
"%s: %d: el modificador d'espresión regular `/.../%c` de tawk nun furrula en "
"gawk"
-#: awkgram.y:1890
+#: awkgram.y:2837
#, c-format
msgid "tawk regex modifier `/.../%c' doesn't work in gawk"
msgstr ""
"el modificador d'espresión regular `/.../%c` de tawk nun furrula en gawk"
-#: awkgram.y:1897
+#: awkgram.y:2844
msgid "unterminated regexp"
msgstr "espresión regular ensin finar"
-#: awkgram.y:1900
+#: awkgram.y:2848
msgid "unterminated regexp at end of file"
msgstr "espresión regular ensin finar al final del ficheru"
-#: awkgram.y:1969
+#: awkgram.y:2907
msgid "use of `\\ #...' line continuation is not portable"
msgstr "l'usu de la continuación de llinia `\\ #...' nun ye tresportable"
-#: awkgram.y:1982
+#: awkgram.y:2923
msgid "backslash not last character on line"
msgstr "la barra invertida nun ye'l caberu carauter na llinia"
-#: awkgram.y:2027
+#: awkgram.y:2984
msgid "POSIX does not allow operator `**='"
msgstr "POSIX nun permite l'operador `**='"
-#: awkgram.y:2029
+#: awkgram.y:2986
msgid "old awk does not support operator `**='"
msgstr "l'awk antiguu nun almite l'operador `**='"
-#: awkgram.y:2038
+#: awkgram.y:2995
msgid "POSIX does not allow operator `**'"
msgstr "POSIX nun permite l'operador `**'"
-#: awkgram.y:2040
+#: awkgram.y:2997
msgid "old awk does not support operator `**'"
msgstr "l'awk antiguu nun almite l'operador `**='"
-#: awkgram.y:2071
+#: awkgram.y:3032
msgid "operator `^=' is not supported in old awk"
msgstr "l'operador `^=' nun s'almite nel awk antiguu"
-#: awkgram.y:2079
+#: awkgram.y:3040
msgid "operator `^' is not supported in old awk"
msgstr "l'operador `^' nun s'almite nel awk antiguu"
-#: awkgram.y:2163 awkgram.y:2178
+#: awkgram.y:3133 awkgram.y:3149
msgid "unterminated string"
msgstr "cadena ensin finar"
-#: awkgram.y:2368
+#: awkgram.y:3345
#, c-format
msgid "invalid char '%c' in expression"
msgstr "carauter '%c' non válidu na espresión"
-#: awkgram.y:2416
+#: awkgram.y:3391
#, c-format
msgid "`%s' is a gawk extension"
msgstr "`%s' ye una estensión de gawk"
-#: awkgram.y:2419
+#: awkgram.y:3394
#, c-format
msgid "`%s' is a Bell Labs extension"
msgstr "`%s' ye una estensión de Bell Labs"
-#: awkgram.y:2422
+#: awkgram.y:3397
#, c-format
msgid "POSIX does not allow `%s'"
msgstr "POSIX non permite `%s'"
-#: awkgram.y:2426
+#: awkgram.y:3401
#, c-format
msgid "`%s' is not supported in old awk"
msgstr "`%s' nun s'almite nel awk antiguu"
-#: awkgram.y:2452
+#: awkgram.y:3465
msgid "`goto' considered harmful!\n"
msgstr "¡`goto' considerase permalu!\n"
-#: awkgram.y:2514
+#: awkgram.y:3518
#, c-format
msgid "%d is invalid as number of arguments for %s"
msgstr "%d ye non válidu como númberu d'argumentos pa %s"
-#: awkgram.y:2533 awkgram.y:2536
+#: awkgram.y:3544 awkgram.y:3547
msgid "match: third argument is a gawk extension"
msgstr "match: el tercer argumentu ye una estensión de gawk"
-#: awkgram.y:2549
+#: awkgram.y:3575
#, c-format
msgid "%s: string literal as last arg of substitute has no effect"
msgstr ""
"%s: el lliteral de cadena como caberu argumentu de substitute nun tien efeutu"
-#: awkgram.y:2552
+#: awkgram.y:3580
#, c-format
msgid "%s third parameter is not a changeable object"
msgstr "el tercer argumentu de %s nun ye un oxetu que pueda camudase"
-#: awkgram.y:2586 awkgram.y:2589
+#: awkgram.y:3665 awkgram.y:3668
msgid "close: second argument is a gawk extension"
msgstr "close: el segundu argumentu ye una estensión de gawk"
-#: awkgram.y:2599
+#: awkgram.y:3680
msgid "use of dcgettext(_\"...\") is incorrect: remove leading underscore"
msgstr ""
"l'usu de dcgettext(_\\\"...\\\") ye incorreutu: quita'l subrayáu d'aniciu"
-#: awkgram.y:2614
+#: awkgram.y:3695
msgid "use of dcngettext(_\"...\") is incorrect: remove leading underscore"
msgstr ""
"l'usu de dcngettext(_\\\"...\\\") ye incorreutu: quita'l subrayáu d'aniciu"
-#: awkgram.y:2686
+#: awkgram.y:3787
#, c-format
msgid "function `%s': parameter #%d, `%s', duplicates parameter #%d"
msgstr "función `%s': parámetru #%d, `%s', duplica'l parámetru #%d"
-#: awkgram.y:2719
+#: awkgram.y:3829
#, c-format
msgid "function `%s': parameter `%s' shadows global variable"
msgstr "función `%s': parámetru `%s' anubre la variable global"
-#: awkgram.y:2831
+#: awkgram.y:3987
#, c-format
msgid "could not open `%s' for writing (%s)"
msgstr "nun puede abrir `%s' pa escritura (%s)"
-#: awkgram.y:2832 profile.c:96
+#: awkgram.y:3988 profile.c:85
msgid "sending profile to standard error"
msgstr "unvíase'l perfil a la salida standard de fallu"
-#: awkgram.y:2864
+#: awkgram.y:3994
#, c-format
msgid "%s: close failed (%s)"
msgstr "%s: falló close (%s)"
-#: awkgram.y:2985
+#: awkgram.y:4046
msgid "shadow_funcs() called twice!"
msgstr "¡llamóse shadow_funcs() dos vegaes!"
-#: awkgram.y:3012
+#: awkgram.y:4052
msgid "there were shadowed variables."
msgstr "hai variables anubríes."
-#: awkgram.y:3085
+#: awkgram.y:4081
#, c-format
msgid "function `%s': can't use function name as parameter name"
msgstr ""
"función `%s': nun puede usase un nome de función como nome de parámetru"
-#: awkgram.y:3088
+#: awkgram.y:4086
#, c-format
msgid "function `%s': can't use special variable `%s' as a function parameter"
msgstr ""
"función `%s': nun puede usar variable especial `%s' como parámetru de función"
-#: awkgram.y:3098
+#: awkgram.y:4102
#, c-format
msgid "function name `%s' previously defined"
msgstr "el nome de función `%s' definióse previamente"
-#: awkgram.y:3249 awkgram.y:3255
+#: awkgram.y:4271 awkgram.y:4277
#, c-format
msgid "function `%s' called but never defined"
msgstr "llamóse a la función `%s' pero enxamás se definió"
-#: awkgram.y:3258
+#: awkgram.y:4280
#, c-format
msgid "function `%s' defined but never called"
msgstr "definióse la función `%s' pero enxamás se llamó"
-#: awkgram.y:3285
+#: awkgram.y:4311
#, c-format
msgid "regexp constant for parameter #%d yields boolean value"
msgstr ""
"la constante d'espresión regular pal parámetru #%d da un valor booleanu"
-#: awkgram.y:3329
+#: awkgram.y:4420
#, c-format
msgid ""
"function `%s' called with space between name and `(',\n"
@@ -430,243 +508,144 @@ msgstr ""
"llamóse la función `%s' con espaciu ente'l nome y el `(',\n"
"o usóse como una variable o una matriz"
-#: awkgram.y:3750
-#, fuzzy
-msgid "division by zero attempted in `/'"
-msgstr "intentóse una división por cero en `/='"
+#: awkgram.y:4673 eval.c:1845
+msgid "division by zero attempted"
+msgstr "intentóse una división por cero"
-#: awkgram.y:3755 eval.c:1411
+#: awkgram.y:4682 eval.c:1877
#, c-format
msgid "division by zero attempted in `%%'"
msgstr "intentóse una división por cero en `%%'"
-#: builtin.c:122
+#: awkgram.y:5342
+msgid "statement may have no effect"
+msgstr "la sentencia puede nun tener efeutu"
+
+#: builtin.c:120
#, c-format
msgid "%s to \"%s\" failed (%s)"
msgstr "falló %s a \"%s\" (%s)"
-#: builtin.c:123
+#: builtin.c:121
msgid "standard output"
msgstr "salida standard"
-#: builtin.c:124
-msgid "reason unknown"
-msgstr "razón desconocía"
-
-#: builtin.c:137
+#: builtin.c:135
msgid "exp: received non-numeric argument"
msgstr "exp: recibióse un argumentu que nun ye un númberu"
-#: builtin.c:143
+#: builtin.c:141
#, c-format
msgid "exp: argument %g is out of range"
msgstr "exp: l'argumentu %g ta fuera de rangu"
-#: builtin.c:201
+#: builtin.c:200
#, c-format
msgid "fflush: cannot flush: pipe `%s' opened for reading, not writing"
msgstr ""
"fflush: nun puede llimpiase: abrióse la tubería `%s' pa llectura, non pa "
"escritura"
-#: builtin.c:204
+#: builtin.c:203
#, c-format
msgid "fflush: cannot flush: file `%s' opened for reading, not writing"
msgstr ""
"fflush: nun puede llimpiase: abrióse'l ficheru `%s' pa llectura, non pa "
"escritura"
-#: builtin.c:216
+#: builtin.c:215
#, c-format
msgid "fflush: `%s' is not an open file, pipe or co-process"
msgstr "fflush: `%s' nun ye un ficheru abiertu, tubería o co-procesu"
-#: builtin.c:310
+#: builtin.c:322
msgid "index: received non-string first argument"
msgstr "index: el primer argumentu recibíu nun ye una cadena"
-#: builtin.c:312
+#: builtin.c:324
msgid "index: received non-string second argument"
msgstr "index: el segundu argumentu recibíu nun ye una cadena"
-#: builtin.c:434
+#: builtin.c:446
msgid "int: received non-numeric argument"
msgstr "int: recibióse un argumentu que nun ye un númberu"
-#: builtin.c:464
+#: builtin.c:469
msgid "`length(array)' is a gawk extension"
msgstr "`length(array)' ye una estensión de gawk"
-#: builtin.c:471
-#, fuzzy
-msgid "length: untyped parameter argument will be forced to scalar"
-msgstr "llonxitú: argumentu ensin tipu será forzáu a escalar"
-
-#: builtin.c:480
-msgid "length: untyped argument will be forced to scalar"
-msgstr "llonxitú: argumentu ensin tipu será forzáu a escalar"
-
-#: builtin.c:484
+#: builtin.c:477
msgid "length: received non-string argument"
msgstr "length: recibióse un argumentu que nun ye una cadena"
-#: builtin.c:515
+#: builtin.c:508
msgid "log: received non-numeric argument"
msgstr "log: recibióse un argumentu que nun ye un númberu"
-#: builtin.c:518
+#: builtin.c:511
#, c-format
msgid "log: received negative argument %g"
msgstr "log: recibióse l'argumentu negativu %g"
-#: builtin.c:726 builtin.c:729
-msgid "must use `count$' on all formats or none"
-msgstr "tien de usase `count$' en tolos formatos o en dengún"
-
-#: builtin.c:790
-#, c-format
-msgid "field width is ignored for `%%%%' specifier"
-msgstr "anchor de campu ye ignoráu por especificador `%%%%'"
-
-#: builtin.c:792
-#, c-format
-msgid "precision is ignored for `%%%%' specifier"
-msgstr "precisión ye ignorada por especificador `%%%%'"
-
-#: builtin.c:794
-#, c-format
-msgid "field width and precision are ignored for `%%%%' specifier"
-msgstr "anchor campu y precisión ignoraos por especificador `%%%%'"
-
-#: builtin.c:845
-msgid "`$' is not permitted in awk formats"
-msgstr "nun se permite `$' nos formatos d'awk"
-
-#: builtin.c:851
-msgid "arg count with `$' must be > 0"
-msgstr "la cuenta d'argumentos con `$' tien de ser > 0"
-
-#: builtin.c:853
-#, c-format
-msgid "arg count %ld greater than total number of supplied arguments"
-msgstr ""
-"la cuenta d'argumentos %ld ye mayor que'l númberu total d'argumentos "
-"proporcionaos"
-
-#: builtin.c:855
-msgid "`$' not permitted after period in format"
-msgstr "nun se permite `$' dempués d'un puntu nel formatu"
-
-#: builtin.c:868
-msgid "no `$' supplied for positional field width or precision"
-msgstr "nun se proporciona `$' pal anchor o la precisión del campu posicional"
-
-#: builtin.c:938
-msgid "`l' is meaningless in awk formats; ignored"
-msgstr "`l' nun tien significáu nos formatos d'awk; descartase"
-
-#: builtin.c:942
-msgid "`l' is not permitted in POSIX awk formats"
-msgstr "nun se permite `l' nos formatos POSIX d'awk"
-
-#: builtin.c:953
-msgid "`L' is meaningless in awk formats; ignored"
-msgstr "`L' nun tien significáu nos formatos d'awk; descartase"
-
-#: builtin.c:957
-msgid "`L' is not permitted in POSIX awk formats"
-msgstr "nun se permite `L' nos formatos POSIX d'awk"
-
-#: builtin.c:968
-msgid "`h' is meaningless in awk formats; ignored"
-msgstr "`h' nun tien significáu nos formatos d'awk; descartase"
-
-#: builtin.c:972
-msgid "`h' is not permitted in POSIX awk formats"
-msgstr "nun se permite `h' nos formatos POSIX d'awk"
-
-#: builtin.c:1252
-#, c-format
-msgid "[s]printf: value %g is out of range for `%%%c' format"
-msgstr "[s]printf: el valor %g ta fuera del rangu pal formatu `%%%c'"
-
-#: builtin.c:1332
-#, c-format
-msgid "ignoring unknown format specifier character `%c': no argument converted"
-msgstr ""
-"ignorando caráuter desconocíu especificáu de formatu `%c': ensin argumentu "
-"convertíu"
-
-#: builtin.c:1338
-msgid "not enough arguments to satisfy format string"
-msgstr "nun hai suficientes argumentos pa satisfacer a la cadena de formatu"
-
-#: builtin.c:1340
-msgid "^ ran out for this one"
-msgstr "acabóse ^ pa esti"
-
-#: builtin.c:1346
-msgid "[s]printf: format specifier does not have control letter"
-msgstr "[s]printf: l'especificador de formatu nun tien lletres de control"
-
-#: builtin.c:1349
-msgid "too many arguments supplied for format string"
-msgstr "proporcionaronse demasiaos argumentos pa la cadena de formatu"
+#: builtin.c:531 builtin.c:573 builtin.c:586 builtin.c:982 builtin.c:994
+#, fuzzy, c-format
+msgid "attempt to use array `%s' in scalar context"
+msgstr "intentóse usar la matriz `%s' nun contestu escalar"
-#: builtin.c:1424 builtin.c:1427
+#: builtin.c:569 builtin.c:580
msgid "printf: no arguments"
msgstr "printf: ensin argumentos"
-#: builtin.c:1451
+#: builtin.c:621
msgid "sqrt: received non-numeric argument"
msgstr "sqrt: recibióse un argumentu que nun ye un númberu"
-#: builtin.c:1455
+#: builtin.c:625
#, c-format
msgid "sqrt: called with negative argument %g"
msgstr "sqrt: llamóse col argumentu negativu %g"
-#: builtin.c:1479
-#, c-format
-msgid "substr: start index %g is invalid, using 1"
-msgstr "substr: l'índiz d'aniciu %g nun ye válidu, usase 1"
-
-#: builtin.c:1484
-#, c-format
-msgid "substr: non-integer start index %g will be truncated"
-msgstr "substr: truncaráse l'índiz d'aniciu non enteru %g"
-
-#: builtin.c:1510
+#: builtin.c:649
#, c-format
msgid "substr: length %g is not >= 1"
msgstr "substr: el llargor %g nun ye >= 1"
-#: builtin.c:1512
+#: builtin.c:651
#, c-format
msgid "substr: length %g is not >= 0"
msgstr "substr: el llargor %g nun ye >= 0"
-#: builtin.c:1519
+#: builtin.c:658
#, c-format
msgid "substr: non-integer length %g will be truncated"
msgstr "substr: truncaráse'l llargor non enteru %g"
-#: builtin.c:1524
+#: builtin.c:663
#, c-format
msgid "substr: length %g too big for string indexing, truncating to %g"
msgstr ""
"substr: el llargor %g ye enforma grande pa ser índiz de cadena, truncase a %g"
-#: builtin.c:1536
+#: builtin.c:675
+#, c-format
+msgid "substr: start index %g is invalid, using 1"
+msgstr "substr: l'índiz d'aniciu %g nun ye válidu, usase 1"
+
+#: builtin.c:680
+#, c-format
+msgid "substr: non-integer start index %g will be truncated"
+msgstr "substr: truncaráse l'índiz d'aniciu non enteru %g"
+
+#: builtin.c:705
msgid "substr: source string is zero length"
msgstr "substr: la cadena d'orixe ye de llonxitú cero"
-#: builtin.c:1552
+#: builtin.c:721
#, c-format
msgid "substr: start index %g is past end of string"
msgstr "substr: l'índiz d'aniciu %g ta dempués del fin de la cadena"
-#: builtin.c:1560
+#: builtin.c:729
#, c-format
msgid ""
"substr: length %g at start index %g exceeds length of first argument (%lu)"
@@ -674,475 +653,434 @@ msgstr ""
"substr: la cadena %g nel índiz d'aniciu %g escede'l llargor del primer "
"argumentu (%lu)"
-#: builtin.c:1637
+#: builtin.c:806
+msgid "strftime: received non-numeric second argument"
+msgstr "strftime: el segundu argumentu recibíu nun ye un númberu"
+
+#: builtin.c:813
msgid "strftime: received non-string first argument"
msgstr "strftime: el primer argumentu recibíu nun ye una cadena"
-#: builtin.c:1643
+#: builtin.c:819
msgid "strftime: received empty format string"
msgstr "strftime: recibióse una cadena de formatu vacía"
-#: builtin.c:1652
-msgid "strftime: received non-numeric second argument"
-msgstr "strftime: el segundu argumentu recibíu nun ye un númberu"
-
-#: builtin.c:1729
+#: builtin.c:885
msgid "mktime: received non-string argument"
msgstr "mktime: recibióse un argumentu que nun ye una cadena"
-#: builtin.c:1746
+#: builtin.c:902
msgid "mktime: at least one of the values is out of the default range"
msgstr ""
-#: builtin.c:1781
+#: builtin.c:937
msgid "'system' function not allowed in sandbox mode"
msgstr ""
-#: builtin.c:1786
+#: builtin.c:942
msgid "system: received non-string argument"
msgstr "system: recibióse un argumentu que nun ye una cadena"
-#: builtin.c:1907 eval.c:2285
+#: builtin.c:997 eval.c:1105 eval.c:1557 eval.c:1570
+#, c-format
+msgid "reference to uninitialized variable `%s'"
+msgstr "referencia a la variable ensin anicializar `%s'"
+
+#: builtin.c:1064
#, c-format
msgid "reference to uninitialized field `$%d'"
msgstr "referencia al campu ensin anicializar `$%d'"
-#: builtin.c:2012
+#: builtin.c:1098
msgid "tolower: received non-string argument"
msgstr "tolower: recibióse un argumentu que nun ye una cadena"
-#: builtin.c:2042
+#: builtin.c:1151
msgid "toupper: received non-string argument"
msgstr "toupper: recibióse un argumentu que nun ye una cadena"
-#: builtin.c:2075
+#: builtin.c:1199
msgid "atan2: received non-numeric first argument"
msgstr "atan2: el primer argumentu recibíu nun ye un númberu"
-#: builtin.c:2077
+#: builtin.c:1201
msgid "atan2: received non-numeric second argument"
msgstr "atan2: el segundu argumentu recibíu nun ye un númberu"
-#: builtin.c:2096
+#: builtin.c:1220
msgid "sin: received non-numeric argument"
msgstr "sin: recibióse un argumentu que nun ye un númberu"
-#: builtin.c:2112
+#: builtin.c:1236
msgid "cos: received non-numeric argument"
msgstr "cos: recibió un argumentu que nun ye un númberu"
-#: builtin.c:2165
+#: builtin.c:1289
msgid "srand: received non-numeric argument"
msgstr "srand: recibió un argumentu que nun ye un númberu"
-#: builtin.c:2200
+#: builtin.c:1320
msgid "match: third argument is not an array"
msgstr "match: el tercer argumentu nun ye una matriz"
-#: builtin.c:2750
+#: builtin.c:1827
msgid "gensub: third argument of 0 treated as 1"
msgstr "gensub: el tercer argumentu de 0 tratase como 1"
-#: builtin.c:2866
+#: builtin.c:1869
msgid "lshift: received non-numeric first argument"
msgstr "lshift: el primer argumentu recibíu nun ye un númberu"
-#: builtin.c:2868
+#: builtin.c:1871
msgid "lshift: received non-numeric second argument"
msgstr "lshift: el segundu argumentu recibíu nun ye un númberu"
-#: builtin.c:2874
+#: builtin.c:1877
#, c-format
msgid "lshift(%lf, %lf): negative values will give strange results"
msgstr "lshift(%lf, %lf): los valores negativos darán resultaos raros"
-#: builtin.c:2876
+#: builtin.c:1879
#, c-format
msgid "lshift(%lf, %lf): fractional values will be truncated"
msgstr "lshift(%lf, %lf): los valores fraccionarios truncaránse"
-#: builtin.c:2878
+#: builtin.c:1881
#, c-format
msgid "lshift(%lf, %lf): too large shift value will give strange results"
msgstr ""
"lshift(%lf, %lf): un valor de desplazamientu mui grande dará resultaos raros"
-#: builtin.c:2904
+#: builtin.c:1908
msgid "rshift: received non-numeric first argument"
msgstr "rshift: el primer argumentu recibíu nun ye un númberu"
-#: builtin.c:2906
+#: builtin.c:1910
msgid "rshift: received non-numeric second argument"
msgstr "rshift: el segundu argumentu recibíu nun ye un númberu"
-#: builtin.c:2912
+#: builtin.c:1916
#, c-format
msgid "rshift(%lf, %lf): negative values will give strange results"
msgstr "rshift(%lf, %lf): los valores negativos darán resultaos raros"
-#: builtin.c:2914
+#: builtin.c:1918
#, c-format
msgid "rshift(%lf, %lf): fractional values will be truncated"
msgstr "rshift(%lf, %lf): los valores fraccionarios serán truncaos"
-#: builtin.c:2916
+#: builtin.c:1920
#, c-format
msgid "rshift(%lf, %lf): too large shift value will give strange results"
msgstr ""
"rshift(%lf, %lf): un valor de desplazamientu mui grande dará resultaos raros"
-#: builtin.c:2942
+#: builtin.c:1947
msgid "and: received non-numeric first argument"
msgstr "and: el primer argumentu recibíu nun ye un númberu"
-#: builtin.c:2944
+#: builtin.c:1949
msgid "and: received non-numeric second argument"
msgstr "and: el segundu argumentu recibíu nun ye un númberu"
-#: builtin.c:2950
+#: builtin.c:1955
#, c-format
msgid "and(%lf, %lf): negative values will give strange results"
msgstr "and(%lf, %lf): los valores negativos darán resultaos raros"
-#: builtin.c:2952
+#: builtin.c:1957
#, c-format
msgid "and(%lf, %lf): fractional values will be truncated"
msgstr "and(%lf, %lf): los valores fraccionarios serán truncaos"
-#: builtin.c:2978
+#: builtin.c:1984
msgid "or: received non-numeric first argument"
msgstr "or: el primer argumentu recibíu nun ye un númberu"
-#: builtin.c:2980
+#: builtin.c:1986
msgid "or: received non-numeric second argument"
msgstr "or: el segundu argumentu recibíu nun ye un númberu"
-#: builtin.c:2986
+#: builtin.c:1992
#, c-format
msgid "or(%lf, %lf): negative values will give strange results"
msgstr "or(%lf, %lf): los valores negativos darán resultaos raros"
-#: builtin.c:2988
+#: builtin.c:1994
#, c-format
msgid "or(%lf, %lf): fractional values will be truncated"
msgstr "or(%lf, %lf): los valores fraccionarios serán truncaos"
-#: builtin.c:3014
+#: builtin.c:2023
msgid "xor: received non-numeric first argument"
msgstr "xor: el primer argumentu recibíu nun ye un númberu"
-#: builtin.c:3016
+#: builtin.c:2025
msgid "xor: received non-numeric second argument"
msgstr "xor: el segundu argumentu recibíu nun ye un númberu"
-#: builtin.c:3022
+#: builtin.c:2031
#, c-format
msgid "xor(%lf, %lf): negative values will give strange results"
msgstr "xor(%lf, %lf): los valores negativos darán resultaos raros"
-#: builtin.c:3024
+#: builtin.c:2033
#, c-format
msgid "xor(%lf, %lf): fractional values will be truncated"
msgstr "xor(%lf, %lf): los valores fraccionarios truncaránse"
-#: builtin.c:3048
+#: builtin.c:2057 builtin.c:2063
msgid "compl: received non-numeric argument"
msgstr "compl: recibióse un argumentu que nun ye un númberu"
-#: builtin.c:3054
+#: builtin.c:2065
#, c-format
msgid "compl(%lf): negative value will give strange results"
msgstr "compl(%lf): el valor negativu dará resultaos raros"
-#: builtin.c:3056
+#: builtin.c:2067
#, c-format
msgid "compl(%lf): fractional value will be truncated"
msgstr "compl(%lf): el valor fraccionario truncaráse"
-#: builtin.c:3229
+#: builtin.c:2237
#, c-format
msgid "dcgettext: `%s' is not a valid locale category"
msgstr "dcgettext: `%s' nun ye ua categoría llocal válida"
-#: eval.c:374
+#: eval.c:412
#, c-format
msgid "unknown nodetype %d"
msgstr "triba de nodu %d desconocida"
-#: eval.c:423
-msgid "buffer overflow in genflags2str"
-msgstr "desbordamientu d'almacenamientu temporal en genflags2str"
+#: eval.c:423 eval.c:437
+#, fuzzy, c-format
+msgid "unknown opcode %d"
+msgstr "triba de nodu %d desconocida"
-#: eval.c:455 eval.c:461 profile.c:787
+#: eval.c:434
#, c-format
-msgid "attempt to use array `%s' in a scalar context"
-msgstr "intentóse usar la matriz `%s' nun contestu escalar"
+msgid "opcode %s not an operator or keyword"
+msgstr ""
-#: eval.c:803
+#: eval.c:487
+msgid "buffer overflow in genflags2str"
+msgstr "desbordamientu d'almacenamientu temporal en genflags2str"
+
+#: eval.c:613
#, c-format
-msgid "for loop: array `%s' changed size from %ld to %ld during loop execution"
+msgid ""
+"\n"
+"\t# Function Call Stack:\n"
+"\n"
msgstr ""
-"ciclo for: la matriz `%s' camudó de tamañu de %ld a %ld durante la execución "
-"del ciclu"
-
-#: eval.c:824
-msgid "`break' outside a loop is not portable"
-msgstr "`break' fuera d'un ciclu nun ye tresportable"
+"\n"
+"\t# Pila de Llamaes de Funciones:\n"
+"\n"
-#: eval.c:828
-msgid "`break' outside a loop is not allowed"
-msgstr "nun se permite `break' fuera d'un ciclu"
+#: eval.c:640
+msgid "`IGNORECASE' is a gawk extension"
+msgstr "`IGNORECASE' ye una estensión de gawk"
-#: eval.c:845
-msgid "`continue' outside a loop is not portable"
-msgstr "`continue' fuera d'un ciclu nun ye tresportable"
+#: eval.c:669
+msgid "`BINMODE' is a gawk extension"
+msgstr "`BINMODE' ye una estensión de gawk"
-#: eval.c:849
-msgid "`continue' outside a loop is not allowed"
-msgstr "nun se permite `continue' fuera d'un ciclu"
+#: eval.c:727
+#, c-format
+msgid "BINMODE value `%s' is invalid, treated as 3"
+msgstr "valor BINMODE `%s' nun ye válidu, tratáu como 3"
-#: eval.c:883
-msgid "`next' cannot be called from a BEGIN rule"
-msgstr "`next' nun puede llamase dende una regla BEGIN"
+#: eval.c:817
+#, c-format
+msgid "bad `%sFMT' specification `%s'"
+msgstr "especificación `%sFMT' `%s' errónea"
-#: eval.c:885
-msgid "`next' cannot be called from an END rule"
-msgstr "`next' nun puede llamase dende una regla END"
+#: eval.c:895
+msgid "turning off `--lint' due to assignment to `LINT'"
+msgstr "desactivase `--lint' darréu d'una asignación a `LINT'"
-#: eval.c:887
-#, fuzzy
-msgid "`next' cannot be called from a BEGINFILE rule"
-msgstr "`next' nun puede llamase dende una regla BEGIN"
+#: eval.c:1067 eval.c:1544
+#, c-format
+msgid "can't use function name `%s' as variable or array"
+msgstr "nun puede usase'l nome de la función `%s' como variable o matriz"
-#: eval.c:889
-#, fuzzy
-msgid "`next' cannot be called from an ENDFILE rule"
-msgstr "`next' nun puede llamase dende una regla END"
+#: eval.c:1095
+msgid "assignment is not allowed to result of builtin function"
+msgstr "nun se permite l'asignación como resultáu d'una función interna"
-#: eval.c:898
-msgid "`nextfile' cannot be called from a BEGIN rule"
-msgstr "`nextfile' nun puede llamase dende una regla BEGIN"
+#: eval.c:1104 eval.c:1556 eval.c:1569
+#, c-format
+msgid "reference to uninitialized argument `%s'"
+msgstr "referencia al argumentu ensin anicializar `%s'"
-#: eval.c:900
-msgid "`nextfile' cannot be called from an END rule"
-msgstr "`nextfile' nun puede llamase dende una regla END"
+#: eval.c:1123
+msgid "attempt to field reference from non-numeric value"
+msgstr "intentóse una referencia de campu dende un valor que nun ye un númberu"
-#: eval.c:906
+#: eval.c:1125
#, fuzzy
-msgid "`nextfile' cannot be called from an ENDFILE rule"
-msgstr "`nextfile' nun puede llamase dende una regla END"
+msgid "attempt to field reference from null string"
+msgstr "intentóse una referencia dende una cadena nula"
-#: eval.c:963
-msgid "statement has no effect"
-msgstr "la declaración nun tien efeutu"
+#: eval.c:1131
+#, fuzzy, c-format
+msgid "attempt to access field %ld"
+msgstr "intentóse acceder al campu %d"
-#: eval.c:1040 eval.c:2133
-#, c-format
-msgid "can't use function name `%s' as variable or array"
-msgstr "nun puede usase'l nome de la función `%s' como variable o matriz"
+#: eval.c:1140
+#, fuzzy, c-format
+msgid "reference to uninitialized field `$%ld'"
+msgstr "referencia al campu ensin anicializar `$%d'"
-#: eval.c:1047 eval.c:1053
+#: eval.c:1202
#, c-format
-msgid "reference to uninitialized argument `%s'"
-msgstr "referencia al argumentu ensin anicializar `%s'"
+msgid "function `%s' called with more arguments than declared"
+msgstr "llamóse a la función `%s' con más argumentos de los declaraos"
-#: eval.c:1062 eval.c:2142
+#: eval.c:1358
#, c-format
-msgid "reference to uninitialized variable `%s'"
-msgstr "referencia a la variable ensin anicializar `%s'"
-
-#: eval.c:1210
-msgid ""
-"concatenation: side effects in one expression have changed the length of "
-"another!"
+msgid "unwind_stack: unexpected type `%s'"
msgstr ""
-"concatenación: ¡Los efectos llaterales nuna espresión camudarón la llonxitú "
-"d'otra!"
-#: eval.c:1315
+#: eval.c:1636
+#, fuzzy, c-format
+msgid "attempt to use scalar `%s' as an array"
+msgstr "intentóse usar el datu escalar `%s' como una matriz"
+
+#: eval.c:1680
msgid "assignment used in conditional context"
msgstr "usóse una asignación nun contestu condicional"
-#: eval.c:1396
-msgid "division by zero attempted"
-msgstr "intentóse una división por cero"
-
-#: eval.c:1426 profile.c:663
-#, c-format
-msgid "illegal type (%s) in tree_eval"
-msgstr "triba illegal (%s) en tree_eval"
+#: eval.c:1684
+msgid "statement has no effect"
+msgstr "la declaración nun tien efeutu"
-#: eval.c:1589
+#: eval.c:2028
msgid "division by zero attempted in `/='"
msgstr "intentóse una división por cero en `/='"
-#: eval.c:1611
+#: eval.c:2053
#, c-format
msgid "division by zero attempted in `%%='"
msgstr "intentóse una división por cero en `%%='"
-#: eval.c:1891
-#, c-format
-msgid "function `%s' called with more arguments than declared"
-msgstr "llamóse a la función `%s' con más argumentos de los declaraos"
+#: eval.c:2139
+msgid "`continue' outside a loop is not allowed"
+msgstr "nun se permite `continue' fuera d'un ciclu"
-#: eval.c:1948
-#, c-format
-msgid "function `%s' not defined"
-msgstr "la función `%s' nun ta definida"
+#: eval.c:2145
+#, fuzzy
+msgid "`break' outside a loop is not allowed"
+msgstr "nun se permite `break' fuera d'un ciclu"
-#: eval.c:1950
+#: eval.c:2229
#, c-format
-msgid "identifier `%s' is not a function"
+msgid "for loop: array `%s' changed size from %ld to %ld during loop execution"
msgstr ""
+"ciclo for: la matriz `%s' camudó de tamañu de %ld a %ld durante la execución "
+"del ciclu"
-#: eval.c:1997
+#: eval.c:2342
#, c-format
-msgid ""
-"function parameter `%s' is not a scalar and cannot be used for indirect "
-"function call"
+msgid "function called indirectly through `%s' does not exist"
msgstr ""
-#: eval.c:2014
+#: eval.c:2354
#, c-format
-msgid "indirect call of real function `%s' is silly"
-msgstr ""
+msgid "function `%s' not defined"
+msgstr "la función `%s' nun ta definida"
-#: eval.c:2034
-#, c-format
-msgid "function `%s' called indirectly through `%s' does not exist"
-msgstr ""
+#: eval.c:2481
+#, fuzzy, c-format
+msgid "`nextfile' cannot be called from a `%s' rule"
+msgstr "`nextfile' nun puede llamase dende una regla END"
-#: eval.c:2039
-#, c-format
-msgid "identifier `%s' cannot be used for indirect function call"
-msgstr ""
+#: eval.c:2540
+#, fuzzy, c-format
+msgid "`next' cannot be called from a `%s' rule"
+msgstr "`next' nun puede llamase dende una regla END"
-#: eval.c:2105
+#: eval.c:2602
#, c-format
-msgid ""
-"\n"
-"\t# Function Call Stack:\n"
-"\n"
+msgid "Sorry, don't know how to interpret `%s'"
msgstr ""
-"\n"
-"\t# Pila de Llamaes de Funciones:\n"
-"\n"
-#: eval.c:2108
-#, c-format
-msgid "\t# -- main --\n"
-msgstr "\t# -- principal --\n"
-
-#: eval.c:2269
-msgid "attempt to field reference from non-numeric value"
-msgstr "intentóse una referencia de campu dende un valor que nun ye un númberu"
-
-#: eval.c:2271
-msgid "attempt to reference from null string"
-msgstr "intentóse una referencia dende una cadena nula"
-
-#: eval.c:2277
-#, c-format
-msgid "attempt to access field %d"
-msgstr "intentóse acceder al campu %d"
-
-#: eval.c:2298 eval.c:2305 profile.c:843
-msgid "assignment is not allowed to result of builtin function"
-msgstr "nun se permite l'asignación como resultáu d'una función interna"
-
-#: eval.c:2369
-msgid "`IGNORECASE' is a gawk extension"
-msgstr "`IGNORECASE' ye una estensión de gawk"
-
-#: eval.c:2398
-msgid "`BINMODE' is a gawk extension"
-msgstr "`BINMODE' ye una estensión de gawk"
-
-#: eval.c:2456
-#, c-format
-msgid "BINMODE value `%s' is invalid, treated as 3"
-msgstr "valor BINMODE `%s' nun ye válidu, tratáu como 3"
-
-#: eval.c:2546
-#, c-format
-msgid "bad `%sFMT' specification `%s'"
-msgstr "especificación `%sFMT' `%s' errónea"
-
-#: eval.c:2624
-msgid "turning off `--lint' due to assignment to `LINT'"
-msgstr "desactivase `--lint' darréu d'una asignación a `LINT'"
-
-#: ext.c:61
-msgid "extensions not allowed in sandbox mode"
+#: ext.c:62
+msgid "extensions are not allowed in sandbox mode"
msgstr ""
-#: ext.c:65 ext.c:70
+#: ext.c:68 ext.c:73
msgid "`extension' is a gawk extension"
msgstr "`extension' ye una estensión de gawk"
-#: ext.c:80
-#, c-format
-msgid "extension: cannot open `%s' (%s)\n"
+#: ext.c:83
+#, fuzzy, c-format
+msgid "fatal: extension: cannot open `%s' (%s)\n"
msgstr "extension: nun puede abrise `%s' (%s)\n"
-#: ext.c:88
-#, c-format
-msgid "extension: library `%s': cannot call function `%s' (%s)\n"
+#: ext.c:93
+#, fuzzy, c-format
+msgid "fatal: extension: library `%s': cannot call function `%s' (%s)\n"
msgstr ""
"extension: la biblioteca `%s': nun puede llamase a la función `%s' (%s)\n"
-#: ext.c:108
+#: ext.c:123
msgid "extension: missing function name"
msgstr "extension: falta'l nome de la función"
-#: ext.c:113
+#: ext.c:128
#, c-format
msgid "extension: illegal character `%c' in function name `%s'"
msgstr "extension: caráuter illegal `%c' nel nome de la función `%s'"
-#: ext.c:119
+#: ext.c:137
#, c-format
msgid "extension: can't redefine function `%s'"
msgstr "extension: nun puede redefinise la función `%s'"
-#: ext.c:123
+#: ext.c:141
#, c-format
msgid "extension: function `%s' already defined"
msgstr "extension: la función `%s' ya ta definida"
-#: ext.c:128
+#: ext.c:146
+#, c-format
+msgid "extension: function name `%s' previously defined"
+msgstr "extension: el nome de función `%s' definióse previamente"
+
+#: ext.c:148
#, c-format
msgid "extension: can't use gawk built-in `%s' as function name"
msgstr ""
"extension: nun puede usase la orde interna de gawk `%s' como nome de función"
-#: ext.c:130
+#: ext.c:152
#, c-format
-msgid "extension: function name `%s' previously defined"
-msgstr "extension: el nome de función `%s' definióse previamente"
+msgid "make_builtin: negative argument count for function `%s'"
+msgstr ""
-#: ext.c:207
-#, c-format
+#: ext.c:255
+#, fuzzy, c-format
msgid "function `%s' defined to take no more than %d argument(s)"
msgstr "la función `%s' definióse pa tomar non más de %d argumentu(os)"
-#: ext.c:210
+#: ext.c:258
#, c-format
msgid "function `%s': missing argument #%d"
msgstr "función `%s': falta l'argumentu #%d"
-#: ext.c:220
+#: ext.c:268
#, c-format
msgid "function `%s': argument #%d: attempt to use scalar as an array"
msgstr "función `%s': argumentu #%d: intentóse usar un escalar como una matriz"
-#: ext.c:224
+#: ext.c:272
#, c-format
msgid "function `%s': argument #%d: attempt to use array as a scalar"
msgstr "función `%s': argumentu #%d: intentóse usar una matriz como un escalar"
-#: ext.c:249
+#: ext.c:285
msgid "Operation Not Supported"
msgstr "Operación Non Sofitada"
@@ -1150,58 +1088,57 @@ msgstr "Operación Non Sofitada"
msgid "NF set to negative value"
msgstr "NF con un valor negativu"
-#: field.c:913
-msgid "split: second argument is not an array"
-msgstr "split: el segundu argumentu nun ye una matriz"
-
-#: field.c:922 field.c:932 field.c:937
+#: field.c:939 field.c:946 field.c:950
#, fuzzy
msgid "split: fourth argument is a gawk extension"
msgstr "match: el tercer argumentu ye una estensión de gawk"
-#: field.c:928
+#: field.c:943
#, fuzzy
msgid "split: fourth argument is not an array"
msgstr "split: el segundu argumentu nun ye una matriz"
-#: field.c:975
-#, fuzzy
-msgid "split: null string for third argument is a gawk extension"
+#: field.c:957
+msgid "split: second argument is not an array"
+msgstr "split: el segundu argumentu nun ye una matriz"
+
+#: field.c:987
+msgid "split: null string for third arg is a gawk extension"
msgstr "split: la cadena nula pal tercer argumentu ye una estensión de gawk"
-#: field.c:1032
+#: field.c:1028
#, fuzzy
-msgid "patsplit: second argument is not an array"
+msgid "patsplit: fourth argument is not an array"
msgstr "split: el segundu argumentu nun ye una matriz"
-#: field.c:1041
+#: field.c:1033
#, fuzzy
-msgid "patsplit: fourth argument is not an array"
+msgid "patsplit: second argument is not an array"
msgstr "split: el segundu argumentu nun ye una matriz"
-#: field.c:1067
+#: field.c:1051
#, fuzzy
msgid "patsplit: third argument must be non-null"
msgstr "match: el tercer argumentu nun ye una matriz"
-#: field.c:1111
+#: field.c:1084
msgid "`FIELDWIDTHS' is a gawk extension"
msgstr "`FIELDWIDTHS' ye una estensión gawk"
-#: field.c:1141 field.c:1155
+#: field.c:1147
#, c-format
msgid "invalid FIELDWIDTHS value, near `%s'"
msgstr "valor de FIELDWIDTHS non válidu, cerca de `%s'"
-#: field.c:1238
+#: field.c:1220
msgid "null string for `FS' is a gawk extension"
msgstr "la cadena nula pa `FS' ye una estensión de gawk"
-#: field.c:1242
+#: field.c:1224
msgid "old awk does not support regexps as value of `FS'"
msgstr "l'awk antiguu nun almite espresiones regulares como valor de `FS'"
-#: field.c:1357
+#: field.c:1343
#, fuzzy
msgid "`FPAT' is a gawk extension"
msgstr "`%s' ye una estensión de gawk"
@@ -1261,509 +1198,507 @@ msgstr "%s: la opción '-W %s' nun almite dengún argumentu\n"
msgid "%s: option '-W %s' requires an argument\n"
msgstr "%s: la opción '%s' requier un argumentu\n"
-#: io.c:379
+#: io.c:272
#, c-format
msgid "command line argument `%s' is a directory: skipped"
msgstr ""
-#: io.c:413
+#: io.c:275 io.c:372
#, c-format
msgid "cannot open file `%s' for reading (%s)"
msgstr "nun puede abrise'l ficheru `%s' pa llectura (%s)"
-#: io.c:459 io.c:2999
+#: io.c:419
#, c-format
msgid "error reading input file `%s': %s"
msgstr "fallu al lleer el ficheru d'entrada `%s': %s"
-#: io.c:506
+#: io.c:470
#, c-format
msgid "close of fd %d (`%s') failed (%s)"
msgstr "falló al zarrar el df %d (`%s') (%s)"
-#: io.c:617
-msgid "redirection not allowed in sandbox mode"
-msgstr ""
-
-#: io.c:648
-#, c-format
-msgid "invalid tree type %s in redirect()"
-msgstr "triba d'árbol %s non válidu en redirect()"
-
-#: io.c:654
+#: io.c:577
#, c-format
msgid "expression in `%s' redirection only has numeric value"
msgstr "la espresión na redirección `%s' namái tien un valor numbéricu"
-#: io.c:660
+#: io.c:583
#, c-format
msgid "expression for `%s' redirection has null string value"
msgstr "la espresión pa la redirección `%s' tien un valor de cadena nula"
-#: io.c:665
+#: io.c:589
#, c-format
msgid "filename `%s' for `%s' redirection may be result of logical expression"
msgstr ""
"el ficheru `%s' pa la redirección `%s' puede ser resultáu d'una espresión "
"llógica"
-#: io.c:707
+#: io.c:628
#, c-format
msgid "unnecessary mixing of `>' and `>>' for file `%.*s'"
msgstr "mezcla innecesaria de `>' y `>>' pal ficheru `%.*s'"
-#: io.c:754
+#: io.c:681
#, c-format
msgid "can't open pipe `%s' for output (%s)"
msgstr "nun puede abrise la tubería `%s' pa la salida (%s)"
-#: io.c:763
+#: io.c:691
#, c-format
msgid "can't open pipe `%s' for input (%s)"
msgstr "nun puede abrise la tubería `%s' pa la entrada (%s)"
-#: io.c:786
+#: io.c:712
#, c-format
msgid "can't open two way pipe `%s' for input/output (%s)"
msgstr "nun puede abrise la tubería de dos víes `%s' pa entrada/salida (%s)"
-#: io.c:864
+#: io.c:794
#, c-format
msgid "can't redirect from `%s' (%s)"
msgstr "nun puede redirixise dende `%s' (%s)"
-#: io.c:867
+#: io.c:797
#, c-format
msgid "can't redirect to `%s' (%s)"
msgstr "nun puede redirixise a `%s' (%s)"
-#: io.c:920
+#: io.c:846
msgid ""
"reached system limit for open files: starting to multiplex file descriptors"
msgstr ""
"alcanzóse'l llímite del sistema pa ficheros abiertos: entamando a "
"multiplexar los descriptores de ficheru"
-#: io.c:936
+#: io.c:862
#, c-format
msgid "close of `%s' failed (%s)."
msgstr "falló al zarrar `%s' (%s)."
-#: io.c:944
+#: io.c:870
msgid "too many pipes or input files open"
msgstr "demasiaes tuberíes o ficheros d'entrada abiertos"
-#: io.c:967
+#: io.c:892
msgid "close: second argument must be `to' or `from'"
msgstr "close: el segundu argumentu tien de ser `to' o `from'"
-#: io.c:981
+#: io.c:909
#, c-format
msgid "close: `%.*s' is not an open file, pipe or co-process"
msgstr "close: `%.*s' nun ye un ficheru abierto, tubería o co-procesu"
-#: io.c:986
+#: io.c:914
msgid "close of redirection that was never opened"
msgstr "zarráu d'una redirección qu'enxamás foi abierta"
-#: io.c:1083
+#: io.c:1011
#, c-format
msgid "close: redirection `%s' not opened with `|&', second argument ignored"
msgstr ""
"close: la redirección `%s' nun s'abre con `|&', ignoróse'l segundu argumentu"
-#: io.c:1099
+#: io.c:1027
#, c-format
msgid "failure status (%d) on pipe close of `%s' (%s)"
msgstr "estáu de fallu (%d) al zarrar la tubería de `%s' (%s)"
-#: io.c:1102
+#: io.c:1030
#, c-format
msgid "failure status (%d) on file close of `%s' (%s)"
msgstr "estáu de fallu (%d) al zarrar el ficheru de `%s' (%s)"
-#: io.c:1122
+#: io.c:1050
#, c-format
msgid "no explicit close of socket `%s' provided"
msgstr "nun se provee'l zarráu esplícitu del `socket' `%s'"
-#: io.c:1125
+#: io.c:1053
#, c-format
msgid "no explicit close of co-process `%s' provided"
msgstr "nun se provee'l zarráu esplícitu del co-procesu `%s'"
-#: io.c:1128
+#: io.c:1056
#, c-format
msgid "no explicit close of pipe `%s' provided"
msgstr "nun se provee'l zarráu esplícitu de la tubería `%s'"
-#: io.c:1131
+#: io.c:1059
#, c-format
msgid "no explicit close of file `%s' provided"
msgstr "nun se provee'l zarráu explícitu del ficheru `%s'"
-#: io.c:1159 io.c:1214 main.c:832 main.c:874
+#: io.c:1087 io.c:1142 main.c:823 main.c:865
#, c-format
msgid "error writing standard output (%s)"
msgstr "fallu al escribir na salida standard (%s)"
-#: io.c:1163 io.c:1219
+#: io.c:1091 io.c:1147
#, c-format
msgid "error writing standard error (%s)"
msgstr "fallu al escribir na salida standard de fallu (%s)"
-#: io.c:1171
+#: io.c:1099
#, c-format
msgid "pipe flush of `%s' failed (%s)."
msgstr "falló la limpieza de la tubería de `%s' (%s)."
-#: io.c:1174
+#: io.c:1102
#, c-format
msgid "co-process flush of pipe to `%s' failed (%s)."
msgstr "falló la limpieza del co-procesu de la tubería a `%s' (%s)."
-#: io.c:1177
+#: io.c:1105
#, c-format
msgid "file flush of `%s' failed (%s)."
msgstr "falló la limpieza del ficheru de `%s' (%s)."
-#: io.c:1292
+#: io.c:1219
#, c-format
msgid "local port %s invalid in `/inet'"
msgstr "puertu llocal %s non válidu en `/inet'"
-#: io.c:1309
+#: io.c:1236
#, c-format
msgid "remote host and port information (%s, %s) invalid"
msgstr "anfitrión remotu ya información de puertu (%s, %s) inválidos"
-#: io.c:1344
+#: io.c:1276
msgid "/inet/raw client not ready yet, sorry"
msgstr "perdón, el veceru /inet/raw nun ta llistu entá"
-#: io.c:1347 io.c:1383
+#: io.c:1279 io.c:1320
msgid "only root may use `/inet/raw'."
msgstr "namái root puede usar `/inet/raw'."
-#: io.c:1381
+#: io.c:1318
msgid "/inet/raw server not ready yet, sorry"
msgstr "perdón, el sirvidor /inet/raw nun ta llistu entá"
-#: io.c:1477
+#: io.c:1417
#, c-format
msgid "no (known) protocol supplied in special filename `%s'"
msgstr ""
"nun se proporciona dalgún protocolu (conocíu) nel nome de ficheru especial `%"
"s'"
-#: io.c:1491
+#: io.c:1431
#, c-format
msgid "special file name `%s' is incomplete"
msgstr "el nome de ficheru especial `%s' ta incompletu"
-#: io.c:1506
+#: io.c:1447
msgid "must supply a remote hostname to `/inet'"
msgstr "tien d'apurrise a `/inet' un nome d'anfitrión remotu"
-#: io.c:1524
+#: io.c:1465
msgid "must supply a remote port to `/inet'"
msgstr "tien d'apurrise a `/inet' un puertu remotu"
-#: io.c:1570
+#: io.c:1511
msgid "TCP/IP communications are not supported"
msgstr "Nun tan sofitaes comunicaciones TCP/IP"
-#: io.c:1758
+#: io.c:1698
#, c-format
msgid "could not open `%s', mode `%s'"
msgstr "nun puede abrise `%s', mou `%s'"
-#: io.c:1809
+#: io.c:1749
#, c-format
msgid "close of master pty failed (%s)"
msgstr "falló al zarrar el pty mayestru (%s)"
-#: io.c:1811 io.c:1963 io.c:2114
+#: io.c:1751 io.c:1918 io.c:2075
#, c-format
msgid "close of stdout in child failed (%s)"
msgstr "falló al zarrar la salida standard nel fíu (%s)"
-#: io.c:1814
+#: io.c:1754
#, c-format
msgid "moving slave pty to stdout in child failed (dup: %s)"
msgstr ""
"falló'l movimientu del pty esclavu a la salida standard nel fíu (dup: %s)"
-#: io.c:1816 io.c:1968
+#: io.c:1756 io.c:1923
#, c-format
msgid "close of stdin in child failed (%s)"
msgstr "falló al zarrar la entrada standard nel fíu (%s)"
-#: io.c:1819
+#: io.c:1759
#, c-format
msgid "moving slave pty to stdin in child failed (dup: %s)"
msgstr ""
"falló'l movimientu del pty esclavu a la entrada standard nel fíu (dup: %s)"
-#: io.c:1821 io.c:1840
+#: io.c:1761 io.c:1782
#, c-format
msgid "close of slave pty failed (%s)"
msgstr "falló al zarrar el pty esclavu (%s)"
-#: io.c:1914 io.c:1966 io.c:2095 io.c:2117
+#: io.c:1860 io.c:1921 io.c:2053 io.c:2078
#, c-format
msgid "moving pipe to stdout in child failed (dup: %s)"
msgstr "falló'l movimientu a la salida standard nel fíu (dup: %s)"
-#: io.c:1918 io.c:1971
+#: io.c:1867 io.c:1926
#, c-format
msgid "moving pipe to stdin in child failed (dup: %s)"
msgstr ""
"falló'l movimiento de la tubería a la entrada standard nel fíu (dup: %s)"
-#: io.c:1935 io.c:2108
+#: io.c:1887 io.c:2068
msgid "restoring stdout in parent process failed\n"
msgstr "falló la restauración de la salida standard nel procesu padre\n"
-#: io.c:1940
+#: io.c:1895
msgid "restoring stdin in parent process failed\n"
msgstr "falló la restauración de la entrada standard nel procesu padre\n"
-#: io.c:1974 io.c:2119 io.c:2130
+#: io.c:1929 io.c:2080 io.c:2094
#, c-format
msgid "close of pipe failed (%s)"
msgstr "falló al zarrar la tubería (%s)"
-#: io.c:2019
+#: io.c:1974
msgid "`|&' not supported"
msgstr "`|&' nun sofitao"
-#: io.c:2085
+#: io.c:2040
#, c-format
msgid "cannot open pipe `%s' (%s)"
msgstr "nun puede abrise la tubería `%s' (%s)"
-#: io.c:2126
+#: io.c:2088
#, c-format
msgid "cannot create child process for `%s' (fork: %s)"
msgstr "nun puede criase'l procesu fíu pa `%s' (fork: %s)"
-#: io.c:2518
+#: io.c:2577
#, c-format
msgid "data file `%s' is empty"
msgstr "el ficheru de datos `%s' ta baleru"
-#: io.c:2560 io.c:2568
+#: io.c:2618 io.c:2626
msgid "could not allocate more input memory"
msgstr "nun puede reservase más memoria d'entrada"
-#: io.c:3125
+#: io.c:3173
msgid "multicharacter value of `RS' is a gawk extension"
msgstr "el valor multicarauter de `RS' ye una estensión de gawk"
-#: main.c:313
+#: main.c:311
msgid "out of memory"
msgstr "fuera de memoria"
-#: main.c:381
+#: main.c:388
msgid "`-m[fr]' option irrelevant in gawk"
msgstr "la opción -m[fr] ye irrelevante en gawk"
-#: main.c:383
+#: main.c:390
msgid "-m option usage: `-m[fr] nnn'"
msgstr "usu de la opción -m: `-m[fr]' nnn"
-#: main.c:419
+#: main.c:426
#, fuzzy
msgid "empty argument to `-e/--source' ignored"
msgstr "ignorase l'argumentu baleru pa `--source'"
-#: main.c:485
+#: main.c:492
#, c-format
msgid "%s: option `-W %s' unrecognized, ignored\n"
msgstr "%s: nun se reconoz la opción `-W %s', ignorase\n"
-#: main.c:530
+#: main.c:545
#, c-format
msgid "%s: option requires an argument -- %c\n"
msgstr "%s: la opción requier un argumentu -- %c\n"
-#: main.c:551
+#: main.c:566
msgid "environment variable `POSIXLY_CORRECT' set: turning on `--posix'"
msgstr ""
"la variable d'ambiente `POSIXLY_CORRECT' ta afitada: activase `--posix'"
-#: main.c:557
+#: main.c:572
msgid "`--posix' overrides `--traditional'"
msgstr "`--posix' imponse a `--traditional'"
-#: main.c:568
+#: main.c:583
msgid "`--posix'/`--traditional' overrides `--non-decimal-data'"
msgstr "`--posix'/`--traditional' imponense a `--non-decimal-data'"
-#: main.c:572
+#: main.c:587
#, c-format
msgid "running %s setuid root may be a security problem"
msgstr "executar %s como setuid root puede ser un problema de seguridá"
-#: main.c:577
+#: main.c:592
#, fuzzy
msgid "`--posix' overrides `--binary'"
msgstr "`--posix' imponse a `--traditional'"
-#: main.c:622
+#: main.c:643
#, c-format
msgid "can't set binary mode on stdin (%s)"
msgstr "nun puede afitase'l mou binariu na entrada standard (%s)"
-#: main.c:625
+#: main.c:646
#, c-format
msgid "can't set binary mode on stdout (%s)"
msgstr "nun puede afitase'l mou binariu na salida standard (%s)"
-#: main.c:627
+#: main.c:648
#, c-format
msgid "can't set binary mode on stderr (%s)"
msgstr "nun puede afitase'l mou binariu na salida standard de fallu (%s)"
-#: main.c:668
+#: main.c:687
msgid "no program text at all!"
msgstr "¡Non hai dengún programa de testu!"
-#: main.c:773
+#: main.c:762
#, c-format
msgid "Usage: %s [POSIX or GNU style options] -f progfile [--] file ...\n"
msgstr ""
"Mou d'emplegu: %s [opciones estilu POSIX o GNU] -f fichprog [--] "
"ficheru ...\n"
-#: main.c:775
+#: main.c:764
#, c-format
msgid "Usage: %s [POSIX or GNU style options] [--] %cprogram%c file ...\n"
msgstr ""
"Mou d'emplegu: %s [opciones estilu POSIX o GNU] [--] %cprograma%c "
"ficheru ...\n"
-#: main.c:780
+#: main.c:769
#, fuzzy
msgid "POSIX options:\t\tGNU long options: (standard)\n"
msgstr "Opciones POSIX:\t\tOpciones llargues GNU:\n"
-#: main.c:781
+#: main.c:770
msgid "\t-f progfile\t\t--file=progfile\n"
msgstr "\t-f fichprog\t\t--file=fichprog\n"
-#: main.c:782
+#: main.c:771
msgid "\t-F fs\t\t\t--field-separator=fs\n"
msgstr "\t-F sc\t\t\t--field-separator=sc\n"
-#: main.c:783
+#: main.c:772
msgid "\t-v var=val\t\t--assign=var=val\n"
msgstr "\t-v var=valor\t\t--assign=var=valor\n"
-#: main.c:784
+#: main.c:773
#, fuzzy
-msgid "POSIX options:\t\tGNU long options: (extensions)\n"
+msgid "Short options:\t\tGNU long options: (extensions)\n"
msgstr "Opciones POSIX:\t\tOpciones llargues GNU:\n"
-#: main.c:785
+#: main.c:774
msgid "\t-m[fr] val\n"
msgstr "\t-m[fr] valor\n"
-#: main.c:786
+#: main.c:775
msgid "\t-b\t\t\t--characters-as-bytes\n"
msgstr ""
-#: main.c:787
-msgid "\t-c\t\t\t--compat, --traditional\n"
-msgstr ""
+#: main.c:776
+#, fuzzy
+msgid "\t-c\t\t\t--traditional\n"
+msgstr "\t-W traditional\t\t--traditional\n"
-#: main.c:788
+#: main.c:777
#, fuzzy
-msgid "\t-C\t\t\t--copyleft, --copyright\n"
+msgid "\t-C\t\t\t--copyright\n"
msgstr "\t-W copyright\t\t--copyright\n"
-#: main.c:789
+#: main.c:778
#, fuzzy
msgid "\t-d [file]\t\t--dump-variables[=file]\n"
msgstr "\t-W dump-variables[=ficheru]\t--dump-variables[=ficheru]\n"
# Esta es la llinia más larga de la llista de argumentos.
# Probar con gawk pa revisar tabuladores. cfuga
-#: main.c:790
+#: main.c:779
#, fuzzy
msgid "\t-e 'program-text'\t--source='program-text'\n"
msgstr "\t-W source=testu-prog\t--source=testu-prog\n"
-#: main.c:791
+#: main.c:780
#, fuzzy
msgid "\t-E file\t\t\t--exec=file\n"
msgstr "\t-W exec=ficheru\t\t--exec=ficheru\n"
-#: main.c:792
+#: main.c:781
#, fuzzy
msgid "\t-g\t\t\t--gen-pot\n"
msgstr "\t-W gen-po\t\t--gen-po\n"
-#: main.c:793
+#: main.c:782
#, fuzzy
-msgid "\t-h\t\t\t--help, --usage\n"
+msgid "\t-h\t\t\t--help\n"
msgstr "\t-W help\t\t\t--help\n"
-#: main.c:794
+#: main.c:783
#, fuzzy
-msgid "\t-l [fatal]\t\t--lint[=fatal]\n"
+msgid "\t-L [fatal]\t\t--lint[=fatal]\n"
msgstr "\t-W lint[=fatal]\t\t--lint[=fatal]\n"
-#: main.c:795
-#, fuzzy
-msgid "\t-L\t\t\t--lint-old\n"
-msgstr "\t-W lint-old\t\t--lint-old\n"
-
-#: main.c:796
+#: main.c:784
#, fuzzy
msgid "\t-n\t\t\t--non-decimal-data\n"
msgstr "\t-W non-decimal-data\t--non-decimal-data\n"
-#: main.c:797
+#: main.c:785
#, fuzzy
msgid "\t-N\t\t\t--use-lc-numeric\n"
msgstr "\t\\t-W usa-lc-numeric\\t--usa-lc-numeric\\n\n"
-#: main.c:798
+#: main.c:786
msgid "\t-O\t\t\t--optimize\n"
msgstr "\t-O\t\t\t--optimize\n"
-#: main.c:799
+#: main.c:787
#, fuzzy
msgid "\t-p [file]\t\t--profile[=file]\n"
msgstr "\t-W profile[=ficheru]\t--profile[=ficheru]\n"
-#: main.c:800
+#: main.c:788
#, fuzzy
msgid "\t-P\t\t\t--posix\n"
msgstr "\t-W posix\t\t--posix\n"
-#: main.c:801
+#: main.c:789
#, fuzzy
msgid "\t-r\t\t\t--re-interval\n"
msgstr "\t-W re-interval\t\t--re-interval\n"
-#: main.c:802
+#: main.c:791
+#, fuzzy
+msgid "\t-R file\t\t\t--command=file\n"
+msgstr "\t-W exec=ficheru\t\t--exec=ficheru\n"
+
+#: main.c:792
msgid "\t-S\t\t\t--sandbox\n"
msgstr ""
-#: main.c:803
+#: main.c:793
+#, fuzzy
+msgid "\t-t\t\t\t--lint-old\n"
+msgstr "\t-W lint-old\t\t--lint-old\n"
+
+#: main.c:794
#, fuzzy
msgid "\t-V\t\t\t--version\n"
msgstr "\t-W version\t\t--version\n"
-#: main.c:805
+#: main.c:796
msgid "\t-W nostalgia\t\t--nostalgia\n"
msgstr "\t-W nostalgia\t\t--nostalgia\n"
-#: main.c:808
-msgid "\t-W parsedebug\t\t--parsedebug\n"
+#: main.c:799
+#, fuzzy
+msgid "\t-Y\t\t--parsedebug\n"
msgstr "\t-W parsedebug\t\t--parsedebug\n"
#. TRANSLATORS: --help output 5 (end)
@@ -1771,7 +1706,7 @@ msgstr "\t-W parsedebug\t\t--parsedebug\n"
#. for this application. Please add _another line_ with the
#. address for translation bugs.
#. no-wrap
-#: main.c:817
+#: main.c:808
msgid ""
"\n"
"To report bugs, see node `Bugs' in `gawk.info', which is\n"
@@ -1783,7 +1718,7 @@ msgstr ""
"correspuende a la seición `Reporting Problems and Bugs' na versión impresa.\n"
"\n"
-#: main.c:821
+#: main.c:812
msgid ""
"gawk is a pattern scanning and processing language.\n"
"By default it reads standard input and writes standard output.\n"
@@ -1793,7 +1728,7 @@ msgstr ""
"Por omisión llee la entrada standard y escribe na salida standard.\n"
"\n"
-#: main.c:825
+#: main.c:816
msgid ""
"Examples:\n"
"\tgawk '{ sum += $1 }; END { print sum }' file\n"
@@ -1803,7 +1738,7 @@ msgstr ""
"\tgawk '{ sum += $1 }; END { print sum }' ficheru\n"
"\tgawk -F: '{ print $1 }' /etc/passwd\n"
-#: main.c:845
+#: main.c:836
#, c-format
msgid ""
"Copyright (C) 1989, 1991-%d Free Software Foundation.\n"
@@ -1822,7 +1757,7 @@ msgstr ""
"(at your option) any later version.\n"
"\n"
-#: main.c:853
+#: main.c:844
msgid ""
"This program is distributed in the hope that it will be useful,\n"
"but WITHOUT ANY WARRANTY; without even the implied warranty of\n"
@@ -1836,7 +1771,7 @@ msgstr ""
"GNU General Public License for more details.\n"
"\n"
-#: main.c:864
+#: main.c:855
msgid ""
"You should have received a copy of the GNU General Public License\n"
"along with this program. If not, see http://www.gnu.org/licenses/.\n"
@@ -1844,16 +1779,16 @@ msgstr ""
"You should have received a copy of the GNU General Public License\n"
"along with this program. If not, see http://www.gnu.org/licenses/.\n"
-#: main.c:899
+#: main.c:890
msgid "-Ft does not set FS to tab in POSIX awk"
msgstr "-Ft non afita FS a tabulador nel awk de POSIX"
-#: main.c:1116
+#: main.c:1122
#, c-format
msgid "unknown value for field spec: %d\n"
msgstr ""
-#: main.c:1176
+#: main.c:1182
#, c-format
msgid ""
"%s: `%s' argument to `-v' not in `var=value' form\n"
@@ -1862,86 +1797,82 @@ msgstr ""
"%s: l'argumentu `%s' pa `-v' nun ye de la forma `var=valor'\n"
"\n"
-#: main.c:1196
+#: main.c:1202
#, c-format
msgid "`%s' is not a legal variable name"
msgstr "`%s' nun ye un nome de variable llegal"
-#: main.c:1199
+#: main.c:1205
#, c-format
msgid "`%s' is not a variable name, looking for file `%s=%s'"
msgstr "`%s' nun ye un nome de variable, guetase'l ficheru `%s=%s'"
-#: main.c:1238
+#: main.c:1258
msgid "floating point exception"
msgstr "escepción de coma flotante"
-#: main.c:1245
+#: main.c:1265
msgid "fatal error: internal error"
msgstr "fallu fatal: fallu internu"
-#: main.c:1260
+#: main.c:1280
msgid "fatal error: internal error: segfault"
msgstr "fallu fatal: fallu internu: segfault"
-#: main.c:1272
+#: main.c:1292
msgid "fatal error: internal error: stack overflow"
msgstr "fallu fatal: fallu internu: stack overflow"
-#: main.c:1322
+#: main.c:1342
#, c-format
msgid "no pre-opened fd %d"
msgstr "nun esiste'l df %d abiertu previamente"
-#: main.c:1329
+#: main.c:1349
#, c-format
msgid "could not pre-open /dev/null for fd %d"
msgstr "nun puede abrise previamente /dev/null pal df %d"
-#: main.c:1352 main.c:1361
+#: main.c:1372 main.c:1381
#, c-format
msgid "could not find groups: %s"
msgstr "nun pueden atopase los grupos: %s"
-#: msg.c:54
+#: msg.c:62
#, c-format
msgid "cmd. line:"
msgstr "llinia ord.:"
-#: msg.c:120
+#: msg.c:97
msgid "warning: "
msgstr "avisu: "
-#: msg.c:142
+#: msg.c:106
msgid "error: "
msgstr "fallu: "
-#: msg.c:178
+#: msg.c:129
msgid "fatal: "
msgstr "fatal: "
-#: node.c:63 node.c:78 node.c:105 node.c:121 node.c:151
-msgid "can't convert string to float"
-msgstr "nun puede convertise una cadena a coma flotante"
-
-#: node.c:465
+#: node.c:401
msgid "backslash at end of string"
msgstr "barra invertida al final de la cadena"
-#: node.c:609
+#: node.c:502
#, c-format
msgid "old awk does not support the `\\%c' escape sequence"
msgstr "l'awk antiguu nun almite la secuencia d'escape `\\%c'"
-#: node.c:660
+#: node.c:553
msgid "POSIX does not allow `\\x' escapes"
msgstr "POSIX nun permite escapes `\\x'"
-#: node.c:666
+#: node.c:559
msgid "no hex digits in `\\x' escape sequence"
msgstr "nun hai díxitos hexadecimales na secuencia d'escape `\\x'"
-#: node.c:688
+#: node.c:581
#, c-format
msgid ""
"hex escape \\x%.*s of %d characters probably not interpreted the way you "
@@ -1950,86 +1881,56 @@ msgstr ""
"carauteres hexadecimales d'escape \\x%.*s de %d carauteres probablemente nun "
"s'interpreten como esperes"
-#: node.c:703
+#: node.c:596
#, c-format
msgid "escape sequence `\\%c' treated as plain `%c'"
msgstr "la secuencia d'escape `\\%c' tratase como una simple `%c'"
+#: node.c:737
+msgid ""
+"Invalid multibyte data detected. There may be a mismatch between your data "
+"and your locale."
+msgstr ""
+
#: posix/gawkmisc.c:172
#, c-format
msgid "%s %s `%s': could not set close-on-exec: (fcntl: %s)"
msgstr "%s %s `%s': nun puede afitase close-on-exec: (fcntl: %s)"
-#: profile.c:94
+#: profile.c:83
#, c-format
msgid "could not open `%s' for writing: %s"
msgstr "nun puede abrise `%s' pa escritura: %s"
-#: profile.c:457
-#, c-format
-msgid "internal error: %s with null vname"
-msgstr "fallu internu: %s con vname null"
-
-#: profile.c:522
-msgid "# treated internally as `delete'"
-msgstr "# tratase internamente como `delete'"
-
-#: profile.c:1076
-#, c-format
-msgid "# this is a dynamically loaded extension function"
-msgstr "# esta ye una función d'estensión cargada dinámicamente"
-
-#: profile.c:1109
-#, c-format
-msgid "\t# gawk profile, created %s\n"
-msgstr "\t# perfil de gawk, criáu %s\n"
-
-#: profile.c:1112
-#, c-format
-msgid ""
-"\t# BEGIN block(s)\n"
-"\n"
-msgstr ""
-"\t# bloque(s) BEGIN\n"
-"\n"
-
-#: profile.c:1122
+#: profile.c:203
#, fuzzy, c-format
msgid ""
-"\t# BEGINFILE block(s)\n"
+"\t# %s block(s)\n"
"\n"
msgstr ""
-"\t# bloque(s) BEGIN\n"
+"\t# bloque(s) END\n"
"\n"
-#: profile.c:1132
-#, c-format
+#: profile.c:208
+#, fuzzy, c-format
msgid ""
-"\t# Rule(s)\n"
+"\t# %s(s)\n"
"\n"
msgstr ""
"\t# Regla(es)\n"
"\n"
-#: profile.c:1138
-#, fuzzy, c-format
-msgid ""
-"\t# ENDFILE block(s)\n"
-"\n"
-msgstr ""
-"\t# bloque(s) END\n"
-"\n"
+#: profile.c:278
+#, c-format
+msgid "internal error: %s with null vname"
+msgstr "fallu internu: %s con vname null"
-#: profile.c:1148
+#: profile.c:945
#, c-format
-msgid ""
-"\t# END block(s)\n"
-"\n"
-msgstr ""
-"\t# bloque(s) END\n"
-"\n"
+msgid "\t# gawk profile, created %s\n"
+msgstr "\t# perfil de gawk, criáu %s\n"
-#: profile.c:1168
+#: profile.c:1328
#, c-format
msgid ""
"\n"
@@ -2038,17 +1939,12 @@ msgstr ""
"\n"
"\t# Funciones, enumberaes alfabéticamente\n"
-#: profile.c:1431
-#, c-format
-msgid "unexpected type %s in prec_level"
-msgstr "triba %s inesperada en prec_level"
-
-#: profile.c:1557
+#: profile.c:1367
#, c-format
-msgid "Unknown node type %s in pp_var"
-msgstr "triba de nodu %s desconocida en pp_var"
+msgid "redir2str: unknown redirection type %d"
+msgstr ""
-#: re.c:537
+#: re.c:559
#, c-format
msgid "regexp component `%.*s' should probably be `[%.*s]'"
msgstr ""
@@ -2121,10 +2017,32 @@ msgstr "La espresión regular ye enforma grande"
msgid "Unmatched ) or \\)"
msgstr ") o \\) desemparexaos"
-#: regcomp.c:699
+#: regcomp.c:701
msgid "No previous regular expression"
msgstr "Nun hai una espresión regular previa"
+#~ msgid "call of `length' without parentheses is deprecated by POSIX"
+#~ msgstr "la llamada de `length' ensin paréntesis ta obsoleta por POSIX"
+
+#, fuzzy
+#~ msgid "reference to uninitialized field `$%s'"
+#~ msgstr "referencia al campu ensin anicializar `$%d'"
+
+#~ msgid "can't convert string to float"
+#~ msgstr "nun puede convertise una cadena a coma flotante"
+
+#~ msgid "`continue' outside a loop is not portable"
+#~ msgstr "`continue' fuera d'un ciclu nun ye tresportable"
+
+#~ msgid "`break' outside a loop is not portable"
+#~ msgstr "`break' fuera d'un ciclu nun ye tresportable"
+
+#~ msgid "`nextfile' cannot be called from a BEGIN rule"
+#~ msgstr "`nextfile' nun puede llamase dende una regla BEGIN"
+
+#~ msgid "`next' cannot be called from a BEGIN rule"
+#~ msgstr "`next' nun puede llamase dende una regla BEGIN"
+
#~ msgid "file `%s' is a directory"
#~ msgstr "el ficheru `%s' ye un direutoriu"
@@ -2140,14 +2058,130 @@ msgstr "Nun hai una espresión regular previa"
#~ msgid "\t-W copyleft\t\t--copyleft\n"
#~ msgstr "\t-W copyleft\t\t--copyleft\n"
-#~ msgid "\t-W traditional\t\t--traditional\n"
-#~ msgstr "\t-W traditional\t\t--traditional\n"
-
#~ msgid "\t-W usage\t\t--usage\n"
#~ msgstr "\t-W usage\t\t--usage\n"
+#~ msgid ""
+#~ "\t# BEGIN block(s)\n"
+#~ "\n"
+#~ msgstr ""
+#~ "\t# bloque(s) BEGIN\n"
+#~ "\n"
+
+#~ msgid "must use `count$' on all formats or none"
+#~ msgstr "tien de usase `count$' en tolos formatos o en dengún"
+
+#~ msgid "field width is ignored for `%%%%' specifier"
+#~ msgstr "anchor de campu ye ignoráu por especificador `%%%%'"
+
+#~ msgid "precision is ignored for `%%%%' specifier"
+#~ msgstr "precisión ye ignorada por especificador `%%%%'"
+
+#~ msgid "field width and precision are ignored for `%%%%' specifier"
+#~ msgstr "anchor campu y precisión ignoraos por especificador `%%%%'"
+
+#~ msgid "`$' is not permitted in awk formats"
+#~ msgstr "nun se permite `$' nos formatos d'awk"
+
+#~ msgid "arg count with `$' must be > 0"
+#~ msgstr "la cuenta d'argumentos con `$' tien de ser > 0"
+
+#~ msgid "arg count %ld greater than total number of supplied arguments"
+#~ msgstr ""
+#~ "la cuenta d'argumentos %ld ye mayor que'l númberu total d'argumentos "
+#~ "proporcionaos"
+
+#~ msgid "`$' not permitted after period in format"
+#~ msgstr "nun se permite `$' dempués d'un puntu nel formatu"
+
+#~ msgid "no `$' supplied for positional field width or precision"
+#~ msgstr ""
+#~ "nun se proporciona `$' pal anchor o la precisión del campu posicional"
+
+#~ msgid "`l' is meaningless in awk formats; ignored"
+#~ msgstr "`l' nun tien significáu nos formatos d'awk; descartase"
+
+#~ msgid "`l' is not permitted in POSIX awk formats"
+#~ msgstr "nun se permite `l' nos formatos POSIX d'awk"
+
+#~ msgid "`L' is meaningless in awk formats; ignored"
+#~ msgstr "`L' nun tien significáu nos formatos d'awk; descartase"
+
+#~ msgid "`L' is not permitted in POSIX awk formats"
+#~ msgstr "nun se permite `L' nos formatos POSIX d'awk"
+
+#~ msgid "`h' is meaningless in awk formats; ignored"
+#~ msgstr "`h' nun tien significáu nos formatos d'awk; descartase"
+
+#~ msgid "`h' is not permitted in POSIX awk formats"
+#~ msgstr "nun se permite `h' nos formatos POSIX d'awk"
+
+#~ msgid "[s]printf: value %g is out of range for `%%%c' format"
+#~ msgstr "[s]printf: el valor %g ta fuera del rangu pal formatu `%%%c'"
+
+#~ msgid ""
+#~ "ignoring unknown format specifier character `%c': no argument converted"
+#~ msgstr ""
+#~ "ignorando caráuter desconocíu especificáu de formatu `%c': ensin "
+#~ "argumentu convertíu"
+
+#~ msgid "not enough arguments to satisfy format string"
+#~ msgstr "nun hai suficientes argumentos pa satisfacer a la cadena de formatu"
+
+#~ msgid "^ ran out for this one"
+#~ msgstr "acabóse ^ pa esti"
+
+#~ msgid "[s]printf: format specifier does not have control letter"
+#~ msgstr "[s]printf: l'especificador de formatu nun tien lletres de control"
+
+#~ msgid "too many arguments supplied for format string"
+#~ msgstr "proporcionaronse demasiaos argumentos pa la cadena de formatu"
+
+#, fuzzy
+#~ msgid "attempt to use array parameter `%s' in a scalar context"
+#~ msgstr "intentóse usar la matriz `%s' nun contestu escalar"
+
#~ msgid "can't open two way socket `%s' for input/output (%s)"
#~ msgstr "nun puede abrise'l `socket' de dos víes `%s' pa entrada/salida (%s)"
+#, fuzzy
+#~ msgid "division by zero attempted in `/'"
+#~ msgstr "intentóse una división por cero en `/='"
+
+#, fuzzy
+#~ msgid "length: untyped parameter argument will be forced to scalar"
+#~ msgstr "llonxitú: argumentu ensin tipu será forzáu a escalar"
+
+#~ msgid "length: untyped argument will be forced to scalar"
+#~ msgstr "llonxitú: argumentu ensin tipu será forzáu a escalar"
+
+#~ msgid ""
+#~ "concatenation: side effects in one expression have changed the length of "
+#~ "another!"
+#~ msgstr ""
+#~ "concatenación: ¡Los efectos llaterales nuna espresión camudarón la "
+#~ "llonxitú d'otra!"
+
+#~ msgid "illegal type (%s) in tree_eval"
+#~ msgstr "triba illegal (%s) en tree_eval"
+
+#~ msgid "\t# -- main --\n"
+#~ msgstr "\t# -- principal --\n"
+
+#~ msgid "invalid tree type %s in redirect()"
+#~ msgstr "triba d'árbol %s non válidu en redirect()"
+
+#~ msgid "# treated internally as `delete'"
+#~ msgstr "# tratase internamente como `delete'"
+
+#~ msgid "# this is a dynamically loaded extension function"
+#~ msgstr "# esta ye una función d'estensión cargada dinámicamente"
+
+#~ msgid "unexpected type %s in prec_level"
+#~ msgstr "triba %s inesperada en prec_level"
+
+#~ msgid "Unknown node type %s in pp_var"
+#~ msgstr "triba de nodu %s desconocida en pp_var"
+
#~ msgid "%s: illegal option -- %c\n"
#~ msgstr "%s: opción illegal -- %c\n"
diff --git a/po/ca.gmo b/po/ca.gmo
index e4717572..a85f5db6 100644
--- a/po/ca.gmo
+++ b/po/ca.gmo
Binary files differ
diff --git a/po/ca.po b/po/ca.po
index 16202374..bdcb8973 100644
--- a/po/ca.po
+++ b/po/ca.po
@@ -6,7 +6,7 @@ msgid ""
msgstr ""
"Project-Id-Version: gawk 3.1.31\n"
"Report-Msgid-Bugs-To: arnold@skeeve.com\n"
-"POT-Creation-Date: 2010-11-12 12:20+0200\n"
+"POT-Creation-Date: 2010-11-17 08:48+0200\n"
"PO-Revision-Date: 2003-05-07 21:13+0100\n"
"Last-Translator: Antoni Bella Perez <bella5@teleline.es>\n"
"Language-Team: Catalan <ca@dodds.net>\n"
@@ -15,412 +15,488 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: KBabel 1.0.1\n"
-#: array.c:112
+#: array.c:103
+#, fuzzy, c-format
+msgid "from %s"
+msgstr "%s (de %s)"
+
+#: array.c:267
+#, fuzzy
+msgid "attempt to use a scalar value as array"
+msgstr "s'ha intentat usar la dada escalar «%s» com a una matriu"
+
+#: array.c:270
#, fuzzy, c-format
msgid "attempt to use function `%s' as an array"
msgstr "s'ha intentat usar la funció «%s» com a una matriu"
-#: array.c:115
+#: array.c:273
#, c-format
msgid "attempt to use scalar parameter `%s' as an array"
msgstr "s'ha intentat usar un paràmetre escalar «%s» com a una matriu"
-#: array.c:118
+#: array.c:276
#, c-format
msgid "attempt to use scalar `%s' as array"
msgstr "s'ha intentat usar la dada escalar «%s» com a una matriu"
-#: array.c:156
-#, fuzzy, c-format
-msgid "from %s"
-msgstr "%s (de %s)"
+#: array.c:321 array.c:648 eval.c:1075 eval.c:1079 eval.c:1581 eval.c:1649
+#: eval.c:1928
+#, c-format
+msgid "attempt to use array `%s' in a scalar context"
+msgstr "s'ha intentat usar la matriu «%s» en un context escalar"
-#: array.c:513
+#: array.c:570
#, fuzzy, c-format
msgid "reference to uninitialized element `%s[\"%.*s\"]'"
msgstr "referència a un element sense valor inicial «%s[\"%s\"]»"
-#: array.c:519
+#: array.c:576
#, c-format
msgid "subscript of array `%s' is null string"
msgstr "el subscript de la matriu «%s» és una cadena nul·la"
-#: array.c:623
+#: array.c:684
#, c-format
msgid "delete: index `%s' not in array `%s'"
msgstr "delete: l'índex «%s» no està en la matriu «%s»"
-#: array.c:792
+#: array.c:705
+#, fuzzy, c-format
+msgid "attempt to use scalar `%s[\"%.*s\"]' as an array"
+msgstr "s'ha intentat usar la dada escalar «%s» com a una matriu"
+
+#: array.c:868
#, c-format
msgid "%s: empty (null)\n"
msgstr "%s: buit (nul)\n"
-#: array.c:797
+#: array.c:873
#, c-format
msgid "%s: empty (zero)\n"
msgstr "%s: buit (zero)\n"
-#: array.c:801
+#: array.c:877
#, c-format
msgid "%s: table_size = %d, array_size = %d\n"
msgstr "%s: mida_taula = %d, mida_matriu = %d\n"
-#: array.c:830
+#: array.c:912
#, fuzzy, c-format
msgid "%s: is parameter\n"
msgstr "%s: és un paràmetre\n"
-#: array.c:835
+#: array.c:916
#, c-format
msgid "%s: array_ref to %s\n"
msgstr "%s: ref_matriu a %s\n"
-#: awkgram.y:224 awkgram.y:227
+#: array.c:921
+#, fuzzy
+msgid "adump: argument not an array"
+msgstr "asort: el primer argument no és una matriu"
+
+#: array.c:1139
+#, fuzzy
+msgid "attempt to use array in a scalar context"
+msgstr "s'ha intentat usar la matriu «%s» en un context escalar"
+
+#: array.c:1236
+#, fuzzy
+msgid "asort: second argument not an array"
+msgstr "asort: el segon argument no és una matriu"
+
+#: array.c:1237
+#, fuzzy
+msgid "asorti: second argument not an array"
+msgstr "asort: el segon argument no és una matriu"
+
+#: array.c:1245
+#, fuzzy
+msgid "asort: first argument not an array"
+msgstr "asort: el primer argument no és una matriu"
+
+#: array.c:1246
+#, fuzzy
+msgid "asorti: first argument not an array"
+msgstr "asort: el primer argument no és una matriu"
+
+#: awkgram.y:246
#, fuzzy, c-format
msgid "%s blocks must have an action part"
msgstr "Els blocs FINAL han de tindre una part d'acció"
-#: awkgram.y:230
+#: awkgram.y:249
#, fuzzy
msgid "each rule must have a pattern or an action part"
msgstr "Els blocs FINAL han de tindre una part d'acció"
-#: awkgram.y:266 awkgram.y:275
+#: awkgram.y:320 awkgram.y:330
#, fuzzy
msgid "old awk does not support multiple `BEGIN' or `END' rules"
msgstr "l'antic awk no suporta l'operador «**=»"
-#: awkgram.y:304
+#: awkgram.y:367
#, c-format
msgid "`%s' is a built-in function, it cannot be redefined"
msgstr "«%s» és una funció interna, no pot ser redefinida"
-#: awkgram.y:350
+#: awkgram.y:427
#, fuzzy
msgid "regexp constant `//' looks like a C++ comment, but is not"
msgstr ""
"la constant d'expressió regular «/%s/» sembla un comentari en C, perà no ho és"
-#: awkgram.y:353
+#: awkgram.y:430
#, c-format
msgid "regexp constant `/%s/' looks like a C comment, but is not"
msgstr ""
"la constant d'expressió regular «/%s/» sembla un comentari en C, perà no ho és"
-#: awkgram.y:380 awkgram.y:692
-msgid "statement may have no effect"
-msgstr "la declaració podria no tindre efecte"
+#: awkgram.y:735
+#, fuzzy
+msgid "`break' is not allowed outside a loop or switch"
+msgstr "no es permet «break» a fora d'un bucle"
+
+#: awkgram.y:744
+#, fuzzy
+msgid "`continue' is not allowed outside a loop"
+msgstr "no es permet «continue» a fora d'un bucle"
-#: awkgram.y:477 awkgram.y:480 awkgram.y:504 awkgram.y:511 awkgram.y:518
+#: awkgram.y:753
#, fuzzy, c-format
-msgid "`%s' used in %s action"
+msgid "`next' used in %s action"
msgstr "«next» és usat dintre de l'acció BEGIN o END"
-#: awkgram.y:495 awkgram.y:499
+#: awkgram.y:767 awkgram.y:771
msgid "`nextfile' is a gawk extension"
msgstr "«nextfile» és una extensió de gawk"
-#: awkgram.y:528
+#: awkgram.y:775
+#, fuzzy, c-format
+msgid "`nextfile' used in %s action"
+msgstr "«next» és usat dintre de l'acció BEGIN o END"
+
+#: awkgram.y:799
msgid "`return' used outside function context"
msgstr "«return» és usat fora del context d'una funció"
-#: awkgram.y:570
+#: awkgram.y:859
msgid "plain `print' in BEGIN or END rule should probably be `print \"\"'"
msgstr ""
"el «print» simple en la regla BEGIN o END probablement ha de ser «print \"\"»"
-#: awkgram.y:586 awkgram.y:594
+#: awkgram.y:927 awkgram.y:935
msgid "`delete array' is a gawk extension"
msgstr "«delete array» és una extensió de gawk"
-#: awkgram.y:608 awkgram.y:616
+#: awkgram.y:955 awkgram.y:963
#, fuzzy
msgid "`delete(array)' is a non-portable tawk extension"
msgstr "«delete array» és una extensió de gawk"
-#: awkgram.y:660
+#: awkgram.y:1004
#, c-format
msgid "duplicate case values in switch body: %s"
msgstr ""
-#: awkgram.y:670
-msgid "Duplicate `default' detected in switch body"
+#: awkgram.y:1014
+msgid "duplicate `default' detected in switch body"
msgstr ""
-#: awkgram.y:759
+#: awkgram.y:1151
msgid "multistage two-way pipelines don't work"
msgstr "les canonades bidireccionals multi-etapes no funcionen"
-#: awkgram.y:850
+#: awkgram.y:1253
msgid "regular expression on right of assignment"
msgstr "expressió regular a la dreta d'una assignació"
-#: awkgram.y:860
+#: awkgram.y:1263
msgid "regular expression on left of `~' or `!~' operator"
msgstr "expressió regular a l'esquerra de l'operador «~» o «!~»"
-#: awkgram.y:866 awkgram.y:954
+#: awkgram.y:1278 awkgram.y:1423
#, fuzzy
msgid "old awk does not support the keyword `in' except after `for'"
msgstr "l'antic awk no suporta l'operador «**=»"
-#: awkgram.y:872
+#: awkgram.y:1287
msgid "regular expression on right of comparison"
msgstr "expressió regular a la derta de la comparació"
-#: awkgram.y:936
+#: awkgram.y:1399
#, fuzzy, c-format
-msgid "`getline var' invalid inside %s rule"
+msgid "`getline var' invalid inside `%s' rule"
msgstr "port remot no vàlid en «%s»"
-#: awkgram.y:939
-#, c-format
-msgid "`getline' invalid inside %s rule"
-msgstr ""
+#: awkgram.y:1401
+#, fuzzy, c-format
+msgid "`getline' invalid inside `%s' rule"
+msgstr "port remot no vàlid en «%s»"
-#: awkgram.y:944
+#: awkgram.y:1407
msgid "non-redirected `getline' undefined inside END action"
msgstr "«getline» no redirigit sense definir dintre de l'acció FINAL"
-#: awkgram.y:955
+#: awkgram.y:1424
#, fuzzy
msgid "old awk does not support multidimensional arrays"
msgstr "l'antic awk no suporta l'operador «**=»"
-#: awkgram.y:1001
+#: awkgram.y:1528
msgid "call of `length' without parentheses is not portable"
msgstr "la crida de «length» sense parèntesis no és portable"
-#: awkgram.y:1006
-msgid "call of `length' without parentheses is deprecated by POSIX"
-msgstr "la crida de «length» sense parèntesis està desaprovada per POSIX"
-
-#: awkgram.y:1051
+#: awkgram.y:1591
#, fuzzy
msgid "indirect function calls are a gawk extension"
-msgstr "«extension» és una extensió gawk"
+msgstr "«nextfile» és una extensió de gawk"
-#: awkgram.y:1084
-msgid "use of non-array as array"
-msgstr ""
+#: awkgram.y:1605
+#, fuzzy, c-format
+msgid "can not use special variable `%s' for indirect function call"
+msgstr "funció «%s»: no pot usar el nom de la funció com a paràmetre"
-#: awkgram.y:1087
+#: awkgram.y:1682
msgid "invalid subscript expression"
msgstr "expressió de subscript no vàlida"
-#: awkgram.y:1329
+#: awkgram.y:1722
+msgid "use of non-array as array"
+msgstr ""
+
+#: awkgram.y:1993
#, fuzzy
msgid "unexpected newline or end of string"
msgstr "nova línia inesperada"
-#: awkgram.y:1446
-msgid "empty program text on command line"
-msgstr "el text del programa en la línia de comandaments està buit"
-
-#: awkgram.y:1502
+#: awkgram.y:2248 awkgram.y:2296 awkgram.y:2470
#, c-format
msgid "can't open source file `%s' for reading (%s)"
msgstr "no es pot obrir el fitxer font «%s» per a lectura (%s)"
-#: awkgram.y:1600
+#: awkgram.y:2249 awkgram.y:2297 builtin.c:122
+msgid "reason unknown"
+msgstr "motiu desconegut"
+
+#: awkgram.y:2257
+#, fuzzy, c-format
+msgid "already included source file `%s'"
+msgstr "no es pot llegir el fitxer font «%s» (%s)"
+
+#: awkgram.y:2281
+#, fuzzy
+msgid "@include is a gawk extension"
+msgstr "«nextfile» és una extensió de gawk"
+
+#: awkgram.y:2288
+msgid "empty filename after @include"
+msgstr ""
+
+#: awkgram.y:2422
+msgid "empty program text on command line"
+msgstr "el text del programa en la línia de comandaments està buit"
+
+#: awkgram.y:2537
#, c-format
msgid "can't read sourcefile `%s' (%s)"
msgstr "no es pot llegir el fitxer font «%s» (%s)"
-#: awkgram.y:1608
+#: awkgram.y:2547
#, c-format
msgid "source file `%s' is empty"
msgstr "el fitxer font «%s» està buit"
-#: awkgram.y:1800 awkgram.y:1922 awkgram.y:1940 awkgram.y:2315 awkgram.y:2407
+#: awkgram.y:2732
msgid "source file does not end in newline"
msgstr "el fitxer font no finalitza amb un retorn de carro"
-#: awkgram.y:1862
+#: awkgram.y:2809
msgid "unterminated regexp ends with `\\' at end of file"
msgstr "expressió regular sense finalitzar acaba amb «\\» al final del fitxer"
-#: awkgram.y:1886
+#: awkgram.y:2833
#, c-format
msgid "%s: %d: tawk regex modifier `/.../%c' doesn't work in gawk"
msgstr ""
-#: awkgram.y:1890
+#: awkgram.y:2837
#, c-format
msgid "tawk regex modifier `/.../%c' doesn't work in gawk"
msgstr ""
-#: awkgram.y:1897
+#: awkgram.y:2844
msgid "unterminated regexp"
msgstr "expressió regular sense finalitzar"
-#: awkgram.y:1900
+#: awkgram.y:2848
msgid "unterminated regexp at end of file"
msgstr "expressió regular sense finalitzar al final del fitxer"
-#: awkgram.y:1969
+#: awkgram.y:2907
msgid "use of `\\ #...' line continuation is not portable"
msgstr "l'ús de «\\ #...» com a continuació de línia no és portable"
-#: awkgram.y:1982
+#: awkgram.y:2923
msgid "backslash not last character on line"
msgstr "la barra invertida no és l'últim caràcter en la línia"
-#: awkgram.y:2027
+#: awkgram.y:2984
msgid "POSIX does not allow operator `**='"
msgstr "POSIX no permet l'operador «**=»"
-#: awkgram.y:2029
+#: awkgram.y:2986
msgid "old awk does not support operator `**='"
msgstr "l'antic awk no suporta l'operador «**=»"
-#: awkgram.y:2038
+#: awkgram.y:2995
msgid "POSIX does not allow operator `**'"
msgstr "POSIX no permet l'operador «**»"
-#: awkgram.y:2040
+#: awkgram.y:2997
msgid "old awk does not support operator `**'"
msgstr "l'antic awk no suporta l'operador «**=»"
-#: awkgram.y:2071
+#: awkgram.y:3032
msgid "operator `^=' is not supported in old awk"
msgstr "l'operador «^=» no està suportat en l'antic awk"
-#: awkgram.y:2079
+#: awkgram.y:3040
msgid "operator `^' is not supported in old awk"
msgstr "l'operador «^» no està suportat en l'antic awk"
-#: awkgram.y:2163 awkgram.y:2178
+#: awkgram.y:3133 awkgram.y:3149
msgid "unterminated string"
msgstr "cadena sense finalitzar"
-#: awkgram.y:2368
+#: awkgram.y:3345
#, c-format
msgid "invalid char '%c' in expression"
msgstr "caràcter «%c» no vàlid en l'expressió"
-#: awkgram.y:2416
+#: awkgram.y:3391
#, c-format
msgid "`%s' is a gawk extension"
msgstr "«%s» és una extensió de gawk"
-#: awkgram.y:2419
+#: awkgram.y:3394
#, c-format
msgid "`%s' is a Bell Labs extension"
msgstr "«%s» és una extensió de Bell Labs"
-#: awkgram.y:2422
+#: awkgram.y:3397
#, c-format
msgid "POSIX does not allow `%s'"
msgstr "POSIX no permet «%s»"
-#: awkgram.y:2426
+#: awkgram.y:3401
#, c-format
msgid "`%s' is not supported in old awk"
msgstr "«%s» no està suportat en l'antic awk"
-#: awkgram.y:2452
+#: awkgram.y:3465
msgid "`goto' considered harmful!\n"
msgstr "«goto» se considera nefast!\n"
-#: awkgram.y:2514
+#: awkgram.y:3518
#, c-format
msgid "%d is invalid as number of arguments for %s"
msgstr "%d no és vàlid com a nombre d'arguments per a %s"
-#: awkgram.y:2533 awkgram.y:2536
+#: awkgram.y:3544 awkgram.y:3547
msgid "match: third argument is a gawk extension"
msgstr "match: el tercer argument és una extensió de gawk"
-#: awkgram.y:2549
+#: awkgram.y:3575
#, c-format
msgid "%s: string literal as last arg of substitute has no effect"
msgstr "%s: la cadena literal com a últim argument de substitució no té efecte"
-#: awkgram.y:2552
+#: awkgram.y:3580
#, fuzzy, c-format
msgid "%s third parameter is not a changeable object"
msgstr "sub: el tercer argument no és un objecte intercanviable"
-#: awkgram.y:2586 awkgram.y:2589
+#: awkgram.y:3665 awkgram.y:3668
msgid "close: second argument is a gawk extension"
msgstr "close: el segon argument és una extensió de gawk"
-#: awkgram.y:2599
+#: awkgram.y:3680
msgid "use of dcgettext(_\"...\") is incorrect: remove leading underscore"
msgstr ""
"l'ús de dcgettext(_\"...\") no és correcte: elimineu el guió baix inicial"
-#: awkgram.y:2614
+#: awkgram.y:3695
#, fuzzy
msgid "use of dcngettext(_\"...\") is incorrect: remove leading underscore"
msgstr ""
"l'ús de dcgettext(_\"...\") no és correcte: elimineu el guió baix inicial"
-#: awkgram.y:2686
+#: awkgram.y:3787
#, c-format
msgid "function `%s': parameter #%d, `%s', duplicates parameter #%d"
msgstr "funció «%s»: paràmetre #%d, «%s», duplica al paràmetre #%d"
-#: awkgram.y:2719
+#: awkgram.y:3829
#, c-format
msgid "function `%s': parameter `%s' shadows global variable"
msgstr "funció «%s»: paràmetre «%s» ofusca la variable global"
-#: awkgram.y:2831
+#: awkgram.y:3987
#, c-format
msgid "could not open `%s' for writing (%s)"
msgstr "no es pot obrir «%s» per a escriptura (%s)"
-#: awkgram.y:2832 profile.c:96
+#: awkgram.y:3988 profile.c:85
msgid "sending profile to standard error"
msgstr "enviant el perfil a l'eixida d'error estàndard"
-#: awkgram.y:2864
+#: awkgram.y:3994
#, c-format
msgid "%s: close failed (%s)"
msgstr "%s: tancament erroni (%s)"
-#: awkgram.y:2985
+#: awkgram.y:4046
msgid "shadow_funcs() called twice!"
msgstr "shadow_funcs() crida dos vegades!"
-#: awkgram.y:3012
+#: awkgram.y:4052
msgid "there were shadowed variables."
msgstr ""
-#: awkgram.y:3085
+#: awkgram.y:4081
#, c-format
msgid "function `%s': can't use function name as parameter name"
msgstr "funció «%s»: no pot usar el nom de la funció com a paràmetre"
-#: awkgram.y:3088
+#: awkgram.y:4086
#, fuzzy, c-format
msgid "function `%s': can't use special variable `%s' as a function parameter"
msgstr "funció «%s»: no pot usar el nom de la funció com a paràmetre"
-#: awkgram.y:3098
+#: awkgram.y:4102
#, c-format
msgid "function name `%s' previously defined"
msgstr "nom de la funció «%s» definida prèviament"
-#: awkgram.y:3249 awkgram.y:3255
+#: awkgram.y:4271 awkgram.y:4277
#, c-format
msgid "function `%s' called but never defined"
msgstr "es crida a la funció «%s» però no s'ha definit"
-#: awkgram.y:3258
+#: awkgram.y:4280
#, c-format
msgid "function `%s' defined but never called"
msgstr "es defineix la funció «%s» però no s'ha cridat mai"
-#: awkgram.y:3285
+#: awkgram.y:4311
#, c-format
msgid "regexp constant for parameter #%d yields boolean value"
msgstr ""
"l'expressió regular constant per al paràmetre #%d condueix a un valor booleà"
-#: awkgram.y:3329
+#: awkgram.y:4420
#, fuzzy, c-format
msgid ""
"function `%s' called with space between name and `(',\n"
@@ -429,240 +505,144 @@ msgstr ""
"s'ha cridat a la funció «%s» amb espai entre el nom i el «(»,\n"
"%s"
-#: awkgram.y:3750
-#, fuzzy
-msgid "division by zero attempted in `/'"
-msgstr "s'ha intentat una divisió per zero en «/=»"
+#: awkgram.y:4673 eval.c:1845
+msgid "division by zero attempted"
+msgstr "s'ha intentat una divisió per zero"
-#: awkgram.y:3755 eval.c:1411
+#: awkgram.y:4682 eval.c:1877
#, c-format
msgid "division by zero attempted in `%%'"
msgstr "s'ha intentat una divisió per zero en «%%»"
-#: builtin.c:122
+#: awkgram.y:5342
+msgid "statement may have no effect"
+msgstr "la declaració podria no tindre efecte"
+
+#: builtin.c:120
#, c-format
msgid "%s to \"%s\" failed (%s)"
msgstr "%s a \"%s\" ha fallat (%s)"
-#: builtin.c:123
+#: builtin.c:121
msgid "standard output"
msgstr "eixida estàndard"
-#: builtin.c:124
-msgid "reason unknown"
-msgstr "motiu desconegut"
-
-#: builtin.c:137
+#: builtin.c:135
msgid "exp: received non-numeric argument"
msgstr "exp: s'ha rebut un argument que no és un número"
-#: builtin.c:143
+#: builtin.c:141
#, c-format
msgid "exp: argument %g is out of range"
msgstr "exp: l'argument %g està fora de rang"
-#: builtin.c:201
+#: builtin.c:200
#, c-format
msgid "fflush: cannot flush: pipe `%s' opened for reading, not writing"
msgstr ""
"fflush: no es pot netejar: la canonada «%s» s'ha obert per a lectura, no per "
"a escriptura"
-#: builtin.c:204
+#: builtin.c:203
#, c-format
msgid "fflush: cannot flush: file `%s' opened for reading, not writing"
msgstr ""
"fflush: no es pot netejar: el fitxer «%s» s'ha obert per a lectura, no per a "
"escriptura"
-#: builtin.c:216
+#: builtin.c:215
#, c-format
msgid "fflush: `%s' is not an open file, pipe or co-process"
msgstr "fflush: «%s» no és un fitxer obert, canonada o co-procés"
-#: builtin.c:310
+#: builtin.c:322
msgid "index: received non-string first argument"
msgstr "índex: el primer argument rebut no és una cadena"
-#: builtin.c:312
+#: builtin.c:324
msgid "index: received non-string second argument"
msgstr "índex: el segon argument rebut no és una cadena"
-#: builtin.c:434
+#: builtin.c:446
msgid "int: received non-numeric argument"
msgstr "int: s'ha rebut un argument no numèric"
-#: builtin.c:464
+#: builtin.c:469
#, fuzzy
msgid "`length(array)' is a gawk extension"
msgstr "«delete array» és una extensió de gawk"
-#: builtin.c:471
-msgid "length: untyped parameter argument will be forced to scalar"
-msgstr ""
-
-#: builtin.c:480
-msgid "length: untyped argument will be forced to scalar"
-msgstr ""
-
-#: builtin.c:484
+#: builtin.c:477
msgid "length: received non-string argument"
msgstr "length: s'ha rebut un argument que no és una cadena"
-#: builtin.c:515
+#: builtin.c:508
msgid "log: received non-numeric argument"
msgstr "log: s'ha rebut un argument no numèric"
-#: builtin.c:518
+#: builtin.c:511
#, c-format
msgid "log: received negative argument %g"
msgstr "log: s'ha rebut l'argument negatiu %g"
-#: builtin.c:726 builtin.c:729
-msgid "must use `count$' on all formats or none"
-msgstr ""
-
-#: builtin.c:790
-#, c-format
-msgid "field width is ignored for `%%%%' specifier"
-msgstr ""
-
-#: builtin.c:792
-#, c-format
-msgid "precision is ignored for `%%%%' specifier"
-msgstr ""
-
-#: builtin.c:794
-#, c-format
-msgid "field width and precision are ignored for `%%%%' specifier"
-msgstr ""
-
-#: builtin.c:845
-msgid "`$' is not permitted in awk formats"
-msgstr "no es permeten «$» en els formats awk"
-
-#: builtin.c:851
-msgid "arg count with `$' must be > 0"
-msgstr "el compte d'arguments amb «$» ha de ser > 0"
-
-#: builtin.c:853
+#: builtin.c:531 builtin.c:573 builtin.c:586 builtin.c:982 builtin.c:994
#, fuzzy, c-format
-msgid "arg count %ld greater than total number of supplied arguments"
-msgstr ""
-"el comte d'arguments %d és major que el nombre total d'arguments "
-"proporcionats"
-
-#: builtin.c:855
-msgid "`$' not permitted after period in format"
-msgstr "no es permet «$» després d'un punt en el format"
-
-#: builtin.c:868
-msgid "no `$' supplied for positional field width or precision"
-msgstr "no es proporciona «$» per a l'ample o precisió del camp de posició"
-
-#: builtin.c:938
-msgid "`l' is meaningless in awk formats; ignored"
-msgstr "«l» manca de significat en els formats awk; serà ignorat"
-
-#: builtin.c:942
-msgid "`l' is not permitted in POSIX awk formats"
-msgstr "«l» no està permés en els formats POSIX de awk"
-
-#: builtin.c:953
-msgid "`L' is meaningless in awk formats; ignored"
-msgstr "«L» manca de significat en els formats awk; serà ignorat"
-
-#: builtin.c:957
-msgid "`L' is not permitted in POSIX awk formats"
-msgstr "«L» no està permés en els formats POSIX de awk"
-
-#: builtin.c:968
-msgid "`h' is meaningless in awk formats; ignored"
-msgstr "«h» manca de significat en els formats awk; serà ignorat"
-
-#: builtin.c:972
-msgid "`h' is not permitted in POSIX awk formats"
-msgstr "«h» no està permés en els formats POSIX de awk"
-
-#: builtin.c:1252
-#, c-format
-msgid "[s]printf: value %g is out of range for `%%%c' format"
-msgstr ""
-
-#: builtin.c:1332
-#, c-format
-msgid "ignoring unknown format specifier character `%c': no argument converted"
-msgstr ""
-
-#: builtin.c:1338
-msgid "not enough arguments to satisfy format string"
-msgstr "no hi ha prou arguments per a satisfer el format d'una cadena"
-
-#: builtin.c:1340
-msgid "^ ran out for this one"
-msgstr "^ desbordament per a aquest"
-
-#: builtin.c:1346
-msgid "[s]printf: format specifier does not have control letter"
-msgstr "[s]printf: l'especificador de format no conté lletra de control"
-
-#: builtin.c:1349
-msgid "too many arguments supplied for format string"
-msgstr "s'han proporcionat masses arguments per a la cadena de format"
+msgid "attempt to use array `%s' in scalar context"
+msgstr "s'ha intentat usar la matriu «%s» en un context escalar"
-#: builtin.c:1424 builtin.c:1427
+#: builtin.c:569 builtin.c:580
msgid "printf: no arguments"
msgstr "printf: sense arguments"
-#: builtin.c:1451
+#: builtin.c:621
msgid "sqrt: received non-numeric argument"
msgstr "sqrt: s'ha rebut un argument no numèric"
-#: builtin.c:1455
+#: builtin.c:625
#, c-format
msgid "sqrt: called with negative argument %g"
msgstr "sqrt: cridat amb l'argument negatiu %g"
-#: builtin.c:1479
-#, c-format
-msgid "substr: start index %g is invalid, using 1"
-msgstr "substr: l'índex d'inici %g no és vàlid, usant 1"
-
-#: builtin.c:1484
-#, c-format
-msgid "substr: non-integer start index %g will be truncated"
-msgstr "substr: l'índex d'inici no enter %g serà truncat"
-
-#: builtin.c:1510
+#: builtin.c:649
#, fuzzy, c-format
msgid "substr: length %g is not >= 1"
msgstr "substr: la longitud %g és <= 0"
-#: builtin.c:1512
+#: builtin.c:651
#, fuzzy, c-format
msgid "substr: length %g is not >= 0"
msgstr "substr: la longitud %g és <= 0"
-#: builtin.c:1519
+#: builtin.c:658
#, c-format
msgid "substr: non-integer length %g will be truncated"
msgstr "substr: la longitud sobre un nombre no enter %g serà truncada"
-#: builtin.c:1524
+#: builtin.c:663
#, c-format
msgid "substr: length %g too big for string indexing, truncating to %g"
msgstr ""
-#: builtin.c:1536
+#: builtin.c:675
+#, c-format
+msgid "substr: start index %g is invalid, using 1"
+msgstr "substr: l'índex d'inici %g no és vàlid, usant 1"
+
+#: builtin.c:680
+#, c-format
+msgid "substr: non-integer start index %g will be truncated"
+msgstr "substr: l'índex d'inici no enter %g serà truncat"
+
+#: builtin.c:705
msgid "substr: source string is zero length"
msgstr "substr: la cadena font és de longitud zero"
-#: builtin.c:1552
+#: builtin.c:721
#, fuzzy, c-format
msgid "substr: start index %g is past end of string"
msgstr "substr: l'índex d'inici %d sobrepassa l'acabament de la cadena"
-#: builtin.c:1560
+#: builtin.c:729
#, fuzzy, c-format
msgid ""
"substr: length %g at start index %g exceeds length of first argument (%lu)"
@@ -670,486 +650,446 @@ msgstr ""
"substr: la longitud %d a l'índex d'inici %d excedeix la longitud del 1er "
"argument (%d)"
-#: builtin.c:1637
+#: builtin.c:806
+#, fuzzy
+msgid "strftime: received non-numeric second argument"
+msgstr "strftime: el segon argument rebut no és numèric"
+
+#: builtin.c:813
#, fuzzy
msgid "strftime: received non-string first argument"
msgstr "strftime: el primer argument rebut no és una cadena"
-#: builtin.c:1643
+#: builtin.c:819
msgid "strftime: received empty format string"
msgstr "strftime: s'ha rebut una cadena de format buida"
-#: builtin.c:1652
-#, fuzzy
-msgid "strftime: received non-numeric second argument"
-msgstr "strftime: el segon argument rebut no és numèric"
-
-#: builtin.c:1729
+#: builtin.c:885
msgid "mktime: received non-string argument"
msgstr "mktime: s'ha rebut un argument que no és una cadena"
-#: builtin.c:1746
+#: builtin.c:902
msgid "mktime: at least one of the values is out of the default range"
msgstr ""
-#: builtin.c:1781
+#: builtin.c:937
msgid "'system' function not allowed in sandbox mode"
msgstr ""
-#: builtin.c:1786
+#: builtin.c:942
#, fuzzy
msgid "system: received non-string argument"
msgstr "system: s'ha rebut un argument que no és una cadena"
-#: builtin.c:1907 eval.c:2285
+#: builtin.c:997 eval.c:1105 eval.c:1557 eval.c:1570
+#, c-format
+msgid "reference to uninitialized variable `%s'"
+msgstr "referència a una variable sense inicialitzar «%s»"
+
+#: builtin.c:1064
#, fuzzy, c-format
msgid "reference to uninitialized field `$%d'"
msgstr "referència a una variable sense inicialitzar «%s»"
-#: builtin.c:2012
+#: builtin.c:1098
#, fuzzy
msgid "tolower: received non-string argument"
msgstr "tolower: s'ha rebut un argument que no és una cadena"
-#: builtin.c:2042
+#: builtin.c:1151
#, fuzzy
msgid "toupper: received non-string argument"
msgstr "toupper: s'ha rebut un argument que no és una cadena"
-#: builtin.c:2075
+#: builtin.c:1199
msgid "atan2: received non-numeric first argument"
msgstr "atan2: el primer argument rebut no és numèric"
-#: builtin.c:2077
+#: builtin.c:1201
msgid "atan2: received non-numeric second argument"
msgstr "atan2: el segon argument rebut no és numèric"
-#: builtin.c:2096
+#: builtin.c:1220
msgid "sin: received non-numeric argument"
msgstr "sin: s'ha rebut un argument que no és numèric"
-#: builtin.c:2112
+#: builtin.c:1236
msgid "cos: received non-numeric argument"
msgstr "cos: s'ha rebut un argument que no és numèric"
-#: builtin.c:2165
+#: builtin.c:1289
msgid "srand: received non-numeric argument"
msgstr "srand: s'ha rebut un argument que no és numèric"
-#: builtin.c:2200
+#: builtin.c:1320
msgid "match: third argument is not an array"
msgstr "match: el tercer argument no és una matriu"
-#: builtin.c:2750
+#: builtin.c:1827
+#, fuzzy
msgid "gensub: third argument of 0 treated as 1"
msgstr "gensub: el tercer argument de 0 és tractat com a 1"
-#: builtin.c:2866
+#: builtin.c:1869
msgid "lshift: received non-numeric first argument"
msgstr "lshift: el primer argument rebut no és numèric"
-#: builtin.c:2868
+#: builtin.c:1871
#, fuzzy
msgid "lshift: received non-numeric second argument"
-msgstr "strftime: el segon argument rebut no és numèric"
+msgstr "atan2: el segon argument rebut no és numèric"
-#: builtin.c:2874
+#: builtin.c:1877
#, c-format
msgid "lshift(%lf, %lf): negative values will give strange results"
msgstr "lshift(%lf, %lf): els valors negatius donaran resultats estranys"
-#: builtin.c:2876
+#: builtin.c:1879
#, c-format
msgid "lshift(%lf, %lf): fractional values will be truncated"
msgstr "lshift(%lf, %lf): els valors fraccionaris sernn truncats"
-#: builtin.c:2878
+#: builtin.c:1881
#, c-format
msgid "lshift(%lf, %lf): too large shift value will give strange results"
msgstr ""
"lshift(%lf, %lf): un valor de desplaçament massa gran donarà resultats "
"estranys"
-#: builtin.c:2904
+#: builtin.c:1908
msgid "rshift: received non-numeric first argument"
msgstr "rshift: el primer argument rebut no és numèric"
-#: builtin.c:2906
+#: builtin.c:1910
#, fuzzy
msgid "rshift: received non-numeric second argument"
-msgstr "strftime: el segon argument rebut no és numèric"
+msgstr "atan2: el segon argument rebut no és numèric"
-#: builtin.c:2912
+#: builtin.c:1916
#, c-format
msgid "rshift(%lf, %lf): negative values will give strange results"
msgstr "rshift(%lf, %lf): els valors negatius donaran resultats estranys"
-#: builtin.c:2914
+#: builtin.c:1918
#, c-format
msgid "rshift(%lf, %lf): fractional values will be truncated"
msgstr "rshift(%lf, %lf): els valors fraccionaris seran truncats"
-#: builtin.c:2916
+#: builtin.c:1920
#, c-format
msgid "rshift(%lf, %lf): too large shift value will give strange results"
msgstr ""
"rshift(%lf, %lf): un valor de desplaçament massa gran donarà resultats "
"estranys"
-#: builtin.c:2942
+#: builtin.c:1947
msgid "and: received non-numeric first argument"
msgstr "and: el primer argument rebut no és numèric"
-#: builtin.c:2944
+#: builtin.c:1949
#, fuzzy
msgid "and: received non-numeric second argument"
msgstr "atan2: el segon argument rebut no és numèric"
-#: builtin.c:2950
+#: builtin.c:1955
#, c-format
msgid "and(%lf, %lf): negative values will give strange results"
msgstr "and(%lf, %lf): els valors negatius donaran resultats estranys"
-#: builtin.c:2952
+#: builtin.c:1957
#, c-format
msgid "and(%lf, %lf): fractional values will be truncated"
msgstr "and(%lf, %lf): els valors fraccionaris seran truncats"
-#: builtin.c:2978
+#: builtin.c:1984
msgid "or: received non-numeric first argument"
msgstr "or: el primer argument rebut no és numèric"
-#: builtin.c:2980
+#: builtin.c:1986
#, fuzzy
msgid "or: received non-numeric second argument"
msgstr "atan2: el segon argument rebut no és numèric"
-#: builtin.c:2986
+#: builtin.c:1992
#, c-format
msgid "or(%lf, %lf): negative values will give strange results"
msgstr "or(%lf, %lf): els valors negatius donaran resultats estranys"
-#: builtin.c:2988
+#: builtin.c:1994
#, c-format
msgid "or(%lf, %lf): fractional values will be truncated"
msgstr "or(%lf, %lf): els valors fraccionaris seran truncats"
-#: builtin.c:3014
+#: builtin.c:2023
msgid "xor: received non-numeric first argument"
msgstr "xor: el primer argument rebut no és numèric"
-#: builtin.c:3016
+#: builtin.c:2025
#, fuzzy
msgid "xor: received non-numeric second argument"
msgstr "atan2: el segon argument rebut no és numèric"
-#: builtin.c:3022
+#: builtin.c:2031
#, c-format
msgid "xor(%lf, %lf): negative values will give strange results"
msgstr "xor(%lf, %lf): els valors negatius donaran resultats estranys"
-#: builtin.c:3024
+#: builtin.c:2033
#, c-format
msgid "xor(%lf, %lf): fractional values will be truncated"
msgstr "xor(%lf, %lf): els valors fraccionaris seran truncats"
-#: builtin.c:3048
+#: builtin.c:2057 builtin.c:2063
msgid "compl: received non-numeric argument"
msgstr "compl: s'ha rebut un argument que no és numèric"
-#: builtin.c:3054
+#: builtin.c:2065
#, c-format
msgid "compl(%lf): negative value will give strange results"
msgstr "compl(%lf): el valor negatiu donarà resultats estranys"
-#: builtin.c:3056
+#: builtin.c:2067
#, c-format
msgid "compl(%lf): fractional value will be truncated"
msgstr "compl(%lf): el valor fraccionari serà truncat"
-#: builtin.c:3229
+#: builtin.c:2237
#, c-format
msgid "dcgettext: `%s' is not a valid locale category"
msgstr "dcgettext: «%s» no és una categoria local vàlida"
-#: eval.c:374
+#: eval.c:412
#, c-format
msgid "unknown nodetype %d"
msgstr "tipo de node %d desconegut"
-#: eval.c:423
+#: eval.c:423 eval.c:437
+#, fuzzy, c-format
+msgid "unknown opcode %d"
+msgstr "tipo de node %d desconegut"
+
+#: eval.c:434
+#, c-format
+msgid "opcode %s not an operator or keyword"
+msgstr ""
+
+#: eval.c:487
msgid "buffer overflow in genflags2str"
msgstr "desbordament del cau temporal en genflags2str"
-#: eval.c:455 eval.c:461 profile.c:787
+#: eval.c:613
#, c-format
-msgid "attempt to use array `%s' in a scalar context"
-msgstr "s'ha intentat usar la matriu «%s» en un context escalar"
-
-#: eval.c:803
-#, fuzzy, c-format
-msgid "for loop: array `%s' changed size from %ld to %ld during loop execution"
+msgid ""
+"\n"
+"\t# Function Call Stack:\n"
+"\n"
msgstr ""
-"bucle for: la matriu «%s» ha canviat de mida de %d a %d durant l'execució del "
-"bucle"
-
-#: eval.c:824
-msgid "`break' outside a loop is not portable"
-msgstr "«break» a fora d'un bucle no és portable"
+"\n"
+"\t# Pila de Crides a les Funcions:\n"
+"\n"
-#: eval.c:828
-msgid "`break' outside a loop is not allowed"
-msgstr "no es permet «break» a fora d'un bucle"
+#: eval.c:640
+msgid "`IGNORECASE' is a gawk extension"
+msgstr "«IGNORECASE» és una extensió de gawk"
-#: eval.c:845
-msgid "`continue' outside a loop is not portable"
-msgstr "«continue» fora d'un bucle no és portable"
+#: eval.c:669
+msgid "`BINMODE' is a gawk extension"
+msgstr "«BINMODE» és una extensió de gawk"
-#: eval.c:849
-msgid "`continue' outside a loop is not allowed"
-msgstr "no es permet «continue» a fora d'un bucle"
+#: eval.c:727
+#, c-format
+msgid "BINMODE value `%s' is invalid, treated as 3"
+msgstr ""
-#: eval.c:883
-msgid "`next' cannot be called from a BEGIN rule"
-msgstr "«next» no es pot cridar des d'una regla BEGIN"
+#: eval.c:817
+#, c-format
+msgid "bad `%sFMT' specification `%s'"
+msgstr "«%sFMT» especificació errònia «%s»"
-#: eval.c:885
-msgid "`next' cannot be called from an END rule"
-msgstr "«next» no es pot cridar des d'una regla FINAL"
+#: eval.c:895
+msgid "turning off `--lint' due to assignment to `LINT'"
+msgstr "desactivant «--lint» degut a una assignació a «LINT»"
-#: eval.c:887
-#, fuzzy
-msgid "`next' cannot be called from a BEGINFILE rule"
-msgstr "«next» no es pot cridar des d'una regla BEGIN"
+#: eval.c:1067 eval.c:1544
+#, c-format
+msgid "can't use function name `%s' as variable or array"
+msgstr "no es pot usar el nom de la funció «%s» com a variable o matriu"
-#: eval.c:889
-#, fuzzy
-msgid "`next' cannot be called from an ENDFILE rule"
-msgstr "«next» no es pot cridar des d'una regla FINAL"
+#: eval.c:1095
+msgid "assignment is not allowed to result of builtin function"
+msgstr ""
+"no es permet l'assignació per a obtindre un resultat d'una funció interna"
-#: eval.c:898
-msgid "`nextfile' cannot be called from a BEGIN rule"
-msgstr "«nextfile» no es pot cridar des d'una regla BEGIN"
+#: eval.c:1104 eval.c:1556 eval.c:1569
+#, c-format
+msgid "reference to uninitialized argument `%s'"
+msgstr "referència a un argument sense inicialitzar «%s»"
-#: eval.c:900
-msgid "`nextfile' cannot be called from an END rule"
-msgstr "«nextfile» no es pot cridar des d'una regla FINAL"
+#: eval.c:1123
+msgid "attempt to field reference from non-numeric value"
+msgstr "s'ha intentat una referència de camp a partir d'un valor no numèric"
-#: eval.c:906
+#: eval.c:1125
#, fuzzy
-msgid "`nextfile' cannot be called from an ENDFILE rule"
-msgstr "«nextfile» no es pot cridar des d'una regla FINAL"
+msgid "attempt to field reference from null string"
+msgstr "s'ha intentat una referència a partir d'una cadena nul·la"
-#: eval.c:963
-msgid "statement has no effect"
-msgstr "la sentència no té efecte"
+#: eval.c:1131
+#, fuzzy, c-format
+msgid "attempt to access field %ld"
+msgstr "s'ha intentat accedir al camp %d"
-#: eval.c:1040 eval.c:2133
-#, c-format
-msgid "can't use function name `%s' as variable or array"
-msgstr "no es pot usar el nom de la funció «%s» com a variable o matriu"
+#: eval.c:1140
+#, fuzzy, c-format
+msgid "reference to uninitialized field `$%ld'"
+msgstr "referència a una variable sense inicialitzar «%s»"
-#: eval.c:1047 eval.c:1053
+#: eval.c:1202
#, c-format
-msgid "reference to uninitialized argument `%s'"
-msgstr "referència a un argument sense inicialitzar «%s»"
+msgid "function `%s' called with more arguments than declared"
+msgstr "s'ha cridat a la funció «%s» amb més arguments dels declarats"
-#: eval.c:1062 eval.c:2142
+#: eval.c:1358
#, c-format
-msgid "reference to uninitialized variable `%s'"
-msgstr "referència a una variable sense inicialitzar «%s»"
-
-#: eval.c:1210
-msgid ""
-"concatenation: side effects in one expression have changed the length of "
-"another!"
+msgid "unwind_stack: unexpected type `%s'"
msgstr ""
-"concatenació: els efectes colaterals en una expressió han canviat la "
-"longitud d'una altra!"
-#: eval.c:1315
+#: eval.c:1636
+#, fuzzy, c-format
+msgid "attempt to use scalar `%s' as an array"
+msgstr "s'ha intentat usar la dada escalar «%s» com a una matriu"
+
+#: eval.c:1680
msgid "assignment used in conditional context"
msgstr "assignació usada en un context condicional"
-#: eval.c:1396
-msgid "division by zero attempted"
-msgstr "s'ha intentat una divisió per zero"
-
-#: eval.c:1426 profile.c:663
-#, c-format
-msgid "illegal type (%s) in tree_eval"
-msgstr "tipus il·legal (%s) en tree_eval"
+#: eval.c:1684
+msgid "statement has no effect"
+msgstr "la sentència no té efecte"
-#: eval.c:1589
+#: eval.c:2028
msgid "division by zero attempted in `/='"
msgstr "s'ha intentat una divisió per zero en «/=»"
-#: eval.c:1611
+#: eval.c:2053
#, c-format
msgid "division by zero attempted in `%%='"
msgstr "s'ha intentat una divisió per zero en «%%=»"
-#: eval.c:1891
-#, c-format
-msgid "function `%s' called with more arguments than declared"
-msgstr "s'ha cridat a la funció «%s» amb més arguments dels declarats"
-
-#: eval.c:1948
-#, c-format
-msgid "function `%s' not defined"
-msgstr "la funció «%s» no està definida"
-
-#: eval.c:1950
-#, c-format
-msgid "identifier `%s' is not a function"
-msgstr ""
-
-#: eval.c:1997
-#, c-format
-msgid ""
-"function parameter `%s' is not a scalar and cannot be used for indirect "
-"function call"
-msgstr ""
-
-#: eval.c:2014
-#, c-format
-msgid "indirect call of real function `%s' is silly"
-msgstr ""
+#: eval.c:2139
+msgid "`continue' outside a loop is not allowed"
+msgstr "no es permet «continue» a fora d'un bucle"
-#: eval.c:2034
-#, c-format
-msgid "function `%s' called indirectly through `%s' does not exist"
-msgstr ""
+#: eval.c:2145
+#, fuzzy
+msgid "`break' outside a loop is not allowed"
+msgstr "no es permet «break» a fora d'un bucle"
-#: eval.c:2039
-#, c-format
-msgid "identifier `%s' cannot be used for indirect function call"
+#: eval.c:2229
+#, fuzzy, c-format
+msgid "for loop: array `%s' changed size from %ld to %ld during loop execution"
msgstr ""
+"bucle for: la matriu «%s» ha canviat de mida de %d a %d durant l'execució del "
+"bucle"
-#: eval.c:2105
+#: eval.c:2342
#, c-format
-msgid ""
-"\n"
-"\t# Function Call Stack:\n"
-"\n"
+msgid "function called indirectly through `%s' does not exist"
msgstr ""
-"\n"
-"\t# Pila de Crides a les Funcions:\n"
-"\n"
-
-#: eval.c:2108
-#, c-format
-msgid "\t# -- main --\n"
-msgstr "\t# -- principal --\n"
-
-#: eval.c:2269
-msgid "attempt to field reference from non-numeric value"
-msgstr "s'ha intentat una referència de camp a partir d'un valor no numèric"
-
-#: eval.c:2271
-msgid "attempt to reference from null string"
-msgstr "s'ha intentat una referència a partir d'una cadena nul·la"
-#: eval.c:2277
+#: eval.c:2354
#, c-format
-msgid "attempt to access field %d"
-msgstr "s'ha intentat accedir al camp %d"
-
-#: eval.c:2298 eval.c:2305 profile.c:843
-msgid "assignment is not allowed to result of builtin function"
-msgstr ""
-"no es permet l'assignació per a obtindre un resultat d'una funció interna"
+msgid "function `%s' not defined"
+msgstr "la funció «%s» no està definida"
-#: eval.c:2369
-msgid "`IGNORECASE' is a gawk extension"
-msgstr "«IGNORECASE» és una extensió de gawk"
+#: eval.c:2481
+#, fuzzy, c-format
+msgid "`nextfile' cannot be called from a `%s' rule"
+msgstr "«nextfile» no es pot cridar des d'una regla FINAL"
-#: eval.c:2398
-msgid "`BINMODE' is a gawk extension"
-msgstr "«BINMODE» és una extensió de gawk"
+#: eval.c:2540
+#, fuzzy, c-format
+msgid "`next' cannot be called from a `%s' rule"
+msgstr "«next» no es pot cridar des d'una regla FINAL"
-#: eval.c:2456
+#: eval.c:2602
#, c-format
-msgid "BINMODE value `%s' is invalid, treated as 3"
+msgid "Sorry, don't know how to interpret `%s'"
msgstr ""
-#: eval.c:2546
-#, c-format
-msgid "bad `%sFMT' specification `%s'"
-msgstr "«%sFMT» especificació errònia «%s»"
-
-#: eval.c:2624
-msgid "turning off `--lint' due to assignment to `LINT'"
-msgstr "desactivant «--lint» degut a una assignació a «LINT»"
-
-#: ext.c:61
-msgid "extensions not allowed in sandbox mode"
+#: ext.c:62
+msgid "extensions are not allowed in sandbox mode"
msgstr ""
-#: ext.c:65 ext.c:70
+#: ext.c:68 ext.c:73
msgid "`extension' is a gawk extension"
msgstr "«extension» és una extensió gawk"
-#: ext.c:80
-#, c-format
-msgid "extension: cannot open `%s' (%s)\n"
+#: ext.c:83
+#, fuzzy, c-format
+msgid "fatal: extension: cannot open `%s' (%s)\n"
msgstr "extension: no es pot obrir «%s» (%s)\n"
-#: ext.c:88
-#, c-format
-msgid "extension: library `%s': cannot call function `%s' (%s)\n"
+#: ext.c:93
+#, fuzzy, c-format
+msgid "fatal: extension: library `%s': cannot call function `%s' (%s)\n"
msgstr "extension: biblioteca «%s»: no es pot cridar a la funció «%s» (%s)\n"
-#: ext.c:108
+#: ext.c:123
msgid "extension: missing function name"
msgstr ""
-#: ext.c:113
+#: ext.c:128
#, fuzzy, c-format
msgid "extension: illegal character `%c' in function name `%s'"
msgstr "extension: biblioteca «%s»: no es pot cridar a la funció «%s» (%s)\n"
-#: ext.c:119
+#: ext.c:137
#, fuzzy, c-format
msgid "extension: can't redefine function `%s'"
msgstr "extension: no es pot obrir «%s» (%s)\n"
-#: ext.c:123
+#: ext.c:141
#, fuzzy, c-format
msgid "extension: function `%s' already defined"
msgstr "la funció «%s» no està definida"
-#: ext.c:128
-#, c-format
-msgid "extension: can't use gawk built-in `%s' as function name"
-msgstr ""
-
-#: ext.c:130
+#: ext.c:146
#, fuzzy, c-format
msgid "extension: function name `%s' previously defined"
msgstr "nom de la funció «%s» definida prèviament"
-#: ext.c:207
+#: ext.c:148
+#, fuzzy, c-format
+msgid "extension: can't use gawk built-in `%s' as function name"
+msgstr "funció «%s»: no pot usar el nom de la funció com a paràmetre"
+
+#: ext.c:152
+#, c-format
+msgid "make_builtin: negative argument count for function `%s'"
+msgstr ""
+
+#: ext.c:255
#, fuzzy, c-format
msgid "function `%s' defined to take no more than %d argument(s)"
msgstr "es defineix la funció «%s» però no s'ha cridat mai"
-#: ext.c:210
+#: ext.c:258
#, fuzzy, c-format
msgid "function `%s': missing argument #%d"
msgstr "la funció «%s» no està definida"
-#: ext.c:220
+#: ext.c:268
#, fuzzy, c-format
msgid "function `%s': argument #%d: attempt to use scalar as an array"
msgstr "s'ha intentat usar la dada escalar «%s» com a una matriu"
-#: ext.c:224
+#: ext.c:272
#, c-format
msgid "function `%s': argument #%d: attempt to use array as a scalar"
msgstr ""
-#: ext.c:249
+#: ext.c:285
msgid "Operation Not Supported"
msgstr "Operació No Suportada"
@@ -1157,59 +1097,58 @@ msgstr "Operació No Suportada"
msgid "NF set to negative value"
msgstr "NF s'inicialitza sobre un valor negatiu"
-#: field.c:913
-msgid "split: second argument is not an array"
-msgstr "split: el segon argument no és una matriu"
-
-#: field.c:922 field.c:932 field.c:937
+#: field.c:939 field.c:946 field.c:950
#, fuzzy
msgid "split: fourth argument is a gawk extension"
msgstr "match: el tercer argument és una extensió de gawk"
-#: field.c:928
+#: field.c:943
#, fuzzy
msgid "split: fourth argument is not an array"
msgstr "split: el segon argument no és una matriu"
-#: field.c:975
-#, fuzzy
-msgid "split: null string for third argument is a gawk extension"
+#: field.c:957
+msgid "split: second argument is not an array"
+msgstr "split: el segon argument no és una matriu"
+
+#: field.c:987
+msgid "split: null string for third arg is a gawk extension"
msgstr "split: la cadena nul·la per al tercer argument és una extensió de gawk"
-#: field.c:1032
+#: field.c:1028
#, fuzzy
-msgid "patsplit: second argument is not an array"
+msgid "patsplit: fourth argument is not an array"
msgstr "split: el segon argument no és una matriu"
-#: field.c:1041
+#: field.c:1033
#, fuzzy
-msgid "patsplit: fourth argument is not an array"
+msgid "patsplit: second argument is not an array"
msgstr "split: el segon argument no és una matriu"
-#: field.c:1067
+#: field.c:1051
#, fuzzy
msgid "patsplit: third argument must be non-null"
msgstr "match: el tercer argument no és una matriu"
-#: field.c:1111
+#: field.c:1084
msgid "`FIELDWIDTHS' is a gawk extension"
msgstr "«FIELDWIDTHS» és una extensió de gawk"
-#: field.c:1141 field.c:1155
+#: field.c:1147
#, c-format
msgid "invalid FIELDWIDTHS value, near `%s'"
msgstr ""
-#: field.c:1238
+#: field.c:1220
msgid "null string for `FS' is a gawk extension"
msgstr "la cadena nul·la per a «FS» és una extensió de gawk"
-#: field.c:1242
+#: field.c:1224
#, fuzzy
msgid "old awk does not support regexps as value of `FS'"
msgstr "l'antic awk no suporta l'operador «**=»"
-#: field.c:1357
+#: field.c:1343
#, fuzzy
msgid "`FPAT' is a gawk extension"
msgstr "«%s» és una extensió de gawk"
@@ -1269,507 +1208,504 @@ msgstr "%s: l'opció «-W %s» no admet cap argument\n"
msgid "%s: option '-W %s' requires an argument\n"
msgstr "%s: l'opció «%s» requereix un argument\n"
-#: io.c:379
+#: io.c:272
#, c-format
msgid "command line argument `%s' is a directory: skipped"
msgstr ""
-#: io.c:413
+#: io.c:275 io.c:372
#, c-format
msgid "cannot open file `%s' for reading (%s)"
msgstr "no es pot obrir el fitxer «%s» per a lectura (%s)"
-#: io.c:459 io.c:2999
+#: io.c:419
#, c-format
msgid "error reading input file `%s': %s"
msgstr "error en llegir el fitxer d'entrada «%s»: %s"
-#: io.c:506
+#: io.c:470
#, c-format
msgid "close of fd %d (`%s') failed (%s)"
msgstr "la finalització del descriptor fd %d («%s») ha fallat (%s)"
-#: io.c:617
-msgid "redirection not allowed in sandbox mode"
-msgstr ""
-
-#: io.c:648
-#, c-format
-msgid "invalid tree type %s in redirect()"
-msgstr "tipus d'arbre %s no vàlid dintre de redirect()"
-
-#: io.c:654
+#: io.c:577
#, c-format
msgid "expression in `%s' redirection only has numeric value"
msgstr "l'expressió en la redirecció «%s» solt té un valor numèric"
-#: io.c:660
+#: io.c:583
#, c-format
msgid "expression for `%s' redirection has null string value"
msgstr "l'expressió per a la redirecció «%s» té un valor de cadena nul·la"
-#: io.c:665
+#: io.c:589
#, c-format
msgid "filename `%s' for `%s' redirection may be result of logical expression"
msgstr ""
"el fitxer «%s» per a la redirecció «%s» pot ser resultat d'una expressió lògica"
-#: io.c:707
+#: io.c:628
#, c-format
msgid "unnecessary mixing of `>' and `>>' for file `%.*s'"
msgstr "mescla innecessària de «>» i «>>» per al fitxer «%.*s»"
-#: io.c:754
+#: io.c:681
#, c-format
msgid "can't open pipe `%s' for output (%s)"
msgstr "no es pot obrir la canonada «%s» per a l'eixida (%s)"
-#: io.c:763
+#: io.c:691
#, c-format
msgid "can't open pipe `%s' for input (%s)"
msgstr "no es pot obrir la canonada «%s» per a l'entrada (%s)"
-#: io.c:786
+#: io.c:712
#, c-format
msgid "can't open two way pipe `%s' for input/output (%s)"
msgstr ""
"no es pot obrir una canonada bidireccional «%s» per a les entrades/eixides (%"
"s)"
-#: io.c:864
+#: io.c:794
#, c-format
msgid "can't redirect from `%s' (%s)"
msgstr "no es pot redirigir des de «%s» (%s)"
-#: io.c:867
+#: io.c:797
#, c-format
msgid "can't redirect to `%s' (%s)"
msgstr "no es pot redirigir cap a «%s» (%s)"
-#: io.c:920
+#: io.c:846
msgid ""
"reached system limit for open files: starting to multiplex file descriptors"
msgstr ""
"s'ha arribat al límit del sistema per a fitxers oberts: es començarà a "
"multiplexar els descriptors de fitxer"
-#: io.c:936
+#: io.c:862
#, c-format
msgid "close of `%s' failed (%s)."
msgstr "la finalització de «%s» ha fallat (%s)"
-#: io.c:944
+#: io.c:870
msgid "too many pipes or input files open"
msgstr "masses canonades o fitxers d'entrada oberts"
-#: io.c:967
+#: io.c:892
msgid "close: second argument must be `to' or `from'"
msgstr "close: el segon argument hauria de ser «to» o «from»"
-#: io.c:981
+#: io.c:909
#, c-format
msgid "close: `%.*s' is not an open file, pipe or co-process"
msgstr "close: «%.*s» no és un fitxer obert, canonada o co-procés"
-#: io.c:986
+#: io.c:914
msgid "close of redirection that was never opened"
msgstr "finalització d'una redirecció que no s'ha obert"
-#: io.c:1083
+#: io.c:1011
#, c-format
msgid "close: redirection `%s' not opened with `|&', second argument ignored"
msgstr "close: la redirecció «%s» no s'obre amb «|&», s'ignora el segon argument"
-#: io.c:1099
+#: io.c:1027
#, c-format
msgid "failure status (%d) on pipe close of `%s' (%s)"
msgstr "estaus de falla (%d) en la finalització de la canonada «%s» (%s)"
-#: io.c:1102
+#: io.c:1030
#, c-format
msgid "failure status (%d) on file close of `%s' (%s)"
msgstr "estatus de falla (%d) en la finalització del fitxer «%s» (%s)"
-#: io.c:1122
+#: io.c:1050
#, c-format
msgid "no explicit close of socket `%s' provided"
msgstr "no s'aporta la finalització explícita del socket «%s»"
-#: io.c:1125
+#: io.c:1053
#, c-format
msgid "no explicit close of co-process `%s' provided"
msgstr "no s'aporta la finalització explícita del co-procés «%s»"
-#: io.c:1128
+#: io.c:1056
#, c-format
msgid "no explicit close of pipe `%s' provided"
msgstr "no s'aporta la finalització explícita de la canonada «%s»"
-#: io.c:1131
+#: io.c:1059
#, c-format
msgid "no explicit close of file `%s' provided"
msgstr "no s'aporta la finalització explícita del fitxer «%s»"
-#: io.c:1159 io.c:1214 main.c:832 main.c:874
+#: io.c:1087 io.c:1142 main.c:823 main.c:865
#, c-format
msgid "error writing standard output (%s)"
msgstr "error a l'escriure en l'eixida estàndard (%s)"
-#: io.c:1163 io.c:1219
+#: io.c:1091 io.c:1147
#, c-format
msgid "error writing standard error (%s)"
msgstr "error a l'escriure en l'eixida d'error estàndard (%s)"
-#: io.c:1171
+#: io.c:1099
#, c-format
msgid "pipe flush of `%s' failed (%s)."
msgstr "la neteja de la canonada de «%sx» ha fallat (%s)."
-#: io.c:1174
+#: io.c:1102
#, c-format
msgid "co-process flush of pipe to `%s' failed (%s)."
msgstr "la neteja de la canonada per al co-procés de «%sx» ha fallat (%s)."
-#: io.c:1177
+#: io.c:1105
#, c-format
msgid "file flush of `%s' failed (%s)."
msgstr "la neteja del fitxer «%sx» ha fallat (%s)."
-#: io.c:1292
+#: io.c:1219
#, fuzzy, c-format
msgid "local port %s invalid in `/inet'"
msgstr "port local no vàlid en «%s»"
-#: io.c:1309
+#: io.c:1236
#, c-format
msgid "remote host and port information (%s, %s) invalid"
msgstr ""
-#: io.c:1344
+#: io.c:1276
msgid "/inet/raw client not ready yet, sorry"
msgstr "el client /inet/raw encara no està a punt, ho sento"
-#: io.c:1347 io.c:1383
+#: io.c:1279 io.c:1320
msgid "only root may use `/inet/raw'."
msgstr "sols el root pot usar «/inet/raw»."
-#: io.c:1381
+#: io.c:1318
msgid "/inet/raw server not ready yet, sorry"
msgstr "el servidor /inet/raw encara no està a punt, ho sento"
-#: io.c:1477
+#: io.c:1417
#, c-format
msgid "no (known) protocol supplied in special filename `%s'"
msgstr "no s'aporta cap protocol (conegut) en el nom del fitxer especial «%s»"
-#: io.c:1491
+#: io.c:1431
#, c-format
msgid "special file name `%s' is incomplete"
msgstr "el nom del fitxer especial «%s» està incomplet"
-#: io.c:1506
+#: io.c:1447
msgid "must supply a remote hostname to `/inet'"
msgstr "s'ha de subministrar un nom de sistema remot a «/inet»"
-#: io.c:1524
+#: io.c:1465
msgid "must supply a remote port to `/inet'"
msgstr "s'ha de subministrar un port remot a «/inet»"
-#: io.c:1570
+#: io.c:1511
msgid "TCP/IP communications are not supported"
msgstr "les comunicacions TCP/IP no estan suportades"
-#: io.c:1758
+#: io.c:1698
#, c-format
msgid "could not open `%s', mode `%s'"
msgstr "no es pot obrir «%s», mode «%s»"
-#: io.c:1809
+#: io.c:1749
#, fuzzy, c-format
msgid "close of master pty failed (%s)"
msgstr "ha fallat la finalització de la canonada (%s)"
-#: io.c:1811 io.c:1963 io.c:2114
+#: io.c:1751 io.c:1918 io.c:2075
#, c-format
msgid "close of stdout in child failed (%s)"
msgstr ""
"ha fallat la finalització de l'eixida estàndard en els processos fills (%s)"
-#: io.c:1814
+#: io.c:1754
#, fuzzy, c-format
msgid "moving slave pty to stdout in child failed (dup: %s)"
msgstr ""
"ha fallat la redirecció cap a l'eixida estàndard dels processos fills (dup: %"
"s)"
-#: io.c:1816 io.c:1968
+#: io.c:1756 io.c:1923
#, c-format
msgid "close of stdin in child failed (%s)"
msgstr ""
"ha fallat la finalització de l'entrada estàndard en els processos fills (%s)"
-#: io.c:1819
+#: io.c:1759
#, fuzzy, c-format
msgid "moving slave pty to stdin in child failed (dup: %s)"
msgstr ""
"ha fallat la redirecció cap a l'entrada estàndard dels processos fills (dup: "
"%s)"
-#: io.c:1821 io.c:1840
+#: io.c:1761 io.c:1782
#, fuzzy, c-format
msgid "close of slave pty failed (%s)"
msgstr "ha fallat la finalització de la canonada (%s)"
-#: io.c:1914 io.c:1966 io.c:2095 io.c:2117
+#: io.c:1860 io.c:1921 io.c:2053 io.c:2078
#, c-format
msgid "moving pipe to stdout in child failed (dup: %s)"
msgstr ""
"ha fallat la redirecció cap a l'eixida estàndard dels processos fills (dup: %"
"s)"
-#: io.c:1918 io.c:1971
+#: io.c:1867 io.c:1926
#, c-format
msgid "moving pipe to stdin in child failed (dup: %s)"
msgstr ""
"ha fallat la redirecció cap a l'entrada estàndard dels processos fills (dup: "
"%s)"
-#: io.c:1935 io.c:2108
+#: io.c:1887 io.c:2068
msgid "restoring stdout in parent process failed\n"
msgstr "ha fallat la restauració de l'eixida estàndard en el procés pare\n"
-#: io.c:1940
+#: io.c:1895
msgid "restoring stdin in parent process failed\n"
msgstr "ha fallat la restauració de l'entrada estàndard en el procés pare\n"
-#: io.c:1974 io.c:2119 io.c:2130
+#: io.c:1929 io.c:2080 io.c:2094
#, c-format
msgid "close of pipe failed (%s)"
msgstr "ha fallat la finalització de la canonada (%s)"
-#: io.c:2019
+#: io.c:1974
msgid "`|&' not supported"
msgstr "«|&» no està suportat"
-#: io.c:2085
+#: io.c:2040
#, c-format
msgid "cannot open pipe `%s' (%s)"
msgstr "no es pot obrir la canonada «%s» (%s)"
-#: io.c:2126
+#: io.c:2088
#, c-format
msgid "cannot create child process for `%s' (fork: %s)"
msgstr "no es pot crear el procés fill per a «%s» (fork: %s)"
-#: io.c:2518
+#: io.c:2577
#, c-format
msgid "data file `%s' is empty"
msgstr "el fitxer de dades «%s» està buit"
-#: io.c:2560 io.c:2568
+#: io.c:2618 io.c:2626
msgid "could not allocate more input memory"
msgstr ""
-#: io.c:3125
+#: io.c:3173
msgid "multicharacter value of `RS' is a gawk extension"
msgstr "el valor multicaràcter de «RS» és una extensió de gawk"
-#: main.c:313
+#: main.c:311
msgid "out of memory"
-msgstr ""
+msgstr "memòria esgotada"
-#: main.c:381
+#: main.c:388
msgid "`-m[fr]' option irrelevant in gawk"
msgstr "l'opción «-m[fr]» és irrellevant en gawk"
-#: main.c:383
+#: main.c:390
msgid "-m option usage: `-m[fr] nnn'"
msgstr "ús de l'opció -m: «-m[fr] nnn»"
-#: main.c:419
+#: main.c:426
#, fuzzy
msgid "empty argument to `-e/--source' ignored"
msgstr "s'igonarà l'argument buit per a l'opció «--source»"
-#: main.c:485
+#: main.c:492
#, c-format
msgid "%s: option `-W %s' unrecognized, ignored\n"
msgstr "%s: no es reconeix l'opció «-W %s», serà ignorada\n"
-#: main.c:530
+#: main.c:545
#, c-format
msgid "%s: option requires an argument -- %c\n"
msgstr "%s: l'opció requereix un argument -- %c\n"
-#: main.c:551
+#: main.c:566
msgid "environment variable `POSIXLY_CORRECT' set: turning on `--posix'"
msgstr "la variable d'entorn «POSIXLY_CORRECT» està establerta: usant «--posix»"
-#: main.c:557
+#: main.c:572
msgid "`--posix' overrides `--traditional'"
msgstr "«--posix» solapa a «--traditional»"
-#: main.c:568
+#: main.c:583
msgid "`--posix'/`--traditional' overrides `--non-decimal-data'"
msgstr "«--posix» i «--traditional» solapen a «--non-decimal-data»"
-#: main.c:572
+#: main.c:587
#, fuzzy, c-format
msgid "running %s setuid root may be a security problem"
msgstr "executar %s com a setuid root pot ser un problema de seguretat"
-#: main.c:577
+#: main.c:592
#, fuzzy
msgid "`--posix' overrides `--binary'"
msgstr "«--posix» solapa a «--traditional»"
-#: main.c:622
+#: main.c:643
#, fuzzy, c-format
msgid "can't set binary mode on stdin (%s)"
msgstr "no es pot establir el mode en l'entrada estàndard (%s)"
-#: main.c:625
+#: main.c:646
#, fuzzy, c-format
msgid "can't set binary mode on stdout (%s)"
msgstr "no es pot establir el mode en l'eixida estàndard (%s)"
-#: main.c:627
+#: main.c:648
#, fuzzy, c-format
msgid "can't set binary mode on stderr (%s)"
msgstr "no es pot establir el mode en l'eixida d'error estàndard (%s)"
-#: main.c:668
+#: main.c:687
msgid "no program text at all!"
msgstr "no hi ha cap text per al programa!"
-#: main.c:773
+#: main.c:762
#, c-format
msgid "Usage: %s [POSIX or GNU style options] -f progfile [--] file ...\n"
msgstr "Ús: %s [opcions d'estil POSIX o GNU] -f fitx_prog [--] fitxer ...\n"
-#: main.c:775
+#: main.c:764
#, c-format
msgid "Usage: %s [POSIX or GNU style options] [--] %cprogram%c file ...\n"
msgstr "Ús: %s [opcions d'estil POSIX o GNU] [--] %cprograma%c fitxer ...\n"
-#: main.c:780
+#: main.c:769
#, fuzzy
msgid "POSIX options:\t\tGNU long options: (standard)\n"
msgstr "Opcions POSIX:\t\tOpcions llargues GNU:\n"
-#: main.c:781
+#: main.c:770
msgid "\t-f progfile\t\t--file=progfile\n"
msgstr "\t-f fitx_prog\t\t--file=fitx_prog\n"
-#: main.c:782
+#: main.c:771
msgid "\t-F fs\t\t\t--field-separator=fs\n"
msgstr "\t-F fs\t\t\t--field-separator=fs (fs=sep_camp)\n"
-#: main.c:783
+#: main.c:772
msgid "\t-v var=val\t\t--assign=var=val\n"
msgstr "\t-v var=valor\t\t--assign=var=valor\n"
-#: main.c:784
+#: main.c:773
#, fuzzy
-msgid "POSIX options:\t\tGNU long options: (extensions)\n"
+msgid "Short options:\t\tGNU long options: (extensions)\n"
msgstr "Opcions POSIX:\t\tOpcions llargues GNU:\n"
-#: main.c:785
+#: main.c:774
msgid "\t-m[fr] val\n"
msgstr "\t-m[fr] valor\n"
-#: main.c:786
+#: main.c:775
msgid "\t-b\t\t\t--characters-as-bytes\n"
msgstr ""
-#: main.c:787
-msgid "\t-c\t\t\t--compat, --traditional\n"
-msgstr ""
+#: main.c:776
+#, fuzzy
+msgid "\t-c\t\t\t--traditional\n"
+msgstr "\t-W traditional\t\t--traditional\n"
-#: main.c:788
+#: main.c:777
#, fuzzy
-msgid "\t-C\t\t\t--copyleft, --copyright\n"
+msgid "\t-C\t\t\t--copyright\n"
msgstr "\t-W copyright\t\t--copyright\n"
-#: main.c:789
+#: main.c:778
#, fuzzy
msgid "\t-d [file]\t\t--dump-variables[=file]\n"
msgstr "\t-W dump-variables[=fitxer] --dump-variables[=fitxer]\n"
-#: main.c:790
+#: main.c:779
#, fuzzy
msgid "\t-e 'program-text'\t--source='program-text'\n"
msgstr "\t-W source=text_prog\t--source=text_prog\n"
-#: main.c:791
+#: main.c:780
#, fuzzy
msgid "\t-E file\t\t\t--exec=file\n"
msgstr "\t-W profile[=fitxer]\t--profile[=fitxer]\n"
-#: main.c:792
+#: main.c:781
#, fuzzy
msgid "\t-g\t\t\t--gen-pot\n"
msgstr "\t-W gen-po\t\t--gen-po\n"
-#: main.c:793
+#: main.c:782
#, fuzzy
-msgid "\t-h\t\t\t--help, --usage\n"
+msgid "\t-h\t\t\t--help\n"
msgstr "\t-W help\t\t\t--help\n"
-#: main.c:794
+#: main.c:783
#, fuzzy
-msgid "\t-l [fatal]\t\t--lint[=fatal]\n"
+msgid "\t-L [fatal]\t\t--lint[=fatal]\n"
msgstr "\t-W lint[=fatal]\t\t--lint[=fatal]\n"
-#: main.c:795
-#, fuzzy
-msgid "\t-L\t\t\t--lint-old\n"
-msgstr "\t-W lint-old\t\t--lint-old\n"
-
-#: main.c:796
+#: main.c:784
#, fuzzy
msgid "\t-n\t\t\t--non-decimal-data\n"
msgstr "\t-W non-decimal-data\t--non-decimal-data\n"
-#: main.c:797
+#: main.c:785
msgid "\t-N\t\t\t--use-lc-numeric\n"
msgstr ""
-#: main.c:798
+#: main.c:786
msgid "\t-O\t\t\t--optimize\n"
msgstr ""
-#: main.c:799
+#: main.c:787
#, fuzzy
msgid "\t-p [file]\t\t--profile[=file]\n"
msgstr "\t-W profile[=fitxer]\t--profile[=fitxer]\n"
-#: main.c:800
+#: main.c:788
#, fuzzy
msgid "\t-P\t\t\t--posix\n"
msgstr "\t-W posix\t\t--posix\n"
-#: main.c:801
+#: main.c:789
#, fuzzy
msgid "\t-r\t\t\t--re-interval\n"
msgstr "\t-W re-interval\t\t--re-interval\n"
-#: main.c:802
+#: main.c:791
#, fuzzy
+msgid "\t-R file\t\t\t--command=file\n"
+msgstr "\t-W profile[=fitxer]\t--profile[=fitxer]\n"
+
+#: main.c:792
msgid "\t-S\t\t\t--sandbox\n"
-msgstr "\t-W posix\t\t--posix\n"
+msgstr ""
+
+#: main.c:793
+#, fuzzy
+msgid "\t-t\t\t\t--lint-old\n"
+msgstr "\t-W lint-old\t\t--lint-old\n"
-#: main.c:803
+#: main.c:794
#, fuzzy
msgid "\t-V\t\t\t--version\n"
msgstr "\t-W version\t\t--version\n"
-#: main.c:805
+#: main.c:796
msgid "\t-W nostalgia\t\t--nostalgia\n"
msgstr "\t-W nostalgia\t\t--nostalgia\n"
-#: main.c:808
-msgid "\t-W parsedebug\t\t--parsedebug\n"
+#: main.c:799
+#, fuzzy
+msgid "\t-Y\t\t--parsedebug\n"
msgstr "\t-W parsedebug\t\t--parsedebug\n"
#. TRANSLATORS: --help output 5 (end)
@@ -1777,7 +1713,7 @@ msgstr "\t-W parsedebug\t\t--parsedebug\n"
#. for this application. Please add _another line_ with the
#. address for translation bugs.
#. no-wrap
-#: main.c:817
+#: main.c:808
#, fuzzy
msgid ""
"\n"
@@ -1786,22 +1722,22 @@ msgid ""
"\n"
msgstr "a la secció «Reporting Problems and Bugs» de la versió impresa.\n"
-#: main.c:821
+#: main.c:812
msgid ""
"gawk is a pattern scanning and processing language.\n"
"By default it reads standard input and writes standard output.\n"
"\n"
msgstr ""
-#: main.c:825
+#: main.c:816
msgid ""
"Examples:\n"
"\tgawk '{ sum += $1 }; END { print sum }' file\n"
"\tgawk -F: '{ print $1 }' /etc/passwd\n"
msgstr ""
-#: main.c:845
-#, c-format
+#: main.c:836
+#, fuzzy, c-format
msgid ""
"Copyright (C) 1989, 1991-%d Free Software Foundation.\n"
"\n"
@@ -1815,11 +1751,11 @@ msgstr ""
"\n"
"Aquest programa és programari lliure; pot redistribuir-se i/o modificar-se\n"
"sota els termes de la Llicència Pública General de GNU tal i como està\n"
-"publicada per la Free Software Foundation; ja siga en la versió 3 de la\n"
+"publicada per la Free Software Foundation; ja siga en la versió 2 de la\n"
"Llicència, o (a la vostra elecció) qualsevol versió posterior.\n"
"\n"
-#: main.c:853
+#: main.c:844
msgid ""
"This program is distributed in the hope that it will be useful,\n"
"but WITHOUT ANY WARRANTY; without even the implied warranty of\n"
@@ -1833,7 +1769,7 @@ msgstr ""
"Per a més detalls consulteu la Llicència Pública General de GNU.\n"
"\n"
-#: main.c:864
+#: main.c:855
#, fuzzy
msgid ""
"You should have received a copy of the GNU General Public License\n"
@@ -1841,193 +1777,158 @@ msgid ""
msgstr ""
"Junt amb aquest programa hauríeu d'haber rebut una còpia de la Llicència\n"
"Pública General de GNU; si no és així, escriviu a la Free Software\n"
-"Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, "
-"USA.\n"
+"Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.\n"
-#: main.c:899
+#: main.c:890
msgid "-Ft does not set FS to tab in POSIX awk"
msgstr "-Ft no permet inicialitzar FS a un tabulador en la versió POSIX de awk"
-#: main.c:1116
+#: main.c:1122
#, c-format
msgid "unknown value for field spec: %d\n"
msgstr ""
-#: main.c:1176
+#: main.c:1182
#, c-format
msgid ""
"%s: `%s' argument to `-v' not in `var=value' form\n"
"\n"
msgstr ""
-#: main.c:1196
+#: main.c:1202
#, c-format
msgid "`%s' is not a legal variable name"
msgstr ""
-#: main.c:1199
+#: main.c:1205
#, c-format
msgid "`%s' is not a variable name, looking for file `%s=%s'"
msgstr ""
-#: main.c:1238
+#: main.c:1258
msgid "floating point exception"
msgstr "excepció de coma flotant"
-#: main.c:1245
+#: main.c:1265
msgid "fatal error: internal error"
msgstr "error fatal: error intern"
-#: main.c:1260
+#: main.c:1280
#, fuzzy
msgid "fatal error: internal error: segfault"
msgstr "error fatal: error intern"
-#: main.c:1272
+#: main.c:1292
#, fuzzy
msgid "fatal error: internal error: stack overflow"
msgstr "error fatal: error intern"
-#: main.c:1322
+#: main.c:1342
#, c-format
msgid "no pre-opened fd %d"
msgstr "no s'ha pre-obert el descriptor fd per a %d"
-#: main.c:1329
+#: main.c:1349
#, c-format
msgid "could not pre-open /dev/null for fd %d"
msgstr "no es pot pre-obrir /dev/null per al descriptor fd %d"
-#: main.c:1352 main.c:1361
+#: main.c:1372 main.c:1381
#, c-format
msgid "could not find groups: %s"
msgstr "no es poden trobar els grups: %s"
-#: msg.c:54
+#: msg.c:62
#, c-format
msgid "cmd. line:"
msgstr "línia cmd.:"
-#: msg.c:120
+#: msg.c:97
msgid "warning: "
msgstr "ADVERTIMENT: "
-#: msg.c:142
+#: msg.c:106
msgid "error: "
msgstr "Error: "
-#: msg.c:178
+#: msg.c:129
msgid "fatal: "
msgstr "Fatal: "
-#: node.c:63 node.c:78 node.c:105 node.c:121 node.c:151
-msgid "can't convert string to float"
-msgstr "no es pot convertir la cadena a coma flotant"
-
-#: node.c:465
+#: node.c:401
msgid "backslash at end of string"
msgstr "barra invertida al final de la cadena"
-#: node.c:609
+#: node.c:502
#, fuzzy, c-format
msgid "old awk does not support the `\\%c' escape sequence"
msgstr "l'antic awk no suporta l'operador «**=»"
-#: node.c:660
+#: node.c:553
msgid "POSIX does not allow `\\x' escapes"
msgstr "POSIX no permet seqüències d'escapada «\\x»"
-#: node.c:666
+#: node.c:559
msgid "no hex digits in `\\x' escape sequence"
msgstr "no hi ha dígits hexadecimals en la seqüència d'escapada «\\x»"
-#: node.c:688
+#: node.c:581
#, c-format
msgid ""
"hex escape \\x%.*s of %d characters probably not interpreted the way you "
"expect"
msgstr ""
-#: node.c:703
+#: node.c:596
#, c-format
msgid "escape sequence `\\%c' treated as plain `%c'"
msgstr "la seqüència d'escapada «\\%c» és tractada com a una simple «%c»"
+#: node.c:737
+msgid ""
+"Invalid multibyte data detected. There may be a mismatch between your data "
+"and your locale."
+msgstr ""
+
#: posix/gawkmisc.c:172
#, c-format
msgid "%s %s `%s': could not set close-on-exec: (fcntl: %s)"
msgstr "%s %s «%s»: no es pot inicialitzar close-on-exec: (fcntl: %s)"
-#: profile.c:94
+#: profile.c:83
#, c-format
msgid "could not open `%s' for writing: %s"
msgstr "no es pot obrir «%s» per a escriptura: %s"
-#: profile.c:457
+#: profile.c:203
#, fuzzy, c-format
-msgid "internal error: %s with null vname"
-msgstr "error intern: Node_var amb vname nul"
-
-#: profile.c:522
-msgid "# treated internally as `delete'"
-msgstr ""
-
-#: profile.c:1076
-#, c-format
-msgid "# this is a dynamically loaded extension function"
-msgstr ""
-
-#: profile.c:1109
-#, c-format
-msgid "\t# gawk profile, created %s\n"
-msgstr "\t# perfil gawk, creat %s\n"
-
-#: profile.c:1112
-#, c-format
msgid ""
-"\t# BEGIN block(s)\n"
+"\t# %s block(s)\n"
"\n"
msgstr ""
-"\t# Bloc(s) INICI\n"
+"\t# Bloc(s) FINAL\n"
"\n"
-#: profile.c:1122
+#: profile.c:208
#, fuzzy, c-format
msgid ""
-"\t# BEGINFILE block(s)\n"
-"\n"
-msgstr ""
-"\t# Bloc(s) INICI\n"
-"\n"
-
-#: profile.c:1132
-#, c-format
-msgid ""
-"\t# Rule(s)\n"
+"\t# %s(s)\n"
"\n"
msgstr ""
"\t# Regla(es)\n"
"\n"
-#: profile.c:1138
+#: profile.c:278
#, fuzzy, c-format
-msgid ""
-"\t# ENDFILE block(s)\n"
-"\n"
-msgstr ""
-"\t# Bloc(s) FINAL\n"
-"\n"
+msgid "internal error: %s with null vname"
+msgstr "error intern: Node_var amb vname nul"
-#: profile.c:1148
+#: profile.c:945
#, c-format
-msgid ""
-"\t# END block(s)\n"
-"\n"
-msgstr ""
-"\t# Bloc(s) FINAL\n"
-"\n"
+msgid "\t# gawk profile, created %s\n"
+msgstr "\t# perfil gawk, creat %s\n"
-#: profile.c:1168
+#: profile.c:1328
#, c-format
msgid ""
"\n"
@@ -2036,17 +1937,12 @@ msgstr ""
"\n"
"\t# Funcions, llistades alfabèticament\n"
-#: profile.c:1431
+#: profile.c:1367
#, c-format
-msgid "unexpected type %s in prec_level"
-msgstr "tipus %s inesperat en prec_level"
-
-#: profile.c:1557
-#, fuzzy, c-format
-msgid "Unknown node type %s in pp_var"
-msgstr "tipo de node %d desconegut"
+msgid "redir2str: unknown redirection type %d"
+msgstr ""
-#: re.c:537
+#: re.c:559
#, c-format
msgid "regexp component `%.*s' should probably be `[%.*s]'"
msgstr ""
@@ -2119,20 +2015,40 @@ msgstr "L'expressió regular és massa gran"
msgid "Unmatched ) or \\)"
msgstr ") o \\) desemparellats"
-#: regcomp.c:699
+#: regcomp.c:701
msgid "No previous regular expression"
msgstr "No hi ha una expressió regular prèvia"
-#~ msgid "%s: illegal option -- %c\n"
-#~ msgstr "%s: opció il·legal -- %c\n"
+#~ msgid "call of `length' without parentheses is deprecated by POSIX"
+#~ msgstr "la crida de «length» sense parèntesis està desaprovada per POSIX"
+
+#, fuzzy
+#~ msgid "reference to uninitialized field `$%s'"
+#~ msgstr "referència a una variable sense inicialitzar «%s»"
+
+#~ msgid "can't convert string to float"
+#~ msgstr "no es pot convertir la cadena a coma flotant"
+
+#~ msgid "`continue' outside a loop is not portable"
+#~ msgstr "«continue» fora d'un bucle no és portable"
+
+#~ msgid "`break' outside a loop is not portable"
+#~ msgstr "«break» a fora d'un bucle no és portable"
+
+#~ msgid "`nextfile' cannot be called from a BEGIN rule"
+#~ msgstr "«nextfile» no es pot cridar des d'una regla BEGIN"
+
+#~ msgid "`next' cannot be called from a BEGIN rule"
+#~ msgstr "«next» no es pot cridar des d'una regla BEGIN"
#~ msgid "file `%s' is a directory"
#~ msgstr "el fitxer «%s» és un directori"
-#~ msgid "can't open two way socket `%s' for input/output (%s)"
-#~ msgstr ""
-#~ "no es pot obrir un socket bidireccional «%s» per a les entrades/eixides (%"
-#~ "s)"
+#~ msgid "use `PROCINFO[\"%s\"]' instead of `%s'"
+#~ msgstr "useu «PROCINFO[\"%s\"]» en comptes de «%s»"
+
+#~ msgid "use `PROCINFO[...]' instead of `/dev/user'"
+#~ msgstr "useu «PROCINFO[...]» en comptes de «/dev/user»"
#~ msgid "\t-W compat\t\t--compat\n"
#~ msgstr "\t-W compat\t\t--compat\n"
@@ -2140,65 +2056,101 @@ msgstr "No hi ha una expressió regular prèvia"
#~ msgid "\t-W copyleft\t\t--copyleft\n"
#~ msgstr "\t-W copyleft\t\t--copyleft\n"
-#~ msgid "\t-W traditional\t\t--traditional\n"
-#~ msgstr "\t-W traditional\t\t--traditional\n"
-
#~ msgid "\t-W usage\t\t--usage\n"
#~ msgstr "\t-W usage\t\t--usage\n"
-#, fuzzy
-#~ msgid "seek: invalid arguments"
-#~ msgstr "printf: sense arguments"
+#~ msgid ""
+#~ "\t# BEGIN block(s)\n"
+#~ "\n"
+#~ msgstr ""
+#~ "\t# Bloc(s) INICI\n"
+#~ "\n"
-#, fuzzy
-#~ msgid "seek: `%.*s' is not an open file, pipe, or co-process"
-#~ msgstr "close: «%.*s» no és un fitxer obert, canonada o co-procés"
+#~ msgid "`$' is not permitted in awk formats"
+#~ msgstr "no es permeten «$» en els formats awk"
+
+#~ msgid "arg count with `$' must be > 0"
+#~ msgstr "el compte d'arguments amb «$» ha de ser > 0"
#, fuzzy
-#~ msgid "seek: `%.*s' is not an input file, pipe, or co-process"
-#~ msgstr "close: «%.*s» no és un fitxer obert, canonada o co-procés"
+#~ msgid "arg count %ld greater than total number of supplied arguments"
+#~ msgstr ""
+#~ "el comte d'arguments %d és major que el nombre total d'arguments "
+#~ "proporcionats"
-#~ msgid "use `PROCINFO[\"%s\"]' instead of `%s'"
-#~ msgstr "useu «PROCINFO[\"%s\"]» en comptes de «%s»"
+#~ msgid "`$' not permitted after period in format"
+#~ msgstr "no es permet «$» després d'un punt en el format"
-#~ msgid "use `PROCINFO[...]' instead of `/dev/user'"
-#~ msgstr "useu «PROCINFO[...]» en comptes de «/dev/user»"
+#~ msgid "no `$' supplied for positional field width or precision"
+#~ msgstr "no es proporciona «$» per a l'ample o precisió del camp de posició"
-#~ msgid "function %s called\n"
-#~ msgstr "s'ha cridat a la funció %s\n"
+#~ msgid "`l' is meaningless in awk formats; ignored"
+#~ msgstr "«l» manca de significat en els formats awk; serà ignorat"
-#~ msgid "field %d in FIELDWIDTHS, must be > 0"
-#~ msgstr "el camp %d en FIELDWIDTHS, hauria de ser > 0"
+#~ msgid "`l' is not permitted in POSIX awk formats"
+#~ msgstr "«l» no està permés en els formats POSIX de awk"
-#, fuzzy
-#~ msgid "or used as a variable or an array"
-#~ msgstr "no es pot usar el nom de la funció «%s» com a variable o matriu"
+#~ msgid "`L' is meaningless in awk formats; ignored"
+#~ msgstr "«L» manca de significat en els formats awk; serà ignorat"
-#, fuzzy
-#~ msgid "substr: length %g is < 0"
-#~ msgstr "substr: la longitud %g és <= 0"
+#~ msgid "`L' is not permitted in POSIX awk formats"
+#~ msgstr "«L» no està permés en els formats POSIX de awk"
-#~ msgid "delete: illegal use of variable `%s' as array"
-#~ msgstr "delete: ús il·legal de la variable «%s» com a una matriu"
+#~ msgid "`h' is meaningless in awk formats; ignored"
+#~ msgstr "«h» manca de significat en els formats awk; serà ignorat"
-#, fuzzy
-#~ msgid "%s: gvar_ref to %s\n"
-#~ msgstr "%s: ref_matriu a %s\n"
+#~ msgid "`h' is not permitted in POSIX awk formats"
+#~ msgstr "«h» no està permés en els formats POSIX de awk"
+
+#~ msgid "not enough arguments to satisfy format string"
+#~ msgstr "no hi ha prou arguments per a satisfer el format d'una cadena"
-#~ msgid "asort: first argument is not an array"
-#~ msgstr "asort: el primer argument no és una matriu"
+#~ msgid "^ ran out for this one"
+#~ msgstr "^ desbordament per a aquest"
-#~ msgid "asort: second argument is not an array"
-#~ msgstr "asort: el segon argument no és una matriu"
+#~ msgid "[s]printf: format specifier does not have control letter"
+#~ msgstr "[s]printf: l'especificador de format no conté lletra de control"
+
+#~ msgid "too many arguments supplied for format string"
+#~ msgstr "s'han proporcionat masses arguments per a la cadena de format"
#, fuzzy
+#~ msgid "attempt to use array parameter `%s' in a scalar context"
+#~ msgstr "s'ha intentat usar la matriu «%s» en un context escalar"
+
+#~ msgid "can't open two way socket `%s' for input/output (%s)"
+#~ msgstr ""
+#~ "no es pot obrir un socket bidireccional «%s» per a les entrades/eixides (%"
+#~ "s)"
+
+#~ msgid "%s: illegal option -- %c\n"
+#~ msgstr "%s: opció il·legal -- %c\n"
+
#~ msgid ""
-#~ "attempt to use array parameter `%s' that was passed from global scalar `%"
-#~ "s'"
-#~ msgstr "s'ha intentat usar un paràmetre escalar «%s» com a una matriu"
+#~ "concatenation: side effects in one expression have changed the length of "
+#~ "another!"
+#~ msgstr ""
+#~ "concatenació: els efectes colaterals en una expressió han canviat la "
+#~ "longitud d'una altra!"
-#~ msgid "internal error: Node_var_array with null vname"
-#~ msgstr "error intern: Node_var_array amb vname nul"
+#~ msgid "illegal type (%s) in tree_eval"
+#~ msgstr "tipus il·legal (%s) en tree_eval"
+
+#~ msgid "\t# -- main --\n"
+#~ msgstr "\t# -- principal --\n"
+
+#~ msgid "invalid tree type %s in redirect()"
+#~ msgstr "tipus d'arbre %s no vàlid dintre de redirect()"
+
+#~ msgid "unexpected type %s in prec_level"
+#~ msgstr "tipus %s inesperat en prec_level"
+
+#, fuzzy
+#~ msgid "Unknown node type %s in pp_var"
+#~ msgstr "tipo de node %d desconegut"
+
+#~ msgid "delete: illegal use of variable `%s' as array"
+#~ msgstr "delete: ús il·legal de la variable «%s» com a una matriu"
#~ msgid ""
#~ "\n"
@@ -2210,6 +2162,9 @@ msgstr "No hi ha una expressió regular prèvia"
#~ msgid "invalid syntax in name `%s' for variable assignment"
#~ msgstr "sintaxi no vàlida en el nom «%s» per a l'asignació de la variable"
+#~ msgid "internal error: Node_var_array with null vname"
+#~ msgstr "error intern: Node_var_array amb vname nul"
+
#~ msgid "or used in other expression context"
#~ msgstr "o s'ha emprat en un altre context de l'expressió"
@@ -2252,8 +2207,11 @@ msgstr "No hi ha una expressió regular prèvia"
#~ msgid "Unbalanced )"
#~ msgstr ") sense aparellar"
-#~ msgid "remote port invalid in `%s'"
-#~ msgstr "port remot no vàlid en «%s»"
+#~ msgid "field %d in FIELDWIDTHS, must be > 0"
+#~ msgstr "el camp %d en FIELDWIDTHS, hauria de ser > 0"
+
+#~ msgid "function %s called\n"
+#~ msgstr "s'ha cridat a la funció %s\n"
#~ msgid "internal error: file `%s', line %d\n"
#~ msgstr "error intern: fitxer «%s», línia %d\n"
diff --git a/po/da.gmo b/po/da.gmo
index e3edf0a5..707e5c80 100644
--- a/po/da.gmo
+++ b/po/da.gmo
Binary files differ
diff --git a/po/da.po b/po/da.po
index 643860aa..b38b2bc7 100644
--- a/po/da.po
+++ b/po/da.po
@@ -6,7 +6,7 @@ msgid ""
msgstr ""
"Project-Id-Version: gawk 3.1.31\n"
"Report-Msgid-Bugs-To: arnold@skeeve.com\n"
-"POT-Creation-Date: 2010-11-12 12:20+0200\n"
+"POT-Creation-Date: 2010-11-17 08:48+0200\n"
"PO-Revision-Date: 2002-11-09 10:09+0100\n"
"Last-Translator: Keld Simonsen <keld@dkuug.dk>\n"
"Language-Team: Danish <dansk@klid.dk>\n"
@@ -14,412 +14,488 @@ msgstr ""
"Content-Type: text/plain; charset=iso-8859-1\n"
"Content-Transfer-Encoding: 8bit\n"
-#: array.c:112
+#: array.c:103
+#, fuzzy, c-format
+msgid "from %s"
+msgstr "%s (fra %s)"
+
+#: array.c:267
+#, fuzzy
+msgid "attempt to use a scalar value as array"
+msgstr "forsøg på at bruge skalaren \"%s\" som vektor"
+
+#: array.c:270
#, fuzzy, c-format
msgid "attempt to use function `%s' as an array"
msgstr "forsøg på at bruge funktionen \"%s\" som vektor"
-#: array.c:115
+#: array.c:273
#, c-format
msgid "attempt to use scalar parameter `%s' as an array"
msgstr "forsøg på at bruge skalarparameteren \"%s\" som en vektor"
-#: array.c:118
+#: array.c:276
#, c-format
msgid "attempt to use scalar `%s' as array"
msgstr "forsøg på at bruge skalaren \"%s\" som vektor"
-#: array.c:156
-#, fuzzy, c-format
-msgid "from %s"
-msgstr "%s (fra %s)"
+#: array.c:321 array.c:648 eval.c:1075 eval.c:1079 eval.c:1581 eval.c:1649
+#: eval.c:1928
+#, c-format
+msgid "attempt to use array `%s' in a scalar context"
+msgstr "forsøg på at bruge vektoren \"%s\" i skalarsammenhæng"
-#: array.c:513
+#: array.c:570
#, fuzzy, c-format
msgid "reference to uninitialized element `%s[\"%.*s\"]'"
msgstr "reference til ikke-initieret element \"%s[\"%s\"]\""
-#: array.c:519
+#: array.c:576
#, c-format
msgid "subscript of array `%s' is null string"
msgstr "indeks i vektoren \"%s\" er en tom streng"
-#: array.c:623
+#: array.c:684
#, c-format
msgid "delete: index `%s' not in array `%s'"
msgstr "delete: indeks \"%s\" findes ikke i vektoren \"%s\""
-#: array.c:792
+#: array.c:705
+#, fuzzy, c-format
+msgid "attempt to use scalar `%s[\"%.*s\"]' as an array"
+msgstr "forsøg på at bruge skalaren \"%s\" som vektor"
+
+#: array.c:868
#, c-format
msgid "%s: empty (null)\n"
msgstr "%s: tom (nil)\n"
-#: array.c:797
+#: array.c:873
#, c-format
msgid "%s: empty (zero)\n"
msgstr "%s: tom (nul)\n"
-#: array.c:801
+#: array.c:877
#, c-format
msgid "%s: table_size = %d, array_size = %d\n"
msgstr "%s: tabelstørrelse = %d, vektorstørrelse = %d\n"
-#: array.c:830
+#: array.c:912
#, fuzzy, c-format
msgid "%s: is parameter\n"
msgstr "%s: er en parameter\n"
-#: array.c:835
+#: array.c:916
#, c-format
msgid "%s: array_ref to %s\n"
msgstr "%s: vektorreference til %s\n"
-#: awkgram.y:224 awkgram.y:227
+#: array.c:921
+#, fuzzy
+msgid "adump: argument not an array"
+msgstr "asort: første argument er ikke en vektor"
+
+#: array.c:1139
+#, fuzzy
+msgid "attempt to use array in a scalar context"
+msgstr "forsøg på at bruge vektoren \"%s\" i skalarsammenhæng"
+
+#: array.c:1236
+#, fuzzy
+msgid "asort: second argument not an array"
+msgstr "asort: andet argument er ikke en vektor"
+
+#: array.c:1237
+#, fuzzy
+msgid "asorti: second argument not an array"
+msgstr "asort: andet argument er ikke en vektor"
+
+#: array.c:1245
+#, fuzzy
+msgid "asort: first argument not an array"
+msgstr "asort: første argument er ikke en vektor"
+
+#: array.c:1246
+#, fuzzy
+msgid "asorti: first argument not an array"
+msgstr "asort: første argument er ikke en vektor"
+
+#: awkgram.y:246
#, fuzzy, c-format
msgid "%s blocks must have an action part"
msgstr "END-blok skal have en handlingsdel"
-#: awkgram.y:230
+#: awkgram.y:249
#, fuzzy
msgid "each rule must have a pattern or an action part"
msgstr "END-blok skal have en handlingsdel"
-#: awkgram.y:266 awkgram.y:275
+#: awkgram.y:320 awkgram.y:330
#, fuzzy
msgid "old awk does not support multiple `BEGIN' or `END' rules"
msgstr "gamle awk understøtter ikke operatoren \"**\""
-#: awkgram.y:304
+#: awkgram.y:367
#, c-format
msgid "`%s' is a built-in function, it cannot be redefined"
msgstr "\"%s\" er en indbygget funktion, den kan ikke omdefineres"
-#: awkgram.y:350
+#: awkgram.y:427
#, fuzzy
msgid "regexp constant `//' looks like a C++ comment, but is not"
msgstr "regexp-konstanten \"/%s/\" ser ud som en C-kommentar, men er det ikke"
-#: awkgram.y:353
+#: awkgram.y:430
#, c-format
msgid "regexp constant `/%s/' looks like a C comment, but is not"
msgstr "regexp-konstanten \"/%s/\" ser ud som en C-kommentar, men er det ikke"
-#: awkgram.y:380 awkgram.y:692
-msgid "statement may have no effect"
-msgstr "kommandoen har måske ikke nogen effekt"
+#: awkgram.y:735
+#, fuzzy
+msgid "`break' is not allowed outside a loop or switch"
+msgstr "\"break\" uden for en løkke er ikke tilladt"
-#: awkgram.y:477 awkgram.y:480 awkgram.y:504 awkgram.y:511 awkgram.y:518
+#: awkgram.y:744
+#, fuzzy
+msgid "`continue' is not allowed outside a loop"
+msgstr "\"continue\" uden for en løkke er ikke tilladt"
+
+#: awkgram.y:753
#, fuzzy, c-format
-msgid "`%s' used in %s action"
+msgid "`next' used in %s action"
msgstr "\"next\" brugt i BEGIN- eller END-handling"
-#: awkgram.y:495 awkgram.y:499
+#: awkgram.y:767 awkgram.y:771
msgid "`nextfile' is a gawk extension"
msgstr "\"nextfile\" er en gawk-udvidelse"
-#: awkgram.y:528
+#: awkgram.y:775
+#, fuzzy, c-format
+msgid "`nextfile' used in %s action"
+msgstr "\"next\" brugt i BEGIN- eller END-handling"
+
+#: awkgram.y:799
msgid "`return' used outside function context"
msgstr "\"return\" brugt uden for funktion"
-#: awkgram.y:570
+#: awkgram.y:859
msgid "plain `print' in BEGIN or END rule should probably be `print \"\"'"
msgstr ""
"alenestående \"print\" i BEGIN eller END-regel bør muligvis være 'print \"\"'"
-#: awkgram.y:586 awkgram.y:594
+#: awkgram.y:927 awkgram.y:935
msgid "`delete array' is a gawk extension"
msgstr "\"delete array\" er en gawk-udvidelse"
-#: awkgram.y:608 awkgram.y:616
+#: awkgram.y:955 awkgram.y:963
#, fuzzy
msgid "`delete(array)' is a non-portable tawk extension"
msgstr "\"delete array\" er en gawk-udvidelse"
-#: awkgram.y:660
+#: awkgram.y:1004
#, c-format
msgid "duplicate case values in switch body: %s"
msgstr ""
-#: awkgram.y:670
-msgid "Duplicate `default' detected in switch body"
+#: awkgram.y:1014
+msgid "duplicate `default' detected in switch body"
msgstr ""
-#: awkgram.y:759
+#: awkgram.y:1151
msgid "multistage two-way pipelines don't work"
msgstr "flertrins dobbeltrettede datakanaler fungerer ikke"
-#: awkgram.y:850
+#: awkgram.y:1253
msgid "regular expression on right of assignment"
msgstr "regulært udtryk i højreleddet af en tildeling"
-#: awkgram.y:860
+#: awkgram.y:1263
msgid "regular expression on left of `~' or `!~' operator"
msgstr "regulært udtryk på venstre side af en \"~\"- eller \"!~\"-operator"
-#: awkgram.y:866 awkgram.y:954
+#: awkgram.y:1278 awkgram.y:1423
#, fuzzy
msgid "old awk does not support the keyword `in' except after `for'"
msgstr "gamle awk understøtter ikke operatoren \"**\""
-#: awkgram.y:872
+#: awkgram.y:1287
msgid "regular expression on right of comparison"
msgstr "regulært udtryk i højreleddet af en sammenligning"
-#: awkgram.y:936
+#: awkgram.y:1399
#, fuzzy, c-format
-msgid "`getline var' invalid inside %s rule"
+msgid "`getline var' invalid inside `%s' rule"
msgstr "fjernporten ugyldig i \"%s\""
-#: awkgram.y:939
-#, c-format
-msgid "`getline' invalid inside %s rule"
-msgstr ""
+#: awkgram.y:1401
+#, fuzzy, c-format
+msgid "`getline' invalid inside `%s' rule"
+msgstr "fjernporten ugyldig i \"%s\""
-#: awkgram.y:944
+#: awkgram.y:1407
msgid "non-redirected `getline' undefined inside END action"
msgstr "ikke-omdirigeret \"getline\" udefineret inde i END-handling"
-#: awkgram.y:955
+#: awkgram.y:1424
#, fuzzy
msgid "old awk does not support multidimensional arrays"
msgstr "gamle awk understøtter ikke operatoren \"**\""
-#: awkgram.y:1001
+#: awkgram.y:1528
msgid "call of `length' without parentheses is not portable"
msgstr "kald af \"length\" uden parenteser er ikke portabelt"
-#: awkgram.y:1006
-msgid "call of `length' without parentheses is deprecated by POSIX"
-msgstr "kald af \"length\" uden parenteser er forældet ifølge POSIX"
-
-#: awkgram.y:1051
+#: awkgram.y:1591
#, fuzzy
msgid "indirect function calls are a gawk extension"
-msgstr "\"extension\" er en gawk-udvidelse"
+msgstr "\"nextfile\" er en gawk-udvidelse"
-#: awkgram.y:1084
-msgid "use of non-array as array"
-msgstr ""
+#: awkgram.y:1605
+#, fuzzy, c-format
+msgid "can not use special variable `%s' for indirect function call"
+msgstr "funktionen \"%s\": kan ikke bruge funktionsnavn som parameternavn"
-#: awkgram.y:1087
+#: awkgram.y:1682
msgid "invalid subscript expression"
msgstr "ugyldig indeksudtryk"
-#: awkgram.y:1329
+#: awkgram.y:1722
+msgid "use of non-array as array"
+msgstr ""
+
+#: awkgram.y:1993
#, fuzzy
msgid "unexpected newline or end of string"
msgstr "uventet nylinjetegn"
-#: awkgram.y:1446
-msgid "empty program text on command line"
-msgstr "tom programtekst på kommandolinjen"
-
-#: awkgram.y:1502
+#: awkgram.y:2248 awkgram.y:2296 awkgram.y:2470
#, c-format
msgid "can't open source file `%s' for reading (%s)"
msgstr "kan ikke åbne kildefilen \"%s\" for læsning (%s)"
-#: awkgram.y:1600
+#: awkgram.y:2249 awkgram.y:2297 builtin.c:122
+msgid "reason unknown"
+msgstr "ukendt årsag"
+
+#: awkgram.y:2257
+#, fuzzy, c-format
+msgid "already included source file `%s'"
+msgstr "kan ikke læse kildefilen \"%s\" (%s)"
+
+#: awkgram.y:2281
+#, fuzzy
+msgid "@include is a gawk extension"
+msgstr "\"nextfile\" er en gawk-udvidelse"
+
+#: awkgram.y:2288
+msgid "empty filename after @include"
+msgstr ""
+
+#: awkgram.y:2422
+msgid "empty program text on command line"
+msgstr "tom programtekst på kommandolinjen"
+
+#: awkgram.y:2537
#, c-format
msgid "can't read sourcefile `%s' (%s)"
msgstr "kan ikke læse kildefilen \"%s\" (%s)"
-#: awkgram.y:1608
+#: awkgram.y:2547
#, c-format
msgid "source file `%s' is empty"
msgstr "kildefilen \"%s\" er tom"
-#: awkgram.y:1800 awkgram.y:1922 awkgram.y:1940 awkgram.y:2315 awkgram.y:2407
+#: awkgram.y:2732
msgid "source file does not end in newline"
msgstr "kildefilen slutter ikke med en ny linje"
-#: awkgram.y:1862
+#: awkgram.y:2809
msgid "unterminated regexp ends with `\\' at end of file"
msgstr "uafsluttet regulært udtryk slutter med \"\\\" i slutningen af filen"
-#: awkgram.y:1886
+#: awkgram.y:2833
#, c-format
msgid "%s: %d: tawk regex modifier `/.../%c' doesn't work in gawk"
msgstr ""
-#: awkgram.y:1890
+#: awkgram.y:2837
#, c-format
msgid "tawk regex modifier `/.../%c' doesn't work in gawk"
msgstr ""
-#: awkgram.y:1897
+#: awkgram.y:2844
msgid "unterminated regexp"
msgstr "uafsluttet regulært udtryk"
-#: awkgram.y:1900
+#: awkgram.y:2848
msgid "unterminated regexp at end of file"
msgstr "uafsluttet regulært udtryk i slutningen af filen"
-#: awkgram.y:1969
+#: awkgram.y:2907
msgid "use of `\\ #...' line continuation is not portable"
msgstr "Brug af \"\\ #...\" for linjefortsættelse er ikke portabelt"
-#: awkgram.y:1982
+#: awkgram.y:2923
msgid "backslash not last character on line"
msgstr "sidste tegn på linjen er ikke en omvendt skråstreg"
-#: awkgram.y:2027
+#: awkgram.y:2984
msgid "POSIX does not allow operator `**='"
msgstr "POSIX tillader ikke operatoren \"**=\""
-#: awkgram.y:2029
+#: awkgram.y:2986
msgid "old awk does not support operator `**='"
msgstr "gamle awk understøtter ikke operatoren \"**=\""
-#: awkgram.y:2038
+#: awkgram.y:2995
msgid "POSIX does not allow operator `**'"
msgstr "POSIX tillader ikke operatoren \"**\""
-#: awkgram.y:2040
+#: awkgram.y:2997
msgid "old awk does not support operator `**'"
msgstr "gamle awk understøtter ikke operatoren \"**\""
-#: awkgram.y:2071
+#: awkgram.y:3032
msgid "operator `^=' is not supported in old awk"
msgstr "operatoren \"^=\" understøttes ikke i gamle awk"
-#: awkgram.y:2079
+#: awkgram.y:3040
msgid "operator `^' is not supported in old awk"
msgstr "operatoren \"^\" understøttes ikke i gamle awk"
-#: awkgram.y:2163 awkgram.y:2178
+#: awkgram.y:3133 awkgram.y:3149
msgid "unterminated string"
msgstr "uafsluttet streng"
-#: awkgram.y:2368
+#: awkgram.y:3345
#, c-format
msgid "invalid char '%c' in expression"
msgstr "ugyldigt tegn \"%c\" i udtryk"
-#: awkgram.y:2416
+#: awkgram.y:3391
#, c-format
msgid "`%s' is a gawk extension"
msgstr "\"%s\" er en gawk-udvidelse"
-#: awkgram.y:2419
+#: awkgram.y:3394
#, c-format
msgid "`%s' is a Bell Labs extension"
msgstr "\"%s\" er en Bell Labs-udvidelse"
-#: awkgram.y:2422
+#: awkgram.y:3397
#, c-format
msgid "POSIX does not allow `%s'"
msgstr "POSIX tillader ikke \"%s\""
-#: awkgram.y:2426
+#: awkgram.y:3401
#, c-format
msgid "`%s' is not supported in old awk"
msgstr "\"%s\" understøttes ikke i gamle awk"
-#: awkgram.y:2452
+#: awkgram.y:3465
msgid "`goto' considered harmful!\n"
msgstr "\"goto\" anses for skadlig!\n"
-#: awkgram.y:2514
+#: awkgram.y:3518
#, c-format
msgid "%d is invalid as number of arguments for %s"
msgstr "%d er et ugyldigt antal argumenter for %s"
-#: awkgram.y:2533 awkgram.y:2536
+#: awkgram.y:3544 awkgram.y:3547
msgid "match: third argument is a gawk extension"
msgstr "match: tredje argument er en gawk-udvidelse"
-#: awkgram.y:2549
+#: awkgram.y:3575
#, c-format
msgid "%s: string literal as last arg of substitute has no effect"
msgstr ""
"%s: bogstavelig streng som sidste argument til erstatning har ingen effekt"
-#: awkgram.y:2552
+#: awkgram.y:3580
#, fuzzy, c-format
msgid "%s third parameter is not a changeable object"
msgstr "sub: tredje argument er ikke et ændringsbart objekt"
-#: awkgram.y:2586 awkgram.y:2589
+#: awkgram.y:3665 awkgram.y:3668
msgid "close: second argument is a gawk extension"
msgstr "close: andet argument er en gawk-udvidelse"
-#: awkgram.y:2599
+#: awkgram.y:3680
msgid "use of dcgettext(_\"...\") is incorrect: remove leading underscore"
msgstr ""
"brug af dcgettext(_\"...\") er fejlagtigt: fjern det indledende "
"understregningstegn"
-#: awkgram.y:2614
+#: awkgram.y:3695
#, fuzzy
msgid "use of dcngettext(_\"...\") is incorrect: remove leading underscore"
msgstr ""
"brug af dcgettext(_\"...\") er fejlagtigt: fjern det indledende "
"understregningstegn"
-#: awkgram.y:2686
+#: awkgram.y:3787
#, c-format
msgid "function `%s': parameter #%d, `%s', duplicates parameter #%d"
msgstr "funktionen \"%s\": parameter %d, \"%s\", er samme som parameter %d"
-#: awkgram.y:2719
+#: awkgram.y:3829
#, c-format
msgid "function `%s': parameter `%s' shadows global variable"
msgstr "funktionen \"%s\": parameteren \"%s\" overskygger en global variabel"
-#: awkgram.y:2831
+#: awkgram.y:3987
#, c-format
msgid "could not open `%s' for writing (%s)"
msgstr "kunne ikke åbne \"%s\" for skrivning (%s)"
-#: awkgram.y:2832 profile.c:96
+#: awkgram.y:3988 profile.c:85
msgid "sending profile to standard error"
msgstr "sender profilen til standard fejl"
-#: awkgram.y:2864
+#: awkgram.y:3994
#, c-format
msgid "%s: close failed (%s)"
msgstr "%s: mislykkedes at lukke (%s)"
-#: awkgram.y:2985
+#: awkgram.y:4046
msgid "shadow_funcs() called twice!"
msgstr "shadow_funcs() kaldt to gange!"
-#: awkgram.y:3012
+#: awkgram.y:4052
msgid "there were shadowed variables."
msgstr ""
-#: awkgram.y:3085
+#: awkgram.y:4081
#, c-format
msgid "function `%s': can't use function name as parameter name"
msgstr "funktionen \"%s\": kan ikke bruge funktionsnavn som parameternavn"
-#: awkgram.y:3088
+#: awkgram.y:4086
#, fuzzy, c-format
msgid "function `%s': can't use special variable `%s' as a function parameter"
msgstr "funktionen \"%s\": kan ikke bruge funktionsnavn som parameternavn"
-#: awkgram.y:3098
+#: awkgram.y:4102
#, c-format
msgid "function name `%s' previously defined"
msgstr "funktionsnavnet \"%s\" er allerede defineret"
-#: awkgram.y:3249 awkgram.y:3255
+#: awkgram.y:4271 awkgram.y:4277
#, c-format
msgid "function `%s' called but never defined"
msgstr "funktionen \"%s\" kaldt, men aldrig defineret"
-#: awkgram.y:3258
+#: awkgram.y:4280
#, c-format
msgid "function `%s' defined but never called"
msgstr "funktionen \"%s\" defineret, men aldrig kaldt"
-#: awkgram.y:3285
+#: awkgram.y:4311
#, c-format
msgid "regexp constant for parameter #%d yields boolean value"
msgstr "konstant regulært udtryk for parameter %d giver en boolesk værdi"
-#: awkgram.y:3329
+#: awkgram.y:4420
#, fuzzy, c-format
msgid ""
"function `%s' called with space between name and `(',\n"
@@ -428,235 +504,141 @@ msgstr ""
"funktionen \"%s\" kaldt med blanktegn mellem navnet og \"(\",\n"
"%s"
-#: awkgram.y:3750
-#, fuzzy
-msgid "division by zero attempted in `/'"
-msgstr "forsøgte at dividere med nul i \"/=\""
+#: awkgram.y:4673 eval.c:1845
+msgid "division by zero attempted"
+msgstr "forsøgte at dividere med nul"
-#: awkgram.y:3755 eval.c:1411
+#: awkgram.y:4682 eval.c:1877
#, c-format
msgid "division by zero attempted in `%%'"
msgstr "forsøgte at dividere med nul i \"%%\""
-#: builtin.c:122
+#: awkgram.y:5342
+msgid "statement may have no effect"
+msgstr "kommandoen har måske ikke nogen effekt"
+
+#: builtin.c:120
#, c-format
msgid "%s to \"%s\" failed (%s)"
msgstr "%s til \"%s\" mislykkedes (%s)"
-#: builtin.c:123
+#: builtin.c:121
msgid "standard output"
msgstr "standard ud"
-#: builtin.c:124
-msgid "reason unknown"
-msgstr "ukendt årsag"
-
-#: builtin.c:137
+#: builtin.c:135
msgid "exp: received non-numeric argument"
msgstr "exp: fik et ikke-numerisk argument"
-#: builtin.c:143
+#: builtin.c:141
#, c-format
msgid "exp: argument %g is out of range"
msgstr "exp: argumentet %g er uden for tilladt område"
-#: builtin.c:201
+#: builtin.c:200
#, c-format
msgid "fflush: cannot flush: pipe `%s' opened for reading, not writing"
msgstr ""
"fflush: kan ikke spole: datakanalen \"%s\" åbnet for læsning, ikke skrivning"
-#: builtin.c:204
+#: builtin.c:203
#, c-format
msgid "fflush: cannot flush: file `%s' opened for reading, not writing"
msgstr "fflush: kan ikke spole: filen \"%s\" åbnet for læsning, ikke skrivning"
-#: builtin.c:216
+#: builtin.c:215
#, c-format
msgid "fflush: `%s' is not an open file, pipe or co-process"
msgstr "fflush: \"%s\" er ikke en åben fil, datakanal eller ko proces"
-#: builtin.c:310
+#: builtin.c:322
msgid "index: received non-string first argument"
msgstr "indeks: første argument er ikke en streng"
-#: builtin.c:312
+#: builtin.c:324
msgid "index: received non-string second argument"
msgstr "indeks: andet argument er ikke en streng"
-#: builtin.c:434
+#: builtin.c:446
msgid "int: received non-numeric argument"
msgstr "int: fik et ikke-numerisk argument"
-#: builtin.c:464
+#: builtin.c:469
#, fuzzy
msgid "`length(array)' is a gawk extension"
msgstr "\"delete array\" er en gawk-udvidelse"
-#: builtin.c:471
-msgid "length: untyped parameter argument will be forced to scalar"
-msgstr ""
-
-#: builtin.c:480
-msgid "length: untyped argument will be forced to scalar"
-msgstr ""
-
-#: builtin.c:484
+#: builtin.c:477
msgid "length: received non-string argument"
msgstr "length: fik et argument som ikke er en streng"
-#: builtin.c:515
+#: builtin.c:508
msgid "log: received non-numeric argument"
msgstr "log: fik et ikke-numerisk argument"
-#: builtin.c:518
+#: builtin.c:511
#, c-format
msgid "log: received negative argument %g"
msgstr "log: fik et negativt argument %g"
-#: builtin.c:726 builtin.c:729
-msgid "must use `count$' on all formats or none"
-msgstr ""
-
-#: builtin.c:790
-#, c-format
-msgid "field width is ignored for `%%%%' specifier"
-msgstr ""
-
-#: builtin.c:792
-#, c-format
-msgid "precision is ignored for `%%%%' specifier"
-msgstr ""
-
-#: builtin.c:794
-#, c-format
-msgid "field width and precision are ignored for `%%%%' specifier"
-msgstr ""
-
-#: builtin.c:845
-msgid "`$' is not permitted in awk formats"
-msgstr "\"$\" tillades ikke i awkformat"
-
-#: builtin.c:851
-msgid "arg count with `$' must be > 0"
-msgstr "argumentantallet med \"$\" skal være > 0"
-
-#: builtin.c:853
+#: builtin.c:531 builtin.c:573 builtin.c:586 builtin.c:982 builtin.c:994
#, fuzzy, c-format
-msgid "arg count %ld greater than total number of supplied arguments"
-msgstr "argumentantallet %d er større end antal givne argumenter"
-
-#: builtin.c:855
-msgid "`$' not permitted after period in format"
-msgstr "\"$\" tillades ikke efter et punktum i formatet"
-
-#: builtin.c:868
-msgid "no `$' supplied for positional field width or precision"
-msgstr "intet \"$\" angivet for positionsangivet feltbredde eller præcision"
-
-#: builtin.c:938
-msgid "`l' is meaningless in awk formats; ignored"
-msgstr "\"l\" er meningsløst i awk-formater, ignoreret"
-
-#: builtin.c:942
-msgid "`l' is not permitted in POSIX awk formats"
-msgstr "\"l\" tillades ikke i POSIX awk-formater"
-
-#: builtin.c:953
-msgid "`L' is meaningless in awk formats; ignored"
-msgstr "\"L\" er meningsløst i awk-formater, ignoreret"
-
-#: builtin.c:957
-msgid "`L' is not permitted in POSIX awk formats"
-msgstr "\"L\" tillades ikke i POSIX awk-formater"
-
-#: builtin.c:968
-msgid "`h' is meaningless in awk formats; ignored"
-msgstr "\"h\" er meningsløst i awk-formater, ignoreret"
-
-#: builtin.c:972
-msgid "`h' is not permitted in POSIX awk formats"
-msgstr "\"h\" tillades ikke i POSIX awk-formater"
-
-#: builtin.c:1252
-#, c-format
-msgid "[s]printf: value %g is out of range for `%%%c' format"
-msgstr ""
-
-#: builtin.c:1332
-#, c-format
-msgid "ignoring unknown format specifier character `%c': no argument converted"
-msgstr ""
-
-#: builtin.c:1338
-msgid "not enough arguments to satisfy format string"
-msgstr "for få argumenter til formatstrengen"
-
-#: builtin.c:1340
-msgid "^ ran out for this one"
-msgstr "^ sluttede her"
-
-#: builtin.c:1346
-msgid "[s]printf: format specifier does not have control letter"
-msgstr "[s]printf: formatspecifiereren har intet kommandobogstav"
-
-#: builtin.c:1349
-msgid "too many arguments supplied for format string"
-msgstr "for mange argumenter til formatstrengen"
+msgid "attempt to use array `%s' in scalar context"
+msgstr "forsøg på at bruge vektoren \"%s\" i skalarsammenhæng"
-#: builtin.c:1424 builtin.c:1427
+#: builtin.c:569 builtin.c:580
msgid "printf: no arguments"
msgstr "printf: ingen argumenter"
-#: builtin.c:1451
+#: builtin.c:621
msgid "sqrt: received non-numeric argument"
msgstr "sqrt: fik ikke-numerisk argument"
-#: builtin.c:1455
+#: builtin.c:625
#, c-format
msgid "sqrt: called with negative argument %g"
msgstr "sqrt: kaldt med negativt argument %g"
-#: builtin.c:1479
-#, c-format
-msgid "substr: start index %g is invalid, using 1"
-msgstr "substr: startindeks %g er ugyldigt, bruger 1"
-
-#: builtin.c:1484
-#, c-format
-msgid "substr: non-integer start index %g will be truncated"
-msgstr "substr: startindeks %g som ikke er et heltal bliver trunkeret"
-
-#: builtin.c:1510
+#: builtin.c:649
#, fuzzy, c-format
msgid "substr: length %g is not >= 1"
msgstr "substr: længden %g er <= 0"
-#: builtin.c:1512
+#: builtin.c:651
#, fuzzy, c-format
msgid "substr: length %g is not >= 0"
msgstr "substr: længden %g er <= 0"
-#: builtin.c:1519
+#: builtin.c:658
#, c-format
msgid "substr: non-integer length %g will be truncated"
msgstr "substr: længden %g som ikke er et heltal bliver trunkeret"
-#: builtin.c:1524
+#: builtin.c:663
#, c-format
msgid "substr: length %g too big for string indexing, truncating to %g"
msgstr ""
-#: builtin.c:1536
+#: builtin.c:675
+#, c-format
+msgid "substr: start index %g is invalid, using 1"
+msgstr "substr: startindeks %g er ugyldigt, bruger 1"
+
+#: builtin.c:680
+#, c-format
+msgid "substr: non-integer start index %g will be truncated"
+msgstr "substr: startindeks %g som ikke er et heltal bliver trunkeret"
+
+#: builtin.c:705
msgid "substr: source string is zero length"
msgstr "substr: kildestrengen er tom"
-#: builtin.c:1552
+#: builtin.c:721
#, fuzzy, c-format
msgid "substr: start index %g is past end of string"
msgstr "substr: startindeks %d er forbi slutningen på strengen"
-#: builtin.c:1560
+#: builtin.c:729
#, fuzzy, c-format
msgid ""
"substr: length %g at start index %g exceeds length of first argument (%lu)"
@@ -664,482 +646,443 @@ msgstr ""
"substr: længden %d ved startindeks %d overskrider længden af første argument "
"(%d)"
-#: builtin.c:1637
+#: builtin.c:806
+#, fuzzy
+msgid "strftime: received non-numeric second argument"
+msgstr "strftime: fik et ikke-numerisk andet argument"
+
+#: builtin.c:813
#, fuzzy
msgid "strftime: received non-string first argument"
msgstr "strftime: fik et første argument som ikke er en streng"
-#: builtin.c:1643
+#: builtin.c:819
msgid "strftime: received empty format string"
msgstr "strftime: fik en tom formatstreng"
-#: builtin.c:1652
-#, fuzzy
-msgid "strftime: received non-numeric second argument"
-msgstr "strftime: fik et ikke-numerisk andet argument"
-
-#: builtin.c:1729
+#: builtin.c:885
msgid "mktime: received non-string argument"
msgstr "mktime: fik et argument som ikke er en streng"
-#: builtin.c:1746
+#: builtin.c:902
msgid "mktime: at least one of the values is out of the default range"
msgstr ""
-#: builtin.c:1781
+#: builtin.c:937
msgid "'system' function not allowed in sandbox mode"
msgstr ""
-#: builtin.c:1786
+#: builtin.c:942
#, fuzzy
msgid "system: received non-string argument"
msgstr "system: fik et argument som ikke er en streng"
-#: builtin.c:1907 eval.c:2285
+#: builtin.c:997 eval.c:1105 eval.c:1557 eval.c:1570
+#, c-format
+msgid "reference to uninitialized variable `%s'"
+msgstr "reference til ikke-initieret variabel \"%s\""
+
+#: builtin.c:1064
#, fuzzy, c-format
msgid "reference to uninitialized field `$%d'"
msgstr "reference til ikke-initieret variabel \"%s\""
-#: builtin.c:2012
+#: builtin.c:1098
#, fuzzy
msgid "tolower: received non-string argument"
msgstr "tolower: fik et argument som ikke er en streng"
-#: builtin.c:2042
+#: builtin.c:1151
#, fuzzy
msgid "toupper: received non-string argument"
msgstr "toupper: fik et argument som ikke er en streng"
-#: builtin.c:2075
+#: builtin.c:1199
msgid "atan2: received non-numeric first argument"
msgstr "atan2: fik et ikke-numerisk første argument"
-#: builtin.c:2077
+#: builtin.c:1201
msgid "atan2: received non-numeric second argument"
msgstr "atan2: fik et ikke-numerisk andet argument"
-#: builtin.c:2096
+#: builtin.c:1220
msgid "sin: received non-numeric argument"
msgstr "sin: fik et ikke-numerisk argument"
-#: builtin.c:2112
+#: builtin.c:1236
msgid "cos: received non-numeric argument"
msgstr "cos: fik et ikke-numerisk argument"
-#: builtin.c:2165
+#: builtin.c:1289
msgid "srand: received non-numeric argument"
msgstr "srand: fik et ikke-numerisk argument"
-#: builtin.c:2200
+#: builtin.c:1320
msgid "match: third argument is not an array"
msgstr "match: tredje argument er ikke en vektor"
-#: builtin.c:2750
+#: builtin.c:1827
+#, fuzzy
msgid "gensub: third argument of 0 treated as 1"
msgstr "gensub: Nullet i tredje argument behandlet som et ét-tal"
-#: builtin.c:2866
+#: builtin.c:1869
msgid "lshift: received non-numeric first argument"
msgstr "lshift: fik et ikke-numerisk første argument"
-#: builtin.c:2868
+#: builtin.c:1871
#, fuzzy
msgid "lshift: received non-numeric second argument"
-msgstr "strftime: fik et ikke-numerisk andet argument"
+msgstr "atan2: fik et ikke-numerisk andet argument"
-#: builtin.c:2874
+#: builtin.c:1877
#, c-format
msgid "lshift(%lf, %lf): negative values will give strange results"
msgstr "lshift(%lf, %lf): negative værdier vil give mærkelige resultater"
-#: builtin.c:2876
+#: builtin.c:1879
#, c-format
msgid "lshift(%lf, %lf): fractional values will be truncated"
msgstr "lshift(%lf, %lf): flydendetalsværdier vil blive trunkeret"
-#: builtin.c:2878
+#: builtin.c:1881
#, c-format
msgid "lshift(%lf, %lf): too large shift value will give strange results"
msgstr ""
"lshift(%lf, %lf): for store skifteværdier vil give mærkelige resultater"
-#: builtin.c:2904
+#: builtin.c:1908
msgid "rshift: received non-numeric first argument"
msgstr "rshift: fik et ikke-numerisk første argument"
-#: builtin.c:2906
+#: builtin.c:1910
#, fuzzy
msgid "rshift: received non-numeric second argument"
-msgstr "strftime: fik et ikke-numerisk andet argument"
+msgstr "atan2: fik et ikke-numerisk andet argument"
-#: builtin.c:2912
+#: builtin.c:1916
#, c-format
msgid "rshift(%lf, %lf): negative values will give strange results"
msgstr "rshift(%lf, %lf): negative værdier vil give mærkelige resultater"
-#: builtin.c:2914
+#: builtin.c:1918
#, c-format
msgid "rshift(%lf, %lf): fractional values will be truncated"
msgstr "rshift(%lf, %lf): flydendetalsværdier vil blive trunkeret"
-#: builtin.c:2916
+#: builtin.c:1920
#, c-format
msgid "rshift(%lf, %lf): too large shift value will give strange results"
msgstr ""
"rshift(%lf, %lf): for store skifteværdier vil give mærkelige resultater"
-#: builtin.c:2942
+#: builtin.c:1947
msgid "and: received non-numeric first argument"
msgstr "and: fik et ikke-numerisk første argument"
-#: builtin.c:2944
+#: builtin.c:1949
#, fuzzy
msgid "and: received non-numeric second argument"
msgstr "atan2: fik et ikke-numerisk andet argument"
-#: builtin.c:2950
+#: builtin.c:1955
#, c-format
msgid "and(%lf, %lf): negative values will give strange results"
msgstr "and(%lf, %lf): negative værdier vil give mærkelige resultater"
-#: builtin.c:2952
+#: builtin.c:1957
#, c-format
msgid "and(%lf, %lf): fractional values will be truncated"
msgstr "and(%lf, %lf): flydendetalsværdier vil blive trunkeret"
-#: builtin.c:2978
+#: builtin.c:1984
msgid "or: received non-numeric first argument"
msgstr "or: fik et ikke-numerisk første argument"
-#: builtin.c:2980
+#: builtin.c:1986
#, fuzzy
msgid "or: received non-numeric second argument"
msgstr "atan2: fik et ikke-numerisk andet argument"
-#: builtin.c:2986
+#: builtin.c:1992
#, c-format
msgid "or(%lf, %lf): negative values will give strange results"
msgstr "or(%lf, %lf): negative værdier vil give mærkelige resultater"
-#: builtin.c:2988
+#: builtin.c:1994
#, c-format
msgid "or(%lf, %lf): fractional values will be truncated"
msgstr "or(%lf, %lf): flydendetalsværdier vil blive trunkeret"
-#: builtin.c:3014
+#: builtin.c:2023
msgid "xor: received non-numeric first argument"
msgstr "xor: fik et ikke-numerisk første argument"
-#: builtin.c:3016
+#: builtin.c:2025
#, fuzzy
msgid "xor: received non-numeric second argument"
msgstr "atan2: fik et ikke-numerisk andet argument"
-#: builtin.c:3022
+#: builtin.c:2031
#, c-format
msgid "xor(%lf, %lf): negative values will give strange results"
msgstr "xor(%lf, %lf): negative værdier vil give mærkelige resultater"
-#: builtin.c:3024
+#: builtin.c:2033
#, c-format
msgid "xor(%lf, %lf): fractional values will be truncated"
msgstr "xor(%lf, %lf): flydendetalsværdier vil blive trunkeret"
-#: builtin.c:3048
+#: builtin.c:2057 builtin.c:2063
msgid "compl: received non-numeric argument"
msgstr "compl: fik et ikke-numerisk argument"
-#: builtin.c:3054
+#: builtin.c:2065
#, c-format
msgid "compl(%lf): negative value will give strange results"
msgstr "compl(%lf): negative værdier vil give mærkelige resultater"
-#: builtin.c:3056
+#: builtin.c:2067
#, c-format
msgid "compl(%lf): fractional value will be truncated"
msgstr "compl(%lf): flydendetalsværdier vil blive trunkeret"
-#: builtin.c:3229
+#: builtin.c:2237
#, c-format
msgid "dcgettext: `%s' is not a valid locale category"
msgstr "dcgettext: \"%s\" er ikke en gyldig lokalekategori"
-#: eval.c:374
+#: eval.c:412
#, c-format
msgid "unknown nodetype %d"
msgstr "ukendt nodetype %d"
-#: eval.c:423
+#: eval.c:423 eval.c:437
+#, fuzzy, c-format
+msgid "unknown opcode %d"
+msgstr "ukendt nodetype %d"
+
+#: eval.c:434
+#, c-format
+msgid "opcode %s not an operator or keyword"
+msgstr ""
+
+#: eval.c:487
msgid "buffer overflow in genflags2str"
msgstr "bufferoverløb i genflags2str"
-#: eval.c:455 eval.c:461 profile.c:787
+#: eval.c:613
#, c-format
-msgid "attempt to use array `%s' in a scalar context"
-msgstr "forsøg på at bruge vektoren \"%s\" i skalarsammenhæng"
-
-#: eval.c:803
-#, fuzzy, c-format
-msgid "for loop: array `%s' changed size from %ld to %ld during loop execution"
+msgid ""
+"\n"
+"\t# Function Call Stack:\n"
+"\n"
msgstr ""
-"for-løkke: vektoren \"%s\" ændrede størrelse fra %d til %d under løkke-"
-"udførelsen"
-
-#: eval.c:824
-msgid "`break' outside a loop is not portable"
-msgstr "\"break\" uden for en løkke er ikke portabelt"
+"\n"
+"\t# Funktionskaldsstak:\n"
+"\n"
-#: eval.c:828
-msgid "`break' outside a loop is not allowed"
-msgstr "\"break\" uden for en løkke er ikke tilladt"
+#: eval.c:640
+msgid "`IGNORECASE' is a gawk extension"
+msgstr "\"IGNORECASE\" er en gawk-udvidelse"
-#: eval.c:845
-msgid "`continue' outside a loop is not portable"
-msgstr "\"continue\" uden for en løkke er ikke portabelt"
+#: eval.c:669
+msgid "`BINMODE' is a gawk extension"
+msgstr "\"BINMODE\" er en gawk-udvidelse"
-#: eval.c:849
-msgid "`continue' outside a loop is not allowed"
-msgstr "\"continue\" uden for en løkke er ikke tilladt"
+#: eval.c:727
+#, c-format
+msgid "BINMODE value `%s' is invalid, treated as 3"
+msgstr ""
-#: eval.c:883
-msgid "`next' cannot be called from a BEGIN rule"
-msgstr "\"next\" kan ikke kaldes fra en BEGIN-regel"
+#: eval.c:817
+#, c-format
+msgid "bad `%sFMT' specification `%s'"
+msgstr "fejlagtig \"%sFMT\"-specifikation \"%s\""
-#: eval.c:885
-msgid "`next' cannot be called from an END rule"
-msgstr "\"next\" kan ikke kaldes fra en END-regel"
+#: eval.c:895
+msgid "turning off `--lint' due to assignment to `LINT'"
+msgstr "deaktiverer \"--lint\" på grund af en tildeling til \"LINT\""
-#: eval.c:887
-#, fuzzy
-msgid "`next' cannot be called from a BEGINFILE rule"
-msgstr "\"next\" kan ikke kaldes fra en BEGIN-regel"
+#: eval.c:1067 eval.c:1544
+#, c-format
+msgid "can't use function name `%s' as variable or array"
+msgstr "kan ikke bruge funktionsnavnet \"%s\" som variabel eller vektor"
-#: eval.c:889
-#, fuzzy
-msgid "`next' cannot be called from an ENDFILE rule"
-msgstr "\"next\" kan ikke kaldes fra en END-regel"
+#: eval.c:1095
+msgid "assignment is not allowed to result of builtin function"
+msgstr "tildeling er ikke tilladt til resultatet fra en indbygget funktion"
-#: eval.c:898
-msgid "`nextfile' cannot be called from a BEGIN rule"
-msgstr "\"nextfile\" kan ikke kaldes fra en BEGIN-regel"
+#: eval.c:1104 eval.c:1556 eval.c:1569
+#, c-format
+msgid "reference to uninitialized argument `%s'"
+msgstr "reference til ikke-initieret argument \"%s\""
-#: eval.c:900
-msgid "`nextfile' cannot be called from an END rule"
-msgstr "\"nextfile\" kan ikke kaldes fra en END-regel"
+#: eval.c:1123
+msgid "attempt to field reference from non-numeric value"
+msgstr "forsøg på at feltreferere fra ikke-numerisk værdi"
-#: eval.c:906
+#: eval.c:1125
#, fuzzy
-msgid "`nextfile' cannot be called from an ENDFILE rule"
-msgstr "\"nextfile\" kan ikke kaldes fra en END-regel"
+msgid "attempt to field reference from null string"
+msgstr "forsøg på at referere fra tom streng"
-#: eval.c:963
-msgid "statement has no effect"
-msgstr "kommandoen har ingen effekt"
+#: eval.c:1131
+#, fuzzy, c-format
+msgid "attempt to access field %ld"
+msgstr "forsøg på at få adgang til felt nummer %d"
-#: eval.c:1040 eval.c:2133
-#, c-format
-msgid "can't use function name `%s' as variable or array"
-msgstr "kan ikke bruge funktionsnavnet \"%s\" som variabel eller vektor"
+#: eval.c:1140
+#, fuzzy, c-format
+msgid "reference to uninitialized field `$%ld'"
+msgstr "reference til ikke-initieret variabel \"%s\""
-#: eval.c:1047 eval.c:1053
+#: eval.c:1202
#, c-format
-msgid "reference to uninitialized argument `%s'"
-msgstr "reference til ikke-initieret argument \"%s\""
+msgid "function `%s' called with more arguments than declared"
+msgstr "funktionen \"%s\" kaldt med flere argumenter end deklareret"
-#: eval.c:1062 eval.c:2142
+#: eval.c:1358
#, c-format
-msgid "reference to uninitialized variable `%s'"
-msgstr "reference til ikke-initieret variabel \"%s\""
-
-#: eval.c:1210
-msgid ""
-"concatenation: side effects in one expression have changed the length of "
-"another!"
+msgid "unwind_stack: unexpected type `%s'"
msgstr ""
-"concatenation: sideeffekter i et udtryk har ændret længden af et andet!"
-#: eval.c:1315
+#: eval.c:1636
+#, fuzzy, c-format
+msgid "attempt to use scalar `%s' as an array"
+msgstr "forsøg på at bruge skalaren \"%s\" som vektor"
+
+#: eval.c:1680
msgid "assignment used in conditional context"
msgstr "tildeling brugt i sammenligningsammenhæng"
-#: eval.c:1396
-msgid "division by zero attempted"
-msgstr "forsøgte at dividere med nul"
-
-#: eval.c:1426 profile.c:663
-#, c-format
-msgid "illegal type (%s) in tree_eval"
-msgstr "ikke tilladt type (%s) i tree_eval"
+#: eval.c:1684
+msgid "statement has no effect"
+msgstr "kommandoen har ingen effekt"
-#: eval.c:1589
+#: eval.c:2028
msgid "division by zero attempted in `/='"
msgstr "forsøgte at dividere med nul i \"/=\""
-#: eval.c:1611
+#: eval.c:2053
#, c-format
msgid "division by zero attempted in `%%='"
msgstr "forsøgte at dividere med nul i \"%%=\""
-#: eval.c:1891
-#, c-format
-msgid "function `%s' called with more arguments than declared"
-msgstr "funktionen \"%s\" kaldt med flere argumenter end deklareret"
-
-#: eval.c:1948
-#, c-format
-msgid "function `%s' not defined"
-msgstr "funktionen \"%s\" er ikke defineret"
-
-#: eval.c:1950
-#, c-format
-msgid "identifier `%s' is not a function"
-msgstr ""
-
-#: eval.c:1997
-#, c-format
-msgid ""
-"function parameter `%s' is not a scalar and cannot be used for indirect "
-"function call"
-msgstr ""
+#: eval.c:2139
+msgid "`continue' outside a loop is not allowed"
+msgstr "\"continue\" uden for en løkke er ikke tilladt"
-#: eval.c:2014
-#, c-format
-msgid "indirect call of real function `%s' is silly"
-msgstr ""
+#: eval.c:2145
+#, fuzzy
+msgid "`break' outside a loop is not allowed"
+msgstr "\"break\" uden for en løkke er ikke tilladt"
-#: eval.c:2034
-#, c-format
-msgid "function `%s' called indirectly through `%s' does not exist"
+#: eval.c:2229
+#, fuzzy, c-format
+msgid "for loop: array `%s' changed size from %ld to %ld during loop execution"
msgstr ""
+"for-løkke: vektoren \"%s\" ændrede størrelse fra %d til %d under løkke-"
+"udførelsen"
-#: eval.c:2039
+#: eval.c:2342
#, c-format
-msgid "identifier `%s' cannot be used for indirect function call"
+msgid "function called indirectly through `%s' does not exist"
msgstr ""
-#: eval.c:2105
+#: eval.c:2354
#, c-format
-msgid ""
-"\n"
-"\t# Function Call Stack:\n"
-"\n"
-msgstr ""
-"\n"
-"\t# Funktionskaldsstak:\n"
-"\n"
-
-#: eval.c:2108
-#, c-format
-msgid "\t# -- main --\n"
-msgstr "\t# -- main --\n"
-
-#: eval.c:2269
-msgid "attempt to field reference from non-numeric value"
-msgstr "forsøg på at feltreferere fra ikke-numerisk værdi"
-
-#: eval.c:2271
-msgid "attempt to reference from null string"
-msgstr "forsøg på at referere fra tom streng"
-
-#: eval.c:2277
-#, c-format
-msgid "attempt to access field %d"
-msgstr "forsøg på at få adgang til felt nummer %d"
-
-#: eval.c:2298 eval.c:2305 profile.c:843
-msgid "assignment is not allowed to result of builtin function"
-msgstr "tildeling er ikke tilladt til resultatet fra en indbygget funktion"
+msgid "function `%s' not defined"
+msgstr "funktionen \"%s\" er ikke defineret"
-#: eval.c:2369
-msgid "`IGNORECASE' is a gawk extension"
-msgstr "\"IGNORECASE\" er en gawk-udvidelse"
+#: eval.c:2481
+#, fuzzy, c-format
+msgid "`nextfile' cannot be called from a `%s' rule"
+msgstr "\"nextfile\" kan ikke kaldes fra en END-regel"
-#: eval.c:2398
-msgid "`BINMODE' is a gawk extension"
-msgstr "\"BINMODE\" er en gawk-udvidelse"
+#: eval.c:2540
+#, fuzzy, c-format
+msgid "`next' cannot be called from a `%s' rule"
+msgstr "\"next\" kan ikke kaldes fra en END-regel"
-#: eval.c:2456
+#: eval.c:2602
#, c-format
-msgid "BINMODE value `%s' is invalid, treated as 3"
+msgid "Sorry, don't know how to interpret `%s'"
msgstr ""
-#: eval.c:2546
-#, c-format
-msgid "bad `%sFMT' specification `%s'"
-msgstr "fejlagtig \"%sFMT\"-specifikation \"%s\""
-
-#: eval.c:2624
-msgid "turning off `--lint' due to assignment to `LINT'"
-msgstr "deaktiverer \"--lint\" på grund af en tildeling til \"LINT\""
-
-#: ext.c:61
-msgid "extensions not allowed in sandbox mode"
+#: ext.c:62
+msgid "extensions are not allowed in sandbox mode"
msgstr ""
-#: ext.c:65 ext.c:70
+#: ext.c:68 ext.c:73
msgid "`extension' is a gawk extension"
msgstr "\"extension\" er en gawk-udvidelse"
-#: ext.c:80
-#, c-format
-msgid "extension: cannot open `%s' (%s)\n"
+#: ext.c:83
+#, fuzzy, c-format
+msgid "fatal: extension: cannot open `%s' (%s)\n"
msgstr "extension: kan ikke åbne \"%s\" (%s)\n"
-#: ext.c:88
-#, c-format
-msgid "extension: library `%s': cannot call function `%s' (%s)\n"
+#: ext.c:93
+#, fuzzy, c-format
+msgid "fatal: extension: library `%s': cannot call function `%s' (%s)\n"
msgstr "extension: bibliotek \"%s\": kan ikke kalde funktionen \"%s\" (%s)\n"
-#: ext.c:108
+#: ext.c:123
msgid "extension: missing function name"
msgstr ""
-#: ext.c:113
+#: ext.c:128
#, fuzzy, c-format
msgid "extension: illegal character `%c' in function name `%s'"
msgstr "extension: bibliotek \"%s\": kan ikke kalde funktionen \"%s\" (%s)\n"
-#: ext.c:119
+#: ext.c:137
#, fuzzy, c-format
msgid "extension: can't redefine function `%s'"
msgstr "extension: kan ikke åbne \"%s\" (%s)\n"
-#: ext.c:123
+#: ext.c:141
#, fuzzy, c-format
msgid "extension: function `%s' already defined"
msgstr "funktionen \"%s\" er ikke defineret"
-#: ext.c:128
-#, c-format
-msgid "extension: can't use gawk built-in `%s' as function name"
-msgstr ""
-
-#: ext.c:130
+#: ext.c:146
#, fuzzy, c-format
msgid "extension: function name `%s' previously defined"
msgstr "funktionsnavnet \"%s\" er allerede defineret"
-#: ext.c:207
+#: ext.c:148
+#, fuzzy, c-format
+msgid "extension: can't use gawk built-in `%s' as function name"
+msgstr "funktionen \"%s\": kan ikke bruge funktionsnavn som parameternavn"
+
+#: ext.c:152
+#, c-format
+msgid "make_builtin: negative argument count for function `%s'"
+msgstr ""
+
+#: ext.c:255
#, fuzzy, c-format
msgid "function `%s' defined to take no more than %d argument(s)"
msgstr "funktionen \"%s\" defineret, men aldrig kaldt"
-#: ext.c:210
+#: ext.c:258
#, fuzzy, c-format
msgid "function `%s': missing argument #%d"
msgstr "funktionen \"%s\" er ikke defineret"
-#: ext.c:220
+#: ext.c:268
#, fuzzy, c-format
msgid "function `%s': argument #%d: attempt to use scalar as an array"
msgstr "forsøg på at bruge skalaren \"%s\" som vektor"
-#: ext.c:224
+#: ext.c:272
#, c-format
msgid "function `%s': argument #%d: attempt to use array as a scalar"
msgstr ""
-#: ext.c:249
+#: ext.c:285
msgid "Operation Not Supported"
msgstr "Operationen understøttes ikke"
@@ -1147,59 +1090,58 @@ msgstr "Operationen understøttes ikke"
msgid "NF set to negative value"
msgstr "NF sat til en negativ værdi"
-#: field.c:913
-msgid "split: second argument is not an array"
-msgstr "split: andet argument er ikke en vektor"
-
-#: field.c:922 field.c:932 field.c:937
+#: field.c:939 field.c:946 field.c:950
#, fuzzy
msgid "split: fourth argument is a gawk extension"
msgstr "match: tredje argument er en gawk-udvidelse"
-#: field.c:928
+#: field.c:943
#, fuzzy
msgid "split: fourth argument is not an array"
msgstr "split: andet argument er ikke en vektor"
-#: field.c:975
-#, fuzzy
-msgid "split: null string for third argument is a gawk extension"
+#: field.c:957
+msgid "split: second argument is not an array"
+msgstr "split: andet argument er ikke en vektor"
+
+#: field.c:987
+msgid "split: null string for third arg is a gawk extension"
msgstr "split: tom streng som tredje argument er en gawk-udvidelse"
-#: field.c:1032
+#: field.c:1028
#, fuzzy
-msgid "patsplit: second argument is not an array"
+msgid "patsplit: fourth argument is not an array"
msgstr "split: andet argument er ikke en vektor"
-#: field.c:1041
+#: field.c:1033
#, fuzzy
-msgid "patsplit: fourth argument is not an array"
+msgid "patsplit: second argument is not an array"
msgstr "split: andet argument er ikke en vektor"
-#: field.c:1067
+#: field.c:1051
#, fuzzy
msgid "patsplit: third argument must be non-null"
msgstr "match: tredje argument er ikke en vektor"
-#: field.c:1111
+#: field.c:1084
msgid "`FIELDWIDTHS' is a gawk extension"
msgstr "\"FIELDWIDTHS\" er en gawk-udvidelse"
-#: field.c:1141 field.c:1155
+#: field.c:1147
#, c-format
msgid "invalid FIELDWIDTHS value, near `%s'"
msgstr ""
-#: field.c:1238
+#: field.c:1220
msgid "null string for `FS' is a gawk extension"
msgstr "tom streng som \"FS\" er en gawk-udvidelse"
-#: field.c:1242
+#: field.c:1224
#, fuzzy
msgid "old awk does not support regexps as value of `FS'"
msgstr "gamle awk understøtter ikke operatoren \"**\""
-#: field.c:1357
+#: field.c:1343
#, fuzzy
msgid "`FPAT' is a gawk extension"
msgstr "\"%s\" er en gawk-udvidelse"
@@ -1259,498 +1201,495 @@ msgstr "%s: flaget \"-W %s\" tillader ikke noget argument\n"
msgid "%s: option '-W %s' requires an argument\n"
msgstr "%s: flaget \"%s\" kræver et argument\n"
-#: io.c:379
+#: io.c:272
#, c-format
msgid "command line argument `%s' is a directory: skipped"
msgstr ""
-#: io.c:413
+#: io.c:275 io.c:372
#, c-format
msgid "cannot open file `%s' for reading (%s)"
msgstr "kan ikke åbne filen \"%s\" for læsning (%s)"
-#: io.c:459 io.c:2999
+#: io.c:419
#, c-format
msgid "error reading input file `%s': %s"
msgstr "fejl ved læsning af inddatafilen \"%s\": %s"
-#: io.c:506
+#: io.c:470
#, c-format
msgid "close of fd %d (`%s') failed (%s)"
msgstr "lukning af fd %d (\"%s\") mislykkedes (%s)"
-#: io.c:617
-msgid "redirection not allowed in sandbox mode"
-msgstr ""
-
-#: io.c:648
-#, c-format
-msgid "invalid tree type %s in redirect()"
-msgstr "ugyldig trætype %s i redirect()"
-
-#: io.c:654
+#: io.c:577
#, c-format
msgid "expression in `%s' redirection only has numeric value"
msgstr "udtrykket i \"%s\"-omdirigering har kun numerisk værdi"
-#: io.c:660
+#: io.c:583
#, c-format
msgid "expression for `%s' redirection has null string value"
msgstr "udtrykket for \"%s\"-omdirigering har en tom streng som værdi"
-#: io.c:665
+#: io.c:589
#, c-format
msgid "filename `%s' for `%s' redirection may be result of logical expression"
msgstr ""
"filnavnet \"%s\" for \"%s\"-omdirigering kan være resultatet af et logisk "
"udtryk"
-#: io.c:707
+#: io.c:628
#, c-format
msgid "unnecessary mixing of `>' and `>>' for file `%.*s'"
msgstr "unødig blanding af \">\" og \">>\" for filen \"%.*s\""
-#: io.c:754
+#: io.c:681
#, c-format
msgid "can't open pipe `%s' for output (%s)"
msgstr "kan ikke åbne røret \"%s\" for udskrivning (%s)"
-#: io.c:763
+#: io.c:691
#, c-format
msgid "can't open pipe `%s' for input (%s)"
msgstr "kan ikke åbne røret \"%s\" for indtastning (%s)"
-#: io.c:786
+#: io.c:712
#, c-format
msgid "can't open two way pipe `%s' for input/output (%s)"
msgstr "kan ikke åbne tovejsrøret \"%s\" for ind-/uddata (%s)"
-#: io.c:864
+#: io.c:794
#, c-format
msgid "can't redirect from `%s' (%s)"
msgstr "kan ikke omdirigere fra \"%s\" (%s)"
-#: io.c:867
+#: io.c:797
#, c-format
msgid "can't redirect to `%s' (%s)"
msgstr "kan ikke omdirigere til \"%s\" (%s)"
-#: io.c:920
+#: io.c:846
msgid ""
"reached system limit for open files: starting to multiplex file descriptors"
msgstr ""
"nåede systembegrænsningen for åbne filer: begynder at multiplekse "
"fildeskriptorer"
-#: io.c:936
+#: io.c:862
#, c-format
msgid "close of `%s' failed (%s)."
msgstr "lukning af \"%s\" mislykkedes (%s)"
-#: io.c:944
+#: io.c:870
msgid "too many pipes or input files open"
msgstr "for mange rør eller inddatafiler åbne"
-#: io.c:967
+#: io.c:892
msgid "close: second argument must be `to' or `from'"
msgstr "close: andet argument skal være \"to\" eller \"from\""
-#: io.c:981
+#: io.c:909
#, c-format
msgid "close: `%.*s' is not an open file, pipe or co-process"
msgstr "close: \"%.*s\" er ikke en åben fil, datakanal eller ko-proces"
-#: io.c:986
+#: io.c:914
msgid "close of redirection that was never opened"
msgstr "lukning af omdirigering som aldrig åbnedes"
-#: io.c:1083
+#: io.c:1011
#, c-format
msgid "close: redirection `%s' not opened with `|&', second argument ignored"
msgstr ""
"close: omdirigeringen \"%s\" åbnedes ikke med \"|&\", andet argument "
"ignoreret"
-#: io.c:1099
+#: io.c:1027
#, c-format
msgid "failure status (%d) on pipe close of `%s' (%s)"
msgstr "fejlstatus (%d) fra rørlukning af \"%s\" (%s)"
-#: io.c:1102
+#: io.c:1030
#, c-format
msgid "failure status (%d) on file close of `%s' (%s)"
msgstr "fejlstatus (%d) fra fillukning af \"%s\" (%s)"
-#: io.c:1122
+#: io.c:1050
#, c-format
msgid "no explicit close of socket `%s' provided"
msgstr "ingen eksplicit lukning af soklen \"%s\" angivet"
-#: io.c:1125
+#: io.c:1053
#, c-format
msgid "no explicit close of co-process `%s' provided"
msgstr "ingen eksplicit lukning af ko-processen \"%s\" angivet"
-#: io.c:1128
+#: io.c:1056
#, c-format
msgid "no explicit close of pipe `%s' provided"
msgstr "ingen eksplicit lukning af røret \"%s\" angivet"
-#: io.c:1131
+#: io.c:1059
#, c-format
msgid "no explicit close of file `%s' provided"
msgstr "ingen eksplicit lukning af filen \"%s\" angivet"
-#: io.c:1159 io.c:1214 main.c:832 main.c:874
+#: io.c:1087 io.c:1142 main.c:823 main.c:865
#, c-format
msgid "error writing standard output (%s)"
msgstr "fejl ved skrivning til standard ud (%s)"
-#: io.c:1163 io.c:1219
+#: io.c:1091 io.c:1147
#, c-format
msgid "error writing standard error (%s)"
msgstr "fejl ved skrivning til standard fejl (%s)"
-#: io.c:1171
+#: io.c:1099
#, c-format
msgid "pipe flush of `%s' failed (%s)."
msgstr "rørspuling af \"%s\" mislykkedes (%s)"
-#: io.c:1174
+#: io.c:1102
#, c-format
msgid "co-process flush of pipe to `%s' failed (%s)."
msgstr "ko-processpuling af røret til \"%s\" mislykkedes (%s)"
-#: io.c:1177
+#: io.c:1105
#, c-format
msgid "file flush of `%s' failed (%s)."
msgstr "filspuling af \"%s\" mislykkedes (%s)"
-#: io.c:1292
+#: io.c:1219
#, fuzzy, c-format
msgid "local port %s invalid in `/inet'"
msgstr "lokal port ugyldig i \"%s\""
-#: io.c:1309
+#: io.c:1236
#, c-format
msgid "remote host and port information (%s, %s) invalid"
msgstr ""
-#: io.c:1344
+#: io.c:1276
msgid "/inet/raw client not ready yet, sorry"
msgstr "/inet/raw-klient er desværre ikke klar endnu"
-#: io.c:1347 io.c:1383
+#: io.c:1279 io.c:1320
msgid "only root may use `/inet/raw'."
msgstr "kun root kan bruge \"/inet/raw\"."
-#: io.c:1381
+#: io.c:1318
msgid "/inet/raw server not ready yet, sorry"
msgstr "/inet/raw-server er desværre ikke klar endnu"
-#: io.c:1477
+#: io.c:1417
#, c-format
msgid "no (known) protocol supplied in special filename `%s'"
msgstr "ingen (kendt) protokol opgivet i special-filnavn \"%s\""
-#: io.c:1491
+#: io.c:1431
#, c-format
msgid "special file name `%s' is incomplete"
msgstr "special-filnavn \"%s\" er ufuldstændigt"
-#: io.c:1506
+#: io.c:1447
msgid "must supply a remote hostname to `/inet'"
msgstr "skal angive et fjernmaskinenavn til \"/inet\""
-#: io.c:1524
+#: io.c:1465
msgid "must supply a remote port to `/inet'"
msgstr "skal angive en fjernport til \"/inet\""
-#: io.c:1570
+#: io.c:1511
msgid "TCP/IP communications are not supported"
msgstr "TCP/IP-kommunikation understøttes ikke"
-#: io.c:1758
+#: io.c:1698
#, c-format
msgid "could not open `%s', mode `%s'"
msgstr "kunne ikke åbne \"%s\", tilstand \"%s\""
-#: io.c:1809
+#: io.c:1749
#, fuzzy, c-format
msgid "close of master pty failed (%s)"
msgstr "lukning af røret mislykkedes (%s)"
-#: io.c:1811 io.c:1963 io.c:2114
+#: io.c:1751 io.c:1918 io.c:2075
#, c-format
msgid "close of stdout in child failed (%s)"
msgstr "lukning af standard ud i barnet mislykkedes (%s)"
-#: io.c:1814
+#: io.c:1754
#, fuzzy, c-format
msgid "moving slave pty to stdout in child failed (dup: %s)"
msgstr "flytning af rør til standard ud i barnet mislykkedes (dup: %s)"
-#: io.c:1816 io.c:1968
+#: io.c:1756 io.c:1923
#, c-format
msgid "close of stdin in child failed (%s)"
msgstr "lukning af standard ind i barnet mislykkedes (%s)"
-#: io.c:1819
+#: io.c:1759
#, fuzzy, c-format
msgid "moving slave pty to stdin in child failed (dup: %s)"
msgstr "flytning af rør til standard ind i barnet mislykkedes (dup: %s)"
-#: io.c:1821 io.c:1840
+#: io.c:1761 io.c:1782
#, fuzzy, c-format
msgid "close of slave pty failed (%s)"
msgstr "lukning af røret mislykkedes (%s)"
-#: io.c:1914 io.c:1966 io.c:2095 io.c:2117
+#: io.c:1860 io.c:1921 io.c:2053 io.c:2078
#, c-format
msgid "moving pipe to stdout in child failed (dup: %s)"
msgstr "flytning af rør til standard ud i barnet mislykkedes (dup: %s)"
-#: io.c:1918 io.c:1971
+#: io.c:1867 io.c:1926
#, c-format
msgid "moving pipe to stdin in child failed (dup: %s)"
msgstr "flytning af rør til standard ind i barnet mislykkedes (dup: %s)"
-#: io.c:1935 io.c:2108
+#: io.c:1887 io.c:2068
msgid "restoring stdout in parent process failed\n"
msgstr "genskabelse af standard ud i forælderprocessen mislykkedes\n"
-#: io.c:1940
+#: io.c:1895
msgid "restoring stdin in parent process failed\n"
msgstr "genskabelse af standard ind i forælderprocessen mislykkedes\n"
-#: io.c:1974 io.c:2119 io.c:2130
+#: io.c:1929 io.c:2080 io.c:2094
#, c-format
msgid "close of pipe failed (%s)"
msgstr "lukning af røret mislykkedes (%s)"
-#: io.c:2019
+#: io.c:1974
msgid "`|&' not supported"
msgstr "\"|&\" understøttes ikke"
-#: io.c:2085
+#: io.c:2040
#, c-format
msgid "cannot open pipe `%s' (%s)"
msgstr "kan ikke åbne røret \"%s\" (%s)"
-#: io.c:2126
+#: io.c:2088
#, c-format
msgid "cannot create child process for `%s' (fork: %s)"
msgstr "kan ikke oprette barneproces for \"%s\" (fork: %s)"
-#: io.c:2518
+#: io.c:2577
#, c-format
msgid "data file `%s' is empty"
msgstr "datafilen \"%s\" er tom"
-#: io.c:2560 io.c:2568
+#: io.c:2618 io.c:2626
msgid "could not allocate more input memory"
msgstr ""
-#: io.c:3125
+#: io.c:3173
msgid "multicharacter value of `RS' is a gawk extension"
msgstr "flertegnsværdien af \"RS\" er en gawk-udvidelse"
-#: main.c:313
+#: main.c:311
msgid "out of memory"
-msgstr ""
+msgstr "slut på hukommelsen"
-#: main.c:381
+#: main.c:388
msgid "`-m[fr]' option irrelevant in gawk"
msgstr "\"-m[fr]\"-flaget er irrelevant i gawk"
-#: main.c:383
+#: main.c:390
msgid "-m option usage: `-m[fr] nnn'"
msgstr "-m-flagets brug: \"-m[fr] nnn\""
-#: main.c:419
+#: main.c:426
#, fuzzy
msgid "empty argument to `-e/--source' ignored"
msgstr "tomt argument til \"--source\" ignoreret"
-#: main.c:485
+#: main.c:492
#, c-format
msgid "%s: option `-W %s' unrecognized, ignored\n"
msgstr "%s: flaget \"-W %s\" ukendt, ignoreret\n"
-#: main.c:530
+#: main.c:545
#, c-format
msgid "%s: option requires an argument -- %c\n"
msgstr "%s: flaget kræver et argument -- %c\n"
-#: main.c:551
+#: main.c:566
msgid "environment variable `POSIXLY_CORRECT' set: turning on `--posix'"
msgstr "miljøvariablen \"POSIXLY_CORRECT\" sat: aktiverer \"--posix\""
-#: main.c:557
+#: main.c:572
msgid "`--posix' overrides `--traditional'"
msgstr "\"--posix\" tilsidesætter \"--traditional\""
-#: main.c:568
+#: main.c:583
msgid "`--posix'/`--traditional' overrides `--non-decimal-data'"
msgstr "\"--posix\"/\"--traditional\" tilsidesætter \"--non-decimal-data\""
-#: main.c:572
+#: main.c:587
#, fuzzy, c-format
msgid "running %s setuid root may be a security problem"
msgstr "at køre %s setuid root kan være et sikkerhedsproblem"
-#: main.c:577
+#: main.c:592
#, fuzzy
msgid "`--posix' overrides `--binary'"
msgstr "\"--posix\" tilsidesætter \"--traditional\""
-#: main.c:622
+#: main.c:643
#, fuzzy, c-format
msgid "can't set binary mode on stdin (%s)"
msgstr "kan ikke sætte tilstand på standard ind (%s)"
-#: main.c:625
+#: main.c:646
#, fuzzy, c-format
msgid "can't set binary mode on stdout (%s)"
msgstr "kan ikke sætte tilstand på standard ud (%s)"
-#: main.c:627
+#: main.c:648
#, fuzzy, c-format
msgid "can't set binary mode on stderr (%s)"
msgstr "kan ikke sætte tilstand på standard fejl (%s)"
-#: main.c:668
+#: main.c:687
msgid "no program text at all!"
msgstr "ingen programtekst overhovedet!"
-#: main.c:773
+#: main.c:762
#, c-format
msgid "Usage: %s [POSIX or GNU style options] -f progfile [--] file ...\n"
msgstr "Brug: %s [POSIX- eller GNU-stilflag] -f progfil [--] fil ...\n"
-#: main.c:775
+#: main.c:764
#, c-format
msgid "Usage: %s [POSIX or GNU style options] [--] %cprogram%c file ...\n"
msgstr "Brug: %s [POSIX- eller GNU-stilflag] %cprogram%c fil ...\n"
-#: main.c:780
+#: main.c:769
#, fuzzy
msgid "POSIX options:\t\tGNU long options: (standard)\n"
msgstr "POSIX-flag:\t\tGNU lange flag:\n"
-#: main.c:781
+#: main.c:770
msgid "\t-f progfile\t\t--file=progfile\n"
msgstr "\t-f progfil\t\t--file=progfil\n"
-#: main.c:782
+#: main.c:771
msgid "\t-F fs\t\t\t--field-separator=fs\n"
msgstr "\t-F fs\t\t\t--field-separator=fs\n"
-#: main.c:783
+#: main.c:772
msgid "\t-v var=val\t\t--assign=var=val\n"
msgstr "\t-v var=værdi\t\t--assign=var=værdi\n"
-#: main.c:784
+#: main.c:773
#, fuzzy
-msgid "POSIX options:\t\tGNU long options: (extensions)\n"
+msgid "Short options:\t\tGNU long options: (extensions)\n"
msgstr "POSIX-flag:\t\tGNU lange flag:\n"
-#: main.c:785
+#: main.c:774
msgid "\t-m[fr] val\n"
msgstr "\t-m[fr] værdi\n"
-#: main.c:786
+#: main.c:775
msgid "\t-b\t\t\t--characters-as-bytes\n"
msgstr ""
-#: main.c:787
-msgid "\t-c\t\t\t--compat, --traditional\n"
-msgstr ""
+#: main.c:776
+#, fuzzy
+msgid "\t-c\t\t\t--traditional\n"
+msgstr "\t-W traditional\t\t--traditional\n"
-#: main.c:788
+#: main.c:777
#, fuzzy
-msgid "\t-C\t\t\t--copyleft, --copyright\n"
+msgid "\t-C\t\t\t--copyright\n"
msgstr "\t-W copyright\t\t--copyright\n"
-#: main.c:789
+#: main.c:778
#, fuzzy
msgid "\t-d [file]\t\t--dump-variables[=file]\n"
msgstr "\t-W dump-variables[=fil]\t--dump-variables[=fil]\n"
-#: main.c:790
+#: main.c:779
#, fuzzy
msgid "\t-e 'program-text'\t--source='program-text'\n"
msgstr "\t-W source=programtekst\t--source=programtekst\n"
-#: main.c:791
+#: main.c:780
#, fuzzy
msgid "\t-E file\t\t\t--exec=file\n"
msgstr "\t-W profile[=fil]\t--profile[=fil]\n"
-#: main.c:792
+#: main.c:781
#, fuzzy
msgid "\t-g\t\t\t--gen-pot\n"
msgstr "\t-W gen-po\t\t--gen-po\n"
-#: main.c:793
+#: main.c:782
#, fuzzy
-msgid "\t-h\t\t\t--help, --usage\n"
+msgid "\t-h\t\t\t--help\n"
msgstr "\t-W help\t\t\t--help\n"
-#: main.c:794
+#: main.c:783
#, fuzzy
-msgid "\t-l [fatal]\t\t--lint[=fatal]\n"
+msgid "\t-L [fatal]\t\t--lint[=fatal]\n"
msgstr "\t-W lint[=fatal]\t\t--lint[=fatal]\n"
-#: main.c:795
-#, fuzzy
-msgid "\t-L\t\t\t--lint-old\n"
-msgstr "\t-W lint-old\t\t--lint-old\n"
-
-#: main.c:796
+#: main.c:784
#, fuzzy
msgid "\t-n\t\t\t--non-decimal-data\n"
msgstr "\t-W non-decimal-data\t--non-decimal-data\n"
-#: main.c:797
+#: main.c:785
msgid "\t-N\t\t\t--use-lc-numeric\n"
msgstr ""
-#: main.c:798
+#: main.c:786
msgid "\t-O\t\t\t--optimize\n"
msgstr ""
-#: main.c:799
+#: main.c:787
#, fuzzy
msgid "\t-p [file]\t\t--profile[=file]\n"
msgstr "\t-W profile[=fil]\t--profile[=fil]\n"
-#: main.c:800
+#: main.c:788
#, fuzzy
msgid "\t-P\t\t\t--posix\n"
msgstr "\t-W posix\t\t--posix\n"
-#: main.c:801
+#: main.c:789
#, fuzzy
msgid "\t-r\t\t\t--re-interval\n"
msgstr "\t-W re-interval\t\t--re-interval\n"
-#: main.c:802
+#: main.c:791
#, fuzzy
+msgid "\t-R file\t\t\t--command=file\n"
+msgstr "\t-W profile[=fil]\t--profile[=fil]\n"
+
+#: main.c:792
msgid "\t-S\t\t\t--sandbox\n"
-msgstr "\t-W posix\t\t--posix\n"
+msgstr ""
+
+#: main.c:793
+#, fuzzy
+msgid "\t-t\t\t\t--lint-old\n"
+msgstr "\t-W lint-old\t\t--lint-old\n"
-#: main.c:803
+#: main.c:794
#, fuzzy
msgid "\t-V\t\t\t--version\n"
msgstr "\t-W version\t\t--version\n"
-#: main.c:805
+#: main.c:796
msgid "\t-W nostalgia\t\t--nostalgia\n"
msgstr "\t-W nostalgia\t\t--nostalgia\n"
-#: main.c:808
-msgid "\t-W parsedebug\t\t--parsedebug\n"
+#: main.c:799
+#, fuzzy
+msgid "\t-Y\t\t--parsedebug\n"
msgstr "\t-W parsedebug\t\t--parsedebug\n"
#. TRANSLATORS: --help output 5 (end)
@@ -1758,7 +1697,7 @@ msgstr "\t-W parsedebug\t\t--parsedebug\n"
#. for this application. Please add _another line_ with the
#. address for translation bugs.
#. no-wrap
-#: main.c:817
+#: main.c:808
#, fuzzy
msgid ""
"\n"
@@ -1769,22 +1708,22 @@ msgstr ""
"sektionen \"Reporting Problems and Bugs\" i den trykte version.\n"
"Rapportér synpunkter på oversættelsen til <dansk@klid.dk>.\n"
-#: main.c:821
+#: main.c:812
msgid ""
"gawk is a pattern scanning and processing language.\n"
"By default it reads standard input and writes standard output.\n"
"\n"
msgstr ""
-#: main.c:825
+#: main.c:816
msgid ""
"Examples:\n"
"\tgawk '{ sum += $1 }; END { print sum }' file\n"
"\tgawk -F: '{ print $1 }' /etc/passwd\n"
msgstr ""
-#: main.c:845
-#, c-format
+#: main.c:836
+#, fuzzy, c-format
msgid ""
"Copyright (C) 1989, 1991-%d Free Software Foundation.\n"
"\n"
@@ -1798,11 +1737,11 @@ msgstr ""
"\n"
"Dette program er frit programmel. Du kan distribuere det og/eller\n"
"ændre det under betingelserne i GNU General Public License, offentliggjort\n"
-"af Free Software Foundation, enten version 3 eller (hvis du vil)\n"
+"af Free Software Foundation, enten version 2 eller (hvis du vil)\n"
"enhver senere version.\n"
"\n"
-#: main.c:853
+#: main.c:844
msgid ""
"This program is distributed in the hope that it will be useful,\n"
"but WITHOUT ANY WARRANTY; without even the implied warranty of\n"
@@ -1816,7 +1755,7 @@ msgstr ""
"General Public License for yderligere information.\n"
"\n"
-#: main.c:864
+#: main.c:855
#, fuzzy
msgid ""
"You should have received a copy of the GNU General Public License\n"
@@ -1824,192 +1763,158 @@ msgid ""
msgstr ""
"Du bør have fået en kopi af GNU General Public License sammen\n"
"med dette program. Hvis ikke, så skriv til Free Software Foundation,\n"
-"Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.\n"
+"Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.\n"
-#: main.c:899
+#: main.c:890
msgid "-Ft does not set FS to tab in POSIX awk"
msgstr "-Ft sætter ikke FS til tab i POSIX-awk"
-#: main.c:1116
+#: main.c:1122
#, c-format
msgid "unknown value for field spec: %d\n"
msgstr ""
-#: main.c:1176
+#: main.c:1182
#, c-format
msgid ""
"%s: `%s' argument to `-v' not in `var=value' form\n"
"\n"
msgstr ""
-#: main.c:1196
+#: main.c:1202
#, c-format
msgid "`%s' is not a legal variable name"
msgstr ""
-#: main.c:1199
+#: main.c:1205
#, c-format
msgid "`%s' is not a variable name, looking for file `%s=%s'"
msgstr ""
-#: main.c:1238
+#: main.c:1258
msgid "floating point exception"
msgstr "flydendetalsundtagelse"
-#: main.c:1245
+#: main.c:1265
msgid "fatal error: internal error"
msgstr "fatal fejl: intern fejl"
-#: main.c:1260
+#: main.c:1280
#, fuzzy
msgid "fatal error: internal error: segfault"
msgstr "fatal fejl: intern fejl"
-#: main.c:1272
+#: main.c:1292
#, fuzzy
msgid "fatal error: internal error: stack overflow"
msgstr "fatal fejl: intern fejl"
-#: main.c:1322
+#: main.c:1342
#, c-format
msgid "no pre-opened fd %d"
msgstr "ingen for-åbnet fd %d"
-#: main.c:1329
+#: main.c:1349
#, c-format
msgid "could not pre-open /dev/null for fd %d"
msgstr "kunne ikke for-åbne /dev/null for fd %d"
-#: main.c:1352 main.c:1361
+#: main.c:1372 main.c:1381
#, c-format
msgid "could not find groups: %s"
msgstr "kunne ikke finde grupper: %s"
-#: msg.c:54
+#: msg.c:62
#, c-format
msgid "cmd. line:"
msgstr "kommandolinje:"
-#: msg.c:120
+#: msg.c:97
msgid "warning: "
msgstr "advarsel: "
-#: msg.c:142
+#: msg.c:106
msgid "error: "
msgstr "fejl: "
-#: msg.c:178
+#: msg.c:129
msgid "fatal: "
msgstr "fatal: "
-#: node.c:63 node.c:78 node.c:105 node.c:121 node.c:151
-msgid "can't convert string to float"
-msgstr "kan ikke konvertere en streng til flydende tal"
-
-#: node.c:465
+#: node.c:401
msgid "backslash at end of string"
msgstr "omvendt skråstreg i slutningen af strengen"
-#: node.c:609
+#: node.c:502
#, fuzzy, c-format
msgid "old awk does not support the `\\%c' escape sequence"
msgstr "gamle awk understøtter ikke operatoren \"**\""
-#: node.c:660
+#: node.c:553
msgid "POSIX does not allow `\\x' escapes"
msgstr "POSIX tillader ikke \"\\x\"-kontrolsekvenser"
-#: node.c:666
+#: node.c:559
msgid "no hex digits in `\\x' escape sequence"
msgstr "ingen heksadecimale cifre i \"\\x\"-kontrolsekvenser"
-#: node.c:688
+#: node.c:581
#, c-format
msgid ""
"hex escape \\x%.*s of %d characters probably not interpreted the way you "
"expect"
msgstr ""
-#: node.c:703
+#: node.c:596
#, c-format
msgid "escape sequence `\\%c' treated as plain `%c'"
msgstr "kontrolsekvensen \"\\%c\" behandlet som kun \"%c\""
+#: node.c:737
+msgid ""
+"Invalid multibyte data detected. There may be a mismatch between your data "
+"and your locale."
+msgstr ""
+
#: posix/gawkmisc.c:172
#, c-format
msgid "%s %s `%s': could not set close-on-exec: (fcntl: %s)"
msgstr "%s %s \"%s\": kunne ikke sætte luk-ved-exec (fcntl: %s)"
-#: profile.c:94
+#: profile.c:83
#, c-format
msgid "could not open `%s' for writing: %s"
msgstr "kunne ikke åbne \"%s\" for skrivning: %s"
-#: profile.c:457
+#: profile.c:203
#, fuzzy, c-format
-msgid "internal error: %s with null vname"
-msgstr "intern fejl: Node_var med null vname"
-
-#: profile.c:522
-msgid "# treated internally as `delete'"
-msgstr ""
-
-#: profile.c:1076
-#, c-format
-msgid "# this is a dynamically loaded extension function"
-msgstr ""
-
-#: profile.c:1109
-#, c-format
-msgid "\t# gawk profile, created %s\n"
-msgstr "\t# gawkprofil, oprettet %s\n"
-
-#: profile.c:1112
-#, c-format
msgid ""
-"\t# BEGIN block(s)\n"
+"\t# %s block(s)\n"
"\n"
msgstr ""
-"\t# BEGIN-blok\n"
+"\t# END-blok\n"
"\n"
-#: profile.c:1122
+#: profile.c:208
#, fuzzy, c-format
msgid ""
-"\t# BEGINFILE block(s)\n"
-"\n"
-msgstr ""
-"\t# BEGIN-blok\n"
-"\n"
-
-#: profile.c:1132
-#, c-format
-msgid ""
-"\t# Rule(s)\n"
+"\t# %s(s)\n"
"\n"
msgstr ""
"\t# Regel/regler\n"
"\n"
-#: profile.c:1138
+#: profile.c:278
#, fuzzy, c-format
-msgid ""
-"\t# ENDFILE block(s)\n"
-"\n"
-msgstr ""
-"\t# END-blok\n"
-"\n"
+msgid "internal error: %s with null vname"
+msgstr "intern fejl: Node_var med null vname"
-#: profile.c:1148
+#: profile.c:945
#, c-format
-msgid ""
-"\t# END block(s)\n"
-"\n"
-msgstr ""
-"\t# END-blok\n"
-"\n"
+msgid "\t# gawk profile, created %s\n"
+msgstr "\t# gawkprofil, oprettet %s\n"
-#: profile.c:1168
+#: profile.c:1328
#, c-format
msgid ""
"\n"
@@ -2018,17 +1923,12 @@ msgstr ""
"\n"
"\t# Funktioner, listede alfabetisk\n"
-#: profile.c:1431
+#: profile.c:1367
#, c-format
-msgid "unexpected type %s in prec_level"
-msgstr "uventet type %s i prec_level"
-
-#: profile.c:1557
-#, fuzzy, c-format
-msgid "Unknown node type %s in pp_var"
-msgstr "ukendt nodetype %d"
+msgid "redir2str: unknown redirection type %d"
+msgstr ""
-#: re.c:537
+#: re.c:559
#, c-format
msgid "regexp component `%.*s' should probably be `[%.*s]'"
msgstr ""
@@ -2101,18 +2001,40 @@ msgstr "Regulært udtryk for stort"
msgid "Unmatched ) or \\)"
msgstr "Ubalanceret ) eller \\)"
-#: regcomp.c:699
+#: regcomp.c:701
msgid "No previous regular expression"
msgstr "Intet foregående regulært udtryk"
-#~ msgid "%s: illegal option -- %c\n"
-#~ msgstr "%s: ikke tilladt flag -- %c\n"
+#~ msgid "call of `length' without parentheses is deprecated by POSIX"
+#~ msgstr "kald af \"length\" uden parenteser er forældet ifølge POSIX"
+
+#, fuzzy
+#~ msgid "reference to uninitialized field `$%s'"
+#~ msgstr "reference til ikke-initieret variabel \"%s\""
+
+#~ msgid "can't convert string to float"
+#~ msgstr "kan ikke konvertere en streng til flydende tal"
+
+#~ msgid "`continue' outside a loop is not portable"
+#~ msgstr "\"continue\" uden for en løkke er ikke portabelt"
+
+#~ msgid "`break' outside a loop is not portable"
+#~ msgstr "\"break\" uden for en løkke er ikke portabelt"
+
+#~ msgid "`nextfile' cannot be called from a BEGIN rule"
+#~ msgstr "\"nextfile\" kan ikke kaldes fra en BEGIN-regel"
+
+#~ msgid "`next' cannot be called from a BEGIN rule"
+#~ msgstr "\"next\" kan ikke kaldes fra en BEGIN-regel"
#~ msgid "file `%s' is a directory"
#~ msgstr "filen \"%s\" er et katalog"
-#~ msgid "can't open two way socket `%s' for input/output (%s)"
-#~ msgstr "kan ikke åbne tovejssoklen \"%s\" for ind-/uddata (%s)"
+#~ msgid "use `PROCINFO[\"%s\"]' instead of `%s'"
+#~ msgstr "brug \"PROCINFO[\"%s\"]\" i stedet for \"%s\""
+
+#~ msgid "use `PROCINFO[...]' instead of `/dev/user'"
+#~ msgstr "brug \"PROCINFO[...]\" i stedet for \"dev/user\""
#~ msgid "\t-W compat\t\t--compat\n"
#~ msgstr "\t-W compat\t\t--compat\n"
@@ -2120,83 +2042,96 @@ msgstr "Intet foregående regulært udtryk"
#~ msgid "\t-W copyleft\t\t--copyleft\n"
#~ msgstr "\t-W copyleft\t\t--copyleft\n"
-#~ msgid "\t-W traditional\t\t--traditional\n"
-#~ msgstr "\t-W traditional\t\t--traditional\n"
-
#~ msgid "\t-W usage\t\t--usage\n"
#~ msgstr "\t-W usage\t\t--usage\n"
-#, fuzzy
-#~ msgid "seek: invalid arguments"
-#~ msgstr "printf: ingen argumenter"
+#~ msgid ""
+#~ "\t# BEGIN block(s)\n"
+#~ "\n"
+#~ msgstr ""
+#~ "\t# BEGIN-blok\n"
+#~ "\n"
-#, fuzzy
-#~ msgid "seek: `%.*s' is not an open file, pipe, or co-process"
-#~ msgstr "close: \"%.*s\" er ikke en åben fil, datakanal eller ko-proces"
+#~ msgid "`$' is not permitted in awk formats"
+#~ msgstr "\"$\" tillades ikke i awkformat"
+
+#~ msgid "arg count with `$' must be > 0"
+#~ msgstr "argumentantallet med \"$\" skal være > 0"
#, fuzzy
-#~ msgid "seek: `%.*s' is not an input file, pipe, or co-process"
-#~ msgstr "close: \"%.*s\" er ikke en åben fil, datakanal eller ko-proces"
+#~ msgid "arg count %ld greater than total number of supplied arguments"
+#~ msgstr "argumentantallet %d er større end antal givne argumenter"
-#~ msgid "use `PROCINFO[\"%s\"]' instead of `%s'"
-#~ msgstr "brug \"PROCINFO[\"%s\"]\" i stedet for \"%s\""
+#~ msgid "`$' not permitted after period in format"
+#~ msgstr "\"$\" tillades ikke efter et punktum i formatet"
-#~ msgid "use `PROCINFO[...]' instead of `/dev/user'"
-#~ msgstr "brug \"PROCINFO[...]\" i stedet for \"dev/user\""
+#~ msgid "no `$' supplied for positional field width or precision"
+#~ msgstr "intet \"$\" angivet for positionsangivet feltbredde eller præcision"
-#~ msgid "function %s called\n"
-#~ msgstr "funktionen %s kaldt\n"
+#~ msgid "`l' is meaningless in awk formats; ignored"
+#~ msgstr "\"l\" er meningsløst i awk-formater, ignoreret"
-#~ msgid "field %d in FIELDWIDTHS, must be > 0"
-#~ msgstr "felt %d i FIELDWIDTHS skal være > 0"
+#~ msgid "`l' is not permitted in POSIX awk formats"
+#~ msgstr "\"l\" tillades ikke i POSIX awk-formater"
-#, fuzzy
-#~ msgid "or used as a variable or an array"
-#~ msgstr "kan ikke bruge funktionsnavnet \"%s\" som variabel eller vektor"
+#~ msgid "`L' is meaningless in awk formats; ignored"
+#~ msgstr "\"L\" er meningsløst i awk-formater, ignoreret"
-#, fuzzy
-#~ msgid "substr: length %g is < 0"
-#~ msgstr "substr: længden %g er <= 0"
+#~ msgid "`L' is not permitted in POSIX awk formats"
+#~ msgstr "\"L\" tillades ikke i POSIX awk-formater"
-#~ msgid "delete: illegal use of variable `%s' as array"
-#~ msgstr "delete: ikke tilladt brug af variablen \"%s\" som vektor"
+#~ msgid "`h' is meaningless in awk formats; ignored"
+#~ msgstr "\"h\" er meningsløst i awk-formater, ignoreret"
-#, fuzzy
-#~ msgid "%s: gvar_ref to %s\n"
-#~ msgstr "%s: vektorreference til %s\n"
+#~ msgid "`h' is not permitted in POSIX awk formats"
+#~ msgstr "\"h\" tillades ikke i POSIX awk-formater"
+
+#~ msgid "not enough arguments to satisfy format string"
+#~ msgstr "for få argumenter til formatstrengen"
+
+#~ msgid "^ ran out for this one"
+#~ msgstr "^ sluttede her"
-#~ msgid "asort: first argument is not an array"
-#~ msgstr "asort: første argument er ikke en vektor"
+#~ msgid "[s]printf: format specifier does not have control letter"
+#~ msgstr "[s]printf: formatspecifiereren har intet kommandobogstav"
-#~ msgid "asort: second argument is not an array"
-#~ msgstr "asort: andet argument er ikke en vektor"
+#~ msgid "too many arguments supplied for format string"
+#~ msgstr "for mange argumenter til formatstrengen"
#, fuzzy
-#~ msgid ""
-#~ "attempt to use array parameter `%s' that was passed from global scalar `%"
-#~ "s'"
-#~ msgstr "forsøg på at bruge skalarparameteren \"%s\" som en vektor"
+#~ msgid "attempt to use array parameter `%s' in a scalar context"
+#~ msgstr "forsøg på at bruge vektoren \"%s\" i skalarsammenhæng"
-#~ msgid "internal error: Node_var_array with null vname"
-#~ msgstr "intern fejl: Node_var_vektor med null vname"
+#~ msgid "can't open two way socket `%s' for input/output (%s)"
+#~ msgstr "kan ikke åbne tovejssoklen \"%s\" for ind-/uddata (%s)"
-#~ msgid "BEGIN blocks must have an action part"
-#~ msgstr "BEGIN-blok skal have en handlingsdel"
+#~ msgid "%s: illegal option -- %c\n"
+#~ msgstr "%s: ikke tilladt flag -- %c\n"
-#~ msgid "`nextfile' used in BEGIN or END action"
-#~ msgstr "\"nextfile\" brugt i BEGIN- eller END-handling"
+#~ msgid ""
+#~ "concatenation: side effects in one expression have changed the length of "
+#~ "another!"
+#~ msgstr ""
+#~ "concatenation: sideeffekter i et udtryk har ændret længden af et andet!"
-#~ msgid "gsub third parameter is not a changeable object"
-#~ msgstr "gsub: tredje argument er ikke et ændringsbart objekt"
+#~ msgid "illegal type (%s) in tree_eval"
+#~ msgstr "ikke tilladt type (%s) i tree_eval"
-#~ msgid "or used in other expression context"
-#~ msgstr "eller brugt i andre udtrykssammenhænge"
+#~ msgid "\t# -- main --\n"
+#~ msgstr "\t# -- main --\n"
-#~ msgid "`%s' is a function, assignment is not allowed"
-#~ msgstr "\"%s\" er en funktion, tildeling er ikke tilladt"
+#~ msgid "invalid tree type %s in redirect()"
+#~ msgstr "ugyldig trætype %s i redirect()"
-#~ msgid "internal error: file `%s', line %d\n"
-#~ msgstr "intern fejl: filen \"%s\", linje %d\n"
+#~ msgid "unexpected type %s in prec_level"
+#~ msgstr "uventet type %s i prec_level"
+
+#, fuzzy
+#~ msgid "Unknown node type %s in pp_var"
+#~ msgstr "ukendt nodetype %d"
+
+#~ msgid "delete: illegal use of variable `%s' as array"
+#~ msgstr "delete: ikke tilladt brug af variablen \"%s\" som vektor"
#~ msgid ""
#~ "\n"
@@ -2208,6 +2143,21 @@ msgstr "Intet foregående regulært udtryk"
#~ msgid "invalid syntax in name `%s' for variable assignment"
#~ msgstr "ugyldig syntaks i navnet \"%s\" for variabeltildeling"
+#~ msgid "internal error: Node_var_array with null vname"
+#~ msgstr "intern fejl: Node_var_vektor med null vname"
+
+#~ msgid "or used in other expression context"
+#~ msgstr "eller brugt i andre udtrykssammenhænge"
+
+#~ msgid "`%s' is a function, assignment is not allowed"
+#~ msgstr "\"%s\" er en funktion, tildeling er ikke tilladt"
+
+#~ msgid "BEGIN blocks must have an action part"
+#~ msgstr "BEGIN-blok skal have en handlingsdel"
+
+#~ msgid "`nextfile' used in BEGIN or END action"
+#~ msgstr "\"nextfile\" brugt i BEGIN- eller END-handling"
+
#~ msgid "non-redirected `getline' undefined inside BEGIN or END action"
#~ msgstr ""
#~ "ikke-omdirigeret \"getline\" udefineret inde i BEGIN- eller END-handling"
@@ -2215,6 +2165,9 @@ msgstr "Intet foregående regulært udtryk"
#~ msgid "fptr %x not in tokentab\n"
#~ msgstr "fptr %x er ikke i tokentab\n"
+#~ msgid "gsub third parameter is not a changeable object"
+#~ msgstr "gsub: tredje argument er ikke et ændringsbart objekt"
+
#~ msgid "Unfinished \\ escape"
#~ msgstr "Uafsluttet \\-kontrolsekvens"
@@ -2236,5 +2189,11 @@ msgstr "Intet foregående regulært udtryk"
#~ msgid "Unbalanced )"
#~ msgstr "Ubalanceret )"
-#~ msgid "remote port invalid in `%s'"
-#~ msgstr "fjernporten ugyldig i \"%s\""
+#~ msgid "field %d in FIELDWIDTHS, must be > 0"
+#~ msgstr "felt %d i FIELDWIDTHS skal være > 0"
+
+#~ msgid "function %s called\n"
+#~ msgstr "funktionen %s kaldt\n"
+
+#~ msgid "internal error: file `%s', line %d\n"
+#~ msgstr "intern fejl: filen \"%s\", linje %d\n"
diff --git a/po/de.gmo b/po/de.gmo
index 688a87a8..ae1f000a 100644
--- a/po/de.gmo
+++ b/po/de.gmo
Binary files differ
diff --git a/po/de.po b/po/de.po
index 51ee8eb2..3b4a0da0 100644
--- a/po/de.po
+++ b/po/de.po
@@ -6,7 +6,7 @@ msgid ""
msgstr ""
"Project-Id-Version: gawk 3.1.0\n"
"Report-Msgid-Bugs-To: arnold@skeeve.com\n"
-"POT-Creation-Date: 2010-11-12 12:20+0200\n"
+"POT-Creation-Date: 2010-11-17 08:48+0200\n"
"PO-Revision-Date: 2002-04-03 18:55+02:00\n"
"Last-Translator: Christian Kirsch <ck@held.mind.de>\n"
"Language-Team: German <de@li.org>\n"
@@ -14,419 +14,495 @@ msgstr ""
"Content-Type: text/plain; charset=iso-8859-1\n"
"Content-Transfer-Encoding: 8bit\n"
-#: array.c:112
+#: array.c:103
+#, fuzzy, c-format
+msgid "from %s"
+msgstr "%s (von %s)"
+
+#: array.c:267
+#, fuzzy
+msgid "attempt to use a scalar value as array"
+msgstr "Versuch, Skalar '%s' als Array zu verwenden."
+
+#: array.c:270
#, fuzzy, c-format
msgid "attempt to use function `%s' as an array"
msgstr "Versuch, die Funktion '%s' als Array zu verwenden."
-#: array.c:115
+#: array.c:273
#, c-format
msgid "attempt to use scalar parameter `%s' as an array"
msgstr "Versuch den skalaren Parameter '%s' als Array zu benutzen."
-#: array.c:118
+#: array.c:276
#, c-format
msgid "attempt to use scalar `%s' as array"
msgstr "Versuch, Skalar '%s' als Array zu verwenden."
-#: array.c:156
-#, fuzzy, c-format
-msgid "from %s"
-msgstr "%s (von %s)"
+#: array.c:321 array.c:648 eval.c:1075 eval.c:1079 eval.c:1581 eval.c:1649
+#: eval.c:1928
+#, c-format
+msgid "attempt to use array `%s' in a scalar context"
+msgstr "Versuch, das Array '%s' in Skalarkontext zu verwenden."
-#: array.c:513
+#: array.c:570
#, fuzzy, c-format
msgid "reference to uninitialized element `%s[\"%.*s\"]'"
msgstr "Bezug auf nicht-initialisiertes Element »%s[\"%s\"]«"
-#: array.c:519
+#: array.c:576
#, c-format
msgid "subscript of array `%s' is null string"
msgstr "Index in Array »%s« ist Nullstring."
-#: array.c:623
+#: array.c:684
#, c-format
msgid "delete: index `%s' not in array `%s'"
msgstr "delete: Index »%s« nicht in Feld »%s« vorhanden."
-#: array.c:792
+#: array.c:705
+#, fuzzy, c-format
+msgid "attempt to use scalar `%s[\"%.*s\"]' as an array"
+msgstr "Versuch, Skalar '%s' als Array zu verwenden."
+
+#: array.c:868
#, c-format
msgid "%s: empty (null)\n"
msgstr "%s: leer (Null)\n"
-#: array.c:797
+#: array.c:873
#, c-format
msgid "%s: empty (zero)\n"
msgstr "%s: leer (0)\n"
-#: array.c:801
+#: array.c:877
#, c-format
msgid "%s: table_size = %d, array_size = %d\n"
msgstr "%s: Table_size = %d, array_size = %d\n"
-#: array.c:830
+#: array.c:912
#, fuzzy, c-format
msgid "%s: is parameter\n"
msgstr "%s: ist ein Parameter\n"
-#: array.c:835
+#: array.c:916
#, c-format
msgid "%s: array_ref to %s\n"
msgstr "%s: Array-Referenz auf %s\n"
-#: awkgram.y:224 awkgram.y:227
+#: array.c:921
+#, fuzzy
+msgid "adump: argument not an array"
+msgstr "asort: Erstes Argument ist kein Array."
+
+#: array.c:1139
+#, fuzzy
+msgid "attempt to use array in a scalar context"
+msgstr "Versuch, das Array '%s' in Skalarkontext zu verwenden."
+
+#: array.c:1236
+#, fuzzy
+msgid "asort: second argument not an array"
+msgstr "asort: Zweites Argument ist kein array."
+
+#: array.c:1237
+#, fuzzy
+msgid "asorti: second argument not an array"
+msgstr "asort: Zweites Argument ist kein array."
+
+#: array.c:1245
+#, fuzzy
+msgid "asort: first argument not an array"
+msgstr "asort: Erstes Argument ist kein Array."
+
+#: array.c:1246
+#, fuzzy
+msgid "asorti: first argument not an array"
+msgstr "asort: Erstes Argument ist kein Array."
+
+#: awkgram.y:246
#, fuzzy, c-format
msgid "%s blocks must have an action part"
msgstr "END-Blöcke müssen einen Aktionsteil haben."
-#: awkgram.y:230
+#: awkgram.y:249
#, fuzzy
msgid "each rule must have a pattern or an action part"
msgstr "END-Blöcke müssen einen Aktionsteil haben."
-#: awkgram.y:266 awkgram.y:275
+#: awkgram.y:320 awkgram.y:330
#, fuzzy
msgid "old awk does not support multiple `BEGIN' or `END' rules"
msgstr "Das alte awk erlaubt den Operator '**' nicht."
-#: awkgram.y:304
+#: awkgram.y:367
#, c-format
msgid "`%s' is a built-in function, it cannot be redefined"
msgstr "'%s' ist eine eingebaute Funktion und kann nicht umdefiniert werden."
-#: awkgram.y:350
+#: awkgram.y:427
#, fuzzy
msgid "regexp constant `//' looks like a C++ comment, but is not"
msgstr ""
"Konstanter Regulärer Ausdruck '/%s' sieht wie ein C-Kommentar aus, ist aber "
"keiner."
-#: awkgram.y:353
+#: awkgram.y:430
#, c-format
msgid "regexp constant `/%s/' looks like a C comment, but is not"
msgstr ""
"Konstanter Regulärer Ausdruck '/%s' sieht wie ein C-Kommentar aus, ist aber "
"keiner."
-#: awkgram.y:380 awkgram.y:692
-msgid "statement may have no effect"
-msgstr "Statement möglicherweise ohne Effekt."
+#: awkgram.y:735
+#, fuzzy
+msgid "`break' is not allowed outside a loop or switch"
+msgstr "'break' außerhalb einer Schleife ist nicht zulässig."
-#: awkgram.y:477 awkgram.y:480 awkgram.y:504 awkgram.y:511 awkgram.y:518
+#: awkgram.y:744
+#, fuzzy
+msgid "`continue' is not allowed outside a loop"
+msgstr "'continue' außerhalb einer Schleife ist nicht zulässig."
+
+#: awkgram.y:753
#, fuzzy, c-format
-msgid "`%s' used in %s action"
+msgid "`next' used in %s action"
msgstr "'next' in BEGIN- oder END-Aktion benutzt."
-#: awkgram.y:495 awkgram.y:499
+#: awkgram.y:767 awkgram.y:771
msgid "`nextfile' is a gawk extension"
msgstr "'nextfile' ist eine gawk-Erweiterung."
-#: awkgram.y:528
+#: awkgram.y:775
+#, fuzzy, c-format
+msgid "`nextfile' used in %s action"
+msgstr "'next' in BEGIN- oder END-Aktion benutzt."
+
+#: awkgram.y:799
msgid "`return' used outside function context"
msgstr "'return' außerhalb einer Funktion benutzt."
-#: awkgram.y:570
+#: awkgram.y:859
msgid "plain `print' in BEGIN or END rule should probably be `print \"\"'"
msgstr ""
"Einfaches 'print' in BEGIN- oder END-Regel soll vermutlich 'print \"\"' sein."
-#: awkgram.y:586 awkgram.y:594
+#: awkgram.y:927 awkgram.y:935
msgid "`delete array' is a gawk extension"
msgstr "'delete array' ist eine gawk-Erweiterung."
-#: awkgram.y:608 awkgram.y:616
+#: awkgram.y:955 awkgram.y:963
#, fuzzy
msgid "`delete(array)' is a non-portable tawk extension"
msgstr "'delete array' ist eine gawk-Erweiterung."
-#: awkgram.y:660
+#: awkgram.y:1004
#, c-format
msgid "duplicate case values in switch body: %s"
msgstr ""
-#: awkgram.y:670
-msgid "Duplicate `default' detected in switch body"
+#: awkgram.y:1014
+msgid "duplicate `default' detected in switch body"
msgstr ""
-#: awkgram.y:759
+#: awkgram.y:1151
msgid "multistage two-way pipelines don't work"
msgstr "'multistage' Zweiwege-Pipes funktionieren nicht."
-#: awkgram.y:850
+#: awkgram.y:1253
msgid "regular expression on right of assignment"
msgstr "Regulärer Ausdruck auf der rechten Seite einer Zuweisung."
-#: awkgram.y:860
+#: awkgram.y:1263
msgid "regular expression on left of `~' or `!~' operator"
msgstr "Regulärer Ausdruck links vom '~'- oder '!~'-Operator."
-#: awkgram.y:866 awkgram.y:954
+#: awkgram.y:1278 awkgram.y:1423
#, fuzzy
msgid "old awk does not support the keyword `in' except after `for'"
msgstr "Das alte awk erlaubt den Operator '**' nicht."
-#: awkgram.y:872
+#: awkgram.y:1287
msgid "regular expression on right of comparison"
msgstr "Regulärer Ausdruck rechts von einem Vergleich."
-#: awkgram.y:936
+#: awkgram.y:1399
#, fuzzy, c-format
-msgid "`getline var' invalid inside %s rule"
+msgid "`getline var' invalid inside `%s' rule"
msgstr "Port-Angabe in '%s' ist ungültig."
-#: awkgram.y:939
-#, c-format
-msgid "`getline' invalid inside %s rule"
-msgstr ""
+#: awkgram.y:1401
+#, fuzzy, c-format
+msgid "`getline' invalid inside `%s' rule"
+msgstr "Port-Angabe in '%s' ist ungültig."
-#: awkgram.y:944
+#: awkgram.y:1407
msgid "non-redirected `getline' undefined inside END action"
msgstr ""
"Nicht-umgelenktes 'getline' ist innerhalb der END-Aktion nicht definiert."
-#: awkgram.y:955
+#: awkgram.y:1424
#, fuzzy
msgid "old awk does not support multidimensional arrays"
msgstr "Das alte awk erlaubt den Operator '**' nicht."
-#: awkgram.y:1001
+#: awkgram.y:1528
msgid "call of `length' without parentheses is not portable"
msgstr "Aufruf von 'length' ohne Klammern ist nicht portabel."
-#: awkgram.y:1006
-msgid "call of `length' without parentheses is deprecated by POSIX"
-msgstr "Aufruf von 'length' ohne Klammern ist in POSIX-Mode veraltet."
-
-#: awkgram.y:1051
+#: awkgram.y:1591
#, fuzzy
msgid "indirect function calls are a gawk extension"
-msgstr "'extension' ist eine gawk-Erweiterung."
+msgstr "'nextfile' ist eine gawk-Erweiterung."
-#: awkgram.y:1084
-msgid "use of non-array as array"
-msgstr ""
+#: awkgram.y:1605
+#, fuzzy, c-format
+msgid "can not use special variable `%s' for indirect function call"
+msgstr "Funktion '%s': Kann Funktionsnamen nicht als Parameternamen benutzen."
-#: awkgram.y:1087
+#: awkgram.y:1682
msgid "invalid subscript expression"
msgstr "Ungültiger Index-Ausdruck."
-#: awkgram.y:1329
+#: awkgram.y:1722
+msgid "use of non-array as array"
+msgstr ""
+
+#: awkgram.y:1993
#, fuzzy
msgid "unexpected newline or end of string"
msgstr "Unerwartetes Zeilenende"
-#: awkgram.y:1446
-msgid "empty program text on command line"
-msgstr "Kein Programmtext auf der Kommandozeile."
-
-#: awkgram.y:1502
+#: awkgram.y:2248 awkgram.y:2296 awkgram.y:2470
#, c-format
msgid "can't open source file `%s' for reading (%s)"
msgstr "Kann Quelldatei '%s' nicht zum Lesen öffnen (%s)."
-#: awkgram.y:1600
+#: awkgram.y:2249 awkgram.y:2297 builtin.c:122
+msgid "reason unknown"
+msgstr "Unbekannte Ursache"
+
+#: awkgram.y:2257
+#, fuzzy, c-format
+msgid "already included source file `%s'"
+msgstr "Kann Quelldatei '%s' nicht lesen (%s)."
+
+#: awkgram.y:2281
+#, fuzzy
+msgid "@include is a gawk extension"
+msgstr "'nextfile' ist eine gawk-Erweiterung."
+
+#: awkgram.y:2288
+msgid "empty filename after @include"
+msgstr ""
+
+#: awkgram.y:2422
+msgid "empty program text on command line"
+msgstr "Kein Programmtext auf der Kommandozeile."
+
+#: awkgram.y:2537
#, c-format
msgid "can't read sourcefile `%s' (%s)"
msgstr "Kann Quelldatei '%s' nicht lesen (%s)."
-#: awkgram.y:1608
+#: awkgram.y:2547
#, c-format
msgid "source file `%s' is empty"
msgstr "Quelldatei '%s' ist leer."
-#: awkgram.y:1800 awkgram.y:1922 awkgram.y:1940 awkgram.y:2315 awkgram.y:2407
+#: awkgram.y:2732
msgid "source file does not end in newline"
msgstr "Quelldatei hört nicht mit Zeilenende auf."
-#: awkgram.y:1862
+#: awkgram.y:2809
msgid "unterminated regexp ends with `\\' at end of file"
msgstr ""
"Nicht-beendeter Regulärer Ausdruck (hört mit '\\' auf) am Ende der Datei."
-#: awkgram.y:1886
+#: awkgram.y:2833
#, c-format
msgid "%s: %d: tawk regex modifier `/.../%c' doesn't work in gawk"
msgstr ""
-#: awkgram.y:1890
+#: awkgram.y:2837
#, c-format
msgid "tawk regex modifier `/.../%c' doesn't work in gawk"
msgstr ""
-#: awkgram.y:1897
+#: awkgram.y:2844
msgid "unterminated regexp"
msgstr "Nicht-beendeter Regulärer Ausdruck"
-#: awkgram.y:1900
+#: awkgram.y:2848
msgid "unterminated regexp at end of file"
msgstr "Nicht-beendeter Regulärer Ausdruck am Dateiende."
-#: awkgram.y:1969
+#: awkgram.y:2907
msgid "use of `\\ #...' line continuation is not portable"
msgstr ""
"Die Verwendung von '\\#...' zur Fortsetzung von Zeilen ist nicht portabel."
-#: awkgram.y:1982
+#: awkgram.y:2923
msgid "backslash not last character on line"
msgstr "Backslash ist nicht letztes Zeichen auf der Zeile."
-#: awkgram.y:2027
+#: awkgram.y:2984
msgid "POSIX does not allow operator `**='"
msgstr "POSIX erlaubt den Operator '**=' nicht."
-#: awkgram.y:2029
+#: awkgram.y:2986
msgid "old awk does not support operator `**='"
msgstr "Das alte awk erlaubt den Operator '**=' nicht."
-#: awkgram.y:2038
+#: awkgram.y:2995
msgid "POSIX does not allow operator `**'"
msgstr "POSIX erlaubt den Operator '**' nicht."
-#: awkgram.y:2040
+#: awkgram.y:2997
msgid "old awk does not support operator `**'"
msgstr "Das alte awk erlaubt den Operator '**' nicht."
-#: awkgram.y:2071
+#: awkgram.y:3032
msgid "operator `^=' is not supported in old awk"
msgstr "Das alte awk kennt den Operator '^=' nicht."
-#: awkgram.y:2079
+#: awkgram.y:3040
msgid "operator `^' is not supported in old awk"
msgstr "Das alte awk kennt den Operator '^' nicht."
-#: awkgram.y:2163 awkgram.y:2178
+#: awkgram.y:3133 awkgram.y:3149
msgid "unterminated string"
msgstr "Nicht-beendeter String"
-#: awkgram.y:2368
+#: awkgram.y:3345
#, c-format
msgid "invalid char '%c' in expression"
msgstr "Ungültiges Zeichen '%c' in einem Ausdruck."
-#: awkgram.y:2416
+#: awkgram.y:3391
#, c-format
msgid "`%s' is a gawk extension"
msgstr "'%s' ist eine gawk-Erweiterung"
-#: awkgram.y:2419
+#: awkgram.y:3394
#, c-format
msgid "`%s' is a Bell Labs extension"
msgstr "'%s' ist eine Erweiterung der Bell Labs."
-#: awkgram.y:2422
+#: awkgram.y:3397
#, c-format
msgid "POSIX does not allow `%s'"
msgstr "POSIX gestattet '%s' nicht."
-#: awkgram.y:2426
+#: awkgram.y:3401
#, c-format
msgid "`%s' is not supported in old awk"
msgstr "Das alte awk gestattet '%s' nicht."
-#: awkgram.y:2452
+#: awkgram.y:3465
msgid "`goto' considered harmful!\n"
msgstr "'goto' gilt als schlechter Stil!\n"
-#: awkgram.y:2514
+#: awkgram.y:3518
#, c-format
msgid "%d is invalid as number of arguments for %s"
msgstr "Unzulässige Argumentzahl %d für %s."
-#: awkgram.y:2533 awkgram.y:2536
+#: awkgram.y:3544 awkgram.y:3547
msgid "match: third argument is a gawk extension"
msgstr "match: Das dritte Argument ist eine gawk-Erweiterung."
-#: awkgram.y:2549
+#: awkgram.y:3575
#, c-format
msgid "%s: string literal as last arg of substitute has no effect"
msgstr "%s: Ein String als letztes Argument von substitute hat keinen Effekt."
-#: awkgram.y:2552
+#: awkgram.y:3580
#, fuzzy, c-format
msgid "%s third parameter is not a changeable object"
msgstr "Der dritte Parameter von sub ist ein unveränderliches Objekt."
-#: awkgram.y:2586 awkgram.y:2589
+#: awkgram.y:3665 awkgram.y:3668
msgid "close: second argument is a gawk extension"
msgstr "close: Das zweite Argument ist eine gawk-Erweiterung."
-#: awkgram.y:2599
+#: awkgram.y:3680
msgid "use of dcgettext(_\"...\") is incorrect: remove leading underscore"
msgstr ""
"Fehlerhafte Verwendung von dcgettext(_\"...\"): \n"
"Entfernen Sie den führenden Unterstrich."
-#: awkgram.y:2614
+#: awkgram.y:3695
#, fuzzy
msgid "use of dcngettext(_\"...\") is incorrect: remove leading underscore"
msgstr ""
"Fehlerhafte Verwendung von dcgettext(_\"...\"): \n"
"Entfernen Sie den führenden Unterstrich."
-#: awkgram.y:2686
+#: awkgram.y:3787
#, c-format
msgid "function `%s': parameter #%d, `%s', duplicates parameter #%d"
msgstr "Funktion '%s': Parameter #%d, '%s' wiederholt Parameter #%d."
-#: awkgram.y:2719
+#: awkgram.y:3829
#, c-format
msgid "function `%s': parameter `%s' shadows global variable"
msgstr "Funktion '%s': Parameter '%s' verdeckt eine globale Variable."
-#: awkgram.y:2831
+#: awkgram.y:3987
#, c-format
msgid "could not open `%s' for writing (%s)"
msgstr "Kann '%s' nicht zum Schreiben öffnen (%s)."
-#: awkgram.y:2832 profile.c:96
+#: awkgram.y:3988 profile.c:85
msgid "sending profile to standard error"
msgstr "Schicke Profile auf Stadard-Fehlerausgabe."
-#: awkgram.y:2864
+#: awkgram.y:3994
#, c-format
msgid "%s: close failed (%s)"
msgstr "%s: close gescheitert (%s)."
-#: awkgram.y:2985
+#: awkgram.y:4046
msgid "shadow_funcs() called twice!"
msgstr "shadow_funcs() zweimal aufgerufen!"
-#: awkgram.y:3012
+#: awkgram.y:4052
msgid "there were shadowed variables."
msgstr ""
-#: awkgram.y:3085
+#: awkgram.y:4081
#, c-format
msgid "function `%s': can't use function name as parameter name"
msgstr "Funktion '%s': Kann Funktionsnamen nicht als Parameternamen benutzen."
-#: awkgram.y:3088
+#: awkgram.y:4086
#, fuzzy, c-format
msgid "function `%s': can't use special variable `%s' as a function parameter"
msgstr "Funktion '%s': Kann Funktionsnamen nicht als Parameternamen benutzen."
-#: awkgram.y:3098
+#: awkgram.y:4102
#, c-format
msgid "function name `%s' previously defined"
msgstr "Funktion '%s' ist bereits definiert."
-#: awkgram.y:3249 awkgram.y:3255
+#: awkgram.y:4271 awkgram.y:4277
#, c-format
msgid "function `%s' called but never defined"
msgstr "Aufgerufene funktion '%s' ist nirgends definiert."
-#: awkgram.y:3258
+#: awkgram.y:4280
#, c-format
msgid "function `%s' defined but never called"
msgstr "Funktion '%s' wird nirgends aufgerufen."
-#: awkgram.y:3285
+#: awkgram.y:4311
#, c-format
msgid "regexp constant for parameter #%d yields boolean value"
msgstr ""
"Konstanter Regulärer Ausdruck für Parameter #%d ergibt einen logischen Wert."
-#: awkgram.y:3329
+#: awkgram.y:4420
#, fuzzy, c-format
msgid ""
"function `%s' called with space between name and `(',\n"
@@ -435,238 +511,143 @@ msgstr ""
"Funktion '%s' mit Leerzeichen zwischen Name und '(' aufgerufen, \n"
"%s"
-#: awkgram.y:3750
-#, fuzzy
-msgid "division by zero attempted in `/'"
-msgstr "Division durch Null versucht in '/='."
+#: awkgram.y:4673 eval.c:1845
+msgid "division by zero attempted"
+msgstr "Division durch Null versucht."
-#: awkgram.y:3755 eval.c:1411
+#: awkgram.y:4682 eval.c:1877
#, c-format
msgid "division by zero attempted in `%%'"
msgstr "Division durch Null versucht in '%%'."
-#: builtin.c:122
+#: awkgram.y:5342
+msgid "statement may have no effect"
+msgstr "Statement möglicherweise ohne Effekt."
+
+#: builtin.c:120
#, c-format
msgid "%s to \"%s\" failed (%s)"
msgstr "%s to \"%s\" fehlgeschlagen (%s)"
-#: builtin.c:123
+#: builtin.c:121
msgid "standard output"
msgstr "Standardausgabe"
-#: builtin.c:124
-msgid "reason unknown"
-msgstr "Unbekannte Ursache"
-
-#: builtin.c:137
+#: builtin.c:135
msgid "exp: received non-numeric argument"
msgstr "exp: Argument ist keine Zahl."
-#: builtin.c:143
+#: builtin.c:141
#, c-format
msgid "exp: argument %g is out of range"
msgstr "exp: Argument %g außerhalb des gültigen Zahlenbereichs."
-#: builtin.c:201
+#: builtin.c:200
#, c-format
msgid "fflush: cannot flush: pipe `%s' opened for reading, not writing"
msgstr ""
"fflush: Leeren der Puffer nicht möglich, Pipe »%s« ist nur zum Lesen geöffnet."
-#: builtin.c:204
+#: builtin.c:203
#, c-format
msgid "fflush: cannot flush: file `%s' opened for reading, not writing"
msgstr ""
"fflush: Leeren der Puffer nicht möglich, Datei »%s« ist nur zum Lesen "
"geöffnet."
-#: builtin.c:216
+#: builtin.c:215
#, c-format
msgid "fflush: `%s' is not an open file, pipe or co-process"
msgstr "fflush: »%s« ist keine geöffnete Datei, Pipe oder Prozess."
-#: builtin.c:310
+#: builtin.c:322
msgid "index: received non-string first argument"
msgstr "index: Erstes Argument ist kein String."
-#: builtin.c:312
+#: builtin.c:324
msgid "index: received non-string second argument"
msgstr "index: Zweites Argument ist kein string."
-#: builtin.c:434
+#: builtin.c:446
msgid "int: received non-numeric argument"
msgstr "Argument ist keine Zahl."
-#: builtin.c:464
+#: builtin.c:469
#, fuzzy
msgid "`length(array)' is a gawk extension"
msgstr "'delete array' ist eine gawk-Erweiterung."
-#: builtin.c:471
-msgid "length: untyped parameter argument will be forced to scalar"
-msgstr ""
-
-#: builtin.c:480
-msgid "length: untyped argument will be forced to scalar"
-msgstr ""
-
-#: builtin.c:484
+#: builtin.c:477
msgid "length: received non-string argument"
msgstr "length: Argument ist kein String."
-#: builtin.c:515
+#: builtin.c:508
msgid "log: received non-numeric argument"
msgstr "log: Argument ist keine Zahl."
-#: builtin.c:518
+#: builtin.c:511
#, c-format
msgid "log: received negative argument %g"
msgstr "log: Negatives Argument %g."
-#: builtin.c:726 builtin.c:729
-msgid "must use `count$' on all formats or none"
-msgstr ""
-
-#: builtin.c:790
-#, c-format
-msgid "field width is ignored for `%%%%' specifier"
-msgstr ""
-
-#: builtin.c:792
-#, c-format
-msgid "precision is ignored for `%%%%' specifier"
-msgstr ""
-
-#: builtin.c:794
-#, c-format
-msgid "field width and precision are ignored for `%%%%' specifier"
-msgstr ""
-
-#: builtin.c:845
-msgid "`$' is not permitted in awk formats"
-msgstr "»$« ist in awk-Formaten nicht zulässig."
-
-#: builtin.c:851
-msgid "arg count with `$' must be > 0"
-msgstr "Argumentnummer bei »$« muss > 0 sein."
-
-#: builtin.c:853
+#: builtin.c:531 builtin.c:573 builtin.c:586 builtin.c:982 builtin.c:994
#, fuzzy, c-format
-msgid "arg count %ld greater than total number of supplied arguments"
-msgstr "Argumentnummer %d ist größer als Anzahl angegebener Argumente."
-
-#: builtin.c:855
-msgid "`$' not permitted after period in format"
-msgstr "»$« nach Punkt in Formatangabe nicht zulässig."
-
-#: builtin.c:868
-msgid "no `$' supplied for positional field width or precision"
-msgstr "»$« fehlt in positionsabhängiger Feldbreite oder Genauigkeit."
-
-#
-#: builtin.c:938
-msgid "`l' is meaningless in awk formats; ignored"
-msgstr "»l« ist in awk-Formaten bedeutungslos, ignoriert."
-
-#: builtin.c:942
-msgid "`l' is not permitted in POSIX awk formats"
-msgstr "»l« in POSIX-awk-Formaten nicht zulässig."
-
-#: builtin.c:953
-msgid "`L' is meaningless in awk formats; ignored"
-msgstr "»L« ist in awk-Formaten bedeutungslos, ignoriert."
-
-#: builtin.c:957
-msgid "`L' is not permitted in POSIX awk formats"
-msgstr "»L« in POSIX-awk-Formaten nicht zulässig."
-
-#: builtin.c:968
-msgid "`h' is meaningless in awk formats; ignored"
-msgstr "»h« ist in awk-Formaten bedeutungslos, ignoriert."
-
-#: builtin.c:972
-msgid "`h' is not permitted in POSIX awk formats"
-msgstr "»h« in POSIX-awk-Formaten nicht zulässig.<"
-
-#: builtin.c:1252
-#, c-format
-msgid "[s]printf: value %g is out of range for `%%%c' format"
-msgstr ""
-
-#: builtin.c:1332
-#, c-format
-msgid "ignoring unknown format specifier character `%c': no argument converted"
-msgstr ""
-
-#: builtin.c:1338
-msgid "not enough arguments to satisfy format string"
-msgstr "Nicht genügend Argumente für Formatangabe."
-
-#: builtin.c:1340
-msgid "^ ran out for this one"
-msgstr "^ ran out for this one"
-
-#: builtin.c:1346
-msgid "[s]printf: format specifier does not have control letter"
-msgstr "[s]printf: Format-Specifier hat keinen Controlcode."
-
-#: builtin.c:1349
-msgid "too many arguments supplied for format string"
-msgstr "Zu viele Argumente für Formatstring."
+msgid "attempt to use array `%s' in scalar context"
+msgstr "Versuch, das Array '%s' in Skalarkontext zu verwenden."
-#: builtin.c:1424 builtin.c:1427
+#: builtin.c:569 builtin.c:580
msgid "printf: no arguments"
msgstr "printf: Keine Argumente"
-#: builtin.c:1451
+#: builtin.c:621
msgid "sqrt: received non-numeric argument"
msgstr "sqrt: Argument ist keine Zahl."
-#: builtin.c:1455
+#: builtin.c:625
#, c-format
msgid "sqrt: called with negative argument %g"
msgstr "sqrt: Argument %g ist negativ."
-#: builtin.c:1479
-#, c-format
-msgid "substr: start index %g is invalid, using 1"
-msgstr "substr: Start-Index %g ist ungültig, 1 wird benutzt."
-
-#: builtin.c:1484
-#, c-format
-msgid "substr: non-integer start index %g will be truncated"
-msgstr "substr: Start-Wert %g wird abgeschnitten."
-
-#: builtin.c:1510
+#: builtin.c:649
#, fuzzy, c-format
msgid "substr: length %g is not >= 1"
msgstr "substr: Länge %g ist kleiner oder gleich 0."
-#: builtin.c:1512
+#: builtin.c:651
#, fuzzy, c-format
msgid "substr: length %g is not >= 0"
msgstr "substr: Länge %g ist kleiner oder gleich 0."
-#: builtin.c:1519
+#: builtin.c:658
#, c-format
msgid "substr: non-integer length %g will be truncated"
msgstr "substr: Länge %g wird abgeschnitten."
-#: builtin.c:1524
+#: builtin.c:663
#, c-format
msgid "substr: length %g too big for string indexing, truncating to %g"
msgstr ""
-#: builtin.c:1536
+#: builtin.c:675
+#, c-format
+msgid "substr: start index %g is invalid, using 1"
+msgstr "substr: Start-Index %g ist ungültig, 1 wird benutzt."
+
+#: builtin.c:680
+#, c-format
+msgid "substr: non-integer start index %g will be truncated"
+msgstr "substr: Start-Wert %g wird abgeschnitten."
+
+#: builtin.c:705
msgid "substr: source string is zero length"
msgstr "substr: String ist leer."
-#: builtin.c:1552
+#: builtin.c:721
#, fuzzy, c-format
msgid "substr: start index %g is past end of string"
msgstr "substr: Start-Wert %d liegt hinter dem Ende des Strings."
-#: builtin.c:1560
+#: builtin.c:729
#, fuzzy, c-format
msgid ""
"substr: length %g at start index %g exceeds length of first argument (%lu)"
@@ -674,485 +655,445 @@ msgstr ""
"substr: Länge %d am Start-Wert %d überschreitet Länge des ersten Arguments (%"
"d)."
-#: builtin.c:1637
+#: builtin.c:806
+#, fuzzy
+msgid "strftime: received non-numeric second argument"
+msgstr "strftime. Zweites Argument ist keine Zahl."
+
+#: builtin.c:813
#, fuzzy
msgid "strftime: received non-string first argument"
msgstr "strftime: Erstes Argument ist kein String."
-#: builtin.c:1643
+#: builtin.c:819
msgid "strftime: received empty format string"
msgstr "strftime: Format-String ist leer."
-#: builtin.c:1652
-#, fuzzy
-msgid "strftime: received non-numeric second argument"
-msgstr "strftime. Zweites Argument ist keine Zahl."
-
-#: builtin.c:1729
+#: builtin.c:885
msgid "mktime: received non-string argument"
msgstr "mktime: Argument ist kein String."
-#: builtin.c:1746
+#: builtin.c:902
msgid "mktime: at least one of the values is out of the default range"
msgstr ""
-#: builtin.c:1781
+#: builtin.c:937
msgid "'system' function not allowed in sandbox mode"
msgstr ""
-#: builtin.c:1786
+#: builtin.c:942
#, fuzzy
msgid "system: received non-string argument"
msgstr "system: Argument ist kein String."
-#: builtin.c:1907 eval.c:2285
+#: builtin.c:997 eval.c:1105 eval.c:1557 eval.c:1570
+#, c-format
+msgid "reference to uninitialized variable `%s'"
+msgstr "Referenz auf die nicht-initialisierte Variable '%s'."
+
+#: builtin.c:1064
#, fuzzy, c-format
msgid "reference to uninitialized field `$%d'"
msgstr "Referenz auf die nicht-initialisierte Variable '%s'."
-#: builtin.c:2012
+#: builtin.c:1098
#, fuzzy
msgid "tolower: received non-string argument"
msgstr "tolower: Argument ist kein String."
-#: builtin.c:2042
+#: builtin.c:1151
#, fuzzy
msgid "toupper: received non-string argument"
msgstr "toupper: Argument ist kein String."
-#: builtin.c:2075
+#: builtin.c:1199
msgid "atan2: received non-numeric first argument"
msgstr "atan2: Erstes Argument ist keine Zahl."
-#: builtin.c:2077
+#: builtin.c:1201
msgid "atan2: received non-numeric second argument"
msgstr "atan2: Zweites Argument ist keine Zahl."
-#: builtin.c:2096
+#: builtin.c:1220
msgid "sin: received non-numeric argument"
msgstr "sin: Argument istk eine Zahl."
-#: builtin.c:2112
+#: builtin.c:1236
msgid "cos: received non-numeric argument"
msgstr "cos: Argument ist keine Zahl."
-#: builtin.c:2165
+#: builtin.c:1289
msgid "srand: received non-numeric argument"
msgstr "srand: Argument ist keine Zahl."
-#: builtin.c:2200
+#: builtin.c:1320
msgid "match: third argument is not an array"
msgstr "match: Drittes Argument ist kein Array."
-#: builtin.c:2750
+#: builtin.c:1827
+#, fuzzy
msgid "gensub: third argument of 0 treated as 1"
msgstr "gensub: Drittes Argument 0 als 1 interpretiert"
-#: builtin.c:2866
+#: builtin.c:1869
msgid "lshift: received non-numeric first argument"
msgstr "lshift: Erstes Argument ist keine Zahl."
-#: builtin.c:2868
+#: builtin.c:1871
#, fuzzy
msgid "lshift: received non-numeric second argument"
-msgstr "strftime. Zweites Argument ist keine Zahl."
+msgstr "atan2: Zweites Argument ist keine Zahl."
-#: builtin.c:2874
+#: builtin.c:1877
#, c-format
msgid "lshift(%lf, %lf): negative values will give strange results"
msgstr ""
"lshift(%lf, %lf): Negative Werte werden merkwürdige Ergebnisse liefern."
-#: builtin.c:2876
+#: builtin.c:1879
#, c-format
msgid "lshift(%lf, %lf): fractional values will be truncated"
msgstr "lshift(%lf, %lf): Dezimalteil wird abgeschnitten."
-#: builtin.c:2878
+#: builtin.c:1881
#, c-format
msgid "lshift(%lf, %lf): too large shift value will give strange results"
msgstr ""
"lshift(%lf, %lf): Zu große Shift-Werte werden merkwürdige Ergebnisse liefern."
-#: builtin.c:2904
+#: builtin.c:1908
msgid "rshift: received non-numeric first argument"
msgstr "rshift: Erstes Argument ist keine Zahl."
-#: builtin.c:2906
+#: builtin.c:1910
#, fuzzy
msgid "rshift: received non-numeric second argument"
-msgstr "strftime. Zweites Argument ist keine Zahl."
+msgstr "atan2: Zweites Argument ist keine Zahl."
-#: builtin.c:2912
+#: builtin.c:1916
#, c-format
msgid "rshift(%lf, %lf): negative values will give strange results"
msgstr ""
"rshift (%lf, %lf): Negative Werte werden merkwürdige Ergebnisse liefern."
-#: builtin.c:2914
+#: builtin.c:1918
#, c-format
msgid "rshift(%lf, %lf): fractional values will be truncated"
msgstr "rshift(%lf, %lf): Dezimalteil wird abgeschnitten."
-#: builtin.c:2916
+#: builtin.c:1920
#, c-format
msgid "rshift(%lf, %lf): too large shift value will give strange results"
msgstr ""
"rshift(%lf, %lf): Zu große Shift-Werte werden merkwürdige Ergebnisse liefern."
-#: builtin.c:2942
+#: builtin.c:1947
msgid "and: received non-numeric first argument"
msgstr "and: Erstes Argument ist keine Zahl."
-#: builtin.c:2944
+#: builtin.c:1949
#, fuzzy
msgid "and: received non-numeric second argument"
msgstr "atan2: Zweites Argument ist keine Zahl."
-#: builtin.c:2950
+#: builtin.c:1955
#, c-format
msgid "and(%lf, %lf): negative values will give strange results"
msgstr "and(%lf, %lf): Negative Werte werden merkwürdige Ergebnisse liefern."
-#: builtin.c:2952
+#: builtin.c:1957
#, c-format
msgid "and(%lf, %lf): fractional values will be truncated"
msgstr "and(%lf, %lf): Dezimalteil wird abgeschnitten."
-#: builtin.c:2978
+#: builtin.c:1984
msgid "or: received non-numeric first argument"
msgstr "or: Erstes Argument ist keine Zahl."
-#: builtin.c:2980
+#: builtin.c:1986
#, fuzzy
msgid "or: received non-numeric second argument"
msgstr "atan2: Zweites Argument ist keine Zahl."
-#: builtin.c:2986
+#: builtin.c:1992
#, c-format
msgid "or(%lf, %lf): negative values will give strange results"
msgstr "or(%lf, %lf): Negative Werte werden merkwürdige Ergebnisse liefern."
-#: builtin.c:2988
+#: builtin.c:1994
#, c-format
msgid "or(%lf, %lf): fractional values will be truncated"
msgstr "or(%lf, %lf): Dezimalteil wird abgeschnitten."
-#: builtin.c:3014
+#: builtin.c:2023
msgid "xor: received non-numeric first argument"
msgstr "xor: Erstes Argument ist keine Zahl."
-#: builtin.c:3016
+#: builtin.c:2025
#, fuzzy
msgid "xor: received non-numeric second argument"
msgstr "atan2: Zweites Argument ist keine Zahl."
-#: builtin.c:3022
+#: builtin.c:2031
#, c-format
msgid "xor(%lf, %lf): negative values will give strange results"
msgstr "xor(%lf, %lf: Negative Werte werden merkwürdige Ergebnisse liefern."
-#: builtin.c:3024
+#: builtin.c:2033
#, c-format
msgid "xor(%lf, %lf): fractional values will be truncated"
msgstr "xor(%lf, %lf): Dezimalteil wird abgeschnitten."
-#: builtin.c:3048
+#: builtin.c:2057 builtin.c:2063
msgid "compl: received non-numeric argument"
msgstr "compl: Erstes Argument ist keine Zahl."
-#: builtin.c:3054
+#: builtin.c:2065
#, c-format
msgid "compl(%lf): negative value will give strange results"
msgstr "compl(%lf): Negativer Wert wird merkwürdige Ergebnisse liefern."
-#: builtin.c:3056
+#: builtin.c:2067
#, c-format
msgid "compl(%lf): fractional value will be truncated"
msgstr "compl(%lf): Dezimalteil wird abgeschnitten."
-#: builtin.c:3229
+#: builtin.c:2237
#, c-format
msgid "dcgettext: `%s' is not a valid locale category"
msgstr "dcgettext: '%s' ist keine gültige Locale-Kategorie."
-#: eval.c:374
+#: eval.c:412
#, c-format
msgid "unknown nodetype %d"
msgstr "Unbekannter Knotentyp %d"
-#: eval.c:423
+#: eval.c:423 eval.c:437
+#, fuzzy, c-format
+msgid "unknown opcode %d"
+msgstr "Unbekannter Knotentyp %d"
+
+#: eval.c:434
+#, c-format
+msgid "opcode %s not an operator or keyword"
+msgstr ""
+
+#: eval.c:487
msgid "buffer overflow in genflags2str"
msgstr "Pufferüberlauf in genflags2str."
-#: eval.c:455 eval.c:461 profile.c:787
+#: eval.c:613
#, c-format
-msgid "attempt to use array `%s' in a scalar context"
-msgstr "Versuch, das Array '%s' in Skalarkontext zu verwenden."
-
-#: eval.c:803
-#, fuzzy, c-format
-msgid "for loop: array `%s' changed size from %ld to %ld during loop execution"
+msgid ""
+"\n"
+"\t# Function Call Stack:\n"
+"\n"
msgstr ""
-"for-Schleife: Array '%s' ändert Größse von %d zu %d innerhalb der Schleife."
-
-#: eval.c:824
-msgid "`break' outside a loop is not portable"
-msgstr "'break' außerhalb einer Schleife ist nicht portabel."
+"\n"
+"\t# Funktion Aufruf-Stack\n"
+"\n"
-#: eval.c:828
-msgid "`break' outside a loop is not allowed"
-msgstr "'break' außerhalb einer Schleife ist nicht zulässig."
+#: eval.c:640
+msgid "`IGNORECASE' is a gawk extension"
+msgstr "'IGNORECASE' ist eine gawk-Erweiterung"
-#: eval.c:845
-msgid "`continue' outside a loop is not portable"
-msgstr "'continue' außerhalb einer Schleife ist nicht portabel."
+#: eval.c:669
+msgid "`BINMODE' is a gawk extension"
+msgstr "'BINMODE' ist eine gawk-Erweiterung."
-#: eval.c:849
-msgid "`continue' outside a loop is not allowed"
-msgstr "'continue' außerhalb einer Schleife ist nicht zulässig."
+#: eval.c:727
+#, c-format
+msgid "BINMODE value `%s' is invalid, treated as 3"
+msgstr ""
-#: eval.c:883
-msgid "`next' cannot be called from a BEGIN rule"
-msgstr "'next' kann nicht in einer BEGIN-Regel benutzt werden."
+#: eval.c:817
+#, c-format
+msgid "bad `%sFMT' specification `%s'"
+msgstr "Falsche '%sFMT'-Angabe '%s'"
-#: eval.c:885
-msgid "`next' cannot be called from an END rule"
-msgstr "'next' kann nicht in einer END-Regel benutzt werden."
+#: eval.c:895
+msgid "turning off `--lint' due to assignment to `LINT'"
+msgstr "'--lint' wird abgeschaltet, da 'LINT' gesetzt ist."
-#: eval.c:887
-#, fuzzy
-msgid "`next' cannot be called from a BEGINFILE rule"
-msgstr "'next' kann nicht in einer BEGIN-Regel benutzt werden."
+#: eval.c:1067 eval.c:1544
+#, c-format
+msgid "can't use function name `%s' as variable or array"
+msgstr "Kann Funktion '%s' nicht als Variable oder Array verwenden."
-#: eval.c:889
-#, fuzzy
-msgid "`next' cannot be called from an ENDFILE rule"
-msgstr "'next' kann nicht in einer END-Regel benutzt werden."
+#: eval.c:1095
+msgid "assignment is not allowed to result of builtin function"
+msgstr ""
+"Zuweisungen an das Ergebnis einer eingebauten Funktion sind nicht erlaubt."
-#: eval.c:898
-msgid "`nextfile' cannot be called from a BEGIN rule"
-msgstr "'nextfile' kann nicht in einer BEGIN-Regel benutzt werden."
+#: eval.c:1104 eval.c:1556 eval.c:1569
+#, c-format
+msgid "reference to uninitialized argument `%s'"
+msgstr "Referenz auf nicht-initialisiertes Argument '%s'."
-#: eval.c:900
-msgid "`nextfile' cannot be called from an END rule"
-msgstr "'nextfile' kann nicht in einer END-Regel benutzt werden."
+#: eval.c:1123
+msgid "attempt to field reference from non-numeric value"
+msgstr "Nicht-numerischer Wert für Feldreferenz verwendet."
-#: eval.c:906
+#: eval.c:1125
#, fuzzy
-msgid "`nextfile' cannot be called from an ENDFILE rule"
-msgstr "'nextfile' kann nicht in einer END-Regel benutzt werden."
+msgid "attempt to field reference from null string"
+msgstr "Referenz von einem Null-String"
-#: eval.c:963
-msgid "statement has no effect"
-msgstr "Anweisung hat keinen Effekt."
+#: eval.c:1131
+#, fuzzy, c-format
+msgid "attempt to access field %ld"
+msgstr "Versuch des Zugriffs auf Feld %d."
-#: eval.c:1040 eval.c:2133
-#, c-format
-msgid "can't use function name `%s' as variable or array"
-msgstr "Kann Funktion '%s' nicht als Variable oder Array verwenden."
+#: eval.c:1140
+#, fuzzy, c-format
+msgid "reference to uninitialized field `$%ld'"
+msgstr "Referenz auf die nicht-initialisierte Variable '%s'."
-#: eval.c:1047 eval.c:1053
+#: eval.c:1202
#, c-format
-msgid "reference to uninitialized argument `%s'"
-msgstr "Referenz auf nicht-initialisiertes Argument '%s'."
+msgid "function `%s' called with more arguments than declared"
+msgstr "Funktion '%s' mit zu vielen Argumenten aufgerufen."
-#: eval.c:1062 eval.c:2142
+#: eval.c:1358
#, c-format
-msgid "reference to uninitialized variable `%s'"
-msgstr "Referenz auf die nicht-initialisierte Variable '%s'."
-
-#: eval.c:1210
-msgid ""
-"concatenation: side effects in one expression have changed the length of "
-"another!"
+msgid "unwind_stack: unexpected type `%s'"
msgstr ""
-"Konkatenierung: Seiteneffekte in einem Ausdruck haben die Länge des anderen\n"
-"geändert!"
-#: eval.c:1315
+#: eval.c:1636
+#, fuzzy, c-format
+msgid "attempt to use scalar `%s' as an array"
+msgstr "Versuch, Skalar '%s' als Array zu verwenden."
+
+#: eval.c:1680
msgid "assignment used in conditional context"
msgstr "Zuweisung in einer Bedingung."
-#: eval.c:1396
-msgid "division by zero attempted"
-msgstr "Division durch Null versucht."
-
-#: eval.c:1426 profile.c:663
-#, c-format
-msgid "illegal type (%s) in tree_eval"
-msgstr "Illegaler Typ (%s) in tree_eval"
+#: eval.c:1684
+msgid "statement has no effect"
+msgstr "Anweisung hat keinen Effekt."
-#: eval.c:1589
+#: eval.c:2028
msgid "division by zero attempted in `/='"
msgstr "Division durch Null versucht in '/='."
-#: eval.c:1611
+#: eval.c:2053
#, c-format
msgid "division by zero attempted in `%%='"
msgstr "Division durch Null versucht in '%%='."
-#: eval.c:1891
-#, c-format
-msgid "function `%s' called with more arguments than declared"
-msgstr "Funktion '%s' mit zu vielen Argumenten aufgerufen."
-
-#: eval.c:1948
-#, c-format
-msgid "function `%s' not defined"
-msgstr "Funktion '%s' ist nicht definiert."
-
-#: eval.c:1950
-#, c-format
-msgid "identifier `%s' is not a function"
-msgstr ""
-
-#: eval.c:1997
-#, c-format
-msgid ""
-"function parameter `%s' is not a scalar and cannot be used for indirect "
-"function call"
-msgstr ""
-
-#: eval.c:2014
-#, c-format
-msgid "indirect call of real function `%s' is silly"
-msgstr ""
+#: eval.c:2139
+msgid "`continue' outside a loop is not allowed"
+msgstr "'continue' außerhalb einer Schleife ist nicht zulässig."
-#: eval.c:2034
-#, c-format
-msgid "function `%s' called indirectly through `%s' does not exist"
-msgstr ""
+#: eval.c:2145
+#, fuzzy
+msgid "`break' outside a loop is not allowed"
+msgstr "'break' außerhalb einer Schleife ist nicht zulässig."
-#: eval.c:2039
-#, c-format
-msgid "identifier `%s' cannot be used for indirect function call"
+#: eval.c:2229
+#, fuzzy, c-format
+msgid "for loop: array `%s' changed size from %ld to %ld during loop execution"
msgstr ""
+"for-Schleife: Array '%s' ändert Größse von %d zu %d innerhalb der Schleife."
-#: eval.c:2105
+#: eval.c:2342
#, c-format
-msgid ""
-"\n"
-"\t# Function Call Stack:\n"
-"\n"
+msgid "function called indirectly through `%s' does not exist"
msgstr ""
-"\n"
-"\t# Funktion Aufruf-Stack\n"
-"\n"
-#: eval.c:2108
+#: eval.c:2354
#, c-format
-msgid "\t# -- main --\n"
-msgstr "\t# -- main --\n"
-
-#: eval.c:2269
-msgid "attempt to field reference from non-numeric value"
-msgstr "Nicht-numerischer Wert für Feldreferenz verwendet."
-
-#: eval.c:2271
-msgid "attempt to reference from null string"
-msgstr "Referenz von einem Null-String"
-
-#: eval.c:2277
-#, c-format
-msgid "attempt to access field %d"
-msgstr "Versuch des Zugriffs auf Feld %d."
-
-#: eval.c:2298 eval.c:2305 profile.c:843
-msgid "assignment is not allowed to result of builtin function"
-msgstr ""
-"Zuweisungen an das Ergebnis einer eingebauten Funktion sind nicht erlaubt."
+msgid "function `%s' not defined"
+msgstr "Funktion '%s' ist nicht definiert."
-#: eval.c:2369
-msgid "`IGNORECASE' is a gawk extension"
-msgstr "'IGNORECASE' ist eine gawk-Erweiterung"
+#: eval.c:2481
+#, fuzzy, c-format
+msgid "`nextfile' cannot be called from a `%s' rule"
+msgstr "'nextfile' kann nicht in einer END-Regel benutzt werden."
-#: eval.c:2398
-msgid "`BINMODE' is a gawk extension"
-msgstr "'BINMODE' ist eine gawk-Erweiterung."
+#: eval.c:2540
+#, fuzzy, c-format
+msgid "`next' cannot be called from a `%s' rule"
+msgstr "'next' kann nicht in einer END-Regel benutzt werden."
-#: eval.c:2456
+#: eval.c:2602
#, c-format
-msgid "BINMODE value `%s' is invalid, treated as 3"
+msgid "Sorry, don't know how to interpret `%s'"
msgstr ""
-#: eval.c:2546
-#, c-format
-msgid "bad `%sFMT' specification `%s'"
-msgstr "Falsche '%sFMT'-Angabe '%s'"
-
-#: eval.c:2624
-msgid "turning off `--lint' due to assignment to `LINT'"
-msgstr "'--lint' wird abgeschaltet, da 'LINT' gesetzt ist."
-
-#: ext.c:61
-msgid "extensions not allowed in sandbox mode"
+#: ext.c:62
+msgid "extensions are not allowed in sandbox mode"
msgstr ""
-#: ext.c:65 ext.c:70
+#: ext.c:68 ext.c:73
msgid "`extension' is a gawk extension"
msgstr "'extension' ist eine gawk-Erweiterung."
-#: ext.c:80
-#, c-format
-msgid "extension: cannot open `%s' (%s)\n"
+#: ext.c:83
+#, fuzzy, c-format
+msgid "fatal: extension: cannot open `%s' (%s)\n"
msgstr "extension: Kann '%s' nicht öffnen (%s)\n"
-#: ext.c:88
-#, c-format
-msgid "extension: library `%s': cannot call function `%s' (%s)\n"
+#: ext.c:93
+#, fuzzy, c-format
+msgid "fatal: extension: library `%s': cannot call function `%s' (%s)\n"
msgstr "extension: Bibliothek '%s': kann Funktion '%s' nicht aufrufen (%s)\n"
-#: ext.c:108
+#: ext.c:123
msgid "extension: missing function name"
msgstr ""
-#: ext.c:113
+#: ext.c:128
#, fuzzy, c-format
msgid "extension: illegal character `%c' in function name `%s'"
msgstr "extension: Bibliothek '%s': kann Funktion '%s' nicht aufrufen (%s)\n"
-#: ext.c:119
+#: ext.c:137
#, fuzzy, c-format
msgid "extension: can't redefine function `%s'"
msgstr "extension: Kann '%s' nicht öffnen (%s)\n"
-#: ext.c:123
+#: ext.c:141
#, fuzzy, c-format
msgid "extension: function `%s' already defined"
msgstr "Funktion '%s' ist nicht definiert."
-#: ext.c:128
-#, c-format
-msgid "extension: can't use gawk built-in `%s' as function name"
-msgstr ""
-
-#: ext.c:130
+#: ext.c:146
#, fuzzy, c-format
msgid "extension: function name `%s' previously defined"
msgstr "Funktion '%s' ist bereits definiert."
-#: ext.c:207
+#: ext.c:148
+#, fuzzy, c-format
+msgid "extension: can't use gawk built-in `%s' as function name"
+msgstr "Funktion '%s': Kann Funktionsnamen nicht als Parameternamen benutzen."
+
+#: ext.c:152
+#, c-format
+msgid "make_builtin: negative argument count for function `%s'"
+msgstr ""
+
+#: ext.c:255
#, fuzzy, c-format
msgid "function `%s' defined to take no more than %d argument(s)"
msgstr "Funktion '%s' wird nirgends aufgerufen."
-#: ext.c:210
+#: ext.c:258
#, fuzzy, c-format
msgid "function `%s': missing argument #%d"
msgstr "Funktion '%s' ist nicht definiert."
-#: ext.c:220
+#: ext.c:268
#, fuzzy, c-format
msgid "function `%s': argument #%d: attempt to use scalar as an array"
msgstr "Versuch, Skalar '%s' als Array zu verwenden."
-#: ext.c:224
+#: ext.c:272
#, c-format
msgid "function `%s': argument #%d: attempt to use array as a scalar"
msgstr ""
-#: ext.c:249
+#: ext.c:285
msgid "Operation Not Supported"
msgstr "Operation nicht möglich."
@@ -1160,59 +1101,58 @@ msgstr "Operation nicht möglich."
msgid "NF set to negative value"
msgstr ""
-#: field.c:913
-msgid "split: second argument is not an array"
-msgstr "split: Zweites Argument ist kein Array."
-
-#: field.c:922 field.c:932 field.c:937
+#: field.c:939 field.c:946 field.c:950
#, fuzzy
msgid "split: fourth argument is a gawk extension"
msgstr "match: Das dritte Argument ist eine gawk-Erweiterung."
-#: field.c:928
+#: field.c:943
#, fuzzy
msgid "split: fourth argument is not an array"
msgstr "split: Zweites Argument ist kein Array."
-#: field.c:975
-#, fuzzy
-msgid "split: null string for third argument is a gawk extension"
+#: field.c:957
+msgid "split: second argument is not an array"
+msgstr "split: Zweites Argument ist kein Array."
+
+#: field.c:987
+msgid "split: null string for third arg is a gawk extension"
msgstr "split: Null-String als drittes Argument ist eine gawk-Erweiterung."
-#: field.c:1032
+#: field.c:1028
#, fuzzy
-msgid "patsplit: second argument is not an array"
+msgid "patsplit: fourth argument is not an array"
msgstr "split: Zweites Argument ist kein Array."
-#: field.c:1041
+#: field.c:1033
#, fuzzy
-msgid "patsplit: fourth argument is not an array"
+msgid "patsplit: second argument is not an array"
msgstr "split: Zweites Argument ist kein Array."
-#: field.c:1067
+#: field.c:1051
#, fuzzy
msgid "patsplit: third argument must be non-null"
msgstr "match: Drittes Argument ist kein Array."
-#: field.c:1111
+#: field.c:1084
msgid "`FIELDWIDTHS' is a gawk extension"
msgstr "'FIELDWIDTHS' ist eine gawk-Erweiterung."
-#: field.c:1141 field.c:1155
+#: field.c:1147
#, c-format
msgid "invalid FIELDWIDTHS value, near `%s'"
msgstr ""
-#: field.c:1238
+#: field.c:1220
msgid "null string for `FS' is a gawk extension"
msgstr "Null-String für 'FS' ist eine gawk-Erweiterung."
-#: field.c:1242
+#: field.c:1224
#, fuzzy
msgid "old awk does not support regexps as value of `FS'"
msgstr "Das alte awk erlaubt den Operator '**' nicht."
-#: field.c:1357
+#: field.c:1343
#, fuzzy
msgid "`FPAT' is a gawk extension"
msgstr "'%s' ist eine gawk-Erweiterung"
@@ -1272,499 +1212,496 @@ msgstr "%s. Option '-W %s' erlaubt kein Argument.\n"
msgid "%s: option '-W %s' requires an argument\n"
msgstr "%s: Option '%s' erfordert ein Argument.\n"
-#: io.c:379
+#: io.c:272
#, c-format
msgid "command line argument `%s' is a directory: skipped"
msgstr ""
-#: io.c:413
+#: io.c:275 io.c:372
#, c-format
msgid "cannot open file `%s' for reading (%s)"
msgstr "Kann Datei '%s' nicht zum Lesen öffnen (%s)."
-#: io.c:459 io.c:2999
+#: io.c:419
#, c-format
msgid "error reading input file `%s': %s"
msgstr "Fehler beim Lesen der Eingabedatei '%s': %s."
-#: io.c:506
+#: io.c:470
#, c-format
msgid "close of fd %d (`%s') failed (%s)"
msgstr "Schließen von Dateideskriptor %d ('%s') gescheitert (%s)."
-#: io.c:617
-msgid "redirection not allowed in sandbox mode"
-msgstr ""
-
-#: io.c:648
-#, c-format
-msgid "invalid tree type %s in redirect()"
-msgstr "Ungültiger Tree-Typ %s in redirect()."
-
-#: io.c:654
+#: io.c:577
#, c-format
msgid "expression in `%s' redirection only has numeric value"
msgstr "Ausdruck in '%s' Umlenkung hat nur einen numerischen Wert."
-#: io.c:660
+#: io.c:583
#, c-format
msgid "expression for `%s' redirection has null string value"
msgstr "Ausdruck für '%s' Umlenkung ist ein leerer String."
-#: io.c:665
+#: io.c:589
#, c-format
msgid "filename `%s' for `%s' redirection may be result of logical expression"
msgstr ""
"Dateiname '%s' für '%s' Umlenkung kann Ergebnis eines logischen Ausdrucks "
"sein."
-#: io.c:707
+#: io.c:628
#, c-format
msgid "unnecessary mixing of `>' and `>>' for file `%.*s'"
msgstr "Unnötige Kombination von '>' und '>>' für Datei '%.*s'."
-#: io.c:754
+#: io.c:681
#, c-format
msgid "can't open pipe `%s' for output (%s)"
msgstr "Kann Pipe '%s' nicht für Ausgabe öffnen (%s)."
-#: io.c:763
+#: io.c:691
#, c-format
msgid "can't open pipe `%s' for input (%s)"
msgstr "Kann Pipe '%s' nicht für Eingabe öffnen (%s)."
-#: io.c:786
+#: io.c:712
#, c-format
msgid "can't open two way pipe `%s' for input/output (%s)"
msgstr "Kann bidirektionale Pipe '%s' nicht für Ein-/Ausgabe öffnen (%s)."
-#: io.c:864
+#: io.c:794
#, c-format
msgid "can't redirect from `%s' (%s)"
msgstr "Kann nicht von '%s' umlenken (%s)."
-#: io.c:867
+#: io.c:797
#, c-format
msgid "can't redirect to `%s' (%s)"
msgstr "Kann nicht auf '%s' umlenken (%s)."
-#: io.c:920
+#: io.c:846
msgid ""
"reached system limit for open files: starting to multiplex file descriptors"
msgstr ""
"Systemgrenze offener Dateien erreicht; beginne mit Multiplexing von "
"Dateideskriptoren."
-#: io.c:936
+#: io.c:862
#, c-format
msgid "close of `%s' failed (%s)."
msgstr "Schließen von '%s' gescheitert (%s)."
-#: io.c:944
+#: io.c:870
msgid "too many pipes or input files open"
msgstr "Zu viele Pipes oder Eingabedateien offen."
-#: io.c:967
+#: io.c:892
msgid "close: second argument must be `to' or `from'"
msgstr "close: Zweites Argument muss 'to' oder 'from' sein."
-#: io.c:981
+#: io.c:909
#, c-format
msgid "close: `%.*s' is not an open file, pipe or co-process"
msgstr "close: '%.*s' ist keine offene Datei, Pipe oder Ko-Prozess."
-#: io.c:986
+#: io.c:914
msgid "close of redirection that was never opened"
msgstr "'close' für eine Umlenkung, die nie geöffnet wurde."
-#: io.c:1083
+#: io.c:1011
#, c-format
msgid "close: redirection `%s' not opened with `|&', second argument ignored"
msgstr ""
"close: Umlenkung '%s' nicht mit '[&' geöffnet, zweites Argument wird "
"ignoriert."
-#: io.c:1099
+#: io.c:1027
#, c-format
msgid "failure status (%d) on pipe close of `%s' (%s)"
msgstr "Fehlerstatus (%d) beim Schließen der Pipe '%s' (%s)."
-#: io.c:1102
+#: io.c:1030
#, c-format
msgid "failure status (%d) on file close of `%s' (%s)"
msgstr "Fehlerstatus (%d) beim Schließen de rDatei '%s' (%s)."
-#: io.c:1122
+#: io.c:1050
#, c-format
msgid "no explicit close of socket `%s' provided"
msgstr "Das explizite des Sockets '%s' fehlt."
-#: io.c:1125
+#: io.c:1053
#, c-format
msgid "no explicit close of co-process `%s' provided"
msgstr "Das explizite Schließen des Ko-Prozesses '%s' fehlt."
-#: io.c:1128
+#: io.c:1056
#, c-format
msgid "no explicit close of pipe `%s' provided"
msgstr "Das explizite Schließen der Pipe '%s' fehlt."
-#: io.c:1131
+#: io.c:1059
#, c-format
msgid "no explicit close of file `%s' provided"
msgstr "Das explizite Schließen der Datei '%s' fehlt."
-#: io.c:1159 io.c:1214 main.c:832 main.c:874
+#: io.c:1087 io.c:1142 main.c:823 main.c:865
#, c-format
msgid "error writing standard output (%s)"
msgstr "Fehler beim Schreiben auf stdout (%s)."
-#: io.c:1163 io.c:1219
+#: io.c:1091 io.c:1147
#, c-format
msgid "error writing standard error (%s)"
msgstr "Fehler beim Schreiben auf stderr (%s)."
-#: io.c:1171
+#: io.c:1099
#, c-format
msgid "pipe flush of `%s' failed (%s)."
msgstr "Leeren der Pipe '%s' gescheitert (%s)."
-#: io.c:1174
+#: io.c:1102
#, c-format
msgid "co-process flush of pipe to `%s' failed (%s)."
msgstr "Ko-Prozess: Leeren der Pipe zu '%s' gescheitert (%s)."
-#: io.c:1177
+#: io.c:1105
#, c-format
msgid "file flush of `%s' failed (%s)."
msgstr "Flush der Datei '%s' gescheitert (%s)."
-#: io.c:1292
+#: io.c:1219
#, fuzzy, c-format
msgid "local port %s invalid in `/inet'"
msgstr "Lokaler Port in '%s' ist ungültig."
-#: io.c:1309
+#: io.c:1236
#, c-format
msgid "remote host and port information (%s, %s) invalid"
msgstr ""
-#: io.c:1344
+#: io.c:1276
msgid "/inet/raw client not ready yet, sorry"
msgstr "/inet/raw Client noch nicht fertig."
-#: io.c:1347 io.c:1383
+#: io.c:1279 io.c:1320
msgid "only root may use `/inet/raw'."
msgstr "Nur root darf '/inet/raw' benutzen"
-#: io.c:1381
+#: io.c:1318
msgid "/inet/raw server not ready yet, sorry"
msgstr "'/inet/raw'-Server noch nicht fertig."
-#: io.c:1477
+#: io.c:1417
#, c-format
msgid "no (known) protocol supplied in special filename `%s'"
msgstr "Kein bekanntes Protokoll in Dateinamen '%s' angegeben."
-#: io.c:1491
+#: io.c:1431
#, c-format
msgid "special file name `%s' is incomplete"
msgstr "Dateiname '%s' ist unvollständig."
-#: io.c:1506
+#: io.c:1447
msgid "must supply a remote hostname to `/inet'"
msgstr "Sie müssen einen Rechnernamen in '/inet' angeben."
-#: io.c:1524
+#: io.c:1465
msgid "must supply a remote port to `/inet'"
msgstr "Sie müssen einen Port in '/inet' angeben."
-#: io.c:1570
+#: io.c:1511
msgid "TCP/IP communications are not supported"
msgstr "TCP/IP-Verbindungen sind nicht möglich."
-#: io.c:1758
+#: io.c:1698
#, c-format
msgid "could not open `%s', mode `%s'"
msgstr "Konnte '%s' nicht öffnen, Mode '%s'."
-#: io.c:1809
+#: io.c:1749
#, fuzzy, c-format
msgid "close of master pty failed (%s)"
msgstr "Schließen der Pipe gescheitert (%s)."
-#: io.c:1811 io.c:1963 io.c:2114
+#: io.c:1751 io.c:1918 io.c:2075
#, c-format
msgid "close of stdout in child failed (%s)"
msgstr "Schließen von stdout in Kindprozess gescheitert (%s)."
-#: io.c:1814
+#: io.c:1754
#, fuzzy, c-format
msgid "moving slave pty to stdout in child failed (dup: %s)"
msgstr "Verschieben der Pipe zu stdout in Kindprozess gescheitert (dup: %s)."
-#: io.c:1816 io.c:1968
+#: io.c:1756 io.c:1923
#, c-format
msgid "close of stdin in child failed (%s)"
msgstr "Schließen von stdin im Kindprozess gescheitert (%s)."
-#: io.c:1819
+#: io.c:1759
#, fuzzy, c-format
msgid "moving slave pty to stdin in child failed (dup: %s)"
msgstr "Verschieben der Pipe zu stdin in Kindprozess gescheitert (dup: %s)."
-#: io.c:1821 io.c:1840
+#: io.c:1761 io.c:1782
#, fuzzy, c-format
msgid "close of slave pty failed (%s)"
msgstr "Schließen der Pipe gescheitert (%s)."
-#: io.c:1914 io.c:1966 io.c:2095 io.c:2117
+#: io.c:1860 io.c:1921 io.c:2053 io.c:2078
#, c-format
msgid "moving pipe to stdout in child failed (dup: %s)"
msgstr "Verschieben der Pipe zu stdout in Kindprozess gescheitert (dup: %s)."
-#: io.c:1918 io.c:1971
+#: io.c:1867 io.c:1926
#, c-format
msgid "moving pipe to stdin in child failed (dup: %s)"
msgstr "Verschieben der Pipe zu stdin in Kindprozess gescheitert (dup: %s)."
-#: io.c:1935 io.c:2108
+#: io.c:1887 io.c:2068
msgid "restoring stdout in parent process failed\n"
msgstr ""
-#: io.c:1940
+#: io.c:1895
msgid "restoring stdin in parent process failed\n"
msgstr ""
-#: io.c:1974 io.c:2119 io.c:2130
+#: io.c:1929 io.c:2080 io.c:2094
#, c-format
msgid "close of pipe failed (%s)"
msgstr "Schließen der Pipe gescheitert (%s)."
-#: io.c:2019
+#: io.c:1974
msgid "`|&' not supported"
msgstr "'|&' nicht möglich."
-#: io.c:2085
+#: io.c:2040
#, c-format
msgid "cannot open pipe `%s' (%s)"
msgstr "Kann Pipe '%s' nicht öffnen (%s)."
-#: io.c:2126
+#: io.c:2088
#, c-format
msgid "cannot create child process for `%s' (fork: %s)"
msgstr "Kann Kindprozess für '%s' nicht erzeugen (fork: %s)."
-#: io.c:2518
+#: io.c:2577
#, c-format
msgid "data file `%s' is empty"
msgstr "Datei '%s' ist leer."
-#: io.c:2560 io.c:2568
+#: io.c:2618 io.c:2626
msgid "could not allocate more input memory"
msgstr ""
-#: io.c:3125
+#: io.c:3173
msgid "multicharacter value of `RS' is a gawk extension"
msgstr "Multicharacter-Wert von 'RS' ist eine gawk-Erweiterung."
-#: main.c:313
+#: main.c:311
msgid "out of memory"
-msgstr ""
+msgstr "Kein Speicher mehr."
-#: main.c:381
+#: main.c:388
msgid "`-m[fr]' option irrelevant in gawk"
msgstr "Option '-m[fr]' ist in gawk bedeutungslos."
-#: main.c:383
+#: main.c:390
msgid "-m option usage: `-m[fr] nnn'"
msgstr "Anwendung der Option -m: '-m[fr] nnn'"
-#: main.c:419
+#: main.c:426
#, fuzzy
msgid "empty argument to `-e/--source' ignored"
msgstr "Leeres Argument für '--source' ignoriert."
-#: main.c:485
+#: main.c:492
#, c-format
msgid "%s: option `-W %s' unrecognized, ignored\n"
msgstr "%s: Option '-W %s' unbekannt, ignoriert.\n"
-#: main.c:530
+#: main.c:545
#, c-format
msgid "%s: option requires an argument -- %c\n"
msgstr "%s Option erfordert ein Argument -- %c.\n"
-#: main.c:551
+#: main.c:566
msgid "environment variable `POSIXLY_CORRECT' set: turning on `--posix'"
msgstr ""
"Umgebungsvariable 'POSIXLY_CORRECT' ist gesetzt: '--posix' angeschaltet."
-#: main.c:557
+#: main.c:572
msgid "`--posix' overrides `--traditional'"
msgstr "'--posix' hat Vorrang vor '--traditional'"
-#: main.c:568
+#: main.c:583
msgid "`--posix'/`--traditional' overrides `--non-decimal-data'"
msgstr "'--posix' /'--traditional' hat Vorrang vor '--non-decimal-data'."
-#: main.c:572
+#: main.c:587
#, fuzzy, c-format
msgid "running %s setuid root may be a security problem"
msgstr "%s als setuid root auszuführen, kann zu Sicherheitsproblemen führen."
-#: main.c:577
+#: main.c:592
#, fuzzy
msgid "`--posix' overrides `--binary'"
msgstr "'--posix' hat Vorrang vor '--traditional'"
-#: main.c:622
+#: main.c:643
#, fuzzy, c-format
msgid "can't set binary mode on stdin (%s)"
msgstr "Kann Mode für stdin nicht setzen (%s)."
-#: main.c:625
+#: main.c:646
#, fuzzy, c-format
msgid "can't set binary mode on stdout (%s)"
msgstr "Kann Mode für stdout nicht setzen (%s)."
-#: main.c:627
+#: main.c:648
#, fuzzy, c-format
msgid "can't set binary mode on stderr (%s)"
msgstr "Kann Mode für stderr nicht setzen (%s)."
-#: main.c:668
+#: main.c:687
msgid "no program text at all!"
msgstr "Kein Programmtext."
-#: main.c:773
+#: main.c:762
#, c-format
msgid "Usage: %s [POSIX or GNU style options] -f progfile [--] file ...\n"
msgstr "Anwendung: %s [POSIX- oder GNU-Optionen] -f PROGRAM [--] Datei ...\n"
-#: main.c:775
+#: main.c:764
#, c-format
msgid "Usage: %s [POSIX or GNU style options] [--] %cprogram%c file ...\n"
msgstr "Anwendung: %s [POSIX- oder GNU-Optionen] -- %cPROGRAM%c Datei ...\n"
-#: main.c:780
+#: main.c:769
#, fuzzy
msgid "POSIX options:\t\tGNU long options: (standard)\n"
msgstr "POSIX-Optionen\t\tGNU-Optionen (lang):\n"
-#: main.c:781
+#: main.c:770
msgid "\t-f progfile\t\t--file=progfile\n"
msgstr "\t-f PROGRAM\t\t--file=PROGRAM\n"
-#: main.c:782
+#: main.c:771
msgid "\t-F fs\t\t\t--field-separator=fs\n"
msgstr "\t-F Feldtrenner\t\t\t--field-separator=Feldtrenner\n"
-#: main.c:783
+#: main.c:772
msgid "\t-v var=val\t\t--assign=var=val\n"
msgstr "\t-v var=Wert\t\t--assign=var=Wert\n"
-#: main.c:784
+#: main.c:773
#, fuzzy
-msgid "POSIX options:\t\tGNU long options: (extensions)\n"
+msgid "Short options:\t\tGNU long options: (extensions)\n"
msgstr "POSIX-Optionen\t\tGNU-Optionen (lang):\n"
-#: main.c:785
+#: main.c:774
msgid "\t-m[fr] val\n"
msgstr "\t-m[fr] Wert\n"
-#: main.c:786
+#: main.c:775
msgid "\t-b\t\t\t--characters-as-bytes\n"
msgstr ""
-#: main.c:787
-msgid "\t-c\t\t\t--compat, --traditional\n"
-msgstr ""
+#: main.c:776
+#, fuzzy
+msgid "\t-c\t\t\t--traditional\n"
+msgstr "\t-W traditional\t\t--traditional\n"
-#: main.c:788
+#: main.c:777
#, fuzzy
-msgid "\t-C\t\t\t--copyleft, --copyright\n"
+msgid "\t-C\t\t\t--copyright\n"
msgstr "\t-W copyright\t\t--copyright\n"
-#: main.c:789
+#: main.c:778
#, fuzzy
msgid "\t-d [file]\t\t--dump-variables[=file]\n"
msgstr "\t-W dump-variables[=Datei]\t--dump-variables[=Datei]\n"
-#: main.c:790
+#: main.c:779
#, fuzzy
msgid "\t-e 'program-text'\t--source='program-text'\n"
msgstr "\t-W source=Programmtext\t--source=Programmtext\n"
-#: main.c:791
+#: main.c:780
#, fuzzy
msgid "\t-E file\t\t\t--exec=file\n"
msgstr "\t-W profile[=Datei]\t--profile[=Datei]\n"
-#: main.c:792
+#: main.c:781
#, fuzzy
msgid "\t-g\t\t\t--gen-pot\n"
msgstr "\t-W gen-po\t\t--gen-po\n"
-#: main.c:793
+#: main.c:782
#, fuzzy
-msgid "\t-h\t\t\t--help, --usage\n"
+msgid "\t-h\t\t\t--help\n"
msgstr "\t-W help\t\t\t--help\n"
-#: main.c:794
+#: main.c:783
#, fuzzy
-msgid "\t-l [fatal]\t\t--lint[=fatal]\n"
+msgid "\t-L [fatal]\t\t--lint[=fatal]\n"
msgstr "\t-W lint[=fatal]\t\t--lint[=fatal]\n"
-#: main.c:795
-#, fuzzy
-msgid "\t-L\t\t\t--lint-old\n"
-msgstr "\t-W lint-old\t\t--lint-old\n"
-
-#: main.c:796
+#: main.c:784
#, fuzzy
msgid "\t-n\t\t\t--non-decimal-data\n"
msgstr "\t-W non-decimal-data\t--non-decimal-data\n"
-#: main.c:797
+#: main.c:785
msgid "\t-N\t\t\t--use-lc-numeric\n"
msgstr ""
-#: main.c:798
+#: main.c:786
msgid "\t-O\t\t\t--optimize\n"
msgstr ""
-#: main.c:799
+#: main.c:787
#, fuzzy
msgid "\t-p [file]\t\t--profile[=file]\n"
msgstr "\t-W profile[=Datei]\t--profile[=Datei]\n"
-#: main.c:800
+#: main.c:788
#, fuzzy
msgid "\t-P\t\t\t--posix\n"
msgstr "\t-W posix\t\t--posix\n"
-#: main.c:801
+#: main.c:789
#, fuzzy
msgid "\t-r\t\t\t--re-interval\n"
msgstr "\t-W re-interval\t\t--re-interval\n"
-#: main.c:802
+#: main.c:791
#, fuzzy
+msgid "\t-R file\t\t\t--command=file\n"
+msgstr "\t-W profile[=Datei]\t--profile[=Datei]\n"
+
+#: main.c:792
msgid "\t-S\t\t\t--sandbox\n"
-msgstr "\t-W posix\t\t--posix\n"
+msgstr ""
+
+#: main.c:793
+#, fuzzy
+msgid "\t-t\t\t\t--lint-old\n"
+msgstr "\t-W lint-old\t\t--lint-old\n"
-#: main.c:803
+#: main.c:794
#, fuzzy
msgid "\t-V\t\t\t--version\n"
msgstr "\t-W version\t\t--version\n"
-#: main.c:805
+#: main.c:796
msgid "\t-W nostalgia\t\t--nostalgia\n"
msgstr "\t-W nostalgia\t\t--nostalgia\n"
-#: main.c:808
-msgid "\t-W parsedebug\t\t--parsedebug\n"
+#: main.c:799
+#, fuzzy
+msgid "\t-Y\t\t--parsedebug\n"
msgstr "\t-W parsedebug\t\t--parsedebug\n"
#. TRANSLATORS: --help output 5 (end)
@@ -1772,7 +1709,7 @@ msgstr "\t-W parsedebug\t\t--parsedebug\n"
#. for this application. Please add _another line_ with the
#. address for translation bugs.
#. no-wrap
-#: main.c:817
+#: main.c:808
#, fuzzy
msgid ""
"\n"
@@ -1783,21 +1720,21 @@ msgstr ""
"den Sie im Kapitel 'Reporting Problems and Bugs' in der \n"
"gedruckten Version finden.\n"
-#: main.c:821
+#: main.c:812
msgid ""
"gawk is a pattern scanning and processing language.\n"
"By default it reads standard input and writes standard output.\n"
"\n"
msgstr ""
-#: main.c:825
+#: main.c:816
msgid ""
"Examples:\n"
"\tgawk '{ sum += $1 }; END { print sum }' file\n"
"\tgawk -F: '{ print $1 }' /etc/passwd\n"
msgstr ""
-#: main.c:845
+#: main.c:836
#, fuzzy, c-format
msgid ""
"Copyright (C) 1989, 1991-%d Free Software Foundation.\n"
@@ -1813,11 +1750,11 @@ msgstr ""
"Dieses Programm ist Freie Software. Sie können es unter den Bedingungen\n"
"der von der Free Software Foundation veröffentlichten GNU \n"
"General Public License weitergeben und/oder ändern.\n"
-"Es gilt Version 3 dieser Lizenz oder (nach Ihrer Wahl) irgendeine\n"
+"Es gilt Version 2 dieser Lizenz oder (nach Ihrer Wahl) irgendeine\n"
"spätere Version.\n"
"\n"
-#: main.c:853
+#: main.c:844
msgid ""
"This program is distributed in the hope that it will be useful,\n"
"but WITHOUT ANY WARRANTY; without even the implied warranty of\n"
@@ -1831,7 +1768,7 @@ msgstr ""
"GNU General Public License for more details.\n"
"\n"
-#: main.c:864
+#: main.c:855
#, fuzzy
msgid ""
"You should have received a copy of the GNU General Public License\n"
@@ -1839,193 +1776,159 @@ msgid ""
msgstr ""
"Sie sollten eine Kopie der GNU General Publice License zusammen mit\n"
"diesem Programm erhalten haben. Wenn nicht, schreiben Sie an die Free \n"
-"Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02111-"
+"Software Foundation, Inc., 59 Temple Place - Suite 330, Boston MA 02111-"
"1307, USA.\n"
-#: main.c:899
+#: main.c:890
msgid "-Ft does not set FS to tab in POSIX awk"
msgstr "-Ft setzt FS im POSIX-awk nicht auf Tab."
-#: main.c:1116
+#: main.c:1122
#, c-format
msgid "unknown value for field spec: %d\n"
msgstr ""
-#: main.c:1176
+#: main.c:1182
#, c-format
msgid ""
"%s: `%s' argument to `-v' not in `var=value' form\n"
"\n"
msgstr ""
-#: main.c:1196
+#: main.c:1202
#, c-format
msgid "`%s' is not a legal variable name"
msgstr ""
-#: main.c:1199
+#: main.c:1205
#, c-format
msgid "`%s' is not a variable name, looking for file `%s=%s'"
msgstr ""
-#: main.c:1238
+#: main.c:1258
msgid "floating point exception"
msgstr "Floating point exception"
-#: main.c:1245
+#: main.c:1265
msgid "fatal error: internal error"
msgstr "Fataler Fehler: interner Fehler"
-#: main.c:1260
+#: main.c:1280
#, fuzzy
msgid "fatal error: internal error: segfault"
msgstr "Fataler Fehler: interner Fehler"
-#: main.c:1272
+#: main.c:1292
#, fuzzy
msgid "fatal error: internal error: stack overflow"
msgstr "Fataler Fehler: interner Fehler"
-#: main.c:1322
+#: main.c:1342
#, c-format
msgid "no pre-opened fd %d"
msgstr "Kein geöffneter Dateideskriptor %d"
-#: main.c:1329
+#: main.c:1349
#, c-format
msgid "could not pre-open /dev/null for fd %d"
msgstr "Konnte /dev/null nicht für Dateideskriptor %d öffnen."
-#: main.c:1352 main.c:1361
+#: main.c:1372 main.c:1381
#, c-format
msgid "could not find groups: %s"
msgstr "Konnte Gruppen nicht finden: %s"
-#: msg.c:54
+#: msg.c:62
#, c-format
msgid "cmd. line:"
msgstr "Kommandozeile:"
-#: msg.c:120
+#: msg.c:97
msgid "warning: "
msgstr "Warnung: "
-#: msg.c:142
+#: msg.c:106
msgid "error: "
msgstr "Fehler: "
-#: msg.c:178
+#: msg.c:129
msgid "fatal: "
msgstr "Fatal: "
-#: node.c:63 node.c:78 node.c:105 node.c:121 node.c:151
-msgid "can't convert string to float"
-msgstr "Kann String nicht in Gleitkommazahl konvertieren."
-
-#: node.c:465
+#: node.c:401
msgid "backslash at end of string"
msgstr "Backslash am String-Ende."
-#: node.c:609
+#: node.c:502
#, fuzzy, c-format
msgid "old awk does not support the `\\%c' escape sequence"
msgstr "Das alte awk erlaubt den Operator '**' nicht."
-#: node.c:660
+#: node.c:553
msgid "POSIX does not allow `\\x' escapes"
msgstr "POSIX erlabut keine '\\x'-Escapes."
-#: node.c:666
+#: node.c:559
msgid "no hex digits in `\\x' escape sequence"
msgstr "Keine Hex-Ziffern in '\\x'-Escape."
-#: node.c:688
+#: node.c:581
#, c-format
msgid ""
"hex escape \\x%.*s of %d characters probably not interpreted the way you "
"expect"
msgstr ""
-#: node.c:703
+#: node.c:596
#, c-format
msgid "escape sequence `\\%c' treated as plain `%c'"
msgstr "Escape-Sequenz '\\%c' als '%c' behandelt."
+#: node.c:737
+msgid ""
+"Invalid multibyte data detected. There may be a mismatch between your data "
+"and your locale."
+msgstr ""
+
#: posix/gawkmisc.c:172
#, fuzzy, c-format
msgid "%s %s `%s': could not set close-on-exec: (fcntl: %s)"
msgstr "%s %s '%s': Konnte close-on-exec nicht setzen: %s"
-#: profile.c:94
+#: profile.c:83
#, c-format
msgid "could not open `%s' for writing: %s"
msgstr "Konnte '%s' nicht zum Schreiben öffnen: %s"
-#: profile.c:457
+#: profile.c:203
#, fuzzy, c-format
-msgid "internal error: %s with null vname"
-msgstr "Interner Fehler: Node_var with null vname."
-
-#: profile.c:522
-msgid "# treated internally as `delete'"
-msgstr ""
-
-#: profile.c:1076
-#, c-format
-msgid "# this is a dynamically loaded extension function"
-msgstr ""
-
-#: profile.c:1109
-#, c-format
-msgid "\t# gawk profile, created %s\n"
-msgstr "\t# gawk-Profil, erzeugt %s\n"
-
-#: profile.c:1112
-#, c-format
msgid ""
-"\t# BEGIN block(s)\n"
+"\t# %s block(s)\n"
"\n"
msgstr ""
-"\t# BEGIN block(s)\n"
+"\t# END block(s)\n"
"\n"
-#: profile.c:1122
+#: profile.c:208
#, fuzzy, c-format
msgid ""
-"\t# BEGINFILE block(s)\n"
-"\n"
-msgstr ""
-"\t# BEGIN block(s)\n"
-"\n"
-
-#: profile.c:1132
-#, c-format
-msgid ""
-"\t# Rule(s)\n"
+"\t# %s(s)\n"
"\n"
msgstr ""
"\t# Rule(s)\n"
"\n"
-#: profile.c:1138
+#: profile.c:278
#, fuzzy, c-format
-msgid ""
-"\t# ENDFILE block(s)\n"
-"\n"
-msgstr ""
-"\t# END block(s)\n"
-"\n"
+msgid "internal error: %s with null vname"
+msgstr "Interner Fehler: Node_var with null vname."
-#: profile.c:1148
+#: profile.c:945
#, c-format
-msgid ""
-"\t# END block(s)\n"
-"\n"
-msgstr ""
-"\t# END block(s)\n"
-"\n"
+msgid "\t# gawk profile, created %s\n"
+msgstr "\t# gawk-Profil, erzeugt %s\n"
-#: profile.c:1168
+#: profile.c:1328
#, c-format
msgid ""
"\n"
@@ -2034,17 +1937,12 @@ msgstr ""
"\n"
"\t# Functionen, alphabetisch sortiert\n"
-#: profile.c:1431
+#: profile.c:1367
#, c-format
-msgid "unexpected type %s in prec_level"
-msgstr "Unerwarteter Typ %s in prec_level."
-
-#: profile.c:1557
-#, fuzzy, c-format
-msgid "Unknown node type %s in pp_var"
-msgstr "Unbekannter Knotentyp %d"
+msgid "redir2str: unknown redirection type %d"
+msgstr ""
-#: re.c:537
+#: re.c:559
#, c-format
msgid "regexp component `%.*s' should probably be `[%.*s]'"
msgstr ""
@@ -2117,19 +2015,40 @@ msgstr "Regulärer Ausdruck zu groß."
msgid "Unmatched ) or \\)"
msgstr ") oder \\) nicht geöffnet"
-#: regcomp.c:699
+#: regcomp.c:701
msgid "No previous regular expression"
msgstr "Kein vorangehender Regulärer Ausdruck."
-#~ msgid "%s: illegal option -- %c\n"
-#~ msgstr "%s: Illegale Option -- %c.\n"
+#~ msgid "call of `length' without parentheses is deprecated by POSIX"
+#~ msgstr "Aufruf von 'length' ohne Klammern ist in POSIX-Mode veraltet."
+
+#, fuzzy
+#~ msgid "reference to uninitialized field `$%s'"
+#~ msgstr "Referenz auf die nicht-initialisierte Variable '%s'."
+
+#~ msgid "can't convert string to float"
+#~ msgstr "Kann String nicht in Gleitkommazahl konvertieren."
+
+#~ msgid "`continue' outside a loop is not portable"
+#~ msgstr "'continue' außerhalb einer Schleife ist nicht portabel."
+
+#~ msgid "`break' outside a loop is not portable"
+#~ msgstr "'break' außerhalb einer Schleife ist nicht portabel."
+
+#~ msgid "`nextfile' cannot be called from a BEGIN rule"
+#~ msgstr "'nextfile' kann nicht in einer BEGIN-Regel benutzt werden."
+
+#~ msgid "`next' cannot be called from a BEGIN rule"
+#~ msgstr "'next' kann nicht in einer BEGIN-Regel benutzt werden."
#~ msgid "file `%s' is a directory"
#~ msgstr "Datei '%s' ist ein Verzeichnis."
-#~ msgid "can't open two way socket `%s' for input/output (%s)"
-#~ msgstr ""
-#~ "Kann bidirektionalen Socket '%s' nicht für Ein-/Ausgabe öffnen (%s)."
+#~ msgid "use `PROCINFO[\"%s\"]' instead of `%s'"
+#~ msgstr "Benutzen Sie 'PROCINFO[\"%s\"]' statt '%s'"
+
+#~ msgid "use `PROCINFO[...]' instead of `/dev/user'"
+#~ msgstr "Benutzen Sie 'PROCINFO[...] statt '/dev/user'."
#~ msgid "\t-W compat\t\t--compat\n"
#~ msgstr "\t-W compat\t\t--compat\n"
@@ -2137,74 +2056,114 @@ msgstr "Kein vorangehender Regulärer Ausdruck."
#~ msgid "\t-W copyleft\t\t--copyleft\n"
#~ msgstr "\t-W copyleft\t\t--copyleft\n"
-#~ msgid "\t-W traditional\t\t--traditional\n"
-#~ msgstr "\t-W traditional\t\t--traditional\n"
-
#~ msgid "\t-W usage\t\t--usage\n"
#~ msgstr "\t-W usage\t\t--usage\n"
-#, fuzzy
-#~ msgid "seek: invalid arguments"
-#~ msgstr "printf: Keine Argumente"
+#~ msgid ""
+#~ "\t# BEGIN block(s)\n"
+#~ "\n"
+#~ msgstr ""
+#~ "\t# BEGIN block(s)\n"
+#~ "\n"
-#, fuzzy
-#~ msgid "seek: `%.*s' is not an open file, pipe, or co-process"
-#~ msgstr "close: '%.*s' ist keine offene Datei, Pipe oder Ko-Prozess."
+#~ msgid "`$' is not permitted in awk formats"
+#~ msgstr "»$« ist in awk-Formaten nicht zulässig."
+
+#~ msgid "arg count with `$' must be > 0"
+#~ msgstr "Argumentnummer bei »$« muss > 0 sein."
#, fuzzy
-#~ msgid "seek: `%.*s' is not an input file, pipe, or co-process"
-#~ msgstr "close: '%.*s' ist keine offene Datei, Pipe oder Ko-Prozess."
+#~ msgid "arg count %ld greater than total number of supplied arguments"
+#~ msgstr "Argumentnummer %d ist größer als Anzahl angegebener Argumente."
-#~ msgid "use `PROCINFO[\"%s\"]' instead of `%s'"
-#~ msgstr "Benutzen Sie 'PROCINFO[\"%s\"]' statt '%s'"
+#~ msgid "`$' not permitted after period in format"
+#~ msgstr "»$« nach Punkt in Formatangabe nicht zulässig."
-#~ msgid "use `PROCINFO[...]' instead of `/dev/user'"
-#~ msgstr "Benutzen Sie 'PROCINFO[...] statt '/dev/user'."
+#~ msgid "no `$' supplied for positional field width or precision"
+#~ msgstr "»$« fehlt in positionsabhängiger Feldbreite oder Genauigkeit."
-#~ msgid "function %s called\n"
-#~ msgstr "Funktion %s aufgerufen\n"
+#
+#~ msgid "`l' is meaningless in awk formats; ignored"
+#~ msgstr "»l« ist in awk-Formaten bedeutungslos, ignoriert."
-#~ msgid "field %d in FIELDWIDTHS, must be > 0"
-#~ msgstr "Feld %d in FIELDWIDTHS muss > 0 sein."
+#~ msgid "`l' is not permitted in POSIX awk formats"
+#~ msgstr "»l« in POSIX-awk-Formaten nicht zulässig."
-#, fuzzy
-#~ msgid "or used as a variable or an array"
-#~ msgstr "Kann Funktion '%s' nicht als Variable oder Array verwenden."
+#~ msgid "`L' is meaningless in awk formats; ignored"
+#~ msgstr "»L« ist in awk-Formaten bedeutungslos, ignoriert."
-#, fuzzy
-#~ msgid "substr: length %g is < 0"
-#~ msgstr "substr: Länge %g ist kleiner oder gleich 0."
+#~ msgid "`L' is not permitted in POSIX awk formats"
+#~ msgstr "»L« in POSIX-awk-Formaten nicht zulässig."
-#~ msgid "delete: illegal use of variable `%s' as array"
-#~ msgstr "delete: Benutzung der Variablen »%s« als Array ist nicht zulässig."
+#~ msgid "`h' is meaningless in awk formats; ignored"
+#~ msgstr "»h« ist in awk-Formaten bedeutungslos, ignoriert."
-#, fuzzy
-#~ msgid "%s: gvar_ref to %s\n"
-#~ msgstr "%s: Array-Referenz auf %s\n"
+#~ msgid "`h' is not permitted in POSIX awk formats"
+#~ msgstr "»h« in POSIX-awk-Formaten nicht zulässig.<"
+
+#~ msgid "not enough arguments to satisfy format string"
+#~ msgstr "Nicht genügend Argumente für Formatangabe."
-#~ msgid "asort: first argument is not an array"
-#~ msgstr "asort: Erstes Argument ist kein Array."
+#~ msgid "^ ran out for this one"
+#~ msgstr "^ ran out for this one"
-#~ msgid "asort: second argument is not an array"
-#~ msgstr "asort: Zweites Argument ist kein array."
+#~ msgid "[s]printf: format specifier does not have control letter"
+#~ msgstr "[s]printf: Format-Specifier hat keinen Controlcode."
+
+#~ msgid "too many arguments supplied for format string"
+#~ msgstr "Zu viele Argumente für Formatstring."
#, fuzzy
+#~ msgid "attempt to use array parameter `%s' in a scalar context"
+#~ msgstr "Versuch, das Array '%s' in Skalarkontext zu verwenden."
+
+#~ msgid "can't open two way socket `%s' for input/output (%s)"
+#~ msgstr ""
+#~ "Kann bidirektionalen Socket '%s' nicht für Ein-/Ausgabe öffnen (%s)."
+
+#~ msgid "%s: illegal option -- %c\n"
+#~ msgstr "%s: Illegale Option -- %c.\n"
+
#~ msgid ""
-#~ "attempt to use array parameter `%s' that was passed from global scalar `%"
-#~ "s'"
-#~ msgstr "Versuch den skalaren Parameter '%s' als Array zu benutzen."
+#~ "concatenation: side effects in one expression have changed the length of "
+#~ "another!"
+#~ msgstr ""
+#~ "Konkatenierung: Seiteneffekte in einem Ausdruck haben die Länge des "
+#~ "anderen\n"
+#~ "geändert!"
-#~ msgid "internal error: Node_var_array with null vname"
-#~ msgstr "Interner Fehler: Node_var_array with null vname."
+#~ msgid "illegal type (%s) in tree_eval"
+#~ msgstr "Illegaler Typ (%s) in tree_eval"
-#~ msgid "BEGIN blocks must have an action part"
-#~ msgstr "BEGIN-Blöcke müssen einen Aktionsteil haben."
+#~ msgid "\t# -- main --\n"
+#~ msgstr "\t# -- main --\n"
-#~ msgid "`nextfile' used in BEGIN or END action"
-#~ msgstr "'nextfile' in BEGIN- oder END-Aktion benutzt."
+#~ msgid "invalid tree type %s in redirect()"
+#~ msgstr "Ungültiger Tree-Typ %s in redirect()."
-#~ msgid "gsub third parameter is not a changeable object"
-#~ msgstr "Der dritte Parameter von gsub ist ein unveränderliches Objekt."
+#~ msgid "unexpected type %s in prec_level"
+#~ msgstr "Unerwarteter Typ %s in prec_level."
+
+#, fuzzy
+#~ msgid "Unknown node type %s in pp_var"
+#~ msgstr "Unbekannter Knotentyp %d"
+
+#~ msgid "delete: illegal use of variable `%s' as array"
+#~ msgstr "delete: Benutzung der Variablen »%s« als Array ist nicht zulässig."
+
+#~ msgid ""
+#~ "\n"
+#~ "To report bugs, see node `Bugs' in `gawk.info', which is\n"
+#~ msgstr ""
+#~ "\n"
+#~ "Um Fehler zu melden, lesen Sie bitte den Abschnitt 'Bugs' in "
+#~ "'gawk_info',\n"
+
+#~ msgid "invalid syntax in name `%s' for variable assignment"
+#~ msgstr "Ungültige Syntax im Namen '%s' für Variablenzuweisung."
+
+#~ msgid "internal error: Node_var_array with null vname"
+#~ msgstr "Interner Fehler: Node_var_array with null vname."
#~ msgid "or used in other expression context"
#~ msgstr "or in anderem Kontext benutzt"
@@ -2212,8 +2171,11 @@ msgstr "Kein vorangehender Regulärer Ausdruck."
#~ msgid "`%s' is a function, assignment is not allowed"
#~ msgstr "'%s' ist eine Funktion, Zuweisungen sind nicht erlaubt."
-#~ msgid "internal error: file `%s', line %d\n"
-#~ msgstr "Interner Fehler: Datei '%s', Zeile %d\n"
+#~ msgid "BEGIN blocks must have an action part"
+#~ msgstr "BEGIN-Blöcke müssen einen Aktionsteil haben."
+
+#~ msgid "`nextfile' used in BEGIN or END action"
+#~ msgstr "'nextfile' in BEGIN- oder END-Aktion benutzt."
#~ msgid "non-redirected `getline' undefined inside BEGIN or END action"
#~ msgstr ""
@@ -2223,6 +2185,9 @@ msgstr "Kein vorangehender Regulärer Ausdruck."
#~ msgid "fptr %x not in tokentab\n"
#~ msgstr "fptr %x nicht in tokentab\n"
+#~ msgid "gsub third parameter is not a changeable object"
+#~ msgstr "Der dritte Parameter von gsub ist ein unveränderliches Objekt."
+
#~ msgid "Unfinished \\ escape"
#~ msgstr "Nicht-beendetes \\\\-Escape."
@@ -2244,11 +2209,17 @@ msgstr "Kein vorangehender Regulärer Ausdruck."
#~ msgid "Unbalanced )"
#~ msgstr ") wird nicht geöffnet."
-#~ msgid "remote port invalid in `%s'"
-#~ msgstr "Port-Angabe in '%s' ist ungültig."
+#~ msgid "field %d in FIELDWIDTHS, must be > 0"
+#~ msgstr "Feld %d in FIELDWIDTHS muss > 0 sein."
+
+#~ msgid "function %s called\n"
+#~ msgstr "Funktion %s aufgerufen\n"
#~ msgid "pipe from `%s': could not set close-on-exec (fcntl: %s)"
#~ msgstr "Pipe von '%s': Konnte close-on-exec nicht setzen (fcntl: %s)."
#~ msgid "pipe to `%s': could not set close-on-exec (fcntl: %s)"
#~ msgstr "Pipe zu '%s': Konnte close-on-exec nicht setzen (fcntl: %s)."
+
+#~ msgid "internal error: file `%s', line %d\n"
+#~ msgstr "Interner Fehler: Datei '%s', Zeile %d\n"
diff --git a/po/es.gmo b/po/es.gmo
index b33b7cc5..5a31ba24 100644
--- a/po/es.gmo
+++ b/po/es.gmo
Binary files differ
diff --git a/po/es.po b/po/es.po
index 90fe558f..f66c8b2e 100644
--- a/po/es.po
+++ b/po/es.po
@@ -1,426 +1,507 @@
-# Mensajes en español para gawk-3.1.5f.
-# Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
-# Cristian Othón Martínez Vera <cfuga@itam.mx>, 2001, 2002, 2003, 2004, 2005, 2006, 2007.
+# Mensajes en español para gawk-3.1.6d.
+# Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
+# This file is distributed under the same license as the gawk package.
+# Cristian Othón Martínez Vera <cfuga@itam.mx>, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009.
#
msgid ""
msgstr ""
-"Project-Id-Version: gawk 3.1.5f\n"
+"Project-Id-Version: gawk 3.1.6d\n"
"Report-Msgid-Bugs-To: arnold@skeeve.com\n"
-"POT-Creation-Date: 2010-11-12 12:20+0200\n"
-"PO-Revision-Date: 2007-07-20 01:10-0500\n"
+"POT-Creation-Date: 2010-11-17 08:48+0200\n"
+"PO-Revision-Date: 2009-06-24 09:29-0500\n"
"Last-Translator: Cristian Othón Martínez Vera <cfuga@itam.mx>\n"
"Language-Team: Spanish <es@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=ISO-8859-1\n"
"Content-Transfer-Encoding: 8bit\n"
-#: array.c:112
+#: array.c:103
+#, c-format
+msgid "from %s"
+msgstr "desde %s"
+
+#: array.c:267
+#, fuzzy
+msgid "attempt to use a scalar value as array"
+msgstr "se intentó usar el dato escalar `%s' como una matriz"
+
+#: array.c:270
#, c-format
msgid "attempt to use function `%s' as an array"
msgstr "se intentó usar la función `%s' como una matriz"
-#: array.c:115
+#: array.c:273
#, c-format
msgid "attempt to use scalar parameter `%s' as an array"
msgstr "se intentó usar el parámetro escalar `%s como una matriz'"
-#: array.c:118
+#: array.c:276
#, c-format
msgid "attempt to use scalar `%s' as array"
msgstr "se intentó usar el dato escalar `%s' como una matriz"
-#: array.c:156
+#: array.c:321 array.c:648 eval.c:1075 eval.c:1079 eval.c:1581 eval.c:1649
+#: eval.c:1928
#, c-format
-msgid "from %s"
-msgstr "desde %s"
+msgid "attempt to use array `%s' in a scalar context"
+msgstr "se intentó usar la matriz `%s' en un contexto escalar"
-#: array.c:513
-#, c-format
+#: array.c:570
+#, fuzzy, c-format
msgid "reference to uninitialized element `%s[\"%.*s\"]'"
-msgstr "referencia al elemento sin inicializar `%s[\"%.*s\"]'"
+msgstr "referencia al elemento sin inicializar `%s[\"%s\"]'"
-#: array.c:519
+#: array.c:576
#, c-format
msgid "subscript of array `%s' is null string"
msgstr "el subíndice de la matriz `%s' es la cadena nula"
-#: array.c:623
+#: array.c:684
#, c-format
msgid "delete: index `%s' not in array `%s'"
msgstr "delete: el índice `%s' no está en la matriz `%s'"
-#: array.c:792
+#: array.c:705
+#, fuzzy, c-format
+msgid "attempt to use scalar `%s[\"%.*s\"]' as an array"
+msgstr "se intentó usar el dato escalar `%s' como una matriz"
+
+#: array.c:868
#, c-format
msgid "%s: empty (null)\n"
msgstr "%s: vacío (nulo)\n"
-#: array.c:797
+#: array.c:873
#, c-format
msgid "%s: empty (zero)\n"
msgstr "%s: vacío (cero)\n"
-#: array.c:801
+#: array.c:877
#, c-format
msgid "%s: table_size = %d, array_size = %d\n"
msgstr "%s: tamaño_tabla = %d, tamaño_matriz = %d\n"
-#: array.c:830
+#: array.c:912
#, c-format
msgid "%s: is parameter\n"
msgstr "%s: es un parámetro\n"
-#: array.c:835
+#: array.c:916
#, c-format
msgid "%s: array_ref to %s\n"
msgstr "%s: array_ref a %s\n"
-#: awkgram.y:224 awkgram.y:227
+#: array.c:921
+#, fuzzy
+msgid "adump: argument not an array"
+msgstr "asort: el primer argumento no es una matriz"
+
+#: array.c:1139
+#, fuzzy
+msgid "attempt to use array in a scalar context"
+msgstr "se intentó usar la matriz `%s' en un contexto escalar"
+
+#: array.c:1236
+#, fuzzy
+msgid "asort: second argument not an array"
+msgstr "asort: el segundo argumento no es una matriz"
+
+#: array.c:1237
+#, fuzzy
+msgid "asorti: second argument not an array"
+msgstr "asort: el segundo argumento no es una matriz"
+
+#: array.c:1245
+#, fuzzy
+msgid "asort: first argument not an array"
+msgstr "asort: el primer argumento no es una matriz"
+
+#: array.c:1246
+#, fuzzy
+msgid "asorti: first argument not an array"
+msgstr "asort: el primer argumento no es una matriz"
+
+#: awkgram.y:246
#, c-format
msgid "%s blocks must have an action part"
msgstr "Los bloques %s deben tener una parte de acción"
-#: awkgram.y:230
+#: awkgram.y:249
msgid "each rule must have a pattern or an action part"
msgstr "cada regla debe tener un patrón o una parte de acción"
-#: awkgram.y:266 awkgram.y:275
+#: awkgram.y:320 awkgram.y:330
msgid "old awk does not support multiple `BEGIN' or `END' rules"
msgstr "el awk antiguo no admite múltiples reglas `BEGIN' o `END'"
-#: awkgram.y:304
+#: awkgram.y:367
#, c-format
msgid "`%s' is a built-in function, it cannot be redefined"
msgstr "`%s' es una función interna, no se puede redefinir"
-#: awkgram.y:350
+#: awkgram.y:427
msgid "regexp constant `//' looks like a C++ comment, but is not"
msgstr ""
"la constante de expresión regular `//' parece un comentario de C++, pero no "
"lo es"
-#: awkgram.y:353
+#: awkgram.y:430
#, c-format
msgid "regexp constant `/%s/' looks like a C comment, but is not"
msgstr ""
"la constante de expresión regular `/%s/' parece un comentario de C, pero no "
"lo es"
-#: awkgram.y:380 awkgram.y:692
-msgid "statement may have no effect"
-msgstr "la sentencia puede no tener efecto"
+#: awkgram.y:735
+#, fuzzy
+msgid "`break' is not allowed outside a loop or switch"
+msgstr "no se permite `break' fuera de un ciclo"
-#: awkgram.y:477 awkgram.y:480 awkgram.y:504 awkgram.y:511 awkgram.y:518
-#, c-format
-msgid "`%s' used in %s action"
+#: awkgram.y:744
+#, fuzzy
+msgid "`continue' is not allowed outside a loop"
+msgstr "no se permite `continue' fuera de un ciclo"
+
+#: awkgram.y:753
+#, fuzzy, c-format
+msgid "`next' used in %s action"
msgstr "se usó `%s' en la acción %s"
-#: awkgram.y:495 awkgram.y:499
+#: awkgram.y:767 awkgram.y:771
msgid "`nextfile' is a gawk extension"
msgstr "`nextfile' es una extensión de gawk"
-#: awkgram.y:528
+#: awkgram.y:775
+#, fuzzy, c-format
+msgid "`nextfile' used in %s action"
+msgstr "se usó `%s' en la acción %s"
+
+#: awkgram.y:799
msgid "`return' used outside function context"
msgstr "se usó `return' fuera del contexto de la función"
-#: awkgram.y:570
+#: awkgram.y:859
msgid "plain `print' in BEGIN or END rule should probably be `print \"\"'"
msgstr ""
"el `print' simple en la regla BEGIN o END probablemente debe ser `print \"\"'"
-#: awkgram.y:586 awkgram.y:594
+#: awkgram.y:927 awkgram.y:935
msgid "`delete array' is a gawk extension"
msgstr "`delete array' es una extensión de gawk"
-#: awkgram.y:608 awkgram.y:616
+#: awkgram.y:955 awkgram.y:963
msgid "`delete(array)' is a non-portable tawk extension"
msgstr "`delete(array)' es una extensión de gawk que no es transportable"
-#: awkgram.y:660
+#: awkgram.y:1004
#, c-format
msgid "duplicate case values in switch body: %s"
msgstr "valores case duplicados en el cuerpo de un switch: %s"
-#: awkgram.y:670
-msgid "Duplicate `default' detected in switch body"
+#: awkgram.y:1014
+#, fuzzy
+msgid "duplicate `default' detected in switch body"
msgstr "Se detectó un `default' duplicado en el cuerpo de un switch"
-#: awkgram.y:759
+#: awkgram.y:1151
msgid "multistage two-way pipelines don't work"
msgstr "las líneas de trabajo de dos vías multiestado no funcionan"
-#: awkgram.y:850
+#: awkgram.y:1253
msgid "regular expression on right of assignment"
msgstr "expresión regular del lado derecho de una asignación"
-#: awkgram.y:860
+#: awkgram.y:1263
msgid "regular expression on left of `~' or `!~' operator"
msgstr "expresión regular a la izquierda del operador `~' o `!~'"
-#: awkgram.y:866 awkgram.y:954
+#: awkgram.y:1278 awkgram.y:1423
msgid "old awk does not support the keyword `in' except after `for'"
msgstr ""
"el awk antiguo no admite la palabra clave `in' excepto después de `for'"
-#: awkgram.y:872
+#: awkgram.y:1287
msgid "regular expression on right of comparison"
msgstr "expresión regular a la derecha de una comparación"
-#: awkgram.y:936
+#: awkgram.y:1399
#, fuzzy, c-format
-msgid "`getline var' invalid inside %s rule"
+msgid "`getline var' invalid inside `%s' rule"
msgstr "puerto remoto inválido en `%s'"
-#: awkgram.y:939
-#, c-format
-msgid "`getline' invalid inside %s rule"
-msgstr ""
+#: awkgram.y:1401
+#, fuzzy, c-format
+msgid "`getline' invalid inside `%s' rule"
+msgstr "puerto remoto inválido en `%s'"
-#: awkgram.y:944
+#: awkgram.y:1407
msgid "non-redirected `getline' undefined inside END action"
msgstr "`getline' no redirigido indefinido dentro de la acción de END"
-#: awkgram.y:955
+#: awkgram.y:1424
msgid "old awk does not support multidimensional arrays"
msgstr "el awk antiguo no admite matrices multidimensionales"
-#: awkgram.y:1001
+#: awkgram.y:1528
msgid "call of `length' without parentheses is not portable"
msgstr "la llamada de `length' sin paréntesis no es transportable"
-#: awkgram.y:1006
-msgid "call of `length' without parentheses is deprecated by POSIX"
-msgstr "la llamada de `length' sin paréntesis está obsoleta por POSIX"
-
-#: awkgram.y:1051
+#: awkgram.y:1591
#, fuzzy
msgid "indirect function calls are a gawk extension"
-msgstr "`extension' es una extensión de gawk"
+msgstr "`nextfile' es una extensión de gawk"
-#: awkgram.y:1084
-msgid "use of non-array as array"
-msgstr "uso de una matriz que no es matriz"
+#: awkgram.y:1605
+#, fuzzy, c-format
+msgid "can not use special variable `%s' for indirect function call"
+msgstr ""
+"función `%s': no se puede usar la variable especial `%s' como un parámetro "
+"de función"
-#: awkgram.y:1087
+#: awkgram.y:1682
msgid "invalid subscript expression"
msgstr "expresión de subíndice inválida"
-#: awkgram.y:1329
+#: awkgram.y:1722
+msgid "use of non-array as array"
+msgstr "uso de una matriz que no es matriz"
+
+#: awkgram.y:1993
msgid "unexpected newline or end of string"
msgstr "nueva línea o fin de la cadena inesperados"
-#: awkgram.y:1446
-msgid "empty program text on command line"
-msgstr "texto de programa vacío en la linea de comando"
-
-#: awkgram.y:1502
+#: awkgram.y:2248 awkgram.y:2296 awkgram.y:2470
#, c-format
msgid "can't open source file `%s' for reading (%s)"
msgstr "no se puede abrir el fichero fuente `%s' para lectura (%s)"
-#: awkgram.y:1600
+#: awkgram.y:2249 awkgram.y:2297 builtin.c:122
+msgid "reason unknown"
+msgstr "razón desconocida"
+
+#: awkgram.y:2257
+#, fuzzy, c-format
+msgid "already included source file `%s'"
+msgstr "no se puede leer el fichero fuente `%s' (%s)"
+
+#: awkgram.y:2281
+#, fuzzy
+msgid "@include is a gawk extension"
+msgstr "`nextfile' es una extensión de gawk"
+
+#: awkgram.y:2288
+msgid "empty filename after @include"
+msgstr ""
+
+#: awkgram.y:2422
+msgid "empty program text on command line"
+msgstr "texto de programa vacío en la linea de comando"
+
+#: awkgram.y:2537
#, c-format
msgid "can't read sourcefile `%s' (%s)"
msgstr "no se puede leer el fichero fuente `%s' (%s)"
-#: awkgram.y:1608
+#: awkgram.y:2547
#, c-format
msgid "source file `%s' is empty"
msgstr "el fichero fuente `%s' está vacío"
-#: awkgram.y:1800 awkgram.y:1922 awkgram.y:1940 awkgram.y:2315 awkgram.y:2407
+#: awkgram.y:2732
msgid "source file does not end in newline"
msgstr "el fichero fuente no termina con línea nueva"
-#: awkgram.y:1862
+#: awkgram.y:2809
msgid "unterminated regexp ends with `\\' at end of file"
msgstr "expresión regular sin terminar termina con `\\` al final del fichero"
-#: awkgram.y:1886
+#: awkgram.y:2833
#, c-format
msgid "%s: %d: tawk regex modifier `/.../%c' doesn't work in gawk"
msgstr ""
"%s: %d: el modificador de expresión regular `/.../%c` de tawk no funciona en "
"gawk"
-#: awkgram.y:1890
+#: awkgram.y:2837
#, c-format
msgid "tawk regex modifier `/.../%c' doesn't work in gawk"
msgstr ""
"el modificador de expresión regular `/.../%c` de tawk no funciona en gawk"
-#: awkgram.y:1897
+#: awkgram.y:2844
msgid "unterminated regexp"
msgstr "expresión regular sin terminar"
-#: awkgram.y:1900
+#: awkgram.y:2848
msgid "unterminated regexp at end of file"
msgstr "expresión regular sin terminar al final del fichero"
-#: awkgram.y:1969
+#: awkgram.y:2907
msgid "use of `\\ #...' line continuation is not portable"
msgstr "el uso de la continuación de línea `\\ #...' no es transportable"
-#: awkgram.y:1982
+#: awkgram.y:2923
msgid "backslash not last character on line"
msgstr "la barra invertida no es el último caracter en la línea"
-#: awkgram.y:2027
+#: awkgram.y:2984
msgid "POSIX does not allow operator `**='"
msgstr "POSIX no permite el operador `**='"
-#: awkgram.y:2029
+#: awkgram.y:2986
msgid "old awk does not support operator `**='"
msgstr "el awk antiguo no admite el operador `**='"
-#: awkgram.y:2038
+#: awkgram.y:2995
msgid "POSIX does not allow operator `**'"
msgstr "POSIX no permite el operador `**'"
-#: awkgram.y:2040
+#: awkgram.y:2997
msgid "old awk does not support operator `**'"
msgstr "el awk antiguo no admite el operador `**='"
-#: awkgram.y:2071
+#: awkgram.y:3032
msgid "operator `^=' is not supported in old awk"
msgstr "el operador `^=' no se admite en el awk antiguo"
-#: awkgram.y:2079
+#: awkgram.y:3040
msgid "operator `^' is not supported in old awk"
msgstr "el operador `^' no se admite en el awk antiguo"
-#: awkgram.y:2163 awkgram.y:2178
+#: awkgram.y:3133 awkgram.y:3149
msgid "unterminated string"
msgstr "cadena sin terminar"
-#: awkgram.y:2368
+#: awkgram.y:3345
#, c-format
msgid "invalid char '%c' in expression"
msgstr "caracter '%c' inválido en la expresión"
-#: awkgram.y:2416
+#: awkgram.y:3391
#, c-format
msgid "`%s' is a gawk extension"
msgstr "`%s' es una extensión de gawk"
-#: awkgram.y:2419
+#: awkgram.y:3394
#, c-format
msgid "`%s' is a Bell Labs extension"
msgstr "`%s' es una extensión de Bell Labs"
-#: awkgram.y:2422
+#: awkgram.y:3397
#, c-format
msgid "POSIX does not allow `%s'"
msgstr "POSIX no permite `%s'"
-#: awkgram.y:2426
+#: awkgram.y:3401
#, c-format
msgid "`%s' is not supported in old awk"
msgstr "`%s' no se admite en el awk antiguo"
-#: awkgram.y:2452
+#: awkgram.y:3465
msgid "`goto' considered harmful!\n"
msgstr "¡`goto' se considera dañino!\n"
-#: awkgram.y:2514
+#: awkgram.y:3518
#, c-format
msgid "%d is invalid as number of arguments for %s"
msgstr "%d es inválido como número de argumentos para %s"
-#: awkgram.y:2533 awkgram.y:2536
+#: awkgram.y:3544 awkgram.y:3547
msgid "match: third argument is a gawk extension"
msgstr "match: el tercer argumento es una extensión de gawk"
-#: awkgram.y:2549
+#: awkgram.y:3575
#, c-format
msgid "%s: string literal as last arg of substitute has no effect"
msgstr ""
"%s: la literal de cadena como último argumento de substitute no tiene efecto"
-#: awkgram.y:2552
+#: awkgram.y:3580
#, c-format
msgid "%s third parameter is not a changeable object"
msgstr "el tercer argumento de %s no es un objecto que se puede cambiar"
-#: awkgram.y:2586 awkgram.y:2589
+#: awkgram.y:3665 awkgram.y:3668
msgid "close: second argument is a gawk extension"
msgstr "close: el segundo argumento es una extensión de gawk"
-#: awkgram.y:2599
+#: awkgram.y:3680
msgid "use of dcgettext(_\"...\") is incorrect: remove leading underscore"
msgstr ""
"el uso de dcgettext(_\"...\") es incorrecto: quite el subrayado inicial"
-#: awkgram.y:2614
+#: awkgram.y:3695
msgid "use of dcngettext(_\"...\") is incorrect: remove leading underscore"
msgstr ""
"el uso de dcngettext(_\"...\") es incorrecto: quite el subrayado inicial"
-#: awkgram.y:2686
+#: awkgram.y:3787
#, c-format
msgid "function `%s': parameter #%d, `%s', duplicates parameter #%d"
msgstr "función `%s': parámetro #%d, `%s', duplica el parámetro #%d"
-#: awkgram.y:2719
+#: awkgram.y:3829
#, c-format
msgid "function `%s': parameter `%s' shadows global variable"
msgstr "función `%s': parámetro `%s' oscurece la variable global"
-#: awkgram.y:2831
+#: awkgram.y:3987
#, c-format
msgid "could not open `%s' for writing (%s)"
msgstr "no se puede abrir `%s' para escritura (%s)"
-#: awkgram.y:2832 profile.c:96
+#: awkgram.y:3988 profile.c:85
msgid "sending profile to standard error"
msgstr "se envía el perfil a la salida estándar de error"
-#: awkgram.y:2864
+#: awkgram.y:3994
#, c-format
msgid "%s: close failed (%s)"
msgstr "%s: falló close (%s)"
-#: awkgram.y:2985
+#: awkgram.y:4046
msgid "shadow_funcs() called twice!"
msgstr "¡se llamó shadow_funcs() dos veces!"
-#: awkgram.y:3012
+#: awkgram.y:4052
msgid "there were shadowed variables."
msgstr "hay variables opacadas."
-#: awkgram.y:3085
+#: awkgram.y:4081
#, c-format
msgid "function `%s': can't use function name as parameter name"
msgstr ""
"función `%s': no se puede usar un nombre de función como nombre de parámetro"
-#: awkgram.y:3088
-#, fuzzy, c-format
+#: awkgram.y:4086
+#, c-format
msgid "function `%s': can't use special variable `%s' as a function parameter"
msgstr ""
-"función `%s': no se puede usar un nombre de función como nombre de parámetro"
+"función `%s': no se puede usar la variable especial `%s' como un parámetro "
+"de función"
-#: awkgram.y:3098
+#: awkgram.y:4102
#, c-format
msgid "function name `%s' previously defined"
msgstr "el nombre de función `%s' se definió previamente"
-#: awkgram.y:3249 awkgram.y:3255
+#: awkgram.y:4271 awkgram.y:4277
#, c-format
msgid "function `%s' called but never defined"
msgstr "se llamó a la función `%s' pero nunca se definió"
-#: awkgram.y:3258
+#: awkgram.y:4280
#, c-format
msgid "function `%s' defined but never called"
msgstr "se definió la función `%s' pero nunca se llamó"
-#: awkgram.y:3285
+#: awkgram.y:4311
#, c-format
msgid "regexp constant for parameter #%d yields boolean value"
msgstr ""
"la constante de expresión regular para el parámetro #%d da un valor booleano"
-#: awkgram.y:3329
+#: awkgram.y:4420
#, c-format
msgid ""
"function `%s' called with space between name and `(',\n"
@@ -429,244 +510,146 @@ msgstr ""
"se llamó la función `%s' con espacio entre el nombre y el `(',\n"
"o se usó como una variable o una matriz"
-#: awkgram.y:3750
-msgid "division by zero attempted in `/'"
-msgstr "se intentó una división por cero en `/'"
+#: awkgram.y:4673 eval.c:1845
+msgid "division by zero attempted"
+msgstr "se intentó una división por cero"
-#: awkgram.y:3755 eval.c:1411
+#: awkgram.y:4682 eval.c:1877
#, c-format
msgid "division by zero attempted in `%%'"
msgstr "se intentó una división por cero en `%%'"
-#: builtin.c:122
+#: awkgram.y:5342
+msgid "statement may have no effect"
+msgstr "la sentencia puede no tener efecto"
+
+#: builtin.c:120
#, c-format
msgid "%s to \"%s\" failed (%s)"
msgstr "falló %s a \"%s\" (%s)"
-#: builtin.c:123
+#: builtin.c:121
msgid "standard output"
msgstr "salida estándar"
-#: builtin.c:124
-msgid "reason unknown"
-msgstr "razón desconocida"
-
-#: builtin.c:137
+#: builtin.c:135
msgid "exp: received non-numeric argument"
msgstr "exp: se recibió un argumento que no es un número"
-#: builtin.c:143
+#: builtin.c:141
#, c-format
msgid "exp: argument %g is out of range"
msgstr "exp: el argumento %g está fuera de rango"
-#: builtin.c:201
+#: builtin.c:200
#, c-format
msgid "fflush: cannot flush: pipe `%s' opened for reading, not writing"
msgstr ""
"fflush: no se puede limpiar: se abrió la tubería `%s' para lectura, no para "
"escritura"
-#: builtin.c:204
+#: builtin.c:203
#, c-format
msgid "fflush: cannot flush: file `%s' opened for reading, not writing"
msgstr ""
"fflush: no se puede limpiar: se abrió el fichero `%s' para lectura, no para "
"escritura"
-#: builtin.c:216
+#: builtin.c:215
#, c-format
msgid "fflush: `%s' is not an open file, pipe or co-process"
msgstr "fflush: `%s' no es un fichero abierto, tubería o co-proceso"
-#: builtin.c:310
+#: builtin.c:322
msgid "index: received non-string first argument"
msgstr "index: el primer argumento recibido no es una cadena"
-#: builtin.c:312
+#: builtin.c:324
msgid "index: received non-string second argument"
msgstr "index: el segundo argumento recibido no es una cadena"
-#: builtin.c:434
+#: builtin.c:446
msgid "int: received non-numeric argument"
msgstr "int: se recibió un argumento que no es un número"
-#: builtin.c:464
+#: builtin.c:469
+#, fuzzy
msgid "`length(array)' is a gawk extension"
msgstr "`length(array)' es una extensión de gawk"
-#: builtin.c:471
-msgid "length: untyped parameter argument will be forced to scalar"
-msgstr "length: un argumento de parámetro sin tipo se forzará a escalar"
-
-#: builtin.c:480
-msgid "length: untyped argument will be forced to scalar"
-msgstr "length: un argumento sin tipo se forzará a escalar"
-
-#: builtin.c:484
+#: builtin.c:477
msgid "length: received non-string argument"
msgstr "length: se recibió un argumento que no es una cadena"
-#: builtin.c:515
+#: builtin.c:508
msgid "log: received non-numeric argument"
msgstr "log: se recibió un argumento que no es un número"
-#: builtin.c:518
+#: builtin.c:511
#, c-format
msgid "log: received negative argument %g"
msgstr "log: se recibió el argumento negativo %g"
-#: builtin.c:726 builtin.c:729
-msgid "must use `count$' on all formats or none"
-msgstr "se debe utilizar `count$' en todos los formatos o en ninguno"
-
-#: builtin.c:790
-#, c-format
-msgid "field width is ignored for `%%%%' specifier"
-msgstr "se descarta la anchura del campo para el especificador `%%%%'"
-
-#: builtin.c:792
-#, c-format
-msgid "precision is ignored for `%%%%' specifier"
-msgstr "se descarta la precisión para el especificador `%%%%'"
-
-#: builtin.c:794
-#, c-format
-msgid "field width and precision are ignored for `%%%%' specifier"
-msgstr ""
-"se descartan la anchura del campo y la precisión para el especificador `%%%%'"
-
-#: builtin.c:845
-msgid "`$' is not permitted in awk formats"
-msgstr "no se permite `$' en los formatos de awk"
-
-#: builtin.c:851
-msgid "arg count with `$' must be > 0"
-msgstr "la cuenta de argumentos con `$' debe ser > 0"
-
-#: builtin.c:853
-#, c-format
-msgid "arg count %ld greater than total number of supplied arguments"
-msgstr ""
-"la cuenta de argumentos %ld es mayor que el número total de argumentos "
-"proporcionados"
-
-#: builtin.c:855
-msgid "`$' not permitted after period in format"
-msgstr "no se permite `$' después de un punto en el formato"
-
-#: builtin.c:868
-msgid "no `$' supplied for positional field width or precision"
-msgstr ""
-"no se proporciona `$' para el ancho o la precisión del campo posicional"
-
-#: builtin.c:938
-msgid "`l' is meaningless in awk formats; ignored"
-msgstr "`l' no tiene significado en los formatos de awk; se descarta"
-
-#: builtin.c:942
-msgid "`l' is not permitted in POSIX awk formats"
-msgstr "no se permite `l' en los formatos POSIX de awk"
-
-#: builtin.c:953
-msgid "`L' is meaningless in awk formats; ignored"
-msgstr "`L' no tiene significado en los formatos de awk; se descarta"
-
-#: builtin.c:957
-msgid "`L' is not permitted in POSIX awk formats"
-msgstr "no se permite `L' en los formatos POSIX de awk"
-
-#: builtin.c:968
-msgid "`h' is meaningless in awk formats; ignored"
-msgstr "`h' no tiene significado en los formatos de awk; se descarta"
-
-#: builtin.c:972
-msgid "`h' is not permitted in POSIX awk formats"
-msgstr "no se permite `h' en los formatos POSIX de awk"
-
-#: builtin.c:1252
-#, c-format
-msgid "[s]printf: value %g is out of range for `%%%c' format"
-msgstr "[s]printf: el valor %g está fuera del rango para el formato `%%%c'"
-
-#: builtin.c:1332
-#, c-format
-msgid "ignoring unknown format specifier character `%c': no argument converted"
-msgstr ""
-"se descarta el carácter especificador de formato `%c' desconocido: no se "
-"convirtió ningún argumento"
-
-#: builtin.c:1338
-msgid "not enough arguments to satisfy format string"
-msgstr "no hay suficientes argumentos para satisfacer a la cadena de formato"
-
-#: builtin.c:1340
-msgid "^ ran out for this one"
-msgstr "se acabó ^ para éste"
-
-#: builtin.c:1346
-msgid "[s]printf: format specifier does not have control letter"
-msgstr "[s]printf: el especificador de formato no tiene letras de control"
-
-#: builtin.c:1349
-msgid "too many arguments supplied for format string"
-msgstr "se proporcionaron demasiados argumentos para la cadena de formato"
+#: builtin.c:531 builtin.c:573 builtin.c:586 builtin.c:982 builtin.c:994
+#, fuzzy, c-format
+msgid "attempt to use array `%s' in scalar context"
+msgstr "se intentó usar la matriz `%s' en un contexto escalar"
-#: builtin.c:1424 builtin.c:1427
+#: builtin.c:569 builtin.c:580
msgid "printf: no arguments"
msgstr "printf: sin argumentos"
-#: builtin.c:1451
+#: builtin.c:621
msgid "sqrt: received non-numeric argument"
msgstr "sqrt: se recibió un argumento que no es un número"
-#: builtin.c:1455
+#: builtin.c:625
#, c-format
msgid "sqrt: called with negative argument %g"
msgstr "sqrt: se llamó con el argumento negativo %g"
-#: builtin.c:1479
-#, c-format
-msgid "substr: start index %g is invalid, using 1"
-msgstr "substr: el índice de inicio %g es inválido, se usa 1"
-
-#: builtin.c:1484
-#, c-format
-msgid "substr: non-integer start index %g will be truncated"
-msgstr "substr: se truncará el índice de inicio no entero %g"
-
-#: builtin.c:1510
+#: builtin.c:649
#, c-format
msgid "substr: length %g is not >= 1"
msgstr "substr: la longitud %g no es >= 1"
-#: builtin.c:1512
+#: builtin.c:651
#, c-format
msgid "substr: length %g is not >= 0"
msgstr "substr: la longitud %g no es >= 0"
-#: builtin.c:1519
+#: builtin.c:658
#, c-format
msgid "substr: non-integer length %g will be truncated"
msgstr "substr: se truncará la longitud no entera %g"
-#: builtin.c:1524
+#: builtin.c:663
#, c-format
msgid "substr: length %g too big for string indexing, truncating to %g"
msgstr ""
"substr: la longitud %g es demasiado grande para ser índice de cadena, se "
"trunca a %g"
-#: builtin.c:1536
+#: builtin.c:675
+#, c-format
+msgid "substr: start index %g is invalid, using 1"
+msgstr "substr: el índice de inicio %g es inválido, se usa 1"
+
+#: builtin.c:680
+#, c-format
+msgid "substr: non-integer start index %g will be truncated"
+msgstr "substr: se truncará el índice de inicio no entero %g"
+
+#: builtin.c:705
msgid "substr: source string is zero length"
msgstr "substr: la cadena de origen es de longitud cero"
-#: builtin.c:1552
+#: builtin.c:721
#, c-format
msgid "substr: start index %g is past end of string"
msgstr "substr: el índice de inicio %g está después del fin de la cadena"
-#: builtin.c:1560
+#: builtin.c:729
#, c-format
msgid ""
"substr: length %g at start index %g exceeds length of first argument (%lu)"
@@ -674,480 +657,439 @@ msgstr ""
"substr: la cadena %g en el índice de inicio %g excede la longitud del primer "
"argumento (%lu)"
-#: builtin.c:1637
+#: builtin.c:806
+msgid "strftime: received non-numeric second argument"
+msgstr "strftime: el segundo argumento recibido no es un número"
+
+#: builtin.c:813
msgid "strftime: received non-string first argument"
msgstr "strftime: el primer argumento recibido no es una cadena"
-#: builtin.c:1643
+#: builtin.c:819
msgid "strftime: received empty format string"
msgstr "strftime: se recibió una cadena de formato vacía"
-#: builtin.c:1652
-msgid "strftime: received non-numeric second argument"
-msgstr "strftime: el segundo argumento recibido no es un número"
-
-#: builtin.c:1729
+#: builtin.c:885
msgid "mktime: received non-string argument"
msgstr "mktime: se recibió un argumento que no es una cadena"
-#: builtin.c:1746
+#: builtin.c:902
msgid "mktime: at least one of the values is out of the default range"
msgstr ""
-#: builtin.c:1781
+#: builtin.c:937
msgid "'system' function not allowed in sandbox mode"
msgstr ""
-#: builtin.c:1786
+#: builtin.c:942
msgid "system: received non-string argument"
msgstr "system: se recibió un argumento que no es una cadena"
-#: builtin.c:1907 eval.c:2285
+#: builtin.c:997 eval.c:1105 eval.c:1557 eval.c:1570
+#, c-format
+msgid "reference to uninitialized variable `%s'"
+msgstr "referencia a la variable sin inicializar `%s'"
+
+#: builtin.c:1064
#, c-format
msgid "reference to uninitialized field `$%d'"
msgstr "referencia al campo sin inicializar `$%d'"
-#: builtin.c:2012
+#: builtin.c:1098
msgid "tolower: received non-string argument"
msgstr "tolower: se recibió un argumento que no es una cadena"
-#: builtin.c:2042
+#: builtin.c:1151
msgid "toupper: received non-string argument"
msgstr "toupper: se recibió un argumento que no es una cadena"
-#: builtin.c:2075
+#: builtin.c:1199
msgid "atan2: received non-numeric first argument"
msgstr "atan2: el primer argumento recibido no es un número"
-#: builtin.c:2077
+#: builtin.c:1201
msgid "atan2: received non-numeric second argument"
msgstr "atan2: el segundo argumento recibido no es un número"
-#: builtin.c:2096
+#: builtin.c:1220
msgid "sin: received non-numeric argument"
msgstr "sin: se recibió un argumento que no es un número"
-#: builtin.c:2112
+#: builtin.c:1236
msgid "cos: received non-numeric argument"
msgstr "cos: se recibió un argumento que no es un número"
-#: builtin.c:2165
+#: builtin.c:1289
msgid "srand: received non-numeric argument"
msgstr "srand: se recibió un argumento que no es un número"
-#: builtin.c:2200
+#: builtin.c:1320
msgid "match: third argument is not an array"
msgstr "match: el tercer argumento no es una matriz"
-#: builtin.c:2750
+#: builtin.c:1827
msgid "gensub: third argument of 0 treated as 1"
msgstr "gensub: el tercer argumento de 0 se trata como 1"
-#: builtin.c:2866
+#: builtin.c:1869
msgid "lshift: received non-numeric first argument"
msgstr "lshift: el primer argumento recibido no es un número"
-#: builtin.c:2868
+#: builtin.c:1871
msgid "lshift: received non-numeric second argument"
msgstr "lshift: el segundo argumento recibido no es un número"
-#: builtin.c:2874
+#: builtin.c:1877
#, c-format
msgid "lshift(%lf, %lf): negative values will give strange results"
msgstr "lshift(%lf, %lf): los valores negativos darán resultados extraños"
-#: builtin.c:2876
+#: builtin.c:1879
#, c-format
msgid "lshift(%lf, %lf): fractional values will be truncated"
msgstr "lshift(%lf, %lf): los valores fraccionarios se truncarán"
-#: builtin.c:2878
+#: builtin.c:1881
#, c-format
msgid "lshift(%lf, %lf): too large shift value will give strange results"
msgstr ""
"lshift(%lf, %lf): un valor de desplazamiento muy grande dará resultados "
"extraños"
-#: builtin.c:2904
+#: builtin.c:1908
msgid "rshift: received non-numeric first argument"
msgstr "rshift: el primer argumento recibido no es un número"
-#: builtin.c:2906
+#: builtin.c:1910
msgid "rshift: received non-numeric second argument"
msgstr "rshift: el segundo argumento recibido no es un número"
-#: builtin.c:2912
+#: builtin.c:1916
#, c-format
msgid "rshift(%lf, %lf): negative values will give strange results"
msgstr "rshift(%lf, %lf): los valores negativos darán resultados extraños"
-#: builtin.c:2914
+#: builtin.c:1918
#, c-format
msgid "rshift(%lf, %lf): fractional values will be truncated"
msgstr "rshift(%lf, %lf): los valores fraccionarios serán truncados"
-#: builtin.c:2916
+#: builtin.c:1920
#, c-format
msgid "rshift(%lf, %lf): too large shift value will give strange results"
msgstr ""
"rshift(%lf, %lf): un valor de desplazamiento muy grande dará resultados "
"extraños"
-#: builtin.c:2942
+#: builtin.c:1947
msgid "and: received non-numeric first argument"
msgstr "and: el primer argumento recibido no es un número"
-#: builtin.c:2944
+#: builtin.c:1949
msgid "and: received non-numeric second argument"
msgstr "and: el segundo argumento recibido no es un número"
-#: builtin.c:2950
+#: builtin.c:1955
#, c-format
msgid "and(%lf, %lf): negative values will give strange results"
msgstr "and(%lf, %lf): los valores negativos darán resultados extraños"
-#: builtin.c:2952
+#: builtin.c:1957
#, c-format
msgid "and(%lf, %lf): fractional values will be truncated"
msgstr "and(%lf, %lf): los valores fraccionarios serán truncados"
-#: builtin.c:2978
+#: builtin.c:1984
msgid "or: received non-numeric first argument"
msgstr "or: el primer argumento recibido no es un número"
-#: builtin.c:2980
+#: builtin.c:1986
msgid "or: received non-numeric second argument"
msgstr "or: el segundo argumento recibido no es un número"
-#: builtin.c:2986
+#: builtin.c:1992
#, c-format
msgid "or(%lf, %lf): negative values will give strange results"
msgstr "or(%lf, %lf): los valores negativos darán resultados extraños"
-#: builtin.c:2988
+#: builtin.c:1994
#, c-format
msgid "or(%lf, %lf): fractional values will be truncated"
msgstr "or(%lf, %lf): los valores fraccionarios serán truncados"
-#: builtin.c:3014
+#: builtin.c:2023
msgid "xor: received non-numeric first argument"
msgstr "xor: el primer argumento recibido no es un número"
-#: builtin.c:3016
+#: builtin.c:2025
msgid "xor: received non-numeric second argument"
msgstr "xor: el segundo argumento recibido no es un número"
-#: builtin.c:3022
+#: builtin.c:2031
#, c-format
msgid "xor(%lf, %lf): negative values will give strange results"
msgstr "xor(%lf, %lf): los valores negativos darán resultados extraños"
-#: builtin.c:3024
+#: builtin.c:2033
#, c-format
msgid "xor(%lf, %lf): fractional values will be truncated"
msgstr "xor(%lf, %lf): los valores fraccionarios se truncarán"
-#: builtin.c:3048
+#: builtin.c:2057 builtin.c:2063
msgid "compl: received non-numeric argument"
msgstr "compl: se recibió un argumento que no es un número"
-#: builtin.c:3054
+#: builtin.c:2065
#, c-format
msgid "compl(%lf): negative value will give strange results"
msgstr "compl(%lf): el valor negativo dará resultados extraños"
-#: builtin.c:3056
+#: builtin.c:2067
#, c-format
msgid "compl(%lf): fractional value will be truncated"
msgstr "compl(%lf): el valor fraccionario se truncará"
-#: builtin.c:3229
+#: builtin.c:2237
#, c-format
msgid "dcgettext: `%s' is not a valid locale category"
msgstr "dcgettext: `%s' no es una categoría local válida"
-#: eval.c:374
+#: eval.c:412
#, c-format
msgid "unknown nodetype %d"
msgstr "tipo de nodo %d desconocido"
-#: eval.c:423
-msgid "buffer overflow in genflags2str"
-msgstr "desbordamiento de almacenamiento temporal en genflags2str"
+#: eval.c:423 eval.c:437
+#, fuzzy, c-format
+msgid "unknown opcode %d"
+msgstr "tipo de nodo %d desconocido"
-#: eval.c:455 eval.c:461 profile.c:787
+#: eval.c:434
#, c-format
-msgid "attempt to use array `%s' in a scalar context"
-msgstr "se intentó usar la matriz `%s' en un contexto escalar"
+msgid "opcode %s not an operator or keyword"
+msgstr ""
-#: eval.c:803
+#: eval.c:487
+msgid "buffer overflow in genflags2str"
+msgstr "desbordamiento de almacenamiento temporal en genflags2str"
+
+#: eval.c:613
#, c-format
-msgid "for loop: array `%s' changed size from %ld to %ld during loop execution"
+msgid ""
+"\n"
+"\t# Function Call Stack:\n"
+"\n"
msgstr ""
-"ciclo for: la matriz `%s' cambió de tamaño de %ld a %ld durante la ejecución "
-"del ciclo"
-
-#: eval.c:824
-msgid "`break' outside a loop is not portable"
-msgstr "`break' fuera de un ciclo no es transportable"
+"\n"
+"\t# Pila de Llamadas de Funciones:\n"
+"\n"
-#: eval.c:828
-msgid "`break' outside a loop is not allowed"
-msgstr "no se permite `break' fuera de un ciclo"
+#: eval.c:640
+msgid "`IGNORECASE' is a gawk extension"
+msgstr "`IGNORECASE' es una extensión de gawk"
-#: eval.c:845
-msgid "`continue' outside a loop is not portable"
-msgstr "`continue' fuera de un ciclo no es transportable"
+#: eval.c:669
+msgid "`BINMODE' is a gawk extension"
+msgstr "`BINMODE' es una extensión de gawk"
-#: eval.c:849
-msgid "`continue' outside a loop is not allowed"
-msgstr "no se permite `continue' fuera de un ciclo"
+#: eval.c:727
+#, c-format
+msgid "BINMODE value `%s' is invalid, treated as 3"
+msgstr "el valor BINMODE `%s' es inválido; se trata como 3"
-#: eval.c:883
-msgid "`next' cannot be called from a BEGIN rule"
-msgstr "`next' no se puede llamar desde una regla BEGIN"
+#: eval.c:817
+#, c-format
+msgid "bad `%sFMT' specification `%s'"
+msgstr "especificación `%sFMT' `%s' errónea"
-#: eval.c:885
-msgid "`next' cannot be called from an END rule"
-msgstr "`next' no se puede llamar desde una regla END"
+#: eval.c:895
+msgid "turning off `--lint' due to assignment to `LINT'"
+msgstr "se desactiva `--lint' debido a una asignación a `LINT'"
-#: eval.c:887
-#, fuzzy
-msgid "`next' cannot be called from a BEGINFILE rule"
-msgstr "`next' no se puede llamar desde una regla BEGIN"
+#: eval.c:1067 eval.c:1544
+#, c-format
+msgid "can't use function name `%s' as variable or array"
+msgstr "no se puede usar el nombre de la función `%s' como variable o matriz"
-#: eval.c:889
-#, fuzzy
-msgid "`next' cannot be called from an ENDFILE rule"
-msgstr "`next' no se puede llamar desde una regla END"
+#: eval.c:1095
+msgid "assignment is not allowed to result of builtin function"
+msgstr "no se permite la asignación como resultado de una función interna"
-#: eval.c:898
-msgid "`nextfile' cannot be called from a BEGIN rule"
-msgstr "`nextfile' no se puede llamar desde una regla BEGIN"
+#: eval.c:1104 eval.c:1556 eval.c:1569
+#, c-format
+msgid "reference to uninitialized argument `%s'"
+msgstr "referencia al argumento sin inicializar `%s'"
-#: eval.c:900
-msgid "`nextfile' cannot be called from an END rule"
-msgstr "`nextfile' no se puede llamar desde una regla END"
+#: eval.c:1123
+msgid "attempt to field reference from non-numeric value"
+msgstr "se intentó una referencia de campo desde un valor que no es un número"
-#: eval.c:906
+#: eval.c:1125
#, fuzzy
-msgid "`nextfile' cannot be called from an ENDFILE rule"
-msgstr "`nextfile' no se puede llamar desde una regla END"
+msgid "attempt to field reference from null string"
+msgstr "se intentó una referencia desde una cadena nula"
-#: eval.c:963
-msgid "statement has no effect"
-msgstr "la declaración no tiene efecto"
+#: eval.c:1131
+#, fuzzy, c-format
+msgid "attempt to access field %ld"
+msgstr "se intentó accesar al campo %d"
-#: eval.c:1040 eval.c:2133
-#, c-format
-msgid "can't use function name `%s' as variable or array"
-msgstr "no se puede usar el nombre de la función `%s' como variable o matriz"
+#: eval.c:1140
+#, fuzzy, c-format
+msgid "reference to uninitialized field `$%ld'"
+msgstr "referencia al campo sin inicializar `$%d'"
-#: eval.c:1047 eval.c:1053
+#: eval.c:1202
#, c-format
-msgid "reference to uninitialized argument `%s'"
-msgstr "referencia al argumento sin inicializar `%s'"
+msgid "function `%s' called with more arguments than declared"
+msgstr "se llamó a la función `%s' con más argumentos de los declarados"
-#: eval.c:1062 eval.c:2142
+#: eval.c:1358
#, c-format
-msgid "reference to uninitialized variable `%s'"
-msgstr "referencia a la variable sin inicializar `%s'"
-
-#: eval.c:1210
-msgid ""
-"concatenation: side effects in one expression have changed the length of "
-"another!"
+msgid "unwind_stack: unexpected type `%s'"
msgstr ""
-"concatenación: ¡Los efectos laterales en una expresión han cambiado la "
-"longitud de otra!"
-#: eval.c:1315
+#: eval.c:1636
+#, fuzzy, c-format
+msgid "attempt to use scalar `%s' as an array"
+msgstr "se intentó usar el dato escalar `%s' como una matriz"
+
+#: eval.c:1680
msgid "assignment used in conditional context"
msgstr "se usó una asignación en un contexto condicional"
-#: eval.c:1396
-msgid "division by zero attempted"
-msgstr "se intentó una división por cero"
-
-#: eval.c:1426 profile.c:663
-#, c-format
-msgid "illegal type (%s) in tree_eval"
-msgstr "tipo ilegal (%s) en tree_eval"
+#: eval.c:1684
+msgid "statement has no effect"
+msgstr "la declaración no tiene efecto"
-#: eval.c:1589
+#: eval.c:2028
msgid "division by zero attempted in `/='"
msgstr "se intentó una división por cero en `/='"
-#: eval.c:1611
+#: eval.c:2053
#, c-format
msgid "division by zero attempted in `%%='"
msgstr "se intentó una división por cero en `%%='"
-#: eval.c:1891
-#, c-format
-msgid "function `%s' called with more arguments than declared"
-msgstr "se llamó a la función `%s' con más argumentos de los declarados"
-
-#: eval.c:1948
-#, c-format
-msgid "function `%s' not defined"
-msgstr "la función `%s' no está definida"
-
-#: eval.c:1950
-#, c-format
-msgid "identifier `%s' is not a function"
-msgstr ""
-
-#: eval.c:1997
-#, c-format
-msgid ""
-"function parameter `%s' is not a scalar and cannot be used for indirect "
-"function call"
-msgstr ""
-
-#: eval.c:2014
-#, c-format
-msgid "indirect call of real function `%s' is silly"
-msgstr ""
+#: eval.c:2139
+msgid "`continue' outside a loop is not allowed"
+msgstr "no se permite `continue' fuera de un ciclo"
-#: eval.c:2034
-#, c-format
-msgid "function `%s' called indirectly through `%s' does not exist"
-msgstr ""
+#: eval.c:2145
+#, fuzzy
+msgid "`break' outside a loop is not allowed"
+msgstr "no se permite `break' fuera de un ciclo"
-#: eval.c:2039
+#: eval.c:2229
#, c-format
-msgid "identifier `%s' cannot be used for indirect function call"
+msgid "for loop: array `%s' changed size from %ld to %ld during loop execution"
msgstr ""
+"ciclo for: la matriz `%s' cambió de tamaño de %ld a %ld durante la ejecución "
+"del ciclo"
-#: eval.c:2105
+#: eval.c:2342
#, c-format
-msgid ""
-"\n"
-"\t# Function Call Stack:\n"
-"\n"
+msgid "function called indirectly through `%s' does not exist"
msgstr ""
-"\n"
-"\t# Pila de Llamadas de Funciones:\n"
-"\n"
-#: eval.c:2108
+#: eval.c:2354
#, c-format
-msgid "\t# -- main --\n"
-msgstr "\t# -- principal --\n"
-
-#: eval.c:2269
-msgid "attempt to field reference from non-numeric value"
-msgstr "se intentó una referencia de campo desde un valor que no es un número"
-
-#: eval.c:2271
-msgid "attempt to reference from null string"
-msgstr "se intentó una referencia desde una cadena nula"
-
-#: eval.c:2277
-#, c-format
-msgid "attempt to access field %d"
-msgstr "se intentó accesar al campo %d"
-
-#: eval.c:2298 eval.c:2305 profile.c:843
-msgid "assignment is not allowed to result of builtin function"
-msgstr "no se permite la asignación como resultado de una función interna"
+msgid "function `%s' not defined"
+msgstr "la función `%s' no está definida"
-#: eval.c:2369
-msgid "`IGNORECASE' is a gawk extension"
-msgstr "`IGNORECASE' es una extensión de gawk"
+#: eval.c:2481
+#, fuzzy, c-format
+msgid "`nextfile' cannot be called from a `%s' rule"
+msgstr "`nextfile' no se puede llamar desde una regla END"
-#: eval.c:2398
-msgid "`BINMODE' is a gawk extension"
-msgstr "`BINMODE' es una extensión de gawk"
+#: eval.c:2540
+#, fuzzy, c-format
+msgid "`next' cannot be called from a `%s' rule"
+msgstr "`next' no se puede llamar desde una regla END"
-#: eval.c:2456
+#: eval.c:2602
#, c-format
-msgid "BINMODE value `%s' is invalid, treated as 3"
+msgid "Sorry, don't know how to interpret `%s'"
msgstr ""
-#: eval.c:2546
-#, c-format
-msgid "bad `%sFMT' specification `%s'"
-msgstr "especificación `%sFMT' `%s' errónea"
-
-#: eval.c:2624
-msgid "turning off `--lint' due to assignment to `LINT'"
-msgstr "se desactiva `--lint' debido a una asignación a `LINT'"
-
-#: ext.c:61
-msgid "extensions not allowed in sandbox mode"
+#: ext.c:62
+msgid "extensions are not allowed in sandbox mode"
msgstr ""
-#: ext.c:65 ext.c:70
+#: ext.c:68 ext.c:73
msgid "`extension' is a gawk extension"
msgstr "`extension' es una extensión de gawk"
-#: ext.c:80
-#, c-format
-msgid "extension: cannot open `%s' (%s)\n"
+#: ext.c:83
+#, fuzzy, c-format
+msgid "fatal: extension: cannot open `%s' (%s)\n"
msgstr "extension: no se puede abrir `%s' (%s)\n"
-#: ext.c:88
-#, c-format
-msgid "extension: library `%s': cannot call function `%s' (%s)\n"
+#: ext.c:93
+#, fuzzy, c-format
+msgid "fatal: extension: library `%s': cannot call function `%s' (%s)\n"
msgstr ""
"extension: la biblioteca `%s': no puede llamar a la función `%s' (%s)\n"
-#: ext.c:108
+#: ext.c:123
msgid "extension: missing function name"
msgstr "extension: falta el nombre de la función"
-#: ext.c:113
+#: ext.c:128
#, c-format
msgid "extension: illegal character `%c' in function name `%s'"
msgstr "extension: carácter ilegal `%c' en el nombre de la función `%s'"
-#: ext.c:119
+#: ext.c:137
#, c-format
msgid "extension: can't redefine function `%s'"
msgstr "extension: no se puede redefinir la función `%s'"
-#: ext.c:123
+#: ext.c:141
#, c-format
msgid "extension: function `%s' already defined"
msgstr "extension: la función `%s' ya está definida"
-#: ext.c:128
+#: ext.c:146
+#, c-format
+msgid "extension: function name `%s' previously defined"
+msgstr "extension: el nombre de función `%s' se definió previamente"
+
+#: ext.c:148
#, c-format
msgid "extension: can't use gawk built-in `%s' as function name"
msgstr ""
"extension: no se puede utilizar la orden interna de gawk `%s' como nombre de "
"función"
-#: ext.c:130
+#: ext.c:152
#, c-format
-msgid "extension: function name `%s' previously defined"
-msgstr "extension: el nombre de función `%s' se definió previamente"
+msgid "make_builtin: negative argument count for function `%s'"
+msgstr ""
-#: ext.c:207
-#, c-format
+#: ext.c:255
+#, fuzzy, c-format
msgid "function `%s' defined to take no more than %d argument(s)"
msgstr "la función `%s' se definió para tomar no más de %d argumento(s)"
-#: ext.c:210
+#: ext.c:258
#, c-format
msgid "function `%s': missing argument #%d"
msgstr "función `%s': falta el argumento #%d"
-#: ext.c:220
+#: ext.c:268
#, c-format
msgid "function `%s': argument #%d: attempt to use scalar as an array"
msgstr ""
"función `%s': argumento #%d: se intentó usar un escalar como una matriz"
-#: ext.c:224
+#: ext.c:272
#, c-format
msgid "function `%s': argument #%d: attempt to use array as a scalar"
msgstr ""
"función `%s': argumento #%d: se intentó usar una matriz como un escalar"
-#: ext.c:249
+#: ext.c:285
msgid "Operation Not Supported"
msgstr "No Se Da Soporte A La Operación"
@@ -1155,625 +1097,622 @@ msgstr "No Se Da Soporte A La Operación"
msgid "NF set to negative value"
msgstr "NF con un valor negativo"
-#: field.c:913
-msgid "split: second argument is not an array"
-msgstr "split: el segundo argumento no es una matriz"
-
-#: field.c:922 field.c:932 field.c:937
+#: field.c:939 field.c:946 field.c:950
#, fuzzy
msgid "split: fourth argument is a gawk extension"
msgstr "match: el tercer argumento es una extensión de gawk"
-#: field.c:928
+#: field.c:943
#, fuzzy
msgid "split: fourth argument is not an array"
msgstr "split: el segundo argumento no es una matriz"
-#: field.c:975
-#, fuzzy
-msgid "split: null string for third argument is a gawk extension"
+#: field.c:957
+msgid "split: second argument is not an array"
+msgstr "split: el segundo argumento no es una matriz"
+
+#: field.c:987
+msgid "split: null string for third arg is a gawk extension"
msgstr ""
"split: la cadena nula para el tercer argumento es una extensión de gawk"
-#: field.c:1032
+#: field.c:1028
#, fuzzy
-msgid "patsplit: second argument is not an array"
+msgid "patsplit: fourth argument is not an array"
msgstr "split: el segundo argumento no es una matriz"
-#: field.c:1041
+#: field.c:1033
#, fuzzy
-msgid "patsplit: fourth argument is not an array"
+msgid "patsplit: second argument is not an array"
msgstr "split: el segundo argumento no es una matriz"
-#: field.c:1067
+#: field.c:1051
#, fuzzy
msgid "patsplit: third argument must be non-null"
msgstr "match: el tercer argumento no es una matriz"
-#: field.c:1111
+#: field.c:1084
msgid "`FIELDWIDTHS' is a gawk extension"
msgstr "`FIELDWIDTHS' es una extensión gawk"
-#: field.c:1141 field.c:1155
+#: field.c:1147
#, c-format
msgid "invalid FIELDWIDTHS value, near `%s'"
msgstr "valor de FIELDWIDTHS inválido, cerca de `%s'"
-#: field.c:1238
+#: field.c:1220
msgid "null string for `FS' is a gawk extension"
msgstr "la cadena nula para `FS' es una extensión de gawk"
-#: field.c:1242
+#: field.c:1224
msgid "old awk does not support regexps as value of `FS'"
msgstr "el awk antiguo no admite expresiones regulares como valor de `FS'"
-#: field.c:1357
+#: field.c:1343
#, fuzzy
msgid "`FPAT' is a gawk extension"
msgstr "`%s' es una extensión de gawk"
#: getopt.c:574 getopt.c:590
-#, fuzzy, c-format
+#, c-format
msgid "%s: option '%s' is ambiguous\n"
-msgstr "%s: la opción `%s' es ambigua\n"
+msgstr "%s: la opción '%s' es ambigua\n"
#: getopt.c:623 getopt.c:627
-#, fuzzy, c-format
+#, c-format
msgid "%s: option '--%s' doesn't allow an argument\n"
-msgstr "%s: la opción `--%s' no admite ningún argumento\n"
+msgstr "%s: la opción '--%s' no admite ningún argumento\n"
#: getopt.c:636 getopt.c:641
-#, fuzzy, c-format
+#, c-format
msgid "%s: option '%c%s' doesn't allow an argument\n"
-msgstr "%s: la opción `%c%s' no admite ningún argumento\n"
+msgstr "%s: la opción '%c%s' no admite ningún argumento\n"
#: getopt.c:684 getopt.c:703
#, fuzzy, c-format
msgid "%s: option '--%s' requires an argument\n"
-msgstr "%s: la opción `%s' requiere un argumento\n"
+msgstr "%s: la opción '%s' requiere un argumento\n"
#: getopt.c:741 getopt.c:744
-#, fuzzy, c-format
+#, c-format
msgid "%s: unrecognized option '--%s'\n"
-msgstr "%s: no se reconoce la opción `--%s'\n"
+msgstr "%s: no se reconoce la opción '--%s'\n"
#: getopt.c:752 getopt.c:755
-#, fuzzy, c-format
+#, c-format
msgid "%s: unrecognized option '%c%s'\n"
-msgstr "%s: no se reconoce la opción `%c%s'\n"
+msgstr "%s: no se reconoce la opción '%c%s'\n"
#: getopt.c:804 getopt.c:807
-#, fuzzy, c-format
+#, c-format
msgid "%s: invalid option -- '%c'\n"
-msgstr "%s: opción inválida -- %c\n"
+msgstr "%s: opción inválida -- '%c'\n"
#: getopt.c:857 getopt.c:874 getopt.c:1082 getopt.c:1100
-#, fuzzy, c-format
+#, c-format
msgid "%s: option requires an argument -- '%c'\n"
-msgstr "%s: la opción requiere un argumento -- %c\n"
+msgstr "%s: la opción requiere un argumento -- '%c'\n"
#: getopt.c:930 getopt.c:946
-#, fuzzy, c-format
+#, c-format
msgid "%s: option '-W %s' is ambiguous\n"
-msgstr "%s: la opción `-W %s' es ambigua\n"
+msgstr "%s: la opción '-W %s' es ambigua\n"
#: getopt.c:970 getopt.c:988
-#, fuzzy, c-format
+#, c-format
msgid "%s: option '-W %s' doesn't allow an argument\n"
-msgstr "%s: la opción `-W %s' no admite ningún argumento\n"
+msgstr "%s: la opción '-W %s' no admite ningún argumento\n"
#: getopt.c:1009 getopt.c:1027
#, fuzzy, c-format
msgid "%s: option '-W %s' requires an argument\n"
-msgstr "%s: la opción `%s' requiere un argumento\n"
+msgstr "%s: la opción '%s' requiere un argumento\n"
-#: io.c:379
+#: io.c:272
#, c-format
msgid "command line argument `%s' is a directory: skipped"
msgstr ""
-#: io.c:413
+#: io.c:275 io.c:372
#, c-format
msgid "cannot open file `%s' for reading (%s)"
msgstr "no se puede abrir el fichero `%s' para lectura (%s)"
-#: io.c:459 io.c:2999
+#: io.c:419
#, c-format
msgid "error reading input file `%s': %s"
msgstr "error al leer el fichero de entrada `%s': %s"
-#: io.c:506
+#: io.c:470
#, c-format
msgid "close of fd %d (`%s') failed (%s)"
msgstr "falló al cerrar el df %d (`%s') (%s)"
-#: io.c:617
-msgid "redirection not allowed in sandbox mode"
-msgstr ""
-
-#: io.c:648
-#, c-format
-msgid "invalid tree type %s in redirect()"
-msgstr "tipo de árbol %s inválido en redirect()"
-
-#: io.c:654
+#: io.c:577
#, c-format
msgid "expression in `%s' redirection only has numeric value"
msgstr "la expresión en la redirección `%s' sólo tiene un valor numérico"
-#: io.c:660
+#: io.c:583
#, c-format
msgid "expression for `%s' redirection has null string value"
msgstr "la expresión para la redirección `%s' tiene un valor de cadena nula"
-#: io.c:665
+#: io.c:589
#, c-format
msgid "filename `%s' for `%s' redirection may be result of logical expression"
msgstr ""
"el fichero `%s' para la redirección `%s' puede ser resultado de una "
"expresión lógica"
-#: io.c:707
+#: io.c:628
#, c-format
msgid "unnecessary mixing of `>' and `>>' for file `%.*s'"
msgstr "mezcla innecesaria de `>' y `>>' para el fichero `%.*s'"
-#: io.c:754
+#: io.c:681
#, c-format
msgid "can't open pipe `%s' for output (%s)"
msgstr "no se puede abrir la tubería `%s' para la salida (%s)"
-#: io.c:763
+#: io.c:691
#, c-format
msgid "can't open pipe `%s' for input (%s)"
msgstr "no se puede abrir la tubería `%s' para la entrada (%s)"
-#: io.c:786
+#: io.c:712
#, c-format
msgid "can't open two way pipe `%s' for input/output (%s)"
msgstr "no se puede abrir la tubería de dos vías `%s' para entrada/salida (%s)"
-#: io.c:864
+#: io.c:794
#, c-format
msgid "can't redirect from `%s' (%s)"
msgstr "no se puede redirigir desde `%s' (%s)"
-#: io.c:867
+#: io.c:797
#, c-format
msgid "can't redirect to `%s' (%s)"
msgstr "no se puede redirigir a `%s' (%s)"
-#: io.c:920
+#: io.c:846
msgid ""
"reached system limit for open files: starting to multiplex file descriptors"
msgstr ""
"se alcanzó el límite del sistema para ficheros abiertos: comenzando a "
"multiplexar los descriptores de fichero"
-#: io.c:936
+#: io.c:862
#, c-format
msgid "close of `%s' failed (%s)."
msgstr "falló al cerrar `%s' (%s)."
-#: io.c:944
+#: io.c:870
msgid "too many pipes or input files open"
msgstr "demasiadas tuberías o ficheros de entrada abiertos"
-#: io.c:967
+#: io.c:892
msgid "close: second argument must be `to' or `from'"
msgstr "close: el segundo argumento debe ser `to' o `from'"
-#: io.c:981
+#: io.c:909
#, c-format
msgid "close: `%.*s' is not an open file, pipe or co-process"
msgstr "close: `%.*s' no es un fichero abierto, tubería o co-proceso"
-#: io.c:986
+#: io.c:914
msgid "close of redirection that was never opened"
msgstr "cerrado de una redirección que nunca fue abierta"
-#: io.c:1083
+#: io.c:1011
#, c-format
msgid "close: redirection `%s' not opened with `|&', second argument ignored"
msgstr ""
"close: la redirección `%s' no se abre con `|&', se ignoró el segundo "
"argumento"
-#: io.c:1099
+#: io.c:1027
#, c-format
msgid "failure status (%d) on pipe close of `%s' (%s)"
msgstr "estado de fallo (%d) al cerrar la tubería de `%s' (%s)"
-#: io.c:1102
+#: io.c:1030
#, c-format
msgid "failure status (%d) on file close of `%s' (%s)"
msgstr "estado de fallo (%d) al cerrar el fichero de `%s' (%s)"
-#: io.c:1122
+#: io.c:1050
#, c-format
msgid "no explicit close of socket `%s' provided"
msgstr "no se provee el cerrado explícito del `socket' `%s'"
-#: io.c:1125
+#: io.c:1053
#, c-format
msgid "no explicit close of co-process `%s' provided"
msgstr "no se provee el cerrado explícito del co-proceso `%s'"
-#: io.c:1128
+#: io.c:1056
#, c-format
msgid "no explicit close of pipe `%s' provided"
msgstr "no se provee el cerrado explícito del la tubería `%s'"
-#: io.c:1131
+#: io.c:1059
#, c-format
msgid "no explicit close of file `%s' provided"
msgstr "no se provee el cerrado explícito del fichero `%s'"
-#: io.c:1159 io.c:1214 main.c:832 main.c:874
+#: io.c:1087 io.c:1142 main.c:823 main.c:865
#, c-format
msgid "error writing standard output (%s)"
msgstr "error al escribir en la salida estándar (%s)"
-#: io.c:1163 io.c:1219
+#: io.c:1091 io.c:1147
#, c-format
msgid "error writing standard error (%s)"
msgstr "error al escribir en la salida estándar de error (%s)"
-#: io.c:1171
+#: io.c:1099
#, c-format
msgid "pipe flush of `%s' failed (%s)."
msgstr "falló la limpieza de la tubería de `%s' (%s)."
-#: io.c:1174
+#: io.c:1102
#, c-format
msgid "co-process flush of pipe to `%s' failed (%s)."
msgstr "falló la limpieza del co-proceso de la tubería a `%s' (%s)."
-#: io.c:1177
+#: io.c:1105
#, c-format
msgid "file flush of `%s' failed (%s)."
msgstr "falló la limpieza del fichero de `%s' (%s)."
-#: io.c:1292
+#: io.c:1219
#, c-format
msgid "local port %s invalid in `/inet'"
msgstr "puerto local %s inválido en `/inet'"
-#: io.c:1309
+#: io.c:1236
#, c-format
msgid "remote host and port information (%s, %s) invalid"
msgstr "anfitrión remoto e información de puerto (%s, %s) inválidos"
-#: io.c:1344
+#: io.c:1276
msgid "/inet/raw client not ready yet, sorry"
msgstr "el cliente /inet/raw no está listo aún, perdón"
-#: io.c:1347 io.c:1383
+#: io.c:1279 io.c:1320
msgid "only root may use `/inet/raw'."
msgstr "sólo root puede utilizar `/inet/raw'."
-#: io.c:1381
+#: io.c:1318
msgid "/inet/raw server not ready yet, sorry"
msgstr "el servidor /inet/raw no está listo aún, perdón"
-#: io.c:1477
+#: io.c:1417
#, c-format
msgid "no (known) protocol supplied in special filename `%s'"
msgstr ""
"no se proporciona algún protocolo (conocido) en el nombre de fichero "
"especial `%s'"
-#: io.c:1491
+#: io.c:1431
#, c-format
msgid "special file name `%s' is incomplete"
msgstr "el nombre de fichero especial `%s' está incompleto"
-#: io.c:1506
+#: io.c:1447
msgid "must supply a remote hostname to `/inet'"
msgstr "se debe proporcionar a `/inet' un nombre de anfitrión remoto"
-#: io.c:1524
+#: io.c:1465
msgid "must supply a remote port to `/inet'"
msgstr "se debe proporcionar a `/inet' un puerto remoto"
-#: io.c:1570
+#: io.c:1511
msgid "TCP/IP communications are not supported"
msgstr "No se admiten las comunicaciones TCP/IP"
-#: io.c:1758
+#: io.c:1698
#, c-format
msgid "could not open `%s', mode `%s'"
msgstr "no se puede abrir `%s', modo `%s'"
-#: io.c:1809
+#: io.c:1749
#, c-format
msgid "close of master pty failed (%s)"
msgstr "falló al cerrar el pty maestro (%s)"
-#: io.c:1811 io.c:1963 io.c:2114
+#: io.c:1751 io.c:1918 io.c:2075
#, c-format
msgid "close of stdout in child failed (%s)"
msgstr "falló al cerrar la salida estándar en el hijo (%s)"
-#: io.c:1814
+#: io.c:1754
#, c-format
msgid "moving slave pty to stdout in child failed (dup: %s)"
msgstr ""
"falló el movimiento del pty esclavo a la salida estándar en el hijo (dup: %s)"
-#: io.c:1816 io.c:1968
+#: io.c:1756 io.c:1923
#, c-format
msgid "close of stdin in child failed (%s)"
msgstr "falló al cerrar la entrada estándar en el hijo (%s)"
-#: io.c:1819
+#: io.c:1759
#, c-format
msgid "moving slave pty to stdin in child failed (dup: %s)"
msgstr ""
"falló el movimiento del pty esclavo a la entrada estándar en el hijo (dup: %"
"s)"
-#: io.c:1821 io.c:1840
+#: io.c:1761 io.c:1782
#, c-format
msgid "close of slave pty failed (%s)"
msgstr "falló al cerrar el pty esclavo (%s)"
-#: io.c:1914 io.c:1966 io.c:2095 io.c:2117
+#: io.c:1860 io.c:1921 io.c:2053 io.c:2078
#, c-format
msgid "moving pipe to stdout in child failed (dup: %s)"
msgstr "falló el movimiento a la salida estándar en el hijo (dup: %s)"
-#: io.c:1918 io.c:1971
+#: io.c:1867 io.c:1926
#, c-format
msgid "moving pipe to stdin in child failed (dup: %s)"
msgstr ""
"falló el movimiento de la tubería a la entrada estándar en el hijo (dup: %s)"
-#: io.c:1935 io.c:2108
+#: io.c:1887 io.c:2068
msgid "restoring stdout in parent process failed\n"
msgstr "falló la restauración de la salida estándar en el proceso padre\n"
-#: io.c:1940
+#: io.c:1895
msgid "restoring stdin in parent process failed\n"
msgstr "falló la restauración de la entrada estándar en el proceso padre\n"
-#: io.c:1974 io.c:2119 io.c:2130
+#: io.c:1929 io.c:2080 io.c:2094
#, c-format
msgid "close of pipe failed (%s)"
msgstr "falló al cerrar la tubería (%s)"
-#: io.c:2019
+#: io.c:1974
msgid "`|&' not supported"
msgstr "`|&' no se admite"
-#: io.c:2085
+#: io.c:2040
#, c-format
msgid "cannot open pipe `%s' (%s)"
msgstr "no se puede abrir la tubería `%s' (%s)"
-#: io.c:2126
+#: io.c:2088
#, c-format
msgid "cannot create child process for `%s' (fork: %s)"
msgstr "no se puede crear el proceso hijo para `%s' (fork: %s)"
-#: io.c:2518
+#: io.c:2577
#, c-format
msgid "data file `%s' is empty"
msgstr "el fichero de datos `%s' está vacío"
-#: io.c:2560 io.c:2568
+#: io.c:2618 io.c:2626
msgid "could not allocate more input memory"
msgstr "no se puede reservar más memoria de entrada"
-#: io.c:3125
+#: io.c:3173
msgid "multicharacter value of `RS' is a gawk extension"
msgstr "el valor multicaracter de `RS' es una extensión de gawk"
-#: main.c:313
+#: main.c:311
msgid "out of memory"
-msgstr ""
+msgstr "memoria agotada"
-#: main.c:381
+#: main.c:388
msgid "`-m[fr]' option irrelevant in gawk"
msgstr "la opción -m[fr] es irrelevante en gawk"
-#: main.c:383
+#: main.c:390
msgid "-m option usage: `-m[fr] nnn'"
msgstr "uso de la opción -m: `-m[fr]' nnn"
-#: main.c:419
+#: main.c:426
#, fuzzy
msgid "empty argument to `-e/--source' ignored"
msgstr "se ignora el argumento vacío para `--source'"
-#: main.c:485
+#: main.c:492
#, c-format
msgid "%s: option `-W %s' unrecognized, ignored\n"
msgstr "%s: no se reconoce la opción `-W %s', se ignora\n"
-#: main.c:530
+#: main.c:545
#, c-format
msgid "%s: option requires an argument -- %c\n"
msgstr "%s: la opción requiere un argumento -- %c\n"
-#: main.c:551
+#: main.c:566
msgid "environment variable `POSIXLY_CORRECT' set: turning on `--posix'"
msgstr ""
"la variable de ambiente `POSIXLY_CORRECT' está establecida: se activa `--"
"posix'"
-#: main.c:557
+#: main.c:572
msgid "`--posix' overrides `--traditional'"
msgstr "`--posix' se impone a `--traditional'"
-#: main.c:568
+#: main.c:583
msgid "`--posix'/`--traditional' overrides `--non-decimal-data'"
msgstr "`--posix'/`--traditional' se imponen a `--non-decimal-data'"
-#: main.c:572
+#: main.c:587
#, c-format
msgid "running %s setuid root may be a security problem"
msgstr "ejecutar %s como setuid root puede ser un problema de seguridad"
-#: main.c:577
+#: main.c:592
#, fuzzy
msgid "`--posix' overrides `--binary'"
msgstr "`--posix' se impone a `--traditional'"
-#: main.c:622
+#: main.c:643
#, c-format
msgid "can't set binary mode on stdin (%s)"
msgstr "no se puede establecer el modo binario en la entrada estándar (%s)"
-#: main.c:625
+#: main.c:646
#, c-format
msgid "can't set binary mode on stdout (%s)"
msgstr "no se puede establecer el modo binario en la salida estándar (%s)"
-#: main.c:627
+#: main.c:648
#, c-format
msgid "can't set binary mode on stderr (%s)"
msgstr ""
"no se puede establecer el modo binario en la salida estándar de error (%s)"
-#: main.c:668
+#: main.c:687
msgid "no program text at all!"
msgstr "¡No hay ningún programa de texto!"
-#: main.c:773
+#: main.c:762
#, c-format
msgid "Usage: %s [POSIX or GNU style options] -f progfile [--] file ...\n"
msgstr ""
"Modo de empleo: %s [opciones estilo POSIX o GNU] -f fichprog [--] "
"fichero ...\n"
-#: main.c:775
+#: main.c:764
#, c-format
msgid "Usage: %s [POSIX or GNU style options] [--] %cprogram%c file ...\n"
msgstr ""
"Modo de empleo: %s [opciones estilo POSIX o GNU] [--] %cprograma%c "
"fichero ...\n"
-#: main.c:780
+#: main.c:769
#, fuzzy
msgid "POSIX options:\t\tGNU long options: (standard)\n"
msgstr "Opciones POSIX:\t\tOpciones largas GNU:\n"
-#: main.c:781
+#: main.c:770
msgid "\t-f progfile\t\t--file=progfile\n"
msgstr "\t-f fichprog\t\t--file=fichprog\n"
-#: main.c:782
+#: main.c:771
msgid "\t-F fs\t\t\t--field-separator=fs\n"
msgstr "\t-F sc\t\t\t--field-separator=sc\n"
-#: main.c:783
+#: main.c:772
msgid "\t-v var=val\t\t--assign=var=val\n"
msgstr "\t-v var=valor\t\t--assign=var=valor\n"
-#: main.c:784
+#: main.c:773
#, fuzzy
-msgid "POSIX options:\t\tGNU long options: (extensions)\n"
+msgid "Short options:\t\tGNU long options: (extensions)\n"
msgstr "Opciones POSIX:\t\tOpciones largas GNU:\n"
-#: main.c:785
+#: main.c:774
msgid "\t-m[fr] val\n"
msgstr "\t-m[fr] valor\n"
-#: main.c:786
+#: main.c:775
msgid "\t-b\t\t\t--characters-as-bytes\n"
msgstr ""
-#: main.c:787
-msgid "\t-c\t\t\t--compat, --traditional\n"
-msgstr ""
+#: main.c:776
+#, fuzzy
+msgid "\t-c\t\t\t--traditional\n"
+msgstr "\t-W traditional\t\t--traditional\n"
-#: main.c:788
+#: main.c:777
#, fuzzy
-msgid "\t-C\t\t\t--copyleft, --copyright\n"
+msgid "\t-C\t\t\t--copyright\n"
msgstr "\t-W copyright\t\t--copyright\n"
-#: main.c:789
+#: main.c:778
#, fuzzy
msgid "\t-d [file]\t\t--dump-variables[=file]\n"
msgstr "\t-W dump-variables[=fichero]\t--dump-variables[=fichero]\n"
# Esta es la línea más larga de la lista de argumentos.
# Probar con gawk para revisar tabuladores. cfuga
-#: main.c:790
+#: main.c:779
#, fuzzy
msgid "\t-e 'program-text'\t--source='program-text'\n"
msgstr "\t-W source=texto-prog\t--source=texto-prog\n"
-#: main.c:791
+#: main.c:780
#, fuzzy
msgid "\t-E file\t\t\t--exec=file\n"
msgstr "\t-W exec=fichero\t\t--exec=fichero\n"
-#: main.c:792
+#: main.c:781
#, fuzzy
msgid "\t-g\t\t\t--gen-pot\n"
msgstr "\t-W gen-po\t\t--gen-po\n"
-#: main.c:793
+#: main.c:782
#, fuzzy
-msgid "\t-h\t\t\t--help, --usage\n"
+msgid "\t-h\t\t\t--help\n"
msgstr "\t-W help\t\t\t--help\n"
-#: main.c:794
+#: main.c:783
#, fuzzy
-msgid "\t-l [fatal]\t\t--lint[=fatal]\n"
+msgid "\t-L [fatal]\t\t--lint[=fatal]\n"
msgstr "\t-W lint[=fatal]\t\t--lint[=fatal]\n"
-#: main.c:795
-#, fuzzy
-msgid "\t-L\t\t\t--lint-old\n"
-msgstr "\t-W lint-old\t\t--lint-old\n"
-
-#: main.c:796
+#: main.c:784
#, fuzzy
msgid "\t-n\t\t\t--non-decimal-data\n"
msgstr "\t-W non-decimal-data\t--non-decimal-data\n"
-#: main.c:797
+#: main.c:785
+#, fuzzy
msgid "\t-N\t\t\t--use-lc-numeric\n"
-msgstr ""
+msgstr "\t-W use-lc-numeric\t--use-lc-numeric\n"
-#: main.c:798
+#: main.c:786
msgid "\t-O\t\t\t--optimize\n"
-msgstr ""
+msgstr "\t-O\t\t\t--optimize\n"
-#: main.c:799
+#: main.c:787
#, fuzzy
msgid "\t-p [file]\t\t--profile[=file]\n"
msgstr "\t-W profile[=fichero]\t--profile[=fichero]\n"
-#: main.c:800
+#: main.c:788
#, fuzzy
msgid "\t-P\t\t\t--posix\n"
msgstr "\t-W posix\t\t--posix\n"
-#: main.c:801
+#: main.c:789
#, fuzzy
msgid "\t-r\t\t\t--re-interval\n"
msgstr "\t-W re-interval\t\t--re-interval\n"
-#: main.c:802
+#: main.c:791
#, fuzzy
+msgid "\t-R file\t\t\t--command=file\n"
+msgstr "\t-W exec=fichero\t\t--exec=fichero\n"
+
+#: main.c:792
msgid "\t-S\t\t\t--sandbox\n"
-msgstr "\t-W posix\t\t--posix\n"
+msgstr ""
-#: main.c:803
+#: main.c:793
+#, fuzzy
+msgid "\t-t\t\t\t--lint-old\n"
+msgstr "\t-W lint-old\t\t--lint-old\n"
+
+#: main.c:794
#, fuzzy
msgid "\t-V\t\t\t--version\n"
msgstr "\t-W version\t\t--version\n"
-#: main.c:805
+#: main.c:796
msgid "\t-W nostalgia\t\t--nostalgia\n"
msgstr "\t-W nostalgia\t\t--nostalgia\n"
-#: main.c:808
-msgid "\t-W parsedebug\t\t--parsedebug\n"
+#: main.c:799
+#, fuzzy
+msgid "\t-Y\t\t--parsedebug\n"
msgstr "\t-W parsedebug\t\t--parsedebug\n"
#. TRANSLATORS: --help output 5 (end)
@@ -1781,7 +1720,7 @@ msgstr "\t-W parsedebug\t\t--parsedebug\n"
#. for this application. Please add _another line_ with the
#. address for translation bugs.
#. no-wrap
-#: main.c:817
+#: main.c:808
msgid ""
"\n"
"To report bugs, see node `Bugs' in `gawk.info', which is\n"
@@ -1795,7 +1734,7 @@ msgstr ""
"Reporte los errores de los mensajes en español a <es@li.org>.\n"
"\n"
-#: main.c:821
+#: main.c:812
msgid ""
"gawk is a pattern scanning and processing language.\n"
"By default it reads standard input and writes standard output.\n"
@@ -1805,7 +1744,7 @@ msgstr ""
"Por omisión lee la entrada estándar y escribe en la salida estándar.\n"
"\n"
-#: main.c:825
+#: main.c:816
msgid ""
"Examples:\n"
"\tgawk '{ sum += $1 }; END { print sum }' file\n"
@@ -1815,7 +1754,7 @@ msgstr ""
"\tgawk '{ sum += $1 }; END { print sum }' fichero\n"
"\tgawk -F: '{ print $1 }' /etc/passwd\n"
-#: main.c:845
+#: main.c:836
#, c-format
msgid ""
"Copyright (C) 1989, 1991-%d Free Software Foundation.\n"
@@ -1828,14 +1767,14 @@ msgid ""
msgstr ""
"Copyright (C) 1989, 1991-%d Free Software Foundation.\n"
"\n"
-"Este programa es software libre; puede redistribuirse y/o ser modificado\n"
+"Este programa es software libre; se puede redistribuir y/o modificar\n"
"bajo los términos de la Licencia Pública General de GNU tal como es "
"publicada\n"
"por la Free Software Foundation; ya sea por la versión 3 de la Licencia, o\n"
"(a su elección) cualquier versión posterior.\n"
"\n"
-#: main.c:853
+#: main.c:844
msgid ""
"This program is distributed in the hope that it will be useful,\n"
"but WITHOUT ANY WARRANTY; without even the implied warranty of\n"
@@ -1849,27 +1788,25 @@ msgstr ""
"Licencia Pública General de GNU para más detalles.\n"
"\n"
-#: main.c:864
-#, fuzzy
+#: main.c:855
msgid ""
"You should have received a copy of the GNU General Public License\n"
"along with this program. If not, see http://www.gnu.org/licenses/.\n"
msgstr ""
"Debió recibir una copia de la Licencia Pública General de GNU\n"
-"junto con este programa; si no es así, escriba a la Free Software\n"
-"Foundation, Inc., 51 Franklin Street, Quinto Piso, Boston, MA 02110-1301, "
-"USA.\n"
+"junto con este programa. Si no es así, consulte\n"
+"http://www.gnu.org/licenses/.\n"
-#: main.c:899
+#: main.c:890
msgid "-Ft does not set FS to tab in POSIX awk"
msgstr "-Ft no establece FS a tabulador en el awk de POSIX"
-#: main.c:1116
+#: main.c:1122
#, c-format
msgid "unknown value for field spec: %d\n"
msgstr ""
-#: main.c:1176
+#: main.c:1182
#, c-format
msgid ""
"%s: `%s' argument to `-v' not in `var=value' form\n"
@@ -1878,88 +1815,82 @@ msgstr ""
"%s: el argumento `%s' para `-v' no es de la forma `var=valor'\n"
"\n"
-#: main.c:1196
+#: main.c:1202
#, c-format
msgid "`%s' is not a legal variable name"
msgstr "`%s' no es un nombre de variable legal"
-#: main.c:1199
+#: main.c:1205
#, c-format
msgid "`%s' is not a variable name, looking for file `%s=%s'"
msgstr "`%s' no es un nombre de variable, se busca el fichero `%s=%s'"
-#: main.c:1238
+#: main.c:1258
msgid "floating point exception"
msgstr "excepción de coma flotante"
-#: main.c:1245
+#: main.c:1265
msgid "fatal error: internal error"
msgstr "error fatal: error interno"
-#: main.c:1260
-#, fuzzy
+#: main.c:1280
msgid "fatal error: internal error: segfault"
-msgstr "error fatal: error interno"
+msgstr "error fatal: error interno: falla de segmentación"
-#: main.c:1272
-#, fuzzy
+#: main.c:1292
msgid "fatal error: internal error: stack overflow"
-msgstr "error fatal: error interno"
+msgstr "error fatal: error interno: desbordamiento de pila"
-#: main.c:1322
+#: main.c:1342
#, c-format
msgid "no pre-opened fd %d"
msgstr "no existe el df %d abierto previamente"
-#: main.c:1329
+#: main.c:1349
#, c-format
msgid "could not pre-open /dev/null for fd %d"
msgstr "no se puede abrir previamente /dev/null para el df %d"
-#: main.c:1352 main.c:1361
+#: main.c:1372 main.c:1381
#, c-format
msgid "could not find groups: %s"
msgstr "no se pueden encontrar los grupos: %s"
-#: msg.c:54
+#: msg.c:62
#, c-format
msgid "cmd. line:"
msgstr "línea ord.:"
-#: msg.c:120
+#: msg.c:97
msgid "warning: "
msgstr "aviso: "
-#: msg.c:142
+#: msg.c:106
msgid "error: "
msgstr "error: "
-#: msg.c:178
+#: msg.c:129
msgid "fatal: "
msgstr "fatal: "
-#: node.c:63 node.c:78 node.c:105 node.c:121 node.c:151
-msgid "can't convert string to float"
-msgstr "no se puede convertir una cadena a coma flotante"
-
-#: node.c:465
+#: node.c:401
msgid "backslash at end of string"
msgstr "barra invertida al final de la cadena"
-#: node.c:609
+#: node.c:502
#, c-format
msgid "old awk does not support the `\\%c' escape sequence"
msgstr "el awk antiguo no admite la secuencia de escape `\\%c'"
-#: node.c:660
+#: node.c:553
msgid "POSIX does not allow `\\x' escapes"
msgstr "POSIX no permite escapes `\\x'"
-#: node.c:666
+#: node.c:559
msgid "no hex digits in `\\x' escape sequence"
msgstr "no hay dígitos hexadecimales en la secuencia de escape `\\x'"
-#: node.c:688
+#: node.c:581
#, c-format
msgid ""
"hex escape \\x%.*s of %d characters probably not interpreted the way you "
@@ -1968,86 +1899,56 @@ msgstr ""
"en el escape hexadecimal \\x%.*s de %d caracteres tal vez no se interpreten "
"de la forma esperada"
-#: node.c:703
+#: node.c:596
#, c-format
msgid "escape sequence `\\%c' treated as plain `%c'"
msgstr "la secuencia de escape `\\%c' se trata como una simple `%c'"
+#: node.c:737
+msgid ""
+"Invalid multibyte data detected. There may be a mismatch between your data "
+"and your locale."
+msgstr ""
+
#: posix/gawkmisc.c:172
#, c-format
msgid "%s %s `%s': could not set close-on-exec: (fcntl: %s)"
msgstr "%s %s `%s': no se puede establecer close-on-exec: (fcntl: %s)"
-#: profile.c:94
+#: profile.c:83
#, c-format
msgid "could not open `%s' for writing: %s"
msgstr "no se puede abrir `%s' para escritura: %s"
-#: profile.c:457
-#, c-format
-msgid "internal error: %s with null vname"
-msgstr "error interno: %s con vname nulo"
-
-#: profile.c:522
-msgid "# treated internally as `delete'"
-msgstr "# se trata internamente como `delete'"
-
-#: profile.c:1076
-#, c-format
-msgid "# this is a dynamically loaded extension function"
-msgstr "# esta es una función de extensión cargada dinámicamente"
-
-#: profile.c:1109
-#, c-format
-msgid "\t# gawk profile, created %s\n"
-msgstr "\t# perfil de gawk, creado %s\n"
-
-#: profile.c:1112
-#, c-format
-msgid ""
-"\t# BEGIN block(s)\n"
-"\n"
-msgstr ""
-"\t# bloque(s) BEGIN\n"
-"\n"
-
-#: profile.c:1122
+#: profile.c:203
#, fuzzy, c-format
msgid ""
-"\t# BEGINFILE block(s)\n"
+"\t# %s block(s)\n"
"\n"
msgstr ""
-"\t# bloque(s) BEGIN\n"
+"\t# bloque(s) END\n"
"\n"
-#: profile.c:1132
-#, c-format
+#: profile.c:208
+#, fuzzy, c-format
msgid ""
-"\t# Rule(s)\n"
+"\t# %s(s)\n"
"\n"
msgstr ""
"\t# Regla(s)\n"
"\n"
-#: profile.c:1138
-#, fuzzy, c-format
-msgid ""
-"\t# ENDFILE block(s)\n"
-"\n"
-msgstr ""
-"\t# bloque(s) END\n"
-"\n"
+#: profile.c:278
+#, c-format
+msgid "internal error: %s with null vname"
+msgstr "error interno: %s con vname nulo"
-#: profile.c:1148
+#: profile.c:945
#, c-format
-msgid ""
-"\t# END block(s)\n"
-"\n"
-msgstr ""
-"\t# bloque(s) END\n"
-"\n"
+msgid "\t# gawk profile, created %s\n"
+msgstr "\t# perfil de gawk, creado %s\n"
-#: profile.c:1168
+#: profile.c:1328
#, c-format
msgid ""
"\n"
@@ -2056,17 +1957,12 @@ msgstr ""
"\n"
"\t# Funciones, enumeradas alfabéticamente\n"
-#: profile.c:1431
+#: profile.c:1367
#, c-format
-msgid "unexpected type %s in prec_level"
-msgstr "tipo %s inesperado en prec_level"
-
-#: profile.c:1557
-#, fuzzy, c-format
-msgid "Unknown node type %s in pp_var"
-msgstr "tipo de nodo %d desconocido"
+msgid "redir2str: unknown redirection type %d"
+msgstr ""
-#: re.c:537
+#: re.c:559
#, c-format
msgid "regexp component `%.*s' should probably be `[%.*s]'"
msgstr ""
@@ -2139,19 +2035,40 @@ msgstr "La expresión regular es demasiado grande"
msgid "Unmatched ) or \\)"
msgstr ") o \\) desemparejados"
-#: regcomp.c:699
+#: regcomp.c:701
msgid "No previous regular expression"
msgstr "No hay una expresión regular previa"
-#~ msgid "%s: illegal option -- %c\n"
-#~ msgstr "%s: opción ilegal -- %c\n"
+#~ msgid "call of `length' without parentheses is deprecated by POSIX"
+#~ msgstr "la llamada de `length' sin paréntesis está obsoleta por POSIX"
+
+#, fuzzy
+#~ msgid "reference to uninitialized field `$%s'"
+#~ msgstr "referencia al campo sin inicializar `$%d'"
+
+#~ msgid "can't convert string to float"
+#~ msgstr "no se puede convertir una cadena a coma flotante"
+
+#~ msgid "`continue' outside a loop is not portable"
+#~ msgstr "`continue' fuera de un ciclo no es transportable"
+
+#~ msgid "`break' outside a loop is not portable"
+#~ msgstr "`break' fuera de un ciclo no es transportable"
+
+#~ msgid "`nextfile' cannot be called from a BEGIN rule"
+#~ msgstr "`nextfile' no se puede llamar desde una regla BEGIN"
+
+#~ msgid "`next' cannot be called from a BEGIN rule"
+#~ msgstr "`next' no se puede llamar desde una regla BEGIN"
#~ msgid "file `%s' is a directory"
#~ msgstr "el fichero `%s' es un directorio"
-#~ msgid "can't open two way socket `%s' for input/output (%s)"
-#~ msgstr ""
-#~ "no se puede abrir el `socket' de dos vías `%s' para entrada/salida (%s)"
+#~ msgid "use `PROCINFO[\"%s\"]' instead of `%s'"
+#~ msgstr "use `PROCINFO[\"%s\"]' en lugar de `%s'"
+
+#~ msgid "use `PROCINFO[...]' instead of `/dev/user'"
+#~ msgstr "use `PROCINFO[...]' en lugar de `/dev/user'"
#~ msgid "\t-W compat\t\t--compat\n"
#~ msgstr "\t-W compat\t\t--compat\n"
@@ -2159,33 +2076,130 @@ msgstr "No hay una expresión regular previa"
#~ msgid "\t-W copyleft\t\t--copyleft\n"
#~ msgstr "\t-W copyleft\t\t--copyleft\n"
-#~ msgid "\t-W traditional\t\t--traditional\n"
-#~ msgstr "\t-W traditional\t\t--traditional\n"
-
#~ msgid "\t-W usage\t\t--usage\n"
#~ msgstr "\t-W usage\t\t--usage\n"
-#, fuzzy
-#~ msgid "seek: invalid arguments"
-#~ msgstr "printf: sin argumentos"
+#~ msgid ""
+#~ "\t# BEGIN block(s)\n"
+#~ "\n"
+#~ msgstr ""
+#~ "\t# bloque(s) BEGIN\n"
+#~ "\n"
-#, fuzzy
-#~ msgid "seek: `%.*s' is not an open file, pipe, or co-process"
-#~ msgstr "close: `%.*s' no es un fichero abierto, tubería o co-proceso"
+#~ msgid "must use `count$' on all formats or none"
+#~ msgstr "se debe utilizar `count$' en todos los formatos o en ninguno"
+
+#~ msgid "field width is ignored for `%%%%' specifier"
+#~ msgstr "se descarta la anchura del campo para el especificador `%%%%'"
+
+#~ msgid "precision is ignored for `%%%%' specifier"
+#~ msgstr "se descarta la precisión para el especificador `%%%%'"
+
+#~ msgid "field width and precision are ignored for `%%%%' specifier"
+#~ msgstr ""
+#~ "se descartan la anchura del campo y la precisión para el especificador `%%"
+#~ "%%'"
+
+#~ msgid "`$' is not permitted in awk formats"
+#~ msgstr "no se permite `$' en los formatos de awk"
+
+#~ msgid "arg count with `$' must be > 0"
+#~ msgstr "la cuenta de argumentos con `$' debe ser > 0"
+
+#~ msgid "arg count %ld greater than total number of supplied arguments"
+#~ msgstr ""
+#~ "la cuenta de argumentos %ld es mayor que el número total de argumentos "
+#~ "proporcionados"
+
+#~ msgid "`$' not permitted after period in format"
+#~ msgstr "no se permite `$' después de un punto en el formato"
+
+#~ msgid "no `$' supplied for positional field width or precision"
+#~ msgstr ""
+#~ "no se proporciona `$' para el ancho o la precisión del campo posicional"
+
+#~ msgid "`l' is meaningless in awk formats; ignored"
+#~ msgstr "`l' no tiene significado en los formatos de awk; se descarta"
+
+#~ msgid "`l' is not permitted in POSIX awk formats"
+#~ msgstr "no se permite `l' en los formatos POSIX de awk"
+
+#~ msgid "`L' is meaningless in awk formats; ignored"
+#~ msgstr "`L' no tiene significado en los formatos de awk; se descarta"
+
+#~ msgid "`L' is not permitted in POSIX awk formats"
+#~ msgstr "no se permite `L' en los formatos POSIX de awk"
+
+#~ msgid "`h' is meaningless in awk formats; ignored"
+#~ msgstr "`h' no tiene significado en los formatos de awk; se descarta"
+
+#~ msgid "`h' is not permitted in POSIX awk formats"
+#~ msgstr "no se permite `h' en los formatos POSIX de awk"
+
+#~ msgid "[s]printf: value %g is out of range for `%%%c' format"
+#~ msgstr "[s]printf: el valor %g está fuera del rango para el formato `%%%c'"
+
+#~ msgid ""
+#~ "ignoring unknown format specifier character `%c': no argument converted"
+#~ msgstr ""
+#~ "se descarta el carácter especificador de formato `%c' desconocido: no se "
+#~ "convirtió ningún argumento"
+
+#~ msgid "not enough arguments to satisfy format string"
+#~ msgstr ""
+#~ "no hay suficientes argumentos para satisfacer a la cadena de formato"
+
+#~ msgid "^ ran out for this one"
+#~ msgstr "se acabó ^ para éste"
+
+#~ msgid "[s]printf: format specifier does not have control letter"
+#~ msgstr "[s]printf: el especificador de formato no tiene letras de control"
+
+#~ msgid "too many arguments supplied for format string"
+#~ msgstr "se proporcionaron demasiados argumentos para la cadena de formato"
#, fuzzy
-#~ msgid "seek: `%.*s' is not an input file, pipe, or co-process"
-#~ msgstr "close: `%.*s' no es un fichero abierto, tubería o co-proceso"
+#~ msgid "attempt to use array parameter `%s' in a scalar context"
+#~ msgstr "se intentó usar la matriz `%s' en un contexto escalar"
+
+#~ msgid "can't open two way socket `%s' for input/output (%s)"
+#~ msgstr ""
+#~ "no se puede abrir el `socket' de dos vías `%s' para entrada/salida (%s)"
+
+#~ msgid "length: untyped argument will be forced to scalar"
+#~ msgstr "length: un argumento sin tipo se forzará a escalar"
+
+#~ msgid ""
+#~ "concatenation: side effects in one expression have changed the length of "
+#~ "another!"
+#~ msgstr ""
+#~ "concatenación: ¡Los efectos laterales en una expresión han cambiado la "
+#~ "longitud de otra!"
+
+#~ msgid "illegal type (%s) in tree_eval"
+#~ msgstr "tipo ilegal (%s) en tree_eval"
+
+#~ msgid "\t# -- main --\n"
+#~ msgstr "\t# -- principal --\n"
+
+#~ msgid "invalid tree type %s in redirect()"
+#~ msgstr "tipo de árbol %s inválido en redirect()"
#, fuzzy
-#~ msgid "seek: `%.*s' is not a regular file"
-#~ msgstr "`%s' no es un nombre de variable legal"
+#~ msgid "# treated internally as `delete'"
+#~ msgstr "# se trata internamente como `delete"
-#~ msgid "use `PROCINFO[\"%s\"]' instead of `%s'"
-#~ msgstr "use `PROCINFO[\"%s\"]' en lugar de `%s'"
+#~ msgid "# this is a dynamically loaded extension function"
+#~ msgstr "# esta es una función de extensión cargada dinámicamente"
-#~ msgid "use `PROCINFO[...]' instead of `/dev/user'"
-#~ msgstr "use `PROCINFO[...]' en lugar de `/dev/user'"
+#~ msgid "unexpected type %s in prec_level"
+#~ msgstr "tipo %s inesperado en prec_level"
+
+#~ msgid "Unknown node type %s in pp_var"
+#~ msgstr "Tipo de nodo %s desconocido en pp_var"
+
+#~ msgid "%s: illegal option -- %c\n"
+#~ msgstr "%s: opción ilegal -- %c\n"
#~ msgid "function %s called\n"
#~ msgstr "se llamó a la función %s\n"
@@ -2207,12 +2221,6 @@ msgstr "No hay una expresión regular previa"
#~ msgid "delete: illegal use of variable `%s' as array"
#~ msgstr "delete: uso ilegal de la variable `%s' como una matriz"
-#~ msgid "asort: first argument is not an array"
-#~ msgstr "asort: el primer argumento no es una matriz"
-
-#~ msgid "asort: second argument is not an array"
-#~ msgstr "asort: el segundo argumento no es una matriz"
-
#~ msgid "internal error: Node_var_array with null vname"
#~ msgstr "error interno: Node_var_array con vname nulo"
diff --git a/po/fr.gmo b/po/fr.gmo
index c326521b..b2dd3829 100644
--- a/po/fr.gmo
+++ b/po/fr.gmo
Binary files differ
diff --git a/po/fr.po b/po/fr.po
index f00829e5..aa0fa196 100644
--- a/po/fr.po
+++ b/po/fr.po
@@ -6,7 +6,7 @@ msgid ""
msgstr ""
"Project-Id-Version: gawk 3.1.4l\n"
"Report-Msgid-Bugs-To: arnold@skeeve.com\n"
-"POT-Creation-Date: 2010-11-12 12:20+0200\n"
+"POT-Creation-Date: 2010-11-17 08:48+0200\n"
"PO-Revision-Date: 2005-06-29 08:00-0500\n"
"Last-Translator: Michel Robitaille <robitail@IRO.UMontreal.CA>\n"
"Language-Team: French <traduc@traduc.org>\n"
@@ -15,658 +15,641 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
-#: array.c:112
+#: array.c:103
+#, c-format
+msgid "from %s"
+msgstr "à partir de %s"
+
+#: array.c:267
+#, fuzzy
+msgid "attempt to use a scalar value as array"
+msgstr "tentative d'utilisation du scalaire « %s » comme un tableau"
+
+#: array.c:270
#, c-format
msgid "attempt to use function `%s' as an array"
msgstr "tentative d'utilisation de la fonction « %s » comme un tableau"
-#: array.c:115
+#: array.c:273
#, c-format
msgid "attempt to use scalar parameter `%s' as an array"
msgstr "tentative d'utilisation d'un paramètre scalaire « %s » comme un tableau"
-#: array.c:118
+#: array.c:276
#, c-format
msgid "attempt to use scalar `%s' as array"
msgstr "tentative d'utilisation du scalaire « %s » comme un tableau"
-#: array.c:156
+#: array.c:321 array.c:648 eval.c:1075 eval.c:1079 eval.c:1581 eval.c:1649
+#: eval.c:1928
#, c-format
-msgid "from %s"
-msgstr "à partir de %s"
+msgid "attempt to use array `%s' in a scalar context"
+msgstr "tentative d'utilisation du tableau « %s » dans un contexte scalaire"
-#: array.c:513
+#: array.c:570
#, fuzzy, c-format
msgid "reference to uninitialized element `%s[\"%.*s\"]'"
msgstr "référence à un élément non initialisé « %s[\"%s\"] »"
-#: array.c:519
+#: array.c:576
#, c-format
msgid "subscript of array `%s' is null string"
msgstr "sous-description du tableau « %s » contient une chaîne nulle"
-#: array.c:623
+#: array.c:684
#, c-format
msgid "delete: index `%s' not in array `%s'"
msgstr "destruction: index « %s » n'est pas dans le tableau « %s »"
-#: array.c:792
+#: array.c:705
+#, fuzzy, c-format
+msgid "attempt to use scalar `%s[\"%.*s\"]' as an array"
+msgstr "tentative d'utilisation du scalaire « %s » comme un tableau"
+
+#: array.c:868
#, c-format
msgid "%s: empty (null)\n"
msgstr "%s: vide (null)\n"
-#: array.c:797
+#: array.c:873
#, c-format
msgid "%s: empty (zero)\n"
msgstr "%s: vide (zéro)\n"
-#: array.c:801
+#: array.c:877
#, c-format
msgid "%s: table_size = %d, array_size = %d\n"
msgstr "%s: table_size = %d, array_size = %d\n"
-#: array.c:830
+#: array.c:912
#, c-format
msgid "%s: is parameter\n"
msgstr "%s: est un paramètre\n"
-#: array.c:835
+#: array.c:916
#, c-format
msgid "%s: array_ref to %s\n"
msgstr "%s: array_ref de %s\n"
-#: awkgram.y:224 awkgram.y:227
+#: array.c:921
+#, fuzzy
+msgid "adump: argument not an array"
+msgstr "asort(): le premier argument n'est pas dans le tableau"
+
+#: array.c:1139
+#, fuzzy
+msgid "attempt to use array in a scalar context"
+msgstr "tentative d'utilisation du tableau « %s » dans un contexte scalaire"
+
+#: array.c:1236
+#, fuzzy
+msgid "asort: second argument not an array"
+msgstr "asort(): le scond argument n'est pas dans le tableau"
+
+#: array.c:1237
+#, fuzzy
+msgid "asorti: second argument not an array"
+msgstr "asort(): le scond argument n'est pas dans le tableau"
+
+#: array.c:1245
+#, fuzzy
+msgid "asort: first argument not an array"
+msgstr "asort(): le premier argument n'est pas dans le tableau"
+
+#: array.c:1246
+#, fuzzy
+msgid "asorti: first argument not an array"
+msgstr "asort(): le premier argument n'est pas dans le tableau"
+
+#: awkgram.y:246
#, c-format
msgid "%s blocks must have an action part"
msgstr "Les blocs %s doivent avoir une partie action"
-#: awkgram.y:230
+#: awkgram.y:249
msgid "each rule must have a pattern or an action part"
msgstr "chaqque règle doit avoir un patron ou une partie action"
-#: awkgram.y:266 awkgram.y:275
+#: awkgram.y:320 awkgram.y:330
#, fuzzy
msgid "old awk does not support multiple `BEGIN' or `END' rules"
msgstr "l'ancien awk ne supporte pas l'opérateur « ** »"
-#: awkgram.y:304
+#: awkgram.y:367
#, c-format
msgid "`%s' is a built-in function, it cannot be redefined"
msgstr "« %s » est une fonction interne, elle ne peut être redéfinie"
-#: awkgram.y:350
+#: awkgram.y:427
msgid "regexp constant `//' looks like a C++ comment, but is not"
msgstr ""
"la constante d'expression régulière « // » ressemble à un commentaire en C, "
"mais ne l'est pas"
-#: awkgram.y:353
+#: awkgram.y:430
#, c-format
msgid "regexp constant `/%s/' looks like a C comment, but is not"
msgstr ""
"la constante d'expression régulière « /%s/ » ressemble à un commentaire en C, "
"mais ne l'est pas"
-#: awkgram.y:380 awkgram.y:692
-msgid "statement may have no effect"
-msgstr "la déclaration peut n'avoir aucun effet"
+#: awkgram.y:735
+#, fuzzy
+msgid "`break' is not allowed outside a loop or switch"
+msgstr "« break » en dehors de la boucle n'est pas permis"
-#: awkgram.y:477 awkgram.y:480 awkgram.y:504 awkgram.y:511 awkgram.y:518
-#, c-format
-msgid "`%s' used in %s action"
+#: awkgram.y:744
+#, fuzzy
+msgid "`continue' is not allowed outside a loop"
+msgstr "« continue » en dehors de la boucle n'est pas permis"
+
+#: awkgram.y:753
+#, fuzzy, c-format
+msgid "`next' used in %s action"
msgstr "« %s » utilisé dans l'action %s"
-#: awkgram.y:495 awkgram.y:499
+#: awkgram.y:767 awkgram.y:771
msgid "`nextfile' is a gawk extension"
msgstr "« nextfile » est une extension de gawk"
-#: awkgram.y:528
+#: awkgram.y:775
+#, fuzzy, c-format
+msgid "`nextfile' used in %s action"
+msgstr "« %s » utilisé dans l'action %s"
+
+#: awkgram.y:799
msgid "`return' used outside function context"
msgstr "« return » utilisé en dehors du contexte d'une fonction"
-#: awkgram.y:570
+#: awkgram.y:859
msgid "plain `print' in BEGIN or END rule should probably be `print \"\"'"
msgstr ""
"utilisation de « print » dans une règle BEGIN ou END doit être probablement « "
"print \"\" »"
-#: awkgram.y:586 awkgram.y:594
+#: awkgram.y:927 awkgram.y:935
msgid "`delete array' is a gawk extension"
msgstr "« delete array » est une extension de gawk"
-#: awkgram.y:608 awkgram.y:616
+#: awkgram.y:955 awkgram.y:963
msgid "`delete(array)' is a non-portable tawk extension"
msgstr "« delete(array) » est une extension de tawk qui n'est pas portable"
-#: awkgram.y:660
+#: awkgram.y:1004
#, c-format
msgid "duplicate case values in switch body: %s"
msgstr "duplicata de valeur de case dans le corps du switch: %s"
-#: awkgram.y:670
-msgid "Duplicate `default' detected in switch body"
+#: awkgram.y:1014
+#, fuzzy
+msgid "duplicate `default' detected in switch body"
msgstr "duplicata de « default » détecté dans le corps du switch"
-#: awkgram.y:759
+#: awkgram.y:1151
msgid "multistage two-way pipelines don't work"
msgstr "pipelines bidirectionnel à multi-étapes ne fonctionnent pas"
-#: awkgram.y:850
+#: awkgram.y:1253
msgid "regular expression on right of assignment"
msgstr "expression régulière à la droite de l'affectation"
-#: awkgram.y:860
+#: awkgram.y:1263
msgid "regular expression on left of `~' or `!~' operator"
msgstr "expression régulière sur la gauche de l'opérateur « ~ » ou « !~ »"
-#: awkgram.y:866 awkgram.y:954
+#: awkgram.y:1278 awkgram.y:1423
#, fuzzy
msgid "old awk does not support the keyword `in' except after `for'"
msgstr "l'ancien awk ne supporte pas l'opérateur « ** »"
-#: awkgram.y:872
+#: awkgram.y:1287
msgid "regular expression on right of comparison"
msgstr "expression régulière sur la droite de la comparaison"
-#: awkgram.y:936
+#: awkgram.y:1399
#, fuzzy, c-format
-msgid "`getline var' invalid inside %s rule"
+msgid "`getline var' invalid inside `%s' rule"
msgstr "port distant invalide dans « %s »"
-#: awkgram.y:939
-#, c-format
-msgid "`getline' invalid inside %s rule"
-msgstr ""
+#: awkgram.y:1401
+#, fuzzy, c-format
+msgid "`getline' invalid inside `%s' rule"
+msgstr "port distant invalide dans « %s »"
-#: awkgram.y:944
+#: awkgram.y:1407
msgid "non-redirected `getline' undefined inside END action"
msgstr "« getline » non redirigé indéfini à l'intérieur de l'action END"
-#: awkgram.y:955
+#: awkgram.y:1424
#, fuzzy
msgid "old awk does not support multidimensional arrays"
msgstr "l'ancien awk ne supporte pas l'opérateur « ** »"
-#: awkgram.y:1001
+#: awkgram.y:1528
msgid "call of `length' without parentheses is not portable"
msgstr "l'appel de « length » sans les parenthèses n'est pas portable"
-#: awkgram.y:1006
-msgid "call of `length' without parentheses is deprecated by POSIX"
-msgstr "l'appel de « length » sans les parenthèses est déprécié par POSIX"
-
-#: awkgram.y:1051
+#: awkgram.y:1591
#, fuzzy
msgid "indirect function calls are a gawk extension"
-msgstr "« extension » est une extension de gawk"
+msgstr "« nextfile » est une extension de gawk"
-#: awkgram.y:1084
-msgid "use of non-array as array"
-msgstr "utilisation d'une entité qui n'est pas un tableau comme tableau"
+#: awkgram.y:1605
+#, fuzzy, c-format
+msgid "can not use special variable `%s' for indirect function call"
+msgstr "fonction « %s »: ne peut utilise le nom de la fonction comme paramètre"
-#: awkgram.y:1087
+#: awkgram.y:1682
msgid "invalid subscript expression"
msgstr "sous-expression invalide"
-#: awkgram.y:1329
+#: awkgram.y:1722
+msgid "use of non-array as array"
+msgstr "utilisation d'une entité qui n'est pas un tableau comme tableau"
+
+#: awkgram.y:1993
msgid "unexpected newline or end of string"
msgstr "nouvelle ligne inattendue ou fin de la chaîne"
-#: awkgram.y:1446
-msgid "empty program text on command line"
-msgstr "texte du programme sur la ligne de commande est vide"
-
-#: awkgram.y:1502
+#: awkgram.y:2248 awkgram.y:2296 awkgram.y:2470
#, c-format
msgid "can't open source file `%s' for reading (%s)"
msgstr "ne peut ouvrir le fichier source « %s » pour lecture (%s)"
-#: awkgram.y:1600
+#: awkgram.y:2249 awkgram.y:2297 builtin.c:122
+msgid "reason unknown"
+msgstr "raison inconnue"
+
+#: awkgram.y:2257
+#, fuzzy, c-format
+msgid "already included source file `%s'"
+msgstr "ne peut lire le fichier source « %s » (%s)"
+
+#: awkgram.y:2281
+#, fuzzy
+msgid "@include is a gawk extension"
+msgstr "« nextfile » est une extension de gawk"
+
+#: awkgram.y:2288
+msgid "empty filename after @include"
+msgstr ""
+
+#: awkgram.y:2422
+msgid "empty program text on command line"
+msgstr "texte du programme sur la ligne de commande est vide"
+
+#: awkgram.y:2537
#, c-format
msgid "can't read sourcefile `%s' (%s)"
msgstr "ne peut lire le fichier source « %s » (%s)"
-#: awkgram.y:1608
+#: awkgram.y:2547
#, c-format
msgid "source file `%s' is empty"
msgstr "fichier source « %s » est vide"
-#: awkgram.y:1800 awkgram.y:1922 awkgram.y:1940 awkgram.y:2315 awkgram.y:2407
+#: awkgram.y:2732
msgid "source file does not end in newline"
msgstr "fichier source ne se termine pas par un retour de chariot"
-#: awkgram.y:1862
+#: awkgram.y:2809
msgid "unterminated regexp ends with `\\' at end of file"
msgstr ""
"expression régulière non termineé se terminant par « \\ » à la fin du fichier"
-#: awkgram.y:1886
+#: awkgram.y:2833
#, c-format
msgid "%s: %d: tawk regex modifier `/.../%c' doesn't work in gawk"
msgstr ""
"%s: %d: modificateur d'exp. rég. tawk `/.../%c' ne peut opérer dans gawk"
-#: awkgram.y:1890
+#: awkgram.y:2837
#, c-format
msgid "tawk regex modifier `/.../%c' doesn't work in gawk"
msgstr "modificateur d'exp. rég. tawk `/.../%c' ne peut opérer dans gawk"
-#: awkgram.y:1897
+#: awkgram.y:2844
msgid "unterminated regexp"
msgstr "expression régulière non terminée"
-#: awkgram.y:1900
+#: awkgram.y:2848
msgid "unterminated regexp at end of file"
msgstr "expression régulière non terminée à la fin du fichier"
-#: awkgram.y:1969
+#: awkgram.y:2907
msgid "use of `\\ #...' line continuation is not portable"
msgstr ""
"utilisation de « \\ #... » comme continuation de ligne n'est pas portable"
-#: awkgram.y:1982
+#: awkgram.y:2923
msgid "backslash not last character on line"
msgstr "la barre oblique inverse n'est pas le dernier caractère sur la ligne"
-#: awkgram.y:2027
+#: awkgram.y:2984
msgid "POSIX does not allow operator `**='"
msgstr "POSIX ne permet un opérateur « **= »"
-#: awkgram.y:2029
+#: awkgram.y:2986
msgid "old awk does not support operator `**='"
msgstr "l'ancien awk ne supporte pas l'opérateur « **= »"
-#: awkgram.y:2038
+#: awkgram.y:2995
msgid "POSIX does not allow operator `**'"
msgstr "POSIX ne permet pas l'opérateur « ** »"
-#: awkgram.y:2040
+#: awkgram.y:2997
msgid "old awk does not support operator `**'"
msgstr "l'ancien awk ne supporte pas l'opérateur « ** »"
-#: awkgram.y:2071
+#: awkgram.y:3032
msgid "operator `^=' is not supported in old awk"
msgstr "l'opérateur « ^= » n'est pas supporté dans l'ancien awk"
-#: awkgram.y:2079
+#: awkgram.y:3040
msgid "operator `^' is not supported in old awk"
msgstr "l'opérateur « ^ » n'est pas supporté dans l'ancien awk"
-#: awkgram.y:2163 awkgram.y:2178
+#: awkgram.y:3133 awkgram.y:3149
msgid "unterminated string"
msgstr "chaîne non complétée"
-#: awkgram.y:2368
+#: awkgram.y:3345
#, c-format
msgid "invalid char '%c' in expression"
msgstr "caractère invalide « %c » dans l'expression"
-#: awkgram.y:2416
+#: awkgram.y:3391
#, c-format
msgid "`%s' is a gawk extension"
msgstr "« %s » est une extension de gawk"
-#: awkgram.y:2419
+#: awkgram.y:3394
#, c-format
msgid "`%s' is a Bell Labs extension"
msgstr "« %s » est une extension de Bell Labs"
-#: awkgram.y:2422
+#: awkgram.y:3397
#, c-format
msgid "POSIX does not allow `%s'"
msgstr "POSIX ne permet pas « %s »"
-#: awkgram.y:2426
+#: awkgram.y:3401
#, c-format
msgid "`%s' is not supported in old awk"
msgstr "« %s » n'est pas supporté dans l'ancien awk"
-#: awkgram.y:2452
+#: awkgram.y:3465
msgid "`goto' considered harmful!\n"
msgstr "« goto » considéré néfaste!\n"
-#: awkgram.y:2514
+#: awkgram.y:3518
#, c-format
msgid "%d is invalid as number of arguments for %s"
msgstr "%d est invalide comme nombre d'arguments pour %s"
-#: awkgram.y:2533 awkgram.y:2536
+#: awkgram.y:3544 awkgram.y:3547
msgid "match: third argument is a gawk extension"
msgstr "match: 3e argument est une extension de gawk"
-#: awkgram.y:2549
+#: awkgram.y:3575
#, c-format
msgid "%s: string literal as last arg of substitute has no effect"
msgstr ""
"%s: la chaîne litérale comme dernier arguement d'une substitution n'a aucun "
"effet"
-#: awkgram.y:2552
+#: awkgram.y:3580
#, c-format
msgid "%s third parameter is not a changeable object"
msgstr "3e paramètre %s n'est pas un objet interchangeable"
-#: awkgram.y:2586 awkgram.y:2589
+#: awkgram.y:3665 awkgram.y:3668
msgid "close: second argument is a gawk extension"
msgstr "close: 2e argument est une extension de gawk"
-#: awkgram.y:2599
+#: awkgram.y:3680
msgid "use of dcgettext(_\"...\") is incorrect: remove leading underscore"
msgstr ""
"utilisation de dcgettext(_\"...\") est incorrect: enlever les soulignés en "
"en-tête"
-#: awkgram.y:2614
+#: awkgram.y:3695
msgid "use of dcngettext(_\"...\") is incorrect: remove leading underscore"
msgstr ""
"utilisation de dcngettext(_\"...\") est incorrect: enlever les soulignés en "
"en-tête"
-#: awkgram.y:2686
+#: awkgram.y:3787
#, c-format
msgid "function `%s': parameter #%d, `%s', duplicates parameter #%d"
msgstr "fonction « %s »: paramètre #%d, « %s » est un double du paramètre #%d"
-#: awkgram.y:2719
+#: awkgram.y:3829
#, c-format
msgid "function `%s': parameter `%s' shadows global variable"
msgstr "fonction « %s »: paramètre « %s » porte ombrage à la variable globale"
-#: awkgram.y:2831
+#: awkgram.y:3987
#, c-format
msgid "could not open `%s' for writing (%s)"
msgstr "ne peut ourvrir « %s » en écriture (%s)"
-#: awkgram.y:2832 profile.c:96
+#: awkgram.y:3988 profile.c:85
msgid "sending profile to standard error"
msgstr "redirection du profile vers stderr"
-#: awkgram.y:2864
+#: awkgram.y:3994
#, c-format
msgid "%s: close failed (%s)"
msgstr "%s: échec de fermeture (%s)"
-#: awkgram.y:2985
+#: awkgram.y:4046
msgid "shadow_funcs() called twice!"
msgstr "shadows_funcs() appelé deux fois!"
-#: awkgram.y:3012
+#: awkgram.y:4052
msgid "there were shadowed variables."
msgstr "il y avait des variables ombragées"
-#: awkgram.y:3085
+#: awkgram.y:4081
#, c-format
msgid "function `%s': can't use function name as parameter name"
msgstr "fonction « %s »: ne peut utilise le nom de la fonction comme paramètre"
-#: awkgram.y:3088
+#: awkgram.y:4086
#, fuzzy, c-format
msgid "function `%s': can't use special variable `%s' as a function parameter"
msgstr "fonction « %s »: ne peut utilise le nom de la fonction comme paramètre"
-#: awkgram.y:3098
+#: awkgram.y:4102
#, c-format
msgid "function name `%s' previously defined"
msgstr "nom de la fonction « %s » définie précédemment"
-#: awkgram.y:3249 awkgram.y:3255
+#: awkgram.y:4271 awkgram.y:4277
#, c-format
msgid "function `%s' called but never defined"
msgstr "fonction « %s » appelé mais jamais définie"
-#: awkgram.y:3258
+#: awkgram.y:4280
#, c-format
msgid "function `%s' defined but never called"
msgstr "fonction « %s » définie mais jamais utilisée"
-#: awkgram.y:3285
+#: awkgram.y:4311
#, c-format
msgid "regexp constant for parameter #%d yields boolean value"
msgstr ""
"expression régulière constante pour le paramètre #%d conduit à une valeur "
"booléenne"
-#: awkgram.y:3329
+#: awkgram.y:4420
#, c-format
msgid ""
"function `%s' called with space between name and `(',\n"
"or used as a variable or an array"
msgstr ""
-"fonction « %s » appelée avec un espace entre son nom\n"
-"et « ( », ou utilisée comme variable ou tableau"
+"fonction « %s » appelée avec un espace entre le nom et « ( »,\n"
+"ou utilisé comme variable ou comme un tableau"
-#: awkgram.y:3750
-msgid "division by zero attempted in `/'"
-msgstr "tentative de division par zéro dans « / »"
+#: awkgram.y:4673 eval.c:1845
+msgid "division by zero attempted"
+msgstr "tentative de division par zéro"
-#: awkgram.y:3755 eval.c:1411
+#: awkgram.y:4682 eval.c:1877
#, c-format
msgid "division by zero attempted in `%%'"
-msgstr "tentative de division par zéro dans « %% »"
+msgstr "tentative de division par zéro dans « %% »"
+
+#: awkgram.y:5342
+msgid "statement may have no effect"
+msgstr "la déclaration peut n'avoir aucun effet"
-#: builtin.c:122
+#: builtin.c:120
#, c-format
msgid "%s to \"%s\" failed (%s)"
-msgstr "échec de %s vers « %s » (%s)"
+msgstr "%s vers « %s » échec (%s)"
-#: builtin.c:123
+#: builtin.c:121
msgid "standard output"
msgstr "sortie standard"
-#: builtin.c:124
-msgid "reason unknown"
-msgstr "raison inconnue"
-
-#: builtin.c:137
+#: builtin.c:135
msgid "exp: received non-numeric argument"
msgstr "exp: argument n'est pas numérique"
-#: builtin.c:143
+#: builtin.c:141
#, c-format
msgid "exp: argument %g is out of range"
msgstr "exp: argument %g est hors limite"
-#: builtin.c:201
+#: builtin.c:200
#, c-format
msgid "fflush: cannot flush: pipe `%s' opened for reading, not writing"
msgstr ""
"fflush: ne peut vider: le pipe « %s » est oouvert en lecture, pas en écriture"
-#: builtin.c:204
+#: builtin.c:203
#, c-format
msgid "fflush: cannot flush: file `%s' opened for reading, not writing"
msgstr ""
"fflush: ne peut vider: fichier « %s » ouvert en lecture, pas en écriture"
-#: builtin.c:216
+#: builtin.c:215
#, c-format
msgid "fflush: `%s' is not an open file, pipe or co-process"
msgstr ""
"fflush: « %s » n'est pas ni un fichier ouvert, un pipe ou un co-processus"
-#: builtin.c:310
+#: builtin.c:322
msgid "index: received non-string first argument"
msgstr "index: premier argument n'est pas une chaîne"
-#: builtin.c:312
+#: builtin.c:324
msgid "index: received non-string second argument"
msgstr "index: second argument n'est pas une chaîne"
-#: builtin.c:434
+#: builtin.c:446
msgid "int: received non-numeric argument"
msgstr "int: argument n'est pas numérique"
-#: builtin.c:464
+#: builtin.c:469
#, fuzzy
msgid "`length(array)' is a gawk extension"
msgstr "« delete array » est une extension de gawk"
-#: builtin.c:471
-msgid "length: untyped parameter argument will be forced to scalar"
-msgstr ""
-
-#: builtin.c:480
-msgid "length: untyped argument will be forced to scalar"
-msgstr ""
-
-#: builtin.c:484
+#: builtin.c:477
msgid "length: received non-string argument"
msgstr "length: argument n'est pas une chaîne"
-#: builtin.c:515
+#: builtin.c:508
msgid "log: received non-numeric argument"
msgstr "log: argument n'est pas numérique"
-#: builtin.c:518
+#: builtin.c:511
#, c-format
msgid "log: received negative argument %g"
msgstr "log: argument négatif %g"
-#: builtin.c:726 builtin.c:729
-msgid "must use `count$' on all formats or none"
-msgstr "doit utiliser « count$ » sur tous les formats ou aucun"
-
-#: builtin.c:790
-#, c-format
-msgid "field width is ignored for `%%%%' specifier"
-msgstr ""
-
-#: builtin.c:792
-#, c-format
-msgid "precision is ignored for `%%%%' specifier"
-msgstr ""
-
-#: builtin.c:794
-#, c-format
-msgid "field width and precision are ignored for `%%%%' specifier"
-msgstr ""
-
-#: builtin.c:845
-msgid "`$' is not permitted in awk formats"
-msgstr "« $ » n'est pas permis dans les formats awk"
-
-#: builtin.c:851
-msgid "arg count with `$' must be > 0"
-msgstr "décompte d'arguments avec « $ » doit être > 0"
-
-#: builtin.c:853
-#, c-format
-msgid "arg count %ld greater than total number of supplied arguments"
-msgstr "compteur d'arguments %ld est > que le nombre total d'arguments fournis"
-
-#: builtin.c:855
-msgid "`$' not permitted after period in format"
-msgstr "« $ » n'est pas permis après le point"
-
-#: builtin.c:868
-msgid "no `$' supplied for positional field width or precision"
-msgstr "aucun « $ » fourni dans le champ positionnel (longueur ou précision)"
-
-#: builtin.c:938
-msgid "`l' is meaningless in awk formats; ignored"
-msgstr "« l » n'a aucun sens dans les formats de awk; ignoré"
-
-#: builtin.c:942
-msgid "`l' is not permitted in POSIX awk formats"
-msgstr "« l » n'est pas permis dans les format POSIX de awk"
-
-#: builtin.c:953
-msgid "`L' is meaningless in awk formats; ignored"
-msgstr "« L » n'a aucun sens dans les formats s de awk; ignoré"
-
-#: builtin.c:957
-msgid "`L' is not permitted in POSIX awk formats"
-msgstr "« L » n'est pas permis dans les formats POSIX de awk"
-
-#: builtin.c:968
-msgid "`h' is meaningless in awk formats; ignored"
-msgstr "« h » n'a aucun send dans les formats de awk; ignoré"
-
-#: builtin.c:972
-msgid "`h' is not permitted in POSIX awk formats"
-msgstr "« h » n'est pas permis dans les formats POSIX de awk"
-
-#: builtin.c:1252
-#, c-format
-msgid "[s]printf: value %g is out of range for `%%%c' format"
-msgstr "[s]printf: valeur %g est hors limite pour le format « %%%c »"
-
-#: builtin.c:1332
-#, c-format
-msgid "ignoring unknown format specifier character `%c': no argument converted"
-msgstr ""
-
-#: builtin.c:1338
-msgid "not enough arguments to satisfy format string"
-msgstr "pas assez d'arguments pour satisfaire le format d'une chaîne"
-
-#: builtin.c:1340
-msgid "^ ran out for this one"
-msgstr "^ débordement pour celle-ci"
-
-#: builtin.c:1346
-msgid "[s]printf: format specifier does not have control letter"
-msgstr ""
-"[s]printf: spécificateur de format ne contient pas de lettre de contrôle"
-
-#: builtin.c:1349
-msgid "too many arguments supplied for format string"
-msgstr "trop d'arguments pour la chaîne de format"
+#: builtin.c:531 builtin.c:573 builtin.c:586 builtin.c:982 builtin.c:994
+#, fuzzy, c-format
+msgid "attempt to use array `%s' in scalar context"
+msgstr "tentative d'utilisation du tableau « %s » dans un contexte scalaire"
-#: builtin.c:1424 builtin.c:1427
+#: builtin.c:569 builtin.c:580
msgid "printf: no arguments"
msgstr "printf: aucun argument"
-#: builtin.c:1451
+#: builtin.c:621
msgid "sqrt: received non-numeric argument"
msgstr "sqrt: argument n'est pas numérique"
-#: builtin.c:1455
+#: builtin.c:625
#, c-format
msgid "sqrt: called with negative argument %g"
msgstr "sqrt: appelé avec un argument négatif %g"
-#: builtin.c:1479
-#, c-format
-msgid "substr: start index %g is invalid, using 1"
-msgstr "substr: début de l'index %g est invalide, utilise 1"
-
-#: builtin.c:1484
-#, c-format
-msgid "substr: non-integer start index %g will be truncated"
-msgstr "substr: début avec un nombre non entier %g sera tronqué"
-
-#: builtin.c:1510
+#: builtin.c:649
#, c-format
msgid "substr: length %g is not >= 1"
msgstr "substr: longueur %g n'est pas >= 1"
-#: builtin.c:1512
+#: builtin.c:651
#, c-format
msgid "substr: length %g is not >= 0"
msgstr "substr: longueur %g n'est pas >= 0"
-#: builtin.c:1519
+#: builtin.c:658
#, c-format
msgid "substr: non-integer length %g will be truncated"
msgstr "substr: longueur avec un nombre non entier %g sera tronqué"
-#: builtin.c:1524
+#: builtin.c:663
#, c-format
msgid "substr: length %g too big for string indexing, truncating to %g"
msgstr ""
"substr: longueur %g trop grande pour l'indexation de chaînes, truncation à %g"
-#: builtin.c:1536
+#: builtin.c:675
+#, c-format
+msgid "substr: start index %g is invalid, using 1"
+msgstr "substr: début de l'index %g est invalide, utilise 1"
+
+#: builtin.c:680
+#, c-format
+msgid "substr: non-integer start index %g will be truncated"
+msgstr "substr: début avec un nombre non entier %g sera tronqué"
+
+#: builtin.c:705
msgid "substr: source string is zero length"
msgstr "substr: chaîne de départ est de longueur zéro"
-#: builtin.c:1552
+#: builtin.c:721
#, c-format
msgid "substr: start index %g is past end of string"
msgstr "substr: début de l'index %g dépasse la fin de la chaîne"
-#: builtin.c:1560
+#: builtin.c:729
#, c-format
msgid ""
"substr: length %g at start index %g exceeds length of first argument (%lu)"
@@ -674,480 +657,439 @@ msgstr ""
"substr: longueur %g début avec l'index %g déborde la longueur du 1er "
"arguement (%lu)"
-#: builtin.c:1637
+#: builtin.c:806
+msgid "strftime: received non-numeric second argument"
+msgstr "strftime: second argument reçu n'est pas numérique"
+
+#: builtin.c:813
msgid "strftime: received non-string first argument"
msgstr "strftim: premier argument reçu n'est pas une chaîne"
-#: builtin.c:1643
+#: builtin.c:819
msgid "strftime: received empty format string"
msgstr "strftime: chaîne de format vide"
-#: builtin.c:1652
-msgid "strftime: received non-numeric second argument"
-msgstr "strftime: second argument reçu n'est pas numérique"
-
-#: builtin.c:1729
+#: builtin.c:885
msgid "mktime: received non-string argument"
msgstr "mktime: argument n'est pas une chaîne"
-#: builtin.c:1746
+#: builtin.c:902
msgid "mktime: at least one of the values is out of the default range"
msgstr ""
-#: builtin.c:1781
+#: builtin.c:937
msgid "'system' function not allowed in sandbox mode"
msgstr ""
-#: builtin.c:1786
+#: builtin.c:942
msgid "system: received non-string argument"
msgstr "system: argument reçu n'est pas une chaîne"
-#: builtin.c:1907 eval.c:2285
+#: builtin.c:997 eval.c:1105 eval.c:1557 eval.c:1570
+#, c-format
+msgid "reference to uninitialized variable `%s'"
+msgstr "référence à une variable non initialisée « %s »"
+
+#: builtin.c:1064
#, c-format
msgid "reference to uninitialized field `$%d'"
msgstr "référence à un champ non initialisé « $%d »"
-#: builtin.c:2012
+#: builtin.c:1098
msgid "tolower: received non-string argument"
msgstr "tolower: argument reçu n'est pas une chaîne"
-#: builtin.c:2042
+#: builtin.c:1151
msgid "toupper: received non-string argument"
msgstr "toupper: argument reçu n'est pas une chaîne"
-#: builtin.c:2075
+#: builtin.c:1199
msgid "atan2: received non-numeric first argument"
msgstr "atan2: premier argument n'est pas numérique"
-#: builtin.c:2077
+#: builtin.c:1201
msgid "atan2: received non-numeric second argument"
msgstr "atan2: second argument n'est pas numérique"
-#: builtin.c:2096
+#: builtin.c:1220
msgid "sin: received non-numeric argument"
msgstr "sin: argument n'est pas numérique"
-#: builtin.c:2112
+#: builtin.c:1236
msgid "cos: received non-numeric argument"
msgstr "cos: argument n'est pas numérique"
-#: builtin.c:2165
+#: builtin.c:1289
msgid "srand: received non-numeric argument"
msgstr "srand: argument n'est pas numérique"
-#: builtin.c:2200
+#: builtin.c:1320
msgid "match: third argument is not an array"
msgstr "match: le 3e argument n'est pas un tableau"
-#: builtin.c:2750
+#: builtin.c:1827
msgid "gensub: third argument of 0 treated as 1"
msgstr "gensub: le 3e argument de 0 traité comme un 1"
-#: builtin.c:2866
+#: builtin.c:1869
msgid "lshift: received non-numeric first argument"
msgstr "lshift: premier argument n'est pas numérique"
-#: builtin.c:2868
+#: builtin.c:1871
msgid "lshift: received non-numeric second argument"
msgstr "lshift: second argument reçu n'est pas numérique"
-#: builtin.c:2874
+#: builtin.c:1877
#, c-format
msgid "lshift(%lf, %lf): negative values will give strange results"
msgstr "lshift(%lf, %lf): valeurs négatives donneront d'étranges résultats"
-#: builtin.c:2876
+#: builtin.c:1879
#, c-format
msgid "lshift(%lf, %lf): fractional values will be truncated"
msgstr "lshift(%lf, %lf): valeurs fractionnaires seront tronquées"
-#: builtin.c:2878
+#: builtin.c:1881
#, c-format
msgid "lshift(%lf, %lf): too large shift value will give strange results"
msgstr "lshift(%lf, %lf): trop grand déplacement donnera d'étranges résultats"
-#: builtin.c:2904
+#: builtin.c:1908
msgid "rshift: received non-numeric first argument"
msgstr "rshift: premier argument n'est pas numérique"
-#: builtin.c:2906
+#: builtin.c:1910
msgid "rshift: received non-numeric second argument"
msgstr "rshift: second argument reçu n'est pas numérique"
-#: builtin.c:2912
+#: builtin.c:1916
#, c-format
msgid "rshift(%lf, %lf): negative values will give strange results"
msgstr "rshift(%lf, %lf): valeurs négatives donneront d'étranges résultats"
-#: builtin.c:2914
+#: builtin.c:1918
#, c-format
msgid "rshift(%lf, %lf): fractional values will be truncated"
msgstr "rshift(%lf, %lf): valeurs fractionnaires seront tronquées"
-#: builtin.c:2916
+#: builtin.c:1920
#, c-format
msgid "rshift(%lf, %lf): too large shift value will give strange results"
msgstr "rshift(%lf, %lf): trop grand déplacement donnera d'étranges résultats"
-#: builtin.c:2942
+#: builtin.c:1947
msgid "and: received non-numeric first argument"
msgstr "and: premier argument n'est pas numérique"
-#: builtin.c:2944
+#: builtin.c:1949
msgid "and: received non-numeric second argument"
msgstr "and: second argument reçu n'est pas numérique"
-#: builtin.c:2950
+#: builtin.c:1955
#, c-format
msgid "and(%lf, %lf): negative values will give strange results"
msgstr "and(%lf, %lf): valeurs négatives donneront d'étranges résultats"
-#: builtin.c:2952
+#: builtin.c:1957
#, c-format
msgid "and(%lf, %lf): fractional values will be truncated"
msgstr "and(%lf, %lf): valeurs fractionnaires seront tronquées"
-#: builtin.c:2978
+#: builtin.c:1984
msgid "or: received non-numeric first argument"
msgstr "or: premier argument n'est pas numérique"
-#: builtin.c:2980
+#: builtin.c:1986
msgid "or: received non-numeric second argument"
msgstr "or: second argument reçu n'est pas numérique"
-#: builtin.c:2986
+#: builtin.c:1992
#, c-format
msgid "or(%lf, %lf): negative values will give strange results"
msgstr "or(%lf, %lf): valeurs négatives donneront d'étranges résultats"
-#: builtin.c:2988
+#: builtin.c:1994
#, c-format
msgid "or(%lf, %lf): fractional values will be truncated"
msgstr "or(%lf, %lf): valeurs fractionnaires seront tronquées"
-#: builtin.c:3014
+#: builtin.c:2023
msgid "xor: received non-numeric first argument"
msgstr "xor: premier argument n'est pas numérique"
-#: builtin.c:3016
+#: builtin.c:2025
msgid "xor: received non-numeric second argument"
msgstr "xor: second argument reçu n'est pas numérique"
-#: builtin.c:3022
+#: builtin.c:2031
#, c-format
msgid "xor(%lf, %lf): negative values will give strange results"
msgstr "xor(%lf, %lf): valeurs négatives donneront d'étranges résultats"
-#: builtin.c:3024
+#: builtin.c:2033
#, c-format
msgid "xor(%lf, %lf): fractional values will be truncated"
msgstr "xor(%lf, %lf): valeurs fractionnaires seront tronquées"
-#: builtin.c:3048
+#: builtin.c:2057 builtin.c:2063
msgid "compl: received non-numeric argument"
msgstr "compl: argument n'est pas numérique"
-#: builtin.c:3054
+#: builtin.c:2065
#, c-format
msgid "compl(%lf): negative value will give strange results"
msgstr "compl(%lf): valeurs négatives donneront d'étranges résultats"
-#: builtin.c:3056
+#: builtin.c:2067
#, c-format
msgid "compl(%lf): fractional value will be truncated"
msgstr "compl(%lf): valeurs fractionnaires seront tronquées"
-#: builtin.c:3229
+#: builtin.c:2237
#, c-format
msgid "dcgettext: `%s' is not a valid locale category"
msgstr "dcgettext: « %s » n'est pas dans un catégorie de localisation valide"
-#: eval.c:374
+#: eval.c:412
#, c-format
msgid "unknown nodetype %d"
msgstr "type de noeud inconnu %d"
-#: eval.c:423
-msgid "buffer overflow in genflags2str"
-msgstr "débordement de tampo dans genflag2str"
+#: eval.c:423 eval.c:437
+#, fuzzy, c-format
+msgid "unknown opcode %d"
+msgstr "type de noeud inconnu %d"
-#: eval.c:455 eval.c:461 profile.c:787
+#: eval.c:434
#, c-format
-msgid "attempt to use array `%s' in a scalar context"
-msgstr "tentative d'utilisation du tableau « %s » dans un contexte scalaire"
+msgid "opcode %s not an operator or keyword"
+msgstr ""
+
+#: eval.c:487
+msgid "buffer overflow in genflags2str"
+msgstr "débordement de tampo dans genflag2str"
-#: eval.c:803
+#: eval.c:613
#, c-format
-msgid "for loop: array `%s' changed size from %ld to %ld during loop execution"
+msgid ""
+"\n"
+"\t# Function Call Stack:\n"
+"\n"
msgstr ""
-"for loop: tableau « %s » a changé de taille de %ld à %ld durant l'exécution "
-"de la boucle"
-
-#: eval.c:824
-msgid "`break' outside a loop is not portable"
-msgstr "« break » en dehors de la boucle n'est pas portable"
+"\n"
+"\t# Appel d'une fonction sur la pile:\n"
+"\n"
-#: eval.c:828
-msgid "`break' outside a loop is not allowed"
-msgstr "« break » en dehors de la boucle n'est pas permis"
+#: eval.c:640
+msgid "`IGNORECASE' is a gawk extension"
+msgstr "« IGNORECASE » est une extension de gawk"
-#: eval.c:845
-msgid "`continue' outside a loop is not portable"
-msgstr "« continue » en dehors de la boucle n'est pas portable"
+#: eval.c:669
+msgid "`BINMODE' is a gawk extension"
+msgstr "« BINMODE » est une extension de gawk"
-#: eval.c:849
-msgid "`continue' outside a loop is not allowed"
-msgstr "« continue » en dehors de la boucle n'est pas permis"
+#: eval.c:727
+#, c-format
+msgid "BINMODE value `%s' is invalid, treated as 3"
+msgstr ""
-#: eval.c:883
-msgid "`next' cannot be called from a BEGIN rule"
-msgstr "« next » ne peut être appelé depuis une règle BEGIN"
+#: eval.c:817
+#, c-format
+msgid "bad `%sFMT' specification `%s'"
+msgstr "« %sFMT » spécification erronée « %s »"
-#: eval.c:885
-msgid "`next' cannot be called from an END rule"
-msgstr "« next » ne peut être appelé depuis une règle END"
+#: eval.c:895
+msgid "turning off `--lint' due to assignment to `LINT'"
+msgstr "désactivation « --lint » en raison d'une affectation à « LINT »"
-#: eval.c:887
-#, fuzzy
-msgid "`next' cannot be called from a BEGINFILE rule"
-msgstr "« next » ne peut être appelé depuis une règle BEGIN"
+#: eval.c:1067 eval.c:1544
+#, c-format
+msgid "can't use function name `%s' as variable or array"
+msgstr "ne peut utiliser le nom de la fonction « %s » comme variable ou tableau"
-#: eval.c:889
-#, fuzzy
-msgid "`next' cannot be called from an ENDFILE rule"
-msgstr "« next » ne peut être appelé depuis une règle END"
+#: eval.c:1095
+msgid "assignment is not allowed to result of builtin function"
+msgstr ""
+"l'affectation n'est pas permise pour obtenir un résultat d'une fonction "
+"interne"
-#: eval.c:898
-msgid "`nextfile' cannot be called from a BEGIN rule"
-msgstr "« nextfile » ne peut être appelé depuis une règle BEGIN"
+#: eval.c:1104 eval.c:1556 eval.c:1569
+#, c-format
+msgid "reference to uninitialized argument `%s'"
+msgstr "référence à un argument non initialisé « %s »"
-#: eval.c:900
-msgid "`nextfile' cannot be called from an END rule"
-msgstr "« nextfile » ne peut être appelé depuis une règle END"
+#: eval.c:1123
+msgid "attempt to field reference from non-numeric value"
+msgstr "tentative de référence un champ à partir d'une valeur non numérique"
-#: eval.c:906
+#: eval.c:1125
#, fuzzy
-msgid "`nextfile' cannot be called from an ENDFILE rule"
-msgstr "« nextfile » ne peut être appelé depuis une règle END"
+msgid "attempt to field reference from null string"
+msgstr "tentative de référence à partir d'une chaîne nulle"
-#: eval.c:963
-msgid "statement has no effect"
-msgstr "la déclaration n'a aucun effet"
+#: eval.c:1131
+#, fuzzy, c-format
+msgid "attempt to access field %ld"
+msgstr "tentative d'accès du champ %d"
-#: eval.c:1040 eval.c:2133
-#, c-format
-msgid "can't use function name `%s' as variable or array"
-msgstr "ne peut utiliser le nom de la fonction « %s » comme variable ou tableau"
+#: eval.c:1140
+#, fuzzy, c-format
+msgid "reference to uninitialized field `$%ld'"
+msgstr "référence à un champ non initialisé « $%d »"
-#: eval.c:1047 eval.c:1053
+#: eval.c:1202
#, c-format
-msgid "reference to uninitialized argument `%s'"
-msgstr "référence à un argument non initialisé « %s »"
+msgid "function `%s' called with more arguments than declared"
+msgstr "fonction « %s » appelée avec plus d'arguments que déclarées"
-#: eval.c:1062 eval.c:2142
+#: eval.c:1358
#, c-format
-msgid "reference to uninitialized variable `%s'"
-msgstr "référence à une variable non initialisée « %s »"
-
-#: eval.c:1210
-msgid ""
-"concatenation: side effects in one expression have changed the length of "
-"another!"
+msgid "unwind_stack: unexpected type `%s'"
msgstr ""
-"concaténation: effects de bord dans une expression a modifié la longueur "
-"d'une autre!"
-#: eval.c:1315
+#: eval.c:1636
+#, fuzzy, c-format
+msgid "attempt to use scalar `%s' as an array"
+msgstr "tentative d'utilisation du scalaire « %s » comme un tableau"
+
+#: eval.c:1680
msgid "assignment used in conditional context"
msgstr "affectation utilisé dans un contexte conditionnel"
-#: eval.c:1396
-msgid "division by zero attempted"
-msgstr "tentative de division par zéro"
-
-#: eval.c:1426 profile.c:663
-#, c-format
-msgid "illegal type (%s) in tree_eval"
-msgstr "type illégal (%s) dans tree_eval"
+#: eval.c:1684
+msgid "statement has no effect"
+msgstr "la déclaration n'a aucun effet"
-#: eval.c:1589
+#: eval.c:2028
msgid "division by zero attempted in `/='"
msgstr "tentative de division par zéro dans « /= »"
-#: eval.c:1611
+#: eval.c:2053
#, c-format
msgid "division by zero attempted in `%%='"
msgstr "tentative de division par zéro dans « %%= »"
-#: eval.c:1891
-#, c-format
-msgid "function `%s' called with more arguments than declared"
-msgstr "fonction « %s » appelée avec plus d'arguments que déclarées"
-
-#: eval.c:1948
-#, c-format
-msgid "function `%s' not defined"
-msgstr "fonction « %s » non définie"
-
-#: eval.c:1950
-#, c-format
-msgid "identifier `%s' is not a function"
-msgstr ""
-
-#: eval.c:1997
-#, c-format
-msgid ""
-"function parameter `%s' is not a scalar and cannot be used for indirect "
-"function call"
-msgstr ""
-
-#: eval.c:2014
-#, c-format
-msgid "indirect call of real function `%s' is silly"
-msgstr ""
+#: eval.c:2139
+msgid "`continue' outside a loop is not allowed"
+msgstr "« continue » en dehors de la boucle n'est pas permis"
-#: eval.c:2034
-#, c-format
-msgid "function `%s' called indirectly through `%s' does not exist"
-msgstr ""
+#: eval.c:2145
+#, fuzzy
+msgid "`break' outside a loop is not allowed"
+msgstr "« break » en dehors de la boucle n'est pas permis"
-#: eval.c:2039
+#: eval.c:2229
#, c-format
-msgid "identifier `%s' cannot be used for indirect function call"
+msgid "for loop: array `%s' changed size from %ld to %ld during loop execution"
msgstr ""
+"for loop: tableau « %s » a changé de taille de %ld à %ld durant l'exécution "
+"de la boucle"
-#: eval.c:2105
+#: eval.c:2342
#, c-format
-msgid ""
-"\n"
-"\t# Function Call Stack:\n"
-"\n"
+msgid "function called indirectly through `%s' does not exist"
msgstr ""
-"\n"
-"\t# Appel d'une fonction sur la pile:\n"
-"\n"
-#: eval.c:2108
+#: eval.c:2354
#, c-format
-msgid "\t# -- main --\n"
-msgstr "#t# -- main --\n"
-
-#: eval.c:2269
-msgid "attempt to field reference from non-numeric value"
-msgstr "tentative de référence un champ à partir d'une valeur non numérique"
-
-#: eval.c:2271
-msgid "attempt to reference from null string"
-msgstr "tentative de référence à partir d'une chaîne nulle"
-
-#: eval.c:2277
-#, c-format
-msgid "attempt to access field %d"
-msgstr "tentative d'accès du champ %d"
-
-#: eval.c:2298 eval.c:2305 profile.c:843
-msgid "assignment is not allowed to result of builtin function"
-msgstr ""
-"l'affectation n'est pas permise pour obtenir un résultat d'une fonction "
-"interne"
+msgid "function `%s' not defined"
+msgstr "fonction « %s » non définie"
-#: eval.c:2369
-msgid "`IGNORECASE' is a gawk extension"
-msgstr "« IGNORECASE » est une extension de gawk"
+#: eval.c:2481
+#, fuzzy, c-format
+msgid "`nextfile' cannot be called from a `%s' rule"
+msgstr "« nextfile » ne peut être appelé depuis une règle END"
-#: eval.c:2398
-msgid "`BINMODE' is a gawk extension"
-msgstr "« BINMODE » est une extension de gawk"
+#: eval.c:2540
+#, fuzzy, c-format
+msgid "`next' cannot be called from a `%s' rule"
+msgstr "« next » ne peut être appelé depuis une règle END"
-#: eval.c:2456
+#: eval.c:2602
#, c-format
-msgid "BINMODE value `%s' is invalid, treated as 3"
+msgid "Sorry, don't know how to interpret `%s'"
msgstr ""
-#: eval.c:2546
-#, c-format
-msgid "bad `%sFMT' specification `%s'"
-msgstr "« %sFMT » spécification erronée « %s »"
-
-#: eval.c:2624
-msgid "turning off `--lint' due to assignment to `LINT'"
-msgstr "désactivation « --lint » en raison d'une affectation à « LINT »"
-
-#: ext.c:61
-msgid "extensions not allowed in sandbox mode"
+#: ext.c:62
+msgid "extensions are not allowed in sandbox mode"
msgstr ""
-#: ext.c:65 ext.c:70
+#: ext.c:68 ext.c:73
msgid "`extension' is a gawk extension"
msgstr "« extension » est une extension de gawk"
-#: ext.c:80
-#, c-format
-msgid "extension: cannot open `%s' (%s)\n"
+#: ext.c:83
+#, fuzzy, c-format
+msgid "fatal: extension: cannot open `%s' (%s)\n"
msgstr "extension: ne peut ouvrir « %s » (%s)\n"
-#: ext.c:88
-#, c-format
-msgid "extension: library `%s': cannot call function `%s' (%s)\n"
+#: ext.c:93
+#, fuzzy, c-format
+msgid "fatal: extension: library `%s': cannot call function `%s' (%s)\n"
msgstr "extension: librairie « %s »: ne peut appeler la fonction « %s » (%s)\n"
-#: ext.c:108
+#: ext.c:123
msgid "extension: missing function name"
msgstr "extension: nom de fonction manquant"
-#: ext.c:113
+#: ext.c:128
#, c-format
msgid "extension: illegal character `%c' in function name `%s'"
msgstr "extension: caractère illégal « %c » dans le nom de la fonction « %s »"
-#: ext.c:119
+#: ext.c:137
#, c-format
msgid "extension: can't redefine function `%s'"
msgstr "extension: ne peut redéfinir la fonction « %s »"
-#: ext.c:123
+#: ext.c:141
#, c-format
msgid "extension: function `%s' already defined"
msgstr "extension: fonction « %s » est déjà définie"
-#: ext.c:128
+#: ext.c:146
+#, c-format
+msgid "extension: function name `%s' previously defined"
+msgstr "extension: nom de la fonction « %s » définie précédemment"
+
+#: ext.c:148
#, c-format
msgid "extension: can't use gawk built-in `%s' as function name"
msgstr ""
"extension: ne peut utilisé la fonction interne gawk « %s » comme nom de "
"fonction"
-#: ext.c:130
+#: ext.c:152
#, c-format
-msgid "extension: function name `%s' previously defined"
-msgstr "extension: nom de la fonction « %s » définie précédemment"
+msgid "make_builtin: negative argument count for function `%s'"
+msgstr ""
-#: ext.c:207
-#, c-format
+#: ext.c:255
+#, fuzzy, c-format
msgid "function `%s' defined to take no more than %d argument(s)"
msgstr ""
"fonction « %s » est définie pour ne prendre pas plus de « %d » argument(s)"
-#: ext.c:210
+#: ext.c:258
#, c-format
msgid "function `%s': missing argument #%d"
msgstr "fonction « %s »: argument #%d manquant"
-#: ext.c:220
+#: ext.c:268
#, c-format
msgid "function `%s': argument #%d: attempt to use scalar as an array"
msgstr ""
"fonction « %s »: argument #%d: tentative d'utilisation du scalaire comme un "
"tableau"
-#: ext.c:224
+#: ext.c:272
#, c-format
msgid "function `%s': argument #%d: attempt to use array as a scalar"
msgstr ""
"fonction « %s »: argument #%d: tentative d'utiliser un tableau comme un "
"scalaire"
-#: ext.c:249
+#: ext.c:285
msgid "Operation Not Supported"
msgstr "Opération non supportée"
@@ -1155,59 +1097,58 @@ msgstr "Opération non supportée"
msgid "NF set to negative value"
msgstr "NF initialisé avec une valeur négative"
-#: field.c:913
-msgid "split: second argument is not an array"
-msgstr "split: 2e argument n'est pas un tableau"
-
-#: field.c:922 field.c:932 field.c:937
+#: field.c:939 field.c:946 field.c:950
#, fuzzy
msgid "split: fourth argument is a gawk extension"
msgstr "match: 3e argument est une extension de gawk"
-#: field.c:928
+#: field.c:943
#, fuzzy
msgid "split: fourth argument is not an array"
msgstr "split: 2e argument n'est pas un tableau"
-#: field.c:975
-#, fuzzy
-msgid "split: null string for third argument is a gawk extension"
+#: field.c:957
+msgid "split: second argument is not an array"
+msgstr "split: 2e argument n'est pas un tableau"
+
+#: field.c:987
+msgid "split: null string for third arg is a gawk extension"
msgstr "split: chaîne vide pour le 3e argument est une extension de gawk"
-#: field.c:1032
+#: field.c:1028
#, fuzzy
-msgid "patsplit: second argument is not an array"
+msgid "patsplit: fourth argument is not an array"
msgstr "split: 2e argument n'est pas un tableau"
-#: field.c:1041
+#: field.c:1033
#, fuzzy
-msgid "patsplit: fourth argument is not an array"
+msgid "patsplit: second argument is not an array"
msgstr "split: 2e argument n'est pas un tableau"
-#: field.c:1067
+#: field.c:1051
#, fuzzy
msgid "patsplit: third argument must be non-null"
msgstr "match: le 3e argument n'est pas un tableau"
-#: field.c:1111
+#: field.c:1084
msgid "`FIELDWIDTHS' is a gawk extension"
msgstr "« FIELDWIDTHS » est une extension de gawk"
-#: field.c:1141 field.c:1155
+#: field.c:1147
#, c-format
msgid "invalid FIELDWIDTHS value, near `%s'"
msgstr "valeur de FIELDWIDTHS invalide, près de `%s'"
-#: field.c:1238
+#: field.c:1220
msgid "null string for `FS' is a gawk extension"
msgstr "chaîne vide pour « FS » est une extension de gawk"
-#: field.c:1242
+#: field.c:1224
#, fuzzy
msgid "old awk does not support regexps as value of `FS'"
msgstr "l'ancien awk ne supporte pas l'opérateur « ** »"
-#: field.c:1357
+#: field.c:1343
#, fuzzy
msgid "`FPAT' is a gawk extension"
msgstr "« %s » est une extension de gawk"
@@ -1267,507 +1208,504 @@ msgstr "%s: l'option « -W %s » ne requiert pas d'arguement\n"
msgid "%s: option '-W %s' requires an argument\n"
msgstr "%s: l'option « %s » requiert un argument\n"
-#: io.c:379
+#: io.c:272
#, c-format
msgid "command line argument `%s' is a directory: skipped"
msgstr ""
-#: io.c:413
+#: io.c:275 io.c:372
#, c-format
msgid "cannot open file `%s' for reading (%s)"
msgstr "ne peut ouvrir le fichier « %s » en lecture (%s)"
-#: io.c:459 io.c:2999
+#: io.c:419
#, c-format
msgid "error reading input file `%s': %s"
msgstr "erreur lors de la lecture du fichier source « %s »: %s"
-#: io.c:506
+#: io.c:470
#, c-format
msgid "close of fd %d (`%s') failed (%s)"
msgstr "fermeture de fd %d (« %s ») en échec (%s)"
-#: io.c:617
-msgid "redirection not allowed in sandbox mode"
-msgstr ""
-
-#: io.c:648
-#, c-format
-msgid "invalid tree type %s in redirect()"
-msgstr "type d'arbre invalide %s dans redirect()"
-
-#: io.c:654
+#: io.c:577
#, c-format
msgid "expression in `%s' redirection only has numeric value"
msgstr ""
"l'expression de la redirection de « %s » a seulement une valeur numérique"
-#: io.c:660
+#: io.c:583
#, c-format
msgid "expression for `%s' redirection has null string value"
msgstr ""
"l'expression de la redirection de « %s » a une valeur nulle pour la chaîne"
-#: io.c:665
+#: io.c:589
#, c-format
msgid "filename `%s' for `%s' redirection may be result of logical expression"
msgstr ""
"nom de fichier « %s » pour le redirection « %s » peut être le résultat d'une "
"expression logique"
-#: io.c:707
+#: io.c:628
#, c-format
msgid "unnecessary mixing of `>' and `>>' for file `%.*s'"
msgstr "mélange non nécessaire de « > » et de « >> » pour le fichier « %.*s »"
-#: io.c:754
+#: io.c:681
#, c-format
msgid "can't open pipe `%s' for output (%s)"
msgstr "ne peut ouvrir un pipe « %s » en sortie (%s)"
-#: io.c:763
+#: io.c:691
#, c-format
msgid "can't open pipe `%s' for input (%s)"
msgstr "ne peut ouvrir un pipe « %s » en entrée (%s)"
-#: io.c:786
+#: io.c:712
#, c-format
msgid "can't open two way pipe `%s' for input/output (%s)"
msgstr ""
"ne peut ouvrir un pipe bidirectionnel « %s » pour les entrées/sorties (%s)"
-#: io.c:864
+#: io.c:794
#, c-format
msgid "can't redirect from `%s' (%s)"
msgstr "ne peut rediriger de « %s » (%s)"
-#: io.c:867
+#: io.c:797
#, c-format
msgid "can't redirect to `%s' (%s)"
msgstr "ne peut rediriger vers « %s » (%s)"
-#: io.c:920
+#: io.c:846
msgid ""
"reached system limit for open files: starting to multiplex file descriptors"
msgstr ""
"limite système atteinte pour l'ouverture des fichiers: début du multiplexage "
"des descripteurs de fichiers"
-#: io.c:936
+#: io.c:862
#, c-format
msgid "close of `%s' failed (%s)."
msgstr "fermeture de « %s » en échec (%s)"
-#: io.c:944
+#: io.c:870
msgid "too many pipes or input files open"
msgstr "trop de pipes ou de fichiers en lecture ouverts"
-#: io.c:967
+#: io.c:892
msgid "close: second argument must be `to' or `from'"
msgstr "close: 2e argument doit être « to » ou « from »"
-#: io.c:981
+#: io.c:909
#, c-format
msgid "close: `%.*s' is not an open file, pipe or co-process"
msgstr "close: « %.*s » n'est pas ni un fichier ouvert, pipe ou co-processus"
-#: io.c:986
+#: io.c:914
msgid "close of redirection that was never opened"
msgstr "fermeture de la redirection qui n'a jamais été ouverte"
-#: io.c:1083
+#: io.c:1011
#, c-format
msgid "close: redirection `%s' not opened with `|&', second argument ignored"
msgstr ""
"close: redirection « %s » n'a pas été ouverte ave « |& » 2e argument ignoré"
-#: io.c:1099
+#: io.c:1027
#, c-format
msgid "failure status (%d) on pipe close of `%s' (%s)"
msgstr "constat d'échec (%d) lors de la fermeture du pipe « %s » (%s)"
-#: io.c:1102
+#: io.c:1030
#, c-format
msgid "failure status (%d) on file close of `%s' (%s)"
msgstr "constat d'échec (%d) lors de la fermeture du fichier « %s » (%s)"
-#: io.c:1122
+#: io.c:1050
#, c-format
msgid "no explicit close of socket `%s' provided"
msgstr "aucune fermeture explicite du socket « %s » fournie"
-#: io.c:1125
+#: io.c:1053
#, c-format
msgid "no explicit close of co-process `%s' provided"
msgstr "aucune fermeture explicite du co-processus « %s » fournie"
-#: io.c:1128
+#: io.c:1056
#, c-format
msgid "no explicit close of pipe `%s' provided"
msgstr "aucune fermeture explicite du pipe « %s » fournie"
-#: io.c:1131
+#: io.c:1059
#, c-format
msgid "no explicit close of file `%s' provided"
msgstr "aucune fermeture explicite du fichier « %s » fournie"
-#: io.c:1159 io.c:1214 main.c:832 main.c:874
+#: io.c:1087 io.c:1142 main.c:823 main.c:865
#, c-format
msgid "error writing standard output (%s)"
msgstr "erreur lors de l'écriture vers stdout (%s)"
-#: io.c:1163 io.c:1219
+#: io.c:1091 io.c:1147
#, c-format
msgid "error writing standard error (%s)"
msgstr "erreur lors de l'écriture vers stderr (%s)"
-#: io.c:1171
+#: io.c:1099
#, c-format
msgid "pipe flush of `%s' failed (%s)."
msgstr "vidange du pipie de « %s » en échec (%s)"
-#: io.c:1174
+#: io.c:1102
#, c-format
msgid "co-process flush of pipe to `%s' failed (%s)."
msgstr "vidange du pipe par le co-processus vers « %s » en échec (%s)"
-#: io.c:1177
+#: io.c:1105
#, c-format
msgid "file flush of `%s' failed (%s)."
msgstr "vidange du fichier « %s » en échec (%s)"
-#: io.c:1292
+#: io.c:1219
#, fuzzy, c-format
msgid "local port %s invalid in `/inet'"
msgstr "port local invalide dans « %s »"
-#: io.c:1309
+#: io.c:1236
#, c-format
msgid "remote host and port information (%s, %s) invalid"
msgstr ""
-#: io.c:1344
+#: io.c:1276
msgid "/inet/raw client not ready yet, sorry"
msgstr "le client /inet/raw n'est pas encore prêt, désolé"
-#: io.c:1347 io.c:1383
+#: io.c:1279 io.c:1320
msgid "only root may use `/inet/raw'."
msgstr "seul root peut utiliser « /inet/raw »"
-#: io.c:1381
+#: io.c:1318
msgid "/inet/raw server not ready yet, sorry"
msgstr "le serveur /inet/raw n'est pas encore prêt, désolé"
-#: io.c:1477
+#: io.c:1417
#, c-format
msgid "no (known) protocol supplied in special filename `%s'"
msgstr "aucun protocole (connu) fourni dans le nom de fichier spécial « %s »"
-#: io.c:1491
+#: io.c:1431
#, c-format
msgid "special file name `%s' is incomplete"
msgstr "nom spécial de fichier « %s » est incomplet"
-#: io.c:1506
+#: io.c:1447
msgid "must supply a remote hostname to `/inet'"
msgstr "un nom de hôte distant doit être fourni à « /inet »"
-#: io.c:1524
+#: io.c:1465
msgid "must supply a remote port to `/inet'"
msgstr "un port distant doit être fournis à « /inet »"
-#: io.c:1570
+#: io.c:1511
msgid "TCP/IP communications are not supported"
msgstr "les communications TCP/IP ne sont pas supportées"
-#: io.c:1758
+#: io.c:1698
#, c-format
msgid "could not open `%s', mode `%s'"
msgstr "ne peut ouvrir « %s », mode « %s »"
-#: io.c:1809
+#: io.c:1749
#, c-format
msgid "close of master pty failed (%s)"
msgstr "échec de la fermeture du pty maître (%s)"
-#: io.c:1811 io.c:1963 io.c:2114
+#: io.c:1751 io.c:1918 io.c:2075
#, c-format
msgid "close of stdout in child failed (%s)"
msgstr "échec de fermeture de stdout du processus fils (%s)"
-#: io.c:1814
+#: io.c:1754
#, c-format
msgid "moving slave pty to stdout in child failed (dup: %s)"
msgstr ""
"échec de redirection de pty esclave vers stdout du processus fils (dup: %s)"
-#: io.c:1816 io.c:1968
+#: io.c:1756 io.c:1923
#, c-format
msgid "close of stdin in child failed (%s)"
msgstr "échec de fermeture de stdin du processus fils (%s)"
-#: io.c:1819
+#: io.c:1759
#, c-format
msgid "moving slave pty to stdin in child failed (dup: %s)"
msgstr ""
"échec de redirection du pty esclave vers stdin du processus fils (dup: %s)"
-#: io.c:1821 io.c:1840
+#: io.c:1761 io.c:1782
#, c-format
msgid "close of slave pty failed (%s)"
msgstr "échec de la fermeture du pty esclave (%s)"
-#: io.c:1914 io.c:1966 io.c:2095 io.c:2117
+#: io.c:1860 io.c:1921 io.c:2053 io.c:2078
#, c-format
msgid "moving pipe to stdout in child failed (dup: %s)"
msgstr "échec de redirection du pipe vers stdout du processus fils (dup: %s)"
-#: io.c:1918 io.c:1971
+#: io.c:1867 io.c:1926
#, c-format
msgid "moving pipe to stdin in child failed (dup: %s)"
msgstr "échec de redirection du pipe vers stdin du processus fils (dup: %s)"
-#: io.c:1935 io.c:2108
+#: io.c:1887 io.c:2068
msgid "restoring stdout in parent process failed\n"
msgstr "restauration de stdout par le processus parent a échoué\n"
-#: io.c:1940
+#: io.c:1895
msgid "restoring stdin in parent process failed\n"
msgstr "restauration de stdin par le processus parent a échoué\n"
-#: io.c:1974 io.c:2119 io.c:2130
+#: io.c:1929 io.c:2080 io.c:2094
#, c-format
msgid "close of pipe failed (%s)"
msgstr "échec de la fermeture du pipe (%s)"
-#: io.c:2019
+#: io.c:1974
msgid "`|&' not supported"
msgstr "« |& » non supporté"
-#: io.c:2085
+#: io.c:2040
#, c-format
msgid "cannot open pipe `%s' (%s)"
msgstr "ne ouvrir un pipe « %s » (%s)"
-#: io.c:2126
+#: io.c:2088
#, c-format
msgid "cannot create child process for `%s' (fork: %s)"
msgstr "ne créer le processus fils pour « %s » (fork: %s)"
-#: io.c:2518
+#: io.c:2577
#, c-format
msgid "data file `%s' is empty"
msgstr "le fichier de données « %s » est vide"
-#: io.c:2560 io.c:2568
+#: io.c:2618 io.c:2626
msgid "could not allocate more input memory"
msgstr "ne peut allouer plus de mémoire pour l'entrée"
-#: io.c:3125
+#: io.c:3173
msgid "multicharacter value of `RS' is a gawk extension"
msgstr "valeur de « RS » avec multiple caractères est une extension gawk"
-#: main.c:313
+#: main.c:311
msgid "out of memory"
-msgstr ""
+msgstr "Mémoire épuisée"
-#: main.c:381
+#: main.c:388
msgid "`-m[fr]' option irrelevant in gawk"
msgstr "« -m[fr] » est une option non pertinente en gawk"
-#: main.c:383
+#: main.c:390
msgid "-m option usage: `-m[fr] nnn'"
msgstr "-m usage de l'option: « -m[fr] nnn »"
-#: main.c:419
+#: main.c:426
#, fuzzy
msgid "empty argument to `-e/--source' ignored"
msgstr "argument vide à l'option « --source », ignorée"
-#: main.c:485
+#: main.c:492
#, c-format
msgid "%s: option `-W %s' unrecognized, ignored\n"
msgstr "%s: l'option « -W %s » n'est pas reconnue, ignorée\n"
-#: main.c:530
+#: main.c:545
#, c-format
msgid "%s: option requires an argument -- %c\n"
msgstr "%s: l'option requiert un arguement -- %c\n"
-#: main.c:551
+#: main.c:566
msgid "environment variable `POSIXLY_CORRECT' set: turning on `--posix'"
msgstr ""
"variable d'environnement « POSIXLY__CORRECT » initialisée: utilisation de « --"
"posix »"
-#: main.c:557
+#: main.c:572
msgid "`--posix' overrides `--traditional'"
msgstr "« --posix » écrase « --traditional »"
-#: main.c:568
+#: main.c:583
msgid "`--posix'/`--traditional' overrides `--non-decimal-data'"
msgstr "« --posix »/« --traditional » écrase « --non-decimal-data »"
-#: main.c:572
+#: main.c:587
#, c-format
msgid "running %s setuid root may be a security problem"
msgstr ""
"exécution de %s en mode setuid root peut causer un problème de sécurité"
-#: main.c:577
+#: main.c:592
#, fuzzy
msgid "`--posix' overrides `--binary'"
msgstr "« --posix » écrase « --traditional »"
-#: main.c:622
+#: main.c:643
#, c-format
msgid "can't set binary mode on stdin (%s)"
msgstr "ne peut initialiser le mode binaire sur stdin (%s)"
-#: main.c:625
+#: main.c:646
#, c-format
msgid "can't set binary mode on stdout (%s)"
msgstr "ne peut initialiser le mode binaire sur stdout (%s)"
-#: main.c:627
+#: main.c:648
#, c-format
msgid "can't set binary mode on stderr (%s)"
msgstr "ne peut initialiser le mode binaire sur stderr (%s)"
-#: main.c:668
+#: main.c:687
msgid "no program text at all!"
msgstr "aucun programme!"
-#: main.c:773
+#: main.c:762
#, c-format
msgid "Usage: %s [POSIX or GNU style options] -f progfile [--] file ...\n"
msgstr ""
"Usage: %s [style des options POSIX ou GNU] -f fichierprog [--] fichier ...\n"
-#: main.c:775
+#: main.c:764
#, c-format
msgid "Usage: %s [POSIX or GNU style options] [--] %cprogram%c file ...\n"
msgstr ""
"Usage: %s [style des options POSIX ou GNU] [--] %cprogram%c fichier ...\n"
-#: main.c:780
+#: main.c:769
#, fuzzy
msgid "POSIX options:\t\tGNU long options: (standard)\n"
msgstr "Options POSIX:\t\toptions de long format GNU:\n"
-#: main.c:781
+#: main.c:770
msgid "\t-f progfile\t\t--file=progfile\n"
msgstr "\t-f fichierprog\t\t--file=fichierprog\n"
-#: main.c:782
+#: main.c:771
msgid "\t-F fs\t\t\t--field-separator=fs\n"
msgstr "#t-F fs\t\t\t--field-separator=fs\n"
-#: main.c:783
+#: main.c:772
msgid "\t-v var=val\t\t--assign=var=val\n"
msgstr "#t-v var=valeur\t\t--assign=var=valeur\n"
-#: main.c:784
+#: main.c:773
#, fuzzy
-msgid "POSIX options:\t\tGNU long options: (extensions)\n"
+msgid "Short options:\t\tGNU long options: (extensions)\n"
msgstr "Options POSIX:\t\toptions de long format GNU:\n"
-#: main.c:785
+#: main.c:774
msgid "\t-m[fr] val\n"
msgstr "\t-m[fr] valeur\n"
-#: main.c:786
+#: main.c:775
msgid "\t-b\t\t\t--characters-as-bytes\n"
msgstr ""
-#: main.c:787
-msgid "\t-c\t\t\t--compat, --traditional\n"
-msgstr ""
+#: main.c:776
+#, fuzzy
+msgid "\t-c\t\t\t--traditional\n"
+msgstr "\t-W traditional\t\t--traditional\n"
-#: main.c:788
+#: main.c:777
#, fuzzy
-msgid "\t-C\t\t\t--copyleft, --copyright\n"
+msgid "\t-C\t\t\t--copyright\n"
msgstr "\t-W copyright\t\t--copyright\n"
-#: main.c:789
+#: main.c:778
#, fuzzy
msgid "\t-d [file]\t\t--dump-variables[=file]\n"
msgstr "\t-W dump-variables[=fichier]\t--dump-variables[=fichier]\n"
-#: main.c:790
+#: main.c:779
#, fuzzy
msgid "\t-e 'program-text'\t--source='program-text'\n"
msgstr "\t-W source=program-text\t--source=program-text\n"
-#: main.c:791
+#: main.c:780
#, fuzzy
msgid "\t-E file\t\t\t--exec=file\n"
msgstr "\t-W exec=fichier\t\t--exec=fichier\n"
-#: main.c:792
+#: main.c:781
#, fuzzy
msgid "\t-g\t\t\t--gen-pot\n"
msgstr "\t-W gen-po\t\t--gen-po\n"
-#: main.c:793
+#: main.c:782
#, fuzzy
-msgid "\t-h\t\t\t--help, --usage\n"
+msgid "\t-h\t\t\t--help\n"
msgstr "\t-W help\t\t\t--help\n"
-#: main.c:794
+#: main.c:783
#, fuzzy
-msgid "\t-l [fatal]\t\t--lint[=fatal]\n"
+msgid "\t-L [fatal]\t\t--lint[=fatal]\n"
msgstr "\t-W lint[=fatal]\t\t--lint[=fatal]\n"
-#: main.c:795
-#, fuzzy
-msgid "\t-L\t\t\t--lint-old\n"
-msgstr "\t-W lint-old\t\t--lint-old\n"
-
-#: main.c:796
+#: main.c:784
#, fuzzy
msgid "\t-n\t\t\t--non-decimal-data\n"
msgstr "\t-W non-decimal-data\t--non-decimal-data\n"
-#: main.c:797
+#: main.c:785
msgid "\t-N\t\t\t--use-lc-numeric\n"
msgstr ""
-#: main.c:798
+#: main.c:786
msgid "\t-O\t\t\t--optimize\n"
msgstr ""
-#: main.c:799
+#: main.c:787
#, fuzzy
msgid "\t-p [file]\t\t--profile[=file]\n"
msgstr "\t-W profile[=fichier]\t--profile[=fichier]\n"
-#: main.c:800
+#: main.c:788
#, fuzzy
msgid "\t-P\t\t\t--posix\n"
msgstr "\t-W posix\t\t--posix\n"
-#: main.c:801
+#: main.c:789
#, fuzzy
msgid "\t-r\t\t\t--re-interval\n"
msgstr "\t-W re-interval\t\t--re-interval\n"
-#: main.c:802
+#: main.c:791
#, fuzzy
+msgid "\t-R file\t\t\t--command=file\n"
+msgstr "\t-W exec=fichier\t\t--exec=fichier\n"
+
+#: main.c:792
msgid "\t-S\t\t\t--sandbox\n"
-msgstr "\t-W posix\t\t--posix\n"
+msgstr ""
+
+#: main.c:793
+#, fuzzy
+msgid "\t-t\t\t\t--lint-old\n"
+msgstr "\t-W lint-old\t\t--lint-old\n"
-#: main.c:803
+#: main.c:794
#, fuzzy
msgid "\t-V\t\t\t--version\n"
msgstr "\t-W version\t\t--version\n"
-#: main.c:805
+#: main.c:796
msgid "\t-W nostalgia\t\t--nostalgia\n"
msgstr "\t-W nostalgia\t\t--nostalgia\n"
-#: main.c:808
-msgid "\t-W parsedebug\t\t--parsedebug\n"
+#: main.c:799
+#, fuzzy
+msgid "\t-Y\t\t--parsedebug\n"
msgstr "\t-W parsedebug\t\t--parsedebug\n"
#. TRANSLATORS: --help output 5 (end)
@@ -1775,7 +1713,7 @@ msgstr "\t-W parsedebug\t\t--parsedebug\n"
#. for this application. Please add _another line_ with the
#. address for translation bugs.
#. no-wrap
-#: main.c:817
+#: main.c:808
msgid ""
"\n"
"To report bugs, see node `Bugs' in `gawk.info', which is\n"
@@ -1787,7 +1725,7 @@ msgstr ""
"la section\n"
"« Problems and Bugs » dans la version imprimée.\n"
-#: main.c:821
+#: main.c:812
msgid ""
"gawk is a pattern scanning and processing language.\n"
"By default it reads standard input and writes standard output.\n"
@@ -1797,7 +1735,7 @@ msgstr ""
"Par défaut, il lit de l'entrée standard et écrit sur la sortie standard.\n"
"\n"
-#: main.c:825
+#: main.c:816
msgid ""
"Examples:\n"
"\tgawk '{ sum += $1 }; END { print sum }' file\n"
@@ -1807,8 +1745,8 @@ msgstr ""
"\tgawk '{ sum += $1 }; END { print sum }' file\n"
"\tgawk -F: '{ print $1 }' /etc/passwd\n"
-#: main.c:845
-#, c-format
+#: main.c:836
+#, fuzzy, c-format
msgid ""
"Copyright (C) 1989, 1991-%d Free Software Foundation.\n"
"\n"
@@ -1822,11 +1760,11 @@ msgstr ""
"\n"
"Ce programme est un logiciel libre; vous pouvez le redistribuer ou le\n"
"modifier selon les termes de la License Publique Générale de GNU, publiée\n"
-"par la Free Software Foundation; soit la version 3 de la Licence ou,\n"
+"par la Free Software Foundation; soit la version 2 de la Licence ou,\n"
"soit (selon vos préférences) toute version ultérieure.\n"
"\n"
-#: main.c:853
+#: main.c:844
msgid ""
"This program is distributed in the hope that it will be useful,\n"
"but WITHOUT ANY WARRANTY; without even the implied warranty of\n"
@@ -1841,7 +1779,7 @@ msgstr ""
"Pour plus d'informations à ce sujet, consulter la « GNU General Public "
"License ».\n"
-#: main.c:864
+#: main.c:855
#, fuzzy
msgid ""
"You should have received a copy of the GNU General Public License\n"
@@ -1851,18 +1789,18 @@ msgstr ""
"avec ce programme; sinon, sinon écrire à la Free Software Foundation, Inc.,\n"
"51 Franklin Street, FIth Floor, Boston, MA 02110-1301, USA.\n"
-#: main.c:899
+#: main.c:890
msgid "-Ft does not set FS to tab in POSIX awk"
msgstr ""
"-Ft ne permet pas d'initialiser FS à un tabulateur dans la version POSIX de "
"awk"
-#: main.c:1116
+#: main.c:1122
#, c-format
msgid "unknown value for field spec: %d\n"
msgstr ""
-#: main.c:1176
+#: main.c:1182
#, c-format
msgid ""
"%s: `%s' argument to `-v' not in `var=value' form\n"
@@ -1871,174 +1809,140 @@ msgstr ""
"%s: « %s » argument pour « -v » n'utilise pas la formulation « var=valeur »\n"
"\n"
-#: main.c:1196
+#: main.c:1202
#, c-format
msgid "`%s' is not a legal variable name"
msgstr "« %s » n'est pas un nom légal de variable"
-#: main.c:1199
+#: main.c:1205
#, c-format
msgid "`%s' is not a variable name, looking for file `%s=%s'"
msgstr "« %s » n'est pas un nom de variable, recherche du fichier « %s=%s »"
-#: main.c:1238
+#: main.c:1258
msgid "floating point exception"
msgstr "exception de la virgule flottante"
-#: main.c:1245
+#: main.c:1265
msgid "fatal error: internal error"
msgstr "erreur fatale: erreur interne"
-#: main.c:1260
+#: main.c:1280
#, fuzzy
msgid "fatal error: internal error: segfault"
msgstr "erreur fatale: erreur interne"
-#: main.c:1272
+#: main.c:1292
#, fuzzy
msgid "fatal error: internal error: stack overflow"
msgstr "erreur fatale: erreur interne"
-#: main.c:1322
+#: main.c:1342
#, c-format
msgid "no pre-opened fd %d"
msgstr "aucun fd pré-ouvert pour %d"
-#: main.c:1329
+#: main.c:1349
#, c-format
msgid "could not pre-open /dev/null for fd %d"
msgstr "ne peut pré-ouvrir /dev/null pour le descripteud fd %d"
-#: main.c:1352 main.c:1361
+#: main.c:1372 main.c:1381
#, c-format
msgid "could not find groups: %s"
msgstr "n'a pu trouvé les groupes: %s"
-#: msg.c:54
+#: msg.c:62
#, c-format
msgid "cmd. line:"
msgstr "cmd. ligne:"
-#: msg.c:120
+#: msg.c:97
msgid "warning: "
msgstr "AVERTISSEMENT:"
-#: msg.c:142
+#: msg.c:106
msgid "error: "
msgstr "Erreur: "
-#: msg.c:178
+#: msg.c:129
msgid "fatal: "
msgstr "Fatal: "
-#: node.c:63 node.c:78 node.c:105 node.c:121 node.c:151
-msgid "can't convert string to float"
-msgstr "ne peut convertir la chaîne en nombre flottant"
-
-#: node.c:465
+#: node.c:401
msgid "backslash at end of string"
msgstr "barre oblique inverse à la fin de la chaîne"
-#: node.c:609
+#: node.c:502
#, fuzzy, c-format
msgid "old awk does not support the `\\%c' escape sequence"
msgstr "l'ancien awk ne supporte pas l'opérateur « ** »"
-#: node.c:660
+#: node.c:553
msgid "POSIX does not allow `\\x' escapes"
msgstr "POSIX ne permet pas de séquence d'échappement « \\x »"
-#: node.c:666
+#: node.c:559
msgid "no hex digits in `\\x' escape sequence"
msgstr "aucun chiffre hexadécimal dans la séquence d'échappement « \\x » "
-#: node.c:688
+#: node.c:581
#, c-format
msgid ""
"hex escape \\x%.*s of %d characters probably not interpreted the way you "
"expect"
msgstr ""
-#: node.c:703
+#: node.c:596
#, c-format
msgid "escape sequence `\\%c' treated as plain `%c'"
msgstr "séquence d'échappement « \\%c » traitée simplement comme « %c »"
+#: node.c:737
+msgid ""
+"Invalid multibyte data detected. There may be a mismatch between your data "
+"and your locale."
+msgstr ""
+
#: posix/gawkmisc.c:172
#, c-format
msgid "%s %s `%s': could not set close-on-exec: (fcntl: %s)"
msgstr "%s %s « %s »: ne peut initialiser close-on-exec: (fcntl: %s)"
-#: profile.c:94
+#: profile.c:83
#, c-format
msgid "could not open `%s' for writing: %s"
msgstr "ne peut ouvrir « %s » en écriture: %s"
-#: profile.c:457
-#, c-format
-msgid "internal error: %s with null vname"
-msgstr "erreur interne: %s avec un vname nul"
-
-#: profile.c:522
-msgid "# treated internally as `delete'"
-msgstr "# traité de manière interne comme « delete »"
-
-#: profile.c:1076
-#, c-format
-msgid "# this is a dynamically loaded extension function"
-msgstr "# cela est un extension d'une fonction chargée dynamiquement"
-
-#: profile.c:1109
-#, c-format
-msgid "\t# gawk profile, created %s\n"
-msgstr "\t# profile gawk, créé %s\n"
-
-#: profile.c:1112
-#, c-format
-msgid ""
-"\t# BEGIN block(s)\n"
-"\n"
-msgstr ""
-"#t# DÉBUT de bloc(s)\n"
-"\n"
-
-#: profile.c:1122
+#: profile.c:203
#, fuzzy, c-format
msgid ""
-"\t# BEGINFILE block(s)\n"
+"\t# %s block(s)\n"
"\n"
msgstr ""
-"#t# DÉBUT de bloc(s)\n"
+"\t# FIN de bloc(s)\n"
"\n"
-#: profile.c:1132
-#, c-format
+#: profile.c:208
+#, fuzzy, c-format
msgid ""
-"\t# Rule(s)\n"
+"\t# %s(s)\n"
"\n"
msgstr ""
"\t# Règle(s)\n"
"\n"
-#: profile.c:1138
-#, fuzzy, c-format
-msgid ""
-"\t# ENDFILE block(s)\n"
-"\n"
-msgstr ""
-"\t# FIN de bloc(s)\n"
-"\n"
+#: profile.c:278
+#, c-format
+msgid "internal error: %s with null vname"
+msgstr "erreur interne: %s avec un vname nul"
-#: profile.c:1148
+#: profile.c:945
#, c-format
-msgid ""
-"\t# END block(s)\n"
-"\n"
-msgstr ""
-"\t# FIN de bloc(s)\n"
-"\n"
+msgid "\t# gawk profile, created %s\n"
+msgstr "\t# profile gawk, créé %s\n"
-#: profile.c:1168
+#: profile.c:1328
#, c-format
msgid ""
"\n"
@@ -2047,17 +1951,12 @@ msgstr ""
"\n"
"\t# Liste alphabétique des fonctions\n"
-#: profile.c:1431
+#: profile.c:1367
#, c-format
-msgid "unexpected type %s in prec_level"
-msgstr "type %s inattendu dans prec_level"
-
-#: profile.c:1557
-#, fuzzy, c-format
-msgid "Unknown node type %s in pp_var"
-msgstr "type de noeud inconnu %d"
+msgid "redir2str: unknown redirection type %d"
+msgstr ""
-#: re.c:537
+#: re.c:559
#, c-format
msgid "regexp component `%.*s' should probably be `[%.*s]'"
msgstr ""
@@ -2130,20 +2029,40 @@ msgstr "Expression régulière trop grande"
msgid "Unmatched ) or \\)"
msgstr "Non appariement de ) ou \\)"
-#: regcomp.c:699
+#: regcomp.c:701
msgid "No previous regular expression"
msgstr "Aucune expression régulière antérieure"
-#~ msgid "%s: illegal option -- %c\n"
-#~ msgstr "%s: option illégale -- %c\n"
+#~ msgid "call of `length' without parentheses is deprecated by POSIX"
+#~ msgstr "l'appel de « length » sans les parenthèses est déprécié par POSIX"
+
+#, fuzzy
+#~ msgid "reference to uninitialized field `$%s'"
+#~ msgstr "référence à un champ non initialisé « $%d »"
+
+#~ msgid "can't convert string to float"
+#~ msgstr "ne peut convertir la chaîne en nombre flottant"
+
+#~ msgid "`continue' outside a loop is not portable"
+#~ msgstr "« continue » en dehors de la boucle n'est pas portable"
+
+#~ msgid "`break' outside a loop is not portable"
+#~ msgstr "« break » en dehors de la boucle n'est pas portable"
+
+#~ msgid "`nextfile' cannot be called from a BEGIN rule"
+#~ msgstr "« nextfile » ne peut être appelé depuis une règle BEGIN"
+
+#~ msgid "`next' cannot be called from a BEGIN rule"
+#~ msgstr "« next » ne peut être appelé depuis une règle BEGIN"
#~ msgid "file `%s' is a directory"
#~ msgstr "le fichier « %s » est un répertoire"
-#~ msgid "can't open two way socket `%s' for input/output (%s)"
-#~ msgstr ""
-#~ "ne peut ouvrir un socket bidirectionnel « %s » pour les entrées/sorties (%"
-#~ "s)"
+#~ msgid "use `PROCINFO[\"%s\"]' instead of `%s'"
+#~ msgstr "utliser « PROCINFO[\"%s\"] » au lieu de « %s »"
+
+#~ msgid "use `PROCINFO[...]' instead of `/dev/user'"
+#~ msgstr "utliser « PROCINFO[\"%s\"] » au lieu de « /dev/user »"
#~ msgid "\t-W compat\t\t--compat\n"
#~ msgstr "\t-W compat\t\t--compat\n"
@@ -2151,33 +2070,110 @@ msgstr "Aucune expression régulière antérieure"
#~ msgid "\t-W copyleft\t\t--copyleft\n"
#~ msgstr "\t-W copyleft\t\t--copyleft\n"
-#~ msgid "\t-W traditional\t\t--traditional\n"
-#~ msgstr "\t-W traditional\t\t--traditional\n"
-
#~ msgid "\t-W usage\t\t--usage\n"
#~ msgstr "\t-W usage\t\t--usage\n"
-#, fuzzy
-#~ msgid "seek: invalid arguments"
-#~ msgstr "printf: aucun argument"
+#~ msgid ""
+#~ "\t# BEGIN block(s)\n"
+#~ "\n"
+#~ msgstr ""
+#~ "#t# DÉBUT de bloc(s)\n"
+#~ "\n"
-#, fuzzy
-#~ msgid "seek: `%.*s' is not an open file, pipe, or co-process"
-#~ msgstr "close: « %.*s » n'est pas ni un fichier ouvert, pipe ou co-processus"
+#~ msgid "must use `count$' on all formats or none"
+#~ msgstr "doit utiliser « count$ » sur tous les formats ou aucun"
+
+#~ msgid "`$' is not permitted in awk formats"
+#~ msgstr "« $ » n'est pas permis dans les formats awk"
+
+#~ msgid "arg count with `$' must be > 0"
+#~ msgstr "décompte d'arguments avec « $ » doit être > 0"
+
+#~ msgid "arg count %ld greater than total number of supplied arguments"
+#~ msgstr ""
+#~ "compteur d'arguments %ld est > que le nombre total d'arguments fournis"
+
+#~ msgid "`$' not permitted after period in format"
+#~ msgstr "« $ » n'est pas permis après le point"
+
+#~ msgid "no `$' supplied for positional field width or precision"
+#~ msgstr "aucun « $ » fourni dans le champ positionnel (longueur ou précision)"
+
+#~ msgid "`l' is meaningless in awk formats; ignored"
+#~ msgstr "« l » n'a aucun sens dans les formats de awk; ignoré"
+
+#~ msgid "`l' is not permitted in POSIX awk formats"
+#~ msgstr "« l » n'est pas permis dans les format POSIX de awk"
+
+#~ msgid "`L' is meaningless in awk formats; ignored"
+#~ msgstr "« L » n'a aucun sens dans les formats s de awk; ignoré"
+
+#~ msgid "`L' is not permitted in POSIX awk formats"
+#~ msgstr "« L » n'est pas permis dans les formats POSIX de awk"
+
+#~ msgid "`h' is meaningless in awk formats; ignored"
+#~ msgstr "« h » n'a aucun send dans les formats de awk; ignoré"
+
+#~ msgid "`h' is not permitted in POSIX awk formats"
+#~ msgstr "« h » n'est pas permis dans les formats POSIX de awk"
+
+#~ msgid "[s]printf: value %g is out of range for `%%%c' format"
+#~ msgstr "[s]printf: valeur %g est hors limite pour le format « %%%c »"
+
+#~ msgid "not enough arguments to satisfy format string"
+#~ msgstr "pas assez d'arguments pour satisfaire le format d'une chaîne"
+
+#~ msgid "^ ran out for this one"
+#~ msgstr "^ débordement pour celle-ci"
+
+#~ msgid "[s]printf: format specifier does not have control letter"
+#~ msgstr ""
+#~ "[s]printf: spécificateur de format ne contient pas de lettre de contrôle"
+
+#~ msgid "too many arguments supplied for format string"
+#~ msgstr "trop d'arguments pour la chaîne de format"
#, fuzzy
-#~ msgid "seek: `%.*s' is not an input file, pipe, or co-process"
-#~ msgstr "close: « %.*s » n'est pas ni un fichier ouvert, pipe ou co-processus"
+#~ msgid "attempt to use array parameter `%s' in a scalar context"
+#~ msgstr "tentative d'utilisation du tableau « %s » dans un contexte scalaire"
+
+#~ msgid "can't open two way socket `%s' for input/output (%s)"
+#~ msgstr ""
+#~ "ne peut ouvrir un socket bidirectionnel « %s » pour les entrées/sorties (%"
+#~ "s)"
+
+#~ msgid ""
+#~ "concatenation: side effects in one expression have changed the length of "
+#~ "another!"
+#~ msgstr ""
+#~ "concaténation: effects de bord dans une expression a modifié la longueur "
+#~ "d'une autre!"
+
+#~ msgid "illegal type (%s) in tree_eval"
+#~ msgstr "type illégal (%s) dans tree_eval"
+
+#~ msgid "\t# -- main --\n"
+#~ msgstr "#t# -- main --\n"
+
+#~ msgid "invalid tree type %s in redirect()"
+#~ msgstr "type d'arbre invalide %s dans redirect()"
#, fuzzy
-#~ msgid "seek: `%.*s' is not a regular file"
-#~ msgstr "« %s » n'est pas un nom légal de variable"
+#~ msgid "# treated internally as `delete'"
+#~ msgstr "# traité de manière interne comme « delete »"
-#~ msgid "use `PROCINFO[\"%s\"]' instead of `%s'"
-#~ msgstr "utliser « PROCINFO[\"%s\"] » au lieu de « %s »"
+#~ msgid "# this is a dynamically loaded extension function"
+#~ msgstr "# cela est un extension d'une fonction chargée dynamiquement"
-#~ msgid "use `PROCINFO[...]' instead of `/dev/user'"
-#~ msgstr "utliser « PROCINFO[\"%s\"] » au lieu de « /dev/user »"
+#~ msgid "unexpected type %s in prec_level"
+#~ msgstr "type %s inattendu dans prec_level"
+
+#, fuzzy
+#~ msgid "Unknown node type %s in pp_var"
+#~ msgstr "type de noeud inconnu %d"
+
+#~ msgid "%s: illegal option -- %c\n"
+#~ msgstr "%s: option illégale -- %c\n"
#~ msgid "function %s called\n"
#~ msgstr "fonction %s appelée\n"
@@ -2189,12 +2185,6 @@ msgstr "Aucune expression régulière antérieure"
#~ msgstr ""
#~ "destruction: utilisation illégale d'une variable « %s » comme tableau"
-#~ msgid "asort: first argument is not an array"
-#~ msgstr "asort(): le premier argument n'est pas dans le tableau"
-
-#~ msgid "asort: second argument is not an array"
-#~ msgstr "asort(): le scond argument n'est pas dans le tableau"
-
#~ msgid ""
#~ "\n"
#~ "To report bugs, see node `Bugs' in `gawk.info', which is\n"
diff --git a/po/ga.gmo b/po/ga.gmo
index d2b97df0..25a22af7 100644
--- a/po/ga.gmo
+++ b/po/ga.gmo
Binary files differ
diff --git a/po/ga.po b/po/ga.po
index 1db14914..5fe87a6d 100644
--- a/po/ga.po
+++ b/po/ga.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: gawk 3.1.5h\n"
"Report-Msgid-Bugs-To: arnold@skeeve.com\n"
-"POT-Creation-Date: 2010-11-12 12:20+0200\n"
+"POT-Creation-Date: 2010-11-17 08:48+0200\n"
"PO-Revision-Date: 2007-10-01 13:47-0500\n"
"Last-Translator: Peadar Ó Guilín <peadarog@oceanfree.net>\n"
"Language-Team: Irish <gaeilge-gnulinux@lists.sourceforge.net>\n"
@@ -15,401 +15,478 @@ msgstr ""
"Content-Type: text/plain; charset=ISO-8859-1\n"
"Content-Transfer-Encoding: 8bit\n"
-#: array.c:112
+#: array.c:103
+#, c-format
+msgid "from %s"
+msgstr "ó %s"
+
+#: array.c:267
+#, fuzzy
+msgid "attempt to use a scalar value as array"
+msgstr "iarracht scálach '%s' a úsáid mar eagar"
+
+#: array.c:270
#, c-format
msgid "attempt to use function `%s' as an array"
msgstr "iarracht feidhm `%s' a úsáid mar eagar"
-#: array.c:115
+#: array.c:273
#, c-format
msgid "attempt to use scalar parameter `%s' as an array"
msgstr "iarracht paraiméadar scálach `%s' a úsáid mar eagar"
-#: array.c:118
+#: array.c:276
#, c-format
msgid "attempt to use scalar `%s' as array"
msgstr "iarracht scálach '%s' a úsáid mar eagar"
-#: array.c:156
+#: array.c:321 array.c:648 eval.c:1075 eval.c:1079 eval.c:1581 eval.c:1649
+#: eval.c:1928
#, c-format
-msgid "from %s"
-msgstr "ó %s"
+msgid "attempt to use array `%s' in a scalar context"
+msgstr "iarracht eagar `%s' a úsáid i gcomhthéacs scálach"
-#: array.c:513
+#: array.c:570
#, fuzzy, c-format
msgid "reference to uninitialized element `%s[\"%.*s\"]'"
msgstr "tagairt d'eilimint gan túsú `%s[\"%s\"]'"
-#: array.c:519
+#: array.c:576
#, c-format
msgid "subscript of array `%s' is null string"
msgstr "is teaghrán folamh é foscript an eagair `%s'"
-#: array.c:623
+#: array.c:684
#, c-format
msgid "delete: index `%s' not in array `%s'"
msgstr "delete: níl innéacs `%s' san eagar `%s'"
-#: array.c:792
+#: array.c:705
+#, fuzzy, c-format
+msgid "attempt to use scalar `%s[\"%.*s\"]' as an array"
+msgstr "iarracht scálach '%s' a úsáid mar eagar"
+
+#: array.c:868
#, c-format
msgid "%s: empty (null)\n"
msgstr "%s: folamh (neamhní)\n"
-#: array.c:797
+#: array.c:873
#, c-format
msgid "%s: empty (zero)\n"
msgstr "%s: folamh (nialas)\n"
-#: array.c:801
+#: array.c:877
#, c-format
msgid "%s: table_size = %d, array_size = %d\n"
msgstr "%s: méid_tábla = %d, méid_eagair = %d\n"
-#: array.c:830
+#: array.c:912
#, c-format
msgid "%s: is parameter\n"
msgstr "%s: is paraiméadar é\n"
-#: array.c:835
+#: array.c:916
#, c-format
msgid "%s: array_ref to %s\n"
msgstr "%s: tagairt_eagair do %s\n"
-#: awkgram.y:224 awkgram.y:227
+#: array.c:921
+#, fuzzy
+msgid "adump: argument not an array"
+msgstr "asort: ní eagar é an chéad argóint"
+
+#: array.c:1139
+#, fuzzy
+msgid "attempt to use array in a scalar context"
+msgstr "iarracht eagar `%s' a úsáid i gcomhthéacs scálach"
+
+#: array.c:1236
+#, fuzzy
+msgid "asort: second argument not an array"
+msgstr "asort: ní eagar é an dara hargóint"
+
+#: array.c:1237
+#, fuzzy
+msgid "asorti: second argument not an array"
+msgstr "asort: ní eagar é an dara hargóint"
+
+#: array.c:1245
+#, fuzzy
+msgid "asort: first argument not an array"
+msgstr "asort: ní eagar é an chéad argóint"
+
+#: array.c:1246
+#, fuzzy
+msgid "asorti: first argument not an array"
+msgstr "asort: ní eagar é an chéad argóint"
+
+#: awkgram.y:246
#, c-format
msgid "%s blocks must have an action part"
msgstr "tá gá le páirt ghníomhach ag blocanna %s"
-#: awkgram.y:230
+#: awkgram.y:249
msgid "each rule must have a pattern or an action part"
msgstr "tá gá le patrún nó páirt ghníomhach ag gach riail"
-#: awkgram.y:266 awkgram.y:275
+#: awkgram.y:320 awkgram.y:330
msgid "old awk does not support multiple `BEGIN' or `END' rules"
msgstr "ní thacaíonn sean-awk le rialacha iomadúla `BEGIN' nó `END'"
-#: awkgram.y:304
+#: awkgram.y:367
#, c-format
msgid "`%s' is a built-in function, it cannot be redefined"
msgstr "is feidhm insuite í `%s', ní féidir í a shainmhíniú"
-#: awkgram.y:350
+#: awkgram.y:427
msgid "regexp constant `//' looks like a C++ comment, but is not"
msgstr "tá cuma nóta tráchta C++ ar an dtairiseach `//', ach ní nóta tráchta é"
-#: awkgram.y:353
+#: awkgram.y:430
#, c-format
msgid "regexp constant `/%s/' looks like a C comment, but is not"
msgstr "tá cuma nóta tráchta C ar an dtairiseach `/%s/', ach ní nóta tráchta é"
-#: awkgram.y:380 awkgram.y:692
-msgid "statement may have no effect"
-msgstr "seans nach mbeidh éifeacht ag an ráiteas"
+#: awkgram.y:735
+#, fuzzy
+msgid "`break' is not allowed outside a loop or switch"
+msgstr "níl `break' lasmuigh den lúb ceadaithe"
-#: awkgram.y:477 awkgram.y:480 awkgram.y:504 awkgram.y:511 awkgram.y:518
-#, c-format
-msgid "`%s' used in %s action"
+#: awkgram.y:744
+#, fuzzy
+msgid "`continue' is not allowed outside a loop"
+msgstr "níl `continue' lasmuigh den lúb ceadaithe"
+
+#: awkgram.y:753
+#, fuzzy, c-format
+msgid "`next' used in %s action"
msgstr "`%s' á úsáid i ngníomh %s"
-#: awkgram.y:495 awkgram.y:499
+#: awkgram.y:767 awkgram.y:771
msgid "`nextfile' is a gawk extension"
msgstr "is feabhsúchán gawk é `nextfile'"
-#: awkgram.y:528
+#: awkgram.y:775
+#, fuzzy, c-format
+msgid "`nextfile' used in %s action"
+msgstr "`%s' á úsáid i ngníomh %s"
+
+#: awkgram.y:799
msgid "`return' used outside function context"
msgstr "`return' á úsáid lasmuigh den chomhthéacs feidhmeach"
-#: awkgram.y:570
+#: awkgram.y:859
msgid "plain `print' in BEGIN or END rule should probably be `print \"\"'"
msgstr ""
"is dóigh gur chóir go mbeadh an gnáth `print' sa riail TÚS nó CRÍOCH scríofa "
"mar `print \"\"'"
-#: awkgram.y:586 awkgram.y:594
+#: awkgram.y:927 awkgram.y:935
msgid "`delete array' is a gawk extension"
msgstr "is feabhsúchán gawk é `delete array'"
-#: awkgram.y:608 awkgram.y:616
+#: awkgram.y:955 awkgram.y:963
msgid "`delete(array)' is a non-portable tawk extension"
msgstr "is feabhsúchán neamh-iniompartha tawk é `delete(eagar)'"
-#: awkgram.y:660
+#: awkgram.y:1004
#, c-format
msgid "duplicate case values in switch body: %s"
msgstr "luachanna cás dúbailte sa chorp laisce: %s"
-#: awkgram.y:670
-msgid "Duplicate `default' detected in switch body"
+#: awkgram.y:1014
+#, fuzzy
+msgid "duplicate `default' detected in switch body"
msgstr "`default' dúbailte aimsithe sa chorp laisce"
-#: awkgram.y:759
+#: awkgram.y:1151
msgid "multistage two-way pipelines don't work"
msgstr "ní oibríonn píblínte déthreo ilchéimeacha"
-#: awkgram.y:850
+#: awkgram.y:1253
msgid "regular expression on right of assignment"
msgstr "slonn ionadaíochta ar dhéis an tsannacháin"
-#: awkgram.y:860
+#: awkgram.y:1263
msgid "regular expression on left of `~' or `!~' operator"
msgstr "slonn ionadaíochta ar chlé na oibreoirí `~' nó `!~'"
-#: awkgram.y:866 awkgram.y:954
+#: awkgram.y:1278 awkgram.y:1423
msgid "old awk does not support the keyword `in' except after `for'"
msgstr "ní thacaíonn sean-awk le heochairfhocal `in' ach tar éis `for'"
-#: awkgram.y:872
+#: awkgram.y:1287
msgid "regular expression on right of comparison"
msgstr "slonn ionadaíochta ar dhéis na comparáide"
-#: awkgram.y:936
+#: awkgram.y:1399
#, fuzzy, c-format
-msgid "`getline var' invalid inside %s rule"
+msgid "`getline var' invalid inside `%s' rule"
msgstr "cianphort neamhbhailí i `%s'"
-#: awkgram.y:939
-#, c-format
-msgid "`getline' invalid inside %s rule"
-msgstr ""
+#: awkgram.y:1401
+#, fuzzy, c-format
+msgid "`getline' invalid inside `%s' rule"
+msgstr "cianphort neamhbhailí i `%s'"
-#: awkgram.y:944
+#: awkgram.y:1407
msgid "non-redirected `getline' undefined inside END action"
msgstr "ní shannadh `getline' neamhatreoraithe lasmuigh den ghníomh CRÍOCH"
-#: awkgram.y:955
+#: awkgram.y:1424
msgid "old awk does not support multidimensional arrays"
msgstr "ní thacaíonn sean-awk le heagair iltoiseacha"
-#: awkgram.y:1001
+#: awkgram.y:1528
msgid "call of `length' without parentheses is not portable"
msgstr "tá glao `length' gan lúibíní doiompartha"
-#: awkgram.y:1006
-msgid "call of `length' without parentheses is deprecated by POSIX"
-msgstr "lochtaíonn POSIX glao `length' gan lúibíní"
-
-#: awkgram.y:1051
+#: awkgram.y:1591
#, fuzzy
msgid "indirect function calls are a gawk extension"
-msgstr "is feabhsúchán gawk é `extension'"
+msgstr "is feabhsúchán gawk é `nextfile'"
-#: awkgram.y:1084
-msgid "use of non-array as array"
-msgstr "neamheagar á úsáid mar eagar"
+#: awkgram.y:1605
+#, fuzzy, c-format
+msgid "can not use special variable `%s' for indirect function call"
+msgstr "feidhm `%s': níl cead ainm feidhme a úsáid mar ainm paraiméadar"
-#: awkgram.y:1087
+#: awkgram.y:1682
msgid "invalid subscript expression"
msgstr "slonn foscripte neamhbhailí"
-#: awkgram.y:1329
+#: awkgram.y:1722
+msgid "use of non-array as array"
+msgstr "neamheagar á úsáid mar eagar"
+
+#: awkgram.y:1993
msgid "unexpected newline or end of string"
msgstr "líne nua nó deireadh teaghráin gan choinne"
-#: awkgram.y:1446
-msgid "empty program text on command line"
-msgstr "téacs feidhmchlár folamh ar líne na n-orduithe"
-
-#: awkgram.y:1502
+#: awkgram.y:2248 awkgram.y:2296 awkgram.y:2470
#, c-format
msgid "can't open source file `%s' for reading (%s)"
msgstr "ní féidir an comhad foinseach `%s' a oscailt chun léamh (%s)"
-#: awkgram.y:1600
+#: awkgram.y:2249 awkgram.y:2297 builtin.c:122
+msgid "reason unknown"
+msgstr "níl fhios an fáth"
+
+#: awkgram.y:2257
+#, fuzzy, c-format
+msgid "already included source file `%s'"
+msgstr "ní féidir an comhad foinseach `%s' a léamh (%s)"
+
+#: awkgram.y:2281
+#, fuzzy
+msgid "@include is a gawk extension"
+msgstr "is feabhsúchán gawk é `nextfile'"
+
+#: awkgram.y:2288
+msgid "empty filename after @include"
+msgstr ""
+
+#: awkgram.y:2422
+msgid "empty program text on command line"
+msgstr "téacs feidhmchlár folamh ar líne na n-orduithe"
+
+#: awkgram.y:2537
#, c-format
msgid "can't read sourcefile `%s' (%s)"
msgstr "ní féidir an comhad foinseach `%s' a léamh (%s)"
-#: awkgram.y:1608
+#: awkgram.y:2547
#, c-format
msgid "source file `%s' is empty"
msgstr "comhad foinseach `%s' folamh"
-#: awkgram.y:1800 awkgram.y:1922 awkgram.y:1940 awkgram.y:2315 awkgram.y:2407
+#: awkgram.y:2732
msgid "source file does not end in newline"
msgstr "ní chríochnaíonn an comhad foinseach le líne nua"
-#: awkgram.y:1862
+#: awkgram.y:2809
msgid "unterminated regexp ends with `\\' at end of file"
msgstr "críochnaíonn regexp gan chríochnú le `\\' ag an gcomhadchríoch"
-#: awkgram.y:1886
+#: awkgram.y:2833
#, c-format
msgid "%s: %d: tawk regex modifier `/.../%c' doesn't work in gawk"
msgstr "%s: %d: ní oibríonn an mionathraitheoir tawk regex `/.../%c' i ngawk"
-#: awkgram.y:1890
+#: awkgram.y:2837
#, c-format
msgid "tawk regex modifier `/.../%c' doesn't work in gawk"
msgstr "ní oibríonn an mionathraitheoir tawk regex `/.../%c' i ngawk"
-#: awkgram.y:1897
+#: awkgram.y:2844
msgid "unterminated regexp"
msgstr "slonn ionadaíochta gan críochnú"
-#: awkgram.y:1900
+#: awkgram.y:2848
msgid "unterminated regexp at end of file"
msgstr "slonn ionadaíochta gan críochnú ag an gcomhadchríoch"
-#: awkgram.y:1969
+#: awkgram.y:2907
msgid "use of `\\ #...' line continuation is not portable"
msgstr "níl úsáid `\\ #...' mar leanúint líne doiompartha"
-#: awkgram.y:1982
+#: awkgram.y:2923
msgid "backslash not last character on line"
msgstr "ní cúlslais é carachtar deireanach an líne"
-#: awkgram.y:2027
+#: awkgram.y:2984
msgid "POSIX does not allow operator `**='"
msgstr "ní cheadaíonn POSIX an t-oibreoir `**='"
-#: awkgram.y:2029
+#: awkgram.y:2986
msgid "old awk does not support operator `**='"
msgstr "ní cheadaíonn sean-awk an t-oibreoir `**='"
-#: awkgram.y:2038
+#: awkgram.y:2995
msgid "POSIX does not allow operator `**'"
msgstr "ní cheadaíonn POSIX an t-oibreoir `**='"
-#: awkgram.y:2040
+#: awkgram.y:2997
msgid "old awk does not support operator `**'"
msgstr "ní cheadaíonn sean-awk an t-oibreoir `**='"
-#: awkgram.y:2071
+#: awkgram.y:3032
msgid "operator `^=' is not supported in old awk"
msgstr "tá an t-oibreoir `^=' gan tacaíocht sa shean awk"
-#: awkgram.y:2079
+#: awkgram.y:3040
msgid "operator `^' is not supported in old awk"
msgstr "tá an t-oibreoir `^' gan tacaíocht sa shean awk"
-#: awkgram.y:2163 awkgram.y:2178
+#: awkgram.y:3133 awkgram.y:3149
msgid "unterminated string"
msgstr "teaghrán gan chríochnú"
-#: awkgram.y:2368
+#: awkgram.y:3345
#, c-format
msgid "invalid char '%c' in expression"
msgstr "carachtar neamhbhailí '%c' sa slonn"
-#: awkgram.y:2416
+#: awkgram.y:3391
#, c-format
msgid "`%s' is a gawk extension"
msgstr "is feabhsúchán gawk é `%s'"
-#: awkgram.y:2419
+#: awkgram.y:3394
#, c-format
msgid "`%s' is a Bell Labs extension"
msgstr "is feabhsúchán Bell Labs é `%s'"
-#: awkgram.y:2422
+#: awkgram.y:3397
#, c-format
msgid "POSIX does not allow `%s'"
msgstr "ní cheadaíonn POSIX `%s'"
-#: awkgram.y:2426
+#: awkgram.y:3401
#, c-format
msgid "`%s' is not supported in old awk"
msgstr "tá `%s' gan tacaíocht sa shean awk"
-#: awkgram.y:2452
+#: awkgram.y:3465
msgid "`goto' considered harmful!\n"
msgstr "deirtear go bhfuil `goto' dochrach!\n"
-#: awkgram.y:2514
+#: awkgram.y:3518
#, c-format
msgid "%d is invalid as number of arguments for %s"
msgstr "%d oiread argóintí neamhbhailí le haghaidh %s"
-#: awkgram.y:2533 awkgram.y:2536
+#: awkgram.y:3544 awkgram.y:3547
msgid "match: third argument is a gawk extension"
msgstr "meaitseáil: is feabhsúchán gawk é an tríú hargóint"
-#: awkgram.y:2549
+#: awkgram.y:3575
#, c-format
msgid "%s: string literal as last arg of substitute has no effect"
msgstr ""
"%s: ní bhíonn aon éifeacht ag teaghrán litriúil mar arg deireanach an ionadaí"
-#: awkgram.y:2552
+#: awkgram.y:3580
#, c-format
msgid "%s third parameter is not a changeable object"
msgstr "ní oibiacht athraitheach í an tríú paraiméadar %s"
-#: awkgram.y:2586 awkgram.y:2589
+#: awkgram.y:3665 awkgram.y:3668
msgid "close: second argument is a gawk extension"
msgstr "close: is feabhsúchán gawk é an dara hargóint"
-#: awkgram.y:2599
+#: awkgram.y:3680
msgid "use of dcgettext(_\"...\") is incorrect: remove leading underscore"
msgstr "tá úsáid dcgettext(_\"...\") mícheart: bain amach an chéad fhostríoc"
-#: awkgram.y:2614
+#: awkgram.y:3695
msgid "use of dcngettext(_\"...\") is incorrect: remove leading underscore"
msgstr "tá úsáid dcgettext(_\"...\") mícheart: bain amach an chéad fhostríoc"
-#: awkgram.y:2686
+#: awkgram.y:3787
#, c-format
msgid "function `%s': parameter #%d, `%s', duplicates parameter #%d"
msgstr "feidhm `%s': is cóip é paraiméadar #%d, `%s', den pharaiméadar #%d"
-#: awkgram.y:2719
+#: awkgram.y:3829
#, c-format
msgid "function `%s': parameter `%s' shadows global variable"
msgstr "feidhm `%s': leanann paraiméadar `%s' athróg chomhchoiteann"
-#: awkgram.y:2831
+#: awkgram.y:3987
#, c-format
msgid "could not open `%s' for writing (%s)"
msgstr "níorbh fhéidir `%s' a oscailt chun scríobh (%s)"
-#: awkgram.y:2832 profile.c:96
+#: awkgram.y:3988 profile.c:85
msgid "sending profile to standard error"
msgstr "próifíl á seoladh go hearráid chaighdeánach"
-#: awkgram.y:2864
+#: awkgram.y:3994
#, c-format
msgid "%s: close failed (%s)"
msgstr "%s: theip ar an dún (%s)"
-#: awkgram.y:2985
+#: awkgram.y:4046
msgid "shadow_funcs() called twice!"
msgstr "glaodh dhá uair ar shadow_funcs()!"
-#: awkgram.y:3012
+#: awkgram.y:4052
msgid "there were shadowed variables."
msgstr "bhí scáthathrógaí ann."
-#: awkgram.y:3085
+#: awkgram.y:4081
#, c-format
msgid "function `%s': can't use function name as parameter name"
msgstr "feidhm `%s': níl cead ainm feidhme a úsáid mar ainm paraiméadar"
-#: awkgram.y:3088
+#: awkgram.y:4086
#, fuzzy, c-format
msgid "function `%s': can't use special variable `%s' as a function parameter"
msgstr "feidhm `%s': níl cead ainm feidhme a úsáid mar ainm paraiméadar"
-#: awkgram.y:3098
+#: awkgram.y:4102
#, c-format
msgid "function name `%s' previously defined"
msgstr "ainm feidhme `%s' sainmhínithe cheana"
-#: awkgram.y:3249 awkgram.y:3255
+#: awkgram.y:4271 awkgram.y:4277
#, c-format
msgid "function `%s' called but never defined"
msgstr "glaodh ar an bhfeidhm `%s' nach bhfuil sainithe"
-#: awkgram.y:3258
+#: awkgram.y:4280
#, c-format
msgid "function `%s' defined but never called"
msgstr "tá sainiú ag an bhfeidhm `%s' ach ní ghlaodh é"
-#: awkgram.y:3285
+#: awkgram.y:4311
#, c-format
msgid "regexp constant for parameter #%d yields boolean value"
msgstr "tagann luach Boole de bharr ón dtairiseach regexp don pharaiméadar #%d"
-#: awkgram.y:3329
+#: awkgram.y:4420
#, c-format
msgid ""
"function `%s' called with space between name and `(',\n"
@@ -418,703 +495,569 @@ msgstr ""
"glaodh feidhm `%s' le spás idir ainm agus `(',\n"
"nó úsáideadh é mar athróg nó mar eagar"
-#: awkgram.y:3750
-#, fuzzy
-msgid "division by zero attempted in `/'"
-msgstr "iarracht roinnt le nialas a dhéanamh i `/='"
+#: awkgram.y:4673 eval.c:1845
+msgid "division by zero attempted"
+msgstr "iarracht roinnt le nialas a dhéanamh"
-#: awkgram.y:3755 eval.c:1411
+#: awkgram.y:4682 eval.c:1877
#, c-format
msgid "division by zero attempted in `%%'"
msgstr "iarracht roinnt le nialas a dhéanamh i `%%'"
-#: builtin.c:122
+#: awkgram.y:5342
+msgid "statement may have no effect"
+msgstr "seans nach mbeidh éifeacht ag an ráiteas"
+
+#: builtin.c:120
#, c-format
msgid "%s to \"%s\" failed (%s)"
msgstr "theip ar %s go \"%s\" (%s)"
-#: builtin.c:123
+#: builtin.c:121
msgid "standard output"
msgstr "aschur caighdeánach"
-#: builtin.c:124
-msgid "reason unknown"
-msgstr "níl fhios an fáth"
-
-#: builtin.c:137
+#: builtin.c:135
msgid "exp: received non-numeric argument"
msgstr "exp: fuarthas argóint neamhuimhriúil"
-#: builtin.c:143
+#: builtin.c:141
#, c-format
msgid "exp: argument %g is out of range"
msgstr "exp: argóint %g as raon"
-#: builtin.c:201
+#: builtin.c:200
#, c-format
msgid "fflush: cannot flush: pipe `%s' opened for reading, not writing"
msgstr "fflush: ní dhúisófear: píopa `%s' oscailte do léamh, ní do scríobh"
-#: builtin.c:204
+#: builtin.c:203
#, c-format
msgid "fflush: cannot flush: file `%s' opened for reading, not writing"
msgstr "fflush: ní dhúisófear: comhad `%s' oscailte do léamh, ní do scríobh"
-#: builtin.c:216
+#: builtin.c:215
#, c-format
msgid "fflush: `%s' is not an open file, pipe or co-process"
msgstr "fflush: ní comhad, píopa nó comhphróiseas oscailte é `%s'"
-#: builtin.c:310
+#: builtin.c:322
msgid "index: received non-string first argument"
msgstr "index: ní teaghrán é an chéad argóint"
-#: builtin.c:312
+#: builtin.c:324
msgid "index: received non-string second argument"
msgstr "index: ní teaghrán é an dara hargóint"
-#: builtin.c:434
+#: builtin.c:446
msgid "int: received non-numeric argument"
msgstr "int: fuarthas argóint neamhuimhriúil"
-#: builtin.c:464
+#: builtin.c:469
+#, fuzzy
msgid "`length(array)' is a gawk extension"
msgstr "is feabhsúchán gawk é `length(array)'"
-#: builtin.c:471
-msgid "length: untyped parameter argument will be forced to scalar"
-msgstr ""
-
-#: builtin.c:480
-msgid "length: untyped argument will be forced to scalar"
-msgstr ""
-
-#: builtin.c:484
+#: builtin.c:477
msgid "length: received non-string argument"
msgstr "length: fuarthas argóint nach teaghrán é"
-#: builtin.c:515
+#: builtin.c:508
msgid "log: received non-numeric argument"
msgstr "log: fuarthas argóint neamhuimhriúil"
-#: builtin.c:518
+#: builtin.c:511
#, c-format
msgid "log: received negative argument %g"
msgstr "log: fuarthas argóint diúltach %g"
-#: builtin.c:726 builtin.c:729
-msgid "must use `count$' on all formats or none"
-msgstr ""
-"má úsáidtear `count$' i bhformáid ar bith, caithfidh é a úsáid i ngach "
-"formáid é"
-
-#: builtin.c:790
-#, c-format
-msgid "field width is ignored for `%%%%' specifier"
-msgstr ""
-
-#: builtin.c:792
-#, c-format
-msgid "precision is ignored for `%%%%' specifier"
-msgstr ""
-
-#: builtin.c:794
-#, c-format
-msgid "field width and precision are ignored for `%%%%' specifier"
-msgstr ""
-
-#: builtin.c:845
-msgid "`$' is not permitted in awk formats"
-msgstr "Níl `$' ceadaithe i bhformáidí awk"
-
-#: builtin.c:851
-msgid "arg count with `$' must be > 0"
-msgstr "caithfidh áireamh na harg. le `$' bheith > 0"
-
-#: builtin.c:853
-#, c-format
-msgid "arg count %ld greater than total number of supplied arguments"
-msgstr "áireamh na harg. %ld níos mó ná na hargóintí faighte"
-
-#: builtin.c:855
-msgid "`$' not permitted after period in format"
-msgstr "níl `$' ceadaithe i bhformáid théis punc"
-
-#: builtin.c:868
-msgid "no `$' supplied for positional field width or precision"
-msgstr "níor thugadh `$' do leithead nó beachtas an réimse ionaid"
-
-#: builtin.c:938
-msgid "`l' is meaningless in awk formats; ignored"
-msgstr "níl ciall ag `l' i bhformáidí awk; neamhairdithe"
-
-#: builtin.c:942
-msgid "`l' is not permitted in POSIX awk formats"
-msgstr "ní cheadaítear `l' i bhformáidí awk POSIX"
-
-#: builtin.c:953
-msgid "`L' is meaningless in awk formats; ignored"
-msgstr "níl ciall ag `L' i bhformáidí awk; neamhairdithe"
-
-#: builtin.c:957
-msgid "`L' is not permitted in POSIX awk formats"
-msgstr "ní cheadaítear `L' i bhformáidí awk POSIX"
-
-#: builtin.c:968
-msgid "`h' is meaningless in awk formats; ignored"
-msgstr "níl ciall ag `h' i bhformáidí awk; neamhairdithe"
-
-#: builtin.c:972
-msgid "`h' is not permitted in POSIX awk formats"
-msgstr "ní cheadaítear `h' i bhformáidí awk POSIX"
-
-#: builtin.c:1252
-#, c-format
-msgid "[s]printf: value %g is out of range for `%%%c' format"
-msgstr "[s]printf: tá luach %g as raon don bhformáid `%%%c'"
-
-#: builtin.c:1332
-#, c-format
-msgid "ignoring unknown format specifier character `%c': no argument converted"
-msgstr ""
-
-#: builtin.c:1338
-msgid "not enough arguments to satisfy format string"
-msgstr "ní leor argóintí le haghaidh an teaghráin formáide"
-
-#: builtin.c:1340
-msgid "^ ran out for this one"
-msgstr "^ imithe thar bráid don cheann seo"
-
-#: builtin.c:1346
-msgid "[s]printf: format specifier does not have control letter"
-msgstr "[s]printf: níl litir rialúcháin ag an sonraitheoir formáide"
-
-#: builtin.c:1349
-msgid "too many arguments supplied for format string"
-msgstr "fuarthas an iomarca argóintí don teaghrán formáide"
+#: builtin.c:531 builtin.c:573 builtin.c:586 builtin.c:982 builtin.c:994
+#, fuzzy, c-format
+msgid "attempt to use array `%s' in scalar context"
+msgstr "iarracht eagar `%s' a úsáid i gcomhthéacs scálach"
-#: builtin.c:1424 builtin.c:1427
+#: builtin.c:569 builtin.c:580
msgid "printf: no arguments"
msgstr "printf: níl aon argóint"
-#: builtin.c:1451
+#: builtin.c:621
msgid "sqrt: received non-numeric argument"
msgstr "sqrt: fuarthas argóint neamhuimhriúil"
-#: builtin.c:1455
+#: builtin.c:625
#, c-format
msgid "sqrt: called with negative argument %g"
msgstr "sqrt: glaodh le argóint diúltach %g"
-#: builtin.c:1479
-#, c-format
-msgid "substr: start index %g is invalid, using 1"
-msgstr "substr: tá tús innéacs %g neamhbhailí, ag úsáid a 1"
-
-#: builtin.c:1484
-#, c-format
-msgid "substr: non-integer start index %g will be truncated"
-msgstr "substr: teascfar tús neamhuimhriúil an innéacs %g"
-
-#: builtin.c:1510
+#: builtin.c:649
#, c-format
msgid "substr: length %g is not >= 1"
msgstr "substr: níl fad %g >= 1"
-#: builtin.c:1512
+#: builtin.c:651
#, c-format
msgid "substr: length %g is not >= 0"
msgstr "substr: níl fad %g >= 0"
-#: builtin.c:1519
+#: builtin.c:658
#, c-format
msgid "substr: non-integer length %g will be truncated"
msgstr "ubstr: teascfar an fad neamhuimhriúil %g"
-#: builtin.c:1524
+#: builtin.c:663
#, c-format
msgid "substr: length %g too big for string indexing, truncating to %g"
msgstr "substr: fad %g ró-mhór d'innéacsú teaghráin, ag teascadh go %g"
-#: builtin.c:1536
+#: builtin.c:675
+#, c-format
+msgid "substr: start index %g is invalid, using 1"
+msgstr "substr: tá tús innéacs %g neamhbhailí, ag úsáid a 1"
+
+#: builtin.c:680
+#, c-format
+msgid "substr: non-integer start index %g will be truncated"
+msgstr "substr: teascfar tús neamhuimhriúil an innéacs %g"
+
+#: builtin.c:705
msgid "substr: source string is zero length"
msgstr "substr: tá an teaghrán foinse folamh"
-#: builtin.c:1552
+#: builtin.c:721
#, c-format
msgid "substr: start index %g is past end of string"
msgstr "substr: innéacs tosaithe %g tar éis deireadh an teaghráin"
-#: builtin.c:1560
+#: builtin.c:729
#, c-format
msgid ""
"substr: length %g at start index %g exceeds length of first argument (%lu)"
msgstr "substr: fad %g ag innéacs tosaithe %g rófhada don chéad argóint (%lu)"
-#: builtin.c:1637
+#: builtin.c:806
+msgid "strftime: received non-numeric second argument"
+msgstr "strftime: fuarthas dara hargóint neamhuimhriúil"
+
+#: builtin.c:813
msgid "strftime: received non-string first argument"
msgstr "strftime: ní teaghrán í an chéad argóint"
-#: builtin.c:1643
+#: builtin.c:819
msgid "strftime: received empty format string"
msgstr "strftime: fuarthas teaghrán formáide folamh"
-#: builtin.c:1652
-msgid "strftime: received non-numeric second argument"
-msgstr "strftime: fuarthas dara hargóint neamhuimhriúil"
-
-#: builtin.c:1729
+#: builtin.c:885
msgid "mktime: received non-string argument"
msgstr "mktime: ní teaghrán é an argóint"
-#: builtin.c:1746
+#: builtin.c:902
msgid "mktime: at least one of the values is out of the default range"
msgstr ""
-#: builtin.c:1781
+#: builtin.c:937
msgid "'system' function not allowed in sandbox mode"
msgstr ""
-#: builtin.c:1786
+#: builtin.c:942
msgid "system: received non-string argument"
msgstr "system: fuarthas argóint nach teaghrán í"
-#: builtin.c:1907 eval.c:2285
+#: builtin.c:997 eval.c:1105 eval.c:1557 eval.c:1570
+#, c-format
+msgid "reference to uninitialized variable `%s'"
+msgstr "tagairt d'athróg nach bhfuil túsaithe `%s'"
+
+#: builtin.c:1064
#, c-format
msgid "reference to uninitialized field `$%d'"
msgstr "tagairt d'athróg nach bhfuil túsaithe `$%d'"
-#: builtin.c:2012
+#: builtin.c:1098
msgid "tolower: received non-string argument"
msgstr "tolower: fuarthas argóint nach teaghrán í"
-#: builtin.c:2042
+#: builtin.c:1151
msgid "toupper: received non-string argument"
msgstr "toupper: fuarthas argóint nach teaghrán í"
-#: builtin.c:2075
+#: builtin.c:1199
msgid "atan2: received non-numeric first argument"
msgstr "atan2: ní huimhir é an chéad argóint"
-#: builtin.c:2077
+#: builtin.c:1201
msgid "atan2: received non-numeric second argument"
msgstr "atan2: ní huimhir é an dara hargóint"
-#: builtin.c:2096
+#: builtin.c:1220
msgid "sin: received non-numeric argument"
msgstr "sin: fuarthas argóint neamhuimhriúil"
-#: builtin.c:2112
+#: builtin.c:1236
msgid "cos: received non-numeric argument"
msgstr "cos: fuarthas argóint neamhuimhriúil"
-#: builtin.c:2165
+#: builtin.c:1289
msgid "srand: received non-numeric argument"
msgstr "srand: fuarthas argóint neamhuimhriúil"
-#: builtin.c:2200
+#: builtin.c:1320
msgid "match: third argument is not an array"
msgstr "match: ní eagar é an tríú hargóint"
-#: builtin.c:2750
+#: builtin.c:1827
msgid "gensub: third argument of 0 treated as 1"
msgstr "gensub: 3ú hargóint 0 úsáidte mar 1"
-#: builtin.c:2866
+#: builtin.c:1869
msgid "lshift: received non-numeric first argument"
msgstr "lshift: ní huimhir é an chéad argóint"
-#: builtin.c:2868
+#: builtin.c:1871
msgid "lshift: received non-numeric second argument"
msgstr "lshift: ní huimhir é an dara hargóint"
-#: builtin.c:2874
+#: builtin.c:1877
#, c-format
msgid "lshift(%lf, %lf): negative values will give strange results"
msgstr "lshift(%lf, %lf): tiocfaidh torthaí aisteacha as luachanna diúltacha"
-#: builtin.c:2876
+#: builtin.c:1879
#, c-format
msgid "lshift(%lf, %lf): fractional values will be truncated"
msgstr "lshift(%lf, %lf): teascfar luachanna codánacha"
-#: builtin.c:2878
+#: builtin.c:1881
#, c-format
msgid "lshift(%lf, %lf): too large shift value will give strange results"
msgstr ""
"lshift(%lf, %lf): gheobhfar torthaí aisteacha le luach iomlaoideach ró-mhór"
-#: builtin.c:2904
+#: builtin.c:1908
msgid "rshift: received non-numeric first argument"
msgstr "rshift: ní huimhir é an chéad argóint"
-#: builtin.c:2906
+#: builtin.c:1910
msgid "rshift: received non-numeric second argument"
msgstr "rshift: ní huimhir é an dara hargóint"
-#: builtin.c:2912
+#: builtin.c:1916
#, c-format
msgid "rshift(%lf, %lf): negative values will give strange results"
msgstr "rshift(%lf, %lf): gheobhfar torthaí aisteacha le luachanna diúltacha"
-#: builtin.c:2914
+#: builtin.c:1918
#, c-format
msgid "rshift(%lf, %lf): fractional values will be truncated"
msgstr "rshift(%lf, %lf): teascfar luachanna codánacha"
-#: builtin.c:2916
+#: builtin.c:1920
#, c-format
msgid "rshift(%lf, %lf): too large shift value will give strange results"
msgstr ""
"rshift(%lf, %lf): gheobhfar torthaí aisteacha le luach iomlaoideach ró-mhór"
-#: builtin.c:2942
+#: builtin.c:1947
msgid "and: received non-numeric first argument"
msgstr "and: ní huimhir é an chéad argóint"
-#: builtin.c:2944
+#: builtin.c:1949
msgid "and: received non-numeric second argument"
msgstr "and: ní huimhir é an dara hargóint"
-#: builtin.c:2950
+#: builtin.c:1955
#, c-format
msgid "and(%lf, %lf): negative values will give strange results"
msgstr "and(%lf, %lf): gheobhfar torthaí aisteacha le luachanna diúltacha"
-#: builtin.c:2952
+#: builtin.c:1957
#, c-format
msgid "and(%lf, %lf): fractional values will be truncated"
msgstr "and(%lf, %lf): teascfar luachanna codánacha"
-#: builtin.c:2978
+#: builtin.c:1984
msgid "or: received non-numeric first argument"
msgstr "or: ní huimhir é an chéad argóint"
-#: builtin.c:2980
+#: builtin.c:1986
msgid "or: received non-numeric second argument"
msgstr "or: ní huimhir é an dara hargóint"
-#: builtin.c:2986
+#: builtin.c:1992
#, c-format
msgid "or(%lf, %lf): negative values will give strange results"
msgstr "or(%lf, %lf): gheobhfar torthaí aisteacha le luachanna diúltacha"
-#: builtin.c:2988
+#: builtin.c:1994
#, c-format
msgid "or(%lf, %lf): fractional values will be truncated"
msgstr "or(%lf, %lf): teascfar luachanna codánacha"
-#: builtin.c:3014
+#: builtin.c:2023
msgid "xor: received non-numeric first argument"
msgstr "xor: ní huimhir é an chéad argóint"
-#: builtin.c:3016
+#: builtin.c:2025
msgid "xor: received non-numeric second argument"
msgstr "xor: ní huimhir é an dara hargóint"
-#: builtin.c:3022
+#: builtin.c:2031
#, c-format
msgid "xor(%lf, %lf): negative values will give strange results"
msgstr "xor(%lf, %lf): gheobhfar torthaí aisteacha le luachanna diúltacha"
-#: builtin.c:3024
+#: builtin.c:2033
#, c-format
msgid "xor(%lf, %lf): fractional values will be truncated"
msgstr "xor(%lf, %lf): teascfar luachanna codánacha"
-#: builtin.c:3048
+#: builtin.c:2057 builtin.c:2063
msgid "compl: received non-numeric argument"
msgstr "compl: fuarthas argóint neamhuimhriúil"
-#: builtin.c:3054
+#: builtin.c:2065
#, c-format
msgid "compl(%lf): negative value will give strange results"
msgstr "compl(%lf): gheobhfar torthaí aisteacha le luachanna diúltacha"
-#: builtin.c:3056
+#: builtin.c:2067
#, c-format
msgid "compl(%lf): fractional value will be truncated"
msgstr "compl(%lf): teascfar luachanna codánacha"
-#: builtin.c:3229
+#: builtin.c:2237
#, c-format
msgid "dcgettext: `%s' is not a valid locale category"
msgstr "dcgettext: ní catagóir logánach ceart é `%s'"
-#: eval.c:374
+#: eval.c:412
#, c-format
msgid "unknown nodetype %d"
msgstr " cineál anaithnid nóid %d"
-#: eval.c:423
-msgid "buffer overflow in genflags2str"
-msgstr "maolán thar maoil i genflags2str"
+#: eval.c:423 eval.c:437
+#, fuzzy, c-format
+msgid "unknown opcode %d"
+msgstr " cineál anaithnid nóid %d"
-#: eval.c:455 eval.c:461 profile.c:787
+#: eval.c:434
#, c-format
-msgid "attempt to use array `%s' in a scalar context"
-msgstr "iarracht eagar `%s' a úsáid i gcomhthéacs scálach"
+msgid "opcode %s not an operator or keyword"
+msgstr ""
-#: eval.c:803
-#, c-format
-msgid "for loop: array `%s' changed size from %ld to %ld during loop execution"
-msgstr "lúb for: d'athraigh méid an eagair `%s' ó %ld go %ld i lár na lúibe"
+#: eval.c:487
+msgid "buffer overflow in genflags2str"
+msgstr "maolán thar maoil i genflags2str"
-#: eval.c:824
-msgid "`break' outside a loop is not portable"
-msgstr "níl `break' lasmuigh den lúb iniompartha"
+#: eval.c:613
+#, c-format
+msgid ""
+"\n"
+"\t# Function Call Stack:\n"
+"\n"
+msgstr ""
+"\n"
+"\t# Cruach an Glaoigh ar an bhFeidhm:\n"
+"\n"
-#: eval.c:828
-msgid "`break' outside a loop is not allowed"
-msgstr "níl `break' lasmuigh den lúb ceadaithe"
+#: eval.c:640
+msgid "`IGNORECASE' is a gawk extension"
+msgstr "is feabhsúchán gawk é `IGNORECASE'"
-#: eval.c:845
-msgid "`continue' outside a loop is not portable"
-msgstr "níl `continue' lasmuigh den lúb iniompartha"
+#: eval.c:669
+msgid "`BINMODE' is a gawk extension"
+msgstr "is feabhsúchán gawk é `BINMODE'"
-#: eval.c:849
-msgid "`continue' outside a loop is not allowed"
-msgstr "níl `continue' lasmuigh den lúb ceadaithe"
+#: eval.c:727
+#, c-format
+msgid "BINMODE value `%s' is invalid, treated as 3"
+msgstr ""
-#: eval.c:883
-msgid "`next' cannot be called from a BEGIN rule"
-msgstr "ní féidir glaoigh ar `next' ó riail TÚS"
+#: eval.c:817
+#, c-format
+msgid "bad `%sFMT' specification `%s'"
+msgstr "drochshonraíocht`%sFMT' `%s'"
-#: eval.c:885
-msgid "`next' cannot be called from an END rule"
-msgstr "ní féidir glaoigh ar `next' ó riail CRÍOCH"
+#: eval.c:895
+msgid "turning off `--lint' due to assignment to `LINT'"
+msgstr "`--lint' á mhúchadh de bharr sannachán go `LINT'"
-#: eval.c:887
-#, fuzzy
-msgid "`next' cannot be called from a BEGINFILE rule"
-msgstr "ní féidir glaoigh ar `next' ó riail TÚS"
+#: eval.c:1067 eval.c:1544
+#, c-format
+msgid "can't use function name `%s' as variable or array"
+msgstr "ní féidir ainm feidhme `%s' a úsáid mar athróg nó eagar"
-#: eval.c:889
-#, fuzzy
-msgid "`next' cannot be called from an ENDFILE rule"
-msgstr "ní féidir glaoigh ar `next' ó riail CRÍOCH"
+#: eval.c:1095
+msgid "assignment is not allowed to result of builtin function"
+msgstr "ní féidir sannachán a dhéanamh le toradh ó fheidhm insuite"
-#: eval.c:898
-msgid "`nextfile' cannot be called from a BEGIN rule"
-msgstr "ní féidir glaoigh ar `nextfile' ó riail TÚS"
+#: eval.c:1104 eval.c:1556 eval.c:1569
+#, c-format
+msgid "reference to uninitialized argument `%s'"
+msgstr "tagairt d'argóint nach bhfuil túsaithe `%s'"
-#: eval.c:900
-msgid "`nextfile' cannot be called from an END rule"
-msgstr "ní féidir glaoigh ar `nextfile' ó riail CRÍOCH"
+#: eval.c:1123
+msgid "attempt to field reference from non-numeric value"
+msgstr "iarracht tagairt a fháil ó luach neamhuimhriúil"
-#: eval.c:906
+#: eval.c:1125
#, fuzzy
-msgid "`nextfile' cannot be called from an ENDFILE rule"
-msgstr "ní féidir glaoigh ar `nextfile' ó riail CRÍOCH"
+msgid "attempt to field reference from null string"
+msgstr "iarracht tagairt a fháil ó theaghrán neamhnitheach"
-#: eval.c:963
-msgid "statement has no effect"
-msgstr "níl aon éifeacht ag an ráiteas"
+#: eval.c:1131
+#, fuzzy, c-format
+msgid "attempt to access field %ld"
+msgstr "iarracht rochtain a dhéanamh ar réimse %d"
-#: eval.c:1040 eval.c:2133
-#, c-format
-msgid "can't use function name `%s' as variable or array"
-msgstr "ní féidir ainm feidhme `%s' a úsáid mar athróg nó eagar"
+#: eval.c:1140
+#, fuzzy, c-format
+msgid "reference to uninitialized field `$%ld'"
+msgstr "tagairt d'athróg nach bhfuil túsaithe `$%d'"
-#: eval.c:1047 eval.c:1053
+#: eval.c:1202
#, c-format
-msgid "reference to uninitialized argument `%s'"
-msgstr "tagairt d'argóint nach bhfuil túsaithe `%s'"
+msgid "function `%s' called with more arguments than declared"
+msgstr "glaodh ar fheidhm `%s' le níos mó argóintí nó mar a bhí fógartha"
-#: eval.c:1062 eval.c:2142
+#: eval.c:1358
#, c-format
-msgid "reference to uninitialized variable `%s'"
-msgstr "tagairt d'athróg nach bhfuil túsaithe `%s'"
+msgid "unwind_stack: unexpected type `%s'"
+msgstr ""
-#: eval.c:1210
-msgid ""
-"concatenation: side effects in one expression have changed the length of "
-"another!"
-msgstr "comhchaitéiniú: d'athraigh éifeachtaí sloinn amháin fad ceann eile!"
+#: eval.c:1636
+#, fuzzy, c-format
+msgid "attempt to use scalar `%s' as an array"
+msgstr "iarracht scálach '%s' a úsáid mar eagar"
-#: eval.c:1315
+#: eval.c:1680
msgid "assignment used in conditional context"
msgstr "sannadh úsáidte i gcomhthéacs coinníollach"
-#: eval.c:1396
-msgid "division by zero attempted"
-msgstr "iarracht roinnt le nialas a dhéanamh"
-
-#: eval.c:1426 profile.c:663
-#, c-format
-msgid "illegal type (%s) in tree_eval"
-msgstr "cineál neamhcheadaithe (%s) i tree_eval"
+#: eval.c:1684
+msgid "statement has no effect"
+msgstr "níl aon éifeacht ag an ráiteas"
-#: eval.c:1589
+#: eval.c:2028
msgid "division by zero attempted in `/='"
msgstr "iarracht roinnt le nialas a dhéanamh i `/='"
-#: eval.c:1611
+#: eval.c:2053
#, c-format
msgid "division by zero attempted in `%%='"
msgstr "iarracht roinnt le nialas a dhéanamh i `%%='"
-#: eval.c:1891
-#, c-format
-msgid "function `%s' called with more arguments than declared"
-msgstr "glaodh ar fheidhm `%s' le níos mó argóintí nó mar a bhí fógartha"
-
-#: eval.c:1948
-#, c-format
-msgid "function `%s' not defined"
-msgstr "feidhm `%s' gan sainmhíniú"
-
-#: eval.c:1950
-#, c-format
-msgid "identifier `%s' is not a function"
-msgstr ""
-
-#: eval.c:1997
-#, c-format
-msgid ""
-"function parameter `%s' is not a scalar and cannot be used for indirect "
-"function call"
-msgstr ""
-
-#: eval.c:2014
-#, c-format
-msgid "indirect call of real function `%s' is silly"
-msgstr ""
+#: eval.c:2139
+msgid "`continue' outside a loop is not allowed"
+msgstr "níl `continue' lasmuigh den lúb ceadaithe"
-#: eval.c:2034
-#, c-format
-msgid "function `%s' called indirectly through `%s' does not exist"
-msgstr ""
+#: eval.c:2145
+#, fuzzy
+msgid "`break' outside a loop is not allowed"
+msgstr "níl `break' lasmuigh den lúb ceadaithe"
-#: eval.c:2039
+#: eval.c:2229
#, c-format
-msgid "identifier `%s' cannot be used for indirect function call"
-msgstr ""
+msgid "for loop: array `%s' changed size from %ld to %ld during loop execution"
+msgstr "lúb for: d'athraigh méid an eagair `%s' ó %ld go %ld i lár na lúibe"
-#: eval.c:2105
+#: eval.c:2342
#, c-format
-msgid ""
-"\n"
-"\t# Function Call Stack:\n"
-"\n"
+msgid "function called indirectly through `%s' does not exist"
msgstr ""
-"\n"
-"\t# Cruach an Glaoigh ar an bhFeidhm:\n"
-"\n"
-#: eval.c:2108
+#: eval.c:2354
#, c-format
-msgid "\t# -- main --\n"
-msgstr "\t# -- príomh --\n"
-
-#: eval.c:2269
-msgid "attempt to field reference from non-numeric value"
-msgstr "iarracht tagairt a fháil ó luach neamhuimhriúil"
-
-#: eval.c:2271
-msgid "attempt to reference from null string"
-msgstr "iarracht tagairt a fháil ó theaghrán neamhnitheach"
-
-#: eval.c:2277
-#, c-format
-msgid "attempt to access field %d"
-msgstr "iarracht rochtain a dhéanamh ar réimse %d"
-
-#: eval.c:2298 eval.c:2305 profile.c:843
-msgid "assignment is not allowed to result of builtin function"
-msgstr "ní féidir sannachán a dhéanamh le toradh ó fheidhm insuite"
+msgid "function `%s' not defined"
+msgstr "feidhm `%s' gan sainmhíniú"
-#: eval.c:2369
-msgid "`IGNORECASE' is a gawk extension"
-msgstr "is feabhsúchán gawk é `IGNORECASE'"
+#: eval.c:2481
+#, fuzzy, c-format
+msgid "`nextfile' cannot be called from a `%s' rule"
+msgstr "ní féidir glaoigh ar `nextfile' ó riail CRÍOCH"
-#: eval.c:2398
-msgid "`BINMODE' is a gawk extension"
-msgstr "is feabhsúchán gawk é `BINMODE'"
+#: eval.c:2540
+#, fuzzy, c-format
+msgid "`next' cannot be called from a `%s' rule"
+msgstr "ní féidir glaoigh ar `next' ó riail CRÍOCH"
-#: eval.c:2456
+#: eval.c:2602
#, c-format
-msgid "BINMODE value `%s' is invalid, treated as 3"
+msgid "Sorry, don't know how to interpret `%s'"
msgstr ""
-#: eval.c:2546
-#, c-format
-msgid "bad `%sFMT' specification `%s'"
-msgstr "drochshonraíocht`%sFMT' `%s'"
-
-#: eval.c:2624
-msgid "turning off `--lint' due to assignment to `LINT'"
-msgstr "`--lint' á mhúchadh de bharr sannachán go `LINT'"
-
-#: ext.c:61
-msgid "extensions not allowed in sandbox mode"
+#: ext.c:62
+msgid "extensions are not allowed in sandbox mode"
msgstr ""
-#: ext.c:65 ext.c:70
+#: ext.c:68 ext.c:73
msgid "`extension' is a gawk extension"
msgstr "is feabhsúchán gawk é `extension'"
-#: ext.c:80
-#, c-format
-msgid "extension: cannot open `%s' (%s)\n"
+#: ext.c:83
+#, fuzzy, c-format
+msgid "fatal: extension: cannot open `%s' (%s)\n"
msgstr "extension: ní féidir oscailt `%s' (%s)\n"
-#: ext.c:88
-#, c-format
-msgid "extension: library `%s': cannot call function `%s' (%s)\n"
+#: ext.c:93
+#, fuzzy, c-format
+msgid "fatal: extension: library `%s': cannot call function `%s' (%s)\n"
msgstr "extension: leabharlann `%s': ní féidir glaoigh ar fheidhm `%s' (%s)\n"
-#: ext.c:108
+#: ext.c:123
msgid "extension: missing function name"
msgstr "extension: ainm feidhme in easnamh"
-#: ext.c:113
+#: ext.c:128
#, c-format
msgid "extension: illegal character `%c' in function name `%s'"
msgstr "extension: carachtar neamhcheadaithe `%c' in ainm na feidhme `%s'"
-#: ext.c:119
+#: ext.c:137
#, c-format
msgid "extension: can't redefine function `%s'"
msgstr "extension: ní féidir feidhm `%s' a shainmhíniú arís"
-#: ext.c:123
+#: ext.c:141
#, c-format
msgid "extension: function `%s' already defined"
msgstr "extension: sainmhíníodh an fheidhm `%s' cheana"
-#: ext.c:128
+#: ext.c:146
+#, c-format
+msgid "extension: function name `%s' previously defined"
+msgstr "extension: ainm feidhme `%s' sainmhínithe cheana"
+
+#: ext.c:148
#, c-format
msgid "extension: can't use gawk built-in `%s' as function name"
msgstr "extension: ní féidir insuite gawk `%s' a úsáid mar ainm feidhme"
-#: ext.c:130
+#: ext.c:152
#, c-format
-msgid "extension: function name `%s' previously defined"
-msgstr "extension: ainm feidhme `%s' sainmhínithe cheana"
+msgid "make_builtin: negative argument count for function `%s'"
+msgstr ""
-#: ext.c:207
-#, c-format
+#: ext.c:255
+#, fuzzy, c-format
msgid "function `%s' defined to take no more than %d argument(s)"
msgstr "ní cheadaíonn feidhm `%s' níos mó ná %d argóint"
-#: ext.c:210
+#: ext.c:258
#, c-format
msgid "function `%s': missing argument #%d"
msgstr "feidhm `%s': argóint #%d ar iarraidh"
-#: ext.c:220
+#: ext.c:268
#, c-format
msgid "function `%s': argument #%d: attempt to use scalar as an array"
msgstr "feidhm `%s': argóint #%d: iarracht scálach a úsáid mar eagar"
-#: ext.c:224
+#: ext.c:272
#, c-format
msgid "function `%s': argument #%d: attempt to use array as a scalar"
msgstr "feidhm `%s': argóint #%d: iarracht scálach a úsáid mar eagar"
-#: ext.c:249
+#: ext.c:285
msgid "Operation Not Supported"
msgstr "Oibríocht Gan Tacaíocht"
@@ -1122,59 +1065,58 @@ msgstr "Oibríocht Gan Tacaíocht"
msgid "NF set to negative value"
msgstr "NF socraithe go luach diúltach"
-#: field.c:913
-msgid "split: second argument is not an array"
-msgstr "scoilt: ní eagar é an dara hargóint"
-
-#: field.c:922 field.c:932 field.c:937
+#: field.c:939 field.c:946 field.c:950
#, fuzzy
msgid "split: fourth argument is a gawk extension"
msgstr "meaitseáil: is feabhsúchán gawk é an tríú hargóint"
-#: field.c:928
+#: field.c:943
#, fuzzy
msgid "split: fourth argument is not an array"
msgstr "scoilt: ní eagar é an dara hargóint"
-#: field.c:975
-#, fuzzy
-msgid "split: null string for third argument is a gawk extension"
+#: field.c:957
+msgid "split: second argument is not an array"
+msgstr "scoilt: ní eagar é an dara hargóint"
+
+#: field.c:987
+msgid "split: null string for third arg is a gawk extension"
msgstr ""
"scoilt: is feabhsúchán gawk é an teaghrán neamhnitheach don tríú hargóint"
-#: field.c:1032
+#: field.c:1028
#, fuzzy
-msgid "patsplit: second argument is not an array"
+msgid "patsplit: fourth argument is not an array"
msgstr "scoilt: ní eagar é an dara hargóint"
-#: field.c:1041
+#: field.c:1033
#, fuzzy
-msgid "patsplit: fourth argument is not an array"
+msgid "patsplit: second argument is not an array"
msgstr "scoilt: ní eagar é an dara hargóint"
-#: field.c:1067
+#: field.c:1051
#, fuzzy
msgid "patsplit: third argument must be non-null"
msgstr "match: ní eagar é an tríú hargóint"
-#: field.c:1111
+#: field.c:1084
msgid "`FIELDWIDTHS' is a gawk extension"
msgstr "is feabhsúchán gawk é `FIELDWIDTHS'"
-#: field.c:1141 field.c:1155
+#: field.c:1147
#, c-format
msgid "invalid FIELDWIDTHS value, near `%s'"
msgstr "luach FIELDWIDTHS neamhbhailí cóngarach le `%s'"
-#: field.c:1238
+#: field.c:1220
msgid "null string for `FS' is a gawk extension"
msgstr "is feabhsúchán gawk é an teaghrán neamhnitheach do `FS'"
-#: field.c:1242
+#: field.c:1224
msgid "old awk does not support regexps as value of `FS'"
msgstr "ní thacaíonn sean-awk le slonn ionadaíochta mar luach de `FS'"
-#: field.c:1357
+#: field.c:1343
#, fuzzy
msgid "`FPAT' is a gawk extension"
msgstr "is feabhsúchán gawk é `%s'"
@@ -1234,502 +1176,499 @@ msgstr "%s: ní cheadaítear argóint i ndiaidh na rogha `-W %s'\n"
msgid "%s: option '-W %s' requires an argument\n"
msgstr "%s: tá argóint de dhíth i ndiaidh na rogha `%s'\n"
-#: io.c:379
+#: io.c:272
#, c-format
msgid "command line argument `%s' is a directory: skipped"
msgstr ""
-#: io.c:413
+#: io.c:275 io.c:372
#, c-format
msgid "cannot open file `%s' for reading (%s)"
msgstr "ní féidir `%s' a oscailt chun é a léamh (%s)"
-#: io.c:459 io.c:2999
+#: io.c:419
#, c-format
msgid "error reading input file `%s': %s"
msgstr "earráid ag léamh comhad aschuir `%s': %s"
-#: io.c:506
+#: io.c:470
#, c-format
msgid "close of fd %d (`%s') failed (%s)"
msgstr "dúnadh fd %d (`%s') teipthe (%s)"
-#: io.c:617
-msgid "redirection not allowed in sandbox mode"
-msgstr ""
-
-#: io.c:648
-#, c-format
-msgid "invalid tree type %s in redirect()"
-msgstr "cineál crainn %s neamhbhailí san atreorú()"
-
-#: io.c:654
+#: io.c:577
#, c-format
msgid "expression in `%s' redirection only has numeric value"
msgstr "níl ach luach uimhriúil ag an slonn in atreorú `%s'"
-#: io.c:660
+#: io.c:583
#, c-format
msgid "expression for `%s' redirection has null string value"
msgstr "tá luach teaghráin neamhnitheach ag an slonn in atreorú `%s'"
-#: io.c:665
+#: io.c:589
#, c-format
msgid "filename `%s' for `%s' redirection may be result of logical expression"
msgstr ""
"seans gur toradh sloinn loighciúil é an comhadainm `%s' don atreorú `%s'"
-#: io.c:707
+#: io.c:628
#, c-format
msgid "unnecessary mixing of `>' and `>>' for file `%.*s'"
msgstr "meascán neamhriachtanach de `>' agus `>>' do chomhad `%.*s'"
-#: io.c:754
+#: io.c:681
#, c-format
msgid "can't open pipe `%s' for output (%s)"
msgstr "ní féidir píopa `%s' a oscailt d'aschur (%s)"
-#: io.c:763
+#: io.c:691
#, c-format
msgid "can't open pipe `%s' for input (%s)"
msgstr "ní féidir píopa `%s' a oscailt d'ionchur (%s)"
-#: io.c:786
+#: io.c:712
#, c-format
msgid "can't open two way pipe `%s' for input/output (%s)"
msgstr "ní féidir an píopa déthreo `%s' a oscailt d'ionchur/aschur (%s)"
-#: io.c:864
+#: io.c:794
#, c-format
msgid "can't redirect from `%s' (%s)"
msgstr "ní féidir atreorú ó `%s' (%s)"
-#: io.c:867
+#: io.c:797
#, c-format
msgid "can't redirect to `%s' (%s)"
msgstr "ní féidir atreorú go `%s' (%s)"
-#: io.c:920
+#: io.c:846
msgid ""
"reached system limit for open files: starting to multiplex file descriptors"
msgstr ""
"tagtha chuig teorainn an chórais do chomhadlanna oscailte: ag tosú "
"tuairisceoirí na gcomhadlann a ilphléacsadh"
-#: io.c:936
+#: io.c:862
#, c-format
msgid "close of `%s' failed (%s)."
msgstr "dúnadh `%s' teipthe (%s)."
-#: io.c:944
+#: io.c:870
msgid "too many pipes or input files open"
msgstr "tá an iomarca píopaí nó comhadlanna ionchuir oscailte"
-#: io.c:967
+#: io.c:892
msgid "close: second argument must be `to' or `from'"
msgstr "close: tá `to' nó `from' de dhíth mar dara hargóint"
-#: io.c:981
+#: io.c:909
#, c-format
msgid "close: `%.*s' is not an open file, pipe or co-process"
msgstr "close: ní comhad oscailte, píopa nó comhphróiseas é `%.*s'"
-#: io.c:986
+#: io.c:914
msgid "close of redirection that was never opened"
msgstr "dúnadh atreoraithe nach n-osclóadh riamh"
-#: io.c:1083
+#: io.c:1011
#, c-format
msgid "close: redirection `%s' not opened with `|&', second argument ignored"
msgstr ""
"close: níl atreorú `%s' oscailte le `|&', rinneadh neamhaird ar an dara "
"hargóint"
-#: io.c:1099
+#: io.c:1027
#, c-format
msgid "failure status (%d) on pipe close of `%s' (%s)"
msgstr "stádas teipfhulangach (%d) ar dúnadh an phíopa `%s' (%s)"
-#: io.c:1102
+#: io.c:1030
#, c-format
msgid "failure status (%d) on file close of `%s' (%s)"
msgstr "stádas teipfhulangach (%d) ar dúnadh an chomhaid `%s' (%s)"
-#: io.c:1122
+#: io.c:1050
#, c-format
msgid "no explicit close of socket `%s' provided"
msgstr "ní fhuarthas dúnadh léir an tsoicéid `%s'"
-#: io.c:1125
+#: io.c:1053
#, c-format
msgid "no explicit close of co-process `%s' provided"
msgstr "ní fhuarthas dúnadh léir an chomhphróisis `%s'"
-#: io.c:1128
+#: io.c:1056
#, c-format
msgid "no explicit close of pipe `%s' provided"
msgstr "ní fhuarthas dúnadh léir an phíopa `%s'"
-#: io.c:1131
+#: io.c:1059
#, c-format
msgid "no explicit close of file `%s' provided"
msgstr "ní fhuarthas dúnadh léir an chomhaid `%s'"
-#: io.c:1159 io.c:1214 main.c:832 main.c:874
+#: io.c:1087 io.c:1142 main.c:823 main.c:865
#, c-format
msgid "error writing standard output (%s)"
msgstr "earráid agus aschur caighdeánach á scríobh (%s)"
-#: io.c:1163 io.c:1219
+#: io.c:1091 io.c:1147
#, c-format
msgid "error writing standard error (%s)"
msgstr "earráid agus earráid caighdeánach á scríobh (%s)"
-#: io.c:1171
+#: io.c:1099
#, c-format
msgid "pipe flush of `%s' failed (%s)."
msgstr "sruthladh píopa `%s' teipthe (%s)."
-#: io.c:1174
+#: io.c:1102
#, c-format
msgid "co-process flush of pipe to `%s' failed (%s)."
msgstr "sruthladh comhphróisis an phíopa go `%s' teipthe (%s)."
-#: io.c:1177
+#: io.c:1105
#, c-format
msgid "file flush of `%s' failed (%s)."
msgstr "sruthladh comhaid `%s' teipthe (%s)."
-#: io.c:1292
+#: io.c:1219
#, c-format
msgid "local port %s invalid in `/inet'"
msgstr "port logánta %s neamhbhailí i `/inet'"
-#: io.c:1309
+#: io.c:1236
#, c-format
msgid "remote host and port information (%s, %s) invalid"
msgstr "eolas neamhbhailí faoin chianósta agus port (%s, %s)"
-#: io.c:1344
+#: io.c:1276
msgid "/inet/raw client not ready yet, sorry"
msgstr "tá brón orm, níl an cliant /inet/raw réidh go fóill"
-#: io.c:1347 io.c:1383
+#: io.c:1279 io.c:1320
msgid "only root may use `/inet/raw'."
msgstr "`/inet/raw' ceadaithe do root amháin."
-#: io.c:1381
+#: io.c:1318
msgid "/inet/raw server not ready yet, sorry"
msgstr "tá brón orm, níl an freastalaí /inet/raw ré go fóill"
-#: io.c:1477
+#: io.c:1417
#, c-format
msgid "no (known) protocol supplied in special filename `%s'"
msgstr "ní fhuarthas fíor phrótacal sa chomhadainm speisialta `%s'"
-#: io.c:1491
+#: io.c:1431
#, c-format
msgid "special file name `%s' is incomplete"
msgstr "níl an comhadainm speisialta `%s' iomlán"
-#: io.c:1506
+#: io.c:1447
msgid "must supply a remote hostname to `/inet'"
msgstr "tá ainm cianóstaigh de dhíth ag `/inet'"
-#: io.c:1524
+#: io.c:1465
msgid "must supply a remote port to `/inet'"
msgstr "tá cianphort de dhíth ag `/inet'"
-#: io.c:1570
+#: io.c:1511
msgid "TCP/IP communications are not supported"
msgstr "cumarsáid TCP/IP gan tacaíocht"
-#: io.c:1758
+#: io.c:1698
#, c-format
msgid "could not open `%s', mode `%s'"
msgstr "níorbh fhéidir `%s' a oscailt, mód `%s'"
-#: io.c:1809
+#: io.c:1749
#, c-format
msgid "close of master pty failed (%s)"
msgstr "theip ar dúnadh máistir-pty (%s)"
-#: io.c:1811 io.c:1963 io.c:2114
+#: io.c:1751 io.c:1918 io.c:2075
#, c-format
msgid "close of stdout in child failed (%s)"
msgstr "theip ar dúnadh aschuir caighdeánach i mac teipthe (%s)"
-#: io.c:1814
+#: io.c:1754
#, c-format
msgid "moving slave pty to stdout in child failed (dup: %s)"
msgstr ""
"theip ar bogadh an pty sclábhánta go haschur caighdeánach sa mhac (dup: %s)"
-#: io.c:1816 io.c:1968
+#: io.c:1756 io.c:1923
#, c-format
msgid "close of stdin in child failed (%s)"
msgstr "theip ar dúnadh ionchuir caighdeánach i mac (%s)"
-#: io.c:1819
+#: io.c:1759
#, c-format
msgid "moving slave pty to stdin in child failed (dup: %s)"
msgstr ""
"theip ar bogadh an pty sclábhánta go hionchuir caighdeánach sa mhac (dup: %s)"
-#: io.c:1821 io.c:1840
+#: io.c:1761 io.c:1782
#, c-format
msgid "close of slave pty failed (%s)"
msgstr "theip ar dúnadh an pty sclábhánta (%s)"
-#: io.c:1914 io.c:1966 io.c:2095 io.c:2117
+#: io.c:1860 io.c:1921 io.c:2053 io.c:2078
#, c-format
msgid "moving pipe to stdout in child failed (dup: %s)"
msgstr "theip ar bhogadh píopa go haschur caighdeánach i mac (dup: %s)"
-#: io.c:1918 io.c:1971
+#: io.c:1867 io.c:1926
#, c-format
msgid "moving pipe to stdin in child failed (dup: %s)"
msgstr "theip ar bhogadh píopa go hionchur caighdeánach i mac (dup: %s)"
-#: io.c:1935 io.c:2108
+#: io.c:1887 io.c:2068
msgid "restoring stdout in parent process failed\n"
msgstr "theip ar dhul ar ais go haschur caighdeánach i máthair teipthe\n"
-#: io.c:1940
+#: io.c:1895
msgid "restoring stdin in parent process failed\n"
msgstr "theip ar dhul ar ais go hionchur caighdeánach i máthair teipthe\n"
-#: io.c:1974 io.c:2119 io.c:2130
+#: io.c:1929 io.c:2080 io.c:2094
#, c-format
msgid "close of pipe failed (%s)"
msgstr "theip ar dúnadh phíopa (%s)"
-#: io.c:2019
+#: io.c:1974
msgid "`|&' not supported"
msgstr "`|&' gan tacaíocht"
-#: io.c:2085
+#: io.c:2040
#, c-format
msgid "cannot open pipe `%s' (%s)"
msgstr "ní féidir píopa `%s' a oscailt (%s)"
-#: io.c:2126
+#: io.c:2088
#, c-format
msgid "cannot create child process for `%s' (fork: %s)"
msgstr "ní féidir mac a dhéanamh do `%s' (fork: %s)"
-#: io.c:2518
+#: io.c:2577
#, c-format
msgid "data file `%s' is empty"
msgstr "tá comhad sonraí `%s' folamh"
-#: io.c:2560 io.c:2568
+#: io.c:2618 io.c:2626
msgid "could not allocate more input memory"
msgstr "níorbh fhéidir níos mó cuimhne ionchuir a leithdháileadh"
-#: io.c:3125
+#: io.c:3173
msgid "multicharacter value of `RS' is a gawk extension"
msgstr "is feabhsúchán gawk é an luach ilcharachtar 'RS'"
-#: main.c:313
+#: main.c:311
msgid "out of memory"
-msgstr ""
+msgstr "cuimhne ídithe"
-#: main.c:381
+#: main.c:388
msgid "`-m[fr]' option irrelevant in gawk"
msgstr "`-m[fr]' rogha neamhábhartha i ngawk"
-#: main.c:383
+#: main.c:390
msgid "-m option usage: `-m[fr] nnn'"
msgstr "úsáid rogha -m: `-m[fr] nnn'"
-#: main.c:419
+#: main.c:426
#, fuzzy
msgid "empty argument to `-e/--source' ignored"
msgstr "rinneadh neamhshuim ar argóint fholamh go `--source'"
-#: main.c:485
+#: main.c:492
#, c-format
msgid "%s: option `-W %s' unrecognized, ignored\n"
msgstr "%s: rogha `-W %s' anaithnid, rinneadh neamhshuim air\n"
-#: main.c:530
+#: main.c:545
#, c-format
msgid "%s: option requires an argument -- %c\n"
msgstr "%s: tá argóint de dhíth i ndiaidh na rogha -- %c\n"
-#: main.c:551
+#: main.c:566
msgid "environment variable `POSIXLY_CORRECT' set: turning on `--posix'"
msgstr "athróg thimpeallachta `POSIXLY_CORRECT' socraithe: ag lasadh `--posix'"
-#: main.c:557
+#: main.c:572
msgid "`--posix' overrides `--traditional'"
msgstr "sáraíonn `--posix' `--traditional'"
-#: main.c:568
+#: main.c:583
msgid "`--posix'/`--traditional' overrides `--non-decimal-data'"
msgstr "sáraíonn `--posix'/`--traditional' `--non-decimal-data'"
-#: main.c:572
+#: main.c:587
#, c-format
msgid "running %s setuid root may be a security problem"
msgstr "seans gur neamhdhaingean é ag rith %s setuid root"
-#: main.c:577
+#: main.c:592
#, fuzzy
msgid "`--posix' overrides `--binary'"
msgstr "sáraíonn `--posix' `--traditional'"
-#: main.c:622
+#: main.c:643
#, c-format
msgid "can't set binary mode on stdin (%s)"
msgstr "ní féidir mód dénártha a shocrú ar stdin (%s)"
-#: main.c:625
+#: main.c:646
#, c-format
msgid "can't set binary mode on stdout (%s)"
msgstr "ní féidir mód dénártha a shocrú ar stdout (%s)"
-#: main.c:627
+#: main.c:648
#, c-format
msgid "can't set binary mode on stderr (%s)"
msgstr "ní féidir mód dénártha a shocrú ar stderr (%s)"
-#: main.c:668
+#: main.c:687
msgid "no program text at all!"
msgstr "níl aon téacs sa ríomhchlár!"
-#: main.c:773
+#: main.c:762
#, c-format
msgid "Usage: %s [POSIX or GNU style options] -f progfile [--] file ...\n"
msgstr ""
"Úsáid: %s [roghanna cineál POSIX nó GNU] -f clárchomhad [--] comhad ...\n"
-#: main.c:775
+#: main.c:764
#, c-format
msgid "Usage: %s [POSIX or GNU style options] [--] %cprogram%c file ...\n"
msgstr ""
"Úsáid: %s [roghanna cineál POSIX nó GNU] [--] %críomhchlár%c comhad ...\n"
-#: main.c:780
+#: main.c:769
#, fuzzy
msgid "POSIX options:\t\tGNU long options: (standard)\n"
msgstr "roghanna POSIX:\t\tGNU roghanna fada:\n"
-#: main.c:781
+#: main.c:770
msgid "\t-f progfile\t\t--file=progfile\n"
msgstr "\t-f comhad\t\t--file=progfile\n"
-#: main.c:782
+#: main.c:771
msgid "\t-F fs\t\t\t--field-separator=fs\n"
msgstr "\t-F fs\t\t\t--field-separator=fs\n"
-#: main.c:783
+#: main.c:772
msgid "\t-v var=val\t\t--assign=var=val\n"
msgstr "\t-v athróg=luach\t\t--assign=athróg=luach\n"
-#: main.c:784
+#: main.c:773
#, fuzzy
-msgid "POSIX options:\t\tGNU long options: (extensions)\n"
+msgid "Short options:\t\tGNU long options: (extensions)\n"
msgstr "roghanna POSIX:\t\tGNU roghanna fada:\n"
-#: main.c:785
+#: main.c:774
msgid "\t-m[fr] val\n"
msgstr "\t-m[fr] luach\n"
-#: main.c:786
+#: main.c:775
msgid "\t-b\t\t\t--characters-as-bytes\n"
msgstr ""
-#: main.c:787
-msgid "\t-c\t\t\t--compat, --traditional\n"
-msgstr ""
+#: main.c:776
+#, fuzzy
+msgid "\t-c\t\t\t--traditional\n"
+msgstr "\t-W traditional\t\t--traditional\n"
-#: main.c:788
+#: main.c:777
#, fuzzy
-msgid "\t-C\t\t\t--copyleft, --copyright\n"
+msgid "\t-C\t\t\t--copyright\n"
msgstr "\t-W copyright\t\t--copyright\n"
-#: main.c:789
+#: main.c:778
#, fuzzy
msgid "\t-d [file]\t\t--dump-variables[=file]\n"
msgstr "\t-W dump-variables[=comhad]\t--dump-variables[=comhad]\n"
-#: main.c:790
+#: main.c:779
#, fuzzy
msgid "\t-e 'program-text'\t--source='program-text'\n"
msgstr "\t-W source=program-text\t--source=program-text\n"
-#: main.c:791
+#: main.c:780
#, fuzzy
msgid "\t-E file\t\t\t--exec=file\n"
msgstr "\t-W exec=comhad\t\t--exec=comhad\n"
-#: main.c:792
+#: main.c:781
#, fuzzy
msgid "\t-g\t\t\t--gen-pot\n"
msgstr "\t-W gen-po\t\t--gen-po\n"
-#: main.c:793
+#: main.c:782
#, fuzzy
-msgid "\t-h\t\t\t--help, --usage\n"
+msgid "\t-h\t\t\t--help\n"
msgstr "\t-W help\t\t\t--help\n"
-#: main.c:794
+#: main.c:783
#, fuzzy
-msgid "\t-l [fatal]\t\t--lint[=fatal]\n"
+msgid "\t-L [fatal]\t\t--lint[=fatal]\n"
msgstr "\t-W lint[=fatal]\t\t--lint[=fatal]\n"
-#: main.c:795
-#, fuzzy
-msgid "\t-L\t\t\t--lint-old\n"
-msgstr "\t-W lint-old\t\t--lint-old\n"
-
-#: main.c:796
+#: main.c:784
#, fuzzy
msgid "\t-n\t\t\t--non-decimal-data\n"
msgstr "\t-W non-decimal-data\t--non-decimal-data\n"
-#: main.c:797
+#: main.c:785
#, fuzzy
msgid "\t-N\t\t\t--use-lc-numeric\n"
msgstr "\t-W use-lc-numeric\t--use-lc-numeric\n"
-#: main.c:798
+#: main.c:786
msgid "\t-O\t\t\t--optimize\n"
msgstr ""
-#: main.c:799
+#: main.c:787
#, fuzzy
msgid "\t-p [file]\t\t--profile[=file]\n"
msgstr "\t-W profile[=comhad]\t--profile[=comhad]\n"
-#: main.c:800
+#: main.c:788
#, fuzzy
msgid "\t-P\t\t\t--posix\n"
msgstr "\t-W posix\t\t--posix\n"
-#: main.c:801
+#: main.c:789
#, fuzzy
msgid "\t-r\t\t\t--re-interval\n"
msgstr "\t-W re-interval\t\t--re-interval\n"
-#: main.c:802
+#: main.c:791
#, fuzzy
+msgid "\t-R file\t\t\t--command=file\n"
+msgstr "\t-W exec=comhad\t\t--exec=comhad\n"
+
+#: main.c:792
msgid "\t-S\t\t\t--sandbox\n"
-msgstr "\t-W posix\t\t--posix\n"
+msgstr ""
-#: main.c:803
+#: main.c:793
+#, fuzzy
+msgid "\t-t\t\t\t--lint-old\n"
+msgstr "\t-W lint-old\t\t--lint-old\n"
+
+#: main.c:794
#, fuzzy
msgid "\t-V\t\t\t--version\n"
msgstr "\t-W version\t\t--version\n"
-#: main.c:805
+#: main.c:796
msgid "\t-W nostalgia\t\t--nostalgia\n"
msgstr "\t-W nostalgia\t\t--nostalgia\n"
-#: main.c:808
-msgid "\t-W parsedebug\t\t--parsedebug\n"
+#: main.c:799
+#, fuzzy
+msgid "\t-Y\t\t--parsedebug\n"
msgstr "\t-W parsedebug\t\t--parsedebug\n"
#. TRANSLATORS: --help output 5 (end)
@@ -1737,7 +1676,7 @@ msgstr "\t-W parsedebug\t\t--parsedebug\n"
#. for this application. Please add _another line_ with the
#. address for translation bugs.
#. no-wrap
-#: main.c:817
+#: main.c:808
msgid ""
"\n"
"To report bugs, see node `Bugs' in `gawk.info', which is\n"
@@ -1749,7 +1688,7 @@ msgstr ""
"sa rannán `Reporting Problems and Bugs' sa leagan faoi chló.\n"
"\n"
-#: main.c:821
+#: main.c:812
msgid ""
"gawk is a pattern scanning and processing language.\n"
"By default it reads standard input and writes standard output.\n"
@@ -1760,7 +1699,7 @@ msgstr ""
"haschur caighdeánach.\n"
"\n"
-#: main.c:825
+#: main.c:816
msgid ""
"Examples:\n"
"\tgawk '{ sum += $1 }; END { print sum }' file\n"
@@ -1770,7 +1709,7 @@ msgstr ""
"\tgawk '{ sum += $1 }; END { print sum }' comhad\n"
"\tgawk -F: '{ print $1 }' /etc/passwd\n"
-#: main.c:845
+#: main.c:836
#, c-format
msgid ""
"Copyright (C) 1989, 1991-%d Free Software Foundation.\n"
@@ -1789,7 +1728,7 @@ msgstr ""
"nó (más mian leat) aon leagan níos déanaí.\n"
"\n"
-#: main.c:853
+#: main.c:844
msgid ""
"This program is distributed in the hope that it will be useful,\n"
"but WITHOUT ANY WARRANTY; without even the implied warranty of\n"
@@ -1803,7 +1742,7 @@ msgstr ""
"GNU General Public License chun níos mó sonraí a fháil.\n"
"\n"
-#: main.c:864
+#: main.c:855
msgid ""
"You should have received a copy of the GNU General Public License\n"
"along with this program. If not, see http://www.gnu.org/licenses/.\n"
@@ -1812,16 +1751,16 @@ msgstr ""
"a fháil in éineacht leis an ríomhchlár seo; mura bhfuair,\n"
"féach ar http://www.gnu.org/licenses/.\n"
-#: main.c:899
+#: main.c:890
msgid "-Ft does not set FS to tab in POSIX awk"
msgstr "ní athraíonn -Ft FS go táb san awk POSIX"
-#: main.c:1116
+#: main.c:1122
#, c-format
msgid "unknown value for field spec: %d\n"
msgstr ""
-#: main.c:1176
+#: main.c:1182
#, c-format
msgid ""
"%s: `%s' argument to `-v' not in `var=value' form\n"
@@ -1830,174 +1769,140 @@ msgstr ""
"%s: níl an argóint `%s' go `-v' san fhoirm `var=value'\n"
"\n"
-#: main.c:1196
+#: main.c:1202
#, c-format
msgid "`%s' is not a legal variable name"
msgstr "ní ainm athróige dleathúil é `%s'"
-#: main.c:1199
+#: main.c:1205
#, c-format
msgid "`%s' is not a variable name, looking for file `%s=%s'"
msgstr "ní ainm athróige é `%s', ag lorg comhad `%s=%s'"
-#: main.c:1238
+#: main.c:1258
msgid "floating point exception"
msgstr "eisceacht snámhphointe"
-#: main.c:1245
+#: main.c:1265
msgid "fatal error: internal error"
msgstr "earráid mharfach: earráid inmheánach"
-#: main.c:1260
+#: main.c:1280
#, fuzzy
msgid "fatal error: internal error: segfault"
msgstr "earráid mharfach: earráid inmheánach"
-#: main.c:1272
+#: main.c:1292
#, fuzzy
msgid "fatal error: internal error: stack overflow"
msgstr "earráid mharfach: earráid inmheánach"
-#: main.c:1322
+#: main.c:1342
#, c-format
msgid "no pre-opened fd %d"
msgstr "níl aon fd %d réamhoscailte"
-#: main.c:1329
+#: main.c:1349
#, c-format
msgid "could not pre-open /dev/null for fd %d"
msgstr "níorbh fhéidir /dev/null a réamhoscailt do fd %d"
-#: main.c:1352 main.c:1361
+#: main.c:1372 main.c:1381
#, c-format
msgid "could not find groups: %s"
msgstr "ní féidir na grúpaí a aimsiú: %s"
-#: msg.c:54
+#: msg.c:62
#, c-format
msgid "cmd. line:"
msgstr "líne na n-orduithe:"
-#: msg.c:120
+#: msg.c:97
msgid "warning: "
msgstr "rabhadh: "
-#: msg.c:142
+#: msg.c:106
msgid "error: "
msgstr "earráid: "
-#: msg.c:178
+#: msg.c:129
msgid "fatal: "
msgstr "marfach: "
-#: node.c:63 node.c:78 node.c:105 node.c:121 node.c:151
-msgid "can't convert string to float"
-msgstr "ní féidir teaghrán a thiontú go snámhphointe"
-
-#: node.c:465
+#: node.c:401
msgid "backslash at end of string"
msgstr "cúlslais ag deireadh an teaghráin"
-#: node.c:609
+#: node.c:502
#, c-format
msgid "old awk does not support the `\\%c' escape sequence"
msgstr "ní thacaíonn sean-awk le seicheamh éalaithe `\\%c'"
-#: node.c:660
+#: node.c:553
msgid "POSIX does not allow `\\x' escapes"
msgstr "ní cheadaíonn POSIX éalaithe `\\x'"
-#: node.c:666
+#: node.c:559
msgid "no hex digits in `\\x' escape sequence"
msgstr "níl digití heicsidheachúlach sa seicheamh éalaithe `\\x'"
-#: node.c:688
+#: node.c:581
#, c-format
msgid ""
"hex escape \\x%.*s of %d characters probably not interpreted the way you "
"expect"
msgstr ""
-#: node.c:703
+#: node.c:596
#, c-format
msgid "escape sequence `\\%c' treated as plain `%c'"
msgstr "seicheamh éalaithe `\\%c' úsáidte mar ghnáth `%c'"
+#: node.c:737
+msgid ""
+"Invalid multibyte data detected. There may be a mismatch between your data "
+"and your locale."
+msgstr ""
+
#: posix/gawkmisc.c:172
#, c-format
msgid "%s %s `%s': could not set close-on-exec: (fcntl: %s)"
msgstr "%s %s `%s': níorbh fhéidir close-on-exec a shannadh: (fcntl: %s)"
-#: profile.c:94
+#: profile.c:83
#, c-format
msgid "could not open `%s' for writing: %s"
msgstr "Níorbh fhéidir `%s' a oscailt chun scríobh ann: %s"
-#: profile.c:457
-#, c-format
-msgid "internal error: %s with null vname"
-msgstr "earráid inmheánach: %s le vname nialasach"
-
-#: profile.c:522
-msgid "# treated internally as `delete'"
-msgstr "# úsáidte go hinmheánach mar `delete'"
-
-#: profile.c:1076
-#, c-format
-msgid "# this is a dynamically loaded extension function"
-msgstr "# is feidhm iarmhíreach é seo atá le luchtú go dinimiciúil"
-
-#: profile.c:1109
-#, c-format
-msgid "\t# gawk profile, created %s\n"
-msgstr "\t# cuntas gawk, cruthaíodh %s\n"
-
-#: profile.c:1112
-#, c-format
-msgid ""
-"\t# BEGIN block(s)\n"
-"\n"
-msgstr ""
-"\t# TÚS bloc(anna)\n"
-"\n"
-
-#: profile.c:1122
+#: profile.c:203
#, fuzzy, c-format
msgid ""
-"\t# BEGINFILE block(s)\n"
+"\t# %s block(s)\n"
"\n"
msgstr ""
-"\t# TÚS bloc(anna)\n"
+"\t# CRÍOCH bloc(anna)\n"
"\n"
-#: profile.c:1132
-#, c-format
+#: profile.c:208
+#, fuzzy, c-format
msgid ""
-"\t# Rule(s)\n"
+"\t# %s(s)\n"
"\n"
msgstr ""
"\t# Riail(eacha)\n"
"\n"
-#: profile.c:1138
-#, fuzzy, c-format
-msgid ""
-"\t# ENDFILE block(s)\n"
-"\n"
-msgstr ""
-"\t# CRÍOCH bloc(anna)\n"
-"\n"
+#: profile.c:278
+#, c-format
+msgid "internal error: %s with null vname"
+msgstr "earráid inmheánach: %s le vname nialasach"
-#: profile.c:1148
+#: profile.c:945
#, c-format
-msgid ""
-"\t# END block(s)\n"
-"\n"
-msgstr ""
-"\t# CRÍOCH bloc(anna)\n"
-"\n"
+msgid "\t# gawk profile, created %s\n"
+msgstr "\t# cuntas gawk, cruthaíodh %s\n"
-#: profile.c:1168
+#: profile.c:1328
#, c-format
msgid ""
"\n"
@@ -2006,17 +1911,12 @@ msgstr ""
"\n"
"\t# Feidhmeanna, i liosta aibítreach\n"
-#: profile.c:1431
+#: profile.c:1367
#, c-format
-msgid "unexpected type %s in prec_level"
-msgstr "cineál gan súil %s i prec_level"
-
-#: profile.c:1557
-#, fuzzy, c-format
-msgid "Unknown node type %s in pp_var"
-msgstr " cineál anaithnid nóid %d"
+msgid "redir2str: unknown redirection type %d"
+msgstr ""
-#: re.c:537
+#: re.c:559
#, c-format
msgid "regexp component `%.*s' should probably be `[%.*s]'"
msgstr ""
@@ -2089,18 +1989,40 @@ msgstr "Slonn ionadaíochta rómhór"
msgid "Unmatched ) or \\)"
msgstr ") nó \\) corr"
-#: regcomp.c:699
+#: regcomp.c:701
msgid "No previous regular expression"
msgstr "Níl aon slonn ionadaíochta roimhe seo"
-#~ msgid "%s: illegal option -- %c\n"
-#~ msgstr "%s: rogha neamhcheadaithe -- %c\n"
+#~ msgid "call of `length' without parentheses is deprecated by POSIX"
+#~ msgstr "lochtaíonn POSIX glao `length' gan lúibíní"
+
+#, fuzzy
+#~ msgid "reference to uninitialized field `$%s'"
+#~ msgstr "tagairt d'athróg nach bhfuil túsaithe `$%d'"
+
+#~ msgid "can't convert string to float"
+#~ msgstr "ní féidir teaghrán a thiontú go snámhphointe"
+
+#~ msgid "`continue' outside a loop is not portable"
+#~ msgstr "níl `continue' lasmuigh den lúb iniompartha"
+
+#~ msgid "`break' outside a loop is not portable"
+#~ msgstr "níl `break' lasmuigh den lúb iniompartha"
+
+#~ msgid "`nextfile' cannot be called from a BEGIN rule"
+#~ msgstr "ní féidir glaoigh ar `nextfile' ó riail TÚS"
+
+#~ msgid "`next' cannot be called from a BEGIN rule"
+#~ msgstr "ní féidir glaoigh ar `next' ó riail TÚS"
#~ msgid "file `%s' is a directory"
#~ msgstr "ní comhadlann é an comhad `%s'"
-#~ msgid "can't open two way socket `%s' for input/output (%s)"
-#~ msgstr "ní féidir an soicéad déthreo `%s' a oscailt d'ionchur/aschur (%s)"
+#~ msgid "use `PROCINFO[\"%s\"]' instead of `%s'"
+#~ msgstr "úsáid `PROCINFO[\"%s\"]' in ionad `%s'"
+
+#~ msgid "use `PROCINFO[...]' instead of `/dev/user'"
+#~ msgstr "úsáid `PROCINFO[...]' in ionad `/dev/user'"
#~ msgid "\t-W compat\t\t--compat\n"
#~ msgstr "\t-W compat\t\t--compat\n"
@@ -2108,42 +2030,109 @@ msgstr "Níl aon slonn ionadaíochta roimhe seo"
#~ msgid "\t-W copyleft\t\t--copyleft\n"
#~ msgstr "\t-W copyleft\t\t--copyleft\n"
-#~ msgid "\t-W traditional\t\t--traditional\n"
-#~ msgstr "\t-W traditional\t\t--traditional\n"
-
#~ msgid "\t-W usage\t\t--usage\n"
#~ msgstr "\t-W usage\t\t--usage\n"
-#, fuzzy
-#~ msgid "seek: invalid arguments"
-#~ msgstr "printf: níl aon argóint"
+#~ msgid ""
+#~ "\t# BEGIN block(s)\n"
+#~ "\n"
+#~ msgstr ""
+#~ "\t# TÚS bloc(anna)\n"
+#~ "\n"
-#, fuzzy
-#~ msgid "seek: `%.*s' is not an open file, pipe, or co-process"
-#~ msgstr "close: ní comhad oscailte, píopa nó comhphróiseas é `%.*s'"
+#~ msgid "must use `count$' on all formats or none"
+#~ msgstr ""
+#~ "má úsáidtear `count$' i bhformáid ar bith, caithfidh é a úsáid i ngach "
+#~ "formáid é"
+
+#~ msgid "`$' is not permitted in awk formats"
+#~ msgstr "Níl `$' ceadaithe i bhformáidí awk"
+
+#~ msgid "arg count with `$' must be > 0"
+#~ msgstr "caithfidh áireamh na harg. le `$' bheith > 0"
+
+#~ msgid "arg count %ld greater than total number of supplied arguments"
+#~ msgstr "áireamh na harg. %ld níos mó ná na hargóintí faighte"
+
+#~ msgid "`$' not permitted after period in format"
+#~ msgstr "níl `$' ceadaithe i bhformáid théis punc"
+
+#~ msgid "no `$' supplied for positional field width or precision"
+#~ msgstr "níor thugadh `$' do leithead nó beachtas an réimse ionaid"
+
+#~ msgid "`l' is meaningless in awk formats; ignored"
+#~ msgstr "níl ciall ag `l' i bhformáidí awk; neamhairdithe"
+
+#~ msgid "`l' is not permitted in POSIX awk formats"
+#~ msgstr "ní cheadaítear `l' i bhformáidí awk POSIX"
+
+#~ msgid "`L' is meaningless in awk formats; ignored"
+#~ msgstr "níl ciall ag `L' i bhformáidí awk; neamhairdithe"
+
+#~ msgid "`L' is not permitted in POSIX awk formats"
+#~ msgstr "ní cheadaítear `L' i bhformáidí awk POSIX"
+
+#~ msgid "`h' is meaningless in awk formats; ignored"
+#~ msgstr "níl ciall ag `h' i bhformáidí awk; neamhairdithe"
+
+#~ msgid "`h' is not permitted in POSIX awk formats"
+#~ msgstr "ní cheadaítear `h' i bhformáidí awk POSIX"
+
+#~ msgid "[s]printf: value %g is out of range for `%%%c' format"
+#~ msgstr "[s]printf: tá luach %g as raon don bhformáid `%%%c'"
+
+#~ msgid "not enough arguments to satisfy format string"
+#~ msgstr "ní leor argóintí le haghaidh an teaghráin formáide"
+
+#~ msgid "^ ran out for this one"
+#~ msgstr "^ imithe thar bráid don cheann seo"
+
+#~ msgid "[s]printf: format specifier does not have control letter"
+#~ msgstr "[s]printf: níl litir rialúcháin ag an sonraitheoir formáide"
+
+#~ msgid "too many arguments supplied for format string"
+#~ msgstr "fuarthas an iomarca argóintí don teaghrán formáide"
#, fuzzy
-#~ msgid "seek: `%.*s' is not an input file, pipe, or co-process"
-#~ msgstr "close: ní comhad oscailte, píopa nó comhphróiseas é `%.*s'"
+#~ msgid "attempt to use array parameter `%s' in a scalar context"
+#~ msgstr "iarracht eagar `%s' a úsáid i gcomhthéacs scálach"
+
+#~ msgid "can't open two way socket `%s' for input/output (%s)"
+#~ msgstr "ní féidir an soicéad déthreo `%s' a oscailt d'ionchur/aschur (%s)"
+
+#~ msgid ""
+#~ "concatenation: side effects in one expression have changed the length of "
+#~ "another!"
+#~ msgstr "comhchaitéiniú: d'athraigh éifeachtaí sloinn amháin fad ceann eile!"
+
+#~ msgid "illegal type (%s) in tree_eval"
+#~ msgstr "cineál neamhcheadaithe (%s) i tree_eval"
+
+#~ msgid "\t# -- main --\n"
+#~ msgstr "\t# -- príomh --\n"
+
+#~ msgid "invalid tree type %s in redirect()"
+#~ msgstr "cineál crainn %s neamhbhailí san atreorú()"
#, fuzzy
-#~ msgid "seek: `%.*s' is not a regular file"
-#~ msgstr "ní ainm athróige dleathúil é `%s'"
+#~ msgid "# treated internally as `delete'"
+#~ msgstr "# úsáidte go hinmheánach mar `delete'"
-#~ msgid "use `PROCINFO[\"%s\"]' instead of `%s'"
-#~ msgstr "úsáid `PROCINFO[\"%s\"]' in ionad `%s'"
+#~ msgid "# this is a dynamically loaded extension function"
+#~ msgstr "# is feidhm iarmhíreach é seo atá le luchtú go dinimiciúil"
-#~ msgid "use `PROCINFO[...]' instead of `/dev/user'"
-#~ msgstr "úsáid `PROCINFO[...]' in ionad `/dev/user'"
+#~ msgid "unexpected type %s in prec_level"
+#~ msgstr "cineál gan súil %s i prec_level"
-#~ msgid "delete: illegal use of variable `%s' as array"
-#~ msgstr "delete: úsáid neamhdhleathach na hathróige `%s' mar eagar"
+#, fuzzy
+#~ msgid "Unknown node type %s in pp_var"
+#~ msgstr " cineál anaithnid nóid %d"
-#~ msgid "asort: first argument is not an array"
-#~ msgstr "asort: ní eagar é an chéad argóint"
+#~ msgid "%s: illegal option -- %c\n"
+#~ msgstr "%s: rogha neamhcheadaithe -- %c\n"
-#~ msgid "asort: second argument is not an array"
-#~ msgstr "asort: ní eagar é an dara hargóint"
+#~ msgid "delete: illegal use of variable `%s' as array"
+#~ msgstr "delete: úsáid neamhdhleathach na hathróige `%s' mar eagar"
#~ msgid ""
#~ "\n"
diff --git a/po/gawk.pot b/po/gawk.pot
index 571bf6af..9ec74324 100644
--- a/po/gawk.pot
+++ b/po/gawk.pot
@@ -6,9 +6,9 @@
#, fuzzy
msgid ""
msgstr ""
-"Project-Id-Version: gawk 3.1.70\n"
+"Project-Id-Version: gawk 3.1.76\n"
"Report-Msgid-Bugs-To: arnold@skeeve.com\n"
-"POT-Creation-Date: 2010-11-12 12:20+0200\n"
+"POT-Creation-Date: 2010-11-17 08:48+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -16,1089 +16,1024 @@ msgstr ""
"Content-Type: text/plain; charset=CHARSET\n"
"Content-Transfer-Encoding: 8bit\n"
-#: array.c:112
+#: array.c:103
+#, c-format
+msgid "from %s"
+msgstr ""
+
+#: array.c:267
+msgid "attempt to use a scalar value as array"
+msgstr ""
+
+#: array.c:270
#, c-format
msgid "attempt to use function `%s' as an array"
msgstr ""
-#: array.c:115
+#: array.c:273
#, c-format
msgid "attempt to use scalar parameter `%s' as an array"
msgstr ""
-#: array.c:118
+#: array.c:276
#, c-format
msgid "attempt to use scalar `%s' as array"
msgstr ""
-#: array.c:156
+#: array.c:321 array.c:648 eval.c:1075 eval.c:1079 eval.c:1581 eval.c:1649
+#: eval.c:1928
#, c-format
-msgid "from %s"
+msgid "attempt to use array `%s' in a scalar context"
msgstr ""
-#: array.c:513
+#: array.c:570
#, c-format
msgid "reference to uninitialized element `%s[\"%.*s\"]'"
msgstr ""
-#: array.c:519
+#: array.c:576
#, c-format
msgid "subscript of array `%s' is null string"
msgstr ""
-#: array.c:623
+#: array.c:684
#, c-format
msgid "delete: index `%s' not in array `%s'"
msgstr ""
-#: array.c:792
+#: array.c:705
+#, c-format
+msgid "attempt to use scalar `%s[\"%.*s\"]' as an array"
+msgstr ""
+
+#: array.c:868
#, c-format
msgid "%s: empty (null)\n"
msgstr ""
-#: array.c:797
+#: array.c:873
#, c-format
msgid "%s: empty (zero)\n"
msgstr ""
-#: array.c:801
+#: array.c:877
#, c-format
msgid "%s: table_size = %d, array_size = %d\n"
msgstr ""
-#: array.c:830
+#: array.c:912
#, c-format
msgid "%s: is parameter\n"
msgstr ""
-#: array.c:835
+#: array.c:916
#, c-format
msgid "%s: array_ref to %s\n"
msgstr ""
-#: awkgram.y:224 awkgram.y:227
+#: array.c:921
+msgid "adump: argument not an array"
+msgstr ""
+
+#: array.c:1139
+msgid "attempt to use array in a scalar context"
+msgstr ""
+
+#: array.c:1236
+msgid "asort: second argument not an array"
+msgstr ""
+
+#: array.c:1237
+msgid "asorti: second argument not an array"
+msgstr ""
+
+#: array.c:1245
+msgid "asort: first argument not an array"
+msgstr ""
+
+#: array.c:1246
+msgid "asorti: first argument not an array"
+msgstr ""
+
+#: awkgram.y:246
#, c-format
msgid "%s blocks must have an action part"
msgstr ""
-#: awkgram.y:230
+#: awkgram.y:249
msgid "each rule must have a pattern or an action part"
msgstr ""
-#: awkgram.y:266 awkgram.y:275
+#: awkgram.y:320 awkgram.y:330
msgid "old awk does not support multiple `BEGIN' or `END' rules"
msgstr ""
-#: awkgram.y:304
+#: awkgram.y:367
#, c-format
msgid "`%s' is a built-in function, it cannot be redefined"
msgstr ""
-#: awkgram.y:350
+#: awkgram.y:427
msgid "regexp constant `//' looks like a C++ comment, but is not"
msgstr ""
-#: awkgram.y:353
+#: awkgram.y:430
#, c-format
msgid "regexp constant `/%s/' looks like a C comment, but is not"
msgstr ""
-#: awkgram.y:380 awkgram.y:692
-msgid "statement may have no effect"
+#: awkgram.y:735
+msgid "`break' is not allowed outside a loop or switch"
+msgstr ""
+
+#: awkgram.y:744
+msgid "`continue' is not allowed outside a loop"
msgstr ""
-#: awkgram.y:477 awkgram.y:480 awkgram.y:504 awkgram.y:511 awkgram.y:518
+#: awkgram.y:753
#, c-format
-msgid "`%s' used in %s action"
+msgid "`next' used in %s action"
msgstr ""
-#: awkgram.y:495 awkgram.y:499
+#: awkgram.y:767 awkgram.y:771
msgid "`nextfile' is a gawk extension"
msgstr ""
-#: awkgram.y:528
+#: awkgram.y:775
+#, c-format
+msgid "`nextfile' used in %s action"
+msgstr ""
+
+#: awkgram.y:799
msgid "`return' used outside function context"
msgstr ""
-#: awkgram.y:570
+#: awkgram.y:859
msgid "plain `print' in BEGIN or END rule should probably be `print \"\"'"
msgstr ""
-#: awkgram.y:586 awkgram.y:594
+#: awkgram.y:927 awkgram.y:935
msgid "`delete array' is a gawk extension"
msgstr ""
-#: awkgram.y:608 awkgram.y:616
+#: awkgram.y:955 awkgram.y:963
msgid "`delete(array)' is a non-portable tawk extension"
msgstr ""
-#: awkgram.y:660
+#: awkgram.y:1004
#, c-format
msgid "duplicate case values in switch body: %s"
msgstr ""
-#: awkgram.y:670
-msgid "Duplicate `default' detected in switch body"
+#: awkgram.y:1014
+msgid "duplicate `default' detected in switch body"
msgstr ""
-#: awkgram.y:759
+#: awkgram.y:1151
msgid "multistage two-way pipelines don't work"
msgstr ""
-#: awkgram.y:850
+#: awkgram.y:1253
msgid "regular expression on right of assignment"
msgstr ""
-#: awkgram.y:860
+#: awkgram.y:1263
msgid "regular expression on left of `~' or `!~' operator"
msgstr ""
-#: awkgram.y:866 awkgram.y:954
+#: awkgram.y:1278 awkgram.y:1423
msgid "old awk does not support the keyword `in' except after `for'"
msgstr ""
-#: awkgram.y:872
+#: awkgram.y:1287
msgid "regular expression on right of comparison"
msgstr ""
-#: awkgram.y:936
+#: awkgram.y:1399
#, c-format
-msgid "`getline var' invalid inside %s rule"
+msgid "`getline var' invalid inside `%s' rule"
msgstr ""
-#: awkgram.y:939
+#: awkgram.y:1401
#, c-format
-msgid "`getline' invalid inside %s rule"
+msgid "`getline' invalid inside `%s' rule"
msgstr ""
-#: awkgram.y:944
+#: awkgram.y:1407
msgid "non-redirected `getline' undefined inside END action"
msgstr ""
-#: awkgram.y:955
+#: awkgram.y:1424
msgid "old awk does not support multidimensional arrays"
msgstr ""
-#: awkgram.y:1001
+#: awkgram.y:1528
msgid "call of `length' without parentheses is not portable"
msgstr ""
-#: awkgram.y:1006
-msgid "call of `length' without parentheses is deprecated by POSIX"
-msgstr ""
-
-#: awkgram.y:1051
+#: awkgram.y:1591
msgid "indirect function calls are a gawk extension"
msgstr ""
-#: awkgram.y:1084
-msgid "use of non-array as array"
+#: awkgram.y:1605
+#, c-format
+msgid "can not use special variable `%s' for indirect function call"
msgstr ""
-#: awkgram.y:1087
+#: awkgram.y:1682
msgid "invalid subscript expression"
msgstr ""
-#: awkgram.y:1329
-msgid "unexpected newline or end of string"
+#: awkgram.y:1722
+msgid "use of non-array as array"
msgstr ""
-#: awkgram.y:1446
-msgid "empty program text on command line"
+#: awkgram.y:1993
+msgid "unexpected newline or end of string"
msgstr ""
-#: awkgram.y:1502
+#: awkgram.y:2248 awkgram.y:2296 awkgram.y:2470
#, c-format
msgid "can't open source file `%s' for reading (%s)"
msgstr ""
-#: awkgram.y:1600
+#: awkgram.y:2249 awkgram.y:2297 builtin.c:122
+msgid "reason unknown"
+msgstr ""
+
+#: awkgram.y:2257
+#, c-format
+msgid "already included source file `%s'"
+msgstr ""
+
+#: awkgram.y:2281
+msgid "@include is a gawk extension"
+msgstr ""
+
+#: awkgram.y:2288
+msgid "empty filename after @include"
+msgstr ""
+
+#: awkgram.y:2422
+msgid "empty program text on command line"
+msgstr ""
+
+#: awkgram.y:2537
#, c-format
msgid "can't read sourcefile `%s' (%s)"
msgstr ""
-#: awkgram.y:1608
+#: awkgram.y:2547
#, c-format
msgid "source file `%s' is empty"
msgstr ""
-#: awkgram.y:1800 awkgram.y:1922 awkgram.y:1940 awkgram.y:2315 awkgram.y:2407
+#: awkgram.y:2732
msgid "source file does not end in newline"
msgstr ""
-#: awkgram.y:1862
+#: awkgram.y:2809
msgid "unterminated regexp ends with `\\' at end of file"
msgstr ""
-#: awkgram.y:1886
+#: awkgram.y:2833
#, c-format
msgid "%s: %d: tawk regex modifier `/.../%c' doesn't work in gawk"
msgstr ""
-#: awkgram.y:1890
+#: awkgram.y:2837
#, c-format
msgid "tawk regex modifier `/.../%c' doesn't work in gawk"
msgstr ""
-#: awkgram.y:1897
+#: awkgram.y:2844
msgid "unterminated regexp"
msgstr ""
-#: awkgram.y:1900
+#: awkgram.y:2848
msgid "unterminated regexp at end of file"
msgstr ""
-#: awkgram.y:1969
+#: awkgram.y:2907
msgid "use of `\\ #...' line continuation is not portable"
msgstr ""
-#: awkgram.y:1982
+#: awkgram.y:2923
msgid "backslash not last character on line"
msgstr ""
-#: awkgram.y:2027
+#: awkgram.y:2984
msgid "POSIX does not allow operator `**='"
msgstr ""
-#: awkgram.y:2029
+#: awkgram.y:2986
msgid "old awk does not support operator `**='"
msgstr ""
-#: awkgram.y:2038
+#: awkgram.y:2995
msgid "POSIX does not allow operator `**'"
msgstr ""
-#: awkgram.y:2040
+#: awkgram.y:2997
msgid "old awk does not support operator `**'"
msgstr ""
-#: awkgram.y:2071
+#: awkgram.y:3032
msgid "operator `^=' is not supported in old awk"
msgstr ""
-#: awkgram.y:2079
+#: awkgram.y:3040
msgid "operator `^' is not supported in old awk"
msgstr ""
-#: awkgram.y:2163 awkgram.y:2178
+#: awkgram.y:3133 awkgram.y:3149
msgid "unterminated string"
msgstr ""
-#: awkgram.y:2368
+#: awkgram.y:3345
#, c-format
msgid "invalid char '%c' in expression"
msgstr ""
-#: awkgram.y:2416
+#: awkgram.y:3391
#, c-format
msgid "`%s' is a gawk extension"
msgstr ""
-#: awkgram.y:2419
+#: awkgram.y:3394
#, c-format
msgid "`%s' is a Bell Labs extension"
msgstr ""
-#: awkgram.y:2422
+#: awkgram.y:3397
#, c-format
msgid "POSIX does not allow `%s'"
msgstr ""
-#: awkgram.y:2426
+#: awkgram.y:3401
#, c-format
msgid "`%s' is not supported in old awk"
msgstr ""
-#: awkgram.y:2452
+#: awkgram.y:3465
msgid "`goto' considered harmful!\n"
msgstr ""
-#: awkgram.y:2514
+#: awkgram.y:3518
#, c-format
msgid "%d is invalid as number of arguments for %s"
msgstr ""
-#: awkgram.y:2533 awkgram.y:2536
+#: awkgram.y:3544 awkgram.y:3547
msgid "match: third argument is a gawk extension"
msgstr ""
-#: awkgram.y:2549
+#: awkgram.y:3575
#, c-format
msgid "%s: string literal as last arg of substitute has no effect"
msgstr ""
-#: awkgram.y:2552
+#: awkgram.y:3580
#, c-format
msgid "%s third parameter is not a changeable object"
msgstr ""
-#: awkgram.y:2586 awkgram.y:2589
+#: awkgram.y:3665 awkgram.y:3668
msgid "close: second argument is a gawk extension"
msgstr ""
-#: awkgram.y:2599
+#: awkgram.y:3680
msgid "use of dcgettext(_\"...\") is incorrect: remove leading underscore"
msgstr ""
-#: awkgram.y:2614
+#: awkgram.y:3695
msgid "use of dcngettext(_\"...\") is incorrect: remove leading underscore"
msgstr ""
-#: awkgram.y:2686
+#: awkgram.y:3787
#, c-format
msgid "function `%s': parameter #%d, `%s', duplicates parameter #%d"
msgstr ""
-#: awkgram.y:2719
+#: awkgram.y:3829
#, c-format
msgid "function `%s': parameter `%s' shadows global variable"
msgstr ""
-#: awkgram.y:2831
+#: awkgram.y:3987
#, c-format
msgid "could not open `%s' for writing (%s)"
msgstr ""
-#: awkgram.y:2832 profile.c:96
+#: awkgram.y:3988 profile.c:85
msgid "sending profile to standard error"
msgstr ""
-#: awkgram.y:2864
+#: awkgram.y:3994
#, c-format
msgid "%s: close failed (%s)"
msgstr ""
-#: awkgram.y:2985
+#: awkgram.y:4046
msgid "shadow_funcs() called twice!"
msgstr ""
-#: awkgram.y:3012
+#: awkgram.y:4052
msgid "there were shadowed variables."
msgstr ""
-#: awkgram.y:3085
+#: awkgram.y:4081
#, c-format
msgid "function `%s': can't use function name as parameter name"
msgstr ""
-#: awkgram.y:3088
+#: awkgram.y:4086
#, c-format
msgid "function `%s': can't use special variable `%s' as a function parameter"
msgstr ""
-#: awkgram.y:3098
+#: awkgram.y:4102
#, c-format
msgid "function name `%s' previously defined"
msgstr ""
-#: awkgram.y:3249 awkgram.y:3255
+#: awkgram.y:4271 awkgram.y:4277
#, c-format
msgid "function `%s' called but never defined"
msgstr ""
-#: awkgram.y:3258
+#: awkgram.y:4280
#, c-format
msgid "function `%s' defined but never called"
msgstr ""
-#: awkgram.y:3285
+#: awkgram.y:4311
#, c-format
msgid "regexp constant for parameter #%d yields boolean value"
msgstr ""
-#: awkgram.y:3329
+#: awkgram.y:4420
#, c-format
msgid ""
"function `%s' called with space between name and `(',\n"
"or used as a variable or an array"
msgstr ""
-#: awkgram.y:3750
-msgid "division by zero attempted in `/'"
+#: awkgram.y:4673 eval.c:1845
+msgid "division by zero attempted"
msgstr ""
-#: awkgram.y:3755 eval.c:1411
+#: awkgram.y:4682 eval.c:1877
#, c-format
msgid "division by zero attempted in `%%'"
msgstr ""
-#: builtin.c:122
+#: awkgram.y:5342
+msgid "statement may have no effect"
+msgstr ""
+
+#: builtin.c:120
#, c-format
msgid "%s to \"%s\" failed (%s)"
msgstr ""
-#: builtin.c:123
+#: builtin.c:121
msgid "standard output"
msgstr ""
-#: builtin.c:124
-msgid "reason unknown"
-msgstr ""
-
-#: builtin.c:137
+#: builtin.c:135
msgid "exp: received non-numeric argument"
msgstr ""
-#: builtin.c:143
+#: builtin.c:141
#, c-format
msgid "exp: argument %g is out of range"
msgstr ""
-#: builtin.c:201
+#: builtin.c:200
#, c-format
msgid "fflush: cannot flush: pipe `%s' opened for reading, not writing"
msgstr ""
-#: builtin.c:204
+#: builtin.c:203
#, c-format
msgid "fflush: cannot flush: file `%s' opened for reading, not writing"
msgstr ""
-#: builtin.c:216
+#: builtin.c:215
#, c-format
msgid "fflush: `%s' is not an open file, pipe or co-process"
msgstr ""
-#: builtin.c:310
+#: builtin.c:322
msgid "index: received non-string first argument"
msgstr ""
-#: builtin.c:312
+#: builtin.c:324
msgid "index: received non-string second argument"
msgstr ""
-#: builtin.c:434
+#: builtin.c:446
msgid "int: received non-numeric argument"
msgstr ""
-#: builtin.c:464
+#: builtin.c:469
msgid "`length(array)' is a gawk extension"
msgstr ""
-#: builtin.c:471
-msgid "length: untyped parameter argument will be forced to scalar"
-msgstr ""
-
-#: builtin.c:480
-msgid "length: untyped argument will be forced to scalar"
-msgstr ""
-
-#: builtin.c:484
+#: builtin.c:477
msgid "length: received non-string argument"
msgstr ""
-#: builtin.c:515
+#: builtin.c:508
msgid "log: received non-numeric argument"
msgstr ""
-#: builtin.c:518
+#: builtin.c:511
#, c-format
msgid "log: received negative argument %g"
msgstr ""
-#: builtin.c:726 builtin.c:729
-msgid "must use `count$' on all formats or none"
-msgstr ""
-
-#: builtin.c:790
-#, c-format
-msgid "field width is ignored for `%%%%' specifier"
-msgstr ""
-
-#: builtin.c:792
-#, c-format
-msgid "precision is ignored for `%%%%' specifier"
-msgstr ""
-
-#: builtin.c:794
-#, c-format
-msgid "field width and precision are ignored for `%%%%' specifier"
-msgstr ""
-
-#: builtin.c:845
-msgid "`$' is not permitted in awk formats"
-msgstr ""
-
-#: builtin.c:851
-msgid "arg count with `$' must be > 0"
-msgstr ""
-
-#: builtin.c:853
+#: builtin.c:531 builtin.c:573 builtin.c:586 builtin.c:982 builtin.c:994
#, c-format
-msgid "arg count %ld greater than total number of supplied arguments"
-msgstr ""
-
-#: builtin.c:855
-msgid "`$' not permitted after period in format"
+msgid "attempt to use array `%s' in scalar context"
msgstr ""
-#: builtin.c:868
-msgid "no `$' supplied for positional field width or precision"
-msgstr ""
-
-#: builtin.c:938
-msgid "`l' is meaningless in awk formats; ignored"
-msgstr ""
-
-#: builtin.c:942
-msgid "`l' is not permitted in POSIX awk formats"
-msgstr ""
-
-#: builtin.c:953
-msgid "`L' is meaningless in awk formats; ignored"
-msgstr ""
-
-#: builtin.c:957
-msgid "`L' is not permitted in POSIX awk formats"
-msgstr ""
-
-#: builtin.c:968
-msgid "`h' is meaningless in awk formats; ignored"
-msgstr ""
-
-#: builtin.c:972
-msgid "`h' is not permitted in POSIX awk formats"
-msgstr ""
-
-#: builtin.c:1252
-#, c-format
-msgid "[s]printf: value %g is out of range for `%%%c' format"
-msgstr ""
-
-#: builtin.c:1332
-#, c-format
-msgid "ignoring unknown format specifier character `%c': no argument converted"
-msgstr ""
-
-#: builtin.c:1338
-msgid "not enough arguments to satisfy format string"
-msgstr ""
-
-#: builtin.c:1340
-msgid "^ ran out for this one"
-msgstr ""
-
-#: builtin.c:1346
-msgid "[s]printf: format specifier does not have control letter"
-msgstr ""
-
-#: builtin.c:1349
-msgid "too many arguments supplied for format string"
-msgstr ""
-
-#: builtin.c:1424 builtin.c:1427
+#: builtin.c:569 builtin.c:580
msgid "printf: no arguments"
msgstr ""
-#: builtin.c:1451
+#: builtin.c:621
msgid "sqrt: received non-numeric argument"
msgstr ""
-#: builtin.c:1455
+#: builtin.c:625
#, c-format
msgid "sqrt: called with negative argument %g"
msgstr ""
-#: builtin.c:1479
+#: builtin.c:649
#, c-format
-msgid "substr: start index %g is invalid, using 1"
+msgid "substr: length %g is not >= 1"
msgstr ""
-#: builtin.c:1484
+#: builtin.c:651
#, c-format
-msgid "substr: non-integer start index %g will be truncated"
+msgid "substr: length %g is not >= 0"
msgstr ""
-#: builtin.c:1510
+#: builtin.c:658
#, c-format
-msgid "substr: length %g is not >= 1"
+msgid "substr: non-integer length %g will be truncated"
msgstr ""
-#: builtin.c:1512
+#: builtin.c:663
#, c-format
-msgid "substr: length %g is not >= 0"
+msgid "substr: length %g too big for string indexing, truncating to %g"
msgstr ""
-#: builtin.c:1519
+#: builtin.c:675
#, c-format
-msgid "substr: non-integer length %g will be truncated"
+msgid "substr: start index %g is invalid, using 1"
msgstr ""
-#: builtin.c:1524
+#: builtin.c:680
#, c-format
-msgid "substr: length %g too big for string indexing, truncating to %g"
+msgid "substr: non-integer start index %g will be truncated"
msgstr ""
-#: builtin.c:1536
+#: builtin.c:705
msgid "substr: source string is zero length"
msgstr ""
-#: builtin.c:1552
+#: builtin.c:721
#, c-format
msgid "substr: start index %g is past end of string"
msgstr ""
-#: builtin.c:1560
+#: builtin.c:729
#, c-format
msgid ""
"substr: length %g at start index %g exceeds length of first argument (%lu)"
msgstr ""
-#: builtin.c:1637
-msgid "strftime: received non-string first argument"
+#: builtin.c:806
+msgid "strftime: received non-numeric second argument"
msgstr ""
-#: builtin.c:1643
-msgid "strftime: received empty format string"
+#: builtin.c:813
+msgid "strftime: received non-string first argument"
msgstr ""
-#: builtin.c:1652
-msgid "strftime: received non-numeric second argument"
+#: builtin.c:819
+msgid "strftime: received empty format string"
msgstr ""
-#: builtin.c:1729
+#: builtin.c:885
msgid "mktime: received non-string argument"
msgstr ""
-#: builtin.c:1746
+#: builtin.c:902
msgid "mktime: at least one of the values is out of the default range"
msgstr ""
-#: builtin.c:1781
+#: builtin.c:937
msgid "'system' function not allowed in sandbox mode"
msgstr ""
-#: builtin.c:1786
+#: builtin.c:942
msgid "system: received non-string argument"
msgstr ""
-#: builtin.c:1907 eval.c:2285
+#: builtin.c:997 eval.c:1105 eval.c:1557 eval.c:1570
+#, c-format
+msgid "reference to uninitialized variable `%s'"
+msgstr ""
+
+#: builtin.c:1064
#, c-format
msgid "reference to uninitialized field `$%d'"
msgstr ""
-#: builtin.c:2012
+#: builtin.c:1098
msgid "tolower: received non-string argument"
msgstr ""
-#: builtin.c:2042
+#: builtin.c:1151
msgid "toupper: received non-string argument"
msgstr ""
-#: builtin.c:2075
+#: builtin.c:1199
msgid "atan2: received non-numeric first argument"
msgstr ""
-#: builtin.c:2077
+#: builtin.c:1201
msgid "atan2: received non-numeric second argument"
msgstr ""
-#: builtin.c:2096
+#: builtin.c:1220
msgid "sin: received non-numeric argument"
msgstr ""
-#: builtin.c:2112
+#: builtin.c:1236
msgid "cos: received non-numeric argument"
msgstr ""
-#: builtin.c:2165
+#: builtin.c:1289
msgid "srand: received non-numeric argument"
msgstr ""
-#: builtin.c:2200
+#: builtin.c:1320
msgid "match: third argument is not an array"
msgstr ""
-#: builtin.c:2750
+#: builtin.c:1827
msgid "gensub: third argument of 0 treated as 1"
msgstr ""
-#: builtin.c:2866
+#: builtin.c:1869
msgid "lshift: received non-numeric first argument"
msgstr ""
-#: builtin.c:2868
+#: builtin.c:1871
msgid "lshift: received non-numeric second argument"
msgstr ""
-#: builtin.c:2874
+#: builtin.c:1877
#, c-format
msgid "lshift(%lf, %lf): negative values will give strange results"
msgstr ""
-#: builtin.c:2876
+#: builtin.c:1879
#, c-format
msgid "lshift(%lf, %lf): fractional values will be truncated"
msgstr ""
-#: builtin.c:2878
+#: builtin.c:1881
#, c-format
msgid "lshift(%lf, %lf): too large shift value will give strange results"
msgstr ""
-#: builtin.c:2904
+#: builtin.c:1908
msgid "rshift: received non-numeric first argument"
msgstr ""
-#: builtin.c:2906
+#: builtin.c:1910
msgid "rshift: received non-numeric second argument"
msgstr ""
-#: builtin.c:2912
+#: builtin.c:1916
#, c-format
msgid "rshift(%lf, %lf): negative values will give strange results"
msgstr ""
-#: builtin.c:2914
+#: builtin.c:1918
#, c-format
msgid "rshift(%lf, %lf): fractional values will be truncated"
msgstr ""
-#: builtin.c:2916
+#: builtin.c:1920
#, c-format
msgid "rshift(%lf, %lf): too large shift value will give strange results"
msgstr ""
-#: builtin.c:2942
+#: builtin.c:1947
msgid "and: received non-numeric first argument"
msgstr ""
-#: builtin.c:2944
+#: builtin.c:1949
msgid "and: received non-numeric second argument"
msgstr ""
-#: builtin.c:2950
+#: builtin.c:1955
#, c-format
msgid "and(%lf, %lf): negative values will give strange results"
msgstr ""
-#: builtin.c:2952
+#: builtin.c:1957
#, c-format
msgid "and(%lf, %lf): fractional values will be truncated"
msgstr ""
-#: builtin.c:2978
+#: builtin.c:1984
msgid "or: received non-numeric first argument"
msgstr ""
-#: builtin.c:2980
+#: builtin.c:1986
msgid "or: received non-numeric second argument"
msgstr ""
-#: builtin.c:2986
+#: builtin.c:1992
#, c-format
msgid "or(%lf, %lf): negative values will give strange results"
msgstr ""
-#: builtin.c:2988
+#: builtin.c:1994
#, c-format
msgid "or(%lf, %lf): fractional values will be truncated"
msgstr ""
-#: builtin.c:3014
+#: builtin.c:2023
msgid "xor: received non-numeric first argument"
msgstr ""
-#: builtin.c:3016
+#: builtin.c:2025
msgid "xor: received non-numeric second argument"
msgstr ""
-#: builtin.c:3022
+#: builtin.c:2031
#, c-format
msgid "xor(%lf, %lf): negative values will give strange results"
msgstr ""
-#: builtin.c:3024
+#: builtin.c:2033
#, c-format
msgid "xor(%lf, %lf): fractional values will be truncated"
msgstr ""
-#: builtin.c:3048
+#: builtin.c:2057 builtin.c:2063
msgid "compl: received non-numeric argument"
msgstr ""
-#: builtin.c:3054
+#: builtin.c:2065
#, c-format
msgid "compl(%lf): negative value will give strange results"
msgstr ""
-#: builtin.c:3056
+#: builtin.c:2067
#, c-format
msgid "compl(%lf): fractional value will be truncated"
msgstr ""
-#: builtin.c:3229
+#: builtin.c:2237
#, c-format
msgid "dcgettext: `%s' is not a valid locale category"
msgstr ""
-#: eval.c:374
+#: eval.c:412
#, c-format
msgid "unknown nodetype %d"
msgstr ""
-#: eval.c:423
-msgid "buffer overflow in genflags2str"
-msgstr ""
-
-#: eval.c:455 eval.c:461 profile.c:787
+#: eval.c:423 eval.c:437
#, c-format
-msgid "attempt to use array `%s' in a scalar context"
+msgid "unknown opcode %d"
msgstr ""
-#: eval.c:803
+#: eval.c:434
#, c-format
-msgid "for loop: array `%s' changed size from %ld to %ld during loop execution"
+msgid "opcode %s not an operator or keyword"
msgstr ""
-#: eval.c:824
-msgid "`break' outside a loop is not portable"
-msgstr ""
-
-#: eval.c:828
-msgid "`break' outside a loop is not allowed"
-msgstr ""
-
-#: eval.c:845
-msgid "`continue' outside a loop is not portable"
-msgstr ""
-
-#: eval.c:849
-msgid "`continue' outside a loop is not allowed"
-msgstr ""
-
-#: eval.c:883
-msgid "`next' cannot be called from a BEGIN rule"
-msgstr ""
-
-#: eval.c:885
-msgid "`next' cannot be called from an END rule"
+#: eval.c:487
+msgid "buffer overflow in genflags2str"
msgstr ""
-#: eval.c:887
-msgid "`next' cannot be called from a BEGINFILE rule"
+#: eval.c:613
+#, c-format
+msgid ""
+"\n"
+"\t# Function Call Stack:\n"
+"\n"
msgstr ""
-#: eval.c:889
-msgid "`next' cannot be called from an ENDFILE rule"
+#: eval.c:640
+msgid "`IGNORECASE' is a gawk extension"
msgstr ""
-#: eval.c:898
-msgid "`nextfile' cannot be called from a BEGIN rule"
+#: eval.c:669
+msgid "`BINMODE' is a gawk extension"
msgstr ""
-#: eval.c:900
-msgid "`nextfile' cannot be called from an END rule"
+#: eval.c:727
+#, c-format
+msgid "BINMODE value `%s' is invalid, treated as 3"
msgstr ""
-#: eval.c:906
-msgid "`nextfile' cannot be called from an ENDFILE rule"
+#: eval.c:817
+#, c-format
+msgid "bad `%sFMT' specification `%s'"
msgstr ""
-#: eval.c:963
-msgid "statement has no effect"
+#: eval.c:895
+msgid "turning off `--lint' due to assignment to `LINT'"
msgstr ""
-#: eval.c:1040 eval.c:2133
+#: eval.c:1067 eval.c:1544
#, c-format
msgid "can't use function name `%s' as variable or array"
msgstr ""
-#: eval.c:1047 eval.c:1053
-#, c-format
-msgid "reference to uninitialized argument `%s'"
+#: eval.c:1095
+msgid "assignment is not allowed to result of builtin function"
msgstr ""
-#: eval.c:1062 eval.c:2142
+#: eval.c:1104 eval.c:1556 eval.c:1569
#, c-format
-msgid "reference to uninitialized variable `%s'"
-msgstr ""
-
-#: eval.c:1210
-msgid ""
-"concatenation: side effects in one expression have changed the length of "
-"another!"
+msgid "reference to uninitialized argument `%s'"
msgstr ""
-#: eval.c:1315
-msgid "assignment used in conditional context"
+#: eval.c:1123
+msgid "attempt to field reference from non-numeric value"
msgstr ""
-#: eval.c:1396
-msgid "division by zero attempted"
+#: eval.c:1125
+msgid "attempt to field reference from null string"
msgstr ""
-#: eval.c:1426 profile.c:663
+#: eval.c:1131
#, c-format
-msgid "illegal type (%s) in tree_eval"
+msgid "attempt to access field %ld"
msgstr ""
-#: eval.c:1589
-msgid "division by zero attempted in `/='"
-msgstr ""
-
-#: eval.c:1611
+#: eval.c:1140
#, c-format
-msgid "division by zero attempted in `%%='"
+msgid "reference to uninitialized field `$%ld'"
msgstr ""
-#: eval.c:1891
+#: eval.c:1202
#, c-format
msgid "function `%s' called with more arguments than declared"
msgstr ""
-#: eval.c:1948
-#, c-format
-msgid "function `%s' not defined"
-msgstr ""
-
-#: eval.c:1950
-#, c-format
-msgid "identifier `%s' is not a function"
-msgstr ""
-
-#: eval.c:1997
+#: eval.c:1358
#, c-format
-msgid ""
-"function parameter `%s' is not a scalar and cannot be used for indirect "
-"function call"
+msgid "unwind_stack: unexpected type `%s'"
msgstr ""
-#: eval.c:2014
+#: eval.c:1636
#, c-format
-msgid "indirect call of real function `%s' is silly"
+msgid "attempt to use scalar `%s' as an array"
msgstr ""
-#: eval.c:2034
-#, c-format
-msgid "function `%s' called indirectly through `%s' does not exist"
+#: eval.c:1680
+msgid "assignment used in conditional context"
msgstr ""
-#: eval.c:2039
-#, c-format
-msgid "identifier `%s' cannot be used for indirect function call"
+#: eval.c:1684
+msgid "statement has no effect"
msgstr ""
-#: eval.c:2105
-#, c-format
-msgid ""
-"\n"
-"\t# Function Call Stack:\n"
-"\n"
+#: eval.c:2028
+msgid "division by zero attempted in `/='"
msgstr ""
-#: eval.c:2108
+#: eval.c:2053
#, c-format
-msgid "\t# -- main --\n"
+msgid "division by zero attempted in `%%='"
msgstr ""
-#: eval.c:2269
-msgid "attempt to field reference from non-numeric value"
+#: eval.c:2139
+msgid "`continue' outside a loop is not allowed"
msgstr ""
-#: eval.c:2271
-msgid "attempt to reference from null string"
+#: eval.c:2145
+msgid "`break' outside a loop is not allowed"
msgstr ""
-#: eval.c:2277
+#: eval.c:2229
#, c-format
-msgid "attempt to access field %d"
-msgstr ""
-
-#: eval.c:2298 eval.c:2305 profile.c:843
-msgid "assignment is not allowed to result of builtin function"
+msgid "for loop: array `%s' changed size from %ld to %ld during loop execution"
msgstr ""
-#: eval.c:2369
-msgid "`IGNORECASE' is a gawk extension"
+#: eval.c:2342
+#, c-format
+msgid "function called indirectly through `%s' does not exist"
msgstr ""
-#: eval.c:2398
-msgid "`BINMODE' is a gawk extension"
+#: eval.c:2354
+#, c-format
+msgid "function `%s' not defined"
msgstr ""
-#: eval.c:2456
+#: eval.c:2481
#, c-format
-msgid "BINMODE value `%s' is invalid, treated as 3"
+msgid "`nextfile' cannot be called from a `%s' rule"
msgstr ""
-#: eval.c:2546
+#: eval.c:2540
#, c-format
-msgid "bad `%sFMT' specification `%s'"
+msgid "`next' cannot be called from a `%s' rule"
msgstr ""
-#: eval.c:2624
-msgid "turning off `--lint' due to assignment to `LINT'"
+#: eval.c:2602
+#, c-format
+msgid "Sorry, don't know how to interpret `%s'"
msgstr ""
-#: ext.c:61
-msgid "extensions not allowed in sandbox mode"
+#: ext.c:62
+msgid "extensions are not allowed in sandbox mode"
msgstr ""
-#: ext.c:65 ext.c:70
+#: ext.c:68 ext.c:73
msgid "`extension' is a gawk extension"
msgstr ""
-#: ext.c:80
+#: ext.c:83
#, c-format
-msgid "extension: cannot open `%s' (%s)\n"
+msgid "fatal: extension: cannot open `%s' (%s)\n"
msgstr ""
-#: ext.c:88
+#: ext.c:93
#, c-format
-msgid "extension: library `%s': cannot call function `%s' (%s)\n"
+msgid "fatal: extension: library `%s': cannot call function `%s' (%s)\n"
msgstr ""
-#: ext.c:108
+#: ext.c:123
msgid "extension: missing function name"
msgstr ""
-#: ext.c:113
+#: ext.c:128
#, c-format
msgid "extension: illegal character `%c' in function name `%s'"
msgstr ""
-#: ext.c:119
+#: ext.c:137
#, c-format
msgid "extension: can't redefine function `%s'"
msgstr ""
-#: ext.c:123
+#: ext.c:141
#, c-format
msgid "extension: function `%s' already defined"
msgstr ""
-#: ext.c:128
+#: ext.c:146
+#, c-format
+msgid "extension: function name `%s' previously defined"
+msgstr ""
+
+#: ext.c:148
#, c-format
msgid "extension: can't use gawk built-in `%s' as function name"
msgstr ""
-#: ext.c:130
+#: ext.c:152
#, c-format
-msgid "extension: function name `%s' previously defined"
+msgid "make_builtin: negative argument count for function `%s'"
msgstr ""
-#: ext.c:207
+#: ext.c:255
#, c-format
msgid "function `%s' defined to take no more than %d argument(s)"
msgstr ""
-#: ext.c:210
+#: ext.c:258
#, c-format
msgid "function `%s': missing argument #%d"
msgstr ""
-#: ext.c:220
+#: ext.c:268
#, c-format
msgid "function `%s': argument #%d: attempt to use scalar as an array"
msgstr ""
-#: ext.c:224
+#: ext.c:272
#, c-format
msgid "function `%s': argument #%d: attempt to use array as a scalar"
msgstr ""
-#: ext.c:249
+#: ext.c:285
msgid "Operation Not Supported"
msgstr ""
@@ -1106,52 +1041,52 @@ msgstr ""
msgid "NF set to negative value"
msgstr ""
-#: field.c:913
-msgid "split: second argument is not an array"
-msgstr ""
-
-#: field.c:922 field.c:932 field.c:937
+#: field.c:939 field.c:946 field.c:950
msgid "split: fourth argument is a gawk extension"
msgstr ""
-#: field.c:928
+#: field.c:943
msgid "split: fourth argument is not an array"
msgstr ""
-#: field.c:975
-msgid "split: null string for third argument is a gawk extension"
+#: field.c:957
+msgid "split: second argument is not an array"
msgstr ""
-#: field.c:1032
-msgid "patsplit: second argument is not an array"
+#: field.c:987
+msgid "split: null string for third arg is a gawk extension"
msgstr ""
-#: field.c:1041
+#: field.c:1028
msgid "patsplit: fourth argument is not an array"
msgstr ""
-#: field.c:1067
+#: field.c:1033
+msgid "patsplit: second argument is not an array"
+msgstr ""
+
+#: field.c:1051
msgid "patsplit: third argument must be non-null"
msgstr ""
-#: field.c:1111
+#: field.c:1084
msgid "`FIELDWIDTHS' is a gawk extension"
msgstr ""
-#: field.c:1141 field.c:1155
+#: field.c:1147
#, c-format
msgid "invalid FIELDWIDTHS value, near `%s'"
msgstr ""
-#: field.c:1238
+#: field.c:1220
msgid "null string for `FS' is a gawk extension"
msgstr ""
-#: field.c:1242
+#: field.c:1224
msgid "old awk does not support regexps as value of `FS'"
msgstr ""
-#: field.c:1357
+#: field.c:1343
msgid "`FPAT' is a gawk extension"
msgstr ""
@@ -1210,474 +1145,469 @@ msgstr ""
msgid "%s: option '-W %s' requires an argument\n"
msgstr ""
-#: io.c:379
+#: io.c:272
#, c-format
msgid "command line argument `%s' is a directory: skipped"
msgstr ""
-#: io.c:413
+#: io.c:275 io.c:372
#, c-format
msgid "cannot open file `%s' for reading (%s)"
msgstr ""
-#: io.c:459 io.c:2999
+#: io.c:419
#, c-format
msgid "error reading input file `%s': %s"
msgstr ""
-#: io.c:506
+#: io.c:470
#, c-format
msgid "close of fd %d (`%s') failed (%s)"
msgstr ""
-#: io.c:617
-msgid "redirection not allowed in sandbox mode"
-msgstr ""
-
-#: io.c:648
-#, c-format
-msgid "invalid tree type %s in redirect()"
-msgstr ""
-
-#: io.c:654
+#: io.c:577
#, c-format
msgid "expression in `%s' redirection only has numeric value"
msgstr ""
-#: io.c:660
+#: io.c:583
#, c-format
msgid "expression for `%s' redirection has null string value"
msgstr ""
-#: io.c:665
+#: io.c:589
#, c-format
msgid "filename `%s' for `%s' redirection may be result of logical expression"
msgstr ""
-#: io.c:707
+#: io.c:628
#, c-format
msgid "unnecessary mixing of `>' and `>>' for file `%.*s'"
msgstr ""
-#: io.c:754
+#: io.c:681
#, c-format
msgid "can't open pipe `%s' for output (%s)"
msgstr ""
-#: io.c:763
+#: io.c:691
#, c-format
msgid "can't open pipe `%s' for input (%s)"
msgstr ""
-#: io.c:786
+#: io.c:712
#, c-format
msgid "can't open two way pipe `%s' for input/output (%s)"
msgstr ""
-#: io.c:864
+#: io.c:794
#, c-format
msgid "can't redirect from `%s' (%s)"
msgstr ""
-#: io.c:867
+#: io.c:797
#, c-format
msgid "can't redirect to `%s' (%s)"
msgstr ""
-#: io.c:920
+#: io.c:846
msgid ""
"reached system limit for open files: starting to multiplex file descriptors"
msgstr ""
-#: io.c:936
+#: io.c:862
#, c-format
msgid "close of `%s' failed (%s)."
msgstr ""
-#: io.c:944
+#: io.c:870
msgid "too many pipes or input files open"
msgstr ""
-#: io.c:967
+#: io.c:892
msgid "close: second argument must be `to' or `from'"
msgstr ""
-#: io.c:981
+#: io.c:909
#, c-format
msgid "close: `%.*s' is not an open file, pipe or co-process"
msgstr ""
-#: io.c:986
+#: io.c:914
msgid "close of redirection that was never opened"
msgstr ""
-#: io.c:1083
+#: io.c:1011
#, c-format
msgid "close: redirection `%s' not opened with `|&', second argument ignored"
msgstr ""
-#: io.c:1099
+#: io.c:1027
#, c-format
msgid "failure status (%d) on pipe close of `%s' (%s)"
msgstr ""
-#: io.c:1102
+#: io.c:1030
#, c-format
msgid "failure status (%d) on file close of `%s' (%s)"
msgstr ""
-#: io.c:1122
+#: io.c:1050
#, c-format
msgid "no explicit close of socket `%s' provided"
msgstr ""
-#: io.c:1125
+#: io.c:1053
#, c-format
msgid "no explicit close of co-process `%s' provided"
msgstr ""
-#: io.c:1128
+#: io.c:1056
#, c-format
msgid "no explicit close of pipe `%s' provided"
msgstr ""
-#: io.c:1131
+#: io.c:1059
#, c-format
msgid "no explicit close of file `%s' provided"
msgstr ""
-#: io.c:1159 io.c:1214 main.c:832 main.c:874
+#: io.c:1087 io.c:1142 main.c:823 main.c:865
#, c-format
msgid "error writing standard output (%s)"
msgstr ""
-#: io.c:1163 io.c:1219
+#: io.c:1091 io.c:1147
#, c-format
msgid "error writing standard error (%s)"
msgstr ""
-#: io.c:1171
+#: io.c:1099
#, c-format
msgid "pipe flush of `%s' failed (%s)."
msgstr ""
-#: io.c:1174
+#: io.c:1102
#, c-format
msgid "co-process flush of pipe to `%s' failed (%s)."
msgstr ""
-#: io.c:1177
+#: io.c:1105
#, c-format
msgid "file flush of `%s' failed (%s)."
msgstr ""
-#: io.c:1292
+#: io.c:1219
#, c-format
msgid "local port %s invalid in `/inet'"
msgstr ""
-#: io.c:1309
+#: io.c:1236
#, c-format
msgid "remote host and port information (%s, %s) invalid"
msgstr ""
-#: io.c:1344
+#: io.c:1276
msgid "/inet/raw client not ready yet, sorry"
msgstr ""
-#: io.c:1347 io.c:1383
+#: io.c:1279 io.c:1320
msgid "only root may use `/inet/raw'."
msgstr ""
-#: io.c:1381
+#: io.c:1318
msgid "/inet/raw server not ready yet, sorry"
msgstr ""
-#: io.c:1477
+#: io.c:1417
#, c-format
msgid "no (known) protocol supplied in special filename `%s'"
msgstr ""
-#: io.c:1491
+#: io.c:1431
#, c-format
msgid "special file name `%s' is incomplete"
msgstr ""
-#: io.c:1506
+#: io.c:1447
msgid "must supply a remote hostname to `/inet'"
msgstr ""
-#: io.c:1524
+#: io.c:1465
msgid "must supply a remote port to `/inet'"
msgstr ""
-#: io.c:1570
+#: io.c:1511
msgid "TCP/IP communications are not supported"
msgstr ""
-#: io.c:1758
+#: io.c:1698
#, c-format
msgid "could not open `%s', mode `%s'"
msgstr ""
-#: io.c:1809
+#: io.c:1749
#, c-format
msgid "close of master pty failed (%s)"
msgstr ""
-#: io.c:1811 io.c:1963 io.c:2114
+#: io.c:1751 io.c:1918 io.c:2075
#, c-format
msgid "close of stdout in child failed (%s)"
msgstr ""
-#: io.c:1814
+#: io.c:1754
#, c-format
msgid "moving slave pty to stdout in child failed (dup: %s)"
msgstr ""
-#: io.c:1816 io.c:1968
+#: io.c:1756 io.c:1923
#, c-format
msgid "close of stdin in child failed (%s)"
msgstr ""
-#: io.c:1819
+#: io.c:1759
#, c-format
msgid "moving slave pty to stdin in child failed (dup: %s)"
msgstr ""
-#: io.c:1821 io.c:1840
+#: io.c:1761 io.c:1782
#, c-format
msgid "close of slave pty failed (%s)"
msgstr ""
-#: io.c:1914 io.c:1966 io.c:2095 io.c:2117
+#: io.c:1860 io.c:1921 io.c:2053 io.c:2078
#, c-format
msgid "moving pipe to stdout in child failed (dup: %s)"
msgstr ""
-#: io.c:1918 io.c:1971
+#: io.c:1867 io.c:1926
#, c-format
msgid "moving pipe to stdin in child failed (dup: %s)"
msgstr ""
-#: io.c:1935 io.c:2108
+#: io.c:1887 io.c:2068
msgid "restoring stdout in parent process failed\n"
msgstr ""
-#: io.c:1940
+#: io.c:1895
msgid "restoring stdin in parent process failed\n"
msgstr ""
-#: io.c:1974 io.c:2119 io.c:2130
+#: io.c:1929 io.c:2080 io.c:2094
#, c-format
msgid "close of pipe failed (%s)"
msgstr ""
-#: io.c:2019
+#: io.c:1974
msgid "`|&' not supported"
msgstr ""
-#: io.c:2085
+#: io.c:2040
#, c-format
msgid "cannot open pipe `%s' (%s)"
msgstr ""
-#: io.c:2126
+#: io.c:2088
#, c-format
msgid "cannot create child process for `%s' (fork: %s)"
msgstr ""
-#: io.c:2518
+#: io.c:2577
#, c-format
msgid "data file `%s' is empty"
msgstr ""
-#: io.c:2560 io.c:2568
+#: io.c:2618 io.c:2626
msgid "could not allocate more input memory"
msgstr ""
-#: io.c:3125
+#: io.c:3173
msgid "multicharacter value of `RS' is a gawk extension"
msgstr ""
-#: main.c:313
+#: main.c:311
msgid "out of memory"
msgstr ""
-#: main.c:381
+#: main.c:388
msgid "`-m[fr]' option irrelevant in gawk"
msgstr ""
-#: main.c:383
+#: main.c:390
msgid "-m option usage: `-m[fr] nnn'"
msgstr ""
-#: main.c:419
+#: main.c:426
msgid "empty argument to `-e/--source' ignored"
msgstr ""
-#: main.c:485
+#: main.c:492
#, c-format
msgid "%s: option `-W %s' unrecognized, ignored\n"
msgstr ""
-#: main.c:530
+#: main.c:545
#, c-format
msgid "%s: option requires an argument -- %c\n"
msgstr ""
-#: main.c:551
+#: main.c:566
msgid "environment variable `POSIXLY_CORRECT' set: turning on `--posix'"
msgstr ""
-#: main.c:557
+#: main.c:572
msgid "`--posix' overrides `--traditional'"
msgstr ""
-#: main.c:568
+#: main.c:583
msgid "`--posix'/`--traditional' overrides `--non-decimal-data'"
msgstr ""
-#: main.c:572
+#: main.c:587
#, c-format
msgid "running %s setuid root may be a security problem"
msgstr ""
-#: main.c:577
+#: main.c:592
msgid "`--posix' overrides `--binary'"
msgstr ""
-#: main.c:622
+#: main.c:643
#, c-format
msgid "can't set binary mode on stdin (%s)"
msgstr ""
-#: main.c:625
+#: main.c:646
#, c-format
msgid "can't set binary mode on stdout (%s)"
msgstr ""
-#: main.c:627
+#: main.c:648
#, c-format
msgid "can't set binary mode on stderr (%s)"
msgstr ""
-#: main.c:668
+#: main.c:687
msgid "no program text at all!"
msgstr ""
-#: main.c:773
+#: main.c:762
#, c-format
msgid "Usage: %s [POSIX or GNU style options] -f progfile [--] file ...\n"
msgstr ""
-#: main.c:775
+#: main.c:764
#, c-format
msgid "Usage: %s [POSIX or GNU style options] [--] %cprogram%c file ...\n"
msgstr ""
-#: main.c:780
+#: main.c:769
msgid "POSIX options:\t\tGNU long options: (standard)\n"
msgstr ""
-#: main.c:781
+#: main.c:770
msgid "\t-f progfile\t\t--file=progfile\n"
msgstr ""
-#: main.c:782
+#: main.c:771
msgid "\t-F fs\t\t\t--field-separator=fs\n"
msgstr ""
-#: main.c:783
+#: main.c:772
msgid "\t-v var=val\t\t--assign=var=val\n"
msgstr ""
-#: main.c:784
-msgid "POSIX options:\t\tGNU long options: (extensions)\n"
+#: main.c:773
+msgid "Short options:\t\tGNU long options: (extensions)\n"
msgstr ""
-#: main.c:785
+#: main.c:774
msgid "\t-m[fr] val\n"
msgstr ""
-#: main.c:786
+#: main.c:775
msgid "\t-b\t\t\t--characters-as-bytes\n"
msgstr ""
-#: main.c:787
-msgid "\t-c\t\t\t--compat, --traditional\n"
+#: main.c:776
+msgid "\t-c\t\t\t--traditional\n"
msgstr ""
-#: main.c:788
-msgid "\t-C\t\t\t--copyleft, --copyright\n"
+#: main.c:777
+msgid "\t-C\t\t\t--copyright\n"
msgstr ""
-#: main.c:789
+#: main.c:778
msgid "\t-d [file]\t\t--dump-variables[=file]\n"
msgstr ""
-#: main.c:790
+#: main.c:779
msgid "\t-e 'program-text'\t--source='program-text'\n"
msgstr ""
-#: main.c:791
+#: main.c:780
msgid "\t-E file\t\t\t--exec=file\n"
msgstr ""
-#: main.c:792
+#: main.c:781
msgid "\t-g\t\t\t--gen-pot\n"
msgstr ""
-#: main.c:793
-msgid "\t-h\t\t\t--help, --usage\n"
-msgstr ""
-
-#: main.c:794
-msgid "\t-l [fatal]\t\t--lint[=fatal]\n"
+#: main.c:782
+msgid "\t-h\t\t\t--help\n"
msgstr ""
-#: main.c:795
-msgid "\t-L\t\t\t--lint-old\n"
+#: main.c:783
+msgid "\t-L [fatal]\t\t--lint[=fatal]\n"
msgstr ""
-#: main.c:796
+#: main.c:784
msgid "\t-n\t\t\t--non-decimal-data\n"
msgstr ""
-#: main.c:797
+#: main.c:785
msgid "\t-N\t\t\t--use-lc-numeric\n"
msgstr ""
-#: main.c:798
+#: main.c:786
msgid "\t-O\t\t\t--optimize\n"
msgstr ""
-#: main.c:799
+#: main.c:787
msgid "\t-p [file]\t\t--profile[=file]\n"
msgstr ""
-#: main.c:800
+#: main.c:788
msgid "\t-P\t\t\t--posix\n"
msgstr ""
-#: main.c:801
+#: main.c:789
msgid "\t-r\t\t\t--re-interval\n"
msgstr ""
-#: main.c:802
+#: main.c:791
+msgid "\t-R file\t\t\t--command=file\n"
+msgstr ""
+
+#: main.c:792
msgid "\t-S\t\t\t--sandbox\n"
msgstr ""
-#: main.c:803
+#: main.c:793
+msgid "\t-t\t\t\t--lint-old\n"
+msgstr ""
+
+#: main.c:794
msgid "\t-V\t\t\t--version\n"
msgstr ""
-#: main.c:805
+#: main.c:796
msgid "\t-W nostalgia\t\t--nostalgia\n"
msgstr ""
-#: main.c:808
-msgid "\t-W parsedebug\t\t--parsedebug\n"
+#: main.c:799
+msgid "\t-Y\t\t--parsedebug\n"
msgstr ""
#. TRANSLATORS: --help output 5 (end)
@@ -1685,7 +1615,7 @@ msgstr ""
#. for this application. Please add _another line_ with the
#. address for translation bugs.
#. no-wrap
-#: main.c:817
+#: main.c:808
msgid ""
"\n"
"To report bugs, see node `Bugs' in `gawk.info', which is\n"
@@ -1693,21 +1623,21 @@ msgid ""
"\n"
msgstr ""
-#: main.c:821
+#: main.c:812
msgid ""
"gawk is a pattern scanning and processing language.\n"
"By default it reads standard input and writes standard output.\n"
"\n"
msgstr ""
-#: main.c:825
+#: main.c:816
msgid ""
"Examples:\n"
"\tgawk '{ sum += $1 }; END { print sum }' file\n"
"\tgawk -F: '{ print $1 }' /etc/passwd\n"
msgstr ""
-#: main.c:845
+#: main.c:836
#, c-format
msgid ""
"Copyright (C) 1989, 1991-%d Free Software Foundation.\n"
@@ -1719,7 +1649,7 @@ msgid ""
"\n"
msgstr ""
-#: main.c:853
+#: main.c:844
msgid ""
"This program is distributed in the hope that it will be useful,\n"
"but WITHOUT ANY WARRANTY; without even the implied warranty of\n"
@@ -1728,201 +1658,168 @@ msgid ""
"\n"
msgstr ""
-#: main.c:864
+#: main.c:855
msgid ""
"You should have received a copy of the GNU General Public License\n"
"along with this program. If not, see http://www.gnu.org/licenses/.\n"
msgstr ""
-#: main.c:899
+#: main.c:890
msgid "-Ft does not set FS to tab in POSIX awk"
msgstr ""
-#: main.c:1116
+#: main.c:1122
#, c-format
msgid "unknown value for field spec: %d\n"
msgstr ""
-#: main.c:1176
+#: main.c:1182
#, c-format
msgid ""
"%s: `%s' argument to `-v' not in `var=value' form\n"
"\n"
msgstr ""
-#: main.c:1196
+#: main.c:1202
#, c-format
msgid "`%s' is not a legal variable name"
msgstr ""
-#: main.c:1199
+#: main.c:1205
#, c-format
msgid "`%s' is not a variable name, looking for file `%s=%s'"
msgstr ""
-#: main.c:1238
+#: main.c:1258
msgid "floating point exception"
msgstr ""
-#: main.c:1245
+#: main.c:1265
msgid "fatal error: internal error"
msgstr ""
-#: main.c:1260
+#: main.c:1280
msgid "fatal error: internal error: segfault"
msgstr ""
-#: main.c:1272
+#: main.c:1292
msgid "fatal error: internal error: stack overflow"
msgstr ""
-#: main.c:1322
+#: main.c:1342
#, c-format
msgid "no pre-opened fd %d"
msgstr ""
-#: main.c:1329
+#: main.c:1349
#, c-format
msgid "could not pre-open /dev/null for fd %d"
msgstr ""
-#: main.c:1352 main.c:1361
+#: main.c:1372 main.c:1381
#, c-format
msgid "could not find groups: %s"
msgstr ""
-#: msg.c:54
+#: msg.c:62
#, c-format
msgid "cmd. line:"
msgstr ""
-#: msg.c:120
+#: msg.c:97
msgid "warning: "
msgstr ""
-#: msg.c:142
+#: msg.c:106
msgid "error: "
msgstr ""
-#: msg.c:178
+#: msg.c:129
msgid "fatal: "
msgstr ""
-#: node.c:63 node.c:78 node.c:105 node.c:121 node.c:151
-msgid "can't convert string to float"
-msgstr ""
-
-#: node.c:465
+#: node.c:401
msgid "backslash at end of string"
msgstr ""
-#: node.c:609
+#: node.c:502
#, c-format
msgid "old awk does not support the `\\%c' escape sequence"
msgstr ""
-#: node.c:660
+#: node.c:553
msgid "POSIX does not allow `\\x' escapes"
msgstr ""
-#: node.c:666
+#: node.c:559
msgid "no hex digits in `\\x' escape sequence"
msgstr ""
-#: node.c:688
+#: node.c:581
#, c-format
msgid ""
"hex escape \\x%.*s of %d characters probably not interpreted the way you "
"expect"
msgstr ""
-#: node.c:703
+#: node.c:596
#, c-format
msgid "escape sequence `\\%c' treated as plain `%c'"
msgstr ""
+#: node.c:737
+msgid ""
+"Invalid multibyte data detected. There may be a mismatch between your data "
+"and your locale."
+msgstr ""
+
#: posix/gawkmisc.c:172
#, c-format
msgid "%s %s `%s': could not set close-on-exec: (fcntl: %s)"
msgstr ""
-#: profile.c:94
+#: profile.c:83
#, c-format
msgid "could not open `%s' for writing: %s"
msgstr ""
-#: profile.c:457
-#, c-format
-msgid "internal error: %s with null vname"
-msgstr ""
-
-#: profile.c:522
-msgid "# treated internally as `delete'"
-msgstr ""
-
-#: profile.c:1076
-#, c-format
-msgid "# this is a dynamically loaded extension function"
-msgstr ""
-
-#: profile.c:1109
-#, c-format
-msgid "\t# gawk profile, created %s\n"
-msgstr ""
-
-#: profile.c:1112
-#, c-format
-msgid ""
-"\t# BEGIN block(s)\n"
-"\n"
-msgstr ""
-
-#: profile.c:1122
+#: profile.c:203
#, c-format
msgid ""
-"\t# BEGINFILE block(s)\n"
+"\t# %s block(s)\n"
"\n"
msgstr ""
-#: profile.c:1132
+#: profile.c:208
#, c-format
msgid ""
-"\t# Rule(s)\n"
+"\t# %s(s)\n"
"\n"
msgstr ""
-#: profile.c:1138
+#: profile.c:278
#, c-format
-msgid ""
-"\t# ENDFILE block(s)\n"
-"\n"
+msgid "internal error: %s with null vname"
msgstr ""
-#: profile.c:1148
+#: profile.c:945
#, c-format
-msgid ""
-"\t# END block(s)\n"
-"\n"
+msgid "\t# gawk profile, created %s\n"
msgstr ""
-#: profile.c:1168
+#: profile.c:1328
#, c-format
msgid ""
"\n"
"\t# Functions, listed alphabetically\n"
msgstr ""
-#: profile.c:1431
-#, c-format
-msgid "unexpected type %s in prec_level"
-msgstr ""
-
-#: profile.c:1557
+#: profile.c:1367
#, c-format
-msgid "Unknown node type %s in pp_var"
+msgid "redir2str: unknown redirection type %d"
msgstr ""
-#: re.c:537
+#: re.c:559
#, c-format
msgid "regexp component `%.*s' should probably be `[%.*s]'"
msgstr ""
@@ -1995,6 +1892,6 @@ msgstr ""
msgid "Unmatched ) or \\)"
msgstr ""
-#: regcomp.c:699
+#: regcomp.c:701
msgid "No previous regular expression"
msgstr ""
diff --git a/po/he.gmo b/po/he.gmo
index 67fe15ba..4accf6ef 100644
--- a/po/he.gmo
+++ b/po/he.gmo
Binary files differ
diff --git a/po/he.po b/po/he.po
index 5b909aaf..db67cab6 100644
--- a/po/he.po
+++ b/po/he.po
@@ -6,7 +6,7 @@ msgid ""
msgstr ""
"Project-Id-Version: gawk 3.1.1a\n"
"Report-Msgid-Bugs-To: arnold@skeeve.com\n"
-"POT-Creation-Date: 2010-11-12 12:20+0200\n"
+"POT-Creation-Date: 2010-11-17 08:48+0200\n"
"PO-Revision-Date: 2002-04-28 21:46+0300\n"
"Last-Translator: Eli Zaretskii <eliz@gnu.org>\n"
"Language-Team: Hebrew <eliz@gnu.org>\n"
@@ -14,407 +14,483 @@ msgstr ""
"Content-Type: text/plain; charset=ISO-8859-8\n"
"Content-Transfer-Encoding: 8-bit\n"
-#: array.c:112
+# This is not translated because it cannot be reworded in Hebrew
+# without looking awkward.
+#: array.c:103
+#, fuzzy, c-format
+msgid "from %s"
+msgstr "%s (from %s)"
+
+#: array.c:267
+#, fuzzy
+msgid "attempt to use a scalar value as array"
+msgstr "êøòîë `%s' øàì÷ñá éåâù ùåîéù"
+
+#: array.c:270
#, fuzzy, c-format
msgid "attempt to use function `%s' as an array"
msgstr "êøòîë `%s' äéö÷ðåôá ùåîéù ïåéñð"
-#: array.c:115
+#: array.c:273
#, c-format
msgid "attempt to use scalar parameter `%s' as an array"
msgstr "êøòî äéä åìéàë `%s' éøì÷ñ øèîøôá ùåîéù ïåéñð"
-#: array.c:118
+#: array.c:276
#, c-format
msgid "attempt to use scalar `%s' as array"
msgstr "êøòîë `%s' øàì÷ñá éåâù ùåîéù"
-# This is not translated because it cannot be reworded in Hebrew
-# without looking awkward.
-#: array.c:156
-#, fuzzy, c-format
-msgid "from %s"
-msgstr "%s (from %s)"
+#: array.c:321 array.c:648 eval.c:1075 eval.c:1079 eval.c:1581 eval.c:1649
+#: eval.c:1928
+#, c-format
+msgid "attempt to use array `%s' in a scalar context"
+msgstr "øàì÷ñ ùøåãä èñ÷èðå÷á `%s' êøòîá ùåîéù ïåéñð"
-#: array.c:513
+#: array.c:570
#, fuzzy, c-format
msgid "reference to uninitialized element `%s[\"%.*s\"]'"
msgstr "ìçåúî åðéàù `%s[\"%s\"]' èðîìàì äééðô"
-#: array.c:519
+#: array.c:576
#, c-format
msgid "subscript of array `%s' is null string"
msgstr "`%s' êøòî ïééöîë ä÷éø úæåøçîá ùåîéù"
-#: array.c:623
+#: array.c:684
#, c-format
msgid "delete: index `%s' not in array `%s'"
msgstr "`%s' ïééöî ìéëî åðéà `%s' êøòî :delete"
-#: array.c:792
+#: array.c:705
+#, fuzzy, c-format
+msgid "attempt to use scalar `%s[\"%.*s\"]' as an array"
+msgstr "êøòîë `%s' øàì÷ñá éåâù ùåîéù"
+
+#: array.c:868
#, c-format
msgid "%s: empty (null)\n"
msgstr "%s: (ñôåàî) ÷éø\n"
-#: array.c:797
+#: array.c:873
#, c-format
msgid "%s: empty (zero)\n"
msgstr "%s: (ä÷éø hash úìáè) ÷éø\n"
-#: array.c:801
+#: array.c:877
#, c-format
msgid "%s: table_size = %d, array_size = %d\n"
msgstr "%s: table_size = %d, array_size = %d\n"
-#: array.c:830
+#: array.c:912
#, c-format
msgid "%s: is parameter\n"
msgstr "øèîøô åðéä %s\n"
-#: array.c:835
+#: array.c:916
#, c-format
msgid "%s: array_ref to %s\n"
msgstr "%s: %s-ì (array_ref) äéðôä\n"
-#: awkgram.y:224 awkgram.y:227
+#: array.c:921
+#, fuzzy
+msgid "adump: argument not an array"
+msgstr "êøòî åðéà ïåùàø èðîåâøà :asort"
+
+#: array.c:1139
+#, fuzzy
+msgid "attempt to use array in a scalar context"
+msgstr "øàì÷ñ ùøåãä èñ÷èðå÷á `%s' êøòîá ùåîéù ïåéñð"
+
+#: array.c:1236
+#, fuzzy
+msgid "asort: second argument not an array"
+msgstr "êøòî åðéà éðù èðîåâøà :asort"
+
+#: array.c:1237
+#, fuzzy
+msgid "asorti: second argument not an array"
+msgstr "êøòî åðéà éðù èðîåâøà :asort"
+
+#: array.c:1245
+#, fuzzy
+msgid "asort: first argument not an array"
+msgstr "êøòî åðéà ïåùàø èðîåâøà :asort"
+
+#: array.c:1246
+#, fuzzy
+msgid "asorti: first argument not an array"
+msgstr "êøòî åðéà ïåùàø èðîåâøà :asort"
+
+#: awkgram.y:246
#, fuzzy, c-format
msgid "%s blocks must have an action part"
msgstr "äìåòô úøãâä ìåìëì áééç END ÷åìá"
-#: awkgram.y:230
+#: awkgram.y:249
#, fuzzy
msgid "each rule must have a pattern or an action part"
msgstr "äìåòô úøãâä ìåìëì áééç END ÷åìá"
-#: awkgram.y:266 awkgram.y:275
+#: awkgram.y:320 awkgram.y:330
#, fuzzy
msgid "old awk does not support multiple `BEGIN' or `END' rules"
msgstr "`**' øåèøôåàá êîåú åðéà ïùé awk"
-#: awkgram.y:304
+#: awkgram.y:367
#, c-format
msgid "`%s' is a built-in function, it cannot be redefined"
msgstr "äúøãâä úà úåðùì ïéà ,úéðáåî äéö÷ðåô äðéä `%s'"
-#: awkgram.y:350
+#: awkgram.y:427
#, fuzzy
msgid "regexp constant `//' looks like a C++ comment, but is not"
msgstr "äøòä åðéà êà ,C úôùá äøòä åîë äàøð `/%s/' éøìåâø éåèéá"
-#: awkgram.y:353
+#: awkgram.y:430
#, c-format
msgid "regexp constant `/%s/' looks like a C comment, but is not"
msgstr "äøòä åðéà êà ,C úôùá äøòä åîë äàøð `/%s/' éøìåâø éåèéá"
-#: awkgram.y:380 awkgram.y:692
-msgid "statement may have no effect"
-msgstr "úéìëú íåù äéäú àì äæ éåèéáìù ïëúé"
+#: awkgram.y:735
+#, fuzzy
+msgid "`break' is not allowed outside a loop or switch"
+msgstr "äàìåìì õåçî `break'-á ùîúùäì ïéà"
-#: awkgram.y:477 awkgram.y:480 awkgram.y:504 awkgram.y:511 awkgram.y:518
+#: awkgram.y:744
+#, fuzzy
+msgid "`continue' is not allowed outside a loop"
+msgstr "äàìåìì õåçî `continue'-á ùîúùäì ïéà"
+
+#: awkgram.y:753
#, fuzzy, c-format
-msgid "`%s' used in %s action"
+msgid "`next' used in %s action"
msgstr "END åà BEGIN ìù äìåòô úøãâäá `next'-á ùåîéù"
-#: awkgram.y:495 awkgram.y:499
+#: awkgram.y:767 awkgram.y:771
msgid "`nextfile' is a gawk extension"
msgstr "gawk-ì úéôéöôñ äáçøä åðéä `nextfile'"
-#: awkgram.y:528
+#: awkgram.y:775
+#, fuzzy, c-format
+msgid "`nextfile' used in %s action"
+msgstr "END åà BEGIN ìù äìåòô úøãâäá `next'-á ùåîéù"
+
+#: awkgram.y:799
msgid "`return' used outside function context"
msgstr "äéö÷ðåô ìù èñ÷èðå÷á àìù `return'-á ùåîéù"
-#: awkgram.y:570
+#: awkgram.y:859
msgid "plain `print' in BEGIN or END rule should probably be `print \"\"'"
msgstr "`print \"\"' úåéäì íúñä ïî êéøö END åà BEGIN éììëá èåùô `print'"
-#: awkgram.y:586 awkgram.y:594
+#: awkgram.y:927 awkgram.y:935
msgid "`delete array' is a gawk extension"
msgstr "gawk-ì úéôéöôñ äáçøä åðéä `delete array'"
-#: awkgram.y:608 awkgram.y:616
+#: awkgram.y:955 awkgram.y:963
#, fuzzy
msgid "`delete(array)' is a non-portable tawk extension"
msgstr "gawk-ì úéôéöôñ äáçøä åðéä `delete array'"
-#: awkgram.y:660
+#: awkgram.y:1004
#, c-format
msgid "duplicate case values in switch body: %s"
msgstr ""
-#: awkgram.y:670
-msgid "Duplicate `default' detected in switch body"
+#: awkgram.y:1014
+msgid "duplicate `default' detected in switch body"
msgstr ""
-#: awkgram.y:759
+#: awkgram.y:1151
msgid "multistage two-way pipelines don't work"
msgstr "íéãáåò íðéà íéáìù éáåøî íééðååéë-åã íé÷éôà"
-#: awkgram.y:850
+#: awkgram.y:1253
msgid "regular expression on right of assignment"
msgstr "êøò úîùä úàøåä ìù ïéîé ãöá éøìåâø éåèéá"
-#: awkgram.y:860
+#: awkgram.y:1263
msgid "regular expression on left of `~' or `!~' operator"
msgstr "`!~' åà `~' øåèøôåàì ìàîùî éøìåâø éåèéá"
-#: awkgram.y:866 awkgram.y:954
+#: awkgram.y:1278 awkgram.y:1423
#, fuzzy
msgid "old awk does not support the keyword `in' except after `for'"
msgstr "`**' øåèøôåàá êîåú åðéà ïùé awk"
-#: awkgram.y:872
+#: awkgram.y:1287
msgid "regular expression on right of comparison"
msgstr "äàååùä ìù ïéîé ãöá éøìåâø éåèéá"
-#: awkgram.y:936
+#: awkgram.y:1399
#, fuzzy, c-format
-msgid "`getline var' invalid inside %s rule"
+msgid "`getline var' invalid inside `%s' rule"
msgstr "`%s'-á äéåâù ú÷çåøî äàéöé"
-#: awkgram.y:939
-#, c-format
-msgid "`getline' invalid inside %s rule"
-msgstr ""
+#: awkgram.y:1401
+#, fuzzy, c-format
+msgid "`getline' invalid inside `%s' rule"
+msgstr "`%s'-á äéåâù ú÷çåøî äàéöé"
-#: awkgram.y:944
+#: awkgram.y:1407
msgid "non-redirected `getline' undefined inside END action"
msgstr "END úìåòô êåúá øãâåî åðéà äééðôä àìì `getline'"
-#: awkgram.y:955
+#: awkgram.y:1424
#, fuzzy
msgid "old awk does not support multidimensional arrays"
msgstr "`**' øåèøôåàá êîåú åðéà ïùé awk"
-#: awkgram.y:1001
+#: awkgram.y:1528
msgid "call of `length' without parentheses is not portable"
msgstr "úéìéáèøåô äðéà íééøâåñ àìì `length'-ì äàéø÷"
-#: awkgram.y:1006
-msgid "call of `length' without parentheses is deprecated by POSIX"
-msgstr "POSIX ï÷úì ãåâéðá äðéä íééøâåñ àìì `length'-ì äàéø÷"
-
-#: awkgram.y:1051
+#: awkgram.y:1591
#, fuzzy
msgid "indirect function calls are a gawk extension"
-msgstr "gawk-ì úéôéöôñ äáçøä äðéä `extension'"
+msgstr "gawk-ì úéôéöôñ äáçøä åðéä `nextfile'"
-#: awkgram.y:1084
-msgid "use of non-array as array"
-msgstr ""
+#: awkgram.y:1605
+#, fuzzy, c-format
+msgid "can not use special variable `%s' for indirect function call"
+msgstr "øèîøô íùë ùîùì ìåëé åðéà äéö÷ðåô íù :`%s' äéö÷ðåôá"
-#: awkgram.y:1087
+#: awkgram.y:1682
msgid "invalid subscript expression"
msgstr "êøòî ïééöîá éåâù øéáçú ìòá éåèéá"
-#: awkgram.y:1329
+#: awkgram.y:1722
+msgid "use of non-array as array"
+msgstr ""
+
+#: awkgram.y:1993
#, fuzzy
msgid "unexpected newline or end of string"
msgstr "éåôö-éúìá íå÷îá äøåù óåñ"
-#: awkgram.y:1446
-msgid "empty program text on command line"
-msgstr "äãå÷ôä úøåùî äìá÷úä ä÷éø úéðëú"
-
-#: awkgram.y:1502
+#: awkgram.y:2248 awkgram.y:2296 awkgram.y:2470
#, c-format
msgid "can't open source file `%s' for reading (%s)"
msgstr "åúàéø÷ íùì `%s' øå÷î õáå÷ úçéúôá (%s) äì÷ú"
-#: awkgram.y:1600
+#: awkgram.y:2249 awkgram.y:2297 builtin.c:122
+msgid "reason unknown"
+msgstr "äòåãé-éúìá äáéñî"
+
+#: awkgram.y:2257
+#, fuzzy, c-format
+msgid "already included source file `%s'"
+msgstr "`%s' øå÷î õáå÷î äàéø÷á (%s) äì÷ú"
+
+#: awkgram.y:2281
+#, fuzzy
+msgid "@include is a gawk extension"
+msgstr "gawk-ì úéôéöôñ äáçøä åðéä `nextfile'"
+
+#: awkgram.y:2288
+msgid "empty filename after @include"
+msgstr ""
+
+#: awkgram.y:2422
+msgid "empty program text on command line"
+msgstr "äãå÷ôä úøåùî äìá÷úä ä÷éø úéðëú"
+
+#: awkgram.y:2537
#, c-format
msgid "can't read sourcefile `%s' (%s)"
msgstr "`%s' øå÷î õáå÷î äàéø÷á (%s) äì÷ú"
-#: awkgram.y:1608
+#: awkgram.y:2547
#, c-format
msgid "source file `%s' is empty"
msgstr "÷éø åðéä `%s' øå÷î õáå÷"
-#: awkgram.y:1800 awkgram.y:1922 awkgram.y:1940 awkgram.y:2315 awkgram.y:2407
+#: awkgram.y:2732
msgid "source file does not end in newline"
msgstr "äøåù-óåñ åúá íééúñî åðéà øå÷îä õáå÷"
-#: awkgram.y:1862
+#: awkgram.y:2809
msgid "unterminated regexp ends with `\\' at end of file"
msgstr "õáå÷ä óñá `\\'-á íééúñî øåîâ-éúìá éøìåâø éåèéá"
-#: awkgram.y:1886
+#: awkgram.y:2833
#, c-format
msgid "%s: %d: tawk regex modifier `/.../%c' doesn't work in gawk"
msgstr ""
-#: awkgram.y:1890
+#: awkgram.y:2837
#, c-format
msgid "tawk regex modifier `/.../%c' doesn't work in gawk"
msgstr ""
-#: awkgram.y:1897
+#: awkgram.y:2844
msgid "unterminated regexp"
msgstr "øåîâ-éúìá éøìåâø éåèéá"
-#: awkgram.y:1900
+#: awkgram.y:2848
msgid "unterminated regexp at end of file"
msgstr "õáå÷ä óåñá øåîâ-éúìá éøìåâø éåèéá"
-#: awkgram.y:1969
+#: awkgram.y:2907
msgid "use of `\\ #...' line continuation is not portable"
msgstr "éìéáèøåô åðéà äøåù êùîäì ïîéñë `\\ #...'-á ùåîéù"
-#: awkgram.y:1982
+#: awkgram.y:2923
msgid "backslash not last character on line"
msgstr "äøåùá ïåøçà åú åðéàù êåôä ïñëåì"
-#: awkgram.y:2027
+#: awkgram.y:2984
msgid "POSIX does not allow operator `**='"
msgstr "`**=' øåèøôåà äùøî åðéà POSIX"
-#: awkgram.y:2029
+#: awkgram.y:2986
msgid "old awk does not support operator `**='"
msgstr "`**=' øåèøôåàá êîåú åðéà ïùé awk"
-#: awkgram.y:2038
+#: awkgram.y:2995
msgid "POSIX does not allow operator `**'"
msgstr "`**' øåèøôåà äùøî åðéà POSIX"
-#: awkgram.y:2040
+#: awkgram.y:2997
msgid "old awk does not support operator `**'"
msgstr "`**' øåèøôåàá êîåú åðéà ïùé awk"
-#: awkgram.y:2071
+#: awkgram.y:3032
msgid "operator `^=' is not supported in old awk"
msgstr "ïùé awk-á êîúð åðéà `^=' øåèøôåà"
-#: awkgram.y:2079
+#: awkgram.y:3040
msgid "operator `^' is not supported in old awk"
msgstr "ïùé awk-á êîúð åðéà `^' øåèøôåà"
-#: awkgram.y:2163 awkgram.y:2178
+#: awkgram.y:3133 awkgram.y:3149
msgid "unterminated string"
msgstr "äøåîâ-éúìá úæåøçî"
-#: awkgram.y:2368
+#: awkgram.y:3345
#, c-format
msgid "invalid char '%c' in expression"
msgstr "éåèéáá '%c' éåâù åú"
-#: awkgram.y:2416
+#: awkgram.y:3391
#, c-format
msgid "`%s' is a gawk extension"
msgstr "gawk-ì úéôéöôñ äáçøä äðéä `%s'"
-#: awkgram.y:2419
+#: awkgram.y:3394
#, c-format
msgid "`%s' is a Bell Labs extension"
msgstr "Bell úåãáòî úñøâá awk-ì úéôéöôñ äáçøä åðéä `%s'"
-#: awkgram.y:2422
+#: awkgram.y:3397
#, c-format
msgid "POSIX does not allow `%s'"
msgstr "`%s' äùøî åðéà POSIX"
-#: awkgram.y:2426
+#: awkgram.y:3401
#, c-format
msgid "`%s' is not supported in old awk"
msgstr "ïùé awk-á êîúð åðéà `%s'"
-#: awkgram.y:2452
+#: awkgram.y:3465
msgid "`goto' considered harmful!\n"
msgstr "!òø-òâô áùçð `goto'\n"
-#: awkgram.y:2514
+#: awkgram.y:3518
#, c-format
msgid "%d is invalid as number of arguments for %s"
msgstr "íéèðîåâøà øôñîë %d ìá÷ì ìåëé åðéà %s"
-#: awkgram.y:2533 awkgram.y:2536
+#: awkgram.y:3544 awkgram.y:3547
msgid "match: third argument is a gawk extension"
msgstr "gawk-ì úéôéöôñ äáçøä åðéä `match' ìù éùéìù èðîåâøà"
-#: awkgram.y:2549
+#: awkgram.y:3575
#, c-format
msgid "%s: string literal as last arg of substitute has no effect"
msgstr "úéìëú íåù äì ïéà `%s' ìù ïåøçà èðîåâøàë äòåá÷ úæåøçî"
-#: awkgram.y:2552
+#: awkgram.y:3580
#, fuzzy, c-format
msgid "%s third parameter is not a changeable object"
msgstr "éåðéù-øá è÷ééáåà åðéà `sub' ìù éùéìù èðîåâøà"
-#: awkgram.y:2586 awkgram.y:2589
+#: awkgram.y:3665 awkgram.y:3668
msgid "close: second argument is a gawk extension"
msgstr "gawk-ì úéôéöôñ äáçøä åðéä `close' ìù éðù èðîåâøà"
-#: awkgram.y:2599
+#: awkgram.y:3680
msgid "use of dcgettext(_\"...\") is incorrect: remove leading underscore"
msgstr "èðîåâøà úîã÷áù ïåúçú-ó÷î ÷ìñì ùé :dcgettext(_\"...\")-á éåâù ùåîéù"
-#: awkgram.y:2614
+#: awkgram.y:3695
msgid "use of dcngettext(_\"...\") is incorrect: remove leading underscore"
msgstr "èðîåâøà úîã÷áù ïåúçú-ó÷î ÷ìñì ùé :dncgettext(_\"...\")-á éåâù ùåîéù"
-#: awkgram.y:2686
+#: awkgram.y:3787
#, c-format
msgid "function `%s': parameter #%d, `%s', duplicates parameter #%d"
msgstr "`%s' äéö÷ðåôá %d 'ñî øèîøôì ääæ ,`%s' ,%d 'ñî øèîøô ìù åîù"
-#: awkgram.y:2719
+#: awkgram.y:3829
#, c-format
msgid "function `%s': parameter `%s' shadows global variable"
msgstr "éìáåìâ äðúùî ìò ìéôàî `%s' äéö÷ðåôá `%s' øèîøô"
-#: awkgram.y:2831
+#: awkgram.y:3987
#, c-format
msgid "could not open `%s' for writing (%s)"
msgstr "äáéúë íùì `%s' úçéúôá (%s) äì÷ú"
-#: awkgram.y:2832 profile.c:96
+#: awkgram.y:3988 profile.c:85
msgid "sending profile to standard error"
msgstr "éð÷ú úåàéâù õåøòì çìùð òåöéá ìéôåøô"
-#: awkgram.y:2864
+#: awkgram.y:3994
#, c-format
msgid "%s: close failed (%s)"
msgstr "`%s' úøéâñ úòá (%s) äì÷ú"
-#: awkgram.y:2985
+#: awkgram.y:4046
msgid "shadow_funcs() called twice!"
msgstr "!íééîòô äàø÷ð shadow_funcs()"
-#: awkgram.y:3012
+#: awkgram.y:4052
msgid "there were shadowed variables."
msgstr ""
-#: awkgram.y:3085
+#: awkgram.y:4081
#, c-format
msgid "function `%s': can't use function name as parameter name"
msgstr "øèîøô íùë ùîùì ìåëé åðéà äéö÷ðåô íù :`%s' äéö÷ðåôá"
-#: awkgram.y:3088
+#: awkgram.y:4086
#, fuzzy, c-format
msgid "function `%s': can't use special variable `%s' as a function parameter"
msgstr "øèîøô íùë ùîùì ìåëé åðéà äéö÷ðåô íù :`%s' äéö÷ðåôá"
-#: awkgram.y:3098
+#: awkgram.y:4102
#, c-format
msgid "function name `%s' previously defined"
msgstr "úøãâåî øáë `%s' íùá äéö÷ðåô"
-#: awkgram.y:3249 awkgram.y:3255
+#: awkgram.y:4271 awkgram.y:4277
#, c-format
msgid "function `%s' called but never defined"
msgstr "úøãâåî äðéàù `%s' äéö÷ðåôì äàéø÷"
-#: awkgram.y:3258
+#: awkgram.y:4280
#, c-format
msgid "function `%s' defined but never called"
msgstr "úàø÷ð àì êà ,äøãâåä `%s' äéö÷ðåô"
-#: awkgram.y:3285
+#: awkgram.y:4311
#, c-format
msgid "regexp constant for parameter #%d yields boolean value"
msgstr "éðàéìåá êøò áéðî %d 'ñî øèîøôë òåá÷ éøìåâø éåèéá"
-#: awkgram.y:3329
+#: awkgram.y:4420
#, fuzzy, c-format
msgid ""
"function `%s' called with space between name and `(',\n"
@@ -423,707 +499,574 @@ msgstr ""
",`(' ïéáì äîù ïéá íéçååø íò `%s' äéö÷ðåôì äàéø÷\n"
"%s"
-#: awkgram.y:3750
-#, fuzzy
-msgid "division by zero attempted in `/'"
-msgstr "`/='-á ñôàá ä÷åìç ïåéñð"
+#: awkgram.y:4673 eval.c:1845
+msgid "division by zero attempted"
+msgstr "ñôàá ä÷åìç ïåéñð"
-#: awkgram.y:3755 eval.c:1411
+#: awkgram.y:4682 eval.c:1877
#, c-format
msgid "division by zero attempted in `%%'"
msgstr "`%%'-á ñôàá ä÷åìç ïåéñð"
-#: builtin.c:122
+#: awkgram.y:5342
+msgid "statement may have no effect"
+msgstr "úéìëú íåù äéäú àì äæ éåèéáìù ïëúé"
+
+#: builtin.c:120
#, c-format
msgid "%s to \"%s\" failed (%s)"
msgstr "%s é\"ò \"%s\"-ì äáéúëá (%s) äì÷ú"
-#: builtin.c:123
+#: builtin.c:121
msgid "standard output"
msgstr "úéèøãðèñ èìô úãéçé"
-#: builtin.c:124
-msgid "reason unknown"
-msgstr "äòåãé-éúìá äáéñî"
-
-#: builtin.c:137
+#: builtin.c:135
msgid "exp: received non-numeric argument"
msgstr "øôñî åðéà èðîåâøà :exp"
-#: builtin.c:143
+#: builtin.c:141
#, c-format
msgid "exp: argument %g is out of range"
msgstr "øúåîä íåçúá åðéà %g èðîåâøà :exp"
-#: builtin.c:201
+#: builtin.c:200
#, c-format
msgid "fflush: cannot flush: pipe `%s' opened for reading, not writing"
msgstr "äáéúëì àì ,äàéø÷ì çåúô `%s' ÷éôà :õöåçä ï÷åøì ïúéð àì :fflush"
-#: builtin.c:204
+#: builtin.c:203
#, c-format
msgid "fflush: cannot flush: file `%s' opened for reading, not writing"
msgstr "äáéúëì àì ,äàéø÷ì çåúô `%s' õáå÷ :õöåçä ï÷åøì ïúéð àì :fflush"
-#: builtin.c:216
+#: builtin.c:215
#, c-format
msgid "fflush: `%s' is not an open file, pipe or co-process"
msgstr "ìéá÷î êéìäú åà çåúô ÷éôà ,çåúô õáå÷ åðéà `%s' :fflush"
-#: builtin.c:310
+#: builtin.c:322
msgid "index: received non-string first argument"
msgstr "úæåøçî åðéà ïåùàø èðîåâøà :index"
-#: builtin.c:312
+#: builtin.c:324
msgid "index: received non-string second argument"
msgstr "úæåøçî åðéà éðù èðîåâøà :index"
-#: builtin.c:434
+#: builtin.c:446
msgid "int: received non-numeric argument"
msgstr "øôñî åðéà èðîåâøà :int"
-#: builtin.c:464
+#: builtin.c:469
#, fuzzy
msgid "`length(array)' is a gawk extension"
msgstr "gawk-ì úéôéöôñ äáçøä åðéä `delete array'"
-#: builtin.c:471
-msgid "length: untyped parameter argument will be forced to scalar"
-msgstr ""
-
-#: builtin.c:480
-msgid "length: untyped argument will be forced to scalar"
-msgstr ""
-
-#: builtin.c:484
+#: builtin.c:477
msgid "length: received non-string argument"
msgstr "úæåøçî åðéà èðîåâøà :length"
-#: builtin.c:515
+#: builtin.c:508
msgid "log: received non-numeric argument"
msgstr "øôñî åðéà èðîåâøà :log"
-#: builtin.c:518
+#: builtin.c:511
#, c-format
msgid "log: received negative argument %g"
msgstr "%g éìéìù èðîåâøà íò àø÷ð :log"
-#: builtin.c:726 builtin.c:729
-msgid "must use `count$' on all formats or none"
-msgstr "ãçà óàá åà íéèîøåôä ìëá åà øúåî `count$'-á ùåîéù"
-
-#: builtin.c:790
-#, c-format
-msgid "field width is ignored for `%%%%' specifier"
-msgstr ""
-
-#: builtin.c:792
-#, c-format
-msgid "precision is ignored for `%%%%' specifier"
-msgstr ""
-
-#: builtin.c:794
-#, c-format
-msgid "field width and precision are ignored for `%%%%' specifier"
-msgstr ""
-
-#: builtin.c:845
-msgid "`$' is not permitted in awk formats"
-msgstr "awk ìù íéèîøåôá ùåîéùì øåñà `$'"
-
-#: builtin.c:851
-msgid "arg count with `$' must be > 0"
-msgstr "0-î ìåãâ úåéäì áééç `$' ãéì èðîåâøàä äðåî"
-
-#: builtin.c:853
+#: builtin.c:531 builtin.c:573 builtin.c:586 builtin.c:982 builtin.c:994
#, fuzzy, c-format
-msgid "arg count %ld greater than total number of supplied arguments"
-msgstr "íéèðîåâøàä ìù ììåëä íøôñîî ìåãâ %d èðîåâøàä äðåî"
-
-#: builtin.c:855
-msgid "`$' not permitted after period in format"
-msgstr "èîøåôá äãå÷ðä éøçà òéôåäì ìåëé åðéà `$'"
-
-#: builtin.c:868
-msgid "no `$' supplied for positional field width or precision"
-msgstr "å÷åéã åà äãù áçåø ïééöîá èðîåâøàä äðåî øåáò `$' àöîð àì"
-
-#: builtin.c:938
-msgid "`l' is meaningless in awk formats; ignored"
-msgstr "çðæåä ;awk ìù èîøåôá úåòîùî øñç åðéä `l'"
-
-#: builtin.c:942
-msgid "`l' is not permitted in POSIX awk formats"
-msgstr "POSIX éô-ìò awk ìù èîøåôá òéôåäì ìåëé åðéà `l'"
-
-#: builtin.c:953
-msgid "`L' is meaningless in awk formats; ignored"
-msgstr "çðæåä ;awk ìù èîøåôá úåòîùî øñç åðéä `L'"
-
-#: builtin.c:957
-msgid "`L' is not permitted in POSIX awk formats"
-msgstr "POSIX éô-ìò awk ìù èîøåôá òéôåäì ìåëé åðéà `L'"
-
-#: builtin.c:968
-msgid "`h' is meaningless in awk formats; ignored"
-msgstr "çðæåä ;awk ìù èîøåôá úåòîùî øñç åðéä `h'"
-
-#: builtin.c:972
-msgid "`h' is not permitted in POSIX awk formats"
-msgstr "POSIX éô-ìò awk ìù èîøåôá òéôåäì ìåëé åðéà `h'"
-
-#: builtin.c:1252
-#, c-format
-msgid "[s]printf: value %g is out of range for `%%%c' format"
-msgstr ""
-
-#: builtin.c:1332
-#, c-format
-msgid "ignoring unknown format specifier character `%c': no argument converted"
-msgstr ""
-
-#: builtin.c:1338
-msgid "not enough arguments to satisfy format string"
-msgstr "èîøåôä øåáò íéèðîåâøà ÷éôñî ïéà"
-
-#: builtin.c:1340
-msgid "^ ran out for this one"
-msgstr "^ íéèðîåâøàä éì åøîâð ïàë"
-
-#: builtin.c:1346
-msgid "[s]printf: format specifier does not have control letter"
-msgstr "äøîää úø÷á úåà ìéëî åðéà èîøåôä :[s]printf"
-
-#: builtin.c:1349
-msgid "too many arguments supplied for format string"
-msgstr "èîøåôä øåáò íéèðîåâøà éãî øúåé"
+msgid "attempt to use array `%s' in scalar context"
+msgstr "øàì÷ñ ùøåãä èñ÷èðå÷á `%s' êøòîá ùåîéù ïåéñð"
-#: builtin.c:1424 builtin.c:1427
+#: builtin.c:569 builtin.c:580
msgid "printf: no arguments"
msgstr "èðîåâøà óà ïéà :printf"
-#: builtin.c:1451
+#: builtin.c:621
msgid "sqrt: received non-numeric argument"
msgstr "øôñî åðéà èðîåâøà :sqrt"
-#: builtin.c:1455
+#: builtin.c:625
#, c-format
msgid "sqrt: called with negative argument %g"
msgstr "%g éìéìù èðîåâøà íò àø÷ð :sqrt"
-#: builtin.c:1479
-#, c-format
-msgid "substr: start index %g is invalid, using 1"
-msgstr "1-á óìçåä ,éåâù åðéä %g äìçúä ïééöî :substr"
-
-#: builtin.c:1484
-#, c-format
-msgid "substr: non-integer start index %g will be truncated"
-msgstr "õöå÷é ,íìù øôñî åðéàù, %g äìçúä ïééöî ìù åëøò :substr"
-
-#: builtin.c:1510
+#: builtin.c:649
#, fuzzy, c-format
msgid "substr: length %g is not >= 1"
msgstr "0-î ìåãâ øôñî åððéà %g êøåà :substr"
-#: builtin.c:1512
+#: builtin.c:651
#, fuzzy, c-format
msgid "substr: length %g is not >= 0"
msgstr "0-î ìåãâ øôñî åððéà %g êøåà :substr"
-#: builtin.c:1519
+#: builtin.c:658
#, c-format
msgid "substr: non-integer length %g will be truncated"
msgstr "õöå÷é ,íìù øôñî åðéàù ,%g êøåà :substr"
-#: builtin.c:1524
+#: builtin.c:663
#, c-format
msgid "substr: length %g too big for string indexing, truncating to %g"
msgstr ""
-#: builtin.c:1536
+#: builtin.c:675
+#, c-format
+msgid "substr: start index %g is invalid, using 1"
+msgstr "1-á óìçåä ,éåâù åðéä %g äìçúä ïééöî :substr"
+
+#: builtin.c:680
+#, c-format
+msgid "substr: non-integer start index %g will be truncated"
+msgstr "õöå÷é ,íìù øôñî åðéàù, %g äìçúä ïééöî ìù åëøò :substr"
+
+#: builtin.c:705
msgid "substr: source string is zero length"
msgstr "ñôà êøåàá äðéä øå÷îä úæåøçî :substr"
-#: builtin.c:1552
+#: builtin.c:721
#, fuzzy, c-format
msgid "substr: start index %g is past end of string"
msgstr "úæåøçîä óåñì øáòî åðéä %d äìçúä ïééöî :substr"
-#: builtin.c:1560
+#: builtin.c:729
#, fuzzy, c-format
msgid ""
"substr: length %g at start index %g exceeds length of first argument (%lu)"
msgstr ""
"%d äëøåàå %d ïééöîá äúìéçúù úæåøçî-úúì ÷éôñî åðéà (%d) úæåøçî êøåà :substr"
-#: builtin.c:1637
+#: builtin.c:806
+msgid "strftime: received non-numeric second argument"
+msgstr "øôñî åðéà éðù èðîåâøà :strftime"
+
+#: builtin.c:813
msgid "strftime: received non-string first argument"
msgstr "úæåøçî åðéà ïåùàø èðîåâøà :strftime"
-#: builtin.c:1643
+#: builtin.c:819
msgid "strftime: received empty format string"
msgstr "ä÷éø èîøåô úæåøçî :strftime"
-#: builtin.c:1652
-msgid "strftime: received non-numeric second argument"
-msgstr "øôñî åðéà éðù èðîåâøà :strftime"
-
-#: builtin.c:1729
+#: builtin.c:885
msgid "mktime: received non-string argument"
msgstr "úæåøçî åðéà èðîåâøà :mktime"
-#: builtin.c:1746
+#: builtin.c:902
msgid "mktime: at least one of the values is out of the default range"
msgstr ""
-#: builtin.c:1781
+#: builtin.c:937
msgid "'system' function not allowed in sandbox mode"
msgstr ""
-#: builtin.c:1786
+#: builtin.c:942
msgid "system: received non-string argument"
msgstr "úæåøçî åðéà èðîåâøà :system"
-#: builtin.c:1907 eval.c:2285
+#: builtin.c:997 eval.c:1105 eval.c:1557 eval.c:1570
+#, c-format
+msgid "reference to uninitialized variable `%s'"
+msgstr "`%s' ìçåúî-éúìá äðúùîì äéðôä"
+
+#: builtin.c:1064
#, fuzzy, c-format
msgid "reference to uninitialized field `$%d'"
msgstr "`%s' ìçåúî-éúìá äðúùîì äéðôä"
-#: builtin.c:2012
+#: builtin.c:1098
msgid "tolower: received non-string argument"
msgstr "úæåøçî åðéà èðîåâøà :tolower"
-#: builtin.c:2042
+#: builtin.c:1151
msgid "toupper: received non-string argument"
msgstr "úæåøçî åðéà èðîåâøà :toupper"
-#: builtin.c:2075
+#: builtin.c:1199
msgid "atan2: received non-numeric first argument"
msgstr "øôñî åðéà ïåùàø èðîåâøà :atan2"
-#: builtin.c:2077
+#: builtin.c:1201
msgid "atan2: received non-numeric second argument"
msgstr "øôñî åðéà éðù èðîåâøà :atan2"
-#: builtin.c:2096
+#: builtin.c:1220
msgid "sin: received non-numeric argument"
msgstr "øôñî åðéà èðîåâøà :sin"
-#: builtin.c:2112
+#: builtin.c:1236
msgid "cos: received non-numeric argument"
msgstr "øôñî åðéà èðîåâøà :cos"
-#: builtin.c:2165
+#: builtin.c:1289
msgid "srand: received non-numeric argument"
msgstr "øôñî åðéà èðîåâøà :srand"
-#: builtin.c:2200
+#: builtin.c:1320
msgid "match: third argument is not an array"
msgstr "êøòî åðéà éùéìù èðîåâøà :match"
-#: builtin.c:2750
+#: builtin.c:1827
+#, fuzzy
msgid "gensub: third argument of 0 treated as 1"
msgstr "1-á óìçåä 0 åëøòù éùéìù èðîåâøà :gensub"
-#: builtin.c:2866
+#: builtin.c:1869
msgid "lshift: received non-numeric first argument"
msgstr "øôñî åðéà ïåùàø èðîåâøà :lshift"
-#: builtin.c:2868
+#: builtin.c:1871
#, fuzzy
msgid "lshift: received non-numeric second argument"
msgstr "øôñî åðéà éðù èðîåâøà :strftime"
-#: builtin.c:2874
+#: builtin.c:1877
#, c-format
msgid "lshift(%lf, %lf): negative values will give strange results"
msgstr "úåéåôö-éúìá úåàöåú åáéðé íééìéìù íéëøò :lshift(%lf, %lf)"
-#: builtin.c:2876
+#: builtin.c:1879
#, c-format
msgid "lshift(%lf, %lf): fractional values will be truncated"
msgstr "åööå÷é íéøåáù íéëøò :lshift(%lf, %lf)"
-#: builtin.c:2878
+#: builtin.c:1881
#, c-format
msgid "lshift(%lf, %lf): too large shift value will give strange results"
msgstr "úåéåôö-éúìá úåàöåú áéðé éãî ìåãâ äææä øåòéù :lshift(%lf, %lf)"
-#: builtin.c:2904
+#: builtin.c:1908
msgid "rshift: received non-numeric first argument"
msgstr "øôñî åðéà ïåùàø èðîåâøà :rshift"
-#: builtin.c:2906
+#: builtin.c:1910
#, fuzzy
msgid "rshift: received non-numeric second argument"
msgstr "øôñî åðéà éðù èðîåâøà :strftime"
-#: builtin.c:2912
+#: builtin.c:1916
#, c-format
msgid "rshift(%lf, %lf): negative values will give strange results"
msgstr "úåéåôö-éúìá úåàöåú åáéðé íééìéìù íéëøò :rshift(%lf, %lf)"
-#: builtin.c:2914
+#: builtin.c:1918
#, c-format
msgid "rshift(%lf, %lf): fractional values will be truncated"
msgstr "åööå÷é íéøåáù íéëøò :rshift(%lf, %lf)"
-#: builtin.c:2916
+#: builtin.c:1920
#, c-format
msgid "rshift(%lf, %lf): too large shift value will give strange results"
msgstr "úåéåôö-éúìá úåàöåú áéðé éãî ìåãâ äææä øåòéù :rshift(%lf, %lf)"
-#: builtin.c:2942
+#: builtin.c:1947
msgid "and: received non-numeric first argument"
msgstr "øôñî åðéà ïåùàø èðîåâøà :and"
-#: builtin.c:2944
+#: builtin.c:1949
#, fuzzy
msgid "and: received non-numeric second argument"
msgstr "øôñî åðéà éðù èðîåâøà :atan2"
-#: builtin.c:2950
+#: builtin.c:1955
#, c-format
msgid "and(%lf, %lf): negative values will give strange results"
msgstr "úåéåôö-éúìá úåàöåú åáéðé íééìéìù íéëøò :and(%lf, %lf)"
-#: builtin.c:2952
+#: builtin.c:1957
#, c-format
msgid "and(%lf, %lf): fractional values will be truncated"
msgstr "åööå÷é íéøåáù íéëøò :and(%lf, %lf)"
-#: builtin.c:2978
+#: builtin.c:1984
msgid "or: received non-numeric first argument"
msgstr "øôñî åðéà ïåùàø èðîåâøà :or"
-#: builtin.c:2980
+#: builtin.c:1986
#, fuzzy
msgid "or: received non-numeric second argument"
msgstr "øôñî åðéà éðù èðîåâøà :atan2"
-#: builtin.c:2986
+#: builtin.c:1992
#, c-format
msgid "or(%lf, %lf): negative values will give strange results"
msgstr "úåéåôö-éúìá úåàöåú åáéðé íééìéìù íéëøò :or(%lf, %lf)"
-#: builtin.c:2988
+#: builtin.c:1994
#, c-format
msgid "or(%lf, %lf): fractional values will be truncated"
msgstr "åööå÷é íéøåáù íéëøò :or(%lf, %lf)"
-#: builtin.c:3014
+#: builtin.c:2023
msgid "xor: received non-numeric first argument"
msgstr "øôñî åðéà ïåùàø èðîåâøà :xor"
-#: builtin.c:3016
+#: builtin.c:2025
#, fuzzy
msgid "xor: received non-numeric second argument"
msgstr "øôñî åðéà éðù èðîåâøà :atan2"
-#: builtin.c:3022
+#: builtin.c:2031
#, c-format
msgid "xor(%lf, %lf): negative values will give strange results"
msgstr "úåéåôö-éúìá úåàöåú åáéðé íééìéìù íéëøò :xor(%lf, %lf)"
-#: builtin.c:3024
+#: builtin.c:2033
#, c-format
msgid "xor(%lf, %lf): fractional values will be truncated"
msgstr "åööå÷é íéøåáù íéëøò :xor(%lf, %lf)"
-#: builtin.c:3048
+#: builtin.c:2057 builtin.c:2063
msgid "compl: received non-numeric argument"
msgstr "øôñî åðéà èðîåâøà :compl"
-#: builtin.c:3054
+#: builtin.c:2065
#, c-format
msgid "compl(%lf): negative value will give strange results"
msgstr "úåéåôö-éúìá úåàöåú áéðé éìéìù êøò :compl(%lf)"
-#: builtin.c:3056
+#: builtin.c:2067
#, c-format
msgid "compl(%lf): fractional value will be truncated"
msgstr "õöå÷é øåáù êøò :compl(%lf)"
-#: builtin.c:3229
+#: builtin.c:2237
#, c-format
msgid "dcgettext: `%s' is not a valid locale category"
msgstr "äðé÷ú íå÷éî úééøåâè÷ åðéà `%s' :dcgettext"
-#: eval.c:374
+#: eval.c:412
#, c-format
msgid "unknown nodetype %d"
msgstr "%d ääåæî-éúìá âåñ ìòá node"
-#: eval.c:423
-msgid "buffer overflow in genflags2str"
-msgstr "genflags2str-á õöåç úùéìâ"
+#: eval.c:423 eval.c:437
+#, fuzzy, c-format
+msgid "unknown opcode %d"
+msgstr "%d ääåæî-éúìá âåñ ìòá node"
-#: eval.c:455 eval.c:461 profile.c:787
+#: eval.c:434
#, c-format
-msgid "attempt to use array `%s' in a scalar context"
-msgstr "øàì÷ñ ùøåãä èñ÷èðå÷á `%s' êøòîá ùåîéù ïåéñð"
+msgid "opcode %s not an operator or keyword"
+msgstr ""
-#: eval.c:803
-#, fuzzy, c-format
-msgid "for loop: array `%s' changed size from %ld to %ld during loop execution"
-msgstr "(`%s' êøòî) äàìåìä òåöéá êìäîá %d-î %d-ì äðåù êøòî ìù åìãåâ :for úàìåì"
+#: eval.c:487
+msgid "buffer overflow in genflags2str"
+msgstr "genflags2str-á õöåç úùéìâ"
-#: eval.c:824
-msgid "`break' outside a loop is not portable"
-msgstr "éìéáèøåô åðéà äàìåìì õåçî `break'"
+#: eval.c:613
+#, c-format
+msgid ""
+"\n"
+"\t# Function Call Stack:\n"
+"\n"
+msgstr ""
+"\n"
+"\t# :úåéö÷ðåôì úåàéø÷ä úéðñçî\n"
+"\n"
-#: eval.c:828
-msgid "`break' outside a loop is not allowed"
-msgstr "äàìåìì õåçî `break'-á ùîúùäì ïéà"
+#: eval.c:640
+msgid "`IGNORECASE' is a gawk extension"
+msgstr "gawk-ì úéôéöôñ äáçøä åðéä `IGNORECASE'"
-#: eval.c:845
-msgid "`continue' outside a loop is not portable"
-msgstr "éìéáèøåô åðéà äàìåìì õåçî `continue'"
+#: eval.c:669
+msgid "`BINMODE' is a gawk extension"
+msgstr "gawk-ì úéôéöôñ äáçøä åðéä `BINMODE'"
-#: eval.c:849
-msgid "`continue' outside a loop is not allowed"
-msgstr "äàìåìì õåçî `continue'-á ùîúùäì ïéà"
+#: eval.c:727
+#, c-format
+msgid "BINMODE value `%s' is invalid, treated as 3"
+msgstr ""
-#: eval.c:883
-msgid "`next' cannot be called from a BEGIN rule"
-msgstr "BEGIN éììë êåúî `next'-ì àåø÷ì ïéà"
+#: eval.c:817
+#, c-format
+msgid "bad `%sFMT' specification `%s'"
+msgstr "äðé÷ú `%sFMT' úøãâä åðéà `%s'"
-#: eval.c:885
-msgid "`next' cannot be called from an END rule"
-msgstr "END éììë êåúî `next'-ì àåø÷ì ïéà"
+#: eval.c:895
+msgid "turning off `--lint' due to assignment to `LINT'"
+msgstr "`LINT'-ì êøò úîùä á÷ò `--lint' ìèáî"
-#: eval.c:887
-#, fuzzy
-msgid "`next' cannot be called from a BEGINFILE rule"
-msgstr "BEGIN éììë êåúî `next'-ì àåø÷ì ïéà"
+#: eval.c:1067 eval.c:1544
+#, c-format
+msgid "can't use function name `%s' as variable or array"
+msgstr "êøòî åà äðúùîë `%s' äéö÷ðåô íùá ùîúùäì ïéà"
-#: eval.c:889
-#, fuzzy
-msgid "`next' cannot be called from an ENDFILE rule"
-msgstr "END éììë êåúî `next'-ì àåø÷ì ïéà"
+#: eval.c:1095
+msgid "assignment is not allowed to result of builtin function"
+msgstr "úéðáåî äéö÷ðåô ìù äàöåúá êøò áéöäì ïéà"
-#: eval.c:898
-msgid "`nextfile' cannot be called from a BEGIN rule"
-msgstr "BEGIN éììë êåúî `nextfile'-ì àåø÷ì ïéà"
+#: eval.c:1104 eval.c:1556 eval.c:1569
+#, c-format
+msgid "reference to uninitialized argument `%s'"
+msgstr "`%s' ìçåúî-éúìá èðîåâøàì äéðôä"
-#: eval.c:900
-msgid "`nextfile' cannot be called from an END rule"
-msgstr "END éììë êåúî `nextfile'-ì àåø÷ì ïéà"
+#: eval.c:1123
+msgid "attempt to field reference from non-numeric value"
+msgstr "øôñî åðéàù êøò úåòöîàá äãùì äéðôä ïåéñð"
-#: eval.c:906
+#: eval.c:1125
#, fuzzy
-msgid "`nextfile' cannot be called from an ENDFILE rule"
-msgstr "END éììë êåúî `nextfile'-ì àåø÷ì ïéà"
+msgid "attempt to field reference from null string"
+msgstr "ä÷éø úæåøçî úåòöîàá äãùì äéðôä ïåéñð"
-#: eval.c:963
-msgid "statement has no effect"
-msgstr "úéìëú-úìåèð äàøåä"
+#: eval.c:1131
+#, fuzzy, c-format
+msgid "attempt to access field %ld"
+msgstr "%d 'ñî äãùì äùéâ ïåéñð"
-#: eval.c:1040 eval.c:2133
-#, c-format
-msgid "can't use function name `%s' as variable or array"
-msgstr "êøòî åà äðúùîë `%s' äéö÷ðåô íùá ùîúùäì ïéà"
+#: eval.c:1140
+#, fuzzy, c-format
+msgid "reference to uninitialized field `$%ld'"
+msgstr "`%s' ìçåúî-éúìá äðúùîì äéðôä"
-#: eval.c:1047 eval.c:1053
+#: eval.c:1202
#, c-format
-msgid "reference to uninitialized argument `%s'"
-msgstr "`%s' ìçåúî-éúìá èðîåâøàì äéðôä"
+msgid "function `%s' called with more arguments than declared"
+msgstr "äúæøëäá øùàî íéèðîåâøà øúåé íò `%s' äéö÷ðåôì äàéø÷"
-#: eval.c:1062 eval.c:2142
+#: eval.c:1358
#, c-format
-msgid "reference to uninitialized variable `%s'"
-msgstr "`%s' ìçåúî-éúìá äðúùîì äéðôä"
-
-#: eval.c:1210
-msgid ""
-"concatenation: side effects in one expression have changed the length of "
-"another!"
+msgid "unwind_stack: unexpected type `%s'"
msgstr ""
-"!øçà éåèéá ìù åëøåà éåðéùì åîøâ ãçà éåèéá áåùéç ìù éàåì-úåòôåú :concatenation"
-#: eval.c:1315
+#: eval.c:1636
+#, fuzzy, c-format
+msgid "attempt to use scalar `%s' as an array"
+msgstr "êøòîë `%s' øàì÷ñá éåâù ùåîéù"
+
+#: eval.c:1680
msgid "assignment used in conditional context"
msgstr "éàðú ìù èñ÷èðå÷á äîùäá ùåîéù"
-#: eval.c:1396
-msgid "division by zero attempted"
-msgstr "ñôàá ä÷åìç ïåéñð"
-
-#: eval.c:1426 profile.c:663
-#, c-format
-msgid "illegal type (%s) in tree_eval"
-msgstr "tree_eval-á (%s) éåâù âåñ"
+#: eval.c:1684
+msgid "statement has no effect"
+msgstr "úéìëú-úìåèð äàøåä"
-#: eval.c:1589
+#: eval.c:2028
msgid "division by zero attempted in `/='"
msgstr "`/='-á ñôàá ä÷åìç ïåéñð"
-#: eval.c:1611
+#: eval.c:2053
#, c-format
msgid "division by zero attempted in `%%='"
msgstr "`%%='-á ñôàá ä÷åìç ïåéñð"
-#: eval.c:1891
-#, c-format
-msgid "function `%s' called with more arguments than declared"
-msgstr "äúæøëäá øùàî íéèðîåâøà øúåé íò `%s' äéö÷ðåôì äàéø÷"
-
-#: eval.c:1948
-#, c-format
-msgid "function `%s' not defined"
-msgstr "úøãâåî äðéà `%s' äéö÷ðåô"
-
-#: eval.c:1950
-#, c-format
-msgid "identifier `%s' is not a function"
-msgstr ""
-
-#: eval.c:1997
-#, c-format
-msgid ""
-"function parameter `%s' is not a scalar and cannot be used for indirect "
-"function call"
-msgstr ""
+#: eval.c:2139
+msgid "`continue' outside a loop is not allowed"
+msgstr "äàìåìì õåçî `continue'-á ùîúùäì ïéà"
-#: eval.c:2014
-#, c-format
-msgid "indirect call of real function `%s' is silly"
-msgstr ""
+#: eval.c:2145
+#, fuzzy
+msgid "`break' outside a loop is not allowed"
+msgstr "äàìåìì õåçî `break'-á ùîúùäì ïéà"
-#: eval.c:2034
-#, c-format
-msgid "function `%s' called indirectly through `%s' does not exist"
-msgstr ""
+#: eval.c:2229
+#, fuzzy, c-format
+msgid "for loop: array `%s' changed size from %ld to %ld during loop execution"
+msgstr "(`%s' êøòî) äàìåìä òåöéá êìäîá %d-î %d-ì äðåù êøòî ìù åìãåâ :for úàìåì"
-#: eval.c:2039
+#: eval.c:2342
#, c-format
-msgid "identifier `%s' cannot be used for indirect function call"
+msgid "function called indirectly through `%s' does not exist"
msgstr ""
-#: eval.c:2105
+#: eval.c:2354
#, c-format
-msgid ""
-"\n"
-"\t# Function Call Stack:\n"
-"\n"
-msgstr ""
-"\n"
-"\t# :úåéö÷ðåôì úåàéø÷ä úéðñçî\n"
-"\n"
-
-#: eval.c:2108
-#, c-format
-msgid "\t# -- main --\n"
-msgstr "\t# -- main --\n"
-
-#: eval.c:2269
-msgid "attempt to field reference from non-numeric value"
-msgstr "øôñî åðéàù êøò úåòöîàá äãùì äéðôä ïåéñð"
-
-#: eval.c:2271
-msgid "attempt to reference from null string"
-msgstr "ä÷éø úæåøçî úåòöîàá äãùì äéðôä ïåéñð"
-
-#: eval.c:2277
-#, c-format
-msgid "attempt to access field %d"
-msgstr "%d 'ñî äãùì äùéâ ïåéñð"
-
-#: eval.c:2298 eval.c:2305 profile.c:843
-msgid "assignment is not allowed to result of builtin function"
-msgstr "úéðáåî äéö÷ðåô ìù äàöåúá êøò áéöäì ïéà"
+msgid "function `%s' not defined"
+msgstr "úøãâåî äðéà `%s' äéö÷ðåô"
-#: eval.c:2369
-msgid "`IGNORECASE' is a gawk extension"
-msgstr "gawk-ì úéôéöôñ äáçøä åðéä `IGNORECASE'"
+#: eval.c:2481
+#, fuzzy, c-format
+msgid "`nextfile' cannot be called from a `%s' rule"
+msgstr "END éììë êåúî `nextfile'-ì àåø÷ì ïéà"
-#: eval.c:2398
-msgid "`BINMODE' is a gawk extension"
-msgstr "gawk-ì úéôéöôñ äáçøä åðéä `BINMODE'"
+#: eval.c:2540
+#, fuzzy, c-format
+msgid "`next' cannot be called from a `%s' rule"
+msgstr "END éììë êåúî `next'-ì àåø÷ì ïéà"
-#: eval.c:2456
+#: eval.c:2602
#, c-format
-msgid "BINMODE value `%s' is invalid, treated as 3"
+msgid "Sorry, don't know how to interpret `%s'"
msgstr ""
-#: eval.c:2546
-#, c-format
-msgid "bad `%sFMT' specification `%s'"
-msgstr "äðé÷ú `%sFMT' úøãâä åðéà `%s'"
-
-#: eval.c:2624
-msgid "turning off `--lint' due to assignment to `LINT'"
-msgstr "`LINT'-ì êøò úîùä á÷ò `--lint' ìèáî"
-
-#: ext.c:61
-msgid "extensions not allowed in sandbox mode"
+#: ext.c:62
+msgid "extensions are not allowed in sandbox mode"
msgstr ""
-#: ext.c:65 ext.c:70
+#: ext.c:68 ext.c:73
msgid "`extension' is a gawk extension"
msgstr "gawk-ì úéôéöôñ äáçøä äðéä `extension'"
-#: ext.c:80
-#, c-format
-msgid "extension: cannot open `%s' (%s)\n"
+#: ext.c:83
+#, fuzzy, c-format
+msgid "fatal: extension: cannot open `%s' (%s)\n"
msgstr "`%s' úçéúô úòá (%s) äì÷ú äòøéà :extension\n"
-#: ext.c:88
-#, c-format
-msgid "extension: library `%s': cannot call function `%s' (%s)\n"
+#: ext.c:93
+#, fuzzy, c-format
+msgid "fatal: extension: library `%s': cannot call function `%s' (%s)\n"
msgstr "`%s' äéøôñî `%s' äéö÷ðåôì äàéø÷á (%s) äì÷ú äòøéà :extension\n"
-#: ext.c:108
+#: ext.c:123
msgid "extension: missing function name"
msgstr ""
-#: ext.c:113
+#: ext.c:128
#, fuzzy, c-format
msgid "extension: illegal character `%c' in function name `%s'"
msgstr "`%s' äéøôñî `%s' äéö÷ðåôì äàéø÷á (%s) äì÷ú äòøéà :extension\n"
-#: ext.c:119
+#: ext.c:137
#, fuzzy, c-format
msgid "extension: can't redefine function `%s'"
msgstr "`%s' úçéúô úòá (%s) äì÷ú äòøéà :extension\n"
-#: ext.c:123
+#: ext.c:141
#, fuzzy, c-format
msgid "extension: function `%s' already defined"
msgstr "úøãâåî äðéà `%s' äéö÷ðåô"
-#: ext.c:128
-#, c-format
-msgid "extension: can't use gawk built-in `%s' as function name"
-msgstr ""
-
-#: ext.c:130
+#: ext.c:146
#, fuzzy, c-format
msgid "extension: function name `%s' previously defined"
msgstr "úøãâåî øáë `%s' íùá äéö÷ðåô"
-#: ext.c:207
+#: ext.c:148
+#, fuzzy, c-format
+msgid "extension: can't use gawk built-in `%s' as function name"
+msgstr "øèîøô íùë ùîùì ìåëé åðéà äéö÷ðåô íù :`%s' äéö÷ðåôá"
+
+#: ext.c:152
+#, c-format
+msgid "make_builtin: negative argument count for function `%s'"
+msgstr ""
+
+#: ext.c:255
#, fuzzy, c-format
msgid "function `%s' defined to take no more than %d argument(s)"
msgstr "úàø÷ð àì êà ,äøãâåä `%s' äéö÷ðåô"
-#: ext.c:210
+#: ext.c:258
#, fuzzy, c-format
msgid "function `%s': missing argument #%d"
msgstr "úøãâåî äðéà `%s' äéö÷ðåô"
-#: ext.c:220
+#: ext.c:268
#, fuzzy, c-format
msgid "function `%s': argument #%d: attempt to use scalar as an array"
msgstr "êøòîë `%s' øàì÷ñá éåâù ùåîéù"
-#: ext.c:224
+#: ext.c:272
#, c-format
msgid "function `%s': argument #%d: attempt to use array as a scalar"
msgstr ""
-#: ext.c:249
+#: ext.c:285
msgid "Operation Not Supported"
msgstr "úëîúð äðéà åæ äìåòô"
@@ -1131,59 +1074,58 @@ msgstr "úëîúð äðéà åæ äìåòô"
msgid "NF set to negative value"
msgstr "éìéìù êøò ìáé÷ NF"
-#: field.c:913
-msgid "split: second argument is not an array"
-msgstr "êøòî åðéà `split' ìù éðùä èðîåâøàä"
-
-#: field.c:922 field.c:932 field.c:937
+#: field.c:939 field.c:946 field.c:950
#, fuzzy
msgid "split: fourth argument is a gawk extension"
msgstr "gawk-ì úéôéöôñ äáçøä åðéä `match' ìù éùéìù èðîåâøà"
-#: field.c:928
+#: field.c:943
#, fuzzy
msgid "split: fourth argument is not an array"
msgstr "êøòî åðéà `split' ìù éðùä èðîåâøàä"
-#: field.c:975
-#, fuzzy
-msgid "split: null string for third argument is a gawk extension"
+#: field.c:957
+msgid "split: second argument is not an array"
+msgstr "êøòî åðéà `split' ìù éðùä èðîåâøàä"
+
+#: field.c:987
+msgid "split: null string for third arg is a gawk extension"
msgstr "gawk-ì úéôéöôñ äáçøä äðéä `split'-ì éùéìù èðåîâøàë úñôåàî úæåøçî"
-#: field.c:1032
+#: field.c:1028
#, fuzzy
-msgid "patsplit: second argument is not an array"
+msgid "patsplit: fourth argument is not an array"
msgstr "êøòî åðéà `split' ìù éðùä èðîåâøàä"
-#: field.c:1041
+#: field.c:1033
#, fuzzy
-msgid "patsplit: fourth argument is not an array"
+msgid "patsplit: second argument is not an array"
msgstr "êøòî åðéà `split' ìù éðùä èðîåâøàä"
-#: field.c:1067
+#: field.c:1051
#, fuzzy
msgid "patsplit: third argument must be non-null"
msgstr "êøòî åðéà éùéìù èðîåâøà :match"
-#: field.c:1111
+#: field.c:1084
msgid "`FIELDWIDTHS' is a gawk extension"
msgstr "gawk-ì úéôéöôñ äáçøä åðéä `FIELDWIDTHS'"
-#: field.c:1141 field.c:1155
+#: field.c:1147
#, c-format
msgid "invalid FIELDWIDTHS value, near `%s'"
msgstr ""
-#: field.c:1238
+#: field.c:1220
msgid "null string for `FS' is a gawk extension"
msgstr "gawk-ì úéôéöôñ äáçøä äðéä `FS'-ë úñôåàî úæåøçî"
-#: field.c:1242
+#: field.c:1224
#, fuzzy
msgid "old awk does not support regexps as value of `FS'"
msgstr "`**' øåèøôåàá êîåú åðéà ïùé awk"
-#: field.c:1357
+#: field.c:1343
#, fuzzy
msgid "`FPAT' is a gawk extension"
msgstr "gawk-ì úéôéöôñ äáçøä äðéä `%s'"
@@ -1245,496 +1187,493 @@ msgstr "%s úéðëú øåáò èðîåâøà ìá÷î åðéà `-W %s' ïééôàî\n"
msgid "%s: option '-W %s' requires an argument\n"
msgstr "%s úéðëú øåáò èðîåâøà áééçî `%s' ïééôàî\n"
-#: io.c:379
+#: io.c:272
#, c-format
msgid "command line argument `%s' is a directory: skipped"
msgstr ""
-#: io.c:413
+#: io.c:275 io.c:372
#, c-format
msgid "cannot open file `%s' for reading (%s)"
msgstr "åúàéø÷ íùì `%s' õáå÷ úçéúôá (%s) äì÷ú"
-#: io.c:459 io.c:2999
+#: io.c:419
#, c-format
msgid "error reading input file `%s': %s"
msgstr "`%s' õáå÷ úàéø÷á (%s) äì÷ú"
-#: io.c:506
+#: io.c:470
#, c-format
msgid "close of fd %d (`%s') failed (%s)"
msgstr "(%d èìô/èì÷ õåøò) `%s' úøéâñá (%s) äì÷ú"
-#: io.c:617
-msgid "redirection not allowed in sandbox mode"
-msgstr ""
-
-#: io.c:648
-#, c-format
-msgid "invalid tree type %s in redirect()"
-msgstr "redirect() äéö÷ðåôá %s éåâù õò âåñ"
-
-#: io.c:654
+#: io.c:577
#, c-format
msgid "expression in `%s' redirection only has numeric value"
msgstr "ãáìá éøîåð êøò áéðî `%s' èìô/èì÷ úééðôäá éåèéá"
-#: io.c:660
+#: io.c:583
#, c-format
msgid "expression for `%s' redirection has null string value"
msgstr "ä÷éø úæåøçî áéðî `%s' èìô/èì÷ úééðôäá éåèéá"
-#: io.c:665
+#: io.c:589
#, c-format
msgid "filename `%s' for `%s' redirection may be result of logical expression"
msgstr "éâåì éåèéá ìù äàöåú úåéäì ìåìò `%s' õáå÷ íù `%s' èìô/èì÷ úééðôäá"
-#: io.c:707
+#: io.c:628
#, c-format
msgid "unnecessary mixing of `>' and `>>' for file `%.*s'"
msgstr "`%.*s' õáå÷ øåáò `>>'-á ïäå `>'-á ïä øúåéî ùåîéù"
-#: io.c:754
+#: io.c:681
#, c-format
msgid "can't open pipe `%s' for output (%s)"
msgstr "èìô êøåöì `%s' ÷éôà úçéúôá (%s) äì÷ú"
-#: io.c:763
+#: io.c:691
#, c-format
msgid "can't open pipe `%s' for input (%s)"
msgstr "èì÷ êøåöì `%s' ÷éôà úçéúôá (%s) äì÷ú"
-#: io.c:786
+#: io.c:712
#, c-format
msgid "can't open two way pipe `%s' for input/output (%s)"
msgstr "èìô/èì÷ êøåöì éðååéë-åã (pipe) ÷éôàë `%s' úçéúôá (%s) äì÷ú"
-#: io.c:864
+#: io.c:794
#, c-format
msgid "can't redirect from `%s' (%s)"
msgstr "`%s'-î äééðôäá (%s) äì÷ú"
-#: io.c:867
+#: io.c:797
#, c-format
msgid "can't redirect to `%s' (%s)"
msgstr "`%s' ìà äééðôäá (%s) äì÷ú"
-#: io.c:920
+#: io.c:846
msgid ""
"reached system limit for open files: starting to multiplex file descriptors"
msgstr "èìô/èì÷ éöåøò áåáéø úìéçú ;íéçåúô íéöá÷ øôñî ìù úëøòî úìáâîì äòâä"
-#: io.c:936
+#: io.c:862
#, c-format
msgid "close of `%s' failed (%s)."
msgstr "`%s' úøéâñá (%s) äì÷ú"
-#: io.c:944
+#: io.c:870
msgid "too many pipes or input files open"
msgstr "úéðîæ-åá íéçåúô èì÷ éöá÷ åà (pipes) íé÷éôà éãî øúåé"
-#: io.c:967
+#: io.c:892
msgid "close: second argument must be `to' or `from'"
msgstr "`from' åà `to' úåéäì áééç `close' ìù éðùä èðîåâøàä"
-#: io.c:981
+#: io.c:909
#, c-format
msgid "close: `%.*s' is not an open file, pipe or co-process"
msgstr "ìéá÷î êéìäú åà çåúô ÷éôà ,çåúô õáå÷ åðéà `%.*s' :close"
-#: io.c:986
+#: io.c:914
msgid "close of redirection that was never opened"
msgstr "íìåòî äçúôð àìù äééðôä úøéâñ"
-#: io.c:1083
+#: io.c:1011
#, c-format
msgid "close: redirection `%s' not opened with `|&', second argument ignored"
msgstr "çðæåä éðùä èðîåâøàä ,`|&' é\"ò äçúôð àì `%s' äééðôä"
-#: io.c:1099
+#: io.c:1027
#, c-format
msgid "failure status (%d) on pipe close of `%s' (%s)"
msgstr "(%d äì÷ú ãå÷) `%s'-ì ÷éôà úøéâñá (%s) äì÷ú"
-#: io.c:1102
+#: io.c:1030
#, c-format
msgid "failure status (%d) on file close of `%s' (%s)"
msgstr "(%d äì÷ú ãå÷) `%s' õáå÷ úøéâñá (%s) äì÷ú"
-#: io.c:1122
+#: io.c:1050
#, c-format
msgid "no explicit close of socket `%s' provided"
msgstr "ùøåôîá øâñð àì (socket) `%s' ò÷ù"
-#: io.c:1125
+#: io.c:1053
#, c-format
msgid "no explicit close of co-process `%s' provided"
msgstr "ùøåôîá øâñð àì (co-process) `%s' ìéá÷î êéìäú"
-#: io.c:1128
+#: io.c:1056
#, c-format
msgid "no explicit close of pipe `%s' provided"
msgstr "ùøåôîá øâñð àì (pipe) `%s' ÷éôà"
-#: io.c:1131
+#: io.c:1059
#, c-format
msgid "no explicit close of file `%s' provided"
msgstr "ùøåôîá øâñð àì `%s' õáå÷"
-#: io.c:1159 io.c:1214 main.c:832 main.c:874
+#: io.c:1087 io.c:1142 main.c:823 main.c:865
#, c-format
msgid "error writing standard output (%s)"
msgstr "éð÷ú èìô õåøòì äáéúëá (%s) äì÷ú"
-#: io.c:1163 io.c:1219
+#: io.c:1091 io.c:1147
#, c-format
msgid "error writing standard error (%s)"
msgstr "éð÷ú úåàéâù õåøòì äáéúëá (%s) äì÷ú"
-#: io.c:1171
+#: io.c:1099
#, c-format
msgid "pipe flush of `%s' failed (%s)."
msgstr "`%s'-ì ÷éôà ìù õöåç ïå÷éøá (%s) äì÷ú"
-#: io.c:1174
+#: io.c:1102
#, c-format
msgid "co-process flush of pipe to `%s' failed (%s)."
msgstr "`%s'-ì ìéá÷î êéìäú ÷éôà ìù õöåç ïå÷éøá (%s) äì÷ú"
-#: io.c:1177
+#: io.c:1105
#, c-format
msgid "file flush of `%s' failed (%s)."
msgstr "`%s' ìù õáå÷ éðåúð õöåç ïå÷éøá (%s) äì÷ú"
-#: io.c:1292
+#: io.c:1219
#, fuzzy, c-format
msgid "local port %s invalid in `/inet'"
msgstr "`%s'-á äéåâù úéîå÷î äàéöé"
-#: io.c:1309
+#: io.c:1236
#, c-format
msgid "remote host and port information (%s, %s) invalid"
msgstr ""
-#: io.c:1344
+#: io.c:1276
msgid "/inet/raw client not ready yet, sorry"
msgstr "ïëåî íøè /inet/raw çå÷ì ,íéøòèöî"
-#: io.c:1347 io.c:1383
+#: io.c:1279 io.c:1320
msgid "only root may use `/inet/raw'."
msgstr "ãáìá root ùîúùîì øúåî `inet/raw'-á ùåîéù"
-#: io.c:1381
+#: io.c:1318
msgid "/inet/raw server not ready yet, sorry"
msgstr "ïëåî íøè /inet/raw úøù ,íéøòèöî"
-#: io.c:1477
+#: io.c:1417
#, c-format
msgid "no (known) protocol supplied in special filename `%s'"
msgstr "`%s' ãçåéî õáå÷ íùá ääåæî-éúìá åà øñç ìå÷åèåøô"
-#: io.c:1491
+#: io.c:1431
#, c-format
msgid "special file name `%s' is incomplete"
msgstr "íìù åðéà `%s' ãçåéî õáå÷"
-#: io.c:1506
+#: io.c:1447
msgid "must supply a remote hostname to `/inet'"
msgstr "`/inet' øåáò ÷çåøî çøàî-áùçî íù øéãâäì äáåç"
-#: io.c:1524
+#: io.c:1465
msgid "must supply a remote port to `/inet'"
msgstr "`/inet' øåáò ú÷çåøî äàéöé øéãâäì äáåç"
-#: io.c:1570
+#: io.c:1511
msgid "TCP/IP communications are not supported"
msgstr "TCP/IP úøåù÷úá äëéîú ïéà"
# This probably sounds nonsensical in Hebrew, but what can I do,
# given the original message text?
-#: io.c:1758
+#: io.c:1698
#, c-format
msgid "could not open `%s', mode `%s'"
msgstr "`%s' øåáò `%s' äìåòô ïôåà úçéúôá ïåìùë"
-#: io.c:1809
+#: io.c:1749
#, fuzzy, c-format
msgid "close of master pty failed (%s)"
msgstr "÷éôà úøéâñá (%s) äì÷ú"
-#: io.c:1811 io.c:1963 io.c:2114
+#: io.c:1751 io.c:1918 io.c:2075
#, c-format
msgid "close of stdout in child failed (%s)"
msgstr "úá-úéðëúá stdout úøéâñá (%s) äì÷ú"
-#: io.c:1814
+#: io.c:1754
#, fuzzy, c-format
msgid "moving slave pty to stdout in child failed (dup: %s)"
msgstr "úá-úéðëúá stdout-ì ÷éôà ìåôëùá (dup: %s) äì÷ú"
-#: io.c:1816 io.c:1968
+#: io.c:1756 io.c:1923
#, c-format
msgid "close of stdin in child failed (%s)"
msgstr "úá-úéðëúá stdin úøéâñá (%s) äì÷ú"
-#: io.c:1819
+#: io.c:1759
#, fuzzy, c-format
msgid "moving slave pty to stdin in child failed (dup: %s)"
msgstr "úá-úéðëúá stdin-ì ÷éôà ìåôëùá (dup: %s) äì÷ú"
-#: io.c:1821 io.c:1840
+#: io.c:1761 io.c:1782
#, fuzzy, c-format
msgid "close of slave pty failed (%s)"
msgstr "÷éôà úøéâñá (%s) äì÷ú"
-#: io.c:1914 io.c:1966 io.c:2095 io.c:2117
+#: io.c:1860 io.c:1921 io.c:2053 io.c:2078
#, c-format
msgid "moving pipe to stdout in child failed (dup: %s)"
msgstr "úá-úéðëúá stdout-ì ÷éôà ìåôëùá (dup: %s) äì÷ú"
-#: io.c:1918 io.c:1971
+#: io.c:1867 io.c:1926
#, c-format
msgid "moving pipe to stdin in child failed (dup: %s)"
msgstr "úá-úéðëúá stdin-ì ÷éôà ìåôëùá (dup: %s) äì÷ú"
-#: io.c:1935 io.c:2108
+#: io.c:1887 io.c:2068
msgid "restoring stdout in parent process failed\n"
msgstr "áà-úéðëúá stdout ÷éôà øåæçùá äì÷ú\n"
-#: io.c:1940
+#: io.c:1895
msgid "restoring stdin in parent process failed\n"
msgstr "áà-úéðëúá stdin ÷éôà øåæçùá äì÷ú\n"
-#: io.c:1974 io.c:2119 io.c:2130
+#: io.c:1929 io.c:2080 io.c:2094
#, c-format
msgid "close of pipe failed (%s)"
msgstr "÷éôà úøéâñá (%s) äì÷ú"
-#: io.c:2019
+#: io.c:1974
msgid "`|&' not supported"
msgstr "`|&'-á äëéîú ïéà"
-#: io.c:2085
+#: io.c:2040
#, c-format
msgid "cannot open pipe `%s' (%s)"
msgstr "`%s' ÷éôà úçéúôá (%s) äì÷ú"
-#: io.c:2126
+#: io.c:2088
#, c-format
msgid "cannot create child process for `%s' (fork: %s)"
msgstr "`%s' úá-úéðëúì êéìäú úøéöéá (fork: %s) äì÷ú"
-#: io.c:2518
+#: io.c:2577
#, c-format
msgid "data file `%s' is empty"
msgstr "÷éø åðéä `%s' íéðåúð õáå÷"
-#: io.c:2560 io.c:2568
+#: io.c:2618 io.c:2626
msgid "could not allocate more input memory"
msgstr ""
-#: io.c:3125
+#: io.c:3173
msgid "multicharacter value of `RS' is a gawk extension"
msgstr "gawk-ì úéôéöôñ äáçøä äðéä `RS' ìù êøòá íéåú øôñîá äëéîú"
-#: main.c:313
+#: main.c:311
msgid "out of memory"
-msgstr ""
+msgstr "ïåøëæä øîâð"
-#: main.c:381
+#: main.c:388
msgid "`-m[fr]' option irrelevant in gawk"
msgstr "gawk øåáò éèðååìø åðéà `-m[fr]' ïééôàî"
-#: main.c:383
+#: main.c:390
msgid "-m option usage: `-m[fr] nnn'"
msgstr "`-m[fr] nnn' :-m ïééôàîá ùåîéù ïôåà"
-#: main.c:419
+#: main.c:426
#, fuzzy
msgid "empty argument to `-e/--source' ignored"
msgstr "çðæåä `--source'-ì ÷éø èðîåâøà"
-#: main.c:485
+#: main.c:492
#, c-format
msgid "%s: option `-W %s' unrecognized, ignored\n"
msgstr "çðæåä ,%s úéðëú øåáò øëåî åðéà `-W %s' ïééôàî\n"
-#: main.c:530
+#: main.c:545
#, c-format
msgid "%s: option requires an argument -- %c\n"
msgstr "%s: èðîåâøà áééçî ïééôàî -- %c\n"
-#: main.c:551
+#: main.c:566
msgid "environment variable `POSIXLY_CORRECT' set: turning on `--posix'"
msgstr "`--posix' ìéòôî :øãâåî `POSIXLY_CORRECT' äáéáñ äðúùî"
-#: main.c:557
+#: main.c:572
msgid "`--posix' overrides `--traditional'"
msgstr "`--traditional' ìò øáåâ `--posix'"
-#: main.c:568
+#: main.c:583
msgid "`--posix'/`--traditional' overrides `--non-decimal-data'"
msgstr "`--non-decimal-data' ìò øáåâ `--posix'/`--traditional'"
-#: main.c:572
+#: main.c:587
#, c-format
msgid "running %s setuid root may be a security problem"
msgstr "òãéî úçèáàá òåâôì äìåìò setuid root-ë %s úöøä"
-#: main.c:577
+#: main.c:592
#, fuzzy
msgid "`--posix' overrides `--binary'"
msgstr "`--traditional' ìò øáåâ `--posix'"
-#: main.c:622
+#: main.c:643
#, fuzzy, c-format
msgid "can't set binary mode on stdin (%s)"
msgstr "stdin úìåòô ïôåà úòéá÷á (%s) äì÷ú"
-#: main.c:625
+#: main.c:646
#, fuzzy, c-format
msgid "can't set binary mode on stdout (%s)"
msgstr "stdout úìåòô ïôåà úòéá÷á (%s) äì÷ú"
-#: main.c:627
+#: main.c:648
#, fuzzy, c-format
msgid "can't set binary mode on stderr (%s)"
msgstr "stderr úìåòô ïôåà úòéá÷á (%s) äì÷ú"
-#: main.c:668
+#: main.c:687
msgid "no program text at all!"
msgstr "!ììë àöîðá äéä àì úéðëú ìù èñ÷è"
-#: main.c:773
+#: main.c:762
#, c-format
msgid "Usage: %s [POSIX or GNU style options] -f progfile [--] file ...\n"
msgstr ""
"%s [GNU åà POSIX ïåðâñá íéðééôàî] -f úéðëú-íù [--] õáå÷-íù ... :ùåîéù ïôåà\n"
-#: main.c:775
+#: main.c:764
#, c-format
msgid "Usage: %s [POSIX or GNU style options] [--] %cprogram%c file ...\n"
msgstr ""
"%s [GNU åà POSIX ïåðâñá íéðééôàî] [--] %cúéðëú%c õáå÷-íù ... :ùåîéù ïôåà\n"
-#: main.c:780
+#: main.c:769
#, fuzzy
msgid "POSIX options:\t\tGNU long options: (standard)\n"
msgstr ":POSIX éðééôàî\t\t:íéëåøà GNU éðééôàî\n"
-#: main.c:781
+#: main.c:770
msgid "\t-f progfile\t\t--file=progfile\n"
msgstr "\t-f úéðëú-õáå÷\t\t--file=úéðëú-õáå÷\n"
-#: main.c:782
+#: main.c:771
msgid "\t-F fs\t\t\t--field-separator=fs\n"
msgstr "\t-F úåãù-ãéøôî\t\t--field-separator=úåãù-ãéøôî\n"
-#: main.c:783
+#: main.c:772
msgid "\t-v var=val\t\t--assign=var=val\n"
msgstr "\t-v äðúùî=êøò\t\t--assign=äðúùî=êøò\n"
-#: main.c:784
+#: main.c:773
#, fuzzy
-msgid "POSIX options:\t\tGNU long options: (extensions)\n"
+msgid "Short options:\t\tGNU long options: (extensions)\n"
msgstr ":POSIX éðééôàî\t\t:íéëåøà GNU éðééôàî\n"
-#: main.c:785
+#: main.c:774
msgid "\t-m[fr] val\n"
msgstr "\t-m[fr] êøò\n"
-#: main.c:786
+#: main.c:775
msgid "\t-b\t\t\t--characters-as-bytes\n"
msgstr ""
-#: main.c:787
-msgid "\t-c\t\t\t--compat, --traditional\n"
-msgstr ""
+#: main.c:776
+#, fuzzy
+msgid "\t-c\t\t\t--traditional\n"
+msgstr "\t-W traditional\t\t--traditional\n"
-#: main.c:788
+#: main.c:777
#, fuzzy
-msgid "\t-C\t\t\t--copyleft, --copyright\n"
+msgid "\t-C\t\t\t--copyright\n"
msgstr "\t-W copyright\t\t--copyright\n"
-#: main.c:789
+#: main.c:778
#, fuzzy
msgid "\t-d [file]\t\t--dump-variables[=file]\n"
msgstr "\t-W dump-variables[=õáå÷-íù]\t--dump-variables[=õáå÷-íù]\n"
-#: main.c:790
+#: main.c:779
#, fuzzy
msgid "\t-e 'program-text'\t--source='program-text'\n"
msgstr "\t-W source=úéðëú-èñ÷è\t--source=úéðëú-èñ÷è\n"
-#: main.c:791
+#: main.c:780
#, fuzzy
msgid "\t-E file\t\t\t--exec=file\n"
msgstr "\t-W profile[=õáå÷-íù]\t--profile[=õáå÷-íù]\n"
-#: main.c:792
+#: main.c:781
#, fuzzy
msgid "\t-g\t\t\t--gen-pot\n"
msgstr "\t-W gen-po\t\t--gen-po\n"
-#: main.c:793
+#: main.c:782
#, fuzzy
-msgid "\t-h\t\t\t--help, --usage\n"
+msgid "\t-h\t\t\t--help\n"
msgstr "\t-W help\t\t\t--help\n"
-#: main.c:794
+#: main.c:783
#, fuzzy
-msgid "\t-l [fatal]\t\t--lint[=fatal]\n"
+msgid "\t-L [fatal]\t\t--lint[=fatal]\n"
msgstr "\t-W lint[=fatal]\t\t--lint[=fatal]\n"
-#: main.c:795
-#, fuzzy
-msgid "\t-L\t\t\t--lint-old\n"
-msgstr "\t-W lint-old\t\t--lint-old\n"
-
-#: main.c:796
+#: main.c:784
#, fuzzy
msgid "\t-n\t\t\t--non-decimal-data\n"
msgstr "\t-W non-decimal-data\t--non-decimal-data\n"
-#: main.c:797
+#: main.c:785
msgid "\t-N\t\t\t--use-lc-numeric\n"
msgstr ""
-#: main.c:798
+#: main.c:786
msgid "\t-O\t\t\t--optimize\n"
msgstr ""
-#: main.c:799
+#: main.c:787
#, fuzzy
msgid "\t-p [file]\t\t--profile[=file]\n"
msgstr "\t-W profile[=õáå÷-íù]\t--profile[=õáå÷-íù]\n"
-#: main.c:800
+#: main.c:788
#, fuzzy
msgid "\t-P\t\t\t--posix\n"
msgstr "\t-W posix\t\t--posix\n"
-#: main.c:801
+#: main.c:789
#, fuzzy
msgid "\t-r\t\t\t--re-interval\n"
msgstr "\t-W re-interval\t\t--re-interval\n"
-#: main.c:802
+#: main.c:791
#, fuzzy
+msgid "\t-R file\t\t\t--command=file\n"
+msgstr "\t-W profile[=õáå÷-íù]\t--profile[=õáå÷-íù]\n"
+
+#: main.c:792
msgid "\t-S\t\t\t--sandbox\n"
-msgstr "\t-W posix\t\t--posix\n"
+msgstr ""
+
+#: main.c:793
+#, fuzzy
+msgid "\t-t\t\t\t--lint-old\n"
+msgstr "\t-W lint-old\t\t--lint-old\n"
-#: main.c:803
+#: main.c:794
#, fuzzy
msgid "\t-V\t\t\t--version\n"
msgstr "\t-W version\t\t--version\n"
-#: main.c:805
+#: main.c:796
msgid "\t-W nostalgia\t\t--nostalgia\n"
msgstr "\t-W nostalgia\t\t--nostalgia\n"
-#: main.c:808
-msgid "\t-W parsedebug\t\t--parsedebug\n"
+#: main.c:799
+#, fuzzy
+msgid "\t-Y\t\t--parsedebug\n"
msgstr "\t-W parsedebug\t\t--parsedebug\n"
#. TRANSLATORS: --help output 5 (end)
@@ -1742,7 +1681,7 @@ msgstr "\t-W parsedebug\t\t--parsedebug\n"
#. for this application. Please add _another line_ with the
#. address for translation bugs.
#. no-wrap
-#: main.c:817
+#: main.c:808
msgid ""
"\n"
"To report bugs, see node `Bugs' in `gawk.info', which is\n"
@@ -1754,7 +1693,7 @@ msgstr ""
" .ñôãåîä êéøãîá `Reporting Problems and Bugs' ä÷ñô\n"
"\n"
-#: main.c:821
+#: main.c:812
msgid ""
"gawk is a pattern scanning and processing language.\n"
"By default it reads standard input and writes standard output.\n"
@@ -1763,7 +1702,7 @@ msgstr ""
".èñ÷è úåéðáú ìù ãåáéòå äé÷øñì äôù åðéä gawk\n"
".éð÷ú èìôì áúåëå éð÷ú èì÷ õåøò àøå÷ àåä ìãçî úøéøáë\n"
-#: main.c:825
+#: main.c:816
msgid ""
"Examples:\n"
"\tgawk '{ sum += $1 }; END { print sum }' file\n"
@@ -1773,8 +1712,8 @@ msgstr ""
"\tgawk '{ sum += $1 }; END { print sum }' file\n"
"\tgawk -F: '{ print $1 }' /etc/passwd\n"
-#: main.c:845
-#, c-format
+#: main.c:836
+#, fuzzy, c-format
msgid ""
"Copyright (C) 1989, 1991-%d Free Software Foundation.\n"
"\n"
@@ -1788,10 +1727,10 @@ msgstr ""
"\n"
"óåôëá äúåðùì åà/å äöéôäì íëúåëæ ;úéùôç äðëú äðéä åæ úéðëú\n"
" é\"ò øåàì àöåéä ,GNU General Public License ïåéùøä éàðúì\n"
-" íàå ,ïåéùøä ìù 3 àñøâá íà ;Free Software Foundation\n"
+" íàå ,ïåéùøä ìù 2 àñøâá íà ;Free Software Foundation\n"
" .øúåé úøçåàî àñøâ ìëá (íëì äøåîùä äéöôåàë)\n"
-#: main.c:853
+#: main.c:844
msgid ""
"This program is distributed in the hope that it will be useful,\n"
"but WITHOUT ANY WARRANTY; without even the implied warranty of\n"
@@ -1804,7 +1743,7 @@ msgstr ""
",íéèøôì .úîéåñî úéìëú åæéàì äîàúä åà úåøéçñ ìù\n"
" .GNU General Public License-á åðééò àðà\n"
-#: main.c:864
+#: main.c:855
#, fuzzy
msgid ""
"You should have received a copy of the GNU General Public License\n"
@@ -1812,65 +1751,65 @@ msgid ""
msgstr ""
";GNU General Public License ìù ÷úåòá äååìî úåéäì äøåîà åæ úéðëú\n"
"Free Software Foundation, Inc.-ì åáúë àðà ,åúåà íúìáé÷ àì íà\n"
-".51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA\n"
+".59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n"
-#: main.c:899
+#: main.c:890
msgid "-Ft does not set FS to tab in POSIX awk"
msgstr "awk ìù POSIX úñøâá TAB úåéäì FS-ì íøåâ åðéà -Ft"
-#: main.c:1116
+#: main.c:1122
#, c-format
msgid "unknown value for field spec: %d\n"
msgstr ""
-#: main.c:1176
+#: main.c:1182
#, c-format
msgid ""
"%s: `%s' argument to `-v' not in `var=value' form\n"
"\n"
msgstr ""
-#: main.c:1196
+#: main.c:1202
#, c-format
msgid "`%s' is not a legal variable name"
msgstr ""
-#: main.c:1199
+#: main.c:1205
#, c-format
msgid "`%s' is not a variable name, looking for file `%s=%s'"
msgstr ""
-#: main.c:1238
+#: main.c:1258
msgid "floating point exception"
msgstr "äôö äãå÷ð éáåùéçá äâéøç"
-#: main.c:1245
+#: main.c:1265
msgid "fatal error: internal error"
msgstr "úéîéðô äðëú úàéâù :äøåîç äì÷ú"
-#: main.c:1260
+#: main.c:1280
#, fuzzy
msgid "fatal error: internal error: segfault"
msgstr "úéîéðô äðëú úàéâù :äøåîç äì÷ú"
-#: main.c:1272
+#: main.c:1292
#, fuzzy
msgid "fatal error: internal error: stack overflow"
msgstr "úéîéðô äðëú úàéâù :äøåîç äì÷ú"
# FIXME: I wonder how many people will understand what "fd 2" means.
-#: main.c:1322
+#: main.c:1342
#, c-format
msgid "no pre-opened fd %d"
msgstr "ùàøî çåúô åðéà %d èìô/èì÷ õåøò"
# FIXME: /dev/null might not be known to all.
-#: main.c:1329
+#: main.c:1349
#, c-format
msgid "could not pre-open /dev/null for fd %d"
msgstr "/dev/null-ì %d èìô/èì÷ õåøò çåúôì ïúéð àì"
-#: main.c:1352 main.c:1361
+#: main.c:1372 main.c:1381
#, c-format
msgid "could not find groups: %s"
msgstr "%s :úëøòîá íéùîúùî úåöåá÷ ìò òãéî ïéà"
@@ -1879,131 +1818,97 @@ msgstr "%s :úëøòîá íéùîúùî úåöåá÷ ìò òãéî ïéà"
# message after "warning:", "error:", etc., which will look terribly
# wrong if both these headings and the message text after them is in
# Hebrew, due to changed directionality.
-#: msg.c:54
+#: msg.c:62
#, c-format
msgid "cmd. line:"
msgstr "cmd. line:"
-#: msg.c:120
+#: msg.c:97
msgid "warning: "
msgstr "warning: "
-#: msg.c:142
+#: msg.c:106
msgid "error: "
msgstr "error: "
-#: msg.c:178
+#: msg.c:129
msgid "fatal: "
msgstr "fatal: "
-#: node.c:63 node.c:78 node.c:105 node.c:121 node.c:151
-msgid "can't convert string to float"
-msgstr "øôñîì äøîäì úðúéð äðéà úæåøçî"
-
-#: node.c:465
+#: node.c:401
msgid "backslash at end of string"
msgstr "úæåøçî óåñá êåôä ïñëåì"
-#: node.c:609
+#: node.c:502
#, fuzzy, c-format
msgid "old awk does not support the `\\%c' escape sequence"
msgstr "`**' øåèøôåàá êîåú åðéà ïùé awk"
-#: node.c:660
+#: node.c:553
msgid "POSIX does not allow `\\x' escapes"
msgstr "`\\x' âåñî äø÷á úåøãñ äùøî åðéà POSIX ï÷ú"
-#: node.c:666
+#: node.c:559
msgid "no hex digits in `\\x' escape sequence"
msgstr "`\\x' äø÷á úøãñá úåéìîéöãñ÷ä úåøôñá ùîúùäì ïéà"
-#: node.c:688
+#: node.c:581
#, c-format
msgid ""
"hex escape \\x%.*s of %d characters probably not interpreted the way you "
"expect"
msgstr ""
-#: node.c:703
+#: node.c:596
#, c-format
msgid "escape sequence `\\%c' treated as plain `%c'"
msgstr "éìåìéî åúë ìôåè `\\%c' äø÷á úøãñá `%c' åú"
+#: node.c:737
+msgid ""
+"Invalid multibyte data detected. There may be a mismatch between your data "
+"and your locale."
+msgstr ""
+
#: posix/gawkmisc.c:172
#, c-format
msgid "%s %s `%s': could not set close-on-exec: (fcntl: %s)"
msgstr "%s %s `%s' øåáò close-on-exec ïééôàî úìòôäá (fcntl: %s) äì÷ú"
-#: profile.c:94
+#: profile.c:83
#, c-format
msgid "could not open `%s' for writing: %s"
msgstr "äáéúë êøåöì `%s' úçéúô úòá (%s) äì÷ú"
-#: profile.c:457
+#: profile.c:203
#, fuzzy, c-format
-msgid "internal error: %s with null vname"
-msgstr "ñôåàî åìù vname-äù Node_var :úéîéðô äðëú úàéâù"
-
-#: profile.c:522
-msgid "# treated internally as `delete'"
-msgstr ""
-
-#: profile.c:1076
-#, c-format
-msgid "# this is a dynamically loaded extension function"
-msgstr ""
-
-#: profile.c:1109
-#, c-format
-msgid "\t# gawk profile, created %s\n"
-msgstr "\t# %s êéøàúî gawk ìù ìéôåøô\n"
-
-#: profile.c:1112
-#, c-format
msgid ""
-"\t# BEGIN block(s)\n"
+"\t# %s block(s)\n"
"\n"
msgstr ""
-"\t# BEGIN ÷åìá\n"
+"\t# END ÷åìá\n"
"\n"
-#: profile.c:1122
+#: profile.c:208
#, fuzzy, c-format
msgid ""
-"\t# BEGINFILE block(s)\n"
-"\n"
-msgstr ""
-"\t# BEGIN ÷åìá\n"
-"\n"
-
-#: profile.c:1132
-#, c-format
-msgid ""
-"\t# Rule(s)\n"
+"\t# %s(s)\n"
"\n"
msgstr ""
"\t# (íé)ììë\n"
"\n"
-#: profile.c:1138
+#: profile.c:278
#, fuzzy, c-format
-msgid ""
-"\t# ENDFILE block(s)\n"
-"\n"
-msgstr ""
-"\t# END ÷åìá\n"
-"\n"
+msgid "internal error: %s with null vname"
+msgstr "ñôåàî åìù vname-äù Node_var :úéîéðô äðëú úàéâù"
-#: profile.c:1148
+#: profile.c:945
#, c-format
-msgid ""
-"\t# END block(s)\n"
-"\n"
-msgstr ""
-"\t# END ÷åìá\n"
-"\n"
+msgid "\t# gawk profile, created %s\n"
+msgstr "\t# %s êéøàúî gawk ìù ìéôåøô\n"
-#: profile.c:1168
+#: profile.c:1328
#, c-format
msgid ""
"\n"
@@ -2012,17 +1917,12 @@ msgstr ""
"\n"
"\t# úéá-óìà øãñá ,úåéö÷ðåô\n"
-#: profile.c:1431
+#: profile.c:1367
#, c-format
-msgid "unexpected type %s in prec_level"
-msgstr "prec_level-á %s éåâù âåñ"
-
-#: profile.c:1557
-#, fuzzy, c-format
-msgid "Unknown node type %s in pp_var"
-msgstr "%d ääåæî-éúìá âåñ ìòá node"
+msgid "redir2str: unknown redirection type %d"
+msgstr ""
-#: re.c:537
+#: re.c:559
#, c-format
msgid "regexp component `%.*s' should probably be `[%.*s]'"
msgstr ""
@@ -2095,20 +1995,40 @@ msgstr "éãî áëøåî åà ìåãâ éøìåâø éåèéá"
msgid "Unmatched ) or \\)"
msgstr "âåæ-ïá åì ïéàù \\) åà )"
-#: regcomp.c:699
+#: regcomp.c:701
msgid "No previous regular expression"
msgstr "íãå÷ éøìåâø éåèéá ïéà"
-# "Illegal" is against GNU coding standards, but since Posix requires
-# it (see the comment below), let's say that in Hebrew as well...
-#~ msgid "%s: illegal option -- %c\n"
-#~ msgstr "%s: é÷åç-éúìá ïééôàî -- %c\n"
+#~ msgid "call of `length' without parentheses is deprecated by POSIX"
+#~ msgstr "POSIX ï÷úì ãåâéðá äðéä íééøâåñ àìì `length'-ì äàéø÷"
+
+#, fuzzy
+#~ msgid "reference to uninitialized field `$%s'"
+#~ msgstr "`%s' ìçåúî-éúìá äðúùîì äéðôä"
+
+#~ msgid "can't convert string to float"
+#~ msgstr "øôñîì äøîäì úðúéð äðéà úæåøçî"
+
+#~ msgid "`continue' outside a loop is not portable"
+#~ msgstr "éìéáèøåô åðéà äàìåìì õåçî `continue'"
+
+#~ msgid "`break' outside a loop is not portable"
+#~ msgstr "éìéáèøåô åðéà äàìåìì õåçî `break'"
+
+#~ msgid "`nextfile' cannot be called from a BEGIN rule"
+#~ msgstr "BEGIN éììë êåúî `nextfile'-ì àåø÷ì ïéà"
+
+#~ msgid "`next' cannot be called from a BEGIN rule"
+#~ msgstr "BEGIN éììë êåúî `next'-ì àåø÷ì ïéà"
#~ msgid "file `%s' is a directory"
#~ msgstr "äé÷éú åðéä `%s' õáå÷"
-#~ msgid "can't open two way socket `%s' for input/output (%s)"
-#~ msgstr "èìô/èì÷ êøåöì éðååéë-åã (socket) ò÷ùë `%s' úçéúôá (%s) äì÷ú"
+#~ msgid "use `PROCINFO[\"%s\"]' instead of `%s'"
+#~ msgstr "`PROCINFO[\"%s\"]'-á ùîúùäì óéãò `%s' íå÷îá"
+
+#~ msgid "use `PROCINFO[...]' instead of `/dev/user'"
+#~ msgstr "`/dev/user' éðô-ìò óéãò `PROCINFO[...]'-á ùåîéù"
#~ msgid "\t-W compat\t\t--compat\n"
#~ msgstr "\t-W compat\t\t--compat\n"
@@ -2116,75 +2036,108 @@ msgstr "íãå÷ éøìåâø éåèéá ïéà"
#~ msgid "\t-W copyleft\t\t--copyleft\n"
#~ msgstr "\t-W copyleft\t\t--copyleft\n"
-#~ msgid "\t-W traditional\t\t--traditional\n"
-#~ msgstr "\t-W traditional\t\t--traditional\n"
-
#~ msgid "\t-W usage\t\t--usage\n"
#~ msgstr "\t-W usage\t\t--usage\n"
-#, fuzzy
-#~ msgid "seek: invalid arguments"
-#~ msgstr "èðîåâøà óà ïéà :printf"
+#~ msgid ""
+#~ "\t# BEGIN block(s)\n"
+#~ "\n"
+#~ msgstr ""
+#~ "\t# BEGIN ÷åìá\n"
+#~ "\n"
-#, fuzzy
-#~ msgid "seek: `%.*s' is not an open file, pipe, or co-process"
-#~ msgstr "ìéá÷î êéìäú åà çåúô ÷éôà ,çåúô õáå÷ åðéà `%.*s' :close"
+#~ msgid "must use `count$' on all formats or none"
+#~ msgstr "ãçà óàá åà íéèîøåôä ìëá åà øúåî `count$'-á ùåîéù"
+
+#~ msgid "`$' is not permitted in awk formats"
+#~ msgstr "awk ìù íéèîøåôá ùåîéùì øåñà `$'"
+
+#~ msgid "arg count with `$' must be > 0"
+#~ msgstr "0-î ìåãâ úåéäì áééç `$' ãéì èðîåâøàä äðåî"
#, fuzzy
-#~ msgid "seek: `%.*s' is not an input file, pipe, or co-process"
-#~ msgstr "ìéá÷î êéìäú åà çåúô ÷éôà ,çåúô õáå÷ åðéà `%.*s' :close"
+#~ msgid "arg count %ld greater than total number of supplied arguments"
+#~ msgstr "íéèðîåâøàä ìù ììåëä íøôñîî ìåãâ %d èðîåâøàä äðåî"
-#~ msgid "use `PROCINFO[\"%s\"]' instead of `%s'"
-#~ msgstr "`PROCINFO[\"%s\"]'-á ùîúùäì óéãò `%s' íå÷îá"
+#~ msgid "`$' not permitted after period in format"
+#~ msgstr "èîøåôá äãå÷ðä éøçà òéôåäì ìåëé åðéà `$'"
-#~ msgid "use `PROCINFO[...]' instead of `/dev/user'"
-#~ msgstr "`/dev/user' éðô-ìò óéãò `PROCINFO[...]'-á ùåîéù"
+#~ msgid "no `$' supplied for positional field width or precision"
+#~ msgstr "å÷åéã åà äãù áçåø ïééöîá èðîåâøàä äðåî øåáò `$' àöîð àì"
-#~ msgid "field %d in FIELDWIDTHS, must be > 0"
-#~ msgstr "0-î ìåãâ úåéäì áééç FIELDWIDTHS-á %d 'ñî äãù"
+#~ msgid "`l' is meaningless in awk formats; ignored"
+#~ msgstr "çðæåä ;awk ìù èîøåôá úåòîùî øñç åðéä `l'"
-#, fuzzy
-#~ msgid "or used as a variable or an array"
-#~ msgstr "êøòî åà äðúùîë `%s' äéö÷ðåô íùá ùîúùäì ïéà"
+#~ msgid "`l' is not permitted in POSIX awk formats"
+#~ msgstr "POSIX éô-ìò awk ìù èîøåôá òéôåäì ìåëé åðéà `l'"
-#~ msgid "regex match failed, not enough memory to match string \"%.*s%s\""
-#~ msgstr ""
-#~ "\"%.*s%s\" úæåøçî úîàúäì ïåøëæ éã ïéà ,ìùëð éøìåâø éåèéáì äîàúä ùåôéç"
+#~ msgid "`L' is meaningless in awk formats; ignored"
+#~ msgstr "çðæåä ;awk ìù èîøåôá úåòîùî øñç åðéä `L'"
-#, fuzzy
-#~ msgid "substr: length %g is < 0"
-#~ msgstr "0-î ìåãâ øôñî åððéà %g êøåà :substr"
+#~ msgid "`L' is not permitted in POSIX awk formats"
+#~ msgstr "POSIX éô-ìò awk ìù èîøåôá òéôåäì ìåëé åðéà `L'"
-#~ msgid "delete: illegal use of variable `%s' as array"
-#~ msgstr "êøòîë `%s' äðúùîá éåâù ùåîéù :delete"
+#~ msgid "`h' is meaningless in awk formats; ignored"
+#~ msgstr "çðæåä ;awk ìù èîøåôá úåòîùî øñç åðéä `h'"
-#, fuzzy
-#~ msgid "%s: gvar_ref to %s\n"
-#~ msgstr "%s: %s-ì (array_ref) äéðôä\n"
+#~ msgid "`h' is not permitted in POSIX awk formats"
+#~ msgstr "POSIX éô-ìò awk ìù èîøåôá òéôåäì ìåëé åðéà `h'"
+
+#~ msgid "not enough arguments to satisfy format string"
+#~ msgstr "èîøåôä øåáò íéèðîåâøà ÷éôñî ïéà"
+
+#~ msgid "^ ran out for this one"
+#~ msgstr "^ íéèðîåâøàä éì åøîâð ïàë"
-#~ msgid "asort: first argument is not an array"
-#~ msgstr "êøòî åðéà ïåùàø èðîåâøà :asort"
+#~ msgid "[s]printf: format specifier does not have control letter"
+#~ msgstr "äøîää úø÷á úåà ìéëî åðéà èîøåôä :[s]printf"
-#~ msgid "asort: second argument is not an array"
-#~ msgstr "êøòî åðéà éðù èðîåâøà :asort"
+#~ msgid "too many arguments supplied for format string"
+#~ msgstr "èîøåôä øåáò íéèðîåâøà éãî øúåé"
#, fuzzy
+#~ msgid "attempt to use array parameter `%s' in a scalar context"
+#~ msgstr "øàì÷ñ ùøåãä èñ÷èðå÷á `%s' êøòîá ùåîéù ïåéñð"
+
+#~ msgid "can't open two way socket `%s' for input/output (%s)"
+#~ msgstr "èìô/èì÷ êøåöì éðååéë-åã (socket) ò÷ùë `%s' úçéúôá (%s) äì÷ú"
+
#~ msgid ""
-#~ "attempt to use array parameter `%s' that was passed from global scalar `%"
-#~ "s'"
-#~ msgstr "êøòî äéä åìéàë `%s' éøì÷ñ øèîøôá ùåîéù ïåéñð"
+#~ "concatenation: side effects in one expression have changed the length of "
+#~ "another!"
+#~ msgstr ""
+#~ "!øçà éåèéá ìù åëøåà éåðéùì åîøâ ãçà éåèéá áåùéç ìù éàåì-úåòôåú :"
+#~ "concatenation"
-#~ msgid "internal error: Node_var_array with null vname"
-#~ msgstr "ñôåàî åìù vname-äù Node_var_array :úéîéðô äðëú úàéâù"
+#~ msgid "illegal type (%s) in tree_eval"
+#~ msgstr "tree_eval-á (%s) éåâù âåñ"
-#~ msgid "BEGIN blocks must have an action part"
-#~ msgstr "äìåòô úøãâä ìåìëì áééç BEGIN ÷åìá"
+#~ msgid "\t# -- main --\n"
+#~ msgstr "\t# -- main --\n"
-#~ msgid "`nextfile' used in BEGIN or END action"
-#~ msgstr "END åà BEGIN ìù äìåòô úøãâäá `nextfile'-á ùåîéù"
+#~ msgid "invalid tree type %s in redirect()"
+#~ msgstr "redirect() äéö÷ðåôá %s éåâù õò âåñ"
-#~ msgid "gsub third parameter is not a changeable object"
-#~ msgstr "éåðéù-øá è÷ééáåà åðéà `gsub' ìù éùéìù èðîåâøà"
+#~ msgid "unexpected type %s in prec_level"
+#~ msgstr "prec_level-á %s éåâù âåñ"
+
+#, fuzzy
+#~ msgid "Unknown node type %s in pp_var"
+#~ msgstr "%d ääåæî-éúìá âåñ ìòá node"
+
+# "Illegal" is against GNU coding standards, but since Posix requires
+# it (see the comment below), let's say that in Hebrew as well...
+#~ msgid "%s: illegal option -- %c\n"
+#~ msgstr "%s: é÷åç-éúìá ïééôàî -- %c\n"
+
+#~ msgid "delete: illegal use of variable `%s' as array"
+#~ msgstr "êøòîë `%s' äðúùîá éåâù ùåîéù :delete"
+
+#~ msgid "invalid syntax in name `%s' for variable assignment"
+#~ msgstr "êøò úîùäá `%s' äðúùî íù ìù éåâù øéáçú"
+
+#~ msgid "internal error: Node_var_array with null vname"
+#~ msgstr "ñôåàî åìù vname-äù Node_var_array :úéîéðô äðëú úàéâù"
#~ msgid "or used in other expression context"
#~ msgstr "øçà éåèéá ìù èñ÷èðå÷á äá ùåîéù åà"
@@ -2192,12 +2145,21 @@ msgstr "íãå÷ éøìåâø éåèéá ïéà"
#~ msgid "`%s' is a function, assignment is not allowed"
#~ msgstr "äøåñà äá êøò úîùä ,äéö÷ðåô àéä `%s'"
+#~ msgid "BEGIN blocks must have an action part"
+#~ msgstr "äìåòô úøãâä ìåìëì áééç BEGIN ÷åìá"
+
+#~ msgid "`nextfile' used in BEGIN or END action"
+#~ msgstr "END åà BEGIN ìù äìåòô úøãâäá `nextfile'-á ùåîéù"
+
#~ msgid "non-redirected `getline' undefined inside BEGIN or END action"
#~ msgstr "END åà BEGIN úìåòô êåúá øãâåî åðéà äééðôä àìì `getline'"
#~ msgid "fptr %x not in tokentab\n"
#~ msgstr "tokentab-á àöîð àì fptr %x\n"
+#~ msgid "gsub third parameter is not a changeable object"
+#~ msgstr "éåðéù-øá è÷ééáåà åðéà `gsub' ìù éùéìù èðîåâøà"
+
#~ msgid "Unbalanced ["
#~ msgstr "âåæ-ïá åì ïéàù ["
@@ -2219,11 +2181,15 @@ msgstr "íãå÷ éøìåâø éåèéá ïéà"
#~ msgid "Unbalanced )"
#~ msgstr "âåæ-ïá åì ïéàù )"
+#~ msgid "field %d in FIELDWIDTHS, must be > 0"
+#~ msgstr "0-î ìåãâ úåéäì áééç FIELDWIDTHS-á %d 'ñî äãù"
+
#~ msgid "function %s called\n"
#~ msgstr "`%s' äéö÷ðåôì äàéø÷\n"
-#~ msgid "remote port invalid in `%s'"
-#~ msgstr "`%s'-á äéåâù ú÷çåøî äàéöé"
-
#~ msgid "internal error: file `%s', line %d\n"
#~ msgstr "`%s' õáå÷ ìù %d äøåùá úéîéðô äðëú äàéâù\n"
+
+#~ msgid "regex match failed, not enough memory to match string \"%.*s%s\""
+#~ msgstr ""
+#~ "\"%.*s%s\" úæåøçî úîàúäì ïåøëæ éã ïéà ,ìùëð éøìåâø éåèéáì äîàúä ùåôéç"
diff --git a/po/id.gmo b/po/id.gmo
index 034ba88f..02e953b8 100644
--- a/po/id.gmo
+++ b/po/id.gmo
Binary files differ
diff --git a/po/id.po b/po/id.po
index 844320c6..e08228eb 100644
--- a/po/id.po
+++ b/po/id.po
@@ -5,418 +5,495 @@
#
msgid ""
msgstr ""
-"Project-Id-Version: gawk 3.1.7\n"
+"Project-Id-Version: gawk 3.1.6e\n"
"Report-Msgid-Bugs-To: arnold@skeeve.com\n"
-"POT-Creation-Date: 2010-11-12 12:20+0200\n"
-"PO-Revision-Date: 2009-12-23 07:30+0700\n"
+"POT-Creation-Date: 2010-11-17 08:48+0200\n"
+"PO-Revision-Date: 2009-07-11 14:00+0700\n"
"Last-Translator: Arif E. Nugroho <arif_endro@yahoo.com>\n"
"Language-Team: Indonesian <translation-team-id@lists.sourceforge.net>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=ISO-8859-1\n"
"Content-Transfer-Encoding: 8bit\n"
-#: array.c:112
+#: array.c:103
+#, c-format
+msgid "from %s"
+msgstr "dari %s"
+
+#: array.c:267
+#, fuzzy
+msgid "attempt to use a scalar value as array"
+msgstr "mencoba untuk menggunakan skalar `%s' sebagai sebuah array"
+
+#: array.c:270
#, c-format
msgid "attempt to use function `%s' as an array"
msgstr "mencoba untuk menggunakan fungsi `%s' sebagai sebuah array"
-#: array.c:115
+#: array.c:273
#, c-format
msgid "attempt to use scalar parameter `%s' as an array"
msgstr "mencoba untuk menggunakan parameter `%s' sebagai sebuah array"
-#: array.c:118
+#: array.c:276
#, c-format
msgid "attempt to use scalar `%s' as array"
msgstr "mencoba untuk menggunakan skalar `%s' sebagai sebuah array"
-#: array.c:156
+#: array.c:321 array.c:648 eval.c:1075 eval.c:1079 eval.c:1581 eval.c:1649
+#: eval.c:1928
#, c-format
-msgid "from %s"
-msgstr "dari %s"
+msgid "attempt to use array `%s' in a scalar context"
+msgstr "mencoba menggunakan array `%s' dalam sebuah konteks skalar"
-#: array.c:513
+#: array.c:570
#, fuzzy, c-format
msgid "reference to uninitialized element `%s[\"%.*s\"]'"
msgstr "referensi ke elemen tidak terinisialisasi `%s[\"%s\"]'"
-#: array.c:519
+#: array.c:576
#, c-format
msgid "subscript of array `%s' is null string"
msgstr "subscript dari array `%s' adalah string null"
-#: array.c:623
+#: array.c:684
#, c-format
msgid "delete: index `%s' not in array `%s'"
msgstr "delete: indeks `%s' tidak dalam array `%s'"
-#: array.c:792
+#: array.c:705
+#, fuzzy, c-format
+msgid "attempt to use scalar `%s[\"%.*s\"]' as an array"
+msgstr "mencoba untuk menggunakan skalar `%s' sebagai sebuah array"
+
+#: array.c:868
#, c-format
msgid "%s: empty (null)\n"
msgstr "%s: kosong (null)\n"
-#: array.c:797
+#: array.c:873
#, c-format
msgid "%s: empty (zero)\n"
msgstr "%s: kosong (nol)\n"
-#: array.c:801
+#: array.c:877
#, c-format
msgid "%s: table_size = %d, array_size = %d\n"
msgstr "%s: table_size = %d, array_size = %d\n"
-#: array.c:830
+#: array.c:912
#, c-format
msgid "%s: is parameter\n"
msgstr "%s: adalah parameter\n"
-#: array.c:835
+#: array.c:916
#, c-format
msgid "%s: array_ref to %s\n"
msgstr "%s: array_ref ke %s\n"
-#: awkgram.y:224 awkgram.y:227
+#: array.c:921
+#, fuzzy
+msgid "adump: argument not an array"
+msgstr "match: argumen ketiga bukan sebuah array"
+
+#: array.c:1139
+#, fuzzy
+msgid "attempt to use array in a scalar context"
+msgstr "mencoba menggunakan array `%s' dalam sebuah konteks skalar"
+
+#: array.c:1236
+#, fuzzy
+msgid "asort: second argument not an array"
+msgstr "split: argumen kedua bukan sebuah array"
+
+#: array.c:1237
+#, fuzzy
+msgid "asorti: second argument not an array"
+msgstr "split: argumen kedua bukan sebuah array"
+
+#: array.c:1245
+#, fuzzy
+msgid "asort: first argument not an array"
+msgstr "match: argumen ketiga bukan sebuah array"
+
+#: array.c:1246
+#, fuzzy
+msgid "asorti: first argument not an array"
+msgstr "match: argumen ketiga bukan sebuah array"
+
+#: awkgram.y:246
#, c-format
msgid "%s blocks must have an action part"
msgstr "%s blok harus memiliki sebuah bagian aksi"
-#: awkgram.y:230
+#: awkgram.y:249
msgid "each rule must have a pattern or an action part"
msgstr "setiap aturan harus memiliki sebuah pola atau sebuah bagian aksi"
-#: awkgram.y:266 awkgram.y:275
+#: awkgram.y:320 awkgram.y:330
msgid "old awk does not support multiple `BEGIN' or `END' rules"
msgstr "awk lama tidak mendukung multiple aturan `BEGIN' atau `END'"
-#: awkgram.y:304
+#: awkgram.y:367
#, c-format
msgid "`%s' is a built-in function, it cannot be redefined"
msgstr "`%s' adalah sebuah fungsi bawaan, ini tidak dapat di redefinisi"
-#: awkgram.y:350
+#: awkgram.y:427
msgid "regexp constant `//' looks like a C++ comment, but is not"
msgstr "konstanta regexp `//' tampak seperti sebuah komentar C++, tetapi bukan"
-#: awkgram.y:353
+#: awkgram.y:430
#, c-format
msgid "regexp constant `/%s/' looks like a C comment, but is not"
msgstr "konstanta regexp `/%s/' tampak seperti sebuah komentar C, tetapi bukan"
-#: awkgram.y:380 awkgram.y:692
-msgid "statement may have no effect"
-msgstr "pernyataan mungkin tidak memiliki pengaruh"
+#: awkgram.y:735
+#, fuzzy
+msgid "`break' is not allowed outside a loop or switch"
+msgstr "`break' diluar sebuah loop tidak diijinkan"
-#: awkgram.y:477 awkgram.y:480 awkgram.y:504 awkgram.y:511 awkgram.y:518
-#, c-format
-msgid "`%s' used in %s action"
+#: awkgram.y:744
+#, fuzzy
+msgid "`continue' is not allowed outside a loop"
+msgstr "`continue' diluar sebuah loop tidak diijinkan"
+
+#: awkgram.y:753
+#, fuzzy, c-format
+msgid "`next' used in %s action"
msgstr "`%s' digunakan dalam aksi %s"
-#: awkgram.y:495 awkgram.y:499
+#: awkgram.y:767 awkgram.y:771
msgid "`nextfile' is a gawk extension"
msgstr "`nextfile' adalah sebuah ekstensi gawk"
-#: awkgram.y:528
+#: awkgram.y:775
+#, fuzzy, c-format
+msgid "`nextfile' used in %s action"
+msgstr "`%s' digunakan dalam aksi %s"
+
+#: awkgram.y:799
msgid "`return' used outside function context"
msgstr "`return' digunakan diluar konteks fungsi"
-#: awkgram.y:570
+#: awkgram.y:859
msgid "plain `print' in BEGIN or END rule should probably be `print \"\"'"
msgstr ""
"plain `print' dalam aturan BEGIN atau AKHIR seharusnya berupa `print \"\"'"
-#: awkgram.y:586 awkgram.y:594
+#: awkgram.y:927 awkgram.y:935
msgid "`delete array' is a gawk extension"
msgstr "`delete array' adalah sebuah ekstensi gawk"
-#: awkgram.y:608 awkgram.y:616
+#: awkgram.y:955 awkgram.y:963
msgid "`delete(array)' is a non-portable tawk extension"
msgstr "`delete(array)' adalah sebuah ekstensi tidak portabel tawk"
-#: awkgram.y:660
+#: awkgram.y:1004
#, c-format
msgid "duplicate case values in switch body: %s"
msgstr "duplikasi nilai case dalam tubuh switch: %s"
-#: awkgram.y:670
-msgid "Duplicate `default' detected in switch body"
+#: awkgram.y:1014
+#, fuzzy
+msgid "duplicate `default' detected in switch body"
msgstr "Duplikasi `default' terdeteksi dalam tubuh switch"
-#: awkgram.y:759
+#: awkgram.y:1151
msgid "multistage two-way pipelines don't work"
msgstr "multi tahap dua jalur pipe lines tidak bekerja"
-#: awkgram.y:850
+#: awkgram.y:1253
msgid "regular expression on right of assignment"
msgstr "ekspresi regular di penempatan kanan"
-#: awkgram.y:860
+#: awkgram.y:1263
msgid "regular expression on left of `~' or `!~' operator"
msgstr "ekspresi regular di kiri dari operator `~' atau `!~'"
-#: awkgram.y:866 awkgram.y:954
+#: awkgram.y:1278 awkgram.y:1423
msgid "old awk does not support the keyword `in' except after `for'"
msgstr "awk lama tidak mendukung kata kunci `in' kecuali setelah `for'"
-#: awkgram.y:872
+#: awkgram.y:1287
msgid "regular expression on right of comparison"
msgstr "ekspresi regular di kanan dari perbandingan"
-#: awkgram.y:936
+#: awkgram.y:1399
#, c-format
-msgid "`getline var' invalid inside %s rule"
+msgid "`getline var' invalid inside `%s' rule"
msgstr ""
-#: awkgram.y:939
+#: awkgram.y:1401
#, c-format
-msgid "`getline' invalid inside %s rule"
+msgid "`getline' invalid inside `%s' rule"
msgstr ""
-#: awkgram.y:944
+#: awkgram.y:1407
msgid "non-redirected `getline' undefined inside END action"
msgstr "tidak terdireksi `getline' tidak terdefinisi didalam aksi END"
-#: awkgram.y:955
+#: awkgram.y:1424
msgid "old awk does not support multidimensional arrays"
msgstr "awk lama tidak mendukung array multi dimensi"
-#: awkgram.y:1001
+#: awkgram.y:1528
msgid "call of `length' without parentheses is not portable"
msgstr "panggilan dari `length' tanpa tanda kurung tidak portabel"
-#: awkgram.y:1006
-msgid "call of `length' without parentheses is deprecated by POSIX"
-msgstr ""
-"panggilan dari `length' tanpa tanda kurung sudah ditinggalkan oleh POSIX"
-
-#: awkgram.y:1051
+#: awkgram.y:1591
#, fuzzy
msgid "indirect function calls are a gawk extension"
-msgstr "`extension' adalah sebuah ekstensi gawk"
+msgstr "`nextfile' adalah sebuah ekstensi gawk"
-#: awkgram.y:1084
-msgid "use of non-array as array"
-msgstr "penggunaan dari bukan array sebagai array"
+#: awkgram.y:1605
+#, fuzzy, c-format
+msgid "can not use special variable `%s' for indirect function call"
+msgstr ""
+"fungsi `%s': tidak dapat menggunakan variabel `%s' sebagai fungsi parameter"
-#: awkgram.y:1087
+#: awkgram.y:1682
msgid "invalid subscript expression"
msgstr "ekspresi subscript tidak valid"
-#: awkgram.y:1329
+#: awkgram.y:1722
+msgid "use of non-array as array"
+msgstr "penggunaan dari bukan array sebagai array"
+
+#: awkgram.y:1993
msgid "unexpected newline or end of string"
msgstr "tidak terduga baris baru atau akhir dari string"
-#: awkgram.y:1446
-msgid "empty program text on command line"
-msgstr "aplikasi teks kosong di baris perintah"
-
-#: awkgram.y:1502
+#: awkgram.y:2248 awkgram.y:2296 awkgram.y:2470
#, c-format
msgid "can't open source file `%s' for reading (%s)"
msgstr "tidak dapat membuka berkas sumber `%s' untuk pembacaan (%s)"
-#: awkgram.y:1600
+#: awkgram.y:2249 awkgram.y:2297 builtin.c:122
+msgid "reason unknown"
+msgstr "alasan tidak diketahui"
+
+#: awkgram.y:2257
+#, fuzzy, c-format
+msgid "already included source file `%s'"
+msgstr "tidak dapat membaca berkas sumber `%s' (%s)"
+
+#: awkgram.y:2281
+#, fuzzy
+msgid "@include is a gawk extension"
+msgstr "`nextfile' adalah sebuah ekstensi gawk"
+
+#: awkgram.y:2288
+msgid "empty filename after @include"
+msgstr ""
+
+#: awkgram.y:2422
+msgid "empty program text on command line"
+msgstr "aplikasi teks kosong di baris perintah"
+
+#: awkgram.y:2537
#, c-format
msgid "can't read sourcefile `%s' (%s)"
msgstr "tidak dapat membaca berkas sumber `%s' (%s)"
-#: awkgram.y:1608
+#: awkgram.y:2547
#, c-format
msgid "source file `%s' is empty"
msgstr "berkas sumber `%s' kosong"
-#: awkgram.y:1800 awkgram.y:1922 awkgram.y:1940 awkgram.y:2315 awkgram.y:2407
+#: awkgram.y:2732
msgid "source file does not end in newline"
msgstr "berkas sumber tidak berakhir dalam baris baru"
-#: awkgram.y:1862
+#: awkgram.y:2809
msgid "unterminated regexp ends with `\\' at end of file"
msgstr "tidak terakhiri regexp akhir denga `\\' diakhir dari berkas"
-#: awkgram.y:1886
+#: awkgram.y:2833
#, c-format
msgid "%s: %d: tawk regex modifier `/.../%c' doesn't work in gawk"
msgstr "%s: %d: tawk regex pemodifikasi `/.../%c' tidak bekerja dalam gawk"
-#: awkgram.y:1890
+#: awkgram.y:2837
#, c-format
msgid "tawk regex modifier `/.../%c' doesn't work in gawk"
msgstr "tawk regex pemodifikasi `/.../%c' tidak bekerja dalam gawk"
-#: awkgram.y:1897
+#: awkgram.y:2844
msgid "unterminated regexp"
msgstr "tidak terselesaikan regexp"
-#: awkgram.y:1900
+#: awkgram.y:2848
msgid "unterminated regexp at end of file"
msgstr "tidak terselesaikan di akhir dari berkas"
-#: awkgram.y:1969
+#: awkgram.y:2907
msgid "use of `\\ #...' line continuation is not portable"
msgstr "penggunaan dari `\\ #...' kelanjutan baris tidak portabel"
-#: awkgram.y:1982
+#: awkgram.y:2923
msgid "backslash not last character on line"
msgstr "backslash bukan karakter terakhir di baris"
-#: awkgram.y:2027
+#: awkgram.y:2984
msgid "POSIX does not allow operator `**='"
msgstr "POSIX tidak mengijinkan operator `**='"
-#: awkgram.y:2029
+#: awkgram.y:2986
msgid "old awk does not support operator `**='"
msgstr "awk lama tidak mendukung operator `**='"
-#: awkgram.y:2038
+#: awkgram.y:2995
msgid "POSIX does not allow operator `**'"
msgstr "POSIX tidak mengijinkan operator `**'"
-#: awkgram.y:2040
+#: awkgram.y:2997
msgid "old awk does not support operator `**'"
msgstr "awk lama tidak mendukung operator `**'"
-#: awkgram.y:2071
+#: awkgram.y:3032
msgid "operator `^=' is not supported in old awk"
msgstr "operator `^=' tidak didukung dalam awk lama"
-#: awkgram.y:2079
+#: awkgram.y:3040
msgid "operator `^' is not supported in old awk"
msgstr "operator `^' tidak didukung dalam awk lama"
-#: awkgram.y:2163 awkgram.y:2178
+#: awkgram.y:3133 awkgram.y:3149
msgid "unterminated string"
msgstr "string tidak terselesaikan"
-#: awkgram.y:2368
+#: awkgram.y:3345
#, c-format
msgid "invalid char '%c' in expression"
msgstr "karakter '%c' tidak valid dalam ekspresi"
-#: awkgram.y:2416
+#: awkgram.y:3391
#, c-format
msgid "`%s' is a gawk extension"
msgstr "`%s' adalah sebuah ekstensi gawk"
-#: awkgram.y:2419
+#: awkgram.y:3394
#, c-format
msgid "`%s' is a Bell Labs extension"
msgstr "`%s' adalah sebuah ekstensi Bell Labs"
-#: awkgram.y:2422
+#: awkgram.y:3397
#, c-format
msgid "POSIX does not allow `%s'"
msgstr "POSIX tidak mengijinkan `%s'"
-#: awkgram.y:2426
+#: awkgram.y:3401
#, c-format
msgid "`%s' is not supported in old awk"
msgstr "`%s' tidak didukung dalam awk lama"
-#: awkgram.y:2452
+#: awkgram.y:3465
msgid "`goto' considered harmful!\n"
msgstr "`goto' dipertimbangkan berbahaya!\n"
-#: awkgram.y:2514
+#: awkgram.y:3518
#, c-format
msgid "%d is invalid as number of arguments for %s"
msgstr "%d tidak valid sebagai jumlah dari argumen untuk %s"
-#: awkgram.y:2533 awkgram.y:2536
+#: awkgram.y:3544 awkgram.y:3547
msgid "match: third argument is a gawk extension"
msgstr "cocok: argumen ketiga adalah sebuah ekstensi gawk"
-#: awkgram.y:2549
+#: awkgram.y:3575
#, c-format
msgid "%s: string literal as last arg of substitute has no effect"
msgstr ""
"%s: literal string sebagai argumen terakhir dari pergantian tidak memiliki "
"efek"
-#: awkgram.y:2552
+#: awkgram.y:3580
#, c-format
msgid "%s third parameter is not a changeable object"
msgstr "%s parameter ketika bukan sebuah objek yang dapat diubah"
-#: awkgram.y:2586 awkgram.y:2589
+#: awkgram.y:3665 awkgram.y:3668
msgid "close: second argument is a gawk extension"
msgstr "tutup: argumen kedua adalah sebuah ekstensi gawk"
-#: awkgram.y:2599
+#: awkgram.y:3680
msgid "use of dcgettext(_\"...\") is incorrect: remove leading underscore"
msgstr ""
"penggunaan dari dcgettext(_\"...\") adalah tidak benar: hapus garis bawah "
"yang mengawali"
-#: awkgram.y:2614
+#: awkgram.y:3695
msgid "use of dcngettext(_\"...\") is incorrect: remove leading underscore"
msgstr ""
"penggunaan dari dcngettext(_\"...\") adalah tidak benar: hapus garis bawah "
"yang mengawali"
-#: awkgram.y:2686
+#: awkgram.y:3787
#, c-format
msgid "function `%s': parameter #%d, `%s', duplicates parameter #%d"
msgstr "fungsi `%s': parameter #%d, `%s', duplikasi paramter #%d"
-#: awkgram.y:2719
+#: awkgram.y:3829
#, c-format
msgid "function `%s': parameter `%s' shadows global variable"
msgstr "fungsi `%s': parameter `%s' bayangan variabel global"
-#: awkgram.y:2831
+#: awkgram.y:3987
#, c-format
msgid "could not open `%s' for writing (%s)"
msgstr "tidak dapat membuka `%s' untuk menulis (%s)"
-#: awkgram.y:2832 profile.c:96
+#: awkgram.y:3988 profile.c:85
msgid "sending profile to standard error"
msgstr "mengirim profile ke standar error"
-#: awkgram.y:2864
+#: awkgram.y:3994
#, c-format
msgid "%s: close failed (%s)"
msgstr "%s: tutup gagal (%s)"
-#: awkgram.y:2985
+#: awkgram.y:4046
msgid "shadow_funcs() called twice!"
msgstr "shadow_funcs() dipanggil dua kali!"
-#: awkgram.y:3012
+#: awkgram.y:4052
msgid "there were shadowed variables."
msgstr "disana tidak ada variabel bayangan."
-#: awkgram.y:3085
+#: awkgram.y:4081
#, c-format
msgid "function `%s': can't use function name as parameter name"
msgstr ""
"fungsi `%s': tidak dapat menggunakan nama fungsi sebagai nama parameter"
-#: awkgram.y:3088
+#: awkgram.y:4086
#, c-format
msgid "function `%s': can't use special variable `%s' as a function parameter"
msgstr ""
"fungsi `%s': tidak dapat menggunakan variabel `%s' sebagai fungsi parameter"
-#: awkgram.y:3098
+#: awkgram.y:4102
#, c-format
msgid "function name `%s' previously defined"
msgstr "nama fungsi `%s' sebelumnya telah didefinisikan"
-#: awkgram.y:3249 awkgram.y:3255
+#: awkgram.y:4271 awkgram.y:4277
#, c-format
msgid "function `%s' called but never defined"
msgstr "fungsi `%s' dipanggil tetapi tidak pernah didefinisikan"
-#: awkgram.y:3258
+#: awkgram.y:4280
#, c-format
msgid "function `%s' defined but never called"
msgstr "fungsi `%s' didefinisikan tetapi tidak pernah dipanggil"
-#: awkgram.y:3285
+#: awkgram.y:4311
#, c-format
msgid "regexp constant for parameter #%d yields boolean value"
msgstr "konstanta regexp untuk parameter #%d menghasilkan nilai boolean"
-#: awkgram.y:3329
+#: awkgram.y:4420
#, c-format
msgid ""
"function `%s' called with space between name and `(',\n"
@@ -425,240 +502,143 @@ msgstr ""
"fungsi `%s' dipanggil dengan spasi diantara nama dan `(',\n"
"atau gunakan sebagai sebuah variabel atau sebuah array"
-#: awkgram.y:3750
-#, fuzzy
-msgid "division by zero attempted in `/'"
-msgstr "pembagian dengan nol dicoba dalam `/='"
+#: awkgram.y:4673 eval.c:1845
+msgid "division by zero attempted"
+msgstr "pembagian dengan nol telah dicoba"
-#: awkgram.y:3755 eval.c:1411
+#: awkgram.y:4682 eval.c:1877
#, c-format
msgid "division by zero attempted in `%%'"
msgstr "pembagian dengan nol dicoba dalam `%%'"
-#: builtin.c:122
+#: awkgram.y:5342
+msgid "statement may have no effect"
+msgstr "pernyataan mungkin tidak memiliki pengaruh"
+
+#: builtin.c:120
#, c-format
msgid "%s to \"%s\" failed (%s)"
msgstr "%s ke \"%s\" gagal (%s)"
-#: builtin.c:123
+#: builtin.c:121
msgid "standard output"
msgstr "standar keluaran"
-#: builtin.c:124
-msgid "reason unknown"
-msgstr "alasan tidak diketahui"
-
-#: builtin.c:137
+#: builtin.c:135
msgid "exp: received non-numeric argument"
msgstr "exp: diterima argumen bukan-numerik"
-#: builtin.c:143
+#: builtin.c:141
#, c-format
msgid "exp: argument %g is out of range"
msgstr "exp: argumen %g diluar dari jangkauan"
-#: builtin.c:201
+#: builtin.c:200
#, c-format
msgid "fflush: cannot flush: pipe `%s' opened for reading, not writing"
msgstr ""
"fflush: tidak dapat flush: pipe `%s' dibuka untuk dibaca, bukan ditulis"
-#: builtin.c:204
+#: builtin.c:203
#, c-format
msgid "fflush: cannot flush: file `%s' opened for reading, not writing"
msgstr ""
"fflush: tidak dapat flush: berkas `%s' dibuka untuk dibaca, bukan ditulis"
-#: builtin.c:216
+#: builtin.c:215
#, c-format
msgid "fflush: `%s' is not an open file, pipe or co-process"
msgstr "fflush: `%s' bukan sebuah berkas terbuka, pipe atau co-proses"
-#: builtin.c:310
+#: builtin.c:322
msgid "index: received non-string first argument"
msgstr "indeks: diterima argumen pertama bukan string"
-#: builtin.c:312
+#: builtin.c:324
msgid "index: received non-string second argument"
msgstr "indeks: diterima argumen kedua bukan string"
-#: builtin.c:434
+#: builtin.c:446
msgid "int: received non-numeric argument"
msgstr "int: diterima argumen bukan numerik"
-#: builtin.c:464
+#: builtin.c:469
+#, fuzzy
msgid "`length(array)' is a gawk extension"
msgstr "`length(array)' adalah sebuah ekstensi gawk"
-#: builtin.c:471
-#, fuzzy
-msgid "length: untyped parameter argument will be forced to scalar"
-msgstr "length: argument tidak terketik akan dipaksa ke skalar"
-
-#: builtin.c:480
-msgid "length: untyped argument will be forced to scalar"
-msgstr "length: argument tidak terketik akan dipaksa ke skalar"
-
-#: builtin.c:484
+#: builtin.c:477
msgid "length: received non-string argument"
msgstr "length: diterima argumen bukan-string"
-#: builtin.c:515
+#: builtin.c:508
msgid "log: received non-numeric argument"
msgstr "log: diterima argumen bukan numerik"
-#: builtin.c:518
+#: builtin.c:511
#, c-format
msgid "log: received negative argument %g"
msgstr "log: diterima argumen negatif %g"
-#: builtin.c:726 builtin.c:729
-msgid "must use `count$' on all formats or none"
-msgstr "harus menggunakan `count$' di semua format atau tidak sama sekali"
-
-#: builtin.c:790
-#, c-format
-msgid "field width is ignored for `%%%%' specifier"
-msgstr "lebar daerah diabaikan untuk penspesifikasi `%%%%'"
-
-#: builtin.c:792
-#, c-format
-msgid "precision is ignored for `%%%%' specifier"
-msgstr "ketepatan diabaikan untuk penspesifikasi `%%%%'"
-
-#: builtin.c:794
-#, c-format
-msgid "field width and precision are ignored for `%%%%' specifier"
-msgstr "lebar daerah dan presisi diabaikan untuk penspesifikasi `%%%%'"
-
-#: builtin.c:845
-msgid "`$' is not permitted in awk formats"
-msgstr "`$' tidak diijinkan dalam format awk"
-
-#: builtin.c:851
-msgid "arg count with `$' must be > 0"
-msgstr "arg count dengan `$' harus > 0"
-
-#: builtin.c:853
-#, c-format
-msgid "arg count %ld greater than total number of supplied arguments"
-msgstr ""
-"arg count %ld lebih besar dari jumlah total dari argumen yang diberikan"
-
-#: builtin.c:855
-msgid "`$' not permitted after period in format"
-msgstr "`$' tidak diijinkan setelah periode dalam format"
-
-#: builtin.c:868
-msgid "no `$' supplied for positional field width or precision"
-msgstr "tidak ada `$' yang diberikan untuk posisional field width atau presisi"
-
-#: builtin.c:938
-msgid "`l' is meaningless in awk formats; ignored"
-msgstr "`l' tidak berarti dalam format awk; diabaikan"
-
-#: builtin.c:942
-msgid "`l' is not permitted in POSIX awk formats"
-msgstr "`l' tidak diijinkan dalam format POSIX awk"
-
-#: builtin.c:953
-msgid "`L' is meaningless in awk formats; ignored"
-msgstr "`L' tidak berarti dalam format awk; diabaikan"
-
-#: builtin.c:957
-msgid "`L' is not permitted in POSIX awk formats"
-msgstr "`L' tidak diijinkan dalam format awk POSIX"
-
-#: builtin.c:968
-msgid "`h' is meaningless in awk formats; ignored"
-msgstr "`h' tidak berarti dalam format awk; diabaikan"
-
-#: builtin.c:972
-msgid "`h' is not permitted in POSIX awk formats"
-msgstr "`h' tidak diijinkan dalam format awk POSIX"
-
-#: builtin.c:1252
-#, c-format
-msgid "[s]printf: value %g is out of range for `%%%c' format"
-msgstr "[s]printf: nilai %g diluar dari jangkauan untuk format `%%%c'"
-
-#: builtin.c:1332
-#, c-format
-msgid "ignoring unknown format specifier character `%c': no argument converted"
-msgstr ""
-"mengabaikan format tidak dikenal karakter penspesifikasi `%c': tidak ada "
-"argumen yang diubah"
-
-#: builtin.c:1338
-msgid "not enough arguments to satisfy format string"
-msgstr "tidak cukup argumen untuk memuaskan format string"
-
-#: builtin.c:1340
-msgid "^ ran out for this one"
-msgstr "^ kehabisan untuk yang ini"
-
-#: builtin.c:1346
-msgid "[s]printf: format specifier does not have control letter"
-msgstr "[s]printf: penspesifikasi format tidak memiliki pengontrol huruf"
-
-#: builtin.c:1349
-msgid "too many arguments supplied for format string"
-msgstr "terlalu banyak argumen diberikan untuk format string"
+#: builtin.c:531 builtin.c:573 builtin.c:586 builtin.c:982 builtin.c:994
+#, fuzzy, c-format
+msgid "attempt to use array `%s' in scalar context"
+msgstr "mencoba menggunakan array `%s' dalam sebuah konteks skalar"
-#: builtin.c:1424 builtin.c:1427
+#: builtin.c:569 builtin.c:580
msgid "printf: no arguments"
msgstr "printf: tidak ada argumen"
-#: builtin.c:1451
+#: builtin.c:621
msgid "sqrt: received non-numeric argument"
msgstr "sqrt: diterima argumen bukan numerik"
-#: builtin.c:1455
+#: builtin.c:625
#, c-format
msgid "sqrt: called with negative argument %g"
msgstr "sqrt: dipanggil dengan argumen %g negatif"
-#: builtin.c:1479
-#, c-format
-msgid "substr: start index %g is invalid, using 1"
-msgstr "substr: awal indeks %g tidak valid, menggunakan 1"
-
-#: builtin.c:1484
-#, c-format
-msgid "substr: non-integer start index %g will be truncated"
-msgstr "substr: awal indeks %g bukan integer akan dipotong"
-
-#: builtin.c:1510
+#: builtin.c:649
#, c-format
msgid "substr: length %g is not >= 1"
msgstr "substr: panjang %g tidak >= 1"
-#: builtin.c:1512
+#: builtin.c:651
#, c-format
msgid "substr: length %g is not >= 0"
msgstr "substr: panjang %g tidak >= 0"
-#: builtin.c:1519
+#: builtin.c:658
#, c-format
msgid "substr: non-integer length %g will be truncated"
msgstr "substr: panjang bukan integer %g akan dipotong"
-#: builtin.c:1524
+#: builtin.c:663
#, c-format
msgid "substr: length %g too big for string indexing, truncating to %g"
msgstr ""
"substr: panjang %g terlalu besar untuk pengindeksan string, dipotong ke %g"
-#: builtin.c:1536
+#: builtin.c:675
+#, c-format
+msgid "substr: start index %g is invalid, using 1"
+msgstr "substr: awal indeks %g tidak valid, menggunakan 1"
+
+#: builtin.c:680
+#, c-format
+msgid "substr: non-integer start index %g will be truncated"
+msgstr "substr: awal indeks %g bukan integer akan dipotong"
+
+#: builtin.c:705
msgid "substr: source string is zero length"
msgstr "substr: sumber string memiliki panjang nol"
-#: builtin.c:1552
+#: builtin.c:721
#, c-format
msgid "substr: start index %g is past end of string"
msgstr "substr: awal indeks %g melewati akhir dari string"
-#: builtin.c:1560
+#: builtin.c:729
#, c-format
msgid ""
"substr: length %g at start index %g exceeds length of first argument (%lu)"
@@ -666,475 +646,434 @@ msgstr ""
"substr: panjang %g di awal indeks %g melewati panjang dari argumen pertama (%"
"lu)"
-#: builtin.c:1637
+#: builtin.c:806
+msgid "strftime: received non-numeric second argument"
+msgstr "strftime: diterima argumen kedua bukan numerik"
+
+#: builtin.c:813
msgid "strftime: received non-string first argument"
msgstr "strftime: diterima argumen pertama bukan string"
-#: builtin.c:1643
+#: builtin.c:819
msgid "strftime: received empty format string"
msgstr "strftime: diterima format string kosong"
-#: builtin.c:1652
-msgid "strftime: received non-numeric second argument"
-msgstr "strftime: diterima argumen kedua bukan numerik"
-
-#: builtin.c:1729
+#: builtin.c:885
msgid "mktime: received non-string argument"
msgstr "mktime: diterima argumen bukan string"
-#: builtin.c:1746
+#: builtin.c:902
msgid "mktime: at least one of the values is out of the default range"
msgstr ""
-#: builtin.c:1781
+#: builtin.c:937
msgid "'system' function not allowed in sandbox mode"
msgstr ""
-#: builtin.c:1786
+#: builtin.c:942
msgid "system: received non-string argument"
msgstr "system: diterima argumen bukan string"
-#: builtin.c:1907 eval.c:2285
+#: builtin.c:997 eval.c:1105 eval.c:1557 eval.c:1570
+#, c-format
+msgid "reference to uninitialized variable `%s'"
+msgstr "referensi ke variabel `%s' tidak terinisialisasi"
+
+#: builtin.c:1064
#, c-format
msgid "reference to uninitialized field `$%d'"
msgstr "referensi ke field tidak terinisialisasi `$%d'"
-#: builtin.c:2012
+#: builtin.c:1098
msgid "tolower: received non-string argument"
msgstr "tolower: diterima argumen bukan string"
-#: builtin.c:2042
+#: builtin.c:1151
msgid "toupper: received non-string argument"
msgstr "toupper: diterima argumen bukan string"
-#: builtin.c:2075
+#: builtin.c:1199
msgid "atan2: received non-numeric first argument"
msgstr "atan2: diterima argumen pertama bukan numerik"
-#: builtin.c:2077
+#: builtin.c:1201
msgid "atan2: received non-numeric second argument"
msgstr "atan2: diterima argumen kedua bukan numerik"
-#: builtin.c:2096
+#: builtin.c:1220
msgid "sin: received non-numeric argument"
msgstr "sin: diterima argumen bukan numerik"
-#: builtin.c:2112
+#: builtin.c:1236
msgid "cos: received non-numeric argument"
msgstr "cos: diterima argumen bukan numerik"
-#: builtin.c:2165
+#: builtin.c:1289
msgid "srand: received non-numeric argument"
msgstr "srand: diterima argumen bukan numerik"
-#: builtin.c:2200
+#: builtin.c:1320
msgid "match: third argument is not an array"
msgstr "match: argumen ketiga bukan sebuah array"
-#: builtin.c:2750
+#: builtin.c:1827
msgid "gensub: third argument of 0 treated as 1"
msgstr "gensub: argumen ketiga dari 0 diperlakukan sebagai 1"
-#: builtin.c:2866
+#: builtin.c:1869
msgid "lshift: received non-numeric first argument"
msgstr "lshift: diterima argumen pertama bukan numerik"
-#: builtin.c:2868
+#: builtin.c:1871
msgid "lshift: received non-numeric second argument"
msgstr "lshift: diterima argumen kedua bukan numerik"
-#: builtin.c:2874
+#: builtin.c:1877
#, c-format
msgid "lshift(%lf, %lf): negative values will give strange results"
msgstr "lshift(%lf, %lf): nilai negatif akan memberikan hasil aneh"
-#: builtin.c:2876
+#: builtin.c:1879
#, c-format
msgid "lshift(%lf, %lf): fractional values will be truncated"
msgstr "lshift(%lf, %lf): nilai pecahan akan dipotong"
-#: builtin.c:2878
+#: builtin.c:1881
#, c-format
msgid "lshift(%lf, %lf): too large shift value will give strange results"
msgstr "lshift(%lf, %lf): nilai shift terlalu besar akan memberikan hasil aneh"
-#: builtin.c:2904
+#: builtin.c:1908
msgid "rshift: received non-numeric first argument"
msgstr "rshift: diterima argumen pertama bukan numerik"
-#: builtin.c:2906
+#: builtin.c:1910
msgid "rshift: received non-numeric second argument"
msgstr "rshift: diterima argumen kedua bukan-numerik"
-#: builtin.c:2912
+#: builtin.c:1916
#, c-format
msgid "rshift(%lf, %lf): negative values will give strange results"
msgstr "rshift(%lf. %lf): nilai negatif akan memberikan hasil aneh"
-#: builtin.c:2914
+#: builtin.c:1918
#, c-format
msgid "rshift(%lf, %lf): fractional values will be truncated"
msgstr "rshift(%lf, %lf): nilai pecahan akan dipotong"
-#: builtin.c:2916
+#: builtin.c:1920
#, c-format
msgid "rshift(%lf, %lf): too large shift value will give strange results"
msgstr "rshift(%lf, %lf): nilai shift terlalu besar akan memberikan hasil aneh"
-#: builtin.c:2942
+#: builtin.c:1947
msgid "and: received non-numeric first argument"
msgstr "and: diterima argumen pertama tidak numerik"
-#: builtin.c:2944
+#: builtin.c:1949
msgid "and: received non-numeric second argument"
msgstr "and: diterima argumen kedua bukan numerik"
-#: builtin.c:2950
+#: builtin.c:1955
#, c-format
msgid "and(%lf, %lf): negative values will give strange results"
msgstr "and(%lf, %lf): nilai negatif akan memberikan hasil aneh"
-#: builtin.c:2952
+#: builtin.c:1957
#, c-format
msgid "and(%lf, %lf): fractional values will be truncated"
msgstr "and(%lf, %lf): nilai pecahan akan dipotong"
-#: builtin.c:2978
+#: builtin.c:1984
msgid "or: received non-numeric first argument"
msgstr "or: diterima argumen pertama bukan numerik"
-#: builtin.c:2980
+#: builtin.c:1986
msgid "or: received non-numeric second argument"
msgstr "or: diterima argumen kedua bukan numerik"
-#: builtin.c:2986
+#: builtin.c:1992
#, c-format
msgid "or(%lf, %lf): negative values will give strange results"
msgstr "or(%lf, %lf): nilai negatif akan memberikan hasil aneh"
-#: builtin.c:2988
+#: builtin.c:1994
#, c-format
msgid "or(%lf, %lf): fractional values will be truncated"
msgstr "or(%lf, %lf): nilai pecahan akan dipotong"
-#: builtin.c:3014
+#: builtin.c:2023
msgid "xor: received non-numeric first argument"
msgstr "xor: diterima argumen pertama bukan numerik"
-#: builtin.c:3016
+#: builtin.c:2025
msgid "xor: received non-numeric second argument"
msgstr "xor: diterima argumen kedua bukan numerik"
-#: builtin.c:3022
+#: builtin.c:2031
#, c-format
msgid "xor(%lf, %lf): negative values will give strange results"
msgstr "xor(%lf, %lf): nilai negatif akan memberikan hasil aneh"
-#: builtin.c:3024
+#: builtin.c:2033
#, c-format
msgid "xor(%lf, %lf): fractional values will be truncated"
msgstr "xor(%lf, %lf): nilai pecahan akan dipotong"
-#: builtin.c:3048
+#: builtin.c:2057 builtin.c:2063
msgid "compl: received non-numeric argument"
msgstr "compl: diterima argumen bukan numerik"
-#: builtin.c:3054
+#: builtin.c:2065
#, c-format
msgid "compl(%lf): negative value will give strange results"
msgstr "compl(%lf): nilai negatif akan memberikan hasil aneh"
-#: builtin.c:3056
+#: builtin.c:2067
#, c-format
msgid "compl(%lf): fractional value will be truncated"
msgstr "compl(%lf): nilai pecahan akan dipotong"
-#: builtin.c:3229
+#: builtin.c:2237
#, c-format
msgid "dcgettext: `%s' is not a valid locale category"
msgstr "dcgettext: `%s' bukan sebuah kategori lokal yang valid"
-#: eval.c:374
+#: eval.c:412
#, c-format
msgid "unknown nodetype %d"
msgstr "tipe titik %d tidak diketahui"
-#: eval.c:423
-msgid "buffer overflow in genflags2str"
-msgstr "buffer overflow dalam genflags2str"
-
-#: eval.c:455 eval.c:461 profile.c:787
-#, c-format
-msgid "attempt to use array `%s' in a scalar context"
-msgstr "mencoba menggunakan array `%s' dalam sebuah konteks skalar"
+#: eval.c:423 eval.c:437
+#, fuzzy, c-format
+msgid "unknown opcode %d"
+msgstr "tipe titik %d tidak diketahui"
-#: eval.c:803
+#: eval.c:434
#, c-format
-msgid "for loop: array `%s' changed size from %ld to %ld during loop execution"
+msgid "opcode %s not an operator or keyword"
msgstr ""
-"for loop: array `%s' berubah ukuran dari %ld ke %ld selama eksekusi loop"
-
-#: eval.c:824
-msgid "`break' outside a loop is not portable"
-msgstr "`break' diluar sebuah loop adalah tidak portabel"
-#: eval.c:828
-msgid "`break' outside a loop is not allowed"
-msgstr "`break' diluar sebuah loop tidak diijinkan"
-
-#: eval.c:845
-msgid "`continue' outside a loop is not portable"
-msgstr "`continue' diluar sebuah loop tidak portabel"
-
-#: eval.c:849
-msgid "`continue' outside a loop is not allowed"
-msgstr "`continue' diluar sebuah loop tidak diijinkan"
-
-#: eval.c:883
-msgid "`next' cannot be called from a BEGIN rule"
-msgstr "`next' tidak dapat dipanggil dari sebuah aturan BEGIN"
-
-#: eval.c:885
-msgid "`next' cannot be called from an END rule"
-msgstr "`next' tidak dapat dipanggil dari sebuah aturan END"
+#: eval.c:487
+msgid "buffer overflow in genflags2str"
+msgstr "buffer overflow dalam genflags2str"
-#: eval.c:887
-#, fuzzy
-msgid "`next' cannot be called from a BEGINFILE rule"
-msgstr "`next' tidak dapat dipanggil dari sebuah aturan BEGIN"
+#: eval.c:613
+#, c-format
+msgid ""
+"\n"
+"\t# Function Call Stack:\n"
+"\n"
+msgstr ""
+"\n"
+"\t# Fungsi Call Stack:\n"
+"\n"
-#: eval.c:889
-#, fuzzy
-msgid "`next' cannot be called from an ENDFILE rule"
-msgstr "`next' tidak dapat dipanggil dari sebuah aturan END"
+#: eval.c:640
+msgid "`IGNORECASE' is a gawk extension"
+msgstr "`IGNORECASE' adalah ekstensi gawk"
-#: eval.c:898
-msgid "`nextfile' cannot be called from a BEGIN rule"
-msgstr "`nextfile' tidak dapat dipanggil dari sebuah aturan BEGIN"
+#: eval.c:669
+msgid "`BINMODE' is a gawk extension"
+msgstr "`BINMODE' adalah ekstensi gawk"
-#: eval.c:900
-msgid "`nextfile' cannot be called from an END rule"
-msgstr "`nextfile' tidak dapat dipanggil dari sebuah aturan END"
+#: eval.c:727
+#, c-format
+msgid "BINMODE value `%s' is invalid, treated as 3"
+msgstr "BINMODE nilai `%s' tidak valid, diperlakukan sebagai 3"
-#: eval.c:906
-#, fuzzy
-msgid "`nextfile' cannot be called from an ENDFILE rule"
-msgstr "`nextfile' tidak dapat dipanggil dari sebuah aturan END"
+#: eval.c:817
+#, c-format
+msgid "bad `%sFMT' specification `%s'"
+msgstr "buruk `%sFMT' spesifikasi `%s'"
-#: eval.c:963
-msgid "statement has no effect"
-msgstr "pernyataan tidak memiliki efek"
+#: eval.c:895
+msgid "turning off `--lint' due to assignment to `LINT'"
+msgstr "menonaktifkan `--lint' karena assignmen ke `LINT'"
-#: eval.c:1040 eval.c:2133
+#: eval.c:1067 eval.c:1544
#, c-format
msgid "can't use function name `%s' as variable or array"
msgstr ""
"tidak dapat menggunakan nama fungsi `%s' sebagai sebuah variabel atau array"
-#: eval.c:1047 eval.c:1053
+#: eval.c:1095
+msgid "assignment is not allowed to result of builtin function"
+msgstr "assignmen tidak diijinkan untuk menghasilkan fungsi bawaan"
+
+#: eval.c:1104 eval.c:1556 eval.c:1569
#, c-format
msgid "reference to uninitialized argument `%s'"
msgstr "referensi ke argumen `%s' tidak terinisialisasi"
-#: eval.c:1062 eval.c:2142
+#: eval.c:1123
+msgid "attempt to field reference from non-numeric value"
+msgstr "mencoba untuk mereferensi field dari nilai bukan numerik"
+
+#: eval.c:1125
+#, fuzzy
+msgid "attempt to field reference from null string"
+msgstr "mencoba untuk mereferensi dari null string"
+
+#: eval.c:1131
+#, fuzzy, c-format
+msgid "attempt to access field %ld"
+msgstr "mencoba untuk mengakses field %d"
+
+#: eval.c:1140
+#, fuzzy, c-format
+msgid "reference to uninitialized field `$%ld'"
+msgstr "referensi ke field tidak terinisialisasi `$%d'"
+
+#: eval.c:1202
#, c-format
-msgid "reference to uninitialized variable `%s'"
-msgstr "referensi ke variabel `%s' tidak terinisialisasi"
+msgid "function `%s' called with more arguments than declared"
+msgstr "fungsi `%s' dipanggil argumen lebih dari yang dideklarasikan"
-#: eval.c:1210
-msgid ""
-"concatenation: side effects in one expression have changed the length of "
-"another!"
+#: eval.c:1358
+#, c-format
+msgid "unwind_stack: unexpected type `%s'"
msgstr ""
-"concatenation: efek samping dalam satu ekspresi telah mengubah panjang dari "
-"yang lain!"
-#: eval.c:1315
-msgid "assignment used in conditional context"
-msgstr "penempatan digunakan dalam konteks kondisional"
+#: eval.c:1636
+#, fuzzy, c-format
+msgid "attempt to use scalar `%s' as an array"
+msgstr "mencoba untuk menggunakan skalar `%s' sebagai sebuah array"
-#: eval.c:1396
-msgid "division by zero attempted"
-msgstr "pembagian dengan nol telah dicoba"
+#: eval.c:1680
+msgid "assignment used in conditional context"
+msgstr "assignment digunakan dalam konteks kondisional"
-#: eval.c:1426 profile.c:663
-#, c-format
-msgid "illegal type (%s) in tree_eval"
-msgstr "tipe (%s) tidak legal dalam tree_eval"
+#: eval.c:1684
+msgid "statement has no effect"
+msgstr "pernyataan tidak memiliki efek"
-#: eval.c:1589
+#: eval.c:2028
msgid "division by zero attempted in `/='"
msgstr "pembagian dengan nol dicoba dalam `/='"
-#: eval.c:1611
+#: eval.c:2053
#, c-format
msgid "division by zero attempted in `%%='"
msgstr "pembagian dengan nol dicoba dalam `%%='"
-#: eval.c:1891
-#, c-format
-msgid "function `%s' called with more arguments than declared"
-msgstr "fungsi `%s' dipanggil argumen lebih dari yang dideklarasikan"
+#: eval.c:2139
+msgid "`continue' outside a loop is not allowed"
+msgstr "`continue' diluar sebuah loop tidak diijinkan"
-#: eval.c:1948
-#, c-format
-msgid "function `%s' not defined"
-msgstr "fungsi `%s' tidak didefinisikan"
+#: eval.c:2145
+#, fuzzy
+msgid "`break' outside a loop is not allowed"
+msgstr "`break' diluar sebuah loop tidak diijinkan"
-#: eval.c:1950
+#: eval.c:2229
#, c-format
-msgid "identifier `%s' is not a function"
+msgid "for loop: array `%s' changed size from %ld to %ld during loop execution"
msgstr ""
+"for loop: array `%s' berubah ukuran dari %ld ke %ld selama eksekusi loop"
-#: eval.c:1997
+#: eval.c:2342
#, c-format
-msgid ""
-"function parameter `%s' is not a scalar and cannot be used for indirect "
-"function call"
+msgid "function called indirectly through `%s' does not exist"
msgstr ""
-#: eval.c:2014
+#: eval.c:2354
#, c-format
-msgid "indirect call of real function `%s' is silly"
-msgstr ""
+msgid "function `%s' not defined"
+msgstr "fungsi `%s' tidak didefinisikan"
-#: eval.c:2034
-#, c-format
-msgid "function `%s' called indirectly through `%s' does not exist"
-msgstr ""
+#: eval.c:2481
+#, fuzzy, c-format
+msgid "`nextfile' cannot be called from a `%s' rule"
+msgstr "`nextfile' tidak dapat dipanggil dari sebuah aturan END"
-#: eval.c:2039
-#, c-format
-msgid "identifier `%s' cannot be used for indirect function call"
-msgstr ""
+#: eval.c:2540
+#, fuzzy, c-format
+msgid "`next' cannot be called from a `%s' rule"
+msgstr "`next' tidak dapat dipanggil dari sebuah aturan END"
-#: eval.c:2105
+#: eval.c:2602
#, c-format
-msgid ""
-"\n"
-"\t# Function Call Stack:\n"
-"\n"
+msgid "Sorry, don't know how to interpret `%s'"
msgstr ""
-"\n"
-"\t# Fungsi Call Stack:\n"
-"\n"
-
-#: eval.c:2108
-#, c-format
-msgid "\t# -- main --\n"
-msgstr "\t# -- main --\n"
-
-#: eval.c:2269
-msgid "attempt to field reference from non-numeric value"
-msgstr "mencoba untuk mereferensi field dari nilai bukan numerik"
-#: eval.c:2271
-msgid "attempt to reference from null string"
-msgstr "mencoba untuk mereferensi dari null string"
-
-#: eval.c:2277
-#, c-format
-msgid "attempt to access field %d"
-msgstr "mencoba untuk mengakses field %d"
-
-#: eval.c:2298 eval.c:2305 profile.c:843
-msgid "assignment is not allowed to result of builtin function"
-msgstr "penempatan tidak diijinkan untuk menghasilkan fungsi bawaan"
-
-#: eval.c:2369
-msgid "`IGNORECASE' is a gawk extension"
-msgstr "`IGNORECASE' adalah ekstensi gawk"
-
-#: eval.c:2398
-msgid "`BINMODE' is a gawk extension"
-msgstr "`BINMODE' adalah ekstensi gawk"
-
-#: eval.c:2456
-#, c-format
-msgid "BINMODE value `%s' is invalid, treated as 3"
-msgstr "BINMODE nilai `%s' tidak valid, diperlakukan sebagai 3"
-
-#: eval.c:2546
-#, c-format
-msgid "bad `%sFMT' specification `%s'"
-msgstr "buruk `%sFMT' spesifikasi `%s'"
-
-#: eval.c:2624
-msgid "turning off `--lint' due to assignment to `LINT'"
-msgstr "menonaktifkan `--lint' karena penempatan ke `LINT'"
-
-#: ext.c:61
-msgid "extensions not allowed in sandbox mode"
+#: ext.c:62
+msgid "extensions are not allowed in sandbox mode"
msgstr ""
-#: ext.c:65 ext.c:70
+#: ext.c:68 ext.c:73
msgid "`extension' is a gawk extension"
msgstr "`extension' adalah sebuah ekstensi gawk"
-#: ext.c:80
-#, c-format
-msgid "extension: cannot open `%s' (%s)\n"
+#: ext.c:83
+#, fuzzy, c-format
+msgid "fatal: extension: cannot open `%s' (%s)\n"
msgstr "extension: tidak dapat membuka `%s' (%s)\n"
-#: ext.c:88
-#, c-format
-msgid "extension: library `%s': cannot call function `%s' (%s)\n"
+#: ext.c:93
+#, fuzzy, c-format
+msgid "fatal: extension: library `%s': cannot call function `%s' (%s)\n"
msgstr "extension: perpustakaan `%s': tidak dapat memanggil fungsi `%s' (%s)\n"
-#: ext.c:108
+#: ext.c:123
msgid "extension: missing function name"
msgstr "extension: hilang nama fungsi"
-#: ext.c:113
+#: ext.c:128
#, c-format
msgid "extension: illegal character `%c' in function name `%s'"
msgstr "extension: karakter `%c' tidak legal dalam nama fungsi `%s'"
-#: ext.c:119
+#: ext.c:137
#, c-format
msgid "extension: can't redefine function `%s'"
msgstr "extension: tidak dapat meredefinisi fungsi `%s'"
-#: ext.c:123
+#: ext.c:141
#, c-format
msgid "extension: function `%s' already defined"
msgstr "extension: fungsi `%s' telah didefinisikan"
-#: ext.c:128
+#: ext.c:146
+#, c-format
+msgid "extension: function name `%s' previously defined"
+msgstr "extension: nama fungsi `%s' telah didefinisikan sebelumnya"
+
+#: ext.c:148
#, c-format
msgid "extension: can't use gawk built-in `%s' as function name"
msgstr ""
"extension: tidak dapat menggunakan gawk bawaan `%s' sebagai nama fungsi"
-#: ext.c:130
+#: ext.c:152
#, c-format
-msgid "extension: function name `%s' previously defined"
-msgstr "extension: nama fungsi `%s' telah didefinisikan sebelumnya"
+msgid "make_builtin: negative argument count for function `%s'"
+msgstr ""
-#: ext.c:207
-#, c-format
+#: ext.c:255
+#, fuzzy, c-format
msgid "function `%s' defined to take no more than %d argument(s)"
msgstr "fungsi `%s' didefinisikan untuk mengambil lebih dari %d argumen"
-#: ext.c:210
+#: ext.c:258
#, c-format
msgid "function `%s': missing argument #%d"
msgstr "fungsi `%s': hilang argumen #%d"
-#: ext.c:220
+#: ext.c:268
#, c-format
msgid "function `%s': argument #%d: attempt to use scalar as an array"
msgstr ""
"fungsi `%s': argumen #%d: mencoba menggunaka skalar sebagai sebuah array"
-#: ext.c:224
+#: ext.c:272
#, c-format
msgid "function `%s': argument #%d: attempt to use array as a scalar"
msgstr ""
"fungsi `%s': argumen #%d: mencoba untuk menggunakan array sebagai sebuah "
"skalar"
-#: ext.c:249
+#: ext.c:285
msgid "Operation Not Supported"
msgstr "Operasi Tidak Didukung"
@@ -1142,58 +1081,57 @@ msgstr "Operasi Tidak Didukung"
msgid "NF set to negative value"
msgstr "NF set ke nilai negatif"
-#: field.c:913
-msgid "split: second argument is not an array"
-msgstr "split: argumen kedua bukan sebuah array"
-
-#: field.c:922 field.c:932 field.c:937
+#: field.c:939 field.c:946 field.c:950
#, fuzzy
msgid "split: fourth argument is a gawk extension"
msgstr "cocok: argumen ketiga adalah sebuah ekstensi gawk"
-#: field.c:928
+#: field.c:943
#, fuzzy
msgid "split: fourth argument is not an array"
msgstr "split: argumen kedua bukan sebuah array"
-#: field.c:975
-#, fuzzy
-msgid "split: null string for third argument is a gawk extension"
+#: field.c:957
+msgid "split: second argument is not an array"
+msgstr "split: argumen kedua bukan sebuah array"
+
+#: field.c:987
+msgid "split: null string for third arg is a gawk extension"
msgstr "split: null string untuk arg ketika adalah sebuah ekstensi gawk"
-#: field.c:1032
+#: field.c:1028
#, fuzzy
-msgid "patsplit: second argument is not an array"
+msgid "patsplit: fourth argument is not an array"
msgstr "split: argumen kedua bukan sebuah array"
-#: field.c:1041
+#: field.c:1033
#, fuzzy
-msgid "patsplit: fourth argument is not an array"
+msgid "patsplit: second argument is not an array"
msgstr "split: argumen kedua bukan sebuah array"
-#: field.c:1067
+#: field.c:1051
#, fuzzy
msgid "patsplit: third argument must be non-null"
msgstr "match: argumen ketiga bukan sebuah array"
-#: field.c:1111
+#: field.c:1084
msgid "`FIELDWIDTHS' is a gawk extension"
msgstr "`FIELDWIDTHS' adalah sebuah ekstensi gawk"
-#: field.c:1141 field.c:1155
+#: field.c:1147
#, c-format
msgid "invalid FIELDWIDTHS value, near `%s'"
msgstr "nilai FIELDWIDTHS tidak valid, didekat `%s'"
-#: field.c:1238
+#: field.c:1220
msgid "null string for `FS' is a gawk extension"
msgstr "null string untuk `FS' adalah sebuah ekstensi gawk"
-#: field.c:1242
+#: field.c:1224
msgid "old awk does not support regexps as value of `FS'"
msgstr "awk lama tidak mendukung regexps sebagai nilai dari `FS'"
-#: field.c:1357
+#: field.c:1343
#, fuzzy
msgid "`FPAT' is a gawk extension"
msgstr "`%s' adalah sebuah ekstensi gawk"
@@ -1253,499 +1191,497 @@ msgstr "%s: pilihan '-W %s' tidak mengijinkan sebuah argumen\n"
msgid "%s: option '-W %s' requires an argument\n"
msgstr "%s: pilihan '%s' membutuhkan sebuah argumen\n"
-#: io.c:379
+#: io.c:272
#, c-format
msgid "command line argument `%s' is a directory: skipped"
msgstr ""
-#: io.c:413
+#: io.c:275 io.c:372
#, c-format
msgid "cannot open file `%s' for reading (%s)"
msgstr "tidak dapat membuka berkas `%s' untuk membaca (%s)"
-#: io.c:459 io.c:2999
+#: io.c:419
#, c-format
msgid "error reading input file `%s': %s"
msgstr "error membaca berkas masukan `%s': %s"
-#: io.c:506
+#: io.c:470
#, c-format
msgid "close of fd %d (`%s') failed (%s)"
msgstr "penutupan dari fd %d (`%s') gagal (%s)"
-#: io.c:617
-msgid "redirection not allowed in sandbox mode"
-msgstr ""
-
-#: io.c:648
-#, c-format
-msgid "invalid tree type %s in redirect()"
-msgstr "tipe tree %s tidak valid dalam redirect()"
-
-#: io.c:654
+#: io.c:577
#, c-format
msgid "expression in `%s' redirection only has numeric value"
msgstr "ekspresi dalam `%s' redireksi hanya memiliki nilai numerik"
-#: io.c:660
+#: io.c:583
#, c-format
msgid "expression for `%s' redirection has null string value"
msgstr "ekspresi untuk `%s' redireksi hanya memiliki nilai string null"
-#: io.c:665
+#: io.c:589
#, c-format
msgid "filename `%s' for `%s' redirection may be result of logical expression"
msgstr ""
"nama berkas `%s' untuk `%s' redireksi hanya menghasilkan ekspresi logikal"
-#: io.c:707
+#: io.c:628
#, c-format
msgid "unnecessary mixing of `>' and `>>' for file `%.*s'"
msgstr "pencampuran tidak perlu dari `>' dan `>>' untuk berkas `%.*s'"
-#: io.c:754
+#: io.c:681
#, c-format
msgid "can't open pipe `%s' for output (%s)"
msgstr "tidak dapat membuka pipe `%s' untuk keluaran (%s)"
-#: io.c:763
+#: io.c:691
#, c-format
msgid "can't open pipe `%s' for input (%s)"
msgstr "tidak dapat membuka pipe `%s' untuk masukan (%s)"
-#: io.c:786
+#: io.c:712
#, c-format
msgid "can't open two way pipe `%s' for input/output (%s)"
msgstr "tidak dapat membuka pipe dua arah `%s' untuk input/output (%s)"
-#: io.c:864
+#: io.c:794
#, c-format
msgid "can't redirect from `%s' (%s)"
msgstr "tidak dapat redirek dari `%s' (%s)"
-#: io.c:867
+#: io.c:797
#, c-format
msgid "can't redirect to `%s' (%s)"
msgstr "tidak dapat redirek ke `%s' (%s)"
-#: io.c:920
+#: io.c:846
msgid ""
"reached system limit for open files: starting to multiplex file descriptors"
msgstr ""
"batas sistem tercapi untuk berkas terbuka: mulai untuk multiplex berkas "
"deskripsi"
-#: io.c:936
+#: io.c:862
#, c-format
msgid "close of `%s' failed (%s)."
msgstr "penutupan dari `%s' gagal (%s)."
-#: io.c:944
+#: io.c:870
msgid "too many pipes or input files open"
msgstr "terlalu banyak pipes atau berkas masukan terbuka"
-#: io.c:967
+#: io.c:892
msgid "close: second argument must be `to' or `from'"
msgstr "close: argumen kedua harus berupa `to' atau `from'"
-#: io.c:981
+#: io.c:909
#, c-format
msgid "close: `%.*s' is not an open file, pipe or co-process"
msgstr "close: `%.*s' bukan sebuah berkas terbuka, pipe atau co-proses"
-#: io.c:986
+#: io.c:914
msgid "close of redirection that was never opened"
msgstr "penutupan dari redireksi yang tidak pernah terbuka"
-#: io.c:1083
+#: io.c:1011
#, c-format
msgid "close: redirection `%s' not opened with `|&', second argument ignored"
msgstr ""
"close: redireksi `%s' tidak dibuka dengan `|&', argumen kedua diabaikan"
-#: io.c:1099
+#: io.c:1027
#, c-format
msgid "failure status (%d) on pipe close of `%s' (%s)"
msgstr "status gagal (%d) di tutup pipe dari `%s' (%s)"
-#: io.c:1102
+#: io.c:1030
#, c-format
msgid "failure status (%d) on file close of `%s' (%s)"
msgstr "status gagal (%d) di tutup berkas dari `%s' (%s)"
-#: io.c:1122
+#: io.c:1050
#, c-format
msgid "no explicit close of socket `%s' provided"
msgstr "tidak ada eksplisit tutup dari socket `%s' yang disediakan"
-#: io.c:1125
+#: io.c:1053
#, c-format
msgid "no explicit close of co-process `%s' provided"
msgstr "tidak ada eksplisit tutup dari co-proses `%s' yang disediakan"
-#: io.c:1128
+#: io.c:1056
#, c-format
msgid "no explicit close of pipe `%s' provided"
msgstr "tidak ada eksplisit tutup dari pipe `%s' disediakan"
-#: io.c:1131
+#: io.c:1059
#, c-format
msgid "no explicit close of file `%s' provided"
msgstr "tidak ada eksplisit close dari berkas `%s' disediakan"
-#: io.c:1159 io.c:1214 main.c:832 main.c:874
+#: io.c:1087 io.c:1142 main.c:823 main.c:865
#, c-format
msgid "error writing standard output (%s)"
msgstr "error menulis standar keluaran (%s)"
-#: io.c:1163 io.c:1219
+#: io.c:1091 io.c:1147
#, c-format
msgid "error writing standard error (%s)"
msgstr "error menulis standar error (%s)"
-#: io.c:1171
+#: io.c:1099
#, c-format
msgid "pipe flush of `%s' failed (%s)."
msgstr "pipe flush dari `%s' gagal (%s)."
-#: io.c:1174
+#: io.c:1102
#, c-format
msgid "co-process flush of pipe to `%s' failed (%s)."
msgstr "co-proses flush dari pipe ke `%s' gagal (%s)."
-#: io.c:1177
+#: io.c:1105
#, c-format
msgid "file flush of `%s' failed (%s)."
msgstr "file flush dari `%s' gagal (%s)."
-#: io.c:1292
+#: io.c:1219
#, c-format
msgid "local port %s invalid in `/inet'"
msgstr "lokal port %s tidak valid dalam `/inet'"
-#: io.c:1309
+#: io.c:1236
#, c-format
msgid "remote host and port information (%s, %s) invalid"
msgstr "remote host dan informasi port (%s, %s) tidak valid"
-#: io.c:1344
+#: io.c:1276
msgid "/inet/raw client not ready yet, sorry"
msgstr "/inet/raw client belum siap, maaf"
-#: io.c:1347 io.c:1383
+#: io.c:1279 io.c:1320
msgid "only root may use `/inet/raw'."
msgstr "hanya root yang boleh menggunakan `/inet/raw'."
-#: io.c:1381
+#: io.c:1318
msgid "/inet/raw server not ready yet, sorry"
msgstr "/inet/raw server belum siap, maaf"
-#: io.c:1477
+#: io.c:1417
#, c-format
msgid "no (known) protocol supplied in special filename `%s'"
msgstr ""
"tidak (diketahui) protokol yang diberikan dalam nama berkas spesial `%s'"
-#: io.c:1491
+#: io.c:1431
#, c-format
msgid "special file name `%s' is incomplete"
msgstr "nama berkas spesial `%s' tidak lengkap"
-#: io.c:1506
+#: io.c:1447
msgid "must supply a remote hostname to `/inet'"
msgstr "harus memberikan sebuah remote hostname ke `/inet'"
-#: io.c:1524
+#: io.c:1465
msgid "must supply a remote port to `/inet'"
msgstr "harus memberikan sebuah remote port ke `/inet'"
-#: io.c:1570
+#: io.c:1511
msgid "TCP/IP communications are not supported"
msgstr "komunikasi TCP/IP tidak didukung"
-#: io.c:1758
+#: io.c:1698
#, c-format
msgid "could not open `%s', mode `%s'"
msgstr "tidak dapat membuka `%s', mode `%s'"
-#: io.c:1809
+#: io.c:1749
#, c-format
msgid "close of master pty failed (%s)"
msgstr "penutupan dari master pty gagal (%s)"
-#: io.c:1811 io.c:1963 io.c:2114
+#: io.c:1751 io.c:1918 io.c:2075
#, c-format
msgid "close of stdout in child failed (%s)"
msgstr "penutupan dari stdout dalam child gagal (%s)"
-#: io.c:1814
+#: io.c:1754
#, c-format
msgid "moving slave pty to stdout in child failed (dup: %s)"
msgstr "memindahkan slave pty ke stdout dalam child gagal (dup: %s)"
-#: io.c:1816 io.c:1968
+#: io.c:1756 io.c:1923
#, c-format
msgid "close of stdin in child failed (%s)"
msgstr "penutupan dari stdin dalam anak gagal (%s)"
-#: io.c:1819
+#: io.c:1759
#, c-format
msgid "moving slave pty to stdin in child failed (dup: %s)"
msgstr "memindahkan slave pty ke stdin dalam anak gagal (dup: %s)"
-#: io.c:1821 io.c:1840
+#: io.c:1761 io.c:1782
#, c-format
msgid "close of slave pty failed (%s)"
msgstr "penutupan dari pty budak gagal (%s)"
-#: io.c:1914 io.c:1966 io.c:2095 io.c:2117
+#: io.c:1860 io.c:1921 io.c:2053 io.c:2078
#, c-format
msgid "moving pipe to stdout in child failed (dup: %s)"
msgstr "memindahkan pipe ke stdout dalam anak gaal (dup: %s)"
-#: io.c:1918 io.c:1971
+#: io.c:1867 io.c:1926
#, c-format
msgid "moving pipe to stdin in child failed (dup: %s)"
msgstr "memindahkan pipe ke stdin dalam anak gagal (dup: %s)"
-#: io.c:1935 io.c:2108
+#: io.c:1887 io.c:2068
msgid "restoring stdout in parent process failed\n"
msgstr "mengembalikan stdout dalam proses orang tua gagal\n"
-#: io.c:1940
+#: io.c:1895
msgid "restoring stdin in parent process failed\n"
msgstr "mengembalikan stdin dalam proses orang tua gagal\n"
-#: io.c:1974 io.c:2119 io.c:2130
+#: io.c:1929 io.c:2080 io.c:2094
#, c-format
msgid "close of pipe failed (%s)"
msgstr "penutupan dari pipe gagal (%s)"
-#: io.c:2019
+#: io.c:1974
msgid "`|&' not supported"
msgstr "`|&' tidak didukung"
-#: io.c:2085
+#: io.c:2040
#, c-format
msgid "cannot open pipe `%s' (%s)"
msgstr "tidak dapat membuka pipe `%s' (%s)"
-#: io.c:2126
+#: io.c:2088
#, c-format
msgid "cannot create child process for `%s' (fork: %s)"
msgstr "tidak dapat membuat proses anak untuk `%s' (fork: %s)"
-#: io.c:2518
+#: io.c:2577
#, c-format
msgid "data file `%s' is empty"
msgstr "berkas data `%s' kosong"
-#: io.c:2560 io.c:2568
+#: io.c:2618 io.c:2626
msgid "could not allocate more input memory"
msgstr "tidak dapat mengalokasikan lebih dari masukan memori"
-#: io.c:3125
+#: io.c:3173
msgid "multicharacter value of `RS' is a gawk extension"
msgstr "nilai multi karakter dari `RS' adalah sebuah ekstensi gawk"
-#: main.c:313
+#: main.c:311
msgid "out of memory"
msgstr "kehabisan memori"
-#: main.c:381
+#: main.c:388
msgid "`-m[fr]' option irrelevant in gawk"
msgstr "pilihan `-m[fr]' tidak relevan dalam gawk"
-#: main.c:383
+#: main.c:390
msgid "-m option usage: `-m[fr] nnn'"
msgstr "penggunaan pilihan -m: `-m[fr] nnn'"
-#: main.c:419
+#: main.c:426
#, fuzzy
msgid "empty argument to `-e/--source' ignored"
msgstr "argumen kosong ke `--source' diabaikan"
-#: main.c:485
+#: main.c:492
#, c-format
msgid "%s: option `-W %s' unrecognized, ignored\n"
msgstr "%s: pilihan `-W %s' tidak dikenal, diabaikan\n"
-#: main.c:530
+#: main.c:545
#, c-format
msgid "%s: option requires an argument -- %c\n"
msgstr "%s: pilihan membutuhkan sebuah argumen -- %c\n"
-#: main.c:551
+#: main.c:566
msgid "environment variable `POSIXLY_CORRECT' set: turning on `--posix'"
msgstr "variabel lingkungan `POSIXLY_CORRECT' set: mengaktifkan `--posix'"
-#: main.c:557
+#: main.c:572
msgid "`--posix' overrides `--traditional'"
msgstr "`--posix' overrides `--traditional'"
-#: main.c:568
+#: main.c:583
msgid "`--posix'/`--traditional' overrides `--non-decimal-data'"
msgstr "`--posix'/`--traditional' overrides `--non-decimal-data'"
-#: main.c:572
+#: main.c:587
#, c-format
msgid "running %s setuid root may be a security problem"
msgstr "menjalankan %s setuid root mungkin sebuah masalah keamanan"
-#: main.c:577
+#: main.c:592
#, fuzzy
msgid "`--posix' overrides `--binary'"
msgstr "`--posix' overrides `--traditional'"
-#: main.c:622
+#: main.c:643
#, c-format
msgid "can't set binary mode on stdin (%s)"
msgstr "tidak dapat menset mode binari di stdin (%s)"
-#: main.c:625
+#: main.c:646
#, c-format
msgid "can't set binary mode on stdout (%s)"
msgstr "tidak dapat menset mode binari di stdout (%s)"
-#: main.c:627
+#: main.c:648
#, c-format
msgid "can't set binary mode on stderr (%s)"
msgstr "tidak dapat menset mode binari di stderr (%s)"
-#: main.c:668
+#: main.c:687
msgid "no program text at all!"
msgstr "tidak ada teks aplikasi apapun!"
-#: main.c:773
+#: main.c:762
#, c-format
msgid "Usage: %s [POSIX or GNU style options] -f progfile [--] file ...\n"
msgstr ""
"Penggunaan: %s [pilihan POSIX atau gaya GNU] -f progfile [--] berkas ...\n"
-#: main.c:775
+#: main.c:764
#, c-format
msgid "Usage: %s [POSIX or GNU style options] [--] %cprogram%c file ...\n"
msgstr ""
"Penggunaan: %s[ pilihan POSIX atau gaya GNU] [--] %cprogram%c berkas ...\n"
-#: main.c:780
+#: main.c:769
#, fuzzy
msgid "POSIX options:\t\tGNU long options: (standard)\n"
msgstr "pilihan POSIX:\t\tpilihan panjang GNU:\n"
-#: main.c:781
+#: main.c:770
msgid "\t-f progfile\t\t--file=progfile\n"
msgstr "\t-f progfile\t\t--file=progfile\n"
-#: main.c:782
+#: main.c:771
msgid "\t-F fs\t\t\t--field-separator=fs\n"
msgstr "\t-F fs\t\t\t--field-separator=fs\n"
-#: main.c:783
+#: main.c:772
msgid "\t-v var=val\t\t--assign=var=val\n"
msgstr "\t-v var=val\t\t--assign=var=val\n"
-#: main.c:784
+#: main.c:773
#, fuzzy
-msgid "POSIX options:\t\tGNU long options: (extensions)\n"
+msgid "Short options:\t\tGNU long options: (extensions)\n"
msgstr "pilihan POSIX:\t\tpilihan panjang GNU:\n"
-#: main.c:785
+#: main.c:774
msgid "\t-m[fr] val\n"
msgstr "\t-m[fr] val\n"
-#: main.c:786
+#: main.c:775
msgid "\t-b\t\t\t--characters-as-bytes\n"
msgstr ""
-#: main.c:787
-msgid "\t-c\t\t\t--compat, --traditional\n"
-msgstr ""
+#: main.c:776
+#, fuzzy
+msgid "\t-c\t\t\t--traditional\n"
+msgstr "\t-W tradisional\t\t--traditional\n"
-#: main.c:788
+#: main.c:777
#, fuzzy
-msgid "\t-C\t\t\t--copyleft, --copyright\n"
+msgid "\t-C\t\t\t--copyright\n"
msgstr "\t-W hak cipta\t\t--copyright\n"
-#: main.c:789
+#: main.c:778
#, fuzzy
msgid "\t-d [file]\t\t--dump-variables[=file]\n"
msgstr "\t-W tampilkan variabel[=berkas]\t--dump-variables[=berkas]\n"
-#: main.c:790
+#: main.c:779
#, fuzzy
msgid "\t-e 'program-text'\t--source='program-text'\n"
msgstr "\t-W sumber=teks-program\t--source=teks-program\n"
-#: main.c:791
+#: main.c:780
#, fuzzy
msgid "\t-E file\t\t\t--exec=file\n"
msgstr "\t-W exec=berkas\t\t--exec=berkas\n"
-#: main.c:792
+#: main.c:781
#, fuzzy
msgid "\t-g\t\t\t--gen-pot\n"
msgstr "\t-W gen-po\t\t--gen-po\n"
-#: main.c:793
+#: main.c:782
#, fuzzy
-msgid "\t-h\t\t\t--help, --usage\n"
+msgid "\t-h\t\t\t--help\n"
msgstr "\t-W bantuan\t\t\t--help\n"
-#: main.c:794
+#: main.c:783
#, fuzzy
-msgid "\t-l [fatal]\t\t--lint[=fatal]\n"
+msgid "\t-L [fatal]\t\t--lint[=fatal]\n"
msgstr "\t-W lint[=fatal]\t\t--lint[=fatal]\n"
-#: main.c:795
-#, fuzzy
-msgid "\t-L\t\t\t--lint-old\n"
-msgstr "\t-W lint-old\t\t--lint-old\n"
-
-#: main.c:796
+#: main.c:784
#, fuzzy
msgid "\t-n\t\t\t--non-decimal-data\n"
msgstr "\t-W non-decimal-data\t--non-decimal-data\n"
-#: main.c:797
+#: main.c:785
#, fuzzy
msgid "\t-N\t\t\t--use-lc-numeric\n"
msgstr "\t-W use-lc-numeric\t--use-lc-numeric\n"
-#: main.c:798
+#: main.c:786
msgid "\t-O\t\t\t--optimize\n"
msgstr "\t-0\t\t\t--optimize\n"
-#: main.c:799
+#: main.c:787
#, fuzzy
msgid "\t-p [file]\t\t--profile[=file]\n"
msgstr "\t-W profile[=file]\t--profile[=file]\n"
-#: main.c:800
+#: main.c:788
#, fuzzy
msgid "\t-P\t\t\t--posix\n"
msgstr "\t-W posix\t\t--posix\n"
-#: main.c:801
+#: main.c:789
#, fuzzy
msgid "\t-r\t\t\t--re-interval\n"
msgstr "\t-W re-interval\t\t--re-interval\n"
-#: main.c:802
+#: main.c:791
+#, fuzzy
+msgid "\t-R file\t\t\t--command=file\n"
+msgstr "\t-W exec=berkas\t\t--exec=berkas\n"
+
+#: main.c:792
msgid "\t-S\t\t\t--sandbox\n"
msgstr ""
-#: main.c:803
+#: main.c:793
+#, fuzzy
+msgid "\t-t\t\t\t--lint-old\n"
+msgstr "\t-W lint-old\t\t--lint-old\n"
+
+#: main.c:794
#, fuzzy
msgid "\t-V\t\t\t--version\n"
msgstr "\t-W versi\t\t--version\n"
-#: main.c:805
+#: main.c:796
msgid "\t-W nostalgia\t\t--nostalgia\n"
msgstr "\t-W nostalgia\t\t--nostalgia\n"
-#: main.c:808
-msgid "\t-W parsedebug\t\t--parsedebug\n"
+#: main.c:799
+#, fuzzy
+msgid "\t-Y\t\t--parsedebug\n"
msgstr "\t-W parsedebug\t\t--parsedebug\n"
#. TRANSLATORS: --help output 5 (end)
@@ -1753,7 +1689,7 @@ msgstr "\t-W parsedebug\t\t--parsedebug\n"
#. for this application. Please add _another line_ with the
#. address for translation bugs.
#. no-wrap
-#: main.c:817
+#: main.c:808
msgid ""
"\n"
"To report bugs, see node `Bugs' in `gawk.info', which is\n"
@@ -1765,7 +1701,7 @@ msgstr ""
"daerah `Reporting Problems and Bugs' dalam versi tercetak.\n"
"\n"
-#: main.c:821
+#: main.c:812
msgid ""
"gawk is a pattern scanning and processing language.\n"
"By default it reads standard input and writes standard output.\n"
@@ -1775,7 +1711,7 @@ msgstr ""
"Secara baku ini membaca standar masukan dan menulis standa keluaran.\n"
"\n"
-#: main.c:825
+#: main.c:816
msgid ""
"Examples:\n"
"\tgawk '{ sum += $1 }; END { print sum }' file\n"
@@ -1785,7 +1721,7 @@ msgstr ""
"\tgawk '{ sum += $1 }; END { print sum }' berkas\n"
"\tgawk -F: '{ print $1 }' /etc/passwd\n"
-#: main.c:845
+#: main.c:836
#, c-format
msgid ""
"Copyright (C) 1989, 1991-%d Free Software Foundation.\n"
@@ -1806,7 +1742,7 @@ msgstr ""
"(di pilihan anda) untuk versi selanjutnya.\n"
"\n"
-#: main.c:853
+#: main.c:844
msgid ""
"This program is distributed in the hope that it will be useful,\n"
"but WITHOUT ANY WARRANTY; without even the implied warranty of\n"
@@ -1821,7 +1757,7 @@ msgstr ""
"GNU General Public License untuk lebih lengkapnya.\n"
"\n"
-#: main.c:864
+#: main.c:855
msgid ""
"You should have received a copy of the GNU General Public License\n"
"along with this program. If not, see http://www.gnu.org/licenses/.\n"
@@ -1830,16 +1766,16 @@ msgstr ""
"bersama dengan aplikasi ini. Jika tidak, lihat http://www.gnu.org/"
"licenses/.\n"
-#: main.c:899
+#: main.c:890
msgid "-Ft does not set FS to tab in POSIX awk"
msgstr "-Ft tidak menset FS ke tab dalam POSIX awk"
-#: main.c:1116
+#: main.c:1122
#, c-format
msgid "unknown value for field spec: %d\n"
msgstr ""
-#: main.c:1176
+#: main.c:1182
#, c-format
msgid ""
"%s: `%s' argument to `-v' not in `var=value' form\n"
@@ -1848,86 +1784,82 @@ msgstr ""
"%s: `%s' argumen ke `-v' tidak dalam bentuk `var=value'\n"
"\n"
-#: main.c:1196
+#: main.c:1202
#, c-format
msgid "`%s' is not a legal variable name"
msgstr "`%s' bukan sebuah nama variabel legal"
-#: main.c:1199
+#: main.c:1205
#, c-format
msgid "`%s' is not a variable name, looking for file `%s=%s'"
msgstr "`%s' bukan sebuah nama variabel, pencarian untuk berkas `%s=%s'"
-#: main.c:1238
+#: main.c:1258
msgid "floating point exception"
msgstr "eksepsi titik pecahan"
-#: main.c:1245
+#: main.c:1265
msgid "fatal error: internal error"
msgstr "fatal error: internal error"
-#: main.c:1260
+#: main.c:1280
msgid "fatal error: internal error: segfault"
msgstr "fatal error: internal error: segfault"
-#: main.c:1272
+#: main.c:1292
msgid "fatal error: internal error: stack overflow"
msgstr "fatal error: internal error: stack overflow"
-#: main.c:1322
+#: main.c:1342
#, c-format
msgid "no pre-opened fd %d"
msgstr "tidak ada pre-opened fd %d"
-#: main.c:1329
+#: main.c:1349
#, c-format
msgid "could not pre-open /dev/null for fd %d"
msgstr "tidak dapat pre-open /dev/null untuk fd %d"
-#: main.c:1352 main.c:1361
+#: main.c:1372 main.c:1381
#, c-format
msgid "could not find groups: %s"
msgstr "tidak dapat menemukan grup: %s"
-#: msg.c:54
+#: msg.c:62
#, c-format
msgid "cmd. line:"
msgstr "cmd. baris:"
-#: msg.c:120
+#: msg.c:97
msgid "warning: "
msgstr "peringatan: "
-#: msg.c:142
+#: msg.c:106
msgid "error: "
msgstr "error: "
-#: msg.c:178
+#: msg.c:129
msgid "fatal: "
msgstr "fatal: "
-#: node.c:63 node.c:78 node.c:105 node.c:121 node.c:151
-msgid "can't convert string to float"
-msgstr "tidak dapat mengubah string ke float"
-
-#: node.c:465
+#: node.c:401
msgid "backslash at end of string"
msgstr "backslash di akhir dari string"
-#: node.c:609
+#: node.c:502
#, c-format
msgid "old awk does not support the `\\%c' escape sequence"
msgstr "awk lama tidak mendukung escape sequence `\\%c'"
-#: node.c:660
+#: node.c:553
msgid "POSIX does not allow `\\x' escapes"
msgstr "POSIX tidak mengijinkan escapes `\\x'"
-#: node.c:666
+#: node.c:559
msgid "no hex digits in `\\x' escape sequence"
msgstr "tidak ada digit heksa dalam escape sequence `\\x'"
-#: node.c:688
+#: node.c:581
#, c-format
msgid ""
"hex escape \\x%.*s of %d characters probably not interpreted the way you "
@@ -1936,86 +1868,56 @@ msgstr ""
"hex escape \\x%.*s dari karakter %d mungkin tidak dapat diinterpretrasikan "
"seperti yang anda kira"
-#: node.c:703
+#: node.c:596
#, c-format
msgid "escape sequence `\\%c' treated as plain `%c'"
msgstr "escape sequence `\\%c' diperlakukan sebagai plain `%c'"
+#: node.c:737
+msgid ""
+"Invalid multibyte data detected. There may be a mismatch between your data "
+"and your locale."
+msgstr ""
+
#: posix/gawkmisc.c:172
#, c-format
msgid "%s %s `%s': could not set close-on-exec: (fcntl: %s)"
msgstr "%s %s `%s': tidak dapat menset close-on-exec: (fcntl: %s)"
-#: profile.c:94
+#: profile.c:83
#, c-format
msgid "could not open `%s' for writing: %s"
msgstr "tidak dapat membuka `%s' untuk penulisan: %s"
-#: profile.c:457
-#, c-format
-msgid "internal error: %s with null vname"
-msgstr "internal error: %s dengan null vname"
-
-#: profile.c:522
-msgid "# treated internally as `delete'"
-msgstr "# diperlakukan secara internal sebagai `delete'"
-
-#: profile.c:1076
-#, c-format
-msgid "# this is a dynamically loaded extension function"
-msgstr "# ini adalah sebuah fungsi yang secara dinamis diload ekstensi"
-
-#: profile.c:1109
-#, c-format
-msgid "\t# gawk profile, created %s\n"
-msgstr "\t# gawk profile, dibuat %s\n"
-
-#: profile.c:1112
-#, c-format
-msgid ""
-"\t# BEGIN block(s)\n"
-"\n"
-msgstr ""
-"\t # BEGIN blok\n"
-"\n"
-
-#: profile.c:1122
+#: profile.c:203
#, fuzzy, c-format
msgid ""
-"\t# BEGINFILE block(s)\n"
+"\t# %s block(s)\n"
"\n"
msgstr ""
-"\t # BEGIN blok\n"
+"\t# END blok\n"
"\n"
-#: profile.c:1132
-#, c-format
+#: profile.c:208
+#, fuzzy, c-format
msgid ""
-"\t# Rule(s)\n"
+"\t# %s(s)\n"
"\n"
msgstr ""
"\t# Aturan\n"
"\n"
-#: profile.c:1138
-#, fuzzy, c-format
-msgid ""
-"\t# ENDFILE block(s)\n"
-"\n"
-msgstr ""
-"\t# END blok\n"
-"\n"
+#: profile.c:278
+#, c-format
+msgid "internal error: %s with null vname"
+msgstr "internal error: %s dengan null vname"
-#: profile.c:1148
+#: profile.c:945
#, c-format
-msgid ""
-"\t# END block(s)\n"
-"\n"
-msgstr ""
-"\t# END blok\n"
-"\n"
+msgid "\t# gawk profile, created %s\n"
+msgstr "\t# gawk profile, dibuat %s\n"
-#: profile.c:1168
+#: profile.c:1328
#, c-format
msgid ""
"\n"
@@ -2024,17 +1926,12 @@ msgstr ""
"\n"
"\t# Fungsi, terdaftar secara alphabet\n"
-#: profile.c:1431
+#: profile.c:1367
#, c-format
-msgid "unexpected type %s in prec_level"
-msgstr "tipe %s tidak terduga dalam prec_level"
-
-#: profile.c:1557
-#, c-format
-msgid "Unknown node type %s in pp_var"
-msgstr "tipe titik %s dalam pp_var tidak diketahui"
+msgid "redir2str: unknown redirection type %d"
+msgstr ""
-#: re.c:537
+#: re.c:559
#, c-format
msgid "regexp component `%.*s' should probably be `[%.*s]'"
msgstr ""
@@ -2107,10 +2004,33 @@ msgstr "Ekspresi regular terlalu besar"
msgid "Unmatched ) or \\)"
msgstr "Tidak cocok ) atau \\)"
-#: regcomp.c:699
+#: regcomp.c:701
msgid "No previous regular expression"
msgstr "Tidak ada ekspresi regular sebelumnya"
+#~ msgid "call of `length' without parentheses is deprecated by POSIX"
+#~ msgstr ""
+#~ "panggilan dari `length' tanpa tanda kurung sudah ditinggalkan oleh POSIX"
+
+#, fuzzy
+#~ msgid "reference to uninitialized field `$%s'"
+#~ msgstr "referensi ke field tidak terinisialisasi `$%d'"
+
+#~ msgid "can't convert string to float"
+#~ msgstr "tidak dapat mengubah string ke float"
+
+#~ msgid "`continue' outside a loop is not portable"
+#~ msgstr "`continue' diluar sebuah loop tidak portabel"
+
+#~ msgid "`break' outside a loop is not portable"
+#~ msgstr "`break' diluar sebuah loop adalah tidak portabel"
+
+#~ msgid "`nextfile' cannot be called from a BEGIN rule"
+#~ msgstr "`nextfile' tidak dapat dipanggil dari sebuah aturan BEGIN"
+
+#~ msgid "`next' cannot be called from a BEGIN rule"
+#~ msgstr "`next' tidak dapat dipanggil dari sebuah aturan BEGIN"
+
#~ msgid "file `%s' is a directory"
#~ msgstr "berkas `%s' adalah sebuah direktori"
@@ -2126,14 +2046,122 @@ msgstr "Tidak ada ekspresi regular sebelumnya"
#~ msgid "\t-W copyleft\t\t--copyleft\n"
#~ msgstr "\t-W copyleft\t\t--copyleft\n"
-#~ msgid "\t-W traditional\t\t--traditional\n"
-#~ msgstr "\t-W tradisional\t\t--traditional\n"
-
#~ msgid "\t-W usage\t\t--usage\n"
#~ msgstr "\t-W penggunaan\t\t--usage\n"
+#~ msgid ""
+#~ "\t# BEGIN block(s)\n"
+#~ "\n"
+#~ msgstr ""
+#~ "\t # BEGIN blok\n"
+#~ "\n"
+
+#~ msgid "must use `count$' on all formats or none"
+#~ msgstr "harus menggunakan `count$' di semua format atau tidak sama sekali"
+
+#~ msgid "field width is ignored for `%%%%' specifier"
+#~ msgstr "lebar daerah diabaikan untuk penspesifikasi `%%%%'"
+
+#~ msgid "precision is ignored for `%%%%' specifier"
+#~ msgstr "ketepatan diabaikan untuk penspesifikasi `%%%%'"
+
+#~ msgid "field width and precision are ignored for `%%%%' specifier"
+#~ msgstr "lebar daerah dan presisi diabaikan untuk penspesifikasi `%%%%'"
+
+#~ msgid "`$' is not permitted in awk formats"
+#~ msgstr "`$' tidak diijinkan dalam format awk"
+
+#~ msgid "arg count with `$' must be > 0"
+#~ msgstr "arg count dengan `$' harus > 0"
+
+#~ msgid "arg count %ld greater than total number of supplied arguments"
+#~ msgstr ""
+#~ "arg count %ld lebih besar dari jumlah total dari argumen yang diberikan"
+
+#~ msgid "`$' not permitted after period in format"
+#~ msgstr "`$' tidak diijinkan setelah periode dalam format"
+
+#~ msgid "no `$' supplied for positional field width or precision"
+#~ msgstr ""
+#~ "tidak ada `$' yang diberikan untuk posisional field width atau presisi"
+
+#~ msgid "`l' is meaningless in awk formats; ignored"
+#~ msgstr "`l' tidak berarti dalam format awk; diabaikan"
+
+#~ msgid "`l' is not permitted in POSIX awk formats"
+#~ msgstr "`l' tidak diijinkan dalam format POSIX awk"
+
+#~ msgid "`L' is meaningless in awk formats; ignored"
+#~ msgstr "`L' tidak berarti dalam format awk; diabaikan"
+
+#~ msgid "`L' is not permitted in POSIX awk formats"
+#~ msgstr "`L' tidak diijinkan dalam format awk POSIX"
+
+#~ msgid "`h' is meaningless in awk formats; ignored"
+#~ msgstr "`h' tidak berarti dalam format awk; diabaikan"
+
+#~ msgid "`h' is not permitted in POSIX awk formats"
+#~ msgstr "`h' tidak diijinkan dalam format awk POSIX"
+
+#~ msgid "[s]printf: value %g is out of range for `%%%c' format"
+#~ msgstr "[s]printf: nilai %g diluar dari jangkauan untuk format `%%%c'"
+
+#~ msgid ""
+#~ "ignoring unknown format specifier character `%c': no argument converted"
+#~ msgstr ""
+#~ "mengabaikan format tidak dikenal karakter penspesifikasi `%c': tidak ada "
+#~ "argumen yang diubah"
+
+#~ msgid "not enough arguments to satisfy format string"
+#~ msgstr "tidak cukup argumen untuk memuaskan format string"
+
+#~ msgid "^ ran out for this one"
+#~ msgstr "^ kehabisan untuk yang ini"
+
+#~ msgid "[s]printf: format specifier does not have control letter"
+#~ msgstr "[s]printf: penspesifikasi format tidak memiliki pengontrol huruf"
+
+#~ msgid "too many arguments supplied for format string"
+#~ msgstr "terlalu banyak argumen diberikan untuk format string"
+
+#, fuzzy
+#~ msgid "attempt to use array parameter `%s' in a scalar context"
+#~ msgstr "mencoba menggunakan array `%s' dalam sebuah konteks skalar"
+
#~ msgid "can't open two way socket `%s' for input/output (%s)"
#~ msgstr "tidak dapat membuka socket dua arah `%s' untuk input/output (%s)"
+#~ msgid "length: untyped argument will be forced to scalar"
+#~ msgstr "length: argument tidak terketik akan dipaksa ke skalar"
+
+#~ msgid ""
+#~ "concatenation: side effects in one expression have changed the length of "
+#~ "another!"
+#~ msgstr ""
+#~ "concatenation: efek samping dalam satu ekspresi telah mengubah panjang "
+#~ "dari yang lain!"
+
+#~ msgid "illegal type (%s) in tree_eval"
+#~ msgstr "tipe (%s) tidak legal dalam tree_eval"
+
+#~ msgid "\t# -- main --\n"
+#~ msgstr "\t# -- main --\n"
+
+#~ msgid "invalid tree type %s in redirect()"
+#~ msgstr "tipe tree %s tidak valid dalam redirect()"
+
+#, fuzzy
+#~ msgid "# treated internally as `delete'"
+#~ msgstr "# diperlakukan secara internal sebagai 'delete'"
+
+#~ msgid "# this is a dynamically loaded extension function"
+#~ msgstr "# ini adalah sebuah fungsi yang secara dinamis diload ekstensi"
+
+#~ msgid "unexpected type %s in prec_level"
+#~ msgstr "tipe %s tidak terduga dalam prec_level"
+
+#~ msgid "Unknown node type %s in pp_var"
+#~ msgstr "tipe titik %s dalam pp_var tidak diketahui"
+
#~ msgid "%s: illegal option -- %c\n"
#~ msgstr "%s: pilihan tidak legal -- %c\n"
diff --git a/po/it.gmo b/po/it.gmo
index 7f49a1e7..79ffc92a 100644
--- a/po/it.gmo
+++ b/po/it.gmo
Binary files differ
diff --git a/po/it.po b/po/it.po
index f64ce9a4..98fcc578 100644
--- a/po/it.po
+++ b/po/it.po
@@ -6,412 +6,493 @@ msgid ""
msgstr ""
"Project-Id-Version: gawk 3.1.5h\n"
"Report-Msgid-Bugs-To: arnold@skeeve.com\n"
-"POT-Creation-Date: 2010-11-12 12:20+0200\n"
-"PO-Revision-Date: 2007-09-30 23:20+0100\n"
+"POT-Creation-Date: 2010-11-17 08:48+0200\n"
+"PO-Revision-Date: 2009-06-19 18:20+0100\n"
"Last-Translator: Antonio Colombo <azc100@gmail.com>\n"
"Language-Team: Italian <it@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=ISO-8859-1\n"
"Content-Transfer-Encoding: 8-bit\n"
-#: array.c:112
+#: array.c:103
+#, c-format
+msgid "from %s"
+msgstr "da %s"
+
+#: array.c:267
+#, fuzzy
+msgid "attempt to use a scalar value as array"
+msgstr "tentativo di usare scalare '%s' come vettore"
+
+#: array.c:270
#, c-format
msgid "attempt to use function `%s' as an array"
msgstr "tentativo di usare funzione '%s' come vettore"
-#: array.c:115
+#: array.c:273
#, c-format
msgid "attempt to use scalar parameter `%s' as an array"
msgstr "tentativo di unare il parametro scalare `%s' come un vettore"
-#: array.c:118
+#: array.c:276
#, c-format
msgid "attempt to use scalar `%s' as array"
msgstr "tentativo di usare scalare '%s' come vettore"
-#: array.c:156
+#: array.c:321 array.c:648 eval.c:1075 eval.c:1079 eval.c:1581 eval.c:1649
+#: eval.c:1928
#, c-format
-msgid "from %s"
-msgstr "da %s"
+msgid "attempt to use array `%s' in a scalar context"
+msgstr "tentativo di usare vettore `%s' in un contesto scalare"
-#: array.c:513
-#, c-format
+#: array.c:570
+#, fuzzy, c-format
msgid "reference to uninitialized element `%s[\"%.*s\"]'"
-msgstr "riferimento a elemento non inizializzato `%s[\"%.*s\"]'"
+msgstr "referenza a elemento non inizializzato `%s[\"%s\"]'"
-#: array.c:519
+#: array.c:576
#, c-format
msgid "subscript of array `%s' is null string"
msgstr "l'indice del vettore '%s' è una stringa nulla"
-#: array.c:623
+#: array.c:684
#, c-format
msgid "delete: index `%s' not in array `%s'"
msgstr "delete: indice `%s' non presente nel vettore `%s'"
-#: array.c:792
+#: array.c:705
+#, fuzzy, c-format
+msgid "attempt to use scalar `%s[\"%.*s\"]' as an array"
+msgstr "tentativo di usare scalare '%s' come vettore"
+
+#: array.c:868
#, c-format
msgid "%s: empty (null)\n"
msgstr "%s: vuoto (nullo)\n"
-#: array.c:797
+#: array.c:873
#, c-format
msgid "%s: empty (zero)\n"
msgstr "%s: vuoto (zero)\n"
-#: array.c:801
+#: array.c:877
#, c-format
msgid "%s: table_size = %d, array_size = %d\n"
msgstr "%s: dimensione_tabella = %d, dimensione_vettore = %d\n"
-#: array.c:830
+#: array.c:912
#, c-format
msgid "%s: is parameter\n"
msgstr "%s: è parametro\n"
-#: array.c:835
+#: array.c:916
#, c-format
msgid "%s: array_ref to %s\n"
-msgstr "%s: riferimento_vettoriale a %s\n"
+msgstr "%s: referenza_vettoriale a %s\n"
+
+#: array.c:921
+#, fuzzy
+msgid "adump: argument not an array"
+msgstr "match: il terzo argomento non è un vettore"
+
+#: array.c:1139
+#, fuzzy
+msgid "attempt to use array in a scalar context"
+msgstr "tentativo di usare vettore `%s' in un contesto scalare"
+
+#: array.c:1236
+#, fuzzy
+msgid "asort: second argument not an array"
+msgstr "split: il secondo argomento non è un vettore"
+
+#: array.c:1237
+#, fuzzy
+msgid "asorti: second argument not an array"
+msgstr "split: il secondo argomento non è un vettore"
+
+#: array.c:1245
+#, fuzzy
+msgid "asort: first argument not an array"
+msgstr "match: il terzo argomento non è un vettore"
+
+#: array.c:1246
+#, fuzzy
+msgid "asorti: first argument not an array"
+msgstr "match: il terzo argomento non è un vettore"
-#: awkgram.y:224 awkgram.y:227
+#: awkgram.y:246
#, c-format
msgid "%s blocks must have an action part"
msgstr "blocchi %s richiedono una 'azione'"
-#: awkgram.y:230
+#: awkgram.y:249
msgid "each rule must have a pattern or an action part"
msgstr "ogni regola deve avere una parte 'espressione' o una parte 'azione'"
-#: awkgram.y:266 awkgram.y:275
+#: awkgram.y:320 awkgram.y:330
msgid "old awk does not support multiple `BEGIN' or `END' rules"
msgstr "il vecchio awk non supporta più di una regola `BEGIN' o `END'"
-#: awkgram.y:304
+#: awkgram.y:367
#, c-format
msgid "`%s' is a built-in function, it cannot be redefined"
msgstr "`%s' è una funzione interna, non si può ridefinire"
-#: awkgram.y:350
+#: awkgram.y:427
msgid "regexp constant `//' looks like a C++ comment, but is not"
msgstr "espressione regolare costante `//' sembra un commento C, ma non lo è"
-#: awkgram.y:353
+#: awkgram.y:430
#, c-format
msgid "regexp constant `/%s/' looks like a C comment, but is not"
msgstr "espressione regolare costante `/%s/' sembra un commento C, ma non lo è"
-#: awkgram.y:380 awkgram.y:692
-msgid "statement may have no effect"
-msgstr "istruzione che può non aver alcun effetto"
+#: awkgram.y:735
+#, fuzzy
+msgid "`break' is not allowed outside a loop or switch"
+msgstr "`break' all'esterno di un ciclo non è consentito"
-#: awkgram.y:477 awkgram.y:480 awkgram.y:504 awkgram.y:511 awkgram.y:518
-#, c-format
-msgid "`%s' used in %s action"
+#: awkgram.y:744
+#, fuzzy
+msgid "`continue' is not allowed outside a loop"
+msgstr "`continue' all'esterno di un ciclo non è consentito"
+
+#: awkgram.y:753
+#, fuzzy, c-format
+msgid "`next' used in %s action"
msgstr "`%s' usato in 'azione' %s"
-#: awkgram.y:495 awkgram.y:499
+#: awkgram.y:767 awkgram.y:771
msgid "`nextfile' is a gawk extension"
msgstr "`nextfile' è un'estensione gawk"
-#: awkgram.y:528
+#: awkgram.y:775
+#, fuzzy, c-format
+msgid "`nextfile' used in %s action"
+msgstr "`%s' usato in 'azione' %s"
+
+#: awkgram.y:799
msgid "`return' used outside function context"
msgstr "`return' usato fuori da una funzione"
-#: awkgram.y:570
+#: awkgram.y:859
msgid "plain `print' in BEGIN or END rule should probably be `print \"\"'"
msgstr "`print' da solo in BEGIN o END dovrebbe forse essere `print \"\"'"
-#: awkgram.y:586 awkgram.y:594
+#: awkgram.y:927 awkgram.y:935
msgid "`delete array' is a gawk extension"
msgstr "`delete array' è un'estensione gawk"
-#: awkgram.y:608 awkgram.y:616
+#: awkgram.y:955 awkgram.y:963
msgid "`delete(array)' is a non-portable tawk extension"
msgstr "`delete(array)' è un'estensione tawk non-portabile"
-#: awkgram.y:660
+#: awkgram.y:1004
#, c-format
msgid "duplicate case values in switch body: %s"
msgstr "valori di 'case' doppi all'interno di uno 'switch': %s"
-#: awkgram.y:670
-msgid "Duplicate `default' detected in switch body"
+#: awkgram.y:1014
+#, fuzzy
+msgid "duplicate `default' detected in switch body"
msgstr "Valori per difetto doppi all'interno di uno 'switch'"
-#: awkgram.y:759
+#: awkgram.y:1151
msgid "multistage two-way pipelines don't work"
msgstr "'pipelines' multistadio bidirezionali non funzionano"
-#: awkgram.y:850
+#: awkgram.y:1253
msgid "regular expression on right of assignment"
msgstr "espressione regolare usata per assegnare un valore"
-#: awkgram.y:860
+#: awkgram.y:1263
msgid "regular expression on left of `~' or `!~' operator"
msgstr "espressione regolare prima di operatore `~' o `!~'"
-#: awkgram.y:866 awkgram.y:954
+#: awkgram.y:1278 awkgram.y:1423
msgid "old awk does not support the keyword `in' except after `for'"
msgstr "il vecchio awk non supporta la parola-chiave `in' se non dopo `for'"
-#: awkgram.y:872
+#: awkgram.y:1287
msgid "regular expression on right of comparison"
msgstr "espressione regolare a destra in un confronto"
-#: awkgram.y:936
+#: awkgram.y:1399
#, c-format
-msgid "`getline var' invalid inside %s rule"
+msgid "`getline var' invalid inside `%s' rule"
msgstr ""
-#: awkgram.y:939
+#: awkgram.y:1401
#, c-format
-msgid "`getline' invalid inside %s rule"
+msgid "`getline' invalid inside `%s' rule"
msgstr ""
-#: awkgram.y:944
+#: awkgram.y:1407
msgid "non-redirected `getline' undefined inside END action"
msgstr "`getline' non re-diretta indefinita dentro 'azione' END"
-#: awkgram.y:955
+#: awkgram.y:1424
msgid "old awk does not support multidimensional arrays"
msgstr "il vecchio awk non supporta vettori multidimensionali"
-#: awkgram.y:1001
+#: awkgram.y:1528
msgid "call of `length' without parentheses is not portable"
msgstr "chiamata a `length' senza parentesi non portabile"
-#: awkgram.y:1006
-msgid "call of `length' without parentheses is deprecated by POSIX"
-msgstr "chiamata a `length' senza parentesi sconsigliata da POSIX"
-
-#: awkgram.y:1051
+#: awkgram.y:1591
#, fuzzy
msgid "indirect function calls are a gawk extension"
-msgstr "`extension' è un'estensione gawk"
+msgstr "`nextfile' è un'estensione gawk"
-#: awkgram.y:1084
-msgid "use of non-array as array"
-msgstr "uso di non-vettore come vettore"
+#: awkgram.y:1605
+#, fuzzy, c-format
+msgid "can not use special variable `%s' for indirect function call"
+msgstr ""
+"funzione `%s': non posso usare la variabile speciale `%s' come parametro di "
+"funzione"
-#: awkgram.y:1087
+#: awkgram.y:1682
msgid "invalid subscript expression"
msgstr "espressione indice invalida"
-#: awkgram.y:1329
+#: awkgram.y:1722
+msgid "use of non-array as array"
+msgstr "uso di non-vettore come vettore"
+
+#: awkgram.y:1993
msgid "unexpected newline or end of string"
msgstr "carattere 'a capo' o fine stringa inaspettati"
-#: awkgram.y:1446
-msgid "empty program text on command line"
-msgstr "programma nullo sulla linea comandi"
-
-#: awkgram.y:1502
+#: awkgram.y:2248 awkgram.y:2296 awkgram.y:2470
#, c-format
msgid "can't open source file `%s' for reading (%s)"
msgstr "non riesco ad aprire file sorgente `%s' in lettura (%s)"
-#: awkgram.y:1600
+#: awkgram.y:2249 awkgram.y:2297 builtin.c:122
+msgid "reason unknown"
+msgstr "ragione indeterminata"
+
+#: awkgram.y:2257
+#, fuzzy, c-format
+msgid "already included source file `%s'"
+msgstr "non riesco a leggere file sorgente `%s' (%s)"
+
+#: awkgram.y:2281
+#, fuzzy
+msgid "@include is a gawk extension"
+msgstr "`nextfile' è un'estensione gawk"
+
+#: awkgram.y:2288
+msgid "empty filename after @include"
+msgstr ""
+
+#: awkgram.y:2422
+msgid "empty program text on command line"
+msgstr "programma nullo sulla linea comandi"
+
+#: awkgram.y:2537
#, c-format
msgid "can't read sourcefile `%s' (%s)"
msgstr "non riesco a leggere file sorgente `%s' (%s)"
-#: awkgram.y:1608
+#: awkgram.y:2547
#, c-format
msgid "source file `%s' is empty"
msgstr "file sorgente `%s' vuoto"
-#: awkgram.y:1800 awkgram.y:1922 awkgram.y:1940 awkgram.y:2315 awkgram.y:2407
+#: awkgram.y:2732
msgid "source file does not end in newline"
msgstr "file sorgente non termina con carattere 'a capo'"
-#: awkgram.y:1862
+#: awkgram.y:2809
msgid "unterminated regexp ends with `\\' at end of file"
msgstr "espressione regolare non completata termina con `\\' a fine file"
-#: awkgram.y:1886
+#: awkgram.y:2833
#, c-format
msgid "%s: %d: tawk regex modifier `/.../%c' doesn't work in gawk"
msgstr ""
"%s: %d: modificatore di espressione regolare tawk `/.../%c' non valido in "
"gawk"
-#: awkgram.y:1890
+#: awkgram.y:2837
#, c-format
msgid "tawk regex modifier `/.../%c' doesn't work in gawk"
msgstr "modificatore di espressione regolare tawk `/.../%c' non valido in gawk"
-#: awkgram.y:1897
+#: awkgram.y:2844
msgid "unterminated regexp"
msgstr "espressione regolare non completata"
-#: awkgram.y:1900
+#: awkgram.y:2848
msgid "unterminated regexp at end of file"
msgstr "espressione regolare non completata a fine file"
-#: awkgram.y:1969
+#: awkgram.y:2907
msgid "use of `\\ #...' line continuation is not portable"
msgstr "uso di `\\ #...' continuazione linea non portabile"
-#: awkgram.y:1982
+#: awkgram.y:2923
msgid "backslash not last character on line"
msgstr "'\\' non è l'ultimo carattere della linea"
-#: awkgram.y:2027
+#: awkgram.y:2984
msgid "POSIX does not allow operator `**='"
msgstr "POSIX non permette l'operatore `**='"
-#: awkgram.y:2029
+#: awkgram.y:2986
msgid "old awk does not support operator `**='"
msgstr "il vecchio awk non supporta l'operatore `**='"
-#: awkgram.y:2038
+#: awkgram.y:2995
msgid "POSIX does not allow operator `**'"
msgstr "POSIX non permette l'operatore `**'"
-#: awkgram.y:2040
+#: awkgram.y:2997
msgid "old awk does not support operator `**'"
msgstr "il vecchio awk non supporta l'operatore `**'"
-#: awkgram.y:2071
+#: awkgram.y:3032
msgid "operator `^=' is not supported in old awk"
msgstr "l'operatore `^=' non è supportato nel vecchio awk"
-#: awkgram.y:2079
+#: awkgram.y:3040
msgid "operator `^' is not supported in old awk"
msgstr "l'operatore `^' non è supportato nel vecchio awk"
-#: awkgram.y:2163 awkgram.y:2178
+#: awkgram.y:3133 awkgram.y:3149
msgid "unterminated string"
msgstr "stringa non terminata"
-#: awkgram.y:2368
+#: awkgram.y:3345
#, c-format
msgid "invalid char '%c' in expression"
-msgstr "carattere '%c' invalido in un'espressione"
+msgstr "carattere '%c' non valido in un'espressione"
-#: awkgram.y:2416
+#: awkgram.y:3391
#, c-format
msgid "`%s' is a gawk extension"
msgstr "`%s' è un'estensione gawk"
-#: awkgram.y:2419
+#: awkgram.y:3394
#, c-format
msgid "`%s' is a Bell Labs extension"
msgstr "`%s' è un'estensione Bell Labs"
-#: awkgram.y:2422
+#: awkgram.y:3397
#, c-format
msgid "POSIX does not allow `%s'"
msgstr "POSIX non permette `%s'"
-#: awkgram.y:2426
+#: awkgram.y:3401
#, c-format
msgid "`%s' is not supported in old awk"
msgstr "`%s' non è supportato nel vecchio awk"
-#: awkgram.y:2452
+#: awkgram.y:3465
msgid "`goto' considered harmful!\n"
msgstr "`goto' considerato pericoloso!\n"
-#: awkgram.y:2514
+#: awkgram.y:3518
#, c-format
msgid "%d is invalid as number of arguments for %s"
-msgstr "%d invalido come numero di argomenti per %s"
+msgstr "%d non valido come numero di argomenti per %s"
-#: awkgram.y:2533 awkgram.y:2536
+#: awkgram.y:3544 awkgram.y:3547
msgid "match: third argument is a gawk extension"
msgstr "match: il terzo argomento è un'estensione gawk"
-#: awkgram.y:2549
+#: awkgram.y:3575
#, c-format
msgid "%s: string literal as last arg of substitute has no effect"
msgstr "%s: una stringa come ultimo argomento di 'substitute' non ha effetto"
-#: awkgram.y:2552
+#: awkgram.y:3580
#, c-format
msgid "%s third parameter is not a changeable object"
msgstr "il terzo parametro di '%s' non è un oggetto modificabile"
-#: awkgram.y:2586 awkgram.y:2589
+#: awkgram.y:3665 awkgram.y:3668
msgid "close: second argument is a gawk extension"
msgstr "close: il secondo argomento è un'estensione gawk"
-#: awkgram.y:2599
+#: awkgram.y:3680
msgid "use of dcgettext(_\"...\") is incorrect: remove leading underscore"
msgstr ""
"uso scorretto di dcgettext(_\"...\"): togliere il carattere '_' iniziale"
-#: awkgram.y:2614
+#: awkgram.y:3695
msgid "use of dcngettext(_\"...\") is incorrect: remove leading underscore"
msgstr ""
"uso scorretto di dcngettext(_\"...\"): togliere il carattere '_' iniziale"
-#: awkgram.y:2686
+#: awkgram.y:3787
#, c-format
msgid "function `%s': parameter #%d, `%s', duplicates parameter #%d"
msgstr "funzione `%s': parametro #%d, `%s', duplica parametro #%d"
-#: awkgram.y:2719
+#: awkgram.y:3829
#, c-format
msgid "function `%s': parameter `%s' shadows global variable"
msgstr "funzione `%s': parametro `%s' nasconde variabile globale"
-#: awkgram.y:2831
+#: awkgram.y:3987
#, c-format
msgid "could not open `%s' for writing (%s)"
msgstr "non riesco ad aprire `%s' in scrittura (%s)"
-#: awkgram.y:2832 profile.c:96
+#: awkgram.y:3988 profile.c:85
msgid "sending profile to standard error"
msgstr "mando profilo a 'standard error'"
-#: awkgram.y:2864
+#: awkgram.y:3994
#, c-format
msgid "%s: close failed (%s)"
msgstr "%s: 'close' fallita (%s)"
-#: awkgram.y:2985
+#: awkgram.y:4046
msgid "shadow_funcs() called twice!"
msgstr "shadow_funcs() chiamata due volte!"
-#: awkgram.y:3012
+#: awkgram.y:4052
msgid "there were shadowed variables."
msgstr "c'erano variabili nascoste."
-#: awkgram.y:3085
+#: awkgram.y:4081
#, c-format
msgid "function `%s': can't use function name as parameter name"
msgstr "funzione `%s': non posso usare nome della funzione come nome parametro"
-#: awkgram.y:3088
-#, fuzzy, c-format
+#: awkgram.y:4086
+#, c-format
msgid "function `%s': can't use special variable `%s' as a function parameter"
-msgstr "funzione `%s': non posso usare nome della funzione come nome parametro"
+msgstr ""
+"funzione `%s': non posso usare la variabile speciale `%s' come parametro di "
+"funzione"
-#: awkgram.y:3098
+#: awkgram.y:4102
#, c-format
msgid "function name `%s' previously defined"
msgstr "funzione di nome `%s' definita in precedenza"
-#: awkgram.y:3249 awkgram.y:3255
+#: awkgram.y:4271 awkgram.y:4277
#, c-format
msgid "function `%s' called but never defined"
msgstr "funzione `%s' chiamata ma mai definita"
-#: awkgram.y:3258
+#: awkgram.y:4280
#, c-format
msgid "function `%s' defined but never called"
msgstr "funzione `%s' definita ma mai chiamata"
-#: awkgram.y:3285
+#: awkgram.y:4311
#, c-format
msgid "regexp constant for parameter #%d yields boolean value"
msgstr ""
"espressione regolare di valore costante per parametro #%d genera valore "
"booleano"
-#: awkgram.y:3329
+#: awkgram.y:4420
#, c-format
msgid ""
"function `%s' called with space between name and `(',\n"
@@ -420,238 +501,142 @@ msgstr ""
"funzione `%s' chiamata con spazio tra il nome e `(',\n"
"o usata come variabile o vettore"
-#: awkgram.y:3750
-msgid "division by zero attempted in `/'"
-msgstr "divisione per zero tentata in `/'"
+#: awkgram.y:4673 eval.c:1845
+msgid "division by zero attempted"
+msgstr "tentativo di dividere per zero"
-#: awkgram.y:3755 eval.c:1411
+#: awkgram.y:4682 eval.c:1877
#, c-format
msgid "division by zero attempted in `%%'"
msgstr "divisione per zero tentata in `%%'"
-#: builtin.c:122
+#: awkgram.y:5342
+msgid "statement may have no effect"
+msgstr "istruzione che può non aver alcun effetto"
+
+#: builtin.c:120
#, c-format
msgid "%s to \"%s\" failed (%s)"
msgstr "%s a \"%s\" fallita (%s)"
-#: builtin.c:123
+#: builtin.c:121
msgid "standard output"
msgstr "standard output"
-#: builtin.c:124
-msgid "reason unknown"
-msgstr "ragione indeterminata"
-
-#: builtin.c:137
+#: builtin.c:135
msgid "exp: received non-numeric argument"
msgstr "exp: argomento non numerico"
-#: builtin.c:143
+#: builtin.c:141
#, c-format
msgid "exp: argument %g is out of range"
msgstr "exp: argomento %g non accettabile"
-#: builtin.c:201
+#: builtin.c:200
#, c-format
msgid "fflush: cannot flush: pipe `%s' opened for reading, not writing"
msgstr ""
"fflush: non posso scaricare: 'pipe' `%s' aperta in lettura, non in scrittura"
-#: builtin.c:204
+#: builtin.c:203
#, c-format
msgid "fflush: cannot flush: file `%s' opened for reading, not writing"
msgstr ""
"fflush: non posso scaricare: file `%s' aperto in lettura, non in scrittura"
-#: builtin.c:216
+#: builtin.c:215
#, c-format
msgid "fflush: `%s' is not an open file, pipe or co-process"
msgstr "fflush: `%s' non è un file aperto, una 'pipe' o un co-processo"
-#: builtin.c:310
+#: builtin.c:322
msgid "index: received non-string first argument"
msgstr "index: il primo argomento non è una stringa"
-#: builtin.c:312
+#: builtin.c:324
msgid "index: received non-string second argument"
msgstr "index: il secondo argomento non è una stringa"
-#: builtin.c:434
+#: builtin.c:446
msgid "int: received non-numeric argument"
msgstr "int: argomento non numerico"
-#: builtin.c:464
+#: builtin.c:469
+#, fuzzy
msgid "`length(array)' is a gawk extension"
msgstr "`length(array)' è un'estensione gawk"
-#: builtin.c:471
-msgid "length: untyped parameter argument will be forced to scalar"
-msgstr "length: il parametro omesso sarà ritenuto scalare"
-
-#: builtin.c:480
-msgid "length: untyped argument will be forced to scalar"
-msgstr "length: l'argomento omesso sarà ritenuto scalare"
-
-#: builtin.c:484
+#: builtin.c:477
msgid "length: received non-string argument"
msgstr "length: l'argomento non è una stringa"
-#: builtin.c:515
+#: builtin.c:508
msgid "log: received non-numeric argument"
msgstr "log: argomento non numerico"
-#: builtin.c:518
+#: builtin.c:511
#, c-format
msgid "log: received negative argument %g"
msgstr "log: argomento negativo %g"
-#: builtin.c:726 builtin.c:729
-msgid "must use `count$' on all formats or none"
-msgstr "'count$' va usato per tutti i formati o per nessuno"
-
-#: builtin.c:790
-#, c-format
-msgid "field width is ignored for `%%%%' specifier"
-msgstr "larghezza campo ignorata per lo specificatore `%%%%'"
-
-#: builtin.c:792
-#, c-format
-msgid "precision is ignored for `%%%%' specifier"
-msgstr "precisione ignorata per lo specificatore `%%%%'"
-
-#: builtin.c:794
-#, c-format
-msgid "field width and precision are ignored for `%%%%' specifier"
-msgstr "larghezza e precisione ignorate per lo specificatore `%%%%'"
-
-#: builtin.c:845
-msgid "`$' is not permitted in awk formats"
-msgstr "`$' non permesso nei 'format' awk"
-
-#: builtin.c:851
-msgid "arg count with `$' must be > 0"
-msgstr "il numero di argomento con `$' deve essere > 0"
-
-#: builtin.c:853
-#, c-format
-msgid "arg count %ld greater than total number of supplied arguments"
-msgstr ""
-"numero di argomenti (%ld) maggiore del numero totale di argomenti specificati"
-
-#: builtin.c:855
-msgid "`$' not permitted after period in format"
-msgstr "`$' non permesso dopo un punto nel 'format'"
-
-#: builtin.c:868
-msgid "no `$' supplied for positional field width or precision"
-msgstr ""
-"nessun `$' specificato per larghezza o precisione di un campo posizionale"
-
-#: builtin.c:938
-msgid "`l' is meaningless in awk formats; ignored"
-msgstr "`l' non ha senso nei 'format' awk; ignorata"
-
-#: builtin.c:942
-msgid "`l' is not permitted in POSIX awk formats"
-msgstr "`l' non permessa nei 'format' awk POSIX"
-
-#: builtin.c:953
-msgid "`L' is meaningless in awk formats; ignored"
-msgstr "`L' non ha senso nei 'format' awk; ignorata"
-
-#: builtin.c:957
-msgid "`L' is not permitted in POSIX awk formats"
-msgstr "`L' non permessa nei 'format' awk POSIX"
-
-#: builtin.c:968
-msgid "`h' is meaningless in awk formats; ignored"
-msgstr "`h' non ha senso nei 'format' awk; ignorata"
-
-#: builtin.c:972
-msgid "`h' is not permitted in POSIX awk formats"
-msgstr "`h' non permessa nei 'format' awk POSIX"
-
-#: builtin.c:1252
-#, c-format
-msgid "[s]printf: value %g is out of range for `%%%c' format"
-msgstr "[s]printf: valore %g non accettabile per il 'format' `%%%c'"
-
-#: builtin.c:1332
-#, c-format
-msgid "ignoring unknown format specifier character `%c': no argument converted"
-msgstr ""
-"lettera ignota di specifica 'format' `%c' ignorato: nessun argomento "
-"convertito"
-
-#: builtin.c:1338
-msgid "not enough arguments to satisfy format string"
-msgstr "mancano argomenti per completare il 'format'"
-
-#: builtin.c:1340
-msgid "^ ran out for this one"
-msgstr "^ uscito per questo"
-
-#: builtin.c:1346
-msgid "[s]printf: format specifier does not have control letter"
-msgstr "[s]printf: il designatore di 'format' non ha una lettera di controllo"
-
-#: builtin.c:1349
-msgid "too many arguments supplied for format string"
-msgstr "troppi argomenti specificati per il 'format'"
+#: builtin.c:531 builtin.c:573 builtin.c:586 builtin.c:982 builtin.c:994
+#, fuzzy, c-format
+msgid "attempt to use array `%s' in scalar context"
+msgstr "tentativo di usare vettore `%s' in un contesto scalare"
-#: builtin.c:1424 builtin.c:1427
+#: builtin.c:569 builtin.c:580
msgid "printf: no arguments"
msgstr "printf: manca argomento"
-#: builtin.c:1451
+#: builtin.c:621
msgid "sqrt: received non-numeric argument"
msgstr "sqrt: argomento non numerico"
-#: builtin.c:1455
+#: builtin.c:625
#, c-format
msgid "sqrt: called with negative argument %g"
msgstr "sqrt: chiamata con argomento negativo %g"
-#: builtin.c:1479
-#, c-format
-msgid "substr: start index %g is invalid, using 1"
-msgstr "substr: indice di partenza %g non valido, uso 1"
-
-#: builtin.c:1484
-#, c-format
-msgid "substr: non-integer start index %g will be truncated"
-msgstr "substr: indice di partenza non intero %g: sarà troncato"
-
-#: builtin.c:1510
+#: builtin.c:649
#, c-format
msgid "substr: length %g is not >= 1"
msgstr "substr: lunghezza %g non >= 1"
-#: builtin.c:1512
+#: builtin.c:651
#, c-format
msgid "substr: length %g is not >= 0"
msgstr "substr: lunghezza %g non >= 0"
-#: builtin.c:1519
+#: builtin.c:658
#, c-format
msgid "substr: non-integer length %g will be truncated"
msgstr "substr: lunghezza non intera %g: sarà truncata"
-#: builtin.c:1524
+#: builtin.c:663
#, c-format
msgid "substr: length %g too big for string indexing, truncating to %g"
msgstr "substr: lunghezza %g troppo elevata per indice stringa, tronco a %g"
-#: builtin.c:1536
+#: builtin.c:675
+#, c-format
+msgid "substr: start index %g is invalid, using 1"
+msgstr "substr: indice di partenza %g non valido, uso 1"
+
+#: builtin.c:680
+#, c-format
+msgid "substr: non-integer start index %g will be truncated"
+msgstr "substr: indice di partenza non intero %g: sarà troncato"
+
+#: builtin.c:705
msgid "substr: source string is zero length"
msgstr "substr: stringa di partenza lunga zero"
-#: builtin.c:1552
+#: builtin.c:721
#, c-format
msgid "substr: start index %g is past end of string"
msgstr "substr: indice di partenza %g oltre la fine della stringa"
-#: builtin.c:1560
+#: builtin.c:729
#, c-format
msgid ""
"substr: length %g at start index %g exceeds length of first argument (%lu)"
@@ -659,473 +644,432 @@ msgstr ""
"substr: lunghezza %g all'indice di partenza %g supera la lunghezza del primo "
"argomento (%lu)"
-#: builtin.c:1637
+#: builtin.c:806
+msgid "strftime: received non-numeric second argument"
+msgstr "strftime: il secondo argomento non è numerico"
+
+#: builtin.c:813
msgid "strftime: received non-string first argument"
msgstr "strftime: il primo argomento non è una stringa"
-#: builtin.c:1643
+#: builtin.c:819
msgid "strftime: received empty format string"
msgstr "strftime: 'format' è una stringa nulla"
-#: builtin.c:1652
-msgid "strftime: received non-numeric second argument"
-msgstr "strftime: il secondo argomento non è numerico"
-
-#: builtin.c:1729
+#: builtin.c:885
msgid "mktime: received non-string argument"
msgstr "mktime: l'argomento non è una stringa"
-#: builtin.c:1746
+#: builtin.c:902
msgid "mktime: at least one of the values is out of the default range"
msgstr ""
-#: builtin.c:1781
+#: builtin.c:937
msgid "'system' function not allowed in sandbox mode"
msgstr ""
-#: builtin.c:1786
+#: builtin.c:942
msgid "system: received non-string argument"
msgstr "system: l'argomento non è una stringa"
-#: builtin.c:1907 eval.c:2285
+#: builtin.c:997 eval.c:1105 eval.c:1557 eval.c:1570
+#, c-format
+msgid "reference to uninitialized variable `%s'"
+msgstr "referenza a variabile non inizializzata `%s'"
+
+#: builtin.c:1064
#, c-format
msgid "reference to uninitialized field `$%d'"
msgstr "referenza a variabile non inizializzata `$%d'"
-#: builtin.c:2012
+#: builtin.c:1098
msgid "tolower: received non-string argument"
msgstr "tolower: l'argomento non è una stringa"
-#: builtin.c:2042
+#: builtin.c:1151
msgid "toupper: received non-string argument"
msgstr "toupper: l'argomento non è una stringa"
-#: builtin.c:2075
+#: builtin.c:1199
msgid "atan2: received non-numeric first argument"
msgstr "atan2: il primo argomento non è numerico"
-#: builtin.c:2077
+#: builtin.c:1201
msgid "atan2: received non-numeric second argument"
msgstr "atan2: il secondo argomento non è numerico"
-#: builtin.c:2096
+#: builtin.c:1220
msgid "sin: received non-numeric argument"
msgstr "sin: l'argomento non è numerico"
-#: builtin.c:2112
+#: builtin.c:1236
msgid "cos: received non-numeric argument"
msgstr "cos: l'argomento non è numerico"
-#: builtin.c:2165
+#: builtin.c:1289
msgid "srand: received non-numeric argument"
msgstr "srand: l'argomento non è numerico"
-#: builtin.c:2200
+#: builtin.c:1320
msgid "match: third argument is not an array"
msgstr "match: il terzo argomento non è un vettore"
-#: builtin.c:2750
+#: builtin.c:1827
msgid "gensub: third argument of 0 treated as 1"
msgstr "gensub: il terzo argomento è 0, trattato come 1"
-#: builtin.c:2866
+#: builtin.c:1869
msgid "lshift: received non-numeric first argument"
msgstr "lshift: il primo argomento non è numerico"
-#: builtin.c:2868
+#: builtin.c:1871
msgid "lshift: received non-numeric second argument"
msgstr "lshift: il secondo argomento non è numerico"
-#: builtin.c:2874
+#: builtin.c:1877
#, c-format
msgid "lshift(%lf, %lf): negative values will give strange results"
msgstr "lshift(%lf, %lf): valori negativi daranno risultati strani"
-#: builtin.c:2876
+#: builtin.c:1879
#, c-format
msgid "lshift(%lf, %lf): fractional values will be truncated"
msgstr "lshift(%lf, %lf): valori con decimali verranno troncati"
-#: builtin.c:2878
+#: builtin.c:1881
#, c-format
msgid "lshift(%lf, %lf): too large shift value will give strange results"
msgstr "lshift(%lf, %lf): valori troppo alti daranno risultati strani"
-#: builtin.c:2904
+#: builtin.c:1908
msgid "rshift: received non-numeric first argument"
msgstr "rshift: il primo argomento non è numerico"
-#: builtin.c:2906
+#: builtin.c:1910
msgid "rshift: received non-numeric second argument"
msgstr "rshift: il secondo argomento non è numerico"
-#: builtin.c:2912
+#: builtin.c:1916
#, c-format
msgid "rshift(%lf, %lf): negative values will give strange results"
msgstr "rshift(%lf, %lf): valori negativi daranno risultati strani"
-#: builtin.c:2914
+#: builtin.c:1918
#, c-format
msgid "rshift(%lf, %lf): fractional values will be truncated"
msgstr "rshift(%lf, %lf): valori con decimali verranno troncati"
-#: builtin.c:2916
+#: builtin.c:1920
#, c-format
msgid "rshift(%lf, %lf): too large shift value will give strange results"
msgstr "rshift(%lf, %lf): valori troppo alti daranno risultati strani"
-#: builtin.c:2942
+#: builtin.c:1947
msgid "and: received non-numeric first argument"
msgstr "and: il primo argomento non è numerico"
-#: builtin.c:2944
+#: builtin.c:1949
msgid "and: received non-numeric second argument"
msgstr "and: il secondo argomento non è numerico"
-#: builtin.c:2950
+#: builtin.c:1955
#, c-format
msgid "and(%lf, %lf): negative values will give strange results"
msgstr "and(%lf, %lf): valori negativi daranno risultati strani"
-#: builtin.c:2952
+#: builtin.c:1957
#, c-format
msgid "and(%lf, %lf): fractional values will be truncated"
msgstr "and(%lf, %lf): valori con decimali verranno troncati"
-#: builtin.c:2978
+#: builtin.c:1984
msgid "or: received non-numeric first argument"
msgstr "or: il primo argomento non è numerico"
-#: builtin.c:2980
+#: builtin.c:1986
msgid "or: received non-numeric second argument"
msgstr "or: il secondo argomento non è numerico"
-#: builtin.c:2986
+#: builtin.c:1992
#, c-format
msgid "or(%lf, %lf): negative values will give strange results"
msgstr "or(%lf, %lf): valori negativi daranno risultati strani"
-#: builtin.c:2988
+#: builtin.c:1994
#, c-format
msgid "or(%lf, %lf): fractional values will be truncated"
msgstr "or(%lf, %lf): valori con decimali verranno troncati"
-#: builtin.c:3014
+#: builtin.c:2023
msgid "xor: received non-numeric first argument"
msgstr "xor: il primo argomento non è numerico"
-#: builtin.c:3016
+#: builtin.c:2025
msgid "xor: received non-numeric second argument"
msgstr "xor: il secondo argomento non è numerico"
-#: builtin.c:3022
+#: builtin.c:2031
#, c-format
msgid "xor(%lf, %lf): negative values will give strange results"
msgstr "xor(%lf, %lf): valori negativi daranno risultati strani"
-#: builtin.c:3024
+#: builtin.c:2033
#, c-format
msgid "xor(%lf, %lf): fractional values will be truncated"
msgstr "xor(%lf, %lf): valori con decimali verranno troncati"
-#: builtin.c:3048
+#: builtin.c:2057 builtin.c:2063
msgid "compl: received non-numeric argument"
msgstr "compl: l'argomento non è numerico"
-#: builtin.c:3054
+#: builtin.c:2065
#, c-format
msgid "compl(%lf): negative value will give strange results"
msgstr "compl(%lf): valore negativo darà risultati strani"
-#: builtin.c:3056
+#: builtin.c:2067
#, c-format
msgid "compl(%lf): fractional value will be truncated"
msgstr "compl(%lf): valore con decimali verrà troncato"
-#: builtin.c:3229
+#: builtin.c:2237
#, c-format
msgid "dcgettext: `%s' is not a valid locale category"
msgstr "dcgettext: `%s' non è una categoria 'locale' valida"
-#: eval.c:374
+#: eval.c:412
#, c-format
msgid "unknown nodetype %d"
msgstr "tipo nodo sconosciuto %d"
-#: eval.c:423
-msgid "buffer overflow in genflags2str"
-msgstr "superament limiti buffer in 'genflags2str'"
+#: eval.c:423 eval.c:437
+#, fuzzy, c-format
+msgid "unknown opcode %d"
+msgstr "tipo nodo sconosciuto %d"
-#: eval.c:455 eval.c:461 profile.c:787
+#: eval.c:434
#, c-format
-msgid "attempt to use array `%s' in a scalar context"
-msgstr "tentativo di usare vettore `%s' in un contesto scalare"
+msgid "opcode %s not an operator or keyword"
+msgstr ""
+
+#: eval.c:487
+msgid "buffer overflow in genflags2str"
+msgstr "superament limiti buffer in 'genflags2str'"
-#: eval.c:803
+#: eval.c:613
#, c-format
-msgid "for loop: array `%s' changed size from %ld to %ld during loop execution"
+msgid ""
+"\n"
+"\t# Function Call Stack:\n"
+"\n"
msgstr ""
-"ciclo for: vettore `%s' ha cambiato dimensione da %ld a %ld durante "
-"l'esecuzione del ciclo"
-
-#: eval.c:824
-msgid "`break' outside a loop is not portable"
-msgstr "`break' all'esterno di un ciclo non è portabile"
+"\n"
+"\t# 'Stack' (Pila) Chiamate Funzione:\n"
+"\n"
-#: eval.c:828
-msgid "`break' outside a loop is not allowed"
-msgstr "`break' all'esterno di un ciclo non è consentito"
+#: eval.c:640
+msgid "`IGNORECASE' is a gawk extension"
+msgstr "`IGNORECASE' è un'estensione gawk"
-#: eval.c:845
-msgid "`continue' outside a loop is not portable"
-msgstr "`continue' all'esterno di un ciclo non è portabile"
+#: eval.c:669
+msgid "`BINMODE' is a gawk extension"
+msgstr "`BINMODE' è un'estensione gawk"
-#: eval.c:849
-msgid "`continue' outside a loop is not allowed"
-msgstr "`continue' all'esterno di un ciclo non è consentito"
+#: eval.c:727
+#, c-format
+msgid "BINMODE value `%s' is invalid, treated as 3"
+msgstr "valore di BINMODE `%s' non valido, considerato come 3"
-#: eval.c:883
-msgid "`next' cannot be called from a BEGIN rule"
-msgstr "`next' non può essere chiamato da una regola BEGIN"
+#: eval.c:817
+#, c-format
+msgid "bad `%sFMT' specification `%s'"
+msgstr "specificazione invalida `%sFMT' `%s'"
-#: eval.c:885
-msgid "`next' cannot be called from an END rule"
-msgstr "`next' non può essere chiamato da una regola END"
+#: eval.c:895
+msgid "turning off `--lint' due to assignment to `LINT'"
+msgstr "disabilito `--lint' a causa di assegnamento a `LINT'"
-#: eval.c:887
-#, fuzzy
-msgid "`next' cannot be called from a BEGINFILE rule"
-msgstr "`next' non può essere chiamato da una regola BEGIN"
+#: eval.c:1067 eval.c:1544
+#, c-format
+msgid "can't use function name `%s' as variable or array"
+msgstr "non posso usare nome di funzione `%s' come variabile o vettore"
-#: eval.c:889
-#, fuzzy
-msgid "`next' cannot be called from an ENDFILE rule"
-msgstr "`next' non può essere chiamato da una regola END"
+#: eval.c:1095
+msgid "assignment is not allowed to result of builtin function"
+msgstr "assegnamento non permesso al risultato di una funzione interna"
-#: eval.c:898
-msgid "`nextfile' cannot be called from a BEGIN rule"
-msgstr "`nextfile' non può essere chiamato da una regola BEGIN"
+#: eval.c:1104 eval.c:1556 eval.c:1569
+#, c-format
+msgid "reference to uninitialized argument `%s'"
+msgstr "referenza ad argomento non inizializzato `%s'"
-#: eval.c:900
-msgid "`nextfile' cannot be called from an END rule"
-msgstr "`nextfile' non può essere chiamato da una regola END"
+#: eval.c:1123
+msgid "attempt to field reference from non-numeric value"
+msgstr "tentativo di referenziare campo da valore non numerico"
-#: eval.c:906
+#: eval.c:1125
#, fuzzy
-msgid "`nextfile' cannot be called from an ENDFILE rule"
-msgstr "`nextfile' non può essere chiamato da una regola END"
+msgid "attempt to field reference from null string"
+msgstr "tentativo to referenziare da stringa nulla"
-#: eval.c:963
-msgid "statement has no effect"
-msgstr "istruzione che non fa nulla"
+#: eval.c:1131
+#, fuzzy, c-format
+msgid "attempt to access field %ld"
+msgstr "tentativo di accedere al campo %d"
-#: eval.c:1040 eval.c:2133
-#, c-format
-msgid "can't use function name `%s' as variable or array"
-msgstr "non posso usare nome di funzione `%s' come variabile o vettore"
+#: eval.c:1140
+#, fuzzy, c-format
+msgid "reference to uninitialized field `$%ld'"
+msgstr "referenza a variabile non inizializzata `$%d'"
-#: eval.c:1047 eval.c:1053
+#: eval.c:1202
#, c-format
-msgid "reference to uninitialized argument `%s'"
-msgstr "referenza ad argomento non inizializzato `%s'"
+msgid "function `%s' called with more arguments than declared"
+msgstr "funzione `%s' chiamata con più argomenti di quelli previsti"
-#: eval.c:1062 eval.c:2142
+#: eval.c:1358
#, c-format
-msgid "reference to uninitialized variable `%s'"
-msgstr "referenza a variabile non inizializzata `%s'"
-
-#: eval.c:1210
-msgid ""
-"concatenation: side effects in one expression have changed the length of "
-"another!"
+msgid "unwind_stack: unexpected type `%s'"
msgstr ""
-"concatenatione: effetti secondari in una espressione hanno modificato la "
-"lunghezza di un'altra espressione!"
-#: eval.c:1315
+#: eval.c:1636
+#, fuzzy, c-format
+msgid "attempt to use scalar `%s' as an array"
+msgstr "tentativo di usare scalare '%s' come vettore"
+
+#: eval.c:1680
msgid "assignment used in conditional context"
msgstr "assegnamento usato nel contesto di un test condizionale"
-#: eval.c:1396
-msgid "division by zero attempted"
-msgstr "tentativo di dividere per zero"
-
-#: eval.c:1426 profile.c:663
-#, c-format
-msgid "illegal type (%s) in tree_eval"
-msgstr "tipo non ammesso (%s) in 'tree_eval'"
+#: eval.c:1684
+msgid "statement has no effect"
+msgstr "istruzione che non fa nulla"
-#: eval.c:1589
+#: eval.c:2028
msgid "division by zero attempted in `/='"
msgstr "divisione per zero tentata in `/='"
-#: eval.c:1611
+#: eval.c:2053
#, c-format
msgid "division by zero attempted in `%%='"
msgstr "divisione per zero tentata in `%%='"
-#: eval.c:1891
-#, c-format
-msgid "function `%s' called with more arguments than declared"
-msgstr "funzione `%s' chiamata con più argomenti di quelli previsti"
-
-#: eval.c:1948
-#, c-format
-msgid "function `%s' not defined"
-msgstr "funzione `%s' non definita"
-
-#: eval.c:1950
-#, c-format
-msgid "identifier `%s' is not a function"
-msgstr ""
-
-#: eval.c:1997
-#, c-format
-msgid ""
-"function parameter `%s' is not a scalar and cannot be used for indirect "
-"function call"
-msgstr ""
-
-#: eval.c:2014
-#, c-format
-msgid "indirect call of real function `%s' is silly"
-msgstr ""
+#: eval.c:2139
+msgid "`continue' outside a loop is not allowed"
+msgstr "`continue' all'esterno di un ciclo non è consentito"
-#: eval.c:2034
-#, c-format
-msgid "function `%s' called indirectly through `%s' does not exist"
-msgstr ""
+#: eval.c:2145
+#, fuzzy
+msgid "`break' outside a loop is not allowed"
+msgstr "`break' all'esterno di un ciclo non è consentito"
-#: eval.c:2039
+#: eval.c:2229
#, c-format
-msgid "identifier `%s' cannot be used for indirect function call"
+msgid "for loop: array `%s' changed size from %ld to %ld during loop execution"
msgstr ""
+"ciclo for: vettore `%s' ha cambiato dimensione da %ld a %ld durante "
+"l'esecuzione del ciclo"
-#: eval.c:2105
+#: eval.c:2342
#, c-format
-msgid ""
-"\n"
-"\t# Function Call Stack:\n"
-"\n"
+msgid "function called indirectly through `%s' does not exist"
msgstr ""
-"\n"
-"\t# 'Stack' (Pila) Chiamate Funzione:\n"
-"\n"
-
-#: eval.c:2108
-#, c-format
-msgid "\t# -- main --\n"
-msgstr "\t# -- principale --\n"
-
-#: eval.c:2269
-msgid "attempt to field reference from non-numeric value"
-msgstr "tentativo di referenziare campo da valore non numerico"
-
-#: eval.c:2271
-msgid "attempt to reference from null string"
-msgstr "tentativo to referenziare da stringa nulla"
-#: eval.c:2277
+#: eval.c:2354
#, c-format
-msgid "attempt to access field %d"
-msgstr "tentativo di accedere al campo %d"
-
-#: eval.c:2298 eval.c:2305 profile.c:843
-msgid "assignment is not allowed to result of builtin function"
-msgstr "assegnamento non permesso al risultato di una funzione interna"
+msgid "function `%s' not defined"
+msgstr "funzione `%s' non definita"
-#: eval.c:2369
-msgid "`IGNORECASE' is a gawk extension"
-msgstr "`IGNORECASE' è un'estensione gawk"
+#: eval.c:2481
+#, fuzzy, c-format
+msgid "`nextfile' cannot be called from a `%s' rule"
+msgstr "`nextfile' non può essere chiamato da una regola END"
-#: eval.c:2398
-msgid "`BINMODE' is a gawk extension"
-msgstr "`BINMODE' è un'estensione gawk"
+#: eval.c:2540
+#, fuzzy, c-format
+msgid "`next' cannot be called from a `%s' rule"
+msgstr "`next' non può essere chiamato da una regola END"
-#: eval.c:2456
+#: eval.c:2602
#, c-format
-msgid "BINMODE value `%s' is invalid, treated as 3"
+msgid "Sorry, don't know how to interpret `%s'"
msgstr ""
-#: eval.c:2546
-#, c-format
-msgid "bad `%sFMT' specification `%s'"
-msgstr "specificazione invalida `%sFMT' `%s'"
-
-#: eval.c:2624
-msgid "turning off `--lint' due to assignment to `LINT'"
-msgstr "disabilito `--lint' a causa di assegnamento a `LINT'"
-
-#: ext.c:61
-msgid "extensions not allowed in sandbox mode"
+#: ext.c:62
+msgid "extensions are not allowed in sandbox mode"
msgstr ""
-#: ext.c:65 ext.c:70
+#: ext.c:68 ext.c:73
msgid "`extension' is a gawk extension"
msgstr "`extension' è un'estensione gawk"
-#: ext.c:80
-#, c-format
-msgid "extension: cannot open `%s' (%s)\n"
+#: ext.c:83
+#, fuzzy, c-format
+msgid "fatal: extension: cannot open `%s' (%s)\n"
msgstr "estensione: non riesco ad aprire `%s' (%s)\n"
-#: ext.c:88
-#, c-format
-msgid "extension: library `%s': cannot call function `%s' (%s)\n"
+#: ext.c:93
+#, fuzzy, c-format
+msgid "fatal: extension: library `%s': cannot call function `%s' (%s)\n"
msgstr ""
"estensione: biblioteca `%s': non riesco a chiamare funzione `%s' (%s)\n"
-#: ext.c:108
+#: ext.c:123
msgid "extension: missing function name"
msgstr "estensione: manca nome di funzione"
-#: ext.c:113
+#: ext.c:128
#, c-format
msgid "extension: illegal character `%c' in function name `%s'"
msgstr "estensione: carattere non ammesso `%c' nel nome di funzione `%s'"
-#: ext.c:119
+#: ext.c:137
#, c-format
msgid "extension: can't redefine function `%s'"
msgstr "estensione: non riesco a ridefinire funzione `%s'"
-#: ext.c:123
+#: ext.c:141
#, c-format
msgid "extension: function `%s' already defined"
msgstr "estensione: funzione `%s' già definita"
-#: ext.c:128
+#: ext.c:146
+#, c-format
+msgid "extension: function name `%s' previously defined"
+msgstr "estensione: funzione di nome `%s' definita in precedenza"
+
+#: ext.c:148
#, c-format
msgid "extension: can't use gawk built-in `%s' as function name"
msgstr ""
"estensione: nome funzione interna gawk `%s' non ammesso come nome funzione"
-#: ext.c:130
+#: ext.c:152
#, c-format
-msgid "extension: function name `%s' previously defined"
-msgstr "estensione: funzione di nome `%s' definita in precedenza"
+msgid "make_builtin: negative argument count for function `%s'"
+msgstr ""
-#: ext.c:207
-#, c-format
+#: ext.c:255
+#, fuzzy, c-format
msgid "function `%s' defined to take no more than %d argument(s)"
msgstr "funzione `%s' definita per avere al massimo %d argumenti/o"
-#: ext.c:210
+#: ext.c:258
#, c-format
msgid "function `%s': missing argument #%d"
msgstr "funzione `%s': manca argomento #%d"
-#: ext.c:220
+#: ext.c:268
#, c-format
msgid "function `%s': argument #%d: attempt to use scalar as an array"
msgstr "funzione `%s': argomento #%d: tentativo di usare scalare come vettore"
-#: ext.c:224
+#: ext.c:272
#, c-format
msgid "function `%s': argument #%d: attempt to use array as a scalar"
msgstr "funzione `%s': argomento #%d: tentativo di usare vettore come scalare"
-#: ext.c:249
+#: ext.c:285
msgid "Operation Not Supported"
msgstr "Operazione Non Supportata"
@@ -1133,612 +1077,608 @@ msgstr "Operazione Non Supportata"
msgid "NF set to negative value"
msgstr "NF impostato a un valore negativo"
-#: field.c:913
-msgid "split: second argument is not an array"
-msgstr "split: il secondo argomento non è un vettore"
-
-#: field.c:922 field.c:932 field.c:937
+#: field.c:939 field.c:946 field.c:950
#, fuzzy
msgid "split: fourth argument is a gawk extension"
msgstr "match: il terzo argomento è un'estensione gawk"
-#: field.c:928
+#: field.c:943
#, fuzzy
msgid "split: fourth argument is not an array"
msgstr "split: il secondo argomento non è un vettore"
-#: field.c:975
-#, fuzzy
-msgid "split: null string for third argument is a gawk extension"
+#: field.c:957
+msgid "split: second argument is not an array"
+msgstr "split: il secondo argomento non è un vettore"
+
+#: field.c:987
+msgid "split: null string for third arg is a gawk extension"
msgstr "split: la stringa nulla come terzo arg. è un'estensione gawk"
-#: field.c:1032
+#: field.c:1028
#, fuzzy
-msgid "patsplit: second argument is not an array"
+msgid "patsplit: fourth argument is not an array"
msgstr "split: il secondo argomento non è un vettore"
-#: field.c:1041
+#: field.c:1033
#, fuzzy
-msgid "patsplit: fourth argument is not an array"
+msgid "patsplit: second argument is not an array"
msgstr "split: il secondo argomento non è un vettore"
-#: field.c:1067
+#: field.c:1051
#, fuzzy
msgid "patsplit: third argument must be non-null"
msgstr "match: il terzo argomento non è un vettore"
-#: field.c:1111
+#: field.c:1084
msgid "`FIELDWIDTHS' is a gawk extension"
msgstr "`FIELDWIDTHS' è un'estensione gawk"
-#: field.c:1141 field.c:1155
+#: field.c:1147
#, c-format
msgid "invalid FIELDWIDTHS value, near `%s'"
-msgstr "valore di FIELDWIDTHS invalido, vicino a `%s'"
+msgstr "valore di FIELDWIDTHS non valido, vicino a `%s'"
-#: field.c:1238
+#: field.c:1220
msgid "null string for `FS' is a gawk extension"
msgstr "la stringa nulla usata come `FS' è un'estensione gawk"
-#: field.c:1242
+#: field.c:1224
msgid "old awk does not support regexps as value of `FS'"
msgstr "il vecchio awk non supporta espressioni come valori di `FS'"
-#: field.c:1357
+#: field.c:1343
#, fuzzy
msgid "`FPAT' is a gawk extension"
msgstr "`%s' è un'estensione gawk"
#: getopt.c:574 getopt.c:590
-#, fuzzy, c-format
+#, c-format
msgid "%s: option '%s' is ambiguous\n"
-msgstr "%s: opzione `%s' ambigua\n"
+msgstr "%s: opzione '%s' ambigua\n"
#: getopt.c:623 getopt.c:627
-#, fuzzy, c-format
+#, c-format
msgid "%s: option '--%s' doesn't allow an argument\n"
-msgstr "%s: opzione `--%s' non prevede un argomento\n"
+msgstr "%s: l'opzione '--%s' non ammette un argomento\n"
#: getopt.c:636 getopt.c:641
-#, fuzzy, c-format
+#, c-format
msgid "%s: option '%c%s' doesn't allow an argument\n"
-msgstr "%s: opzione `%c%s' non prevede un argomento\n"
+msgstr "%s: l'opzione '%c%s' non ammette un argomento\n"
#: getopt.c:684 getopt.c:703
#, fuzzy, c-format
msgid "%s: option '--%s' requires an argument\n"
-msgstr "%s: opzione `%s' richiede un argomento\n"
+msgstr "%s: l'opzione '%s' richiede un argomento\n"
#: getopt.c:741 getopt.c:744
-#, fuzzy, c-format
+#, c-format
msgid "%s: unrecognized option '--%s'\n"
-msgstr "%s: opzione sconosciuta `--%s'\n"
+msgstr "%s: opzione sconosciuta '--%s'\n"
#: getopt.c:752 getopt.c:755
-#, fuzzy, c-format
+#, c-format
msgid "%s: unrecognized option '%c%s'\n"
-msgstr "%s: opzione sconosciuta `%c%s'\n"
+msgstr "%s: opzione sconosciuta '%c%s'\n"
#: getopt.c:804 getopt.c:807
-#, fuzzy, c-format
+#, c-format
msgid "%s: invalid option -- '%c'\n"
-msgstr "%s: opzione non valida -- %c\n"
+msgstr "%s: opzione non valida -- '%c'\n"
#: getopt.c:857 getopt.c:874 getopt.c:1082 getopt.c:1100
-#, fuzzy, c-format
+#, c-format
msgid "%s: option requires an argument -- '%c'\n"
-msgstr "%s: l'opzione richiede un argomento -- %c\n"
+msgstr "%s: l'opzione richiede un argomento -- '%c'\n"
#: getopt.c:930 getopt.c:946
-#, fuzzy, c-format
+#, c-format
msgid "%s: option '-W %s' is ambiguous\n"
-msgstr "%s: opzione `-W %s' ambigua\n"
+msgstr "%s: l'opzione '-W %s' è ambigua\n"
#: getopt.c:970 getopt.c:988
-#, fuzzy, c-format
+#, c-format
msgid "%s: option '-W %s' doesn't allow an argument\n"
-msgstr "%s: opzione `-W %s' non prevede un argomento\n"
+msgstr "%s: l'opzione '-W %s' non ammette un argomento\n"
#: getopt.c:1009 getopt.c:1027
#, fuzzy, c-format
msgid "%s: option '-W %s' requires an argument\n"
-msgstr "%s: opzione `%s' richiede un argomento\n"
+msgstr "%s: l'opzione '%s' richiede un argomento\n"
-#: io.c:379
+#: io.c:272
#, c-format
msgid "command line argument `%s' is a directory: skipped"
msgstr ""
-#: io.c:413
+#: io.c:275 io.c:372
#, c-format
msgid "cannot open file `%s' for reading (%s)"
msgstr "non riesco ad aprire file `%s' in lettura (%s)"
-#: io.c:459 io.c:2999
+#: io.c:419
#, c-format
msgid "error reading input file `%s': %s"
msgstr "errore leggendo file di input `%s': %s"
-#: io.c:506
+#: io.c:470
#, c-format
msgid "close of fd %d (`%s') failed (%s)"
msgstr "chiusura di fd %d (`%s') fallita (%s)"
-#: io.c:617
-msgid "redirection not allowed in sandbox mode"
-msgstr ""
-
-#: io.c:648
-#, c-format
-msgid "invalid tree type %s in redirect()"
-msgstr "tipo di albero invalido %s in redirect()"
-
-#: io.c:654
+#: io.c:577
#, c-format
msgid "expression in `%s' redirection only has numeric value"
msgstr "espressione nella re-direzione `%s' ha solo un valore numerico"
-#: io.c:660
+#: io.c:583
#, c-format
msgid "expression for `%s' redirection has null string value"
msgstr "espressione nella re-direzione `%s' ha per valore la stringa nulla"
-#: io.c:665
+#: io.c:589
#, c-format
msgid "filename `%s' for `%s' redirection may be result of logical expression"
msgstr ""
"nome file `%s' per la re-direzione `%s' può essere il risultato di una "
"espressione logica"
-#: io.c:707
+#: io.c:628
#, c-format
msgid "unnecessary mixing of `>' and `>>' for file `%.*s'"
msgstr "mistura non necessaria di `>' e `>>' per il file `%.*s'"
-#: io.c:754
+#: io.c:681
#, c-format
msgid "can't open pipe `%s' for output (%s)"
msgstr "non posso aprire 'pipe' `%s' in scrittura (%s)"
-#: io.c:763
+#: io.c:691
#, c-format
msgid "can't open pipe `%s' for input (%s)"
msgstr "non posso aprire 'pipe' `%s' in lettura (%s)"
-#: io.c:786
+#: io.c:712
#, c-format
msgid "can't open two way pipe `%s' for input/output (%s)"
msgstr "non posso aprire 'pipe' bidirezionale `%s' per lettura/scrittura (%s)"
-#: io.c:864
+#: io.c:794
#, c-format
msgid "can't redirect from `%s' (%s)"
msgstr "non posso re-dirigere da `%s' (%s)"
-#: io.c:867
+#: io.c:797
#, c-format
msgid "can't redirect to `%s' (%s)"
msgstr "non posso re-dirigere a `%s' (%s)"
-#: io.c:920
+#: io.c:846
msgid ""
"reached system limit for open files: starting to multiplex file descriptors"
msgstr ""
"numero massimo consentito di file aperti raggiunto: comincio a riutilizzare "
"i descrittori di file"
-#: io.c:936
+#: io.c:862
#, c-format
msgid "close of `%s' failed (%s)."
msgstr "chiusura di `%s' fallita (%s)."
-#: io.c:944
+#: io.c:870
msgid "too many pipes or input files open"
msgstr "troppe 'pipe' o file di input aperti"
-#: io.c:967
+#: io.c:892
msgid "close: second argument must be `to' or `from'"
msgstr "close: il secondo argomento deve essere `a' o `da'"
-#: io.c:981
+#: io.c:909
#, c-format
msgid "close: `%.*s' is not an open file, pipe or co-process"
msgstr "close: `%.*s' non è un file aperto, una 'pipe' o un co-processo"
-#: io.c:986
+#: io.c:914
msgid "close of redirection that was never opened"
msgstr "chiusura di una re-direzione mai aperta"
-#: io.c:1083
+#: io.c:1011
#, c-format
msgid "close: redirection `%s' not opened with `|&', second argument ignored"
msgstr "close: re-direzione `%s' non aperta con `|&', ignoro secondo argomento"
-#: io.c:1099
+#: io.c:1027
#, c-format
msgid "failure status (%d) on pipe close of `%s' (%s)"
msgstr "errore ritornato (%d) dalla chiusura della 'pipe' `%s' (%s)"
-#: io.c:1102
+#: io.c:1030
#, c-format
msgid "failure status (%d) on file close of `%s' (%s)"
msgstr "errore ritornato (%d) dalla chiusura del file `%s' (%s)"
-#: io.c:1122
+#: io.c:1050
#, c-format
msgid "no explicit close of socket `%s' provided"
msgstr "nessuna chiusura esplicita richiesta per 'socket' `%s'"
-#: io.c:1125
+#: io.c:1053
#, c-format
msgid "no explicit close of co-process `%s' provided"
msgstr "nessuna chiusura esplicita richiesta per co-processo `%s'"
-#: io.c:1128
+#: io.c:1056
#, c-format
msgid "no explicit close of pipe `%s' provided"
msgstr "nessuna chiusura esplicita richiesta per 'pipe' `%s'"
-#: io.c:1131
+#: io.c:1059
#, c-format
msgid "no explicit close of file `%s' provided"
msgstr "nessuna chiusura esplicita richiesta per file `%s'"
-#: io.c:1159 io.c:1214 main.c:832 main.c:874
+#: io.c:1087 io.c:1142 main.c:823 main.c:865
#, c-format
msgid "error writing standard output (%s)"
msgstr "errore scrivendo 'standard output' (%s)"
-#: io.c:1163 io.c:1219
+#: io.c:1091 io.c:1147
#, c-format
msgid "error writing standard error (%s)"
msgstr "errore scrivendo 'standard error' (%s)"
-#: io.c:1171
+#: io.c:1099
#, c-format
msgid "pipe flush of `%s' failed (%s)."
msgstr "scaricamento di 'pipe' `%s' fallita (%s)."
-#: io.c:1174
+#: io.c:1102
#, c-format
msgid "co-process flush of pipe to `%s' failed (%s)."
msgstr "scaricamento da co-processo di 'pipe' a `%s' fallita (%s)."
-#: io.c:1177
+#: io.c:1105
#, c-format
msgid "file flush of `%s' failed (%s)."
msgstr "scaricamento di file `%s' fallita (%s)."
-#: io.c:1292
+#: io.c:1219
#, c-format
msgid "local port %s invalid in `/inet'"
msgstr "porta locale %s invalida in `/inet'"
-#: io.c:1309
+#: io.c:1236
#, c-format
msgid "remote host and port information (%s, %s) invalid"
msgstr "host remoto e informazione di porta (%s, %s) invalidi"
-#: io.c:1344
+#: io.c:1276
msgid "/inet/raw client not ready yet, sorry"
msgstr "spiacente, 'client' /inet/raw non ancora pronto"
-#: io.c:1347 io.c:1383
+#: io.c:1279 io.c:1320
msgid "only root may use `/inet/raw'."
msgstr "solo root può usare `/inet/raw'."
-#: io.c:1381
+#: io.c:1318
msgid "/inet/raw server not ready yet, sorry"
msgstr "spiacente, 'server' /inet/raw non ancora pronto"
-#: io.c:1477
+#: io.c:1417
#, c-format
msgid "no (known) protocol supplied in special filename `%s'"
msgstr "nessuno protocollo (conosciuto) specificato nel filename speciale `%s'"
-#: io.c:1491
+#: io.c:1431
#, c-format
msgid "special file name `%s' is incomplete"
msgstr "nome file speciale `%s' incompleto"
-#: io.c:1506
+#: io.c:1447
msgid "must supply a remote hostname to `/inet'"
msgstr "va fornito nome di 'host' remoto a `/inet'"
-#: io.c:1524
+#: io.c:1465
msgid "must supply a remote port to `/inet'"
msgstr "va fornita porta remota a `/inet'"
-#: io.c:1570
+#: io.c:1511
msgid "TCP/IP communications are not supported"
msgstr "comunicazioni TCP/IP non supportate"
-#: io.c:1758
+#: io.c:1698
#, c-format
msgid "could not open `%s', mode `%s'"
msgstr "non riesco ad aprire `%s', modo `%s'"
-#: io.c:1809
+#: io.c:1749
#, c-format
msgid "close of master pty failed (%s)"
msgstr "fallita chiusura di 'pty' principale (%s)"
-#: io.c:1811 io.c:1963 io.c:2114
+#: io.c:1751 io.c:1918 io.c:2075
#, c-format
msgid "close of stdout in child failed (%s)"
msgstr "fallita chiusura di 'stdout' nel processo-figlio (%s)"
-#: io.c:1814
+#: io.c:1754
#, c-format
msgid "moving slave pty to stdout in child failed (dup: %s)"
msgstr ""
"fallito trasferimento di 'pty' secondaria a 'stdout' nel processo-figlio "
"(dup: %s)"
-#: io.c:1816 io.c:1968
+#: io.c:1756 io.c:1923
#, c-format
msgid "close of stdin in child failed (%s)"
msgstr "fallita chiusura di 'stdin' nel processo-figlio (%s)"
-#: io.c:1819
+#: io.c:1759
#, c-format
msgid "moving slave pty to stdin in child failed (dup: %s)"
msgstr ""
"fallito trasferimento di 'pty' secondaria a 'stdin' nel processo-figlio "
"(dup: %s)"
-#: io.c:1821 io.c:1840
+#: io.c:1761 io.c:1782
#, c-format
msgid "close of slave pty failed (%s)"
msgstr "fallita chiusura di 'pty' secondaria (%s)"
-#: io.c:1914 io.c:1966 io.c:2095 io.c:2117
+#: io.c:1860 io.c:1921 io.c:2053 io.c:2078
#, c-format
msgid "moving pipe to stdout in child failed (dup: %s)"
msgstr "fallito passaggio di 'pipe' a 'stdout' nel processo-figlio (dup: %s)"
-#: io.c:1918 io.c:1971
+#: io.c:1867 io.c:1926
#, c-format
msgid "moving pipe to stdin in child failed (dup: %s)"
msgstr "fallito passaggio di pipe a 'stdin' nel processo-figlio (dup: %s)"
-#: io.c:1935 io.c:2108
+#: io.c:1887 io.c:2068
msgid "restoring stdout in parent process failed\n"
msgstr "fallito ripristino di 'stdout' nel processo-padre\n"
-#: io.c:1940
+#: io.c:1895
msgid "restoring stdin in parent process failed\n"
msgstr "fallito ripristino di 'stdin' nel processo-padre\n"
-#: io.c:1974 io.c:2119 io.c:2130
+#: io.c:1929 io.c:2080 io.c:2094
#, c-format
msgid "close of pipe failed (%s)"
msgstr "fallita chiusura di 'pipe' (%s)"
-#: io.c:2019
+#: io.c:1974
msgid "`|&' not supported"
msgstr "`|&' non supportato"
-#: io.c:2085
+#: io.c:2040
#, c-format
msgid "cannot open pipe `%s' (%s)"
msgstr "non riesco ad aprire 'pipe' `%s' (%s)"
-#: io.c:2126
+#: io.c:2088
#, c-format
msgid "cannot create child process for `%s' (fork: %s)"
msgstr "non riesco a creare processo-figlio per `%s' (fork: %s)"
-#: io.c:2518
+#: io.c:2577
#, c-format
msgid "data file `%s' is empty"
msgstr "file dati `%s' vuoto"
-#: io.c:2560 io.c:2568
+#: io.c:2618 io.c:2626
msgid "could not allocate more input memory"
msgstr "non riesco ad allocare ulteriore memoria per l'input"
-#: io.c:3125
+#: io.c:3173
msgid "multicharacter value of `RS' is a gawk extension"
msgstr "valore multicarattere per `RS' è un'estensione gawk"
-#: main.c:313
+#: main.c:311
msgid "out of memory"
-msgstr ""
+msgstr "memoria esaurita"
-#: main.c:381
+#: main.c:388
msgid "`-m[fr]' option irrelevant in gawk"
msgstr "`-m[fr]' opzione irrilevante per gawk"
-#: main.c:383
+#: main.c:390
msgid "-m option usage: `-m[fr] nnn'"
msgstr "-m uso opzione: `-m[fr] nnn'"
-#: main.c:419
+#: main.c:426
#, fuzzy
msgid "empty argument to `-e/--source' ignored"
msgstr "argomento di `--source' mancante, comando ignorato"
-#: main.c:485
+#: main.c:492
#, c-format
msgid "%s: option `-W %s' unrecognized, ignored\n"
msgstr "%s: opzione `-W %s' non riconosciuta, ignorata\n"
-#: main.c:530
+#: main.c:545
#, c-format
msgid "%s: option requires an argument -- %c\n"
msgstr "%s: l'opzione richiede un argomento -- %c\n"
-#: main.c:551
+#: main.c:566
msgid "environment variable `POSIXLY_CORRECT' set: turning on `--posix'"
msgstr "variable d'ambiente `POSIXLY_CORRECT' impostata: attivo `--posix'"
-#: main.c:557
+#: main.c:572
msgid "`--posix' overrides `--traditional'"
msgstr "`--posix' annulla `--traditional'"
-#: main.c:568
+#: main.c:583
msgid "`--posix'/`--traditional' overrides `--non-decimal-data'"
msgstr "`--posix'/`--traditional' annulla `--non-decimal-data'"
-#: main.c:572
+#: main.c:587
#, c-format
msgid "running %s setuid root may be a security problem"
msgstr "eseguire %s con 'setuid' root può essere un rischio per la sicurezza"
-#: main.c:577
+#: main.c:592
#, fuzzy
msgid "`--posix' overrides `--binary'"
msgstr "`--posix' annulla `--traditional'"
-#: main.c:622
+#: main.c:643
#, c-format
msgid "can't set binary mode on stdin (%s)"
msgstr "non posso impostare modalità binaria su 'stdin'(%s)"
-#: main.c:625
+#: main.c:646
#, c-format
msgid "can't set binary mode on stdout (%s)"
msgstr "non posso impostare modalità binaria su 'stdout'(%s)"
-#: main.c:627
+#: main.c:648
#, c-format
msgid "can't set binary mode on stderr (%s)"
msgstr "non posso impostare modalità binaria su 'stderr'(%s)"
-#: main.c:668
+#: main.c:687
msgid "no program text at all!"
msgstr "manca del tutto il testo del programma!"
-#: main.c:773
+#: main.c:762
#, c-format
msgid "Usage: %s [POSIX or GNU style options] -f progfile [--] file ...\n"
msgstr "Uso: %s [opzioni in stile POSIX o GNU] -f fileprog [--] file ...\n"
-#: main.c:775
+#: main.c:764
#, c-format
msgid "Usage: %s [POSIX or GNU style options] [--] %cprogram%c file ...\n"
msgstr "Usage: %s [opzioni in stile POSIX o GNU] [--] %cprogramma%c file ...\n"
-#: main.c:780
+#: main.c:769
#, fuzzy
msgid "POSIX options:\t\tGNU long options: (standard)\n"
msgstr "Opzioni POSIX:\t\topzioni lunghe GNU:\n"
-#: main.c:781
+#: main.c:770
msgid "\t-f progfile\t\t--file=progfile\n"
msgstr "\t-f fileprog\t\t--file=fileprog\n"
-#: main.c:782
+#: main.c:771
msgid "\t-F fs\t\t\t--field-separator=fs\n"
msgstr "\t-F fs\t\t\t--field-separator=fs\n"
-#: main.c:783
+#: main.c:772
msgid "\t-v var=val\t\t--assign=var=val\n"
msgstr "\t-v var=valore\t\t--assign=var=valore\n"
-#: main.c:784
+#: main.c:773
#, fuzzy
-msgid "POSIX options:\t\tGNU long options: (extensions)\n"
+msgid "Short options:\t\tGNU long options: (extensions)\n"
msgstr "Opzioni POSIX:\t\topzioni lunghe GNU:\n"
-#: main.c:785
+#: main.c:774
msgid "\t-m[fr] val\n"
msgstr "\t-m[fr] valore\n"
-#: main.c:786
+#: main.c:775
msgid "\t-b\t\t\t--characters-as-bytes\n"
msgstr ""
-#: main.c:787
-msgid "\t-c\t\t\t--compat, --traditional\n"
-msgstr ""
+#: main.c:776
+#, fuzzy
+msgid "\t-c\t\t\t--traditional\n"
+msgstr "\t-W traditional\t\t--traditional\n"
-#: main.c:788
+#: main.c:777
#, fuzzy
-msgid "\t-C\t\t\t--copyleft, --copyright\n"
+msgid "\t-C\t\t\t--copyright\n"
msgstr "\t-W copyright\t\t--copyright\n"
-#: main.c:789
+#: main.c:778
#, fuzzy
msgid "\t-d [file]\t\t--dump-variables[=file]\n"
msgstr "\t-W dump-variables[=file]\t--dump-variables[=file]\n"
-#: main.c:790
+#: main.c:779
#, fuzzy
msgid "\t-e 'program-text'\t--source='program-text'\n"
msgstr "\t-W source=testo-programma\t--source=testo-programma\n"
-#: main.c:791
+#: main.c:780
#, fuzzy
msgid "\t-E file\t\t\t--exec=file\n"
msgstr "\t-W exec[=file]\t--exec[=file]\n"
-#: main.c:792
+#: main.c:781
#, fuzzy
msgid "\t-g\t\t\t--gen-pot\n"
msgstr "\t-W gen-po\t\t--gen-po\n"
-#: main.c:793
+#: main.c:782
#, fuzzy
-msgid "\t-h\t\t\t--help, --usage\n"
+msgid "\t-h\t\t\t--help\n"
msgstr "\t-W help\t\t\t--help\n"
-#: main.c:794
+#: main.c:783
#, fuzzy
-msgid "\t-l [fatal]\t\t--lint[=fatal]\n"
+msgid "\t-L [fatal]\t\t--lint[=fatal]\n"
msgstr "\t-W lint[=fatal]\t\t--lint[=fatal]\n"
-#: main.c:795
-#, fuzzy
-msgid "\t-L\t\t\t--lint-old\n"
-msgstr "\t-W lint-old\t\t--lint-old\n"
-
-#: main.c:796
+#: main.c:784
#, fuzzy
msgid "\t-n\t\t\t--non-decimal-data\n"
msgstr "\t-W non-decimal-data\t--non-decimal-data\n"
-#: main.c:797
+#: main.c:785
#, fuzzy
msgid "\t-N\t\t\t--use-lc-numeric\n"
msgstr "\t-W use-lc-numeric\t--use-lc-numeric\n"
-#: main.c:798
+#: main.c:786
msgid "\t-O\t\t\t--optimize\n"
-msgstr ""
+msgstr "\t-O\t\t\t--optimize\n"
-#: main.c:799
+#: main.c:787
#, fuzzy
msgid "\t-p [file]\t\t--profile[=file]\n"
msgstr "\t-W profile[=file]\t--profile[=file]\n"
-#: main.c:800
+#: main.c:788
#, fuzzy
msgid "\t-P\t\t\t--posix\n"
msgstr "\t-W posix\t\t--posix\n"
-#: main.c:801
+#: main.c:789
#, fuzzy
msgid "\t-r\t\t\t--re-interval\n"
msgstr "\t-W re-interval\t\t--re-interval\n"
-#: main.c:802
+#: main.c:791
#, fuzzy
+msgid "\t-R file\t\t\t--command=file\n"
+msgstr "\t-W exec[=file]\t--exec[=file]\n"
+
+#: main.c:792
msgid "\t-S\t\t\t--sandbox\n"
-msgstr "\t-W posix\t\t--posix\n"
+msgstr ""
+
+#: main.c:793
+#, fuzzy
+msgid "\t-t\t\t\t--lint-old\n"
+msgstr "\t-W lint-old\t\t--lint-old\n"
-#: main.c:803
+#: main.c:794
#, fuzzy
msgid "\t-V\t\t\t--version\n"
msgstr "\t-W version\t\t--version\n"
-#: main.c:805
+#: main.c:796
msgid "\t-W nostalgia\t\t--nostalgia\n"
msgstr "\t-W nostalgia\t\t--nostalgia\n"
-#: main.c:808
-msgid "\t-W parsedebug\t\t--parsedebug\n"
+#: main.c:799
+#, fuzzy
+msgid "\t-Y\t\t--parsedebug\n"
msgstr "\t-W parsedebug\t\t--parsedebug\n"
#. TRANSLATORS: --help output 5 (end)
@@ -1746,7 +1686,7 @@ msgstr "\t-W parsedebug\t\t--parsedebug\n"
#. for this application. Please add _another line_ with the
#. address for translation bugs.
#. no-wrap
-#: main.c:817
+#: main.c:808
msgid ""
"\n"
"To report bugs, see node `Bugs' in `gawk.info', which is\n"
@@ -1758,7 +1698,7 @@ msgstr ""
"sezione `Reporting Problems and Bugs' nella versione a stampa.\n"
"\n"
-#: main.c:821
+#: main.c:812
msgid ""
"gawk is a pattern scanning and processing language.\n"
"By default it reads standard input and writes standard output.\n"
@@ -1768,7 +1708,7 @@ msgstr ""
"Senza parametri, legge da 'standard input' e scrive su 'standard output'.\n"
"\n"
-#: main.c:825
+#: main.c:816
msgid ""
"Examples:\n"
"\tgawk '{ sum += $1 }; END { print sum }' file\n"
@@ -1778,7 +1718,7 @@ msgstr ""
"\tgawk '{ sum += $1 }; END { print sum }' file\n"
"\tgawk -F: '{ print $1 }' /etc/passwd\n"
-#: main.c:845
+#: main.c:836
#, c-format
msgid ""
"Copyright (C) 1989, 1991-%d Free Software Foundation.\n"
@@ -1797,7 +1737,7 @@ msgstr ""
"Licenza, o (a tua scelta) a una qualsiasi versione successiva.\n"
"\n"
-#: main.c:853
+#: main.c:844
msgid ""
"This program is distributed in the hope that it will be useful,\n"
"but WITHOUT ANY WARRANTY; without even the implied warranty of\n"
@@ -1811,7 +1751,7 @@ msgstr ""
"Vedi la 'GNU General Public License' per ulteriori dettagli.\n"
"\n"
-#: main.c:864
+#: main.c:855
msgid ""
"You should have received a copy of the GNU General Public License\n"
"along with this program. If not, see http://www.gnu.org/licenses/.\n"
@@ -1820,16 +1760,16 @@ msgstr ""
"assieme a questo programma; se non è così, vedi http://www.gnu.org/"
"licenses/.\n"
-#: main.c:899
+#: main.c:890
msgid "-Ft does not set FS to tab in POSIX awk"
msgstr "-Ft non imposta FS a 'tab' nell'awk POSIX"
-#: main.c:1116
+#: main.c:1122
#, c-format
msgid "unknown value for field spec: %d\n"
msgstr ""
-#: main.c:1176
+#: main.c:1182
#, c-format
msgid ""
"%s: `%s' argument to `-v' not in `var=value' form\n"
@@ -1838,88 +1778,82 @@ msgstr ""
"%s: `%s' argomento di `-v' non in forma `var=valore'\n"
"\n"
-#: main.c:1196
+#: main.c:1202
#, c-format
msgid "`%s' is not a legal variable name"
msgstr "`%s' non è un nome di variabile ammesso"
-#: main.c:1199
+#: main.c:1205
#, c-format
msgid "`%s' is not a variable name, looking for file `%s=%s'"
msgstr "`%s' non è un nome di variabile, cerco il file `%s=%s'"
-#: main.c:1238
+#: main.c:1258
msgid "floating point exception"
msgstr "eccezione floating point"
-#: main.c:1245
+#: main.c:1265
msgid "fatal error: internal error"
msgstr "errore fatale: errore interno"
-#: main.c:1260
-#, fuzzy
+#: main.c:1280
msgid "fatal error: internal error: segfault"
-msgstr "errore fatale: errore interno"
+msgstr "errore fatale: errore interno: segfault"
-#: main.c:1272
-#, fuzzy
+#: main.c:1292
msgid "fatal error: internal error: stack overflow"
-msgstr "errore fatale: errore interno"
+msgstr "errore fatale: errore interno: stack overflow"
-#: main.c:1322
+#: main.c:1342
#, c-format
msgid "no pre-opened fd %d"
msgstr "manca 'fd' predefinita %d"
-#: main.c:1329
+#: main.c:1349
#, c-format
msgid "could not pre-open /dev/null for fd %d"
msgstr "non riesco a predefinire /dev/null per 'fd' %d"
-#: main.c:1352 main.c:1361
+#: main.c:1372 main.c:1381
#, c-format
msgid "could not find groups: %s"
msgstr "non riesco a trovare gruppi: %s"
-#: msg.c:54
+#: msg.c:62
#, c-format
msgid "cmd. line:"
msgstr "linea progr.:"
-#: msg.c:120
+#: msg.c:97
msgid "warning: "
msgstr "attenzione: "
-#: msg.c:142
+#: msg.c:106
msgid "error: "
msgstr "errore: "
-#: msg.c:178
+#: msg.c:129
msgid "fatal: "
msgstr "fatale: "
-#: node.c:63 node.c:78 node.c:105 node.c:121 node.c:151
-msgid "can't convert string to float"
-msgstr "non riesco a convertire stringa a valore in virgola mobile"
-
-#: node.c:465
+#: node.c:401
msgid "backslash at end of string"
msgstr "'\\' a fine stringa"
-#: node.c:609
+#: node.c:502
#, c-format
msgid "old awk does not support the `\\%c' escape sequence"
msgstr "il vecchio awk non supporta la sequenza di escape '\\%c'"
-#: node.c:660
+#: node.c:553
msgid "POSIX does not allow `\\x' escapes"
msgstr "POSIX non permette escape `\\x'"
-#: node.c:666
+#: node.c:559
msgid "no hex digits in `\\x' escape sequence"
msgstr "niente cifre esadecimanli nella sequenza di escape `\\x'"
-#: node.c:688
+#: node.c:581
#, c-format
msgid ""
"hex escape \\x%.*s of %d characters probably not interpreted the way you "
@@ -1928,86 +1862,56 @@ msgstr ""
"sequenza di escape esadec.\\x%.*s di %d caratteri probabilmente non "
"interpretata nel modo previsto"
-#: node.c:703
+#: node.c:596
#, c-format
msgid "escape sequence `\\%c' treated as plain `%c'"
msgstr "sequenza di escape `\\%c' considerata come semplice `%c'"
+#: node.c:737
+msgid ""
+"Invalid multibyte data detected. There may be a mismatch between your data "
+"and your locale."
+msgstr ""
+
#: posix/gawkmisc.c:172
#, c-format
msgid "%s %s `%s': could not set close-on-exec: (fcntl: %s)"
msgstr "%s %s `%s': non riesco a impostare 'close-on-exec': (fcntl: %s)"
-#: profile.c:94
+#: profile.c:83
#, c-format
msgid "could not open `%s' for writing: %s"
msgstr "non riesco ad aprire `%s' in scrittura: %s"
-#: profile.c:457
-#, c-format
-msgid "internal error: %s with null vname"
-msgstr "errore interno: %s con 'vname' nullo"
-
-#: profile.c:522
-msgid "# treated internally as `delete'"
-msgstr "# gestito internamente come 'delete' (cancellazione)"
-
-#: profile.c:1076
-#, c-format
-msgid "# this is a dynamically loaded extension function"
-msgstr "# questa è una funzione di estensione caricata dinamicamente"
-
-#: profile.c:1109
-#, c-format
-msgid "\t# gawk profile, created %s\n"
-msgstr "\t# profilo gawk, creato %s\n"
-
-#: profile.c:1112
-#, c-format
-msgid ""
-"\t# BEGIN block(s)\n"
-"\n"
-msgstr ""
-"\t# blocco(hi) BEGIN\n"
-"\n"
-
-#: profile.c:1122
+#: profile.c:203
#, fuzzy, c-format
msgid ""
-"\t# BEGINFILE block(s)\n"
+"\t# %s block(s)\n"
"\n"
msgstr ""
-"\t# blocco(hi) BEGIN\n"
+"\t# blocco(hi) END\n"
"\n"
-#: profile.c:1132
-#, c-format
+#: profile.c:208
+#, fuzzy, c-format
msgid ""
-"\t# Rule(s)\n"
+"\t# %s(s)\n"
"\n"
msgstr ""
"\t# Regola(e)\n"
"\n"
-#: profile.c:1138
-#, fuzzy, c-format
-msgid ""
-"\t# ENDFILE block(s)\n"
-"\n"
-msgstr ""
-"\t# blocco(hi) END\n"
-"\n"
+#: profile.c:278
+#, c-format
+msgid "internal error: %s with null vname"
+msgstr "errore interno: %s con 'vname' nullo"
-#: profile.c:1148
+#: profile.c:945
#, c-format
-msgid ""
-"\t# END block(s)\n"
-"\n"
-msgstr ""
-"\t# blocco(hi) END\n"
-"\n"
+msgid "\t# gawk profile, created %s\n"
+msgstr "\t# profilo gawk, creato %s\n"
-#: profile.c:1168
+#: profile.c:1328
#, c-format
msgid ""
"\n"
@@ -2016,17 +1920,12 @@ msgstr ""
"\n"
"\t# Funzioni, listate in ordine alfabetico\n"
-#: profile.c:1431
+#: profile.c:1367
#, c-format
-msgid "unexpected type %s in prec_level"
-msgstr "tipo non previsto %s in 'prec_level'"
-
-#: profile.c:1557
-#, fuzzy, c-format
-msgid "Unknown node type %s in pp_var"
-msgstr "tipo nodo sconosciuto %d"
+msgid "redir2str: unknown redirection type %d"
+msgstr ""
-#: re.c:537
+#: re.c:559
#, c-format
msgid "regexp component `%.*s' should probably be `[%.*s]'"
msgstr ""
@@ -2049,7 +1948,7 @@ msgstr "Carattere di ordinamento non valido"
#: regcomp.c:144
msgid "Invalid character class name"
-msgstr "Nome di 'classe di caratteri' invalido"
+msgstr "Nome di 'classe di caratteri' non valido"
#: regcomp.c:147
msgid "Trailing backslash"
@@ -2057,7 +1956,7 @@ msgstr "'\\' finale"
#: regcomp.c:150
msgid "Invalid back reference"
-msgstr "Riferimento indietro invalido"
+msgstr "Riferimento indietro non valido"
#: regcomp.c:153
msgid "Unmatched [ or [^"
@@ -2073,11 +1972,11 @@ msgstr "\\{ non chiusa"
#: regcomp.c:162
msgid "Invalid content of \\{\\}"
-msgstr "Contenuto di \\{\\} invalido"
+msgstr "Contenuto di \\{\\} non valido"
#: regcomp.c:165
msgid "Invalid range end"
-msgstr "Fine di intervallo invalido"
+msgstr "Fine di intervallo non valido"
#: regcomp.c:168
msgid "Memory exhausted"
@@ -2099,19 +1998,40 @@ msgstr "Espressione regolare troppo complessa"
msgid "Unmatched ) or \\)"
msgstr ") or \\) non aperta"
-#: regcomp.c:699
+#: regcomp.c:701
msgid "No previous regular expression"
msgstr "Nessuna espressione regolare precedente"
-#~ msgid "%s: illegal option -- %c\n"
-#~ msgstr "%s: opzione non permessa -- %c\n"
+#~ msgid "call of `length' without parentheses is deprecated by POSIX"
+#~ msgstr "chiamata a `length' senza parentesi sconsigliata da POSIX"
+
+#, fuzzy
+#~ msgid "reference to uninitialized field `$%s'"
+#~ msgstr "referenza a variabile non inizializzata `$%d'"
+
+#~ msgid "can't convert string to float"
+#~ msgstr "non riesco a convertire stringa a valore in virgola mobile"
+
+#~ msgid "`continue' outside a loop is not portable"
+#~ msgstr "`continue' all'esterno di un ciclo non è portabile"
+
+#~ msgid "`break' outside a loop is not portable"
+#~ msgstr "`break' all'esterno di un ciclo non è portabile"
+
+#~ msgid "`nextfile' cannot be called from a BEGIN rule"
+#~ msgstr "`nextfile' non può essere chiamato da una regola BEGIN"
+
+#~ msgid "`next' cannot be called from a BEGIN rule"
+#~ msgstr "`next' non può essere chiamato da una regola BEGIN"
#~ msgid "file `%s' is a directory"
#~ msgstr "file `%s' è una 'directory'"
-#~ msgid "can't open two way socket `%s' for input/output (%s)"
-#~ msgstr ""
-#~ "non posso aprire 'socket' bidirezionale `%s' per lettura/scrittura (%s)"
+#~ msgid "use `PROCINFO[\"%s\"]' instead of `%s'"
+#~ msgstr "usa `PROCINFO[\"%s\"]' invece che `%s'"
+
+#~ msgid "use `PROCINFO[...]' instead of `/dev/user'"
+#~ msgstr "usa `PROCINFO[...]' invece che `/dev/user'"
#~ msgid "\t-W compat\t\t--compat\n"
#~ msgstr "\t-W compat\t\t--compat\n"
@@ -2119,30 +2039,122 @@ msgstr "Nessuna espressione regolare precedente"
#~ msgid "\t-W copyleft\t\t--copyleft\n"
#~ msgstr "\t-W copyleft\t\t--copyleft\n"
-#~ msgid "\t-W traditional\t\t--traditional\n"
-#~ msgstr "\t-W traditional\t\t--traditional\n"
-
#~ msgid "\t-W usage\t\t--usage\n"
#~ msgstr "\t-W usage\t\t--usage\n"
-#, fuzzy
-#~ msgid "seek: invalid arguments"
-#~ msgstr "printf: manca argomento"
+#~ msgid ""
+#~ "\t# BEGIN block(s)\n"
+#~ "\n"
+#~ msgstr ""
+#~ "\t# blocco(hi) BEGIN\n"
+#~ "\n"
-#, fuzzy
-#~ msgid "seek: `%.*s' is not an open file, pipe, or co-process"
-#~ msgstr "close: `%.*s' non è un file aperto, una 'pipe' o un co-processo"
+#~ msgid "must use `count$' on all formats or none"
+#~ msgstr "'count$' va usato per tutti i formati o per nessuno"
+
+#~ msgid "field width is ignored for `%%%%' specifier"
+#~ msgstr "larghezza campo ignorata per lo specificatore `%%%%'"
+
+#~ msgid "precision is ignored for `%%%%' specifier"
+#~ msgstr "precisione ignorata per lo specificatore `%%%%'"
+
+#~ msgid "field width and precision are ignored for `%%%%' specifier"
+#~ msgstr "larghezza e precisione ignorate per lo specificatore `%%%%'"
+
+#~ msgid "`$' is not permitted in awk formats"
+#~ msgstr "`$' non permesso nei 'format' awk"
+
+#~ msgid "arg count with `$' must be > 0"
+#~ msgstr "il numero di argomento con `$' deve essere > 0"
+
+#~ msgid "arg count %ld greater than total number of supplied arguments"
+#~ msgstr ""
+#~ "numero di argomenti (%ld) maggiore del numero totale di argomenti "
+#~ "specificati"
+
+#~ msgid "`$' not permitted after period in format"
+#~ msgstr "`$' non permesso dopo un punto nel 'format'"
+
+#~ msgid "no `$' supplied for positional field width or precision"
+#~ msgstr ""
+#~ "nessun `$' specificato per larghezza o precisione di un campo posizionale"
+
+#~ msgid "`l' is meaningless in awk formats; ignored"
+#~ msgstr "`l' non ha senso nei 'format' awk; ignorata"
+
+#~ msgid "`l' is not permitted in POSIX awk formats"
+#~ msgstr "`l' non permessa nei 'format' awk POSIX"
+
+#~ msgid "`L' is meaningless in awk formats; ignored"
+#~ msgstr "`L' non ha senso nei 'format' awk; ignorata"
+
+#~ msgid "`L' is not permitted in POSIX awk formats"
+#~ msgstr "`L' non permessa nei 'format' awk POSIX"
+
+#~ msgid "`h' is meaningless in awk formats; ignored"
+#~ msgstr "`h' non ha senso nei 'format' awk; ignorata"
+
+#~ msgid "`h' is not permitted in POSIX awk formats"
+#~ msgstr "`h' non permessa nei 'format' awk POSIX"
+
+#~ msgid "[s]printf: value %g is out of range for `%%%c' format"
+#~ msgstr "[s]printf: valore %g non accettabile per il 'format' `%%%c'"
+
+#~ msgid ""
+#~ "ignoring unknown format specifier character `%c': no argument converted"
+#~ msgstr ""
+#~ "lettera ignota di specifica 'format' `%c' ignorato: nessun argomento "
+#~ "convertito"
+
+#~ msgid "not enough arguments to satisfy format string"
+#~ msgstr "mancano argomenti per completare il 'format'"
+
+#~ msgid "^ ran out for this one"
+#~ msgstr "^ uscito per questo"
+
+#~ msgid "[s]printf: format specifier does not have control letter"
+#~ msgstr ""
+#~ "[s]printf: il designatore di 'format' non ha una lettera di controllo"
+
+#~ msgid "too many arguments supplied for format string"
+#~ msgstr "troppi argomenti specificati per il 'format'"
#, fuzzy
-#~ msgid "seek: `%.*s' is not an input file, pipe, or co-process"
-#~ msgstr "close: `%.*s' non è un file aperto, una 'pipe' o un co-processo"
+#~ msgid "attempt to use array parameter `%s' in a scalar context"
+#~ msgstr "tentativo di usare vettore `%s' in un contesto scalare"
+
+#~ msgid "can't open two way socket `%s' for input/output (%s)"
+#~ msgstr ""
+#~ "non posso aprire 'socket' bidirezionale `%s' per lettura/scrittura (%s)"
+
+#~ msgid "length: untyped argument will be forced to scalar"
+#~ msgstr "length: l'argomento omesso sarà ritenuto scalare"
+
+#~ msgid ""
+#~ "concatenation: side effects in one expression have changed the length of "
+#~ "another!"
+#~ msgstr ""
+#~ "concatenatione: effetti secondari in una espressione hanno modificato la "
+#~ "lunghezza di un'altra espressione!"
+
+#~ msgid "illegal type (%s) in tree_eval"
+#~ msgstr "tipo non ammesso (%s) in 'tree_eval'"
+
+#~ msgid "\t# -- main --\n"
+#~ msgstr "\t# -- principale --\n"
+
+#~ msgid "invalid tree type %s in redirect()"
+#~ msgstr "tipo di albero non valido %s in redirect()"
#, fuzzy
-#~ msgid "seek: `%.*s' is not a regular file"
-#~ msgstr "`%s' non è un nome di variabile ammesso"
+#~ msgid "# treated internally as `delete'"
+#~ msgstr "# gestito internamente come `delete' (cancellazione)"
-#~ msgid "use `PROCINFO[\"%s\"]' instead of `%s'"
-#~ msgstr "usa `PROCINFO[\"%s\"]' invece che `%s'"
+#~ msgid "# this is a dynamically loaded extension function"
+#~ msgstr "# questa è una funzione di estensione caricata dinamicamente"
-#~ msgid "use `PROCINFO[...]' instead of `/dev/user'"
-#~ msgstr "usa `PROCINFO[...]' invece che `/dev/user'"
+#~ msgid "unexpected type %s in prec_level"
+#~ msgstr "tipo non previsto %s in 'prec_level'"
+
+#~ msgid "Unknown node type %s in pp_var"
+#~ msgstr "Tipo nodo sconosciuto %s in pp_var"
diff --git a/po/ja.gmo b/po/ja.gmo
index 872adcbf..69c03a1a 100644
--- a/po/ja.gmo
+++ b/po/ja.gmo
Binary files differ
diff --git a/po/ja.po b/po/ja.po
index 7bf0d54c..f77d63da 100644
--- a/po/ja.po
+++ b/po/ja.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: gawk 3.1.4l\n"
"Report-Msgid-Bugs-To: arnold@skeeve.com\n"
-"POT-Creation-Date: 2010-11-12 12:20+0200\n"
+"POT-Creation-Date: 2010-11-17 08:48+0200\n"
"PO-Revision-Date: 2005-06-27 02:37+1000\n"
"Last-Translator: Makoto Hosoya <mhosoya@ozemail.com.au>\n"
"Language-Team: Japanese <translation-team-ja@lists.sourceforge.net>\n"
@@ -15,407 +15,484 @@ msgstr ""
"Content-Type: text/plain; charset=EUC-JP\n"
"Content-Transfer-Encoding: 8bit\n"
-#: array.c:112
+#: array.c:103
+#, c-format
+msgid "from %s"
+msgstr "%s ¤«¤é"
+
+#: array.c:267
+#, fuzzy
+msgid "attempt to use a scalar value as array"
+msgstr "¥¹¥«¥é¡¼ `%s' ¤òÇÛÎó¤È¤·¤Æ»ÈÍѤ·¤Æ¤¤¤Þ¤¹¡£"
+
+#: array.c:270
#, c-format
msgid "attempt to use function `%s' as an array"
msgstr "´Ø¿ô `%s' ¤òÇÛÎó¤È¤·¤Æ»ÈÍѤ·¤Æ¤¤¤Þ¤¹¡£"
-#: array.c:115
+#: array.c:273
#, c-format
msgid "attempt to use scalar parameter `%s' as an array"
msgstr "¥¹¥«¥é¡¼¥Ñ¥é¥á¡¼¥¿ `%s' ¤òÇÛÎó¤È¤·¤Æ»ÈÍѤ·¤Æ¤¤¤Þ¤¹¡£"
-#: array.c:118
+#: array.c:276
#, c-format
msgid "attempt to use scalar `%s' as array"
msgstr "¥¹¥«¥é¡¼ `%s' ¤òÇÛÎó¤È¤·¤Æ»ÈÍѤ·¤Æ¤¤¤Þ¤¹¡£"
-#: array.c:156
+#: array.c:321 array.c:648 eval.c:1075 eval.c:1079 eval.c:1581 eval.c:1649
+#: eval.c:1928
#, c-format
-msgid "from %s"
-msgstr "%s ¤«¤é"
+msgid "attempt to use array `%s' in a scalar context"
+msgstr "¥¹¥«¥é¡¼´Ä¶­¤ËÇÛÎó `%s' ¤ò»ÈÍѤ·¤Æ¤¤¤Þ¤¹¡£"
-#: array.c:513
+#: array.c:570
#, fuzzy, c-format
msgid "reference to uninitialized element `%s[\"%.*s\"]'"
msgstr "½é´ü²½¤µ¤ì¤Æ¤¤¤Ê¤¤Í×ÁÇ `%s[\"%s\"]' ¤ò»²¾È¤·¤Æ¤¤¤Þ¤¹¡£"
-#: array.c:519
+#: array.c:576
#, c-format
msgid "subscript of array `%s' is null string"
msgstr "ÇÛÎó¤Îź»ú `%s' ¤¬¶õÎó¤Ç¤¹¡£"
-#: array.c:623
+#: array.c:684
#, c-format
msgid "delete: index `%s' not in array `%s'"
msgstr "delete: ÇÛÎó `%2$s' ¤Ë»Øɸ `%1$s' ¤Ï¤¢¤ê¤Þ¤»¤ó¡£"
-#: array.c:792
+#: array.c:705
+#, fuzzy, c-format
+msgid "attempt to use scalar `%s[\"%.*s\"]' as an array"
+msgstr "¥¹¥«¥é¡¼ `%s' ¤òÇÛÎó¤È¤·¤Æ»ÈÍѤ·¤Æ¤¤¤Þ¤¹¡£"
+
+#: array.c:868
#, c-format
msgid "%s: empty (null)\n"
msgstr "%s: ¶õ (null)\n"
-#: array.c:797
+#: array.c:873
#, c-format
msgid "%s: empty (zero)\n"
msgstr "%s: ¶õ (zero)\n"
-#: array.c:801
+#: array.c:877
#, c-format
msgid "%s: table_size = %d, array_size = %d\n"
msgstr "%s: ¥Æ¡¼¥Ö¥ë¥µ¥¤¥º (table_size) = %d, ÇÛÎó¥µ¥¤¥º (array_size) = %d\n"
-#: array.c:830
+#: array.c:912
#, c-format
msgid "%s: is parameter\n"
msgstr "%s: ¤Ï¥Ñ¥é¥á¡¼¥¿¤Ç¤¹¡£\n"
-#: array.c:835
+#: array.c:916
#, c-format
msgid "%s: array_ref to %s\n"
msgstr "%s: %s ¤Ø¤ÎÇÛÎó»²¾È (array_ref)\n"
-#: awkgram.y:224 awkgram.y:227
+#: array.c:921
+#, fuzzy
+msgid "adump: argument not an array"
+msgstr "match: Âè»°°ú¿ô¤¬ÇÛÎó̾¤Ç¤Ï¤¢¤ê¤Þ¤»¤ó¡£"
+
+#: array.c:1139
+#, fuzzy
+msgid "attempt to use array in a scalar context"
+msgstr "¥¹¥«¥é¡¼´Ä¶­¤ËÇÛÎó `%s' ¤ò»ÈÍѤ·¤Æ¤¤¤Þ¤¹¡£"
+
+#: array.c:1236
+#, fuzzy
+msgid "asort: second argument not an array"
+msgstr "split: ÂèÆó°ú¿ô¤¬ÇÛÎó¤Ç¤Ï¤¢¤ê¤Þ¤»¤ó¡£"
+
+#: array.c:1237
+#, fuzzy
+msgid "asorti: second argument not an array"
+msgstr "split: ÂèÆó°ú¿ô¤¬ÇÛÎó¤Ç¤Ï¤¢¤ê¤Þ¤»¤ó¡£"
+
+#: array.c:1245
+#, fuzzy
+msgid "asort: first argument not an array"
+msgstr "match: Âè»°°ú¿ô¤¬ÇÛÎó̾¤Ç¤Ï¤¢¤ê¤Þ¤»¤ó¡£"
+
+#: array.c:1246
+#, fuzzy
+msgid "asorti: first argument not an array"
+msgstr "match: Âè»°°ú¿ô¤¬ÇÛÎó̾¤Ç¤Ï¤¢¤ê¤Þ¤»¤ó¡£"
+
+#: awkgram.y:246
#, c-format
msgid "%s blocks must have an action part"
msgstr "%s ¥Ö¥í¥Ã¥¯¤Ë¤Ï¥¢¥¯¥·¥ç¥óÉô¤¬É¬¿Ü¤Ç¤¹¡£"
-#: awkgram.y:230
+#: awkgram.y:249
msgid "each rule must have a pattern or an action part"
msgstr "³Æ¥ë¡¼¥ë¤Ë¤Ï¥Ñ¥¿¡¼¥ó¤Þ¤¿¤Ï¥¢¥¯¥·¥ç¥óÉô¤¬É¬¿Ü¤Ç¤¹¡£"
-#: awkgram.y:266 awkgram.y:275
+#: awkgram.y:320 awkgram.y:330
#, fuzzy
msgid "old awk does not support multiple `BEGIN' or `END' rules"
msgstr "±é»»»Ò `**' ¤Ï¸Å¤¤ awk ¤Ç»È¤¨¤Þ¤»¤ó¡£"
-#: awkgram.y:304
+#: awkgram.y:367
#, c-format
msgid "`%s' is a built-in function, it cannot be redefined"
msgstr "`%s' ¤ÏÁȹþ¤ß´Ø¿ô¤Ç¤¹¡£ºÆÄêµÁ¤Ç¤­¤Þ¤»¤ó¡£"
-#: awkgram.y:350
+#: awkgram.y:427
msgid "regexp constant `//' looks like a C++ comment, but is not"
msgstr "Àµµ¬É½¸½Äê¿ô `//' ¤Ï C++¥³¥á¥ó¥È¤Ë»÷¤Æ¤¤¤Þ¤¹¤¬¡¢°ã¤¤¤Þ¤¹¡£"
-#: awkgram.y:353
+#: awkgram.y:430
#, c-format
msgid "regexp constant `/%s/' looks like a C comment, but is not"
msgstr "Àµµ¬É½¸½Äê¿ô `/%s/' ¤Ï C¥³¥á¥ó¥È¤Ë»÷¤Æ¤¤¤Þ¤¹¤¬¡¢°ã¤¤¤Þ¤¹¡£"
-#: awkgram.y:380 awkgram.y:692
-msgid "statement may have no effect"
-msgstr "Ì¿Îáʸ¤Ë¤Ï¸ú²Ì¤¬Ìµ¤¤¤«¤â¤·¤ì¤Þ¤»¤ó¡£"
+#: awkgram.y:735
+#, fuzzy
+msgid "`break' is not allowed outside a loop or switch"
+msgstr "¥ë¡¼¥×¤Î³°¤Ç¤Ï `break' ¤ò»ÈÍѤǤ­¤Þ¤»¤ó¡£"
-#: awkgram.y:477 awkgram.y:480 awkgram.y:504 awkgram.y:511 awkgram.y:518
-#, c-format
-msgid "`%s' used in %s action"
+#: awkgram.y:744
+#, fuzzy
+msgid "`continue' is not allowed outside a loop"
+msgstr "¥ë¡¼¥×¤Î³°¤Ç¤Ï `continue' ¤ò»ÈÍѤǤ­¤Þ¤»¤ó¡£"
+
+#: awkgram.y:753
+#, fuzzy, c-format
+msgid "`next' used in %s action"
msgstr "`%s' ¤¬ %s ¤Î¥¢¥¯¥·¥ç¥ó¤Ç»È¤ï¤ì¤Þ¤·¤¿¡£"
-#: awkgram.y:495 awkgram.y:499
+#: awkgram.y:767 awkgram.y:771
msgid "`nextfile' is a gawk extension"
msgstr "`nextfile' ¤Ï gawk ÆÃÍ­¤Î³ÈÄ¥¤Ç¤¹¡£"
-#: awkgram.y:528
+#: awkgram.y:775
+#, fuzzy, c-format
+msgid "`nextfile' used in %s action"
+msgstr "`%s' ¤¬ %s ¤Î¥¢¥¯¥·¥ç¥ó¤Ç»È¤ï¤ì¤Þ¤·¤¿¡£"
+
+#: awkgram.y:799
msgid "`return' used outside function context"
msgstr "`return' ¤¬´Ø¿ôÄêµÁʸ¤Î³°¤Ç»È¤ï¤ì¤Þ¤·¤¿¡£"
-#: awkgram.y:570
+#: awkgram.y:859
msgid "plain `print' in BEGIN or END rule should probably be `print \"\"'"
msgstr ""
"BEGIN ¤Þ¤¿¤Ï END ¥ë¡¼¥ëÆâ¤Î°ú¿ô¤Î̵¤¤ `print' ¤Ï `print \"\"' ¤À¤È»×¤ï¤ì¤Þ"
"¤¹¡£"
-#: awkgram.y:586 awkgram.y:594
+#: awkgram.y:927 awkgram.y:935
msgid "`delete array' is a gawk extension"
msgstr "`delete array' ¤Ï gawk ÆÃÍ­¤Î³ÈÄ¥¤Ç¤¹¡£"
-#: awkgram.y:608 awkgram.y:616
+#: awkgram.y:955 awkgram.y:963
msgid "`delete(array)' is a non-portable tawk extension"
msgstr "`delete(array)' ¤Ï tawk ÆÃÍ­¤Î³ÈÄ¥¤Ç¤¹¡£Â¾¤Î awk ¤Ç¤Ï»ÈÍѤǤ­¤Þ¤»¤ó¡£"
-#: awkgram.y:660
+#: awkgram.y:1004
#, c-format
msgid "duplicate case values in switch body: %s"
msgstr "switch ʸ¤ÎÃæ¤Ë½ÅÊ£¤·¤¿ case Ãͤ¬»ÈÍѤµ¤ì¤Æ¤¤¤Þ¤¹: %s"
-#: awkgram.y:670
-msgid "Duplicate `default' detected in switch body"
+#: awkgram.y:1014
+#, fuzzy
+msgid "duplicate `default' detected in switch body"
msgstr "switch ʸ¤ÎÃæ¤Ë `default' ¤¬½ÅÊ£¤·¤Æ¤¤¤Þ¤¹¡£"
-#: awkgram.y:759
+#: awkgram.y:1151
msgid "multistage two-way pipelines don't work"
msgstr "¿Ãʳ¬¤ÇÁÐÊý¸þ¥Ñ¥¤¥×¤òÍøÍѤ·¤¿¼°¤Ï»ÈÍѤǤ­¤Þ¤»¤ó¡£"
-#: awkgram.y:850
+#: awkgram.y:1253
msgid "regular expression on right of assignment"
msgstr "Àµµ¬É½¸½¤¬ÂåÆþ¼°¤Î±¦Êդ˻ÈÍѤµ¤ì¤Æ¤¤¤Þ¤¹¡£"
-#: awkgram.y:860
+#: awkgram.y:1263
msgid "regular expression on left of `~' or `!~' operator"
msgstr "`~' ¤ä `!~' ±é»»»Ò¤Îº¸ÊÕ¤ËÀµµ¬É½¸½¤¬»ÈÍѤµ¤ì¤Æ¤¤¤Þ¤¹¡£"
-#: awkgram.y:866 awkgram.y:954
+#: awkgram.y:1278 awkgram.y:1423
#, fuzzy
msgid "old awk does not support the keyword `in' except after `for'"
msgstr "±é»»»Ò `**' ¤Ï¸Å¤¤ awk ¤Ç»È¤¨¤Þ¤»¤ó¡£"
-#: awkgram.y:872
+#: awkgram.y:1287
msgid "regular expression on right of comparison"
msgstr "Èæ³Ó¼°¤Î±¦ÊÕ¤ËÀµµ¬É½¸½¤¬»ÈÍѤµ¤ì¤Æ¤¤¤Þ¤¹¡£"
-#: awkgram.y:936
+#: awkgram.y:1399
#, fuzzy, c-format
-msgid "`getline var' invalid inside %s rule"
+msgid "`getline var' invalid inside `%s' rule"
msgstr "`%s' ¤Î¥ê¥â¡¼¥È¥Ý¡¼¥È¤¬Ìµ¸ú¤Ç¤¹¡£"
-#: awkgram.y:939
-#, c-format
-msgid "`getline' invalid inside %s rule"
-msgstr ""
+#: awkgram.y:1401
+#, fuzzy, c-format
+msgid "`getline' invalid inside `%s' rule"
+msgstr "`%s' ¤Î¥ê¥â¡¼¥È¥Ý¡¼¥È¤¬Ìµ¸ú¤Ç¤¹¡£"
-#: awkgram.y:944
+#: awkgram.y:1407
msgid "non-redirected `getline' undefined inside END action"
msgstr "¥ê¥À¥¤¥ì¥¯¥È¤µ¤ì¤Æ¤¤¤Ê¤¤ `getline' ¤Ï END ¥¢¥¯¥·¥ç¥ó¤Ç¤Ï̤ÄêµÁ¤Ç¤¹¡£"
-#: awkgram.y:955
+#: awkgram.y:1424
#, fuzzy
msgid "old awk does not support multidimensional arrays"
msgstr "±é»»»Ò `**' ¤Ï¸Å¤¤ awk ¤Ç»È¤¨¤Þ¤»¤ó¡£"
-#: awkgram.y:1001
+#: awkgram.y:1528
msgid "call of `length' without parentheses is not portable"
msgstr "³ç¸Ì̵¤·¤Î `length' ¤Ï¾¤Î awk ¤Ç»ÈÍѤǤ­¤Þ¤»¤ó¡£"
-#: awkgram.y:1006
-msgid "call of `length' without parentheses is deprecated by POSIX"
-msgstr "POSIX ¤Ï³ç¸Ì̵¤·¤Ç¤Î `length' ¤Î»ÈÍѤò¿ä¾©¤·¤Þ¤»¤ó¡£"
-
-#: awkgram.y:1051
+#: awkgram.y:1591
#, fuzzy
msgid "indirect function calls are a gawk extension"
-msgstr "`extension' ¤Ï gawk ÆÃÍ­¤Î³ÈÄ¥¤Ç¤¹¡£"
+msgstr "`nextfile' ¤Ï gawk ÆÃÍ­¤Î³ÈÄ¥¤Ç¤¹¡£"
-#: awkgram.y:1084
-msgid "use of non-array as array"
-msgstr "ÇÛÎó¤Ç¤Ê¤¤¤â¤Î¤òÇÛÎó¤È¤·¤Æ»ÈÍѤ·¤Æ¤¤¤Þ¤¹¡£"
+#: awkgram.y:1605
+#, fuzzy, c-format
+msgid "can not use special variable `%s' for indirect function call"
+msgstr "´Ø¿ô `%s': ´Ø¿ô̾¤Ï¥Ñ¥é¥á¡¼¥¿Ì¾¤Ë»ÈÍѤǤ­¤Þ¤»¤ó¡£"
-#: awkgram.y:1087
+#: awkgram.y:1682
msgid "invalid subscript expression"
msgstr "ź»ú¼°¤¬ÉÔÀµ¤Ç¤¹¡£"
-#: awkgram.y:1329
+#: awkgram.y:1722
+msgid "use of non-array as array"
+msgstr "ÇÛÎó¤Ç¤Ê¤¤¤â¤Î¤òÇÛÎó¤È¤·¤Æ»ÈÍѤ·¤Æ¤¤¤Þ¤¹¡£"
+
+#: awkgram.y:1993
msgid "unexpected newline or end of string"
msgstr "ͽÁÛ³°¤Î²þ¹Ô¤Þ¤¿¤Ïʸ»úÎó¤Î½ªÃ¼¤¬¤¢¤ê¤Þ¤¹¡£"
-#: awkgram.y:1446
-msgid "empty program text on command line"
-msgstr "¥³¥Þ¥ó¥É¹Ô¤Î¥×¥í¥°¥é¥àɽµ­¤¬¶õ¤Ç¤¹¡£"
-
-#: awkgram.y:1502
+#: awkgram.y:2248 awkgram.y:2296 awkgram.y:2470
#, c-format
msgid "can't open source file `%s' for reading (%s)"
msgstr "¥½¡¼¥¹¥Õ¥¡¥¤¥ë `%s' ¤òÆɤ߹þ¤à¤¿¤á¤Ë³«¤±¤Þ¤»¤ó (%s)¡£"
-#: awkgram.y:1600
+#: awkgram.y:2249 awkgram.y:2297 builtin.c:122
+msgid "reason unknown"
+msgstr "¸¶°øÉÔÌÀ"
+
+#: awkgram.y:2257
+#, fuzzy, c-format
+msgid "already included source file `%s'"
+msgstr "¥½¡¼¥¹¥Õ¥¡¥¤¥ë `%s' ¤òÆɤ߹þ¤á¤Þ¤»¤ó (%s)¡£"
+
+#: awkgram.y:2281
+#, fuzzy
+msgid "@include is a gawk extension"
+msgstr "`nextfile' ¤Ï gawk ÆÃÍ­¤Î³ÈÄ¥¤Ç¤¹¡£"
+
+#: awkgram.y:2288
+msgid "empty filename after @include"
+msgstr ""
+
+#: awkgram.y:2422
+msgid "empty program text on command line"
+msgstr "¥³¥Þ¥ó¥É¹Ô¤Î¥×¥í¥°¥é¥àɽµ­¤¬¶õ¤Ç¤¹¡£"
+
+#: awkgram.y:2537
#, c-format
msgid "can't read sourcefile `%s' (%s)"
msgstr "¥½¡¼¥¹¥Õ¥¡¥¤¥ë `%s' ¤òÆɤ߹þ¤á¤Þ¤»¤ó (%s)¡£"
-#: awkgram.y:1608
+#: awkgram.y:2547
#, c-format
msgid "source file `%s' is empty"
msgstr "¥½¡¼¥¹¥Õ¥¡¥¤¥ë `%s' ¤Ï¶õ¤Ç¤¹¡£"
-#: awkgram.y:1800 awkgram.y:1922 awkgram.y:1940 awkgram.y:2315 awkgram.y:2407
+#: awkgram.y:2732
msgid "source file does not end in newline"
msgstr "¥½¡¼¥¹¥Õ¥¡¥¤¥ë¤¬²þ¹Ô¤Ç½ª¤Ã¤Æ¤¤¤Þ¤»¤ó¡£"
-#: awkgram.y:1862
+#: awkgram.y:2809
msgid "unterminated regexp ends with `\\' at end of file"
msgstr "½ªÃ¼¤µ¤ì¤Æ¤¤¤Ê¤¤Àµµ¬É½¸½¤¬¥Õ¥¡¥¤¥ëºÇ¸å¤Î `\\' ¤Ç½ª¤Ã¤Æ¤¤¤Þ¤¹¡£"
-#: awkgram.y:1886
+#: awkgram.y:2833
#, c-format
msgid "%s: %d: tawk regex modifier `/.../%c' doesn't work in gawk"
msgstr "%s: %d: tawk ¤ÎÀµµ¬É½¸½½¤¾þ»Ò `/.../%c' ¤Ï gawk ¤Ç»ÈÍѤǤ­¤Þ¤»¤ó¡£"
-#: awkgram.y:1890
+#: awkgram.y:2837
#, c-format
msgid "tawk regex modifier `/.../%c' doesn't work in gawk"
msgstr "tawk ¤ÎÀµµ¬É½¸½½¤¾þ»Ò `/.../%c' ¤Ï gawk ¤Ç»ÈÍѤǤ­¤Þ¤»¤ó¡£"
-#: awkgram.y:1897
+#: awkgram.y:2844
msgid "unterminated regexp"
msgstr "Àµµ¬É½¸½¤¬½ªÃ¼¤µ¤ì¤Æ¤¤¤Þ¤»¤ó¡£"
-#: awkgram.y:1900
+#: awkgram.y:2848
msgid "unterminated regexp at end of file"
msgstr "¥Õ¥¡¥¤¥ë¤ÎÃæ¤ÇÀµµ¬É½¸½¤¬½ªÃ¼¤µ¤ì¤Æ¤¤¤Þ¤»¤ó¡£"
-#: awkgram.y:1969
+#: awkgram.y:2907
msgid "use of `\\ #...' line continuation is not portable"
msgstr "`\\ #...' ·Á¼°¤Î¹Ô·Ñ³¤Ï¾¤Î awk ¤Ç»È¤¨¤Þ¤»¤ó¡£"
-#: awkgram.y:1982
+#: awkgram.y:2923
msgid "backslash not last character on line"
msgstr "¥Ð¥Ã¥¯¥¹¥é¥Ã¥·¥å¤¬¹ÔºÇ¸å¤Îʸ»ú¤Ë¤Ê¤Ã¤Æ¤¤¤Þ¤»¤ó¡£"
-#: awkgram.y:2027
+#: awkgram.y:2984
msgid "POSIX does not allow operator `**='"
msgstr "POSIX ¤Ï±é»»»Ò `**=' ¤òµö²Ä¤·¤Þ¤»¤ó¡£"
-#: awkgram.y:2029
+#: awkgram.y:2986
msgid "old awk does not support operator `**='"
msgstr "±é»»»Ò `**=' ¤Ï¸Å¤¤ awk ¤Ç»È¤¨¤Þ¤»¤ó¡£"
-#: awkgram.y:2038
+#: awkgram.y:2995
msgid "POSIX does not allow operator `**'"
msgstr "POSIX ¤Ç¤Ï±é»»»Ò `**' ¤òµö²Ä¤·¤Æ¤¤¤Þ¤»¤ó¡£"
-#: awkgram.y:2040
+#: awkgram.y:2997
msgid "old awk does not support operator `**'"
msgstr "±é»»»Ò `**' ¤Ï¸Å¤¤ awk ¤Ç»È¤¨¤Þ¤»¤ó¡£"
-#: awkgram.y:2071
+#: awkgram.y:3032
msgid "operator `^=' is not supported in old awk"
msgstr "±é»»»Ò `^=' ¤Ï¸Å¤¤ awk ¤Ç»È¤¨¤Þ¤»¤ó¡£"
-#: awkgram.y:2079
+#: awkgram.y:3040
msgid "operator `^' is not supported in old awk"
msgstr "±é»»»Ò `^' ¤Ï¸Å¤¤ awk ¤Ç»È¤¨¤Þ¤»¤ó¡£"
-#: awkgram.y:2163 awkgram.y:2178
+#: awkgram.y:3133 awkgram.y:3149
msgid "unterminated string"
msgstr "ʸ»úÎ󤬽ªÃ¼¤µ¤ì¤Æ¤¤¤Þ¤»¤ó¡£"
-#: awkgram.y:2368
+#: awkgram.y:3345
#, c-format
msgid "invalid char '%c' in expression"
msgstr "ɽ¸½¤Î char '%c' ¤ÏÉÔÀµ¤Ç¤¹¡£"
-#: awkgram.y:2416
+#: awkgram.y:3391
#, c-format
msgid "`%s' is a gawk extension"
msgstr "`%s' ¤Ï gawk ÆÃÍ­¤Î³ÈÄ¥¤Ç¤¹¡£"
-#: awkgram.y:2419
+#: awkgram.y:3394
#, c-format
msgid "`%s' is a Bell Labs extension"
msgstr "`%s' ¤Ï¥Ù¥ë¸¦µæ½ê¤Ë¤è¤ë³ÈÄ¥¤Ç¤¹¡£"
-#: awkgram.y:2422
+#: awkgram.y:3397
#, c-format
msgid "POSIX does not allow `%s'"
msgstr "POSIX ¤Ï `%s' ¤òµö²Ä¤·¤Þ¤»¤ó¡£"
-#: awkgram.y:2426
+#: awkgram.y:3401
#, c-format
msgid "`%s' is not supported in old awk"
msgstr "`%s' ¤Ï¸Å¤¤ awk ¤Ç»ÈÍѤǤ­¤Þ¤»¤ó¡£"
-#: awkgram.y:2452
+#: awkgram.y:3465
msgid "`goto' considered harmful!\n"
msgstr "`goto' ¤ÏÍ­³²¤Ç¤¹!\n"
-#: awkgram.y:2514
+#: awkgram.y:3518
#, c-format
msgid "%d is invalid as number of arguments for %s"
msgstr "%d ¤Ï %s ¤Ë»È¤¨¤ë°ú¿ô¤Î¿ô¤È¤·¤Æ¤ÏÉÔÀµ¤Ç¤¹¡£"
-#: awkgram.y:2533 awkgram.y:2536
+#: awkgram.y:3544 awkgram.y:3547
msgid "match: third argument is a gawk extension"
msgstr "match: Âè»°°ú¿ô¤Ï gawk ÆÃÍ­¤Î³ÈÄ¥¤Ç¤¹¡£"
-#: awkgram.y:2549
+#: awkgram.y:3575
#, c-format
msgid "%s: string literal as last arg of substitute has no effect"
msgstr "%s: ʸ»úÎó¥ê¥Æ¥é¥ë¤òÃÖ¤­´¹¤¨ºÇ¸å¤Î°ú¿ô¤Ë»ÈÍѤ¹¤ë¤È¸ú²Ì¤¬¤¢¤ê¤Þ¤»¤ó¡£"
-#: awkgram.y:2552
+#: awkgram.y:3580
#, c-format
msgid "%s third parameter is not a changeable object"
msgstr "%s Âè»°¥Ñ¥é¥á¡¼¥¿¤Ï²ÄÊÑ¥ª¥Ö¥¸¥§¥¯¥È¤Ç¤Ï¤¢¤ê¤Þ¤»¤ó¡£"
-#: awkgram.y:2586 awkgram.y:2589
+#: awkgram.y:3665 awkgram.y:3668
msgid "close: second argument is a gawk extension"
msgstr "close: ÂèÆó°ú¿ô¤Ï gawk ÆÃÍ­¤Î³ÈÄ¥¤Ç¤¹¡£"
-#: awkgram.y:2599
+#: awkgram.y:3680
msgid "use of dcgettext(_\"...\") is incorrect: remove leading underscore"
msgstr ""
"dcgettext(_\"...\")¤Î»È¤¤Êý¤¬´Ö°ã¤Ã¤Æ¤¤¤Þ¤¹: ºÇ½é¤Î¥¢¥ó¥À¡¼¥¹¥³¥¢¤òºï½ü¤·¤Æ¤¯"
"¤À¤µ¤¤¡£"
-#: awkgram.y:2614
+#: awkgram.y:3695
msgid "use of dcngettext(_\"...\") is incorrect: remove leading underscore"
msgstr ""
"dcngettext(_\"...\")¤Î»È¤¤Êý¤¬´Ö°ã¤Ã¤Æ¤¤¤Þ¤¹: ºÇ½é¤Î¥¢¥ó¥À¡¼¥¹¥³¥¢¤òºï½ü¤·¤Æ"
"¤¯¤À¤µ¤¤¡£"
-#: awkgram.y:2686
+#: awkgram.y:3787
#, c-format
msgid "function `%s': parameter #%d, `%s', duplicates parameter #%d"
msgstr "´Ø¿ô `%s': ¥Ñ¥é¥á¡¼¥¿ #%d, `%s' ¤¬¥Ñ¥é¥á¡¼¥¿ #%d ¤È½ÅÊ£¤·¤Æ¤¤¤Þ¤¹¡£"
-#: awkgram.y:2719
+#: awkgram.y:3829
#, c-format
msgid "function `%s': parameter `%s' shadows global variable"
msgstr "´Ø¿ô `%s': ¥Ñ¥é¥á¡¼¥¿ `%s' ¤¬Âç°èÊÑ¿ô¤òʤ¤¤±£¤·¤Æ¤¤¤Þ¤¹¡£"
-#: awkgram.y:2831
+#: awkgram.y:3987
#, c-format
msgid "could not open `%s' for writing (%s)"
msgstr "`%s' ¤ò½ñ¹þ¤ßÍѤ˳«¤±¤Þ¤»¤ó¤Ç¤·¤¿ (%s)¡£"
-#: awkgram.y:2832 profile.c:96
+#: awkgram.y:3988 profile.c:85
msgid "sending profile to standard error"
msgstr "¥×¥í¥Õ¥¡¥¤¥ë¤òɸ½à¥¨¥é¡¼¤ËÁ÷¤Ã¤Æ¤¤¤Þ¤¹¡£"
-#: awkgram.y:2864
+#: awkgram.y:3994
#, c-format
msgid "%s: close failed (%s)"
msgstr "%s: ÊĤ¸¤ë¤³¤È¤¬¤Ç¤­¤Þ¤»¤ó (%s)¡£"
-#: awkgram.y:2985
+#: awkgram.y:4046
msgid "shadow_funcs() called twice!"
msgstr "shadow_funcs() ¤òÆó²ó¸Æ¤Ó½Ð¤·¤Æ¤¤¤Þ¤¹!"
-#: awkgram.y:3012
+#: awkgram.y:4052
msgid "there were shadowed variables."
msgstr "ʤ¤¤±£¤µ¤ì¤¿ÊÑ¿ô¤¬¤¢¤ê¤Þ¤·¤¿¡£"
-#: awkgram.y:3085
+#: awkgram.y:4081
#, c-format
msgid "function `%s': can't use function name as parameter name"
msgstr "´Ø¿ô `%s': ´Ø¿ô̾¤Ï¥Ñ¥é¥á¡¼¥¿Ì¾¤Ë»ÈÍѤǤ­¤Þ¤»¤ó¡£"
-#: awkgram.y:3088
+#: awkgram.y:4086
#, fuzzy, c-format
msgid "function `%s': can't use special variable `%s' as a function parameter"
msgstr "´Ø¿ô `%s': ´Ø¿ô̾¤Ï¥Ñ¥é¥á¡¼¥¿Ì¾¤Ë»ÈÍѤǤ­¤Þ¤»¤ó¡£"
-#: awkgram.y:3098
+#: awkgram.y:4102
#, c-format
msgid "function name `%s' previously defined"
msgstr "´Ø¿ô̾ `%s' ¤ÏÄêµÁºÑ¤ß¤Ç¤¹¡£"
-#: awkgram.y:3249 awkgram.y:3255
+#: awkgram.y:4271 awkgram.y:4277
#, c-format
msgid "function `%s' called but never defined"
msgstr "̤ÄêµÁ¤Î´Ø¿ô `%s' ¤ò¸Æ¤Ó½Ð¤·¤Þ¤·¤¿¡£"
-#: awkgram.y:3258
+#: awkgram.y:4280
#, c-format
msgid "function `%s' defined but never called"
msgstr "ÄêµÁ¤µ¤ì¤¿´Ø¿ô `%s' ¤Ï°ìÅÙ¤â¸Æ¤Ó½Ð¤µ¤ì¤Þ¤»¤ó¤Ç¤·¤¿¡£"
-#: awkgram.y:3285
+#: awkgram.y:4311
#, c-format
msgid "regexp constant for parameter #%d yields boolean value"
msgstr "¥Ñ¥é¥á¡¼¥¿ #%d ¤ÎÀµµ¬É½¸½Äê¿ô¤Ï¥Ö¡¼¥ëÃͤò½ÐÎϤ·¤Þ¤¹¡£"
-#: awkgram.y:3329
+#: awkgram.y:4420
#, c-format
msgid ""
"function `%s' called with space between name and `(',\n"
@@ -424,707 +501,570 @@ msgstr ""
"´Ø¿ô̾¤È `(' ¤Î´Ö¤Ë¥¹¥Ú¡¼¥¹¤òÆþ¤ì¤Æ´Ø¿ô `%s' ¤ò¸Æ¤Ó½Ð¤·¤Æ¤¤¤Þ¤¹¡£\n"
"¤Þ¤¿¤Ï¡¢ÊÑ¿ô¤«ÇÛÎó¤È¤·¤Æ»È¤ï¤ì¤Æ¤¤¤Þ¤¹¡£"
-#: awkgram.y:3750
-#, fuzzy
-msgid "division by zero attempted in `/'"
-msgstr "`/=' ¤Ç¥¼¥í¤Ç¤Î½ü»»¤ò¹Ô¤¤¤Þ¤·¤¿¡£"
+#: awkgram.y:4673 eval.c:1845
+msgid "division by zero attempted"
+msgstr "¥¼¥í¤Ç¤Î½ü»»¤ò¹Ô¤¤¤Þ¤·¤¿¡£"
-#: awkgram.y:3755 eval.c:1411
+#: awkgram.y:4682 eval.c:1877
#, c-format
msgid "division by zero attempted in `%%'"
msgstr "`%%' ¤Ç¥¼¥í¤Ç¤Î½ü»»¤ò¹Ô¤¤¤Þ¤·¤¿¡£"
-#: builtin.c:122
+#: awkgram.y:5342
+msgid "statement may have no effect"
+msgstr "Ì¿Îáʸ¤Ë¤Ï¸ú²Ì¤¬Ìµ¤¤¤«¤â¤·¤ì¤Þ¤»¤ó¡£"
+
+#: builtin.c:120
#, c-format
msgid "%s to \"%s\" failed (%s)"
msgstr "%s ¤«¤é \"%s\" ¤Ø½ÐÎϤǤ­¤Þ¤»¤ó (%s)¡£"
-#: builtin.c:123
+#: builtin.c:121
msgid "standard output"
msgstr "ɸ½à½ÐÎÏ"
-#: builtin.c:124
-msgid "reason unknown"
-msgstr "¸¶°øÉÔÌÀ"
-
-#: builtin.c:137
+#: builtin.c:135
msgid "exp: received non-numeric argument"
msgstr "exp: °ú¿ô¤¬¿ôÃͤǤϤ¢¤ê¤Þ¤»¤ó¡£"
-#: builtin.c:143
+#: builtin.c:141
#, c-format
msgid "exp: argument %g is out of range"
msgstr "exp: °ú¿ô %g ¤¬µöÍÆÈϰϤòĶ¤¨¤Æ¤¤¤Þ¤¹¡£"
-#: builtin.c:201
+#: builtin.c:200
#, c-format
msgid "fflush: cannot flush: pipe `%s' opened for reading, not writing"
msgstr "fflush: ¥Õ¥é¥Ã¥·¥åÉÔ²Ä: ¥Ñ¥¤¥× `%s' ¤ÏÆɤ߹þ¤ßÀìÍѤǤ¹¡£"
-#: builtin.c:204
+#: builtin.c:203
#, c-format
msgid "fflush: cannot flush: file `%s' opened for reading, not writing"
msgstr "fflush: ¥Õ¥é¥Ã¥·¥åÉÔ²Ä: ¥Õ¥¡¥¤¥ë `%s' ¤ÏÆɤ߹þ¤ßÀìÍѤǤ¹¡£"
-#: builtin.c:216
+#: builtin.c:215
#, c-format
msgid "fflush: `%s' is not an open file, pipe or co-process"
msgstr ""
"fflush: `%s' ¤Ï¥Õ¥¡¥¤¥ë¤«¡¢¥Ñ¥¤¥×¤«¡¢ÊÂ¹Ô¥×¥í¥»¥¹¤Ç¤Ê¤±¤ì¤Ð¤Ê¤ê¤Þ¤»¤ó¡£"
-#: builtin.c:310
+#: builtin.c:322
msgid "index: received non-string first argument"
msgstr "index: Âè°ì°ú¿ô¤¬Ê¸»úÎó¤Ç¤Ï¤¢¤ê¤Þ¤»¤ó¡£"
-#: builtin.c:312
+#: builtin.c:324
msgid "index: received non-string second argument"
msgstr "index: ÂèÆó°ú¿ô¤¬Ê¸»úÎó¤Ç¤Ï¤¢¤ê¤Þ¤»¤ó¡£"
-#: builtin.c:434
+#: builtin.c:446
msgid "int: received non-numeric argument"
msgstr "int: °ú¿ô¤¬¿ôÃͤǤϤ¢¤ê¤Þ¤»¤ó¡£"
-#: builtin.c:464
+#: builtin.c:469
#, fuzzy
msgid "`length(array)' is a gawk extension"
msgstr "`delete array' ¤Ï gawk ÆÃÍ­¤Î³ÈÄ¥¤Ç¤¹¡£"
-#: builtin.c:471
-msgid "length: untyped parameter argument will be forced to scalar"
-msgstr ""
-
-#: builtin.c:480
-msgid "length: untyped argument will be forced to scalar"
-msgstr ""
-
-#: builtin.c:484
+#: builtin.c:477
msgid "length: received non-string argument"
msgstr "length: °ú¿ô¤¬Ê¸»úÎó¤Ç¤Ï¤¢¤ê¤Þ¤»¤ó¡£"
-#: builtin.c:515
+#: builtin.c:508
msgid "log: received non-numeric argument"
msgstr "log: °ú¿ô¤¬¿ôÃͤǤϤ¢¤ê¤Þ¤»¤ó¡£"
-#: builtin.c:518
+#: builtin.c:511
#, c-format
msgid "log: received negative argument %g"
msgstr "log: °ú¿ô %g ¤¬Éé¤ÎÃͤǤ¹¡£"
-#: builtin.c:726 builtin.c:729
-msgid "must use `count$' on all formats or none"
-msgstr ""
-"`count$¡Ç¤ÏÁ´¤Æ¤Î½ñ¼°»ØÄê¤ËŬÍѤ¹¤ë¡¢¤Þ¤¿¤ÏÁ´¤Æ¤ËŬÍѤ·¤Ê¤¤¤Î¤É¤Á¤é¤«¤Ç¤·¤«»È"
-"¤¨¤Þ¤»¤ó¡£"
-
-#: builtin.c:790
-#, c-format
-msgid "field width is ignored for `%%%%' specifier"
-msgstr ""
-
-#: builtin.c:792
-#, c-format
-msgid "precision is ignored for `%%%%' specifier"
-msgstr ""
-
-#: builtin.c:794
-#, c-format
-msgid "field width and precision are ignored for `%%%%' specifier"
-msgstr ""
-
-#: builtin.c:845
-msgid "`$' is not permitted in awk formats"
-msgstr "`$' ¤Ï awk ¤Ç¤Ï»È¤¨¤Þ¤»¤ó¡£"
-
-#: builtin.c:851
-msgid "arg count with `$' must be > 0"
-msgstr "½ç½ø»ØÄê¤Î `$' ¤Ë»È¤¨¤ë¿ô»ú¤ÏÀµ¤ÎÃͤǤ¹¡£"
-
-#: builtin.c:853
-#, c-format
-msgid "arg count %ld greater than total number of supplied arguments"
-msgstr "½ç½ø»ØÄê %ld ¤¬Í¿¤¨¤é¤ì¤Æ¤¤¤ë°ú¿ô¤Î¿ô¤òĶ¤¨¤Æ¤¤¤Þ¤¹¡£"
-
-#: builtin.c:855
-msgid "`$' not permitted after period in format"
-msgstr "`$' ¤Ï½ñ¼°»ØÄê¤Î¥Ô¥ê¥ª¥É `.' ¤Î¸å¤Ë»ÈÍѤǤ­¤Þ¤»¤ó¡£"
-
-#: builtin.c:868
-msgid "no `$' supplied for positional field width or precision"
-msgstr "¥Õ¥£¡¼¥ë¥ÉÉý¡¢¤Þ¤¿¤ÏÀºÅ٤λØÄê»Ò¤Ë `$' ¤¬Í¿¤¨¤é¤ì¤Æ¤¤¤Þ¤»¤ó¡£"
-
-#: builtin.c:938
-msgid "`l' is meaningless in awk formats; ignored"
-msgstr "awk ¤Î½ñ¼°»ØÄê¤Ç¤Ï `l' ¤Ï̵°ÕÌ£¤Ç¤¹¡£Ìµ»ë¤·¤Þ¤¹¡£"
-
-#: builtin.c:942
-msgid "`l' is not permitted in POSIX awk formats"
-msgstr "POSIX ½àµò¤Î awk ¤Ç¤Ï `l' ¤Ï»ÈÍѤǤ­¤Þ¤»¤ó¡£"
-
-#: builtin.c:953
-msgid "`L' is meaningless in awk formats; ignored"
-msgstr "awk ¤Î½ñ¼°»ØÄê¤Ç¤Ï `L' ¤Ï̵°ÕÌ£¤Ç¤¹¡£Ìµ»ë¤·¤Þ¤¹¡£"
-
-#: builtin.c:957
-msgid "`L' is not permitted in POSIX awk formats"
-msgstr "POSIX ½àµò¤Î awk ¤Ç¤Ï `L' ¤Ï»ÈÍѤǤ­¤Þ¤»¤ó¡£"
-
-#: builtin.c:968
-msgid "`h' is meaningless in awk formats; ignored"
-msgstr "awk ¤Î½ñ¼°»ØÄê¤Ç¤Ï `h' ¤Ï̵°ÕÌ£¤Ç¤¹¡£Ìµ»ë¤·¤Þ¤¹¡£"
-
-#: builtin.c:972
-msgid "`h' is not permitted in POSIX awk formats"
-msgstr "POSIX ½àµò¤Î awk ¤Ç¤Ï `h' ¤Ï»ÈÍѤǤ­¤Þ¤»¤ó¡£"
-
-#: builtin.c:1252
-#, c-format
-msgid "[s]printf: value %g is out of range for `%%%c' format"
-msgstr "[s]printf: %g ¤ÎÃͤ¬½ñ¼° `%%%c' ¤ÎµöÍÆÈϰϤòĶ¤¨¤Æ¤¤¤Þ¤¹¡£"
-
-#: builtin.c:1332
-#, c-format
-msgid "ignoring unknown format specifier character `%c': no argument converted"
-msgstr ""
-
-#: builtin.c:1338
-msgid "not enough arguments to satisfy format string"
-msgstr "½ñ¼°»ØÄꤹ¤ë¤¿¤á¤Î°ú¿ô¤¬Â­¤ê¤Þ¤»¤ó¡£"
-
-#: builtin.c:1340
-msgid "^ ran out for this one"
-msgstr "^ ¤³¤³¤«¤é­¤ê¤Þ¤»¤ó"
-
-#: builtin.c:1346
-msgid "[s]printf: format specifier does not have control letter"
-msgstr "[s]printf: ½ñ¼°»ØÄê»Ò¤ËÀ©¸æʸ»ú¤¬¤¢¤ê¤Þ¤»¤ó¡£"
-
-#: builtin.c:1349
-msgid "too many arguments supplied for format string"
-msgstr "½ñ¼°»ØÄêʸ»úÎó¤Î°ú¿ô¤¬Â¿²á¤®¤Þ¤¹¡£"
+#: builtin.c:531 builtin.c:573 builtin.c:586 builtin.c:982 builtin.c:994
+#, fuzzy, c-format
+msgid "attempt to use array `%s' in scalar context"
+msgstr "¥¹¥«¥é¡¼´Ä¶­¤ËÇÛÎó `%s' ¤ò»ÈÍѤ·¤Æ¤¤¤Þ¤¹¡£"
-#: builtin.c:1424 builtin.c:1427
+#: builtin.c:569 builtin.c:580
msgid "printf: no arguments"
msgstr "printf: °ú¿ô¤¬¤¢¤ê¤Þ¤»¤ó¡£"
-#: builtin.c:1451
+#: builtin.c:621
msgid "sqrt: received non-numeric argument"
msgstr "sqrt: °ú¿ô¤¬¿ôÃͤǤϤ¢¤ê¤Þ¤»¤ó¡£"
-#: builtin.c:1455
+#: builtin.c:625
#, c-format
msgid "sqrt: called with negative argument %g"
msgstr "sqrt: °ú¿ô¤ËÉé¤ÎÃÍ %g ¤ò»ÈÍѤ·¤Æ¤¤¤Þ¤¹¡£"
-#: builtin.c:1479
-#, c-format
-msgid "substr: start index %g is invalid, using 1"
-msgstr "substr: µ¯ÅÀ»Øɸ %g ¤¬ÉÔÀµ¤Ç¤¹¡£1 ¤ò»È¤¤¤Þ¤¹¡£"
-
-#: builtin.c:1484
-#, c-format
-msgid "substr: non-integer start index %g will be truncated"
-msgstr "substr: µ¯ÅÀ»Øɸ %g ¤Î¾®¿ôÅÀ°Ê²¼¤ÏÀÚ¤ê¼Î¤Æ¤Þ¤¹¡£"
-
-#: builtin.c:1510
+#: builtin.c:649
#, c-format
msgid "substr: length %g is not >= 1"
msgstr "substr: ʸ»ú¿ô %g ¤¬ 1 °Ê¾å¤Ç¤Ï¤¢¤ê¤Þ¤»¤ó¡£"
-#: builtin.c:1512
+#: builtin.c:651
#, c-format
msgid "substr: length %g is not >= 0"
msgstr "substr: ʸ»ú¿ô %g ¤¬ 0 °Ê¾å¤Ç¤Ï¤¢¤ê¤Þ¤»¤ó¡£"
-#: builtin.c:1519
+#: builtin.c:658
#, c-format
msgid "substr: non-integer length %g will be truncated"
msgstr "substr: ʸ»ú¿ô %g ¤Î¾®¿ôÅÀ°Ê²¼¤ÏÀÚ¤ê¼Î¤Æ¤Þ¤¹¡£"
-#: builtin.c:1524
+#: builtin.c:663
#, c-format
msgid "substr: length %g too big for string indexing, truncating to %g"
msgstr "substr: ʸ»ú¿ô %g ¤ÏºÇÂçÃͤòĶ¤¨¤Æ¤¤¤Þ¤¹¡£%g ¤ò»È¤¤¤Þ¤¹¡£"
-#: builtin.c:1536
+#: builtin.c:675
+#, c-format
+msgid "substr: start index %g is invalid, using 1"
+msgstr "substr: µ¯ÅÀ»Øɸ %g ¤¬ÉÔÀµ¤Ç¤¹¡£1 ¤ò»È¤¤¤Þ¤¹¡£"
+
+#: builtin.c:680
+#, c-format
+msgid "substr: non-integer start index %g will be truncated"
+msgstr "substr: µ¯ÅÀ»Øɸ %g ¤Î¾®¿ôÅÀ°Ê²¼¤ÏÀÚ¤ê¼Î¤Æ¤Þ¤¹¡£"
+
+#: builtin.c:705
msgid "substr: source string is zero length"
msgstr "substr: ʸ»úÎó¤ÎŤµ¤¬¥¼¥í¤Ç¤¹¡£"
-#: builtin.c:1552
+#: builtin.c:721
#, c-format
msgid "substr: start index %g is past end of string"
msgstr "substr: µ¯ÅÀ»Øɸ %g ¤¬Ê¸»úÎó¤ÎŤµ¤òĶ¤¨¤Æ¤¤¤Þ¤¹¡£"
-#: builtin.c:1560
+#: builtin.c:729
#, c-format
msgid ""
"substr: length %g at start index %g exceeds length of first argument (%lu)"
msgstr ""
"substr: µ¯ÅÀ»Øɸ %2$g ¤«¤é¤Îʸ»ú¿ô %1$g ¤Ïʸ»úÎó¤ÎŤµ %3$lu ¤òĶ¤¨¤Æ¤¤¤Þ¤¹¡£"
-#: builtin.c:1637
+#: builtin.c:806
+msgid "strftime: received non-numeric second argument"
+msgstr "strftime: ÂèÆó°ú¿ô¤¬¿ôÃͤǤϤ¢¤ê¤Þ¤»¤ó¡£"
+
+#: builtin.c:813
msgid "strftime: received non-string first argument"
msgstr "strftime: Âè°ì°ú¿ô¤¬Ê¸»úÎó¤Ç¤Ï¤¢¤ê¤Þ¤»¤ó¡£"
-#: builtin.c:1643
+#: builtin.c:819
msgid "strftime: received empty format string"
msgstr "strftime: ½ñ¼°»ØÄêʸ»úÎ󤬶õ¤Ç¤¹¡£"
-#: builtin.c:1652
-msgid "strftime: received non-numeric second argument"
-msgstr "strftime: ÂèÆó°ú¿ô¤¬¿ôÃͤǤϤ¢¤ê¤Þ¤»¤ó¡£"
-
-#: builtin.c:1729
+#: builtin.c:885
msgid "mktime: received non-string argument"
msgstr "mktime: °ú¿ô¤¬Ê¸»úÎó¤Ç¤Ï¤¢¤ê¤Þ¤»¤ó¡£"
-#: builtin.c:1746
+#: builtin.c:902
msgid "mktime: at least one of the values is out of the default range"
msgstr ""
-#: builtin.c:1781
+#: builtin.c:937
msgid "'system' function not allowed in sandbox mode"
msgstr ""
-#: builtin.c:1786
+#: builtin.c:942
msgid "system: received non-string argument"
msgstr "system: °ú¿ô¤¬Ê¸»úÎó¤Ç¤Ï¤¢¤ê¤Þ¤»¤ó¡£"
-#: builtin.c:1907 eval.c:2285
+#: builtin.c:997 eval.c:1105 eval.c:1557 eval.c:1570
+#, c-format
+msgid "reference to uninitialized variable `%s'"
+msgstr "½é´ü²½¤µ¤ì¤Æ¤¤¤Ê¤¤ÊÑ¿ô `%s' ¤ò»²¾È¤·¤Æ¤¤¤Þ¤¹¡£"
+
+#: builtin.c:1064
#, c-format
msgid "reference to uninitialized field `$%d'"
msgstr "½é´ü²½¤µ¤ì¤Æ¤¤¤Ê¤¤¥Õ¥£¡¼¥ë¥É `$%d' ¤ò»²¾È¤·¤Æ¤¤¤Þ¤¹¡£"
-#: builtin.c:2012
+#: builtin.c:1098
msgid "tolower: received non-string argument"
msgstr "tolower: °ú¿ô¤¬Ê¸»úÎó¤Ç¤Ï¤¢¤ê¤Þ¤»¤ó¡£"
-#: builtin.c:2042
+#: builtin.c:1151
msgid "toupper: received non-string argument"
msgstr "toupper: °ú¿ô¤¬Ê¸»úÎó¤Ç¤Ï¤¢¤ê¤Þ¤»¤ó¡£"
-#: builtin.c:2075
+#: builtin.c:1199
msgid "atan2: received non-numeric first argument"
msgstr "atan2: Âè°ì°ú¿ô¤¬¿ôÃͤǤϤ¢¤ê¤Þ¤»¤ó¡£"
-#: builtin.c:2077
+#: builtin.c:1201
msgid "atan2: received non-numeric second argument"
msgstr "atan2: ÂèÆó°ú¿ô¤¬¿ôÃͤǤϤ¢¤ê¤Þ¤»¤ó¡£"
-#: builtin.c:2096
+#: builtin.c:1220
msgid "sin: received non-numeric argument"
msgstr "sin: °ú¿ô¤¬¿ôÃͤǤϤ¢¤ê¤Þ¤»¤ó¡£"
-#: builtin.c:2112
+#: builtin.c:1236
msgid "cos: received non-numeric argument"
msgstr "cos: °ú¿ô¤¬¿ôÃͤǤϤ¢¤ê¤Þ¤»¤ó¡£"
-#: builtin.c:2165
+#: builtin.c:1289
msgid "srand: received non-numeric argument"
msgstr "srand: °ú¿ô¤¬¿ôÃͤǤϤ¢¤ê¤Þ¤»¤ó¡£"
-#: builtin.c:2200
+#: builtin.c:1320
msgid "match: third argument is not an array"
msgstr "match: Âè»°°ú¿ô¤¬ÇÛÎó̾¤Ç¤Ï¤¢¤ê¤Þ¤»¤ó¡£"
-#: builtin.c:2750
+#: builtin.c:1827
msgid "gensub: third argument of 0 treated as 1"
msgstr "gensub: Âè»°°ú¿ô¤¬ 0 ¤Ç¤¹¡£1 ¤òÂå¤ï¤ê¤Ë»ÈÍѤ·¤Þ¤¹¡£"
-#: builtin.c:2866
+#: builtin.c:1869
msgid "lshift: received non-numeric first argument"
msgstr "lshift: Âè°ì°ú¿ô¤¬¿ôÃͤǤϤ¢¤ê¤Þ¤»¤ó¡£"
-#: builtin.c:2868
+#: builtin.c:1871
msgid "lshift: received non-numeric second argument"
msgstr "lshift: ÂèÆó°ú¿ô¤¬¿ôÃͤǤϤ¢¤ê¤Þ¤»¤ó¡£"
-#: builtin.c:2874
+#: builtin.c:1877
#, c-format
msgid "lshift(%lf, %lf): negative values will give strange results"
msgstr "lshift(%lf, %lf): Éé¤Î¿ôÃͤò»ÈÍѤ¹¤ë¤È°Û¾ï¤Ê·ë²Ì¤Ë¤Ê¤ê¤Þ¤¹¡£"
-#: builtin.c:2876
+#: builtin.c:1879
#, c-format
msgid "lshift(%lf, %lf): fractional values will be truncated"
msgstr "lshift(%lf, %lf): ¾®¿ôÅÀ°Ê²¼¤ÏÀÚ¤ê¼Î¤Æ¤Ë¤Ê¤ê¤Þ¤¹¡£"
-#: builtin.c:2878
+#: builtin.c:1881
#, c-format
msgid "lshift(%lf, %lf): too large shift value will give strange results"
msgstr "lshift(%lf, %lf): ¥·¥Õ¥ÈÃͤ¬Â礭²á¤®¤ë¤È°Û¾ï¤Ê·ë²Ì¤Ë¤Ê¤ê¤Þ¤¹¡£"
-#: builtin.c:2904
+#: builtin.c:1908
msgid "rshift: received non-numeric first argument"
msgstr "rshift: Âè°ì°ú¿ô¤¬¿ôÃͤǤϤ¢¤ê¤Þ¤»¤ó¡£"
-#: builtin.c:2906
+#: builtin.c:1910
msgid "rshift: received non-numeric second argument"
msgstr "rshift: ÂèÆó°ú¿ô¤¬¿ôÃͤǤϤ¢¤ê¤Þ¤»¤ó¡£"
-#: builtin.c:2912
+#: builtin.c:1916
#, c-format
msgid "rshift(%lf, %lf): negative values will give strange results"
msgstr "rshift(%lf, %lf): Éé¤Î¿ôÃͤò»ÈÍѤ¹¤ë¤È°Û¾ï¤Ê·ë²Ì¤Ë¤Ê¤ê¤Þ¤¹¡£"
-#: builtin.c:2914
+#: builtin.c:1918
#, c-format
msgid "rshift(%lf, %lf): fractional values will be truncated"
msgstr "rshift(%lf, %lf): ¾®¿ôÅÀ°Ê²¼¤ÏÀÚ¤ê¼Î¤Æ¤Ë¤Ê¤ê¤Þ¤¹¡£"
-#: builtin.c:2916
+#: builtin.c:1920
#, c-format
msgid "rshift(%lf, %lf): too large shift value will give strange results"
msgstr "rshift(%lf, %lf): ¥·¥Õ¥ÈÃͤ¬Â礭²á¤®¤ë¤È°Û¾ï¤Ê·ë²Ì¤Ë¤Ê¤ê¤Þ¤¹¡£"
-#: builtin.c:2942
+#: builtin.c:1947
msgid "and: received non-numeric first argument"
msgstr "and: Âè°ì°ú¿ô¤¬¿ôÃͤǤϤ¢¤ê¤Þ¤»¤ó¡£"
-#: builtin.c:2944
+#: builtin.c:1949
msgid "and: received non-numeric second argument"
msgstr "and: ÂèÆó°ú¿ô¤¬¿ôÃͤǤϤ¢¤ê¤Þ¤»¤ó¡£"
-#: builtin.c:2950
+#: builtin.c:1955
#, c-format
msgid "and(%lf, %lf): negative values will give strange results"
msgstr "and(%lf, %lf): Éé¤Î¿ôÃͤò»ÈÍѤ¹¤ë¤È°Û¾ï¤Ê·ë²Ì¤Ë¤Ê¤ê¤Þ¤¹¡£"
-#: builtin.c:2952
+#: builtin.c:1957
#, c-format
msgid "and(%lf, %lf): fractional values will be truncated"
msgstr "and(%lf, %lf): ¾®¿ôÅÀ°Ê²¼¤ÏÀÚ¤ê¼Î¤Æ¤Ë¤Ê¤ê¤Þ¤¹¡£"
-#: builtin.c:2978
+#: builtin.c:1984
msgid "or: received non-numeric first argument"
msgstr "or: Âè°ì°ú¿ô¤¬¿ôÃͤǤϤ¢¤ê¤Þ¤»¤ó¡£"
-#: builtin.c:2980
+#: builtin.c:1986
msgid "or: received non-numeric second argument"
msgstr "or: ÂèÆó°ú¿ô¤¬¿ôÃͤǤϤ¢¤ê¤Þ¤»¤ó¡£"
-#: builtin.c:2986
+#: builtin.c:1992
#, c-format
msgid "or(%lf, %lf): negative values will give strange results"
msgstr "or(%lf, %lf): Éé¤Î¿ôÃͤò»ÈÍѤ¹¤ë¤È°Û¾ï¤Ê·ë²Ì¤Ë¤Ê¤ê¤Þ¤¹¡£"
-#: builtin.c:2988
+#: builtin.c:1994
#, c-format
msgid "or(%lf, %lf): fractional values will be truncated"
msgstr "or(%lf, %lf): ¾®¿ôÅÀ°Ê²¼¤ÏÀÚ¤ê¼Î¤Æ¤Ë¤Ê¤ê¤Þ¤¹¡£"
-#: builtin.c:3014
+#: builtin.c:2023
msgid "xor: received non-numeric first argument"
msgstr "xor: Âè°ì°ú¿ô¤¬¿ôÃͤǤϤ¢¤ê¤Þ¤»¤ó¡£"
-#: builtin.c:3016
+#: builtin.c:2025
msgid "xor: received non-numeric second argument"
msgstr "xor: ÂèÆó°ú¿ô¤¬¿ôÃͤǤϤ¢¤ê¤Þ¤»¤ó¡£"
-#: builtin.c:3022
+#: builtin.c:2031
#, c-format
msgid "xor(%lf, %lf): negative values will give strange results"
msgstr "xor(%lf, %lf): Éé¤Î¿ôÃͤò»ÈÍѤ¹¤ë¤È°Û¾ï¤Ê·ë²Ì¤Ë¤Ê¤ê¤Þ¤¹¡£"
-#: builtin.c:3024
+#: builtin.c:2033
#, c-format
msgid "xor(%lf, %lf): fractional values will be truncated"
msgstr "xor(%lf, %lf): ¾®¿ôÅÀ°Ê²¼¤ÏÀÚ¤ê¼Î¤Æ¤Ë¤Ê¤ê¤Þ¤¹¡£"
-#: builtin.c:3048
+#: builtin.c:2057 builtin.c:2063
msgid "compl: received non-numeric argument"
msgstr "compl: °ú¿ô¤¬¿ôÃͤǤϤ¢¤ê¤Þ¤»¤ó¡£"
-#: builtin.c:3054
+#: builtin.c:2065
#, c-format
msgid "compl(%lf): negative value will give strange results"
msgstr "compl(%lf): Éé¤Î¿ôÃͤò»ÈÍѤ¹¤ë¤È°Û¾ï¤Ê·ë²Ì¤Ë¤Ê¤ê¤Þ¤¹¡£"
-#: builtin.c:3056
+#: builtin.c:2067
#, c-format
msgid "compl(%lf): fractional value will be truncated"
msgstr "compl(%lf): ¾®¿ôÅÀ°Ê²¼¤ÏÀÚ¤ê¼Î¤Æ¤Ë¤Ê¤ê¤Þ¤¹¡£"
-#: builtin.c:3229
+#: builtin.c:2237
#, c-format
msgid "dcgettext: `%s' is not a valid locale category"
msgstr "dcgettext: `%s' ¤ÏÉÔÀµ¤Ê¥í¥«¡¼¥ë¡¦¥«¥Æ¥´¥ê¡¼¤Ç¤¹¡£"
-#: eval.c:374
+#: eval.c:412
#, c-format
msgid "unknown nodetype %d"
msgstr "¥Î¡¼¥É %d ¤Î¼ïÎबÉÔÌÀ¤Ç¤¹¡£"
-#: eval.c:423
-msgid "buffer overflow in genflags2str"
-msgstr "genflags2str ¤¬¥Ð¥Ã¥Õ¥¡ÍÆÎ̤òĶ²á¤·¤Þ¤·¤¿¡£"
+#: eval.c:423 eval.c:437
+#, fuzzy, c-format
+msgid "unknown opcode %d"
+msgstr "¥Î¡¼¥É %d ¤Î¼ïÎबÉÔÌÀ¤Ç¤¹¡£"
-#: eval.c:455 eval.c:461 profile.c:787
+#: eval.c:434
#, c-format
-msgid "attempt to use array `%s' in a scalar context"
-msgstr "¥¹¥«¥é¡¼´Ä¶­¤ËÇÛÎó `%s' ¤ò»ÈÍѤ·¤Æ¤¤¤Þ¤¹¡£"
+msgid "opcode %s not an operator or keyword"
+msgstr ""
+
+#: eval.c:487
+msgid "buffer overflow in genflags2str"
+msgstr "genflags2str ¤¬¥Ð¥Ã¥Õ¥¡ÍÆÎ̤òĶ²á¤·¤Þ¤·¤¿¡£"
-#: eval.c:803
+#: eval.c:613
#, c-format
-msgid "for loop: array `%s' changed size from %ld to %ld during loop execution"
+msgid ""
+"\n"
+"\t# Function Call Stack:\n"
+"\n"
msgstr ""
-"for ¥ë¡¼¥×: ¥ë¡¼¥×Ãæ¤ËÇÛÎó `%s' ¤Î¥µ¥¤¥º¤¬ %ld ¤«¤é %ld ¤ËÊѤï¤ê¤Þ¤·¤¿¡£"
-
-#: eval.c:824
-msgid "`break' outside a loop is not portable"
-msgstr "¥ë¡¼¥×¤Î³°¤Ç»ÈÍѤ¹¤ë `break' ¤Ï¾¤Î awk ¤Ç»ÈÍѤǤ­¤Þ¤»¤ó¡£"
+"\n"
+"\t# ¸Æ½Ð´Ø¿ô¥¹¥¿¥Ã¥¯:\n"
+"\n"
-#: eval.c:828
-msgid "`break' outside a loop is not allowed"
-msgstr "¥ë¡¼¥×¤Î³°¤Ç¤Ï `break' ¤ò»ÈÍѤǤ­¤Þ¤»¤ó¡£"
+#: eval.c:640
+msgid "`IGNORECASE' is a gawk extension"
+msgstr "`IGNORECASE' ¤Ï gawk ÆÃÍ­¤Î³ÈÄ¥¤Ç¤¹¡£"
-#: eval.c:845
-msgid "`continue' outside a loop is not portable"
-msgstr "¥ë¡¼¥×¤Î³°¤Ç»ÈÍѤ¹¤ë `continue' ¤Ï¾¤Î awk ¤Ç»ÈÍѤǤ­¤Þ¤»¤ó¡£"
+#: eval.c:669
+msgid "`BINMODE' is a gawk extension"
+msgstr "`BINMODE' ¤Ï gawk ÆÃÍ­¤Î³ÈÄ¥¤Ç¤¹¡£"
-#: eval.c:849
-msgid "`continue' outside a loop is not allowed"
-msgstr "¥ë¡¼¥×¤Î³°¤Ç¤Ï `continue' ¤ò»ÈÍѤǤ­¤Þ¤»¤ó¡£"
+#: eval.c:727
+#, c-format
+msgid "BINMODE value `%s' is invalid, treated as 3"
+msgstr ""
-#: eval.c:883
-msgid "`next' cannot be called from a BEGIN rule"
-msgstr "BEGIN ¥ë¡¼¥ë¤«¤é¤Ï `next' ¤ò¸Æ¤Ó½Ð¤»¤Þ¤»¤ó¡£"
+#: eval.c:817
+#, c-format
+msgid "bad `%sFMT' specification `%s'"
+msgstr "`%sFMT' ¤Î»ØÄê `%s' ¤¬´Ö°ã¤Ã¤Æ¤¤¤Þ¤¹¡£"
-#: eval.c:885
-msgid "`next' cannot be called from an END rule"
-msgstr "END ¥ë¡¼¥ë¤«¤é¤Ï `next' ¤ò¸Æ¤Ó½Ð¤»¤Þ¤»¤ó¡£"
+#: eval.c:895
+msgid "turning off `--lint' due to assignment to `LINT'"
+msgstr "`LINT' ¤Ø¤ÎÂåÆþ¤Ë½¾¤¤ `--lint' ¤ò̵¸ú¤Ë¤·¤Þ¤¹¡£"
-#: eval.c:887
-#, fuzzy
-msgid "`next' cannot be called from a BEGINFILE rule"
-msgstr "BEGIN ¥ë¡¼¥ë¤«¤é¤Ï `next' ¤ò¸Æ¤Ó½Ð¤»¤Þ¤»¤ó¡£"
+#: eval.c:1067 eval.c:1544
+#, c-format
+msgid "can't use function name `%s' as variable or array"
+msgstr "´Ø¿ô̾ `%s' ¤ÏÊÑ¿ô¤äÇÛÎó¤Ë¤Ï»È¤¨¤Þ¤»¤ó¡£"
-#: eval.c:889
-#, fuzzy
-msgid "`next' cannot be called from an ENDFILE rule"
-msgstr "END ¥ë¡¼¥ë¤«¤é¤Ï `next' ¤ò¸Æ¤Ó½Ð¤»¤Þ¤»¤ó¡£"
+#: eval.c:1095
+msgid "assignment is not allowed to result of builtin function"
+msgstr "Áȹþ´Ø¿ô¤ÎÌá¤êÃͤËÂåÆþ¤Ï¤Ç¤­¤Þ¤»¤ó¡£"
-#: eval.c:898
-msgid "`nextfile' cannot be called from a BEGIN rule"
-msgstr "BEGIN ¥ë¡¼¥ë¤«¤é¤Ï `nextfile' ¤ò¸Æ¤Ó½Ð¤»¤Þ¤»¤ó¡£"
+#: eval.c:1104 eval.c:1556 eval.c:1569
+#, c-format
+msgid "reference to uninitialized argument `%s'"
+msgstr "½é´ü²½¤µ¤ì¤Æ¤¤¤Ê¤¤°ú¿ô `%s' ¤ò»²¾È¤·¤Æ¤¤¤Þ¤¹¡£"
-#: eval.c:900
-msgid "`nextfile' cannot be called from an END rule"
-msgstr "END ¥ë¡¼¥ë¤«¤é¤Ï `nextfile' ¤ò¸Æ¤Ó½Ð¤»¤Þ¤»¤ó¡£"
+#: eval.c:1123
+msgid "attempt to field reference from non-numeric value"
+msgstr "¿ôÃͰʳ°¤ÎÃͤò»È¤Ã¤Æ¥Õ¥¤¡¼¥ë¥É¤ò»²¾È¤·¤Æ¤¤¤Þ¤¹¡£"
-#: eval.c:906
+#: eval.c:1125
#, fuzzy
-msgid "`nextfile' cannot be called from an ENDFILE rule"
-msgstr "END ¥ë¡¼¥ë¤«¤é¤Ï `nextfile' ¤ò¸Æ¤Ó½Ð¤»¤Þ¤»¤ó¡£"
+msgid "attempt to field reference from null string"
+msgstr "¶õÎó¤ò»È¤Ã¤Æ»²¾È¤·¤Æ¤¤¤Þ¤¹¡£"
-#: eval.c:963
-msgid "statement has no effect"
-msgstr "Ì¿Îáʸ¤Ë¸ú²Ì¤Ï¤¢¤ê¤Þ¤»¤ó¡£"
+#: eval.c:1131
+#, fuzzy, c-format
+msgid "attempt to access field %ld"
+msgstr "¥Õ¥£¡¼¥ë¥É %d ¤ò»²¾È¤·¤Æ¤¤¤Þ¤¹¡£"
-#: eval.c:1040 eval.c:2133
-#, c-format
-msgid "can't use function name `%s' as variable or array"
-msgstr "´Ø¿ô̾ `%s' ¤ÏÊÑ¿ô¤äÇÛÎó¤Ë¤Ï»È¤¨¤Þ¤»¤ó¡£"
+#: eval.c:1140
+#, fuzzy, c-format
+msgid "reference to uninitialized field `$%ld'"
+msgstr "½é´ü²½¤µ¤ì¤Æ¤¤¤Ê¤¤¥Õ¥£¡¼¥ë¥É `$%d' ¤ò»²¾È¤·¤Æ¤¤¤Þ¤¹¡£"
-#: eval.c:1047 eval.c:1053
+#: eval.c:1202
#, c-format
-msgid "reference to uninitialized argument `%s'"
-msgstr "½é´ü²½¤µ¤ì¤Æ¤¤¤Ê¤¤°ú¿ô `%s' ¤ò»²¾È¤·¤Æ¤¤¤Þ¤¹¡£"
+msgid "function `%s' called with more arguments than declared"
+msgstr "Àë¸À¤µ¤ì¤Æ¤¤¤ë¿ô¤è¤ê¿¤¤°ú¿ô¤ò»È¤Ã¤Æ´Ø¿ô `%s' ¤ò¸Æ¤Ó½Ð¤·¤Þ¤·¤¿¡£"
-#: eval.c:1062 eval.c:2142
+#: eval.c:1358
#, c-format
-msgid "reference to uninitialized variable `%s'"
-msgstr "½é´ü²½¤µ¤ì¤Æ¤¤¤Ê¤¤ÊÑ¿ô `%s' ¤ò»²¾È¤·¤Æ¤¤¤Þ¤¹¡£"
-
-#: eval.c:1210
-msgid ""
-"concatenation: side effects in one expression have changed the length of "
-"another!"
+msgid "unwind_stack: unexpected type `%s'"
msgstr ""
-"concatenation¡Êʸ»úÎóÏ¢·ë¡Ë: °ìÊý¤Î¼°¤ÎÉûºîÍѤǡ¢¤â¤¦°ìÊý¤ÎŤµ¤¬ÊѤï¤ê¤Þ¤·"
-"¤¿!"
-#: eval.c:1315
+#: eval.c:1636
+#, fuzzy, c-format
+msgid "attempt to use scalar `%s' as an array"
+msgstr "¥¹¥«¥é¡¼ `%s' ¤òÇÛÎó¤È¤·¤Æ»ÈÍѤ·¤Æ¤¤¤Þ¤¹¡£"
+
+#: eval.c:1680
msgid "assignment used in conditional context"
msgstr "¾ò·ïʸÃæ¤Ç¤ÎÂåÆþ"
-#: eval.c:1396
-msgid "division by zero attempted"
-msgstr "¥¼¥í¤Ç¤Î½ü»»¤ò¹Ô¤¤¤Þ¤·¤¿¡£"
-
-#: eval.c:1426 profile.c:663
-#, c-format
-msgid "illegal type (%s) in tree_eval"
-msgstr "tree_eval ¤ÎÃæ¤ËÉÔÀµ¤Ê¥¿¥¤¥× (%s) ¤¬»ÈÍѤµ¤ì¤Æ¤¤¤Þ¤¹¡£"
+#: eval.c:1684
+msgid "statement has no effect"
+msgstr "Ì¿Îáʸ¤Ë¸ú²Ì¤Ï¤¢¤ê¤Þ¤»¤ó¡£"
-#: eval.c:1589
+#: eval.c:2028
msgid "division by zero attempted in `/='"
msgstr "`/=' ¤Ç¥¼¥í¤Ç¤Î½ü»»¤ò¹Ô¤¤¤Þ¤·¤¿¡£"
-#: eval.c:1611
+#: eval.c:2053
#, c-format
msgid "division by zero attempted in `%%='"
msgstr "`%%=' ¤Ç¥¼¥í¤Ç¤Î½ü»»¤ò¹Ô¤¤¤Þ¤·¤¿¡£"
-#: eval.c:1891
-#, c-format
-msgid "function `%s' called with more arguments than declared"
-msgstr "Àë¸À¤µ¤ì¤Æ¤¤¤ë¿ô¤è¤ê¿¤¤°ú¿ô¤ò»È¤Ã¤Æ´Ø¿ô `%s' ¤ò¸Æ¤Ó½Ð¤·¤Þ¤·¤¿¡£"
-
-#: eval.c:1948
-#, c-format
-msgid "function `%s' not defined"
-msgstr "´Ø¿ô `%s' ¤ÏÄêµÁ¤µ¤ì¤Æ¤¤¤Þ¤»¤ó¡£"
-
-#: eval.c:1950
-#, c-format
-msgid "identifier `%s' is not a function"
-msgstr ""
-
-#: eval.c:1997
-#, c-format
-msgid ""
-"function parameter `%s' is not a scalar and cannot be used for indirect "
-"function call"
-msgstr ""
-
-#: eval.c:2014
-#, c-format
-msgid "indirect call of real function `%s' is silly"
-msgstr ""
+#: eval.c:2139
+msgid "`continue' outside a loop is not allowed"
+msgstr "¥ë¡¼¥×¤Î³°¤Ç¤Ï `continue' ¤ò»ÈÍѤǤ­¤Þ¤»¤ó¡£"
-#: eval.c:2034
-#, c-format
-msgid "function `%s' called indirectly through `%s' does not exist"
-msgstr ""
+#: eval.c:2145
+#, fuzzy
+msgid "`break' outside a loop is not allowed"
+msgstr "¥ë¡¼¥×¤Î³°¤Ç¤Ï `break' ¤ò»ÈÍѤǤ­¤Þ¤»¤ó¡£"
-#: eval.c:2039
+#: eval.c:2229
#, c-format
-msgid "identifier `%s' cannot be used for indirect function call"
+msgid "for loop: array `%s' changed size from %ld to %ld during loop execution"
msgstr ""
+"for ¥ë¡¼¥×: ¥ë¡¼¥×Ãæ¤ËÇÛÎó `%s' ¤Î¥µ¥¤¥º¤¬ %ld ¤«¤é %ld ¤ËÊѤï¤ê¤Þ¤·¤¿¡£"
-#: eval.c:2105
+#: eval.c:2342
#, c-format
-msgid ""
-"\n"
-"\t# Function Call Stack:\n"
-"\n"
+msgid "function called indirectly through `%s' does not exist"
msgstr ""
-"\n"
-"\t# ¸Æ½Ð´Ø¿ô¥¹¥¿¥Ã¥¯:\n"
-"\n"
-
-#: eval.c:2108
-#, c-format
-msgid "\t# -- main --\n"
-msgstr "\t# -- ¥á¥¤¥ó --\n"
-
-#: eval.c:2269
-msgid "attempt to field reference from non-numeric value"
-msgstr "¿ôÃͰʳ°¤ÎÃͤò»È¤Ã¤Æ¥Õ¥¤¡¼¥ë¥É¤ò»²¾È¤·¤Æ¤¤¤Þ¤¹¡£"
-
-#: eval.c:2271
-msgid "attempt to reference from null string"
-msgstr "¶õÎó¤ò»È¤Ã¤Æ»²¾È¤·¤Æ¤¤¤Þ¤¹¡£"
-#: eval.c:2277
+#: eval.c:2354
#, c-format
-msgid "attempt to access field %d"
-msgstr "¥Õ¥£¡¼¥ë¥É %d ¤ò»²¾È¤·¤Æ¤¤¤Þ¤¹¡£"
-
-#: eval.c:2298 eval.c:2305 profile.c:843
-msgid "assignment is not allowed to result of builtin function"
-msgstr "Áȹþ´Ø¿ô¤ÎÌá¤êÃͤËÂåÆþ¤Ï¤Ç¤­¤Þ¤»¤ó¡£"
+msgid "function `%s' not defined"
+msgstr "´Ø¿ô `%s' ¤ÏÄêµÁ¤µ¤ì¤Æ¤¤¤Þ¤»¤ó¡£"
-#: eval.c:2369
-msgid "`IGNORECASE' is a gawk extension"
-msgstr "`IGNORECASE' ¤Ï gawk ÆÃÍ­¤Î³ÈÄ¥¤Ç¤¹¡£"
+#: eval.c:2481
+#, fuzzy, c-format
+msgid "`nextfile' cannot be called from a `%s' rule"
+msgstr "END ¥ë¡¼¥ë¤«¤é¤Ï `nextfile' ¤ò¸Æ¤Ó½Ð¤»¤Þ¤»¤ó¡£"
-#: eval.c:2398
-msgid "`BINMODE' is a gawk extension"
-msgstr "`BINMODE' ¤Ï gawk ÆÃÍ­¤Î³ÈÄ¥¤Ç¤¹¡£"
+#: eval.c:2540
+#, fuzzy, c-format
+msgid "`next' cannot be called from a `%s' rule"
+msgstr "END ¥ë¡¼¥ë¤«¤é¤Ï `next' ¤ò¸Æ¤Ó½Ð¤»¤Þ¤»¤ó¡£"
-#: eval.c:2456
+#: eval.c:2602
#, c-format
-msgid "BINMODE value `%s' is invalid, treated as 3"
+msgid "Sorry, don't know how to interpret `%s'"
msgstr ""
-#: eval.c:2546
-#, c-format
-msgid "bad `%sFMT' specification `%s'"
-msgstr "`%sFMT' ¤Î»ØÄê `%s' ¤¬´Ö°ã¤Ã¤Æ¤¤¤Þ¤¹¡£"
-
-#: eval.c:2624
-msgid "turning off `--lint' due to assignment to `LINT'"
-msgstr "`LINT' ¤Ø¤ÎÂåÆþ¤Ë½¾¤¤ `--lint' ¤ò̵¸ú¤Ë¤·¤Þ¤¹¡£"
-
-#: ext.c:61
-msgid "extensions not allowed in sandbox mode"
+#: ext.c:62
+msgid "extensions are not allowed in sandbox mode"
msgstr ""
-#: ext.c:65 ext.c:70
+#: ext.c:68 ext.c:73
msgid "`extension' is a gawk extension"
msgstr "`extension' ¤Ï gawk ÆÃÍ­¤Î³ÈÄ¥¤Ç¤¹¡£"
-#: ext.c:80
-#, c-format
-msgid "extension: cannot open `%s' (%s)\n"
+#: ext.c:83
+#, fuzzy, c-format
+msgid "fatal: extension: cannot open `%s' (%s)\n"
msgstr "extension: `%s' ¤ò³«¤±¤Þ¤»¤ó (%s)¡£\n"
-#: ext.c:88
-#, c-format
-msgid "extension: library `%s': cannot call function `%s' (%s)\n"
+#: ext.c:93
+#, fuzzy, c-format
+msgid "fatal: extension: library `%s': cannot call function `%s' (%s)\n"
msgstr "extension: ¥é¥¤¥Ö¥é¥ê `%s': ´Ø¿ô `%s' ¤ò¸Æ¤Ó½Ð¤»¤Þ¤»¤ó (%s)¡£\n"
-#: ext.c:108
+#: ext.c:123
msgid "extension: missing function name"
msgstr "extension: ´Ø¿ô̾¤¬¤¢¤ê¤Þ¤»¤ó¡£"
-#: ext.c:113
+#: ext.c:128
#, c-format
msgid "extension: illegal character `%c' in function name `%s'"
msgstr "extension: ´Ø¿ô̾ `%2$s' ¤ÎÃæ¤ËÉÔÀµ¤Êʸ»ú `%1$c' ¤¬»È¤ï¤ì¤Æ¤¤¤Þ¤¹¡£"
-#: ext.c:119
+#: ext.c:137
#, c-format
msgid "extension: can't redefine function `%s'"
msgstr "extension: ´Ø¿ô `%s' ¤òºÆÄêµÁ¤Ç¤­¤Þ¤»¤ó¡£"
-#: ext.c:123
+#: ext.c:141
#, c-format
msgid "extension: function `%s' already defined"
msgstr "extension: ´Ø¿ô `%s' ¤Ï´û¤ËÄêµÁ¤µ¤ì¤Æ¤¤¤Þ¤¹¡£"
-#: ext.c:128
+#: ext.c:146
+#, c-format
+msgid "extension: function name `%s' previously defined"
+msgstr "extension: ´Ø¿ô̾ `%s' ¤Ï´û¤ËÄêµÁ¤µ¤ì¤Æ¤¤¤Þ¤¹¡£"
+
+#: ext.c:148
#, c-format
msgid "extension: can't use gawk built-in `%s' as function name"
msgstr "extension: ÁȤ߹þ¤ß´Ø¿ô `%s' ¤Ï´Ø¿ô̾¤Ë»È¤¨¤Þ¤»¤ó¡£"
-#: ext.c:130
+#: ext.c:152
#, c-format
-msgid "extension: function name `%s' previously defined"
-msgstr "extension: ´Ø¿ô̾ `%s' ¤Ï´û¤ËÄêµÁ¤µ¤ì¤Æ¤¤¤Þ¤¹¡£"
+msgid "make_builtin: negative argument count for function `%s'"
+msgstr ""
-#: ext.c:207
-#, c-format
+#: ext.c:255
+#, fuzzy, c-format
msgid "function `%s' defined to take no more than %d argument(s)"
msgstr "´Ø¿ô `%s' ¤Ë»È¤¨¤ë°ú¿ô¤Î¿ô¤Ï `%d' °Ê²¼¤ÈÄêµÁ¤µ¤ì¤Æ¤¤¤Þ¤¹¡£"
-#: ext.c:210
+#: ext.c:258
#, c-format
msgid "function `%s': missing argument #%d"
msgstr "´Ø¿ô `%s': °ú¿ô #%d ¤¬¤¢¤ê¤Þ¤»¤ó¡£"
-#: ext.c:220
+#: ext.c:268
#, c-format
msgid "function `%s': argument #%d: attempt to use scalar as an array"
msgstr "´Ø¿ô `%s': °ú¿ô #%d: ¥¹¥«¥é¡¼¤òÇÛÎó¤È¤·¤Æ»ÈÍѤ·¤Æ¤¤¤Þ¤¹¡£"
-#: ext.c:224
+#: ext.c:272
#, c-format
msgid "function `%s': argument #%d: attempt to use array as a scalar"
msgstr "´Ø¿ô `%s': °ú¿ô #%d: ÇÛÎó¤ò¥¹¥«¥é¡¼¤È¤·¤Æ»ÈÍѤ·¤Æ¤¤¤Þ¤¹¡£"
-#: ext.c:249
+#: ext.c:285
msgid "Operation Not Supported"
msgstr "¤³¤ÎÁàºî¤Ï¼ÂÁõ¤µ¤ì¤Æ¤¤¤Þ¤»¤ó¡£"
@@ -1132,59 +1072,58 @@ msgstr "¤³¤ÎÁàºî¤Ï¼ÂÁõ¤µ¤ì¤Æ¤¤¤Þ¤»¤ó¡£"
msgid "NF set to negative value"
msgstr "NF ¤¬Éé¤ÎÃͤǤ¹¡£"
-#: field.c:913
-msgid "split: second argument is not an array"
-msgstr "split: ÂèÆó°ú¿ô¤¬ÇÛÎó¤Ç¤Ï¤¢¤ê¤Þ¤»¤ó¡£"
-
-#: field.c:922 field.c:932 field.c:937
+#: field.c:939 field.c:946 field.c:950
#, fuzzy
msgid "split: fourth argument is a gawk extension"
msgstr "match: Âè»°°ú¿ô¤Ï gawk ÆÃÍ­¤Î³ÈÄ¥¤Ç¤¹¡£"
-#: field.c:928
+#: field.c:943
#, fuzzy
msgid "split: fourth argument is not an array"
msgstr "split: ÂèÆó°ú¿ô¤¬ÇÛÎó¤Ç¤Ï¤¢¤ê¤Þ¤»¤ó¡£"
-#: field.c:975
-#, fuzzy
-msgid "split: null string for third argument is a gawk extension"
+#: field.c:957
+msgid "split: second argument is not an array"
+msgstr "split: ÂèÆó°ú¿ô¤¬ÇÛÎó¤Ç¤Ï¤¢¤ê¤Þ¤»¤ó¡£"
+
+#: field.c:987
+msgid "split: null string for third arg is a gawk extension"
msgstr "split: Âè»°°ú¿ô¤Ë¶õÎó¤ò»ÈÍѤ¹¤ë¤Î¤Ï gawk ÆÃÍ­¤Î³ÈÄ¥¤Ç¤¹¡£"
-#: field.c:1032
+#: field.c:1028
#, fuzzy
-msgid "patsplit: second argument is not an array"
+msgid "patsplit: fourth argument is not an array"
msgstr "split: ÂèÆó°ú¿ô¤¬ÇÛÎó¤Ç¤Ï¤¢¤ê¤Þ¤»¤ó¡£"
-#: field.c:1041
+#: field.c:1033
#, fuzzy
-msgid "patsplit: fourth argument is not an array"
+msgid "patsplit: second argument is not an array"
msgstr "split: ÂèÆó°ú¿ô¤¬ÇÛÎó¤Ç¤Ï¤¢¤ê¤Þ¤»¤ó¡£"
-#: field.c:1067
+#: field.c:1051
#, fuzzy
msgid "patsplit: third argument must be non-null"
msgstr "match: Âè»°°ú¿ô¤¬ÇÛÎó̾¤Ç¤Ï¤¢¤ê¤Þ¤»¤ó¡£"
-#: field.c:1111
+#: field.c:1084
msgid "`FIELDWIDTHS' is a gawk extension"
msgstr "`FIELDWIDTHS' ¤Ï gawk ÆÃÍ­¤Î³ÈÄ¥¤Ç¤¹¡£"
-#: field.c:1141 field.c:1155
+#: field.c:1147
#, c-format
msgid "invalid FIELDWIDTHS value, near `%s'"
msgstr "`%s' ÉÕ¶á¤Î FIELDWIDTHS Ãͤ¬ÉÔÀµ¤Ç¤¹¡£"
-#: field.c:1238
+#: field.c:1220
msgid "null string for `FS' is a gawk extension"
msgstr "`FS' ¤Ë¶õÎó¤ò»ÈÍѤ¹¤ë¤Î¤Ï gawk ÆÃÍ­¤Î³ÈÄ¥¤Ç¤¹¡£"
-#: field.c:1242
+#: field.c:1224
#, fuzzy
msgid "old awk does not support regexps as value of `FS'"
msgstr "±é»»»Ò `**' ¤Ï¸Å¤¤ awk ¤Ç»È¤¨¤Þ¤»¤ó¡£"
-#: field.c:1357
+#: field.c:1343
#, fuzzy
msgid "`FPAT' is a gawk extension"
msgstr "`%s' ¤Ï gawk ÆÃÍ­¤Î³ÈÄ¥¤Ç¤¹¡£"
@@ -1244,509 +1183,506 @@ msgstr "%s: ¥ª¥×¥·¥ç¥ó `-W %s' ¤Ë°ú¿ô¤Ï¤¢¤ê¤Þ¤»¤ó¡£\n"
msgid "%s: option '-W %s' requires an argument\n"
msgstr "%s: ¥ª¥×¥·¥ç¥ó `%s' ¤Ë¤Ï°ú¿ô¤¬É¬ÍפǤ¹¡£\n"
-#: io.c:379
+#: io.c:272
#, c-format
msgid "command line argument `%s' is a directory: skipped"
msgstr ""
-#: io.c:413
+#: io.c:275 io.c:372
#, c-format
msgid "cannot open file `%s' for reading (%s)"
msgstr "¥Õ¥¡¥¤¥ë `%s' ¤òÆɤ߹þ¤à¤¿¤á¤Ë³«¤±¤Þ¤»¤ó (%s)¡£"
-#: io.c:459 io.c:2999
+#: io.c:419
#, c-format
msgid "error reading input file `%s': %s"
msgstr "ÆþÎÏ¥Õ¥¡¥¤¥ë `%s' ¤òÆɤ߹þ¤ßÃæ¤Ë¥¨¥é¡¼¤¬È¯À¸¤·¤Þ¤·¤¿: %s¡£"
-#: io.c:506
+#: io.c:470
#, c-format
msgid "close of fd %d (`%s') failed (%s)"
msgstr "fd %d (`%s') ¤òÊĤ¸¤ë¤³¤È¤¬¤Ç¤­¤Þ¤»¤ó (%s)¡£"
-#: io.c:617
-msgid "redirection not allowed in sandbox mode"
-msgstr ""
-
-#: io.c:648
-#, c-format
-msgid "invalid tree type %s in redirect()"
-msgstr "redirect() ¤ÎÃæ¤ÇÉÔÀµ¤Ê¥Ä¥ê¡¼¥¿¥¤¥× %s ¤ò»ÈÍѤ·¤Æ¤¤¤Þ¤¹¡£"
-
-#: io.c:654
+#: io.c:577
#, c-format
msgid "expression in `%s' redirection only has numeric value"
msgstr "`%s' ¥ê¥À¥¤¥ì¥¯¥È¤ÎÌ¿Îá¼°¤Ë¿ôÃͤ·¤«µ­½Ò¤µ¤ì¤Æ¤¤¤Þ¤»¤ó¡£"
-#: io.c:660
+#: io.c:583
#, c-format
msgid "expression for `%s' redirection has null string value"
msgstr "`%s' ¥ê¥À¥¤¥ì¥¯¥È¤ÎÌ¿Îá¼°¤¬¶õÎó¤Ç¤¹¡£"
-#: io.c:665
+#: io.c:589
#, c-format
msgid "filename `%s' for `%s' redirection may be result of logical expression"
msgstr ""
"`%2$s' ¥ê¥À¥¤¥ì¥¯¥È¤ËÏÀÍý±é»»¤Î·ë²Ì¤È»×¤ï¤ì¤ë¥Õ¥¡¥¤¥ë̾ `%1$s' ¤¬»È¤ï¤ì¤Æ¤¤¤Þ"
"¤¹¡£"
-#: io.c:707
+#: io.c:628
#, c-format
msgid "unnecessary mixing of `>' and `>>' for file `%.*s'"
msgstr "¥Õ¥¡¥¤¥ë `%.*s' ¤ÇɬÍװʾå¤Ë `>' ¤È `>>' ¤òÁȹ礻¤Æ¤¤¤Þ¤¹¡£"
-#: io.c:754
+#: io.c:681
#, c-format
msgid "can't open pipe `%s' for output (%s)"
msgstr "½ÐÎÏÍѤ˥ѥ¤¥× `%s' ¤ò³«¤±¤Þ¤»¤ó (%s)¡£"
-#: io.c:763
+#: io.c:691
#, c-format
msgid "can't open pipe `%s' for input (%s)"
msgstr "ÆþÎÏÍѤ˥ѥ¤¥× `%s' ¤ò³«¤±¤Þ¤»¤ó (%s)¡£"
-#: io.c:786
+#: io.c:712
#, c-format
msgid "can't open two way pipe `%s' for input/output (%s)"
msgstr "Æþ½ÐÎÏÍѤÎÁÐÊý¸þ¥Ñ¥¤¥× `%s' ¤¬³«¤±¤Þ¤»¤ó (%s)¡£"
-#: io.c:864
+#: io.c:794
#, c-format
msgid "can't redirect from `%s' (%s)"
msgstr "`%s' ¤«¤é¥ê¥À¥¤¥ì¥¯¥È¤Ç¤­¤Þ¤»¤ó (%s)¡£"
-#: io.c:867
+#: io.c:797
#, c-format
msgid "can't redirect to `%s' (%s)"
msgstr "`%s' ¤Ë¥ê¥À¥¤¥ì¥¯¥È¤Ç¤­¤Þ¤»¤ó (%s)¡£"
-#: io.c:920
+#: io.c:846
msgid ""
"reached system limit for open files: starting to multiplex file descriptors"
msgstr ""
"³«¤¤¤Æ¤¤¤ë¥Õ¥¡¥¤¥ë¤Î¿ô¤¬¥·¥¹¥Æ¥àÀ©¸Â¤Ë㤷¤Þ¤·¤¿¡£¥Õ¥¡¥¤¥ëµ­½Ò»Ò¤ò¿½Å²½¤·¤Þ"
"¤¹¡£"
-#: io.c:936
+#: io.c:862
#, c-format
msgid "close of `%s' failed (%s)."
msgstr "`%s' ¤¬ÊĤ¸¤é¤ì¤Þ¤»¤ó (%s)¡£"
-#: io.c:944
+#: io.c:870
msgid "too many pipes or input files open"
msgstr "³«¤¤¤Æ¤¤¤ë¥Ñ¥¤¥×¤Þ¤¿¤ÏÆþÎÏ¥Õ¥¡¥¤¥ë¤Î¿ô¤¬Â¿²á¤®¤Þ¤¹¡£"
-#: io.c:967
+#: io.c:892
msgid "close: second argument must be `to' or `from'"
msgstr "close: ÂèÆó°ú¿ô¤Ë»ÈÍѤǤ­¤ë¤Î¤Ï `to' ¤Þ¤¿¤Ï `from' ¤Ç¤¹¡£"
-#: io.c:981
+#: io.c:909
#, c-format
msgid "close: `%.*s' is not an open file, pipe or co-process"
msgstr ""
"close: `%.*s' ¤Ï¥Õ¥¡¥¤¥ë¡¢¥Ñ¥¤¥×¡¢ÊÂ¹Ô¥×¥í¥»¥¹¤Î¤¤¤º¤ì¤Ç¤â¤¢¤ê¤Þ¤»¤ó¡£"
-#: io.c:986
+#: io.c:914
msgid "close of redirection that was never opened"
msgstr "³«¤¤¤Æ¤Ê¤¤¥ê¥À¥¤¥ì¥¯¥È¤òÊĤ¸¤è¤¦¤È¤·¤Æ¤¤¤Þ¤¹¡£"
-#: io.c:1083
+#: io.c:1011
#, c-format
msgid "close: redirection `%s' not opened with `|&', second argument ignored"
msgstr ""
"close: ¥ê¥À¥¤¥ì¥¯¥È `%s' ¤Ï `|&' ¤ò»È¤Ã¤Æ¤¤¤Þ¤»¤ó¡£ÂèÆó°ú¿ô¤Ï̵»ë¤·¤Þ¤¹¡£"
-#: io.c:1099
+#: io.c:1027
#, c-format
msgid "failure status (%d) on pipe close of `%s' (%s)"
msgstr "¥Ñ¥¤¥× `%2$s' ¤òÊĤ¸¤¿¤È¤­¤Î¾õÂÖ¥³¡¼¥É¤¬¼ºÇÔ (%1$d) ¤Ç¤·¤¿ (%3$s)¡£"
-#: io.c:1102
+#: io.c:1030
#, c-format
msgid "failure status (%d) on file close of `%s' (%s)"
msgstr "¥Õ¥¡¥¤¥ë `%2$s' ¤òÊĤ¸¤¿¤È¤­¤Î¾õÂÖ¥³¡¼¥É¤¬¼ºÇÔ (%1$d) ¤Ç¤·¤¿ (%3$s)¡£"
-#: io.c:1122
+#: io.c:1050
#, c-format
msgid "no explicit close of socket `%s' provided"
msgstr "¥½¥±¥Ã¥È `%s' ¤òÌÀ¼¨¤·¤ÆÊĤ¸¤Æ¤¤¤Þ¤»¤ó¡£"
-#: io.c:1125
+#: io.c:1053
#, c-format
msgid "no explicit close of co-process `%s' provided"
msgstr "ÊÂ¹Ô¥×¥í¥»¥¹ `%s' ¤òÌÀ¼¨¤·¤ÆÊĤ¸¤Æ¤¤¤Þ¤»¤ó¡£"
-#: io.c:1128
+#: io.c:1056
#, c-format
msgid "no explicit close of pipe `%s' provided"
msgstr "¥Ñ¥¤¥× `%s' ¤òÌÀ¼¨¤·¤ÆÊĤ¸¤Æ¤¤¤Þ¤»¤ó¡£"
-#: io.c:1131
+#: io.c:1059
#, c-format
msgid "no explicit close of file `%s' provided"
msgstr "¥Õ¥¡¥¤¥ë `%s' ¤òÌÀ¼¨¤·¤ÆÊĤ¸¤Æ¤¤¤Þ¤»¤ó¡£"
-#: io.c:1159 io.c:1214 main.c:832 main.c:874
+#: io.c:1087 io.c:1142 main.c:823 main.c:865
#, c-format
msgid "error writing standard output (%s)"
msgstr "ɸ½à½ÐÎϤؤνñ¹þ¤ß¥¨¥é¡¼ (%s)"
-#: io.c:1163 io.c:1219
+#: io.c:1091 io.c:1147
#, c-format
msgid "error writing standard error (%s)"
msgstr "ɸ½à¥¨¥é¡¼¤Ø¤Î½ñ¹þ¤ß¥¨¥é¡¼ (%s)"
-#: io.c:1171
+#: io.c:1099
#, c-format
msgid "pipe flush of `%s' failed (%s)."
msgstr "¥Ñ¥¤¥× `%s' ¤ò¥Õ¥é¥Ã¥·¥å¤Ç¤­¤Þ¤»¤ó (%s)¡£"
-#: io.c:1174
+#: io.c:1102
#, c-format
msgid "co-process flush of pipe to `%s' failed (%s)."
msgstr "`%s' ¤ØÀܳ¤¹¤ë¥Ñ¥¤¥×¤òÊÂ¹Ô¥×¥í¥»¥¹¤«¤é¥Õ¥é¥Ã¥·¥å¤Ç¤­¤Þ¤»¤ó (%s)¡£"
-#: io.c:1177
+#: io.c:1105
#, c-format
msgid "file flush of `%s' failed (%s)."
msgstr "¥Õ¥¡¥¤¥ë `%s' ¤ò¥Õ¥é¥Ã¥·¥å¤Ç¤­¤Þ¤»¤ó (%s)¡£"
-#: io.c:1292
+#: io.c:1219
#, fuzzy, c-format
msgid "local port %s invalid in `/inet'"
msgstr "`%s' ¤Î¥í¡¼¥«¥ë¥Ý¡¼¥È¤¬Ìµ¸ú¤Ç¤¹¡£"
-#: io.c:1309
+#: io.c:1236
#, c-format
msgid "remote host and port information (%s, %s) invalid"
msgstr ""
-#: io.c:1344
+#: io.c:1276
msgid "/inet/raw client not ready yet, sorry"
msgstr "»ÄÇ°¤Ê¤¬¤é¡¢/inet/raw ¥¯¥é¥¤¥¢¥ó¥È¤Î½àÈ÷¤¬¤Ç¤­¤Æ¤¤¤Þ¤»¤ó¡£"
-#: io.c:1347 io.c:1383
+#: io.c:1279 io.c:1320
msgid "only root may use `/inet/raw'."
msgstr "`/inet/raw' ¤Ï root ¥æ¡¼¥¶¡¼¤Î¤ß»ÈÍѤǤ­¤Þ¤¹¡£"
-#: io.c:1381
+#: io.c:1318
msgid "/inet/raw server not ready yet, sorry"
msgstr "»ÄÇ°¤Ê¤¬¤é¡¢/inet/raw ¥µ¡¼¥Ð¡¼¤Î½àÈ÷¤¬¤Ç¤­¤Æ¤¤¤Þ¤»¤ó¡£"
-#: io.c:1477
+#: io.c:1417
#, c-format
msgid "no (known) protocol supplied in special filename `%s'"
msgstr ""
"¥¹¥Ú¥·¥ã¥ë¥Õ¥¡¥¤¥ë̾ `%s' ¤Ë¡Êǧ¼±¤Ç¤­¤ë¡Ë¥×¥í¥È¥³¥ë¤¬»ØÄꤵ¤ì¤Æ¤¤¤Þ¤»¤ó¡£"
-#: io.c:1491
+#: io.c:1431
#, c-format
msgid "special file name `%s' is incomplete"
msgstr "¥¹¥Ú¥·¥ã¥ë¥Õ¥¡¥¤¥ë̾ `%s' ¤ÏÉÔ´°Á´¤Ç¤¹¡£"
-#: io.c:1506
+#: io.c:1447
msgid "must supply a remote hostname to `/inet'"
msgstr "`/inet' ¤Ë¤Ï¥ê¥â¡¼¥È¥Û¥¹¥È̾¤¬É¬ÍפǤ¹¡£"
-#: io.c:1524
+#: io.c:1465
msgid "must supply a remote port to `/inet'"
msgstr "`/inet' ¤Ë¤Ï¥ê¥â¡¼¥È¥Ý¡¼¥ÈÈֹ椬ɬÍפǤ¹¡£"
-#: io.c:1570
+#: io.c:1511
msgid "TCP/IP communications are not supported"
msgstr "TCP/IP Àܳ¤Ï»ÈÍѤǤ­¤Þ¤»¤ó¡£"
-#: io.c:1758
+#: io.c:1698
#, c-format
msgid "could not open `%s', mode `%s'"
msgstr "`%s' (¥â¡¼¥É `%s') ¤ò³«¤±¤Þ¤»¤ó¡£"
-#: io.c:1809
+#: io.c:1749
#, c-format
msgid "close of master pty failed (%s)"
msgstr "¥Þ¥¹¥¿¡¼ pty ¤òÊĤ¸¤é¤ì¤Þ¤»¤ó (%s)¡£"
-#: io.c:1811 io.c:1963 io.c:2114
+#: io.c:1751 io.c:1918 io.c:2075
#, c-format
msgid "close of stdout in child failed (%s)"
msgstr "»Ò¥×¥í¥»¥¹¤¬É¸½à½ÐÎϤòÊĤ¸¤é¤ì¤Þ¤»¤ó (%s)¡£"
-#: io.c:1814
+#: io.c:1754
#, c-format
msgid "moving slave pty to stdout in child failed (dup: %s)"
msgstr "»Ò¥×¥í¥»¥¹¤¬¥¹¥ì¡¼¥Ö pty ¤òɸ½à½ÐÎϤ˰ÜÆ°¤Ç¤­¤Þ¤»¤ó (dup: %s)¡£"
-#: io.c:1816 io.c:1968
+#: io.c:1756 io.c:1923
#, c-format
msgid "close of stdin in child failed (%s)"
msgstr "»Ò¥×¥í¥»¥¹¤¬É¸½àÆþÎϤòÊĤ¸¤é¤ì¤Þ¤»¤ó (%s)¡£"
-#: io.c:1819
+#: io.c:1759
#, c-format
msgid "moving slave pty to stdin in child failed (dup: %s)"
msgstr "»Ò¥×¥í¥»¥¹¤¬¥¹¥ì¡¼¥Ö pty ¤òɸ½àÆþÎϤ˰ÜÆ°¤Ç¤­¤Þ¤»¤ó (dup: %s)¡£"
-#: io.c:1821 io.c:1840
+#: io.c:1761 io.c:1782
#, c-format
msgid "close of slave pty failed (%s)"
msgstr "¥¹¥ì¡¼¥Ö pty ¤òÊĤ¸¤é¤ì¤Þ¤»¤ó (%s)¡£"
-#: io.c:1914 io.c:1966 io.c:2095 io.c:2117
+#: io.c:1860 io.c:1921 io.c:2053 io.c:2078
#, c-format
msgid "moving pipe to stdout in child failed (dup: %s)"
msgstr "»Ò¥×¥í¥»¥¹¤¬¥Ñ¥¤¥×¤òɸ½à½ÐÎϤ˰ÜÆ°¤Ç¤­¤Þ¤»¤ó (dup: %s)¡£"
-#: io.c:1918 io.c:1971
+#: io.c:1867 io.c:1926
#, c-format
msgid "moving pipe to stdin in child failed (dup: %s)"
msgstr "»Ò¥×¥í¥»¥¹¤¬¥Ñ¥¤¥×¤òɸ½àÆþÎϤ˰ÜÆ°¤Ç¤­¤Þ¤»¤ó (dup: %s)¡£"
-#: io.c:1935 io.c:2108
+#: io.c:1887 io.c:2068
msgid "restoring stdout in parent process failed\n"
msgstr "¿Æ¥×¥í¥»¥¹¤¬É¸½à½ÐÎϤòÉüµì¤Ç¤­¤Þ¤»¤ó¡£\n"
-#: io.c:1940
+#: io.c:1895
msgid "restoring stdin in parent process failed\n"
msgstr "¿Æ¥×¥í¥»¥¹¤¬É¸½àÆþÎϤòÉüµì¤Ç¤­¤Þ¤»¤ó¡£\n"
-#: io.c:1974 io.c:2119 io.c:2130
+#: io.c:1929 io.c:2080 io.c:2094
#, c-format
msgid "close of pipe failed (%s)"
msgstr "¥Ñ¥¤¥×¤òÊĤ¸¤é¤ì¤Þ¤»¤ó (%s)¡£"
-#: io.c:2019
+#: io.c:1974
msgid "`|&' not supported"
msgstr "`|&' ¤Ï»ÈÍѤǤ­¤Þ¤»¤ó¡£"
-#: io.c:2085
+#: io.c:2040
#, c-format
msgid "cannot open pipe `%s' (%s)"
msgstr "¥Ñ¥¤¥× `%s' ¤¬³«¤±¤Þ¤»¤ó (%s)¡£"
-#: io.c:2126
+#: io.c:2088
#, c-format
msgid "cannot create child process for `%s' (fork: %s)"
msgstr "`%s' ÍÑ¤Î»Ò¥×¥í¥»¥¹¤ò¼Â¹Ô¤Ç¤­¤Þ¤»¤ó (fork: %s)¡£"
-#: io.c:2518
+#: io.c:2577
#, c-format
msgid "data file `%s' is empty"
msgstr "¥Ç¡¼¥¿¥Õ¥¡¥¤¥ë `%s' ¤Ï¶õ¤Ç¤¹¡£"
-#: io.c:2560 io.c:2568
+#: io.c:2618 io.c:2626
msgid "could not allocate more input memory"
msgstr "ÆþÎÏÍÑ¥á¥â¥ê¡¼¤ò¤³¤ì°Ê¾å³ÎÊݤǤ­¤Þ¤»¤ó¡£"
-#: io.c:3125
+#: io.c:3173
msgid "multicharacter value of `RS' is a gawk extension"
msgstr "Ê£¿ô¤Îʸ»ú¤ò `RS' ¤Ë»ÈÍѤ¹¤ë¤Î¤Ï gawk ÆÃÍ­¤Î³ÈÄ¥¤Ç¤¹¡£"
-#: main.c:313
+#: main.c:311
msgid "out of memory"
msgstr ""
-#: main.c:381
+#: main.c:388
msgid "`-m[fr]' option irrelevant in gawk"
msgstr "gawk ¤Ç¤Ï¥ª¥×¥·¥ç¥ó `-m[fr]' ¤Ë¸ú²Ì¤Ï¤¢¤ê¤Þ¤»¤ó¡£"
-#: main.c:383
+#: main.c:390
msgid "-m option usage: `-m[fr] nnn'"
msgstr "-m ¥ª¥×¥·¥ç¥ó¤Î»ÈÍÑË¡: `-m[fr] ¿ôÃÍ'"
-#: main.c:419
+#: main.c:426
#, fuzzy
msgid "empty argument to `-e/--source' ignored"
msgstr "¶õ°ú¿ô¤Î `--source' ¤Ï̵»ë¤µ¤ì¤Þ¤¹¡£"
-#: main.c:485
+#: main.c:492
#, c-format
msgid "%s: option `-W %s' unrecognized, ignored\n"
msgstr "%s: ¥ª¥×¥·¥ç¥ó `-W %s' ¤Ïǧ¼±¤Ç¤­¤Þ¤»¤ó¡£Ìµ»ë¤·¤Þ¤¹¡£\n"
-#: main.c:530
+#: main.c:545
#, c-format
msgid "%s: option requires an argument -- %c\n"
msgstr "%s: °ú¿ô¤¬É¬Íפʥª¥×¥·¥ç¥ó -- %c\n"
-#: main.c:551
+#: main.c:566
msgid "environment variable `POSIXLY_CORRECT' set: turning on `--posix'"
msgstr ""
"´Ä¶­ÊÑ¿ô `POSIXLY_CORRECT' ¤¬»ØÄꤵ¤ì¤Æ¤¤¤Þ¤¹¡£¥ª¥×¥·¥ç¥ó `--posix' ¤òÍ­¸ú¤Ë"
"¤·¤Þ¤¹¡£"
-#: main.c:557
+#: main.c:572
msgid "`--posix' overrides `--traditional'"
msgstr "¥ª¥×¥·¥ç¥ó `--posix' ¤Ï `--traditional' ¤ò̵¸ú¤Ë¤·¤Þ¤¹¡£"
-#: main.c:568
+#: main.c:583
msgid "`--posix'/`--traditional' overrides `--non-decimal-data'"
msgstr ""
"¥ª¥×¥·¥ç¥ó `--posix'/`--traditional' ¤Ï `--non-decimal-data' ¤ò̵¸ú¤Ë¤·¤Þ¤¹¡£"
-#: main.c:572
+#: main.c:587
#, c-format
msgid "running %s setuid root may be a security problem"
msgstr ""
"setuid root ¤Ç %s ¤ò¼Â¹Ô¤¹¤ë¤È¡¢¥»¥­¥å¥ê¥Æ¥£¾å¤ÎÌäÂ꤬ȯÀ¸¤¹¤ë¾ì¹ç¤¬¤¢¤ê¤Þ"
"¤¹¡£"
-#: main.c:577
+#: main.c:592
#, fuzzy
msgid "`--posix' overrides `--binary'"
msgstr "¥ª¥×¥·¥ç¥ó `--posix' ¤Ï `--traditional' ¤ò̵¸ú¤Ë¤·¤Þ¤¹¡£"
-#: main.c:622
+#: main.c:643
#, c-format
msgid "can't set binary mode on stdin (%s)"
msgstr "ɸ½àÆþÎϤò¥Ð¥¤¥Ê¥ê¥â¡¼¥É¤ËÀßÄê¤Ç¤­¤Þ¤»¤ó (%s)¡£"
-#: main.c:625
+#: main.c:646
#, c-format
msgid "can't set binary mode on stdout (%s)"
msgstr "ɸ½à½ÐÎϤò¥Ð¥¤¥Ê¥ê¥â¡¼¥É¤ËÀßÄê¤Ç¤­¤Þ¤»¤ó (%s)¡£"
-#: main.c:627
+#: main.c:648
#, c-format
msgid "can't set binary mode on stderr (%s)"
msgstr "ɸ½à¥¨¥é¡¼¤ò¥Ð¥¤¥Ê¥ê¥â¡¼¥É¤ËÀßÄê¤Ç¤­¤Þ¤»¤ó (%s)¡£"
-#: main.c:668
+#: main.c:687
msgid "no program text at all!"
msgstr "¥×¥í¥°¥é¥àʸ¤¬Á´¤¯¤¢¤ê¤Þ¤»¤ó!"
-#: main.c:773
+#: main.c:762
#, c-format
msgid "Usage: %s [POSIX or GNU style options] -f progfile [--] file ...\n"
msgstr ""
"»È¤¤Êý: %s [POSIX ¤Þ¤¿¤Ï GNU ·Á¼°¥ª¥×¥·¥ç¥ó] -f ¥×¥í¥°¥é¥à¥Õ¥¡¥¤¥ë [--] ÆþÎÏ"
"¥Õ¥¡¥¤¥ë ¡Ä\n"
-#: main.c:775
+#: main.c:764
#, c-format
msgid "Usage: %s [POSIX or GNU style options] [--] %cprogram%c file ...\n"
msgstr ""
"»È¤¤Êý: %s [POSIX ¤Þ¤¿¤Ï GNU ·Á¼°¥ª¥×¥·¥ç¥ó] [--] %c¥×¥í¥°¥é¥à%c ÆþÎÏ¥Õ¥¡¥¤"
"¥ë ¡Ä\n"
-#: main.c:780
+#: main.c:769
#, fuzzy
msgid "POSIX options:\t\tGNU long options: (standard)\n"
msgstr "POSIX ¥ª¥×¥·¥ç¥ó:\t\tGNU Ĺ·Á¼°¥ª¥×¥·¥ç¥ó\n"
-#: main.c:781
+#: main.c:770
msgid "\t-f progfile\t\t--file=progfile\n"
msgstr "\t-f ¥×¥í¥°¥é¥à¥Õ¥¡¥¤¥ë\t\t--file=¥×¥í¥°¥é¥à¥Õ¥¡¥¤¥ë\n"
-#: main.c:782
+#: main.c:771
msgid "\t-F fs\t\t\t--field-separator=fs\n"
msgstr ""
"\t-F ¥Õ¥£¡¼¥ë¥É¥»¥Ñ¥ì¡¼¥¿\t\t\t--field-separator=¥Õ¥£¡¼¥ë¥É¥»¥Ñ¥ì¡¼¥¿\n"
-#: main.c:783
+#: main.c:772
msgid "\t-v var=val\t\t--assign=var=val\n"
msgstr "\t-v ÊÑ¿ô=ÂåÆþÃÍ\t\t--assign=ÊÑ¿ô=ÂåÆþÃÍ\n"
-#: main.c:784
+#: main.c:773
#, fuzzy
-msgid "POSIX options:\t\tGNU long options: (extensions)\n"
+msgid "Short options:\t\tGNU long options: (extensions)\n"
msgstr "POSIX ¥ª¥×¥·¥ç¥ó:\t\tGNU Ĺ·Á¼°¥ª¥×¥·¥ç¥ó\n"
-#: main.c:785
+#: main.c:774
msgid "\t-m[fr] val\n"
msgstr "\t-m[fr] ¿ôÃÍ\n"
-#: main.c:786
+#: main.c:775
msgid "\t-b\t\t\t--characters-as-bytes\n"
msgstr ""
-#: main.c:787
-msgid "\t-c\t\t\t--compat, --traditional\n"
-msgstr ""
+#: main.c:776
+#, fuzzy
+msgid "\t-c\t\t\t--traditional\n"
+msgstr "\t-W traditional\t\t--traditional\n"
-#: main.c:788
+#: main.c:777
#, fuzzy
-msgid "\t-C\t\t\t--copyleft, --copyright\n"
+msgid "\t-C\t\t\t--copyright\n"
msgstr "\t-W copyright\t\t--copyright\n"
-#: main.c:789
+#: main.c:778
#, fuzzy
msgid "\t-d [file]\t\t--dump-variables[=file]\n"
msgstr "\t-W dump-variables[=¥Õ¥¡¥¤¥ë]\t--dump-variables[=¥Õ¥¡¥¤¥ë]\n"
-#: main.c:790
+#: main.c:779
#, fuzzy
msgid "\t-e 'program-text'\t--source='program-text'\n"
msgstr "\t-W source=¥×¥í¥°¥é¥àʸ\t--source=¥×¥í¥°¥é¥àʸ\n"
-#: main.c:791
+#: main.c:780
#, fuzzy
msgid "\t-E file\t\t\t--exec=file\n"
msgstr "\t-W exec=¥Õ¥¡¥¤¥ë\t\t--exec=¥Õ¥¡¥¤¥ë\n"
-#: main.c:792
+#: main.c:781
#, fuzzy
msgid "\t-g\t\t\t--gen-pot\n"
msgstr "\t-W gen-po\t\t--gen-po\n"
-#: main.c:793
+#: main.c:782
#, fuzzy
-msgid "\t-h\t\t\t--help, --usage\n"
+msgid "\t-h\t\t\t--help\n"
msgstr "\t-W help\t\t\t--help\n"
-#: main.c:794
+#: main.c:783
#, fuzzy
-msgid "\t-l [fatal]\t\t--lint[=fatal]\n"
+msgid "\t-L [fatal]\t\t--lint[=fatal]\n"
msgstr "\t-W lint[=fatal]\t\t--lint[=fatal]\n"
-#: main.c:795
-#, fuzzy
-msgid "\t-L\t\t\t--lint-old\n"
-msgstr "\t-W lint-old\t\t--lint-old\n"
-
-#: main.c:796
+#: main.c:784
#, fuzzy
msgid "\t-n\t\t\t--non-decimal-data\n"
msgstr "\t-W non-decimal-data\t--non-decimal-data\n"
-#: main.c:797
+#: main.c:785
msgid "\t-N\t\t\t--use-lc-numeric\n"
msgstr ""
-#: main.c:798
+#: main.c:786
msgid "\t-O\t\t\t--optimize\n"
msgstr ""
-#: main.c:799
+#: main.c:787
#, fuzzy
msgid "\t-p [file]\t\t--profile[=file]\n"
msgstr "\t-W profile[=¥Õ¥¡¥¤¥ë]\t--profile[=¥Õ¥¡¥¤¥ë]\n"
-#: main.c:800
+#: main.c:788
#, fuzzy
msgid "\t-P\t\t\t--posix\n"
msgstr "\t-W posix\t\t--posix\n"
-#: main.c:801
+#: main.c:789
#, fuzzy
msgid "\t-r\t\t\t--re-interval\n"
msgstr "\t-W re-interval\t\t--re-interval\n"
-#: main.c:802
+#: main.c:791
#, fuzzy
+msgid "\t-R file\t\t\t--command=file\n"
+msgstr "\t-W exec=¥Õ¥¡¥¤¥ë\t\t--exec=¥Õ¥¡¥¤¥ë\n"
+
+#: main.c:792
msgid "\t-S\t\t\t--sandbox\n"
-msgstr "\t-W posix\t\t--posix\n"
+msgstr ""
+
+#: main.c:793
+#, fuzzy
+msgid "\t-t\t\t\t--lint-old\n"
+msgstr "\t-W lint-old\t\t--lint-old\n"
-#: main.c:803
+#: main.c:794
#, fuzzy
msgid "\t-V\t\t\t--version\n"
msgstr "\t-W version\t\t--version\n"
-#: main.c:805
+#: main.c:796
msgid "\t-W nostalgia\t\t--nostalgia\n"
msgstr "\t-W nostalgia\t\t--nostalgia\n"
-#: main.c:808
-msgid "\t-W parsedebug\t\t--parsedebug\n"
+#: main.c:799
+#, fuzzy
+msgid "\t-Y\t\t--parsedebug\n"
msgstr "\t-W parsedebug\t\t--parsedebug\n"
#. TRANSLATORS: --help output 5 (end)
@@ -1754,7 +1690,7 @@ msgstr "\t-W parsedebug\t\t--parsedebug\n"
#. for this application. Please add _another line_ with the
#. address for translation bugs.
#. no-wrap
-#: main.c:817
+#: main.c:808
msgid ""
"\n"
"To report bugs, see node `Bugs' in `gawk.info', which is\n"
@@ -1767,7 +1703,7 @@ msgstr ""
"¤Ï¡¢`Reporting Problems and Bugs' ¤Ç¤¹¡£\n"
"\n"
-#: main.c:821
+#: main.c:812
msgid ""
"gawk is a pattern scanning and processing language.\n"
"By default it reads standard input and writes standard output.\n"
@@ -1777,7 +1713,7 @@ msgstr ""
"¥Ç¥Õ¥©¥ë¥ÈÀßÄê¤Ç¤Ï¡¢É¸½àÆþÎϤòÆɤ߹þ¤ß¡¢É¸½à½ÐÎϤ˽ñ¤­½Ð¤·¤Þ¤¹¡£\n"
"\n"
-#: main.c:825
+#: main.c:816
msgid ""
"Examples:\n"
"\tgawk '{ sum += $1 }; END { print sum }' file\n"
@@ -1787,8 +1723,8 @@ msgstr ""
"\tgawk '{ sum += $1 }; END { print sum }' ÆþÎÏ¥Õ¥¡¥¤¥ë\n"
"\tgawk -F: '{ print $1 }' /etc/passwd\n"
-#: main.c:845
-#, c-format
+#: main.c:836
+#, fuzzy, c-format
msgid ""
"Copyright (C) 1989, 1991-%d Free Software Foundation.\n"
"\n"
@@ -1805,7 +1741,7 @@ msgstr ""
"¤Ë½¾¤¤ºÆÇÛÉÛ¡¢µÚ¤Ó/¤Þ¤¿¤Ï¡¢Êѹ¹¤ò²Ã¤¨¤ë¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£\n"
"\n"
-#: main.c:853
+#: main.c:844
msgid ""
"This program is distributed in the hope that it will be useful,\n"
"but WITHOUT ANY WARRANTY; without even the implied warranty of\n"
@@ -1819,7 +1755,7 @@ msgstr ""
"¾Ü¤·¤¯¤Ï¡¢GNU General Public License ¤ò»²¾È¤·¤Æ¤¯¤À¤µ¤¤¡£\n"
"\n"
-#: main.c:864
+#: main.c:855
#, fuzzy
msgid ""
"You should have received a copy of the GNU General Public License\n"
@@ -1832,16 +1768,16 @@ msgstr ""
"\t59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n"
"¤Ø½ñÌ̤ǤªÃΤ餻¤¯¤À¤µ¤¤¡£\n"
-#: main.c:899
+#: main.c:890
msgid "-Ft does not set FS to tab in POSIX awk"
msgstr "POSIX »ÅÍͤΠawk ¤Ç¤Ï -Ft ¤Ç FS ¤ò¥¿¥Ö¤ËÀßÄê¤Ç¤­¤Þ¤»¤ó¡£"
-#: main.c:1116
+#: main.c:1122
#, c-format
msgid "unknown value for field spec: %d\n"
msgstr ""
-#: main.c:1176
+#: main.c:1182
#, c-format
msgid ""
"%s: `%s' argument to `-v' not in `var=value' form\n"
@@ -1850,174 +1786,140 @@ msgstr ""
"%s: ¥ª¥×¥·¥ç¥ó `-v' ¤Î°ú¿ô `%s' ¤¬ `ÊÑ¿ô=ÂåÆþÃÍ' ¤Î·Á¼°¤Ë¤Ê¤Ã¤Æ¤¤¤Þ¤»¤ó¡£\n"
"\n"
-#: main.c:1196
+#: main.c:1202
#, c-format
msgid "`%s' is not a legal variable name"
msgstr "`%s' ¤ÏÉÔÀµ¤ÊÊÑ¿ô̾¤Ç¤¹¡£"
-#: main.c:1199
+#: main.c:1205
#, c-format
msgid "`%s' is not a variable name, looking for file `%s=%s'"
msgstr "`%s' ¤ÏÊÑ¿ô̾¤Ç¤Ï¤¢¤ê¤Þ¤»¤ó¡£`%s=%s' ¤Î¥Õ¥¡¥¤¥ë¤òõ¤·¤Þ¤¹¡£"
-#: main.c:1238
+#: main.c:1258
msgid "floating point exception"
msgstr "ÉâÆ°¾®¿ôÅÀÎã³°"
-#: main.c:1245
+#: main.c:1265
msgid "fatal error: internal error"
msgstr "Ã×̿Ū¥¨¥é¡¼: ÆâÉô¥¨¥é¡¼"
-#: main.c:1260
+#: main.c:1280
#, fuzzy
msgid "fatal error: internal error: segfault"
msgstr "Ã×̿Ū¥¨¥é¡¼: ÆâÉô¥¨¥é¡¼"
-#: main.c:1272
+#: main.c:1292
#, fuzzy
msgid "fatal error: internal error: stack overflow"
msgstr "Ã×̿Ū¥¨¥é¡¼: ÆâÉô¥¨¥é¡¼"
-#: main.c:1322
+#: main.c:1342
#, c-format
msgid "no pre-opened fd %d"
msgstr "fd %d ¤¬»öÁ°¤Ë³«¤¤¤Æ¤¤¤Þ¤»¤ó¡£"
-#: main.c:1329
+#: main.c:1349
#, c-format
msgid "could not pre-open /dev/null for fd %d"
msgstr "»öÁ°¤Ë fd %d ÍÑ¤Ë /dev/null ¤ò³«¤±¤Þ¤»¤ó¡£"
-#: main.c:1352 main.c:1361
+#: main.c:1372 main.c:1381
#, c-format
msgid "could not find groups: %s"
msgstr "¥°¥ë¡¼¥×¤¬¸«¤Ä¤«¤ê¤Þ¤»¤ó: %s"
-#: msg.c:54
+#: msg.c:62
#, c-format
msgid "cmd. line:"
msgstr "¥³¥Þ¥ó¥É¥é¥¤¥ó:"
-#: msg.c:120
+#: msg.c:97
msgid "warning: "
msgstr "·Ù¹ð: "
-#: msg.c:142
+#: msg.c:106
msgid "error: "
msgstr "¥¨¥é¡¼: "
-#: msg.c:178
+#: msg.c:129
msgid "fatal: "
msgstr "Ã×̿Ū: "
-#: node.c:63 node.c:78 node.c:105 node.c:121 node.c:151
-msgid "can't convert string to float"
-msgstr "ʸ»úÎ󤫤éÉâÆ°¾®¿ô¤ËÊÑ´¹¤Ç¤­¤Þ¤»¤ó¡£"
-
-#: node.c:465
+#: node.c:401
msgid "backslash at end of string"
msgstr "ʸ»úÎó¤Î½ª¤ê¤Ë¥Ð¥Ã¥¯¥¹¥é¥Ã¥·¥å¤¬»È¤ï¤ì¤Æ¤¤¤Þ¤¹¡£"
-#: node.c:609
+#: node.c:502
#, fuzzy, c-format
msgid "old awk does not support the `\\%c' escape sequence"
msgstr "±é»»»Ò `**' ¤Ï¸Å¤¤ awk ¤Ç»È¤¨¤Þ¤»¤ó¡£"
-#: node.c:660
+#: node.c:553
msgid "POSIX does not allow `\\x' escapes"
msgstr "POSIX ¤Ï `\\x' ¥¨¥¹¥±¡¼¥×¤òµö²Ä¤·¤Þ¤»¤ó¡£"
-#: node.c:666
+#: node.c:559
msgid "no hex digits in `\\x' escape sequence"
msgstr "`\\x' ¥¨¥¹¥±¡¼¥×¥·¡¼¥±¥ó¥¹¤Ë 16 ¿Ê¿ô¤¬¤¢¤ê¤Þ¤»¤ó¡£"
-#: node.c:688
+#: node.c:581
#, c-format
msgid ""
"hex escape \\x%.*s of %d characters probably not interpreted the way you "
"expect"
msgstr ""
-#: node.c:703
+#: node.c:596
#, c-format
msgid "escape sequence `\\%c' treated as plain `%c'"
msgstr "¥¨¥¹¥±¡¼¥×¥·¡¼¥±¥ó¥¹ `\\%c' ¤Ï `%c' ¤ÈƱÅù¤Ë°·¤ï¤ì¤Þ¤¹¡£"
+#: node.c:737
+msgid ""
+"Invalid multibyte data detected. There may be a mismatch between your data "
+"and your locale."
+msgstr ""
+
#: posix/gawkmisc.c:172
#, c-format
msgid "%s %s `%s': could not set close-on-exec: (fcntl: %s)"
msgstr "%s %s `%s': close-on-exec ¤òÀßÄê¤Ç¤­¤Þ¤»¤ó: (fcntl: %s)"
-#: profile.c:94
+#: profile.c:83
#, c-format
msgid "could not open `%s' for writing: %s"
msgstr "`%s' ¤ò½ñ¹þ¤ßÍѤ˳«¤±¤Þ¤»¤ó¤Ç¤·¤¿: %s"
-#: profile.c:457
-#, c-format
-msgid "internal error: %s with null vname"
-msgstr "ÆâÉô¥¨¥é¡¼: %s ¤Î vname ¤¬Ìµ¸ú¤Ç¤¹¡£"
-
-#: profile.c:522
-msgid "# treated internally as `delete'"
-msgstr "# ÆâÉô¤Ç¤Ï `delete' ¤È¤·¤Æ°·¤ï¤ì¤Þ¤·¤¿¡£"
-
-#: profile.c:1076
-#, c-format
-msgid "# this is a dynamically loaded extension function"
-msgstr "# ¤³¤ì¤ÏưŪ¤Ë¥í¡¼¥É¤µ¤ì¤¿³ÈÄ¥µ¡Ç½¤Ç¤¹¡£"
-
-#: profile.c:1109
-#, c-format
-msgid "\t# gawk profile, created %s\n"
-msgstr "\t# gawk ¥×¥í¥Õ¥¡¥¤¥ë¡¢ºîÀ®Æü»þ %s\n"
-
-#: profile.c:1112
-#, c-format
-msgid ""
-"\t# BEGIN block(s)\n"
-"\n"
-msgstr ""
-"\t# BEGIN ¥Ö¥í¥Ã¥¯\n"
-"\n"
-
-#: profile.c:1122
+#: profile.c:203
#, fuzzy, c-format
msgid ""
-"\t# BEGINFILE block(s)\n"
+"\t# %s block(s)\n"
"\n"
msgstr ""
-"\t# BEGIN ¥Ö¥í¥Ã¥¯\n"
+"\t# END ¥Ö¥í¥Ã¥¯\n"
"\n"
-#: profile.c:1132
-#, c-format
+#: profile.c:208
+#, fuzzy, c-format
msgid ""
-"\t# Rule(s)\n"
+"\t# %s(s)\n"
"\n"
msgstr ""
"\t# ¥ë¡¼¥ë\n"
"\n"
-#: profile.c:1138
-#, fuzzy, c-format
-msgid ""
-"\t# ENDFILE block(s)\n"
-"\n"
-msgstr ""
-"\t# END ¥Ö¥í¥Ã¥¯\n"
-"\n"
+#: profile.c:278
+#, c-format
+msgid "internal error: %s with null vname"
+msgstr "ÆâÉô¥¨¥é¡¼: %s ¤Î vname ¤¬Ìµ¸ú¤Ç¤¹¡£"
-#: profile.c:1148
+#: profile.c:945
#, c-format
-msgid ""
-"\t# END block(s)\n"
-"\n"
-msgstr ""
-"\t# END ¥Ö¥í¥Ã¥¯\n"
-"\n"
+msgid "\t# gawk profile, created %s\n"
+msgstr "\t# gawk ¥×¥í¥Õ¥¡¥¤¥ë¡¢ºîÀ®Æü»þ %s\n"
-#: profile.c:1168
+#: profile.c:1328
#, c-format
msgid ""
"\n"
@@ -2026,17 +1928,12 @@ msgstr ""
"\n"
"\t# ´Ø¿ô°ìÍ÷¡Ê¥¢¥ë¥Õ¥¡¥Ù¥Ã¥È½ç¡Ë\n"
-#: profile.c:1431
+#: profile.c:1367
#, c-format
-msgid "unexpected type %s in prec_level"
-msgstr "prec_level Ãæ¤Î %s ¤ÏͽÁÛ³°¤Î¥¿¥¤¥×¤Ç¤¹¡£"
-
-#: profile.c:1557
-#, fuzzy, c-format
-msgid "Unknown node type %s in pp_var"
-msgstr "¥Î¡¼¥É %d ¤Î¼ïÎबÉÔÌÀ¤Ç¤¹¡£"
+msgid "redir2str: unknown redirection type %d"
+msgstr ""
-#: re.c:537
+#: re.c:559
#, c-format
msgid "regexp component `%.*s' should probably be `[%.*s]'"
msgstr ""
@@ -2109,18 +2006,40 @@ msgstr "Àµµ¬É½¸½¤¬Ä¹²á¤®¤Þ¤¹¡£"
msgid "Unmatched ) or \\)"
msgstr ") ¤Þ¤¿¤Ï \\) ¤¬Âбþ¤·¤Þ¤»¤ó¡£"
-#: regcomp.c:699
+#: regcomp.c:701
msgid "No previous regular expression"
msgstr "¤³¤ì¤è¤êÁ°¤Ë»ÈÍѤ·¤¿Àµµ¬É½¸½¤Ï¤¢¤ê¤Þ¤»¤ó¡£"
-#~ msgid "%s: illegal option -- %c\n"
-#~ msgstr "%s: ÉÔÀµ¤Ê¥ª¥×¥·¥ç¥ó -- %c\n"
+#~ msgid "call of `length' without parentheses is deprecated by POSIX"
+#~ msgstr "POSIX ¤Ï³ç¸Ì̵¤·¤Ç¤Î `length' ¤Î»ÈÍѤò¿ä¾©¤·¤Þ¤»¤ó¡£"
+
+#, fuzzy
+#~ msgid "reference to uninitialized field `$%s'"
+#~ msgstr "½é´ü²½¤µ¤ì¤Æ¤¤¤Ê¤¤¥Õ¥£¡¼¥ë¥É `$%d' ¤ò»²¾È¤·¤Æ¤¤¤Þ¤¹¡£"
+
+#~ msgid "can't convert string to float"
+#~ msgstr "ʸ»úÎ󤫤éÉâÆ°¾®¿ô¤ËÊÑ´¹¤Ç¤­¤Þ¤»¤ó¡£"
+
+#~ msgid "`continue' outside a loop is not portable"
+#~ msgstr "¥ë¡¼¥×¤Î³°¤Ç»ÈÍѤ¹¤ë `continue' ¤Ï¾¤Î awk ¤Ç»ÈÍѤǤ­¤Þ¤»¤ó¡£"
+
+#~ msgid "`break' outside a loop is not portable"
+#~ msgstr "¥ë¡¼¥×¤Î³°¤Ç»ÈÍѤ¹¤ë `break' ¤Ï¾¤Î awk ¤Ç»ÈÍѤǤ­¤Þ¤»¤ó¡£"
+
+#~ msgid "`nextfile' cannot be called from a BEGIN rule"
+#~ msgstr "BEGIN ¥ë¡¼¥ë¤«¤é¤Ï `nextfile' ¤ò¸Æ¤Ó½Ð¤»¤Þ¤»¤ó¡£"
+
+#~ msgid "`next' cannot be called from a BEGIN rule"
+#~ msgstr "BEGIN ¥ë¡¼¥ë¤«¤é¤Ï `next' ¤ò¸Æ¤Ó½Ð¤»¤Þ¤»¤ó¡£"
#~ msgid "file `%s' is a directory"
#~ msgstr "¥Õ¥¡¥¤¥ë `%s' ¤Ï¥Ç¥£¥ì¥¯¥È¥ê¤Ç¤¹¡£"
-#~ msgid "can't open two way socket `%s' for input/output (%s)"
-#~ msgstr "Æþ½ÐÎÏÍѤÎÁÐÊý¸þ¥½¥±¥Ã¥È `%s' ¤¬³«¤±¤Þ¤»¤ó (%s)¡£"
+#~ msgid "use `PROCINFO[\"%s\"]' instead of `%s'"
+#~ msgstr "`%2$s' ¤ÎÂå¤ï¤ê¤Ë `PROCINFO[\"%1$s\"]' ¤ò»ÈÍѤ·¤Æ¤¯¤À¤µ¤¤¡£"
+
+#~ msgid "use `PROCINFO[...]' instead of `/dev/user'"
+#~ msgstr "`/dev/user' ¤ÎÂå¤ï¤ê¤Ë `PROCINFO[...]' ¤ò»ÈÍѤ·¤Æ¤¯¤À¤µ¤¤¡£"
#~ msgid "\t-W compat\t\t--compat\n"
#~ msgstr "\t-W compat\t\t--compat\n"
@@ -2128,32 +2047,105 @@ msgstr "¤³¤ì¤è¤êÁ°¤Ë»ÈÍѤ·¤¿Àµµ¬É½¸½¤Ï¤¢¤ê¤Þ¤»¤ó¡£"
#~ msgid "\t-W copyleft\t\t--copyleft\n"
#~ msgstr "\t-W copyleft\t\t--copyleft\n"
-#~ msgid "\t-W traditional\t\t--traditional\n"
-#~ msgstr "\t-W traditional\t\t--traditional\n"
-
#~ msgid "\t-W usage\t\t--usage\n"
#~ msgstr "\t-W usage\t\t--usage\n"
-#, fuzzy
-#~ msgid "seek: invalid arguments"
-#~ msgstr "printf: °ú¿ô¤¬¤¢¤ê¤Þ¤»¤ó¡£"
+#~ msgid ""
+#~ "\t# BEGIN block(s)\n"
+#~ "\n"
+#~ msgstr ""
+#~ "\t# BEGIN ¥Ö¥í¥Ã¥¯\n"
+#~ "\n"
-#, fuzzy
-#~ msgid "seek: `%.*s' is not an open file, pipe, or co-process"
+#~ msgid "must use `count$' on all formats or none"
#~ msgstr ""
-#~ "close: `%.*s' ¤Ï¥Õ¥¡¥¤¥ë¡¢¥Ñ¥¤¥×¡¢ÊÂ¹Ô¥×¥í¥»¥¹¤Î¤¤¤º¤ì¤Ç¤â¤¢¤ê¤Þ¤»¤ó¡£"
+#~ "`count$¡Ç¤ÏÁ´¤Æ¤Î½ñ¼°»ØÄê¤ËŬÍѤ¹¤ë¡¢¤Þ¤¿¤ÏÁ´¤Æ¤ËŬÍѤ·¤Ê¤¤¤Î¤É¤Á¤é¤«¤Ç¤·"
+#~ "¤«»È¤¨¤Þ¤»¤ó¡£"
+
+#~ msgid "`$' is not permitted in awk formats"
+#~ msgstr "`$' ¤Ï awk ¤Ç¤Ï»È¤¨¤Þ¤»¤ó¡£"
+
+#~ msgid "arg count with `$' must be > 0"
+#~ msgstr "½ç½ø»ØÄê¤Î `$' ¤Ë»È¤¨¤ë¿ô»ú¤ÏÀµ¤ÎÃͤǤ¹¡£"
+
+#~ msgid "arg count %ld greater than total number of supplied arguments"
+#~ msgstr "½ç½ø»ØÄê %ld ¤¬Í¿¤¨¤é¤ì¤Æ¤¤¤ë°ú¿ô¤Î¿ô¤òĶ¤¨¤Æ¤¤¤Þ¤¹¡£"
+
+#~ msgid "`$' not permitted after period in format"
+#~ msgstr "`$' ¤Ï½ñ¼°»ØÄê¤Î¥Ô¥ê¥ª¥É `.' ¤Î¸å¤Ë»ÈÍѤǤ­¤Þ¤»¤ó¡£"
+
+#~ msgid "no `$' supplied for positional field width or precision"
+#~ msgstr "¥Õ¥£¡¼¥ë¥ÉÉý¡¢¤Þ¤¿¤ÏÀºÅ٤λØÄê»Ò¤Ë `$' ¤¬Í¿¤¨¤é¤ì¤Æ¤¤¤Þ¤»¤ó¡£"
+
+#~ msgid "`l' is meaningless in awk formats; ignored"
+#~ msgstr "awk ¤Î½ñ¼°»ØÄê¤Ç¤Ï `l' ¤Ï̵°ÕÌ£¤Ç¤¹¡£Ìµ»ë¤·¤Þ¤¹¡£"
+
+#~ msgid "`l' is not permitted in POSIX awk formats"
+#~ msgstr "POSIX ½àµò¤Î awk ¤Ç¤Ï `l' ¤Ï»ÈÍѤǤ­¤Þ¤»¤ó¡£"
+
+#~ msgid "`L' is meaningless in awk formats; ignored"
+#~ msgstr "awk ¤Î½ñ¼°»ØÄê¤Ç¤Ï `L' ¤Ï̵°ÕÌ£¤Ç¤¹¡£Ìµ»ë¤·¤Þ¤¹¡£"
+
+#~ msgid "`L' is not permitted in POSIX awk formats"
+#~ msgstr "POSIX ½àµò¤Î awk ¤Ç¤Ï `L' ¤Ï»ÈÍѤǤ­¤Þ¤»¤ó¡£"
+
+#~ msgid "`h' is meaningless in awk formats; ignored"
+#~ msgstr "awk ¤Î½ñ¼°»ØÄê¤Ç¤Ï `h' ¤Ï̵°ÕÌ£¤Ç¤¹¡£Ìµ»ë¤·¤Þ¤¹¡£"
+
+#~ msgid "`h' is not permitted in POSIX awk formats"
+#~ msgstr "POSIX ½àµò¤Î awk ¤Ç¤Ï `h' ¤Ï»ÈÍѤǤ­¤Þ¤»¤ó¡£"
+
+#~ msgid "[s]printf: value %g is out of range for `%%%c' format"
+#~ msgstr "[s]printf: %g ¤ÎÃͤ¬½ñ¼° `%%%c' ¤ÎµöÍÆÈϰϤòĶ¤¨¤Æ¤¤¤Þ¤¹¡£"
+
+#~ msgid "not enough arguments to satisfy format string"
+#~ msgstr "½ñ¼°»ØÄꤹ¤ë¤¿¤á¤Î°ú¿ô¤¬Â­¤ê¤Þ¤»¤ó¡£"
+
+#~ msgid "^ ran out for this one"
+#~ msgstr "^ ¤³¤³¤«¤é­¤ê¤Þ¤»¤ó"
+
+#~ msgid "[s]printf: format specifier does not have control letter"
+#~ msgstr "[s]printf: ½ñ¼°»ØÄê»Ò¤ËÀ©¸æʸ»ú¤¬¤¢¤ê¤Þ¤»¤ó¡£"
+
+#~ msgid "too many arguments supplied for format string"
+#~ msgstr "½ñ¼°»ØÄêʸ»úÎó¤Î°ú¿ô¤¬Â¿²á¤®¤Þ¤¹¡£"
#, fuzzy
-#~ msgid "seek: `%.*s' is not an input file, pipe, or co-process"
+#~ msgid "attempt to use array parameter `%s' in a scalar context"
+#~ msgstr "¥¹¥«¥é¡¼´Ä¶­¤ËÇÛÎó `%s' ¤ò»ÈÍѤ·¤Æ¤¤¤Þ¤¹¡£"
+
+#~ msgid "can't open two way socket `%s' for input/output (%s)"
+#~ msgstr "Æþ½ÐÎÏÍѤÎÁÐÊý¸þ¥½¥±¥Ã¥È `%s' ¤¬³«¤±¤Þ¤»¤ó (%s)¡£"
+
+#~ msgid ""
+#~ "concatenation: side effects in one expression have changed the length of "
+#~ "another!"
#~ msgstr ""
-#~ "close: `%.*s' ¤Ï¥Õ¥¡¥¤¥ë¡¢¥Ñ¥¤¥×¡¢ÊÂ¹Ô¥×¥í¥»¥¹¤Î¤¤¤º¤ì¤Ç¤â¤¢¤ê¤Þ¤»¤ó¡£"
+#~ "concatenation¡Êʸ»úÎóÏ¢·ë¡Ë: °ìÊý¤Î¼°¤ÎÉûºîÍѤǡ¢¤â¤¦°ìÊý¤ÎŤµ¤¬ÊѤï¤ê¤Þ"
+#~ "¤·¤¿!"
+
+#~ msgid "illegal type (%s) in tree_eval"
+#~ msgstr "tree_eval ¤ÎÃæ¤ËÉÔÀµ¤Ê¥¿¥¤¥× (%s) ¤¬»ÈÍѤµ¤ì¤Æ¤¤¤Þ¤¹¡£"
+
+#~ msgid "\t# -- main --\n"
+#~ msgstr "\t# -- ¥á¥¤¥ó --\n"
+
+#~ msgid "invalid tree type %s in redirect()"
+#~ msgstr "redirect() ¤ÎÃæ¤ÇÉÔÀµ¤Ê¥Ä¥ê¡¼¥¿¥¤¥× %s ¤ò»ÈÍѤ·¤Æ¤¤¤Þ¤¹¡£"
#, fuzzy
-#~ msgid "seek: `%.*s' is not a regular file"
-#~ msgstr "`%s' ¤ÏÉÔÀµ¤ÊÊÑ¿ô̾¤Ç¤¹¡£"
+#~ msgid "# treated internally as `delete'"
+#~ msgstr "# ÆâÉô¤Ç¤Ï `delete' ¤È¤·¤Æ°·¤ï¤ì¤Þ¤·¤¿¡£"
-#~ msgid "use `PROCINFO[\"%s\"]' instead of `%s'"
-#~ msgstr "`%2$s' ¤ÎÂå¤ï¤ê¤Ë `PROCINFO[\"%1$s\"]' ¤ò»ÈÍѤ·¤Æ¤¯¤À¤µ¤¤¡£"
+#~ msgid "# this is a dynamically loaded extension function"
+#~ msgstr "# ¤³¤ì¤ÏưŪ¤Ë¥í¡¼¥É¤µ¤ì¤¿³ÈÄ¥µ¡Ç½¤Ç¤¹¡£"
-#~ msgid "use `PROCINFO[...]' instead of `/dev/user'"
-#~ msgstr "`/dev/user' ¤ÎÂå¤ï¤ê¤Ë `PROCINFO[...]' ¤ò»ÈÍѤ·¤Æ¤¯¤À¤µ¤¤¡£"
+#~ msgid "unexpected type %s in prec_level"
+#~ msgstr "prec_level Ãæ¤Î %s ¤ÏͽÁÛ³°¤Î¥¿¥¤¥×¤Ç¤¹¡£"
+
+#, fuzzy
+#~ msgid "Unknown node type %s in pp_var"
+#~ msgstr "¥Î¡¼¥É %d ¤Î¼ïÎबÉÔÌÀ¤Ç¤¹¡£"
+
+#~ msgid "%s: illegal option -- %c\n"
+#~ msgstr "%s: ÉÔÀµ¤Ê¥ª¥×¥·¥ç¥ó -- %c\n"
diff --git a/po/nl.gmo b/po/nl.gmo
index 69da21d5..3d9dfc70 100644
--- a/po/nl.gmo
+++ b/po/nl.gmo
Binary files differ
diff --git a/po/nl.po b/po/nl.po
index 8c622c27..d9fbbf40 100644
--- a/po/nl.po
+++ b/po/nl.po
@@ -1,653 +1,641 @@
-# Translation of gawk-3.1.5h to Dutch.
-# Copyright (C) 2005, 2007 Free Software Foundation, Inc.
+# Translation of gawk-3.1.6 to Dutch.
+# Copyright (C) 2009 Free Software Foundation, Inc.
+#
+# This file is distributed under the same license as the gawk package.
#
# Benno Schulenberg <benno@vertaalt.nl>, 2005, 2007.
msgid ""
msgstr ""
-"Project-Id-Version: gawk 3.1.5h\n"
+"Project-Id-Version: gawk 3.1.6e\n"
"Report-Msgid-Bugs-To: arnold@skeeve.com\n"
-"POT-Creation-Date: 2010-11-12 12:20+0200\n"
-"PO-Revision-Date: 2007-10-02 12:43+0200\n"
-"Last-Translator: Benno Schulenberg <benno@vertaalt.nl>\n"
+"POT-Creation-Date: 2010-11-17 08:48+0200\n"
+"PO-Revision-Date: 2009-07-05 21:29+0100\n"
+"Last-Translator: Erwin Poeze <erwin.poeze@gmail.com>\n"
"Language-Team: Dutch <vertaling@vrijschrift.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: KBabel 1.11.4\n"
-#: array.c:112
+#: array.c:103
+#, c-format
+msgid "from %s"
+msgstr "van %s"
+
+#: array.c:267
+#, fuzzy
+msgid "attempt to use a scalar value as array"
+msgstr "scalair `%s' wordt gebruikt als array"
+
+#: array.c:270
#, c-format
msgid "attempt to use function `%s' as an array"
msgstr "functie `%s' wordt gebruikt als array"
-#: array.c:115
+#: array.c:273
#, c-format
msgid "attempt to use scalar parameter `%s' as an array"
msgstr "scalaire parameter `%s' wordt gebruikt als array"
-#: array.c:118
+#: array.c:276
#, c-format
msgid "attempt to use scalar `%s' as array"
msgstr "scalair `%s' wordt gebruikt als array"
-#: array.c:156
+#: array.c:321 array.c:648 eval.c:1075 eval.c:1079 eval.c:1581 eval.c:1649
+#: eval.c:1928
#, c-format
-msgid "from %s"
-msgstr "van %s"
+msgid "attempt to use array `%s' in a scalar context"
+msgstr "array `%s' wordt gebruikt in een scalaire context"
-#: array.c:513
+#: array.c:570
#, fuzzy, c-format
msgid "reference to uninitialized element `%s[\"%.*s\"]'"
msgstr "verwijzing naar ongeïnitialiseerd element '%s[\"%s\"]'"
-#: array.c:519
+#: array.c:576
#, c-format
msgid "subscript of array `%s' is null string"
msgstr "index van array `%s' is lege string"
-#: array.c:623
+#: array.c:684
#, c-format
msgid "delete: index `%s' not in array `%s'"
msgstr "delete: index `%s' niet in array '%s'"
-#: array.c:792
+#: array.c:705
+#, fuzzy, c-format
+msgid "attempt to use scalar `%s[\"%.*s\"]' as an array"
+msgstr "scalair `%s' wordt gebruikt als array"
+
+#: array.c:868
#, c-format
msgid "%s: empty (null)\n"
msgstr "%s: leeg (nil)\n"
-#: array.c:797
+#: array.c:873
#, c-format
msgid "%s: empty (zero)\n"
msgstr "%s: leeg (nul)\n"
-#: array.c:801
+#: array.c:877
#, c-format
msgid "%s: table_size = %d, array_size = %d\n"
msgstr "%s: tabelgrootte = %d, arraygrootte = %d\n"
-#: array.c:830
+#: array.c:912
#, c-format
msgid "%s: is parameter\n"
msgstr "%s: is een parameter\n"
-#: array.c:835
+#: array.c:916
#, c-format
msgid "%s: array_ref to %s\n"
msgstr "%s: array-verwijzing naar %s\n"
-#: awkgram.y:224 awkgram.y:227
+#: array.c:921
+#, fuzzy
+msgid "adump: argument not an array"
+msgstr "match: derde argument is geen array"
+
+#: array.c:1139
+#, fuzzy
+msgid "attempt to use array in a scalar context"
+msgstr "array `%s' wordt gebruikt in een scalaire context"
+
+#: array.c:1236
+#, fuzzy
+msgid "asort: second argument not an array"
+msgstr "split: tweede argument is geen array"
+
+#: array.c:1237
+#, fuzzy
+msgid "asorti: second argument not an array"
+msgstr "split: tweede argument is geen array"
+
+#: array.c:1245
+#, fuzzy
+msgid "asort: first argument not an array"
+msgstr "match: derde argument is geen array"
+
+#: array.c:1246
+#, fuzzy
+msgid "asorti: first argument not an array"
+msgstr "match: derde argument is geen array"
+
+#: awkgram.y:246
#, c-format
msgid "%s blocks must have an action part"
msgstr "%s-blokken horen een actiedeel te hebben"
-#: awkgram.y:230
+#: awkgram.y:249
msgid "each rule must have a pattern or an action part"
msgstr "elke regel hoort een patroon of een actiedeel te hebben"
-#: awkgram.y:266 awkgram.y:275
+#: awkgram.y:320 awkgram.y:330
msgid "old awk does not support multiple `BEGIN' or `END' rules"
-msgstr "oude 'awk' staat meerdere 'BEGIN'- en 'END'-regels niet toe"
+msgstr "oude 'awk' staat geen meerdere 'BEGIN'- en 'END'-regels toe"
-#: awkgram.y:304
+#: awkgram.y:367
#, c-format
msgid "`%s' is a built-in function, it cannot be redefined"
-msgstr "'%s' is een ingebouwde functie en is niet te herdefiniëren"
+msgstr "`%s' is een ingebouwde functie en is niet te herdefiniëren"
-#: awkgram.y:350
+#: awkgram.y:427
msgid "regexp constant `//' looks like a C++ comment, but is not"
-msgstr "regexp-constante '//' lijkt op C-commentaar, maar is het niet"
+msgstr "regexp-constante `//' lijkt op C++-commentaar, maar is het niet"
-#: awkgram.y:353
+#: awkgram.y:430
#, c-format
msgid "regexp constant `/%s/' looks like a C comment, but is not"
-msgstr "regexp-constante '/%s/' lijkt op C-commentaar, maar is het niet"
+msgstr "regexp-constante `/%s/' lijkt op C-commentaar, maar is het niet"
-#: awkgram.y:380 awkgram.y:692
-msgid "statement may have no effect"
-msgstr "opdracht heeft mogelijk geen effect"
+#: awkgram.y:735
+#, fuzzy
+msgid "`break' is not allowed outside a loop or switch"
+msgstr "`break' buiten een lus is niet toegestaan"
-#: awkgram.y:477 awkgram.y:480 awkgram.y:504 awkgram.y:511 awkgram.y:518
-#, c-format
-msgid "`%s' used in %s action"
-msgstr "'%s' wordt gebruikt in %s-actie"
+#: awkgram.y:744
+#, fuzzy
+msgid "`continue' is not allowed outside a loop"
+msgstr "`continue' buiten een lus is niet toegestaan"
+
+#: awkgram.y:753
+#, fuzzy, c-format
+msgid "`next' used in %s action"
+msgstr "`%s' wordt gebruikt in %s-actie"
-#: awkgram.y:495 awkgram.y:499
+#: awkgram.y:767 awkgram.y:771
msgid "`nextfile' is a gawk extension"
-msgstr "'nextfile' is een gawk-uitbreiding"
+msgstr "`nextfile' is een gawk-uitbreiding"
-#: awkgram.y:528
+#: awkgram.y:775
+#, fuzzy, c-format
+msgid "`nextfile' used in %s action"
+msgstr "`%s' wordt gebruikt in %s-actie"
+
+#: awkgram.y:799
msgid "`return' used outside function context"
-msgstr "'return' wordt gebruikt buiten functiecontext"
+msgstr "`return' wordt gebruikt buiten functiecontext"
-#: awkgram.y:570
+#: awkgram.y:859
msgid "plain `print' in BEGIN or END rule should probably be `print \"\"'"
msgstr ""
-"kale 'print' in BEGIN- of END-regel moet vermoedelijk 'print \"\"' zijn"
+"kale `print' in BEGIN- of END-regel moet vermoedelijk `print \"\"' zijn"
-#: awkgram.y:586 awkgram.y:594
+#: awkgram.y:927 awkgram.y:935
msgid "`delete array' is a gawk extension"
-msgstr "'delete array' is een gawk-uitbreiding"
+msgstr "`delete array' is een gawk-uitbreiding"
-#: awkgram.y:608 awkgram.y:616
+#: awkgram.y:955 awkgram.y:963
msgid "`delete(array)' is a non-portable tawk extension"
-msgstr "'delete(array)' is een niet-overdraagbare tawk-uitbreiding"
+msgstr "`delete(array)' is een niet-overdraagbare 'tawk'-uitbreiding"
-#: awkgram.y:660
+#: awkgram.y:1004
#, c-format
msgid "duplicate case values in switch body: %s"
-msgstr "dubbele 'case'-waarde in 'switch'-opdracht: %s"
+msgstr "dubbele `case'-waarde in `switch'-opdracht: %s"
-#: awkgram.y:670
-msgid "Duplicate `default' detected in switch body"
-msgstr "dubbele 'default' in 'switch'-opdracht"
+#: awkgram.y:1014
+#, fuzzy
+msgid "duplicate `default' detected in switch body"
+msgstr "dubbele `default' in `switch'-opdracht"
-#: awkgram.y:759
+#: awkgram.y:1151
msgid "multistage two-way pipelines don't work"
msgstr "meerfase-tweerichtings-pijplijnen werken niet"
-#: awkgram.y:850
+#: awkgram.y:1253
msgid "regular expression on right of assignment"
msgstr "reguliere expressie rechts van toewijzing"
-#: awkgram.y:860
+#: awkgram.y:1263
msgid "regular expression on left of `~' or `!~' operator"
-msgstr "reguliere expressie links van operator '~' of '!~'"
+msgstr "reguliere expressie links van operator `~' of `!~'"
-#: awkgram.y:866 awkgram.y:954
+#: awkgram.y:1278 awkgram.y:1423
msgid "old awk does not support the keyword `in' except after `for'"
-msgstr "oude 'awk' kent het sleutelwoord 'in' niet, behalve na 'for'"
+msgstr "oude `awk' kent het sleutelwoord `in' niet, behalve na `for'"
-#: awkgram.y:872
+#: awkgram.y:1287
msgid "regular expression on right of comparison"
msgstr "reguliere expressie rechts van vergelijking"
-#: awkgram.y:936
+#: awkgram.y:1399
#, c-format
-msgid "`getline var' invalid inside %s rule"
+msgid "`getline var' invalid inside `%s' rule"
msgstr ""
-#: awkgram.y:939
+#: awkgram.y:1401
#, c-format
-msgid "`getline' invalid inside %s rule"
+msgid "`getline' invalid inside `%s' rule"
msgstr ""
-#: awkgram.y:944
+#: awkgram.y:1407
msgid "non-redirected `getline' undefined inside END action"
-msgstr "onherverwezen 'getline' is ongedefinieerd binnen END-actie"
+msgstr "onherverwezen `getline' is ongedefinieerd binnen END-actie"
-#: awkgram.y:955
+#: awkgram.y:1424
msgid "old awk does not support multidimensional arrays"
-msgstr "oude 'awk' kent geen meerdimensionale arrays"
+msgstr "oude `awk' kent geen meerdimensionale arrays"
-#: awkgram.y:1001
+#: awkgram.y:1528
msgid "call of `length' without parentheses is not portable"
-msgstr "aanroep van 'length' zonder haakjes is niet overdraagbaar"
-
-#: awkgram.y:1006
-msgid "call of `length' without parentheses is deprecated by POSIX"
-msgstr "aanroep van 'length' zonder haakjes wordt door POSIX afgeraden"
+msgstr "aanroep van `length' zonder haakjes is niet overdraagbaar"
-#: awkgram.y:1051
+#: awkgram.y:1591
#, fuzzy
msgid "indirect function calls are a gawk extension"
-msgstr "'extension' is een gawk-uitbreiding"
+msgstr "`nextfile' is een gawk-uitbreiding"
-#: awkgram.y:1084
-msgid "use of non-array as array"
-msgstr "non-array wordt gebruikt als array"
+#: awkgram.y:1605
+#, fuzzy, c-format
+msgid "can not use special variable `%s' for indirect function call"
+msgstr ""
+"functie `%s': kan speciale variabele `%s' niet als functieparameter gebruiken"
-#: awkgram.y:1087
+#: awkgram.y:1682
msgid "invalid subscript expression"
msgstr "ongeldige index-expressie"
-#: awkgram.y:1329
+#: awkgram.y:1722
+msgid "use of non-array as array"
+msgstr "non-array wordt gebruikt als array"
+
+#: awkgram.y:1993
msgid "unexpected newline or end of string"
msgstr "onverwacht regeleinde of einde van string"
-#: awkgram.y:1446
-msgid "empty program text on command line"
-msgstr "lege programmatekst op commandoregel"
-
-#: awkgram.y:1502
+#: awkgram.y:2248 awkgram.y:2296 awkgram.y:2470
#, c-format
msgid "can't open source file `%s' for reading (%s)"
-msgstr "kan bronbestand '%s' niet openen om te lezen (%s)"
+msgstr "kan bronbestand `%s' niet openen om te lezen (%s)"
-#: awkgram.y:1600
+#: awkgram.y:2249 awkgram.y:2297 builtin.c:122
+msgid "reason unknown"
+msgstr "reden onbekend"
+
+#: awkgram.y:2257
+#, fuzzy, c-format
+msgid "already included source file `%s'"
+msgstr "kan bronbestand `%s' niet lezen (%s)"
+
+#: awkgram.y:2281
+#, fuzzy
+msgid "@include is a gawk extension"
+msgstr "`nextfile' is een gawk-uitbreiding"
+
+#: awkgram.y:2288
+msgid "empty filename after @include"
+msgstr ""
+
+#: awkgram.y:2422
+msgid "empty program text on command line"
+msgstr "lege programmatekst op commandoregel"
+
+#: awkgram.y:2537
#, c-format
msgid "can't read sourcefile `%s' (%s)"
-msgstr "kan bronbestand '%s' niet lezen (%s)"
+msgstr "kan bronbestand `%s' niet lezen (%s)"
-#: awkgram.y:1608
+#: awkgram.y:2547
#, c-format
msgid "source file `%s' is empty"
-msgstr "bronbestand '%s' is leeg"
+msgstr "bronbestand `%s' is leeg"
-#: awkgram.y:1800 awkgram.y:1922 awkgram.y:1940 awkgram.y:2315 awkgram.y:2407
+#: awkgram.y:2732
msgid "source file does not end in newline"
msgstr "bronbestand eindigt niet met een regeleindeteken (LF)"
-#: awkgram.y:1862
+#: awkgram.y:2809
msgid "unterminated regexp ends with `\\' at end of file"
msgstr "onafgesloten reguliere expressie eindigt met '\\' aan bestandseinde"
-#: awkgram.y:1886
+#: awkgram.y:2833
#, c-format
msgid "%s: %d: tawk regex modifier `/.../%c' doesn't work in gawk"
-msgstr "%s: %d: regexp-optie '/.../%c' van tawk werkt niet in gawk"
+msgstr "%s: %d: regexp-optie `/.../%c' van `tawk' werkt niet in gawk"
-#: awkgram.y:1890
+#: awkgram.y:2837
#, c-format
msgid "tawk regex modifier `/.../%c' doesn't work in gawk"
-msgstr "regexp-optie '/.../%c' van tawk werkt niet in gawk"
+msgstr "regexp-optie `/.../%c' van `tawk' werkt niet in gawk"
-#: awkgram.y:1897
+#: awkgram.y:2844
msgid "unterminated regexp"
msgstr "onafgesloten reguliere expressie"
-#: awkgram.y:1900
+#: awkgram.y:2848
msgid "unterminated regexp at end of file"
msgstr "onafgesloten reguliere expressie aan bestandseinde"
-#: awkgram.y:1969
+#: awkgram.y:2907
msgid "use of `\\ #...' line continuation is not portable"
msgstr "gebruik van regelvoortzetting '\\ #...' is niet overdraagbaar"
-#: awkgram.y:1982
+#: awkgram.y:2923
msgid "backslash not last character on line"
msgstr "backslash is niet het laatste teken op de regel"
-#: awkgram.y:2027
+#: awkgram.y:2984
msgid "POSIX does not allow operator `**='"
-msgstr "POSIX staat operator '**=' niet toe"
+msgstr "POSIX staat operator `**=' niet toe"
-#: awkgram.y:2029
+#: awkgram.y:2986
msgid "old awk does not support operator `**='"
-msgstr "oude 'awk' kent de operator '**=' niet"
+msgstr "oude `awk' kent de operator `**=' niet"
-#: awkgram.y:2038
+#: awkgram.y:2995
msgid "POSIX does not allow operator `**'"
-msgstr "POSIX staat operator '**' niet toe"
+msgstr "POSIX staat operator `**' niet toe"
-#: awkgram.y:2040
+#: awkgram.y:2997
msgid "old awk does not support operator `**'"
-msgstr "oude 'awk' kent de operator '**' niet"
+msgstr "oude `awk' kent de operator `**' niet"
-#: awkgram.y:2071
+#: awkgram.y:3032
msgid "operator `^=' is not supported in old awk"
-msgstr "oude 'awk' kent de operator '^=' niet"
+msgstr "oude `awk' kent de operator `^=' niet"
-#: awkgram.y:2079
+#: awkgram.y:3040
msgid "operator `^' is not supported in old awk"
-msgstr "oude 'awk' kent de operator '^' niet"
+msgstr "oude `awk' kent de operator `^' niet"
-#: awkgram.y:2163 awkgram.y:2178
+#: awkgram.y:3133 awkgram.y:3149
msgid "unterminated string"
msgstr "onafgesloten string"
-#: awkgram.y:2368
-#, c-format
+#: awkgram.y:3345
+#, fuzzy, c-format
msgid "invalid char '%c' in expression"
-msgstr "ongeldig teken '%c' in expressie"
+msgstr "ongeldig teken `%c' in expressie"
-#: awkgram.y:2416
+#: awkgram.y:3391
#, c-format
msgid "`%s' is a gawk extension"
-msgstr "'%s' is een gawk-uitbreiding"
+msgstr "`%s' is een gawk-uitbreiding"
-#: awkgram.y:2419
+#: awkgram.y:3394
#, c-format
msgid "`%s' is a Bell Labs extension"
-msgstr "'%s' is een uitbreiding door Bell Labs"
+msgstr "`%s' is een uitbreiding door Bell Labs"
-#: awkgram.y:2422
+#: awkgram.y:3397
#, c-format
msgid "POSIX does not allow `%s'"
-msgstr "POSIX staat '%s' niet toe"
+msgstr "POSIX staat `%s' niet toe"
-#: awkgram.y:2426
+#: awkgram.y:3401
#, c-format
msgid "`%s' is not supported in old awk"
-msgstr "oude 'awk' kent '%s' niet"
+msgstr "oude `awk' kent `%s' niet"
-#: awkgram.y:2452
+#: awkgram.y:3465
msgid "`goto' considered harmful!\n"
-msgstr "'goto' wordt als schadelijk beschouwd!\n"
+msgstr "`goto' wordt als schadelijk beschouwd!\n"
-#: awkgram.y:2514
+#: awkgram.y:3518
#, c-format
msgid "%d is invalid as number of arguments for %s"
msgstr "%d is een ongeldig aantal argumenten voor %s"
-#: awkgram.y:2533 awkgram.y:2536
+#: awkgram.y:3544 awkgram.y:3547
msgid "match: third argument is a gawk extension"
msgstr "match: derde argument is een gawk-uitbreiding"
-#: awkgram.y:2549
+#: awkgram.y:3575
#, c-format
msgid "%s: string literal as last arg of substitute has no effect"
msgstr "%s: een stringwaarde als laatste vervangingsargument heeft geen effect"
-#: awkgram.y:2552
+#: awkgram.y:3580
#, c-format
msgid "%s third parameter is not a changeable object"
msgstr "%s: derde parameter is geen veranderbaar object"
-#: awkgram.y:2586 awkgram.y:2589
+#: awkgram.y:3665 awkgram.y:3668
msgid "close: second argument is a gawk extension"
msgstr "close: tweede argument is een gawk-uitbreiding"
-#: awkgram.y:2599
+#: awkgram.y:3680
msgid "use of dcgettext(_\"...\") is incorrect: remove leading underscore"
msgstr "dcgettext(_\"...\") is onjuist: verwijder het liggende streepje"
-#: awkgram.y:2614
+#: awkgram.y:3695
msgid "use of dcngettext(_\"...\") is incorrect: remove leading underscore"
msgstr "dcngettext(_\"...\") is onjuist: verwijder het liggende streepje"
-#: awkgram.y:2686
+#: awkgram.y:3787
#, c-format
msgid "function `%s': parameter #%d, `%s', duplicates parameter #%d"
-msgstr "functie '%s': parameter #%d, '%s', dupliceert parameter #%d"
+msgstr "functie `%s': parameter #%d, `%s', dupliceert parameter #%d"
-#: awkgram.y:2719
+#: awkgram.y:3829
#, c-format
msgid "function `%s': parameter `%s' shadows global variable"
-msgstr "functie '%s': parameter '%s' schaduwt een globale variabele"
+msgstr "functie `%s': parameter `%s' schaduwt een globale variabele"
-#: awkgram.y:2831
+#: awkgram.y:3987
#, c-format
msgid "could not open `%s' for writing (%s)"
-msgstr "kan '%s' niet openen om te schrijven (%s)"
+msgstr "kan `%s' niet openen om te schrijven (%s)"
-#: awkgram.y:2832 profile.c:96
+#: awkgram.y:3988 profile.c:85
msgid "sending profile to standard error"
msgstr "profiel gaat naar standaardfoutuitvoer"
-#: awkgram.y:2864
+#: awkgram.y:3994
#, c-format
msgid "%s: close failed (%s)"
msgstr "%s: sluiten is mislukt (%s)"
-#: awkgram.y:2985
+#: awkgram.y:4046
msgid "shadow_funcs() called twice!"
msgstr "shadow_funcs() twee keer aangeroepen!"
-#: awkgram.y:3012
+#: awkgram.y:4052
msgid "there were shadowed variables."
msgstr "er waren geschaduwde variabelen."
-#: awkgram.y:3085
+#: awkgram.y:4081
#, c-format
msgid "function `%s': can't use function name as parameter name"
-msgstr "functie '%s': kan functienaam niet als parameternaam gebruiken"
+msgstr "functie `%s': kan functienaam niet als parameternaam gebruiken"
-#: awkgram.y:3088
-#, fuzzy, c-format
+#: awkgram.y:4086
+#, c-format
msgid "function `%s': can't use special variable `%s' as a function parameter"
-msgstr "functie '%s': kan functienaam niet als parameternaam gebruiken"
+msgstr ""
+"functie `%s': kan speciale variabele `%s' niet als functieparameter gebruiken"
-#: awkgram.y:3098
+#: awkgram.y:4102
#, c-format
msgid "function name `%s' previously defined"
-msgstr "functienaam '%s' is al eerder gedefinieerd"
+msgstr "functienaam `%s' is al eerder gedefinieerd"
-#: awkgram.y:3249 awkgram.y:3255
+#: awkgram.y:4271 awkgram.y:4277
#, c-format
msgid "function `%s' called but never defined"
-msgstr "functie '%s' aangeroepen maar nergens gedefinieerd"
+msgstr "functie `%s' aangeroepen maar nergens gedefinieerd"
-#: awkgram.y:3258
+#: awkgram.y:4280
#, c-format
msgid "function `%s' defined but never called"
-msgstr "functie '%s' gedefinieerd maar nergens aangeroepen"
+msgstr "functie `%s' gedefinieerd maar nergens aangeroepen"
-#: awkgram.y:3285
+#: awkgram.y:4311
#, c-format
msgid "regexp constant for parameter #%d yields boolean value"
msgstr "regexp-constante als parameter #%d levert booleanwaarde op"
-#: awkgram.y:3329
+#: awkgram.y:4420
#, c-format
msgid ""
"function `%s' called with space between name and `(',\n"
"or used as a variable or an array"
msgstr ""
-"functie '%s' aangeroepen met spatie tussen naam en '(',\n"
+"functie `%s' aangeroepen met spatie tussen naam en `(',\n"
"of gebruikt als variabele of array"
-#: awkgram.y:3750
-#, fuzzy
-msgid "division by zero attempted in `/'"
-msgstr "deling door nul in '/='"
+#: awkgram.y:4673 eval.c:1845
+msgid "division by zero attempted"
+msgstr "deling door nul"
-#: awkgram.y:3755 eval.c:1411
+#: awkgram.y:4682 eval.c:1877
#, c-format
msgid "division by zero attempted in `%%'"
-msgstr "deling door nul in '%%'"
+msgstr "deling door nul in `%%'"
+
+#: awkgram.y:5342
+msgid "statement may have no effect"
+msgstr "opdracht heeft mogelijk geen effect"
-#: builtin.c:122
+#: builtin.c:120
#, c-format
msgid "%s to \"%s\" failed (%s)"
msgstr "%s naar \"%s\" is mislukt (%s)"
-#: builtin.c:123
+#: builtin.c:121
msgid "standard output"
msgstr "standaarduitvoer"
-#: builtin.c:124
-msgid "reason unknown"
-msgstr "reden onbekend"
-
-#: builtin.c:137
+#: builtin.c:135
msgid "exp: received non-numeric argument"
msgstr "exp: argument is geen getal"
-#: builtin.c:143
+#: builtin.c:141
#, c-format
msgid "exp: argument %g is out of range"
msgstr "exp: argument %g ligt buiten toegestane bereik"
-#: builtin.c:201
+#: builtin.c:200
#, c-format
msgid "fflush: cannot flush: pipe `%s' opened for reading, not writing"
msgstr ""
-"fflush: kan pijp niet leegmaken: '%s' is geopend om te lezen, niet om te "
+"fflush: kan pijp niet leegmaken: `%s' is geopend om te lezen, niet om te "
"schrijven"
-#: builtin.c:204
+#: builtin.c:203
#, c-format
msgid "fflush: cannot flush: file `%s' opened for reading, not writing"
msgstr ""
-"fflush: kan bestand niet leegmaken: '%s' is geopend om te lezen, niet om te "
+"fflush: kan bestand niet leegmaken: `%s' is geopend om te lezen, niet om te "
"schrijven"
-#: builtin.c:216
+#: builtin.c:215
#, c-format
msgid "fflush: `%s' is not an open file, pipe or co-process"
-msgstr "fflush: '%s' is geen open bestand, pijp, of co-proces"
+msgstr "fflush: `%s' is geen open bestand, pijp, of co-proces"
-#: builtin.c:310
+#: builtin.c:322
msgid "index: received non-string first argument"
msgstr "index: eerste argument is geen string"
-#: builtin.c:312
+#: builtin.c:324
msgid "index: received non-string second argument"
msgstr "index: tweede argument is geen string"
-#: builtin.c:434
+#: builtin.c:446
msgid "int: received non-numeric argument"
msgstr "int: argument is geen getal"
-#: builtin.c:464
+#: builtin.c:469
+#, fuzzy
msgid "`length(array)' is a gawk extension"
msgstr "'length(array)' is een gawk-uitbreiding"
-#: builtin.c:471
-msgid "length: untyped parameter argument will be forced to scalar"
-msgstr ""
-
-#: builtin.c:480
-msgid "length: untyped argument will be forced to scalar"
-msgstr ""
-
-#: builtin.c:484
+#: builtin.c:477
msgid "length: received non-string argument"
msgstr "length: argument is geen string"
-#: builtin.c:515
+#: builtin.c:508
msgid "log: received non-numeric argument"
msgstr "log: argument is geen getal"
-#: builtin.c:518
+#: builtin.c:511
#, c-format
msgid "log: received negative argument %g"
msgstr "log: argument %g is negatief"
-#: builtin.c:726 builtin.c:729
-msgid "must use `count$' on all formats or none"
-msgstr "'count$' hoort in alle opmaken gebruikt te worden, of in geen"
-
-#: builtin.c:790
-#, c-format
-msgid "field width is ignored for `%%%%' specifier"
-msgstr ""
-
-#: builtin.c:792
-#, c-format
-msgid "precision is ignored for `%%%%' specifier"
-msgstr ""
-
-#: builtin.c:794
-#, c-format
-msgid "field width and precision are ignored for `%%%%' specifier"
-msgstr ""
-
-#: builtin.c:845
-msgid "`$' is not permitted in awk formats"
-msgstr "'$' is niet toegestaan in awk-opmaak"
-
-#: builtin.c:851
-msgid "arg count with `$' must be > 0"
-msgstr "het aantal argumenten met '$' moet > 0 zijn"
-
-#: builtin.c:853
-#, c-format
-msgid "arg count %ld greater than total number of supplied arguments"
-msgstr "argumentental %ld is groter dan het gegeven aantal argumenten"
-
-#: builtin.c:855
-msgid "`$' not permitted after period in format"
-msgstr "'$' is niet toegestaan na een punt in de opmaak"
-
-#: builtin.c:868
-msgid "no `$' supplied for positional field width or precision"
-msgstr "geen '$' opgegeven bij positionele veldbreedte of -precisie"
-
-#: builtin.c:938
-msgid "`l' is meaningless in awk formats; ignored"
-msgstr "'l' is betekenisloos in awk-opmaak; genegeerd"
-
-#: builtin.c:942
-msgid "`l' is not permitted in POSIX awk formats"
-msgstr "'l' is niet toegestaan in POSIX awk-opmaak"
-
-#: builtin.c:953
-msgid "`L' is meaningless in awk formats; ignored"
-msgstr "'L' is betekenisloos in awk-opmaak; genegeerd"
-
-#: builtin.c:957
-msgid "`L' is not permitted in POSIX awk formats"
-msgstr "'L' is niet toegestaan in POSIX awk-opmaak"
-
-#: builtin.c:968
-msgid "`h' is meaningless in awk formats; ignored"
-msgstr "'h' is betekenisloos in awk-opmaak; genegeerd"
-
-#: builtin.c:972
-msgid "`h' is not permitted in POSIX awk formats"
-msgstr "'h' is niet toegestaan in POSIX awk-opmaak"
-
-#: builtin.c:1252
-#, c-format
-msgid "[s]printf: value %g is out of range for `%%%c' format"
-msgstr "[s]printf: waarde %g ligt buiten toegestaan bereik voor opmaak '%%%c'"
-
-#: builtin.c:1332
-#, c-format
-msgid "ignoring unknown format specifier character `%c': no argument converted"
-msgstr ""
-
-#: builtin.c:1338
-msgid "not enough arguments to satisfy format string"
-msgstr "niet genoeg argumenten voor opmaakstring"
-
-#: builtin.c:1340
-msgid "^ ran out for this one"
-msgstr "niet genoeg ^ voor deze"
-
-#: builtin.c:1346
-msgid "[s]printf: format specifier does not have control letter"
-msgstr "[s]printf: opmaakaanduiding mist een stuurletter"
-
-#: builtin.c:1349
-msgid "too many arguments supplied for format string"
-msgstr "te veel argumenten voor opmaakstring"
+#: builtin.c:531 builtin.c:573 builtin.c:586 builtin.c:982 builtin.c:994
+#, fuzzy, c-format
+msgid "attempt to use array `%s' in scalar context"
+msgstr "array `%s' wordt gebruikt in een scalaire context"
-#: builtin.c:1424 builtin.c:1427
+#: builtin.c:569 builtin.c:580
msgid "printf: no arguments"
msgstr "printf: geen argumenten"
-#: builtin.c:1451
+#: builtin.c:621
msgid "sqrt: received non-numeric argument"
msgstr "sqrt: argument is geen getal"
-#: builtin.c:1455
+#: builtin.c:625
#, c-format
msgid "sqrt: called with negative argument %g"
msgstr "sqrt: argument %g is negatief"
-#: builtin.c:1479
-#, c-format
-msgid "substr: start index %g is invalid, using 1"
-msgstr "substr: startindex %g is ongeldig; 1 wordt gebruikt"
-
-#: builtin.c:1484
-#, c-format
-msgid "substr: non-integer start index %g will be truncated"
-msgstr "substr: startindex %g is geen integer; wordt afgekapt"
-
-#: builtin.c:1510
+#: builtin.c:649
#, c-format
msgid "substr: length %g is not >= 1"
msgstr "substr: lengte %g is niet >= 1"
-#: builtin.c:1512
+#: builtin.c:651
#, c-format
msgid "substr: length %g is not >= 0"
msgstr "substr: lengte %g is niet >= 0"
-#: builtin.c:1519
+#: builtin.c:658
#, c-format
msgid "substr: non-integer length %g will be truncated"
msgstr "substr: lengte %g is geen integer; wordt afgekapt"
-#: builtin.c:1524
+#: builtin.c:663
#, c-format
msgid "substr: length %g too big for string indexing, truncating to %g"
msgstr ""
"substr: lengte %g is te groot voor stringindexering; wordt verkort tot %g"
-#: builtin.c:1536
+#: builtin.c:675
+#, c-format
+msgid "substr: start index %g is invalid, using 1"
+msgstr "substr: startindex %g is ongeldig; 1 wordt gebruikt"
+
+#: builtin.c:680
+#, c-format
+msgid "substr: non-integer start index %g will be truncated"
+msgstr "substr: startindex %g is geen integer; wordt afgekapt"
+
+#: builtin.c:705
msgid "substr: source string is zero length"
msgstr "substr: bronstring heeft lengte nul"
-#: builtin.c:1552
+#: builtin.c:721
#, c-format
msgid "substr: start index %g is past end of string"
msgstr "substr: startindex %g ligt voorbij het einde van de string"
-#: builtin.c:1560
+#: builtin.c:729
#, c-format
msgid ""
"substr: length %g at start index %g exceeds length of first argument (%lu)"
@@ -655,473 +643,432 @@ msgstr ""
"substr: lengte %g bij startindex %g is groter dan de lengte van het eerste "
"argument (%lu)"
-#: builtin.c:1637
+#: builtin.c:806
+msgid "strftime: received non-numeric second argument"
+msgstr "strftime: tweede argument is geen getal"
+
+#: builtin.c:813
msgid "strftime: received non-string first argument"
msgstr "strftime: eerste argument is geen string"
-#: builtin.c:1643
+#: builtin.c:819
msgid "strftime: received empty format string"
msgstr "strftime: opmaakstring is leeg"
-#: builtin.c:1652
-msgid "strftime: received non-numeric second argument"
-msgstr "strftime: tweede argument is geen getal"
-
-#: builtin.c:1729
+#: builtin.c:885
msgid "mktime: received non-string argument"
msgstr "mktime: argument is geen string"
-#: builtin.c:1746
+#: builtin.c:902
msgid "mktime: at least one of the values is out of the default range"
msgstr ""
-#: builtin.c:1781
+#: builtin.c:937
msgid "'system' function not allowed in sandbox mode"
msgstr ""
-#: builtin.c:1786
+#: builtin.c:942
msgid "system: received non-string argument"
msgstr "system: argument is geen string"
-#: builtin.c:1907 eval.c:2285
+#: builtin.c:997 eval.c:1105 eval.c:1557 eval.c:1570
+#, c-format
+msgid "reference to uninitialized variable `%s'"
+msgstr "verwijzing naar ongeïnitialiseerde variabele `%s'"
+
+#: builtin.c:1064
#, c-format
msgid "reference to uninitialized field `$%d'"
-msgstr "verwijzing naar ongeïnitialiseerd veld '$%d'"
+msgstr "verwijzing naar ongeïnitialiseerd veld `$%d'"
-#: builtin.c:2012
+#: builtin.c:1098
msgid "tolower: received non-string argument"
msgstr "tolower: argument is geen string"
-#: builtin.c:2042
+#: builtin.c:1151
msgid "toupper: received non-string argument"
msgstr "toupper: argument is geen string"
-#: builtin.c:2075
+#: builtin.c:1199
msgid "atan2: received non-numeric first argument"
msgstr "atan2: eerste argument is geen getal"
-#: builtin.c:2077
+#: builtin.c:1201
msgid "atan2: received non-numeric second argument"
msgstr "atan2: tweede argument is geen getal"
-#: builtin.c:2096
+#: builtin.c:1220
msgid "sin: received non-numeric argument"
msgstr "sin: argument is geen getal"
-#: builtin.c:2112
+#: builtin.c:1236
msgid "cos: received non-numeric argument"
msgstr "cos: argument is geen getal"
-#: builtin.c:2165
+#: builtin.c:1289
msgid "srand: received non-numeric argument"
msgstr "srand: argument is geen getal"
-#: builtin.c:2200
+#: builtin.c:1320
msgid "match: third argument is not an array"
msgstr "match: derde argument is geen array"
-#: builtin.c:2750
+#: builtin.c:1827
msgid "gensub: third argument of 0 treated as 1"
msgstr "gensub: derde argument is 0; wordt beschouwd als 1"
-#: builtin.c:2866
+#: builtin.c:1869
msgid "lshift: received non-numeric first argument"
msgstr "lshift: eerste argument is geen getal"
-#: builtin.c:2868
+#: builtin.c:1871
msgid "lshift: received non-numeric second argument"
msgstr "lshift: tweede argument is geen getal"
-#: builtin.c:2874
+#: builtin.c:1877
#, c-format
msgid "lshift(%lf, %lf): negative values will give strange results"
msgstr "lshift(%lf, %lf): negatieve waarden geven rare resultaten"
-#: builtin.c:2876
+#: builtin.c:1879
#, c-format
msgid "lshift(%lf, %lf): fractional values will be truncated"
msgstr "lshift(%lf, %lf): cijfers na de komma worden afgekapt"
-#: builtin.c:2878
+#: builtin.c:1881
#, c-format
msgid "lshift(%lf, %lf): too large shift value will give strange results"
msgstr "lshift(%lf, %lf): te grote opschuifwaarden geven rare resultaten"
-#: builtin.c:2904
+#: builtin.c:1908
msgid "rshift: received non-numeric first argument"
msgstr "rshift: eerste argument is geen getal"
-#: builtin.c:2906
+#: builtin.c:1910
msgid "rshift: received non-numeric second argument"
msgstr "rshift: tweede argument is geen getal"
-#: builtin.c:2912
+#: builtin.c:1916
#, c-format
msgid "rshift(%lf, %lf): negative values will give strange results"
msgstr "rshift(%lf, %lf): negatieve waarden geven rare resultaten"
-#: builtin.c:2914
+#: builtin.c:1918
#, c-format
msgid "rshift(%lf, %lf): fractional values will be truncated"
msgstr "rshift(%lf, %lf): cijfers na de komma worden afgekapt"
-#: builtin.c:2916
+#: builtin.c:1920
#, c-format
msgid "rshift(%lf, %lf): too large shift value will give strange results"
msgstr "rshift(%lf, %lf): te grote opschuifwaarden geven rare resultaten"
-#: builtin.c:2942
+#: builtin.c:1947
msgid "and: received non-numeric first argument"
msgstr "and: eerste argument is geen getal"
-#: builtin.c:2944
+#: builtin.c:1949
msgid "and: received non-numeric second argument"
msgstr "and: tweede argument is geen getal"
-#: builtin.c:2950
+#: builtin.c:1955
#, c-format
msgid "and(%lf, %lf): negative values will give strange results"
msgstr "and(%lf, %lf): negatieve waarden geven rare resultaten"
-#: builtin.c:2952
+#: builtin.c:1957
#, c-format
msgid "and(%lf, %lf): fractional values will be truncated"
msgstr "and(%lf, %lf): cijfers na de komma worden afgekapt"
-#: builtin.c:2978
+#: builtin.c:1984
msgid "or: received non-numeric first argument"
msgstr "or: eerste argument is geen getal"
-#: builtin.c:2980
+#: builtin.c:1986
msgid "or: received non-numeric second argument"
msgstr "or: tweede argument is geen getal"
-#: builtin.c:2986
+#: builtin.c:1992
#, c-format
msgid "or(%lf, %lf): negative values will give strange results"
msgstr "or(%lf, %lf): negatieve waarden geven rare resultaten"
-#: builtin.c:2988
+#: builtin.c:1994
#, c-format
msgid "or(%lf, %lf): fractional values will be truncated"
msgstr "or(%lf, %lf): cijfers na de komma worden afgekapt"
-#: builtin.c:3014
+#: builtin.c:2023
msgid "xor: received non-numeric first argument"
msgstr "xor: eerste argument is geen getal"
-#: builtin.c:3016
+#: builtin.c:2025
msgid "xor: received non-numeric second argument"
msgstr "xor: tweede argument is geen getal"
-#: builtin.c:3022
+#: builtin.c:2031
#, c-format
msgid "xor(%lf, %lf): negative values will give strange results"
msgstr "xor(%lf, %lf): negatieve waarden geven rare resultaten"
-#: builtin.c:3024
+#: builtin.c:2033
#, c-format
msgid "xor(%lf, %lf): fractional values will be truncated"
msgstr "xor(%lf, %lf): cijfers na de komma worden afgekapt"
-#: builtin.c:3048
+#: builtin.c:2057 builtin.c:2063
msgid "compl: received non-numeric argument"
msgstr "compl: argument is geen getal"
-#: builtin.c:3054
+#: builtin.c:2065
#, c-format
msgid "compl(%lf): negative value will give strange results"
msgstr "compl(%lf): negatieve waarden geven rare resultaten"
-#: builtin.c:3056
+#: builtin.c:2067
#, c-format
msgid "compl(%lf): fractional value will be truncated"
msgstr "compl(%lf): cijfers na de komma worden afgekapt"
-#: builtin.c:3229
+#: builtin.c:2237
#, c-format
msgid "dcgettext: `%s' is not a valid locale category"
-msgstr "dcgettext: '%s' is geen geldige lokale categorie"
+msgstr "dcgettext: `%s' is geen geldige taalregio-deelcategorie"
-#: eval.c:374
+#: eval.c:412
#, c-format
msgid "unknown nodetype %d"
msgstr "onbekend nodetype %d"
-#: eval.c:423
-msgid "buffer overflow in genflags2str"
-msgstr "bufferoverloop in genflags2str()"
+#: eval.c:423 eval.c:437
+#, fuzzy, c-format
+msgid "unknown opcode %d"
+msgstr "onbekend nodetype %d"
-#: eval.c:455 eval.c:461 profile.c:787
+#: eval.c:434
#, c-format
-msgid "attempt to use array `%s' in a scalar context"
-msgstr "array '%s' wordt gebruikt in een scalaire context"
+msgid "opcode %s not an operator or keyword"
+msgstr ""
-#: eval.c:803
+#: eval.c:487
+msgid "buffer overflow in genflags2str"
+msgstr "bufferoverloop in genflags2str()"
+
+#: eval.c:613
#, c-format
-msgid "for loop: array `%s' changed size from %ld to %ld during loop execution"
+msgid ""
+"\n"
+"\t# Function Call Stack:\n"
+"\n"
msgstr ""
-"for: array '%s' veranderde van grootte %ld naar %ld tijdens uitvoer van de "
-"lus"
-
-#: eval.c:824
-msgid "`break' outside a loop is not portable"
-msgstr "'break' buiten een lus is niet overdraagbaar"
+"\n"
+"\t# Functieaanroepen-stack:\n"
+"\n"
-#: eval.c:828
-msgid "`break' outside a loop is not allowed"
-msgstr "'break' buiten een lus is niet toegestaan"
+#: eval.c:640
+msgid "`IGNORECASE' is a gawk extension"
+msgstr "`IGNORECASE' is een gawk-uitbreiding"
-#: eval.c:845
-msgid "`continue' outside a loop is not portable"
-msgstr "'continue' buiten een lus is niet overdraagbaar"
+#: eval.c:669
+msgid "`BINMODE' is a gawk extension"
+msgstr "`BINMODE' is een gawk-uitbreiding"
-#: eval.c:849
-msgid "`continue' outside a loop is not allowed"
-msgstr "'continue' buiten een lus is niet toegestaan"
+#: eval.c:727
+#, c-format
+msgid "BINMODE value `%s' is invalid, treated as 3"
+msgstr "BINMODE-waarde `%s' is onjuist, wordt behandeld als 3"
-#: eval.c:883
-msgid "`next' cannot be called from a BEGIN rule"
-msgstr "'next' kan niet aangeroepen worden in een BEGIN-regel"
+#: eval.c:817
+#, c-format
+msgid "bad `%sFMT' specification `%s'"
+msgstr "onjuiste opgave van `%sFMT': `%s'"
-#: eval.c:885
-msgid "`next' cannot be called from an END rule"
-msgstr "'next' kan niet aangeroepen worden in een END-regel"
+#: eval.c:895
+msgid "turning off `--lint' due to assignment to `LINT'"
+msgstr "`--lint' wordt uitgeschakeld wegens toewijzing aan `LINT'"
-#: eval.c:887
-#, fuzzy
-msgid "`next' cannot be called from a BEGINFILE rule"
-msgstr "'next' kan niet aangeroepen worden in een BEGIN-regel"
+#: eval.c:1067 eval.c:1544
+#, c-format
+msgid "can't use function name `%s' as variable or array"
+msgstr "kan functienaam `%s' niet als variabele of array gebruiken"
-#: eval.c:889
-#, fuzzy
-msgid "`next' cannot be called from an ENDFILE rule"
-msgstr "'next' kan niet aangeroepen worden in een END-regel"
+#: eval.c:1095
+msgid "assignment is not allowed to result of builtin function"
+msgstr ""
+"toewijzing aan het resultaat van een ingebouwde functie is niet toegestaan"
-#: eval.c:898
-msgid "`nextfile' cannot be called from a BEGIN rule"
-msgstr "'nextfile' kan niet aangeroepen worden in een BEGIN-regel"
+#: eval.c:1104 eval.c:1556 eval.c:1569
+#, c-format
+msgid "reference to uninitialized argument `%s'"
+msgstr "verwijzing naar ongeïnitialiseerd argument `%s'"
-#: eval.c:900
-msgid "`nextfile' cannot be called from an END rule"
-msgstr "'nextfile' kan niet aangeroepen worden in een END-regel"
+#: eval.c:1123
+msgid "attempt to field reference from non-numeric value"
+msgstr "veldverwijzingspoging via een waarde die geen getal is"
-#: eval.c:906
+#: eval.c:1125
#, fuzzy
-msgid "`nextfile' cannot be called from an ENDFILE rule"
-msgstr "'nextfile' kan niet aangeroepen worden in een END-regel"
+msgid "attempt to field reference from null string"
+msgstr "verwijzingspoging via een lege string"
-#: eval.c:963
-msgid "statement has no effect"
-msgstr "opdracht heeft geen effect"
+#: eval.c:1131
+#, fuzzy, c-format
+msgid "attempt to access field %ld"
+msgstr "toegangspoging tot veld %d"
-#: eval.c:1040 eval.c:2133
-#, c-format
-msgid "can't use function name `%s' as variable or array"
-msgstr "kan functienaam '%s' niet als variabele of array gebruiken"
+#: eval.c:1140
+#, fuzzy, c-format
+msgid "reference to uninitialized field `$%ld'"
+msgstr "verwijzing naar ongeïnitialiseerd veld `$%d'"
-#: eval.c:1047 eval.c:1053
+#: eval.c:1202
#, c-format
-msgid "reference to uninitialized argument `%s'"
-msgstr "verwijzing naar ongeïnitialiseerd argument '%s'"
+msgid "function `%s' called with more arguments than declared"
+msgstr "functie `%s' aangeroepen met meer argumenten dan gedeclareerd"
-#: eval.c:1062 eval.c:2142
+#: eval.c:1358
#, c-format
-msgid "reference to uninitialized variable `%s'"
-msgstr "verwijzing naar ongeïnitialiseerde variabele '%s'"
-
-#: eval.c:1210
-msgid ""
-"concatenation: side effects in one expression have changed the length of "
-"another!"
+msgid "unwind_stack: unexpected type `%s'"
msgstr ""
-"concatenation: neveneffecten in de ene expressie hebben de lengte van een "
-"andere veranderd!"
-#: eval.c:1315
+#: eval.c:1636
+#, fuzzy, c-format
+msgid "attempt to use scalar `%s' as an array"
+msgstr "scalair `%s' wordt gebruikt als array"
+
+#: eval.c:1680
msgid "assignment used in conditional context"
msgstr "toewijzing wordt gebruikt in een conditionele context"
-#: eval.c:1396
-msgid "division by zero attempted"
-msgstr "deling door nul"
-
-#: eval.c:1426 profile.c:663
-#, c-format
-msgid "illegal type (%s) in tree_eval"
-msgstr "ongeldig type (%s) in tree_eval()"
+#: eval.c:1684
+msgid "statement has no effect"
+msgstr "opdracht heeft geen effect"
-#: eval.c:1589
+#: eval.c:2028
msgid "division by zero attempted in `/='"
-msgstr "deling door nul in '/='"
+msgstr "deling door nul in `/='"
-#: eval.c:1611
+#: eval.c:2053
#, c-format
msgid "division by zero attempted in `%%='"
-msgstr "deling door nul in '%%='"
+msgstr "deling door nul in `%%='"
-#: eval.c:1891
-#, c-format
-msgid "function `%s' called with more arguments than declared"
-msgstr "functie '%s' aangeroepen met meer argumenten dan gedeclareerd"
-
-#: eval.c:1948
-#, c-format
-msgid "function `%s' not defined"
-msgstr "functie '%s' is niet gedefinieerd"
-
-#: eval.c:1950
-#, c-format
-msgid "identifier `%s' is not a function"
-msgstr ""
-
-#: eval.c:1997
-#, c-format
-msgid ""
-"function parameter `%s' is not a scalar and cannot be used for indirect "
-"function call"
-msgstr ""
-
-#: eval.c:2014
-#, c-format
-msgid "indirect call of real function `%s' is silly"
-msgstr ""
+#: eval.c:2139
+msgid "`continue' outside a loop is not allowed"
+msgstr "`continue' buiten een lus is niet toegestaan"
-#: eval.c:2034
-#, c-format
-msgid "function `%s' called indirectly through `%s' does not exist"
-msgstr ""
+#: eval.c:2145
+#, fuzzy
+msgid "`break' outside a loop is not allowed"
+msgstr "`break' buiten een lus is niet toegestaan"
-#: eval.c:2039
+#: eval.c:2229
#, c-format
-msgid "identifier `%s' cannot be used for indirect function call"
+msgid "for loop: array `%s' changed size from %ld to %ld during loop execution"
msgstr ""
+"for: array `%s' veranderde van grootte %ld naar %ld tijdens uitvoer van de "
+"lus"
-#: eval.c:2105
+#: eval.c:2342
#, c-format
-msgid ""
-"\n"
-"\t# Function Call Stack:\n"
-"\n"
+msgid "function called indirectly through `%s' does not exist"
msgstr ""
-"\n"
-"\t# Functieaanroepen-stack:\n"
-"\n"
-
-#: eval.c:2108
-#, c-format
-msgid "\t# -- main --\n"
-msgstr "\t# -- hoofd --\n"
-
-#: eval.c:2269
-msgid "attempt to field reference from non-numeric value"
-msgstr "veldverwijzingspoging via een waarde die geen getal is"
-
-#: eval.c:2271
-msgid "attempt to reference from null string"
-msgstr "verwijzingspoging via een lege string"
-#: eval.c:2277
+#: eval.c:2354
#, c-format
-msgid "attempt to access field %d"
-msgstr "toegangspoging tot veld %d"
-
-#: eval.c:2298 eval.c:2305 profile.c:843
-msgid "assignment is not allowed to result of builtin function"
-msgstr ""
-"toewijzing aan het resultaat van een ingebouwde functie is niet toegestaan"
+msgid "function `%s' not defined"
+msgstr "functie `%s' is niet gedefinieerd"
-#: eval.c:2369
-msgid "`IGNORECASE' is a gawk extension"
-msgstr "'IGNORECASE' is een gawk-uitbreiding"
+#: eval.c:2481
+#, fuzzy, c-format
+msgid "`nextfile' cannot be called from a `%s' rule"
+msgstr "`nextfile' kan niet aangeroepen worden in een END-regel"
-#: eval.c:2398
-msgid "`BINMODE' is a gawk extension"
-msgstr "'BINMODE' is een gawk-uitbreiding"
+#: eval.c:2540
+#, fuzzy, c-format
+msgid "`next' cannot be called from a `%s' rule"
+msgstr "`next' kan niet aangeroepen worden in een END-regel"
-#: eval.c:2456
+#: eval.c:2602
#, c-format
-msgid "BINMODE value `%s' is invalid, treated as 3"
+msgid "Sorry, don't know how to interpret `%s'"
msgstr ""
-#: eval.c:2546
-#, c-format
-msgid "bad `%sFMT' specification `%s'"
-msgstr "onjuiste opgave van '%sFMT': '%s'"
-
-#: eval.c:2624
-msgid "turning off `--lint' due to assignment to `LINT'"
-msgstr "'--lint' wordt uitgeschakeld wegens toewijzing aan 'LINT'"
-
-#: ext.c:61
-msgid "extensions not allowed in sandbox mode"
+#: ext.c:62
+msgid "extensions are not allowed in sandbox mode"
msgstr ""
-#: ext.c:65 ext.c:70
+#: ext.c:68 ext.c:73
msgid "`extension' is a gawk extension"
-msgstr "'extension' is een gawk-uitbreiding"
+msgstr "`extension' is een gawk-uitbreiding"
-#: ext.c:80
-#, c-format
-msgid "extension: cannot open `%s' (%s)\n"
-msgstr "extension: kan '%s' niet openen (%s)\n"
+#: ext.c:83
+#, fuzzy, c-format
+msgid "fatal: extension: cannot open `%s' (%s)\n"
+msgstr "extension: kan `%s' niet openen (%s)\n"
-#: ext.c:88
-#, c-format
-msgid "extension: library `%s': cannot call function `%s' (%s)\n"
-msgstr "extension: bibliotheek '%s': kan functie '%s' niet aanroepen (%s)\n"
+#: ext.c:93
+#, fuzzy, c-format
+msgid "fatal: extension: library `%s': cannot call function `%s' (%s)\n"
+msgstr "extension: bibliotheek `%s': kan functie `%s' niet aanroepen (%s)\n"
-#: ext.c:108
+#: ext.c:123
msgid "extension: missing function name"
msgstr "extension: ontbrekende functienaam"
-#: ext.c:113
+#: ext.c:128
#, c-format
msgid "extension: illegal character `%c' in function name `%s'"
-msgstr "extension: ongeldig teken '%c' in functienaam '%s'"
+msgstr "extension: ongeldig teken `%c' in functienaam `%s'"
-#: ext.c:119
+#: ext.c:137
#, c-format
msgid "extension: can't redefine function `%s'"
-msgstr "extension: kan functie '%s' niet herdefiniëren"
+msgstr "extension: kan functie `%s' niet herdefiniëren"
-#: ext.c:123
+#: ext.c:141
#, c-format
msgid "extension: function `%s' already defined"
-msgstr "extension: functie '%s' is al gedefinieerd"
+msgstr "extension: functie `%s' is al gedefinieerd"
-#: ext.c:128
+#: ext.c:146
#, c-format
-msgid "extension: can't use gawk built-in `%s' as function name"
-msgstr "extension: kan in gawk ingebouwde '%s' niet als functienaam gebruiken"
+msgid "extension: function name `%s' previously defined"
+msgstr "extension: functienaam `%s' is al eerder gedefinieerd"
-#: ext.c:130
+#: ext.c:148
#, c-format
-msgid "extension: function name `%s' previously defined"
-msgstr "extension: functienaam '%s' is al eerder gedefinieerd"
+msgid "extension: can't use gawk built-in `%s' as function name"
+msgstr "extension: kan in gawk ingebouwde `%s' niet als functienaam gebruiken"
-#: ext.c:207
+#: ext.c:152
#, c-format
+msgid "make_builtin: negative argument count for function `%s'"
+msgstr ""
+
+#: ext.c:255
+#, fuzzy, c-format
msgid "function `%s' defined to take no more than %d argument(s)"
msgstr ""
-"functie '%s' is gedefinieerd om niet meer dan %d argument(en) te accepteren"
+"functie `%s' is gedefinieerd om niet meer dan %d argument(en) te accepteren"
-#: ext.c:210
+#: ext.c:258
#, c-format
msgid "function `%s': missing argument #%d"
-msgstr "functie '%s': ontbrekend argument #%d"
+msgstr "functie `%s': ontbrekend argument #%d"
-#: ext.c:220
+#: ext.c:268
#, c-format
msgid "function `%s': argument #%d: attempt to use scalar as an array"
-msgstr "functie '%s': argument #%d: een scalair wordt gebruikt als array"
+msgstr "functie `%s': argument #%d: een scalair wordt gebruikt als array"
-#: ext.c:224
+#: ext.c:272
#, c-format
msgid "function `%s': argument #%d: attempt to use array as a scalar"
-msgstr "functie '%s': argument #%d: een array wordt gebruikt als scalair"
+msgstr "functie `%s': argument #%d: een array wordt gebruikt als scalair"
-#: ext.c:249
+#: ext.c:285
msgid "Operation Not Supported"
msgstr "Actie wordt niet ondersteund"
@@ -1129,617 +1076,613 @@ msgstr "Actie wordt niet ondersteund"
msgid "NF set to negative value"
msgstr "NF is op een negatieve waarde gezet"
-#: field.c:913
-msgid "split: second argument is not an array"
-msgstr "split: tweede argument is geen array"
-
-#: field.c:922 field.c:932 field.c:937
+#: field.c:939 field.c:946 field.c:950
#, fuzzy
msgid "split: fourth argument is a gawk extension"
msgstr "match: derde argument is een gawk-uitbreiding"
-#: field.c:928
+#: field.c:943
#, fuzzy
msgid "split: fourth argument is not an array"
msgstr "split: tweede argument is geen array"
-#: field.c:975
-#, fuzzy
-msgid "split: null string for third argument is a gawk extension"
+#: field.c:957
+msgid "split: second argument is not an array"
+msgstr "split: tweede argument is geen array"
+
+#: field.c:987
+msgid "split: null string for third arg is a gawk extension"
msgstr "split: lege string als derde argument is een gawk-uitbreiding"
-#: field.c:1032
+#: field.c:1028
#, fuzzy
-msgid "patsplit: second argument is not an array"
+msgid "patsplit: fourth argument is not an array"
msgstr "split: tweede argument is geen array"
-#: field.c:1041
+#: field.c:1033
#, fuzzy
-msgid "patsplit: fourth argument is not an array"
+msgid "patsplit: second argument is not an array"
msgstr "split: tweede argument is geen array"
-#: field.c:1067
+#: field.c:1051
#, fuzzy
msgid "patsplit: third argument must be non-null"
msgstr "match: derde argument is geen array"
-#: field.c:1111
+#: field.c:1084
msgid "`FIELDWIDTHS' is a gawk extension"
-msgstr "'FIELDWIDTHS' is een gawk-uitbreiding"
+msgstr "`FIELDWIDTHS' is een gawk-uitbreiding"
-#: field.c:1141 field.c:1155
+#: field.c:1147
#, c-format
msgid "invalid FIELDWIDTHS value, near `%s'"
-msgstr "ongeldige waarde voor FIELDWIDTHS, nabij '%s'"
+msgstr "ongeldige waarde voor FIELDWIDTHS, nabij `%s'"
-#: field.c:1238
+#: field.c:1220
msgid "null string for `FS' is a gawk extension"
-msgstr "een lege string als 'FS' is een gawk-uitbreiding"
+msgstr "een lege string als `FS' is een gawk-uitbreiding"
-#: field.c:1242
+#: field.c:1224
msgid "old awk does not support regexps as value of `FS'"
-msgstr "oude 'awk' staat geen reguliere expressies toe als waarde van 'FS'"
+msgstr "oude `awk' staat geen reguliere expressies toe als waarde van `FS'"
-#: field.c:1357
+#: field.c:1343
#, fuzzy
msgid "`FPAT' is a gawk extension"
-msgstr "'%s' is een gawk-uitbreiding"
+msgstr "`%s' is een gawk-uitbreiding"
#: getopt.c:574 getopt.c:590
#, fuzzy, c-format
msgid "%s: option '%s' is ambiguous\n"
-msgstr "%s: optie '%s' is niet eenduidig\n"
+msgstr "%s: optie `%s' is niet eenduidig\n"
#: getopt.c:623 getopt.c:627
#, fuzzy, c-format
msgid "%s: option '--%s' doesn't allow an argument\n"
-msgstr "%s: optie '--%s' staat geen argument toe\n"
+msgstr "%s: optie `--%s' staat geen argument toe\n"
#: getopt.c:636 getopt.c:641
#, fuzzy, c-format
msgid "%s: option '%c%s' doesn't allow an argument\n"
-msgstr "%s: optie '%c%s' staat geen argument toe\n"
+msgstr "%s: optie `%c%s' staat geen argument toe\n"
#: getopt.c:684 getopt.c:703
#, fuzzy, c-format
msgid "%s: option '--%s' requires an argument\n"
-msgstr "%s: optie '%s' vereist een argument\n"
+msgstr "%s: optie `%s' vereist een argument\n"
#: getopt.c:741 getopt.c:744
#, fuzzy, c-format
msgid "%s: unrecognized option '--%s'\n"
-msgstr "%s: onbekende optie '--%s'\n"
+msgstr "%s: onbekende optie `--%s'\n"
#: getopt.c:752 getopt.c:755
#, fuzzy, c-format
msgid "%s: unrecognized option '%c%s'\n"
-msgstr "%s: onbekende optie '%c%s'\n"
+msgstr "%s: onbekende optie `%c%s'\n"
#: getopt.c:804 getopt.c:807
#, fuzzy, c-format
msgid "%s: invalid option -- '%c'\n"
-msgstr "%s: ongeldige optie -- %c\n"
+msgstr "%s: ongeldige optie -- `%c'\n"
#: getopt.c:857 getopt.c:874 getopt.c:1082 getopt.c:1100
#, fuzzy, c-format
msgid "%s: option requires an argument -- '%c'\n"
-msgstr "%s: optie vereist een argument -- %c\n"
+msgstr "%s: optie vereist een argument -- `%c'\n"
#: getopt.c:930 getopt.c:946
#, fuzzy, c-format
msgid "%s: option '-W %s' is ambiguous\n"
-msgstr "%s: optie '-W %s' is niet eenduidig\n"
+msgstr "%s: optie `-W %s' is niet eenduidig\n"
#: getopt.c:970 getopt.c:988
#, fuzzy, c-format
msgid "%s: option '-W %s' doesn't allow an argument\n"
-msgstr "%s: optie '-W %s' staat geen argument toe\n"
+msgstr "%s: optie `-W %s' staat geen argument toe\n"
#: getopt.c:1009 getopt.c:1027
#, fuzzy, c-format
msgid "%s: option '-W %s' requires an argument\n"
-msgstr "%s: optie '%s' vereist een argument\n"
+msgstr "%s: optie `%s' vereist een argument\n"
-#: io.c:379
+#: io.c:272
#, c-format
msgid "command line argument `%s' is a directory: skipped"
msgstr ""
-#: io.c:413
+#: io.c:275 io.c:372
#, c-format
msgid "cannot open file `%s' for reading (%s)"
-msgstr "kan bestand '%s' niet openen om te lezen (%s)"
+msgstr "kan bestand `%s' niet openen om te lezen (%s)"
-#: io.c:459 io.c:2999
+#: io.c:419
#, c-format
msgid "error reading input file `%s': %s"
-msgstr "fout tijdens lezen van invoerbestand '%s': %s"
+msgstr "fout tijdens lezen van invoerbestand `%s': %s"
-#: io.c:506
+#: io.c:470
#, c-format
msgid "close of fd %d (`%s') failed (%s)"
msgstr "sluiten van bestandsdescriptor %d ('%s') is mislukt (%s)"
-#: io.c:617
-msgid "redirection not allowed in sandbox mode"
-msgstr ""
-
-#: io.c:648
-#, c-format
-msgid "invalid tree type %s in redirect()"
-msgstr "ongeldig boomtype %s in redirect()"
-
-#: io.c:654
+#: io.c:577
#, c-format
msgid "expression in `%s' redirection only has numeric value"
-msgstr "expressie in omleiding '%s' heeft alleen een getal als waarde"
+msgstr "expressie in omleiding `%s' heeft alleen een getal als waarde"
-#: io.c:660
+#: io.c:583
#, c-format
msgid "expression for `%s' redirection has null string value"
-msgstr "expressie voor omleiding '%s' heeft een lege string als waarde"
+msgstr "expressie voor omleiding `%s' heeft een lege string als waarde"
-#: io.c:665
+#: io.c:589
#, c-format
msgid "filename `%s' for `%s' redirection may be result of logical expression"
msgstr ""
-"bestandsnaam '%s' voor omleiding '%s' kan het resultaat zijn van een "
+"bestandsnaam `%s' voor omleiding `%s' kan het resultaat zijn van een "
"logische expressie"
-#: io.c:707
+#: io.c:628
#, c-format
msgid "unnecessary mixing of `>' and `>>' for file `%.*s'"
-msgstr "onnodige mix van '>' en '>>' voor bestand '%.*s'"
+msgstr "onnodige mix van `>' en `>>' voor bestand `%.*s'"
-#: io.c:754
+#: io.c:681
#, c-format
msgid "can't open pipe `%s' for output (%s)"
-msgstr "kan pijp '%s' niet openen voor uitvoer (%s)"
+msgstr "kan pijp `%s' niet openen voor uitvoer (%s)"
-#: io.c:763
+#: io.c:691
#, c-format
msgid "can't open pipe `%s' for input (%s)"
-msgstr "kan pijp '%s' niet openen voor invoer (%s)"
+msgstr "kan pijp `%s' niet openen voor invoer (%s)"
-#: io.c:786
+#: io.c:712
#, c-format
msgid "can't open two way pipe `%s' for input/output (%s)"
-msgstr "kan tweerichtings-pijp '%s' niet openen voor in- en uitvoer (%s)"
+msgstr "kan tweerichtings-pijp `%s' niet openen voor in- en uitvoer (%s)"
-#: io.c:864
+#: io.c:794
#, c-format
msgid "can't redirect from `%s' (%s)"
-msgstr "kan niet omleiden van '%s' (%s)"
+msgstr "kan niet omleiden van `%s' (%s)"
-#: io.c:867
+#: io.c:797
#, c-format
msgid "can't redirect to `%s' (%s)"
-msgstr "kan niet omleiden naar '%s' (%s)"
+msgstr "kan niet omleiden naar `%s' (%s)"
-#: io.c:920
+#: io.c:846
msgid ""
"reached system limit for open files: starting to multiplex file descriptors"
msgstr ""
"systeemgrens voor aantal open bestanden is bereikt: begonnen met multiplexen"
-#: io.c:936
+#: io.c:862
#, c-format
msgid "close of `%s' failed (%s)."
-msgstr "sluiten van '%s' is mislukt (%s)"
+msgstr "sluiten van `%s' is mislukt (%s)"
-#: io.c:944
+#: io.c:870
msgid "too many pipes or input files open"
msgstr "te veel pijpen of invoerbestanden geopend"
-#: io.c:967
+#: io.c:892
msgid "close: second argument must be `to' or `from'"
-msgstr "close: tweede argument moet 'to' of 'from' zijn"
+msgstr "close: tweede argument moet `to' of `from' zijn"
-#: io.c:981
+#: io.c:909
#, c-format
msgid "close: `%.*s' is not an open file, pipe or co-process"
-msgstr "close: '%.*s' is geen open bestand, pijp, of co-proces"
+msgstr "close: `%.*s' is geen open bestand, pijp, of co-proces"
-#: io.c:986
+#: io.c:914
msgid "close of redirection that was never opened"
msgstr "sluiten van een nooit-geopende omleiding"
-#: io.c:1083
+#: io.c:1011
#, c-format
msgid "close: redirection `%s' not opened with `|&', second argument ignored"
msgstr ""
-"close: omleiding '%s' is niet geopend met '|&'; tweede argument wordt "
+"close: omleiding `%s' is niet geopend met `|&'; tweede argument wordt "
"genegeerd"
-#: io.c:1099
+#: io.c:1027
#, c-format
msgid "failure status (%d) on pipe close of `%s' (%s)"
-msgstr "afsluitwaarde %d bij mislukte sluiting van pijp '%s' (%s)"
+msgstr "afsluitwaarde %d bij mislukte sluiting van pijp `%s' (%s)"
-#: io.c:1102
+#: io.c:1030
#, c-format
msgid "failure status (%d) on file close of `%s' (%s)"
-msgstr "afsluitwaarde %d bij mislukte sluiting van bestand '%s' (%s)"
+msgstr "afsluitwaarde %d bij mislukte sluiting van bestand `%s' (%s)"
-#: io.c:1122
+#: io.c:1050
#, c-format
msgid "no explicit close of socket `%s' provided"
-msgstr "geen expliciete sluiting van socket '%s' aangegeven"
+msgstr "geen expliciete sluiting van socket `%s' aangegeven"
-#: io.c:1125
+#: io.c:1053
#, c-format
msgid "no explicit close of co-process `%s' provided"
-msgstr "geen expliciete sluiting van co-proces '%s' aangegeven"
+msgstr "geen expliciete sluiting van co-proces `%s' aangegeven"
-#: io.c:1128
+#: io.c:1056
#, c-format
msgid "no explicit close of pipe `%s' provided"
-msgstr "geen expliciete sluiting van pijp '%s' aangegeven"
+msgstr "geen expliciete sluiting van pijp `%s' aangegeven"
-#: io.c:1131
+#: io.c:1059
#, c-format
msgid "no explicit close of file `%s' provided"
-msgstr "geen expliciete sluiting van bestand '%s' aangegeven"
+msgstr "geen expliciete sluiting van bestand `%s' aangegeven"
-#: io.c:1159 io.c:1214 main.c:832 main.c:874
+#: io.c:1087 io.c:1142 main.c:823 main.c:865
#, c-format
msgid "error writing standard output (%s)"
msgstr "fout tijdens schrijven van standaarduitvoer (%s)"
-#: io.c:1163 io.c:1219
+#: io.c:1091 io.c:1147
#, c-format
msgid "error writing standard error (%s)"
msgstr "fout tijdens schrijven van standaardfoutuitvoer (%s)"
-#: io.c:1171
+#: io.c:1099
#, c-format
msgid "pipe flush of `%s' failed (%s)."
-msgstr "leegmaken van pijp '%s' is mislukt (%s)"
+msgstr "leegmaken van pijp `%s' is mislukt (%s)"
-#: io.c:1174
+#: io.c:1102
#, c-format
msgid "co-process flush of pipe to `%s' failed (%s)."
-msgstr "leegmaken door co-proces van pijp naar '%s' is mislukt (%s)"
+msgstr "leegmaken door co-proces van pijp naar `%s' is mislukt (%s)"
-#: io.c:1177
+#: io.c:1105
#, c-format
msgid "file flush of `%s' failed (%s)."
-msgstr "leegmaken van bestand '%s' is mislukt (%s)"
+msgstr "leegmaken van bestand `%s' is mislukt (%s)"
-#: io.c:1292
+#: io.c:1219
#, c-format
msgid "local port %s invalid in `/inet'"
-msgstr "lokale poort %s is ongeldig in '/inet'"
+msgstr "lokale poort %s is ongeldig in `/inet'"
-#: io.c:1309
+#: io.c:1236
#, c-format
msgid "remote host and port information (%s, %s) invalid"
msgstr "host- en poortinformatie (%s, %s) zijn ongeldig"
-#: io.c:1344
+#: io.c:1276
msgid "/inet/raw client not ready yet, sorry"
-msgstr "cliënt van '/inet/raw' is nog niet klaar, sorry"
+msgstr "cliënt van `/inet/raw' is nog niet klaar, sorry"
-#: io.c:1347 io.c:1383
+#: io.c:1279 io.c:1320
msgid "only root may use `/inet/raw'."
-msgstr "Alleen root mag '/inet/raw' gebruiken."
+msgstr "Alleen root mag `/inet/raw' gebruiken."
-#: io.c:1381
+#: io.c:1318
msgid "/inet/raw server not ready yet, sorry"
-msgstr "server van '/inet/raw' is nog niet klaar, sorry"
+msgstr "server van `/inet/raw' is nog niet klaar, sorry"
-#: io.c:1477
+#: io.c:1417
#, c-format
msgid "no (known) protocol supplied in special filename `%s'"
-msgstr "geen (bekend) protocol aangegeven in speciale bestandsnaam '%s'"
+msgstr "geen (bekend) protocol aangegeven in speciale bestandsnaam `%s'"
-#: io.c:1491
+#: io.c:1431
#, c-format
msgid "special file name `%s' is incomplete"
-msgstr "speciale bestandsnaam '%s' is onvolledig"
+msgstr "speciale bestandsnaam `%s' is onvolledig"
-#: io.c:1506
+#: io.c:1447
msgid "must supply a remote hostname to `/inet'"
-msgstr "'/inet' heeft een gindse hostnaam nodig"
+msgstr "`/inet' heeft een gindse hostnaam nodig"
-#: io.c:1524
+#: io.c:1465
msgid "must supply a remote port to `/inet'"
-msgstr "'/inet' heeft een gindse poort nodig"
+msgstr "`/inet' heeft een gindse poort nodig"
-#: io.c:1570
+#: io.c:1511
msgid "TCP/IP communications are not supported"
msgstr "TCP/IP-communicatie wordt niet ondersteund"
-#: io.c:1758
+#: io.c:1698
#, c-format
msgid "could not open `%s', mode `%s'"
-msgstr "kan '%s' niet openen -- modus '%s'"
+msgstr "kan `%s' niet openen -- modus `%s'"
-#: io.c:1809
+#: io.c:1749
#, c-format
msgid "close of master pty failed (%s)"
msgstr "kan meester-pty van dochterproces niet sluiten (%s)"
-#: io.c:1811 io.c:1963 io.c:2114
+#: io.c:1751 io.c:1918 io.c:2075
#, c-format
msgid "close of stdout in child failed (%s)"
msgstr "kan standaarduitvoer van dochterproces niet sluiten (%s)"
-#: io.c:1814
+#: io.c:1754
#, c-format
msgid "moving slave pty to stdout in child failed (dup: %s)"
msgstr ""
"kan slaaf-pty niet overzetten naar standaarduitvoer van dochterproces (dup: %"
"s)"
-#: io.c:1816 io.c:1968
+#: io.c:1756 io.c:1923
#, c-format
msgid "close of stdin in child failed (%s)"
msgstr "kan standaardinvoer van dochterproces niet sluiten (%s)"
-#: io.c:1819
+#: io.c:1759
#, c-format
msgid "moving slave pty to stdin in child failed (dup: %s)"
msgstr ""
"kan slaaf-pty niet overzetten naar standaardinvoer van dochterproces (dup: %"
"s)"
-#: io.c:1821 io.c:1840
+#: io.c:1761 io.c:1782
#, c-format
msgid "close of slave pty failed (%s)"
msgstr "kan slaaf-pty niet sluiten (%s)"
-#: io.c:1914 io.c:1966 io.c:2095 io.c:2117
+#: io.c:1860 io.c:1921 io.c:2053 io.c:2078
#, c-format
msgid "moving pipe to stdout in child failed (dup: %s)"
msgstr ""
"kan pijp niet overzetten naar standaarduitvoer van dochterproces (dup: %s)"
-#: io.c:1918 io.c:1971
+#: io.c:1867 io.c:1926
#, c-format
msgid "moving pipe to stdin in child failed (dup: %s)"
msgstr ""
"kan pijp niet overzetten naar standaardinvoer van dochterproces (dup: %s)"
-#: io.c:1935 io.c:2108
+#: io.c:1887 io.c:2068
msgid "restoring stdout in parent process failed\n"
msgstr "kan standaarduitvoer van ouderproces niet herstellen\n"
-#: io.c:1940
+#: io.c:1895
msgid "restoring stdin in parent process failed\n"
msgstr "kan standaardinvoer van ouderproces niet herstellen\n"
-#: io.c:1974 io.c:2119 io.c:2130
+#: io.c:1929 io.c:2080 io.c:2094
#, c-format
msgid "close of pipe failed (%s)"
msgstr "kan pijp niet sluiten (%s)"
-#: io.c:2019
+#: io.c:1974
msgid "`|&' not supported"
-msgstr "'|&' wordt niet ondersteund"
+msgstr "`|&' wordt niet ondersteund"
-#: io.c:2085
+#: io.c:2040
#, c-format
msgid "cannot open pipe `%s' (%s)"
-msgstr "kan pijp '%s' niet openen (%s)"
+msgstr "kan pijp `%s' niet openen (%s)"
-#: io.c:2126
+#: io.c:2088
#, c-format
msgid "cannot create child process for `%s' (fork: %s)"
-msgstr "kan voor '%s' geen dochterproces starten (fork: %s)"
+msgstr "kan voor `%s' geen dochterproces starten (fork: %s)"
-#: io.c:2518
+#: io.c:2577
#, c-format
msgid "data file `%s' is empty"
-msgstr "databestand '%s' is leeg"
+msgstr "databestand `%s' is leeg"
-#: io.c:2560 io.c:2568
+#: io.c:2618 io.c:2626
msgid "could not allocate more input memory"
msgstr "kan geen extra invoergeheugen meer toewijzen"
-#: io.c:3125
+#: io.c:3173
msgid "multicharacter value of `RS' is a gawk extension"
-msgstr "een 'RS' van meerdere tekens is een gawk-uitbreiding"
+msgstr "een `RS' van meerdere tekens is een gawk-uitbreiding"
-#: main.c:313
+#: main.c:311
msgid "out of memory"
-msgstr ""
+msgstr "geen vrij geheugen"
-#: main.c:381
+#: main.c:388
msgid "`-m[fr]' option irrelevant in gawk"
-msgstr "optie '-m[fr]' is irrelevant in gawk"
+msgstr "optie `-m[fr]' is irrelevant in gawk"
-#: main.c:383
+#: main.c:390
msgid "-m option usage: `-m[fr] nnn'"
-msgstr "gebruikswijze van optie -m: '-m[fr] nnn'"
+msgstr "gebruikswijze van optie -m: `-m[fr] nnn'"
-#: main.c:419
+#: main.c:426
#, fuzzy
msgid "empty argument to `-e/--source' ignored"
-msgstr "argument van '--source' is leeg; genegeerd"
+msgstr "argument van `--source' is leeg; genegeerd"
-#: main.c:485
+#: main.c:492
#, c-format
msgid "%s: option `-W %s' unrecognized, ignored\n"
-msgstr "%s: optie '-W %s' is onbekend; genegeerd\n"
+msgstr "%s: optie `-W %s' is onbekend; genegeerd\n"
-#: main.c:530
+#: main.c:545
#, c-format
msgid "%s: option requires an argument -- %c\n"
msgstr "%s: optie vereist een argument -- %c\n"
-#: main.c:551
+#: main.c:566
msgid "environment variable `POSIXLY_CORRECT' set: turning on `--posix'"
-msgstr "omgevingsvariabele 'POSIXLY_CORRECT' is gezet: '--posix' ingeschakeld"
+msgstr "omgevingsvariabele `POSIXLY_CORRECT' is gezet: `--posix' ingeschakeld"
-#: main.c:557
+#: main.c:572
msgid "`--posix' overrides `--traditional'"
-msgstr "'--posix' overstijgt '--traditional'"
+msgstr "`--posix' overstijgt `--traditional'"
-#: main.c:568
+#: main.c:583
msgid "`--posix'/`--traditional' overrides `--non-decimal-data'"
-msgstr "'--posix'/'--traditional' overstijgen '--non-decimal-data'"
+msgstr "`--posix'/`--traditional' overstijgen `--non-decimal-data'"
-#: main.c:572
+#: main.c:587
#, c-format
msgid "running %s setuid root may be a security problem"
-msgstr "het uitvoeren van %s als 'setuid root' kan een veiligheidsrisico zijn"
+msgstr "het uitvoeren van %s als `setuid root' kan een veiligheidsrisico zijn"
-#: main.c:577
+#: main.c:592
#, fuzzy
msgid "`--posix' overrides `--binary'"
-msgstr "'--posix' overstijgt '--traditional'"
+msgstr "`--posix' overstijgt `--traditional'"
-#: main.c:622
+#: main.c:643
#, c-format
msgid "can't set binary mode on stdin (%s)"
msgstr "kan standaardinvoer niet in binaire modus plaatsen (%s)"
-#: main.c:625
+#: main.c:646
#, c-format
msgid "can't set binary mode on stdout (%s)"
msgstr "kan standaarduitvoer niet in binaire modus plaatsen (%s)"
-#: main.c:627
+#: main.c:648
#, c-format
msgid "can't set binary mode on stderr (%s)"
msgstr "kan standaardfoutuitvoer niet in binaire modus plaatsen (%s)"
-#: main.c:668
+#: main.c:687
msgid "no program text at all!"
msgstr "helemaal geen programmatekst!"
-#: main.c:773
+#: main.c:762
#, c-format
msgid "Usage: %s [POSIX or GNU style options] -f progfile [--] file ...\n"
msgstr "Gebruik: %s [opties] -f programmabestand [--] bestand...\n"
-#: main.c:775
+#: main.c:764
#, c-format
msgid "Usage: %s [POSIX or GNU style options] [--] %cprogram%c file ...\n"
msgstr ""
" of: %s [opties] [--] %cprogrammatekst%c bestand...\n"
"\n"
-#: main.c:780
+#: main.c:769
#, fuzzy
msgid "POSIX options:\t\tGNU long options: (standard)\n"
msgstr "\tPOSIX-opties:\t\t\tequivalente GNU-opties:\n"
-#: main.c:781
+#: main.c:770
msgid "\t-f progfile\t\t--file=progfile\n"
msgstr "\t-f programmabestand\t\t--file=programmabestand\n"
-#: main.c:782
+#: main.c:771
msgid "\t-F fs\t\t\t--field-separator=fs\n"
msgstr "\t-F veldscheidingsteken\t\t--field-separator=veldscheidingsteken\n"
-#: main.c:783
+#: main.c:772
msgid "\t-v var=val\t\t--assign=var=val\n"
msgstr "\t-v var=waarde\t\t\t--assign=var=waarde\n"
-#: main.c:784
+#: main.c:773
#, fuzzy
-msgid "POSIX options:\t\tGNU long options: (extensions)\n"
+msgid "Short options:\t\tGNU long options: (extensions)\n"
msgstr "\tPOSIX-opties:\t\t\tequivalente GNU-opties:\n"
-#: main.c:785
+#: main.c:774
msgid "\t-m[fr] val\n"
msgstr "\t-m[fr] waarde\n"
-#: main.c:786
+#: main.c:775
msgid "\t-b\t\t\t--characters-as-bytes\n"
msgstr ""
-#: main.c:787
-msgid "\t-c\t\t\t--compat, --traditional\n"
-msgstr ""
+#: main.c:776
+#, fuzzy
+msgid "\t-c\t\t\t--traditional\n"
+msgstr "\t-W traditional\t\t\t--traditional\n"
-#: main.c:788
+#: main.c:777
#, fuzzy
-msgid "\t-C\t\t\t--copyleft, --copyright\n"
+msgid "\t-C\t\t\t--copyright\n"
msgstr "\t-W copyright\t\t\t--copyright\n"
-#: main.c:789
+#: main.c:778
#, fuzzy
msgid "\t-d [file]\t\t--dump-variables[=file]\n"
msgstr "\t-W dump-variables[=bestand]\t--dump-variables[=bestand]\n"
-#: main.c:790
+#: main.c:779
#, fuzzy
msgid "\t-e 'program-text'\t--source='program-text'\n"
msgstr "\t-W source=programmatekst\t--source=programmatekst\n"
-#: main.c:791
+#: main.c:780
#, fuzzy
msgid "\t-E file\t\t\t--exec=file\n"
msgstr "\t-W exec=bestand\t\t\t--exec=bestand\n"
-#: main.c:792
+#: main.c:781
#, fuzzy
msgid "\t-g\t\t\t--gen-pot\n"
msgstr "\t-W gen-po\t\t\t--gen-po\n"
-#: main.c:793
+#: main.c:782
#, fuzzy
-msgid "\t-h\t\t\t--help, --usage\n"
+msgid "\t-h\t\t\t--help\n"
msgstr "\t-W help\t\t\t\t--help\n"
-#: main.c:794
+#: main.c:783
#, fuzzy
-msgid "\t-l [fatal]\t\t--lint[=fatal]\n"
+msgid "\t-L [fatal]\t\t--lint[=fatal]\n"
msgstr "\t-W lint[=fatal]\t\t\t--lint[=fatal]\n"
-#: main.c:795
-#, fuzzy
-msgid "\t-L\t\t\t--lint-old\n"
-msgstr "\t-W lint-old\t\t\t--lint-old\n"
-
-#: main.c:796
+#: main.c:784
#, fuzzy
msgid "\t-n\t\t\t--non-decimal-data\n"
msgstr "\t-W non-decimal-data\t\t--non-decimal-data\n"
-#: main.c:797
+#: main.c:785
#, fuzzy
msgid "\t-N\t\t\t--use-lc-numeric\n"
msgstr "\t-W use-lc-numeric\t\t--use-lc-numeric\n"
-#: main.c:798
+#: main.c:786
msgid "\t-O\t\t\t--optimize\n"
-msgstr ""
+msgstr "\t-O\t\t\t--optimize\n"
-#: main.c:799
+#: main.c:787
#, fuzzy
msgid "\t-p [file]\t\t--profile[=file]\n"
msgstr "\t-W profile[=bestand]\t\t--profile[=bestand]\n"
-#: main.c:800
+#: main.c:788
#, fuzzy
msgid "\t-P\t\t\t--posix\n"
msgstr "\t-W posix\t\t\t--posix\n"
-#: main.c:801
+#: main.c:789
#, fuzzy
msgid "\t-r\t\t\t--re-interval\n"
msgstr "\t-W re-interval\t\t\t--re-interval\n"
-#: main.c:802
+#: main.c:791
#, fuzzy
+msgid "\t-R file\t\t\t--command=file\n"
+msgstr "\t-W exec=bestand\t\t\t--exec=bestand\n"
+
+#: main.c:792
msgid "\t-S\t\t\t--sandbox\n"
-msgstr "\t-W posix\t\t\t--posix\n"
+msgstr ""
+
+#: main.c:793
+#, fuzzy
+msgid "\t-t\t\t\t--lint-old\n"
+msgstr "\t-W lint-old\t\t\t--lint-old\n"
-#: main.c:803
+#: main.c:794
#, fuzzy
msgid "\t-V\t\t\t--version\n"
msgstr "\t-W version\t\t\t--version\n"
-#: main.c:805
+#: main.c:796
msgid "\t-W nostalgia\t\t--nostalgia\n"
msgstr "\t-W nostalgia\t\t\t--nostalgia\n"
-#: main.c:808
-msgid "\t-W parsedebug\t\t--parsedebug\n"
+#: main.c:799
+#, fuzzy
+msgid "\t-Y\t\t--parsedebug\n"
msgstr "\t-W parsedebug\t\t\t--parsedebug\n"
#. TRANSLATORS: --help output 5 (end)
@@ -1747,7 +1690,7 @@ msgstr "\t-W parsedebug\t\t\t--parsedebug\n"
#. for this application. Please add _another line_ with the
#. address for translation bugs.
#. no-wrap
-#: main.c:817
+#: main.c:808
msgid ""
"\n"
"To report bugs, see node `Bugs' in `gawk.info', which is\n"
@@ -1755,32 +1698,33 @@ msgid ""
"\n"
msgstr ""
"\n"
-"Voor het rapporteren van programmagebreken, zie 'info gawk bugs'\n"
-"of de sectie 'Reporting Problems and Bugs' in de gedrukte versie.\n"
+"Voor het rapporteren van programmagebreken, zie `info gawk bugs'\n"
+"of de sectie `Reporting Problems and Bugs' in de gedrukte versie.\n"
"Meld fouten in de vertaling aan <vertaling@vrijschrift.org>.\n"
"\n"
-#: main.c:821
+#: main.c:812
msgid ""
"gawk is a pattern scanning and processing language.\n"
"By default it reads standard input and writes standard output.\n"
"\n"
msgstr ""
-"'gawk' is een patroonherkennings- en bewerkingsprogramma.\n"
+"`gawk' is een patroonherkennings- en bewerkingsprogramma.\n"
"Standaard leest het van standaardinvoer en schrijft naar standaarduitvoer.\n"
"\n"
-#: main.c:825
+#: main.c:816
+#, fuzzy
msgid ""
"Examples:\n"
"\tgawk '{ sum += $1 }; END { print sum }' file\n"
"\tgawk -F: '{ print $1 }' /etc/passwd\n"
msgstr ""
"Voorbeelden:\n"
-"\tgawk '{ som += $1 }; END { print som }' bestand\n"
-"\tgawk -F: '{ print $1 }' /etc/passwd\n"
+"\tgawk `{ som += $1 }; END { print som }' bestand\n"
+"\tgawk -F: `{ print $1 }' /etc/passwd\n"
-#: main.c:845
+#: main.c:836
#, c-format
msgid ""
"Copyright (C) 1989, 1991-%d Free Software Foundation.\n"
@@ -1798,7 +1742,7 @@ msgstr ""
"uitgegeven door de Free Software Foundation, naar keuze ofwel onder\n"
"versie 3 of onder een nieuwere versie van die licentie.\n"
-#: main.c:853
+#: main.c:844
msgid ""
"This program is distributed in the hope that it will be useful,\n"
"but WITHOUT ANY WARRANTY; without even the implied warranty of\n"
@@ -1812,7 +1756,7 @@ msgstr ""
"Zie de GNU General Public License voor meer details.\n"
"\n"
-#: main.c:864
+#: main.c:855
msgid ""
"You should have received a copy of the GNU General Public License\n"
"along with this program. If not, see http://www.gnu.org/licenses/.\n"
@@ -1821,192 +1765,158 @@ msgstr ""
"ontvangen te hebben; is dit niet het geval, dan kunt u deze licentie\n"
"ook vinden op http://www.gnu.org/licenses/.\n"
-#: main.c:899
+#: main.c:890
msgid "-Ft does not set FS to tab in POSIX awk"
msgstr "-Ft maakt van FS geen tab in POSIX-awk"
-#: main.c:1116
+#: main.c:1122
#, c-format
msgid "unknown value for field spec: %d\n"
msgstr ""
-#: main.c:1176
+#: main.c:1182
#, c-format
msgid ""
"%s: `%s' argument to `-v' not in `var=value' form\n"
"\n"
msgstr ""
-"%s: argument '%s' van '-v' is niet van de vorm 'var=waarde'\n"
+"%s: argument `%s' van `-v' is niet van de vorm `var=waarde'\n"
"\n"
-#: main.c:1196
+#: main.c:1202
#, c-format
msgid "`%s' is not a legal variable name"
-msgstr "'%s' is geen geldige variabelenaam"
+msgstr "`%s' is geen geldige variabelenaam"
-#: main.c:1199
+#: main.c:1205
#, c-format
msgid "`%s' is not a variable name, looking for file `%s=%s'"
-msgstr "'%s' is geen variabelenaam, zoekend naar bestand '%s=%s'"
+msgstr "`%s' is geen variabelenaam, zoekend naar bestand `%s=%s'"
-#: main.c:1238
+#: main.c:1258
msgid "floating point exception"
msgstr "drijvende-komma-berekeningsfout"
-#: main.c:1245
+#: main.c:1265
msgid "fatal error: internal error"
msgstr "fatale fout: **interne fout**"
-#: main.c:1260
-#, fuzzy
+#: main.c:1280
msgid "fatal error: internal error: segfault"
-msgstr "fatale fout: **interne fout**"
+msgstr "fatale fout: **interne fout**: segmentatiefout"
-#: main.c:1272
-#, fuzzy
+#: main.c:1292
msgid "fatal error: internal error: stack overflow"
-msgstr "fatale fout: **interne fout**"
+msgstr "fatale fout: **interne fout**: stack is vol"
-#: main.c:1322
+#: main.c:1342
#, c-format
msgid "no pre-opened fd %d"
msgstr "geen reeds-geopende bestandsdescriptor %d"
-#: main.c:1329
+#: main.c:1349
#, c-format
msgid "could not pre-open /dev/null for fd %d"
msgstr "kan /dev/null niet openen voor bestandsdescriptor %d"
-#: main.c:1352 main.c:1361
+#: main.c:1372 main.c:1381
#, c-format
msgid "could not find groups: %s"
msgstr "kan groepen niet vinden: %s"
-#: msg.c:54
+#: msg.c:62
#, c-format
msgid "cmd. line:"
msgstr "commandoregel:"
-#: msg.c:120
+#: msg.c:97
msgid "warning: "
msgstr "waarschuwing: "
-#: msg.c:142
+#: msg.c:106
msgid "error: "
msgstr "fout: "
-#: msg.c:178
+#: msg.c:129
msgid "fatal: "
msgstr "fataal: "
-#: node.c:63 node.c:78 node.c:105 node.c:121 node.c:151
-msgid "can't convert string to float"
-msgstr "kan string niet converteren naar drijvende-komma-getal"
-
-#: node.c:465
+#: node.c:401
msgid "backslash at end of string"
msgstr "backslash aan het einde van de string"
-#: node.c:609
+#: node.c:502
#, c-format
msgid "old awk does not support the `\\%c' escape sequence"
-msgstr "oude 'awk' kent de stuurcodereeks '\\%c' niet"
+msgstr "oude `awk' kent de stuurcodereeks `\\%c' niet"
-#: node.c:660
+#: node.c:553
msgid "POSIX does not allow `\\x' escapes"
-msgstr "POSIX staat stuurcode '\\x' niet toe"
+msgstr "POSIX staat stuurcode `\\x' niet toe"
-#: node.c:666
+#: node.c:559
msgid "no hex digits in `\\x' escape sequence"
-msgstr "geen hex cijfers in stuurcodereeks '\\x'"
+msgstr "geen hex cijfers in stuurcodereeks `\\x'"
-#: node.c:688
+#: node.c:581
#, c-format
msgid ""
"hex escape \\x%.*s of %d characters probably not interpreted the way you "
"expect"
msgstr ""
+"hexadecimale stuurcode \\x%.*s van %d tekens wordt waarschijnlijk niet "
+"afgehandeld zoals verwacht"
-#: node.c:703
+#: node.c:596
#, c-format
msgid "escape sequence `\\%c' treated as plain `%c'"
-msgstr "stuurcodereeks '\\%c' behandeld als normale '%c'"
+msgstr "stuurcodereeks `\\%c' behandeld als normale `%c'"
+
+#: node.c:737
+msgid ""
+"Invalid multibyte data detected. There may be a mismatch between your data "
+"and your locale."
+msgstr ""
#: posix/gawkmisc.c:172
#, c-format
msgid "%s %s `%s': could not set close-on-exec: (fcntl: %s)"
-msgstr "%s %s '%s': kan close-on-exec niet activeren: (fcntl: %s)"
+msgstr "%s %s `%s': kan close-on-exec niet activeren: (fcntl: %s)"
-#: profile.c:94
+#: profile.c:83
#, c-format
msgid "could not open `%s' for writing: %s"
-msgstr "kan '%s' niet openen om te schrijven: %s"
+msgstr "kan `%s' niet openen om te schrijven: %s"
-#: profile.c:457
-#, c-format
-msgid "internal error: %s with null vname"
-msgstr "**interne fout**: %s heeft een lege vname"
-
-#: profile.c:522
-msgid "# treated internally as `delete'"
-msgstr "# wordt intern behandeld als 'delete'"
-
-#: profile.c:1076
-#, c-format
-msgid "# this is a dynamically loaded extension function"
-msgstr "# dit is een dynamisch geladen uitbreidingsfunctie"
-
-#: profile.c:1109
-#, c-format
-msgid "\t# gawk profile, created %s\n"
-msgstr "\t# gawk-profiel, gemaakt %s\n"
-
-#: profile.c:1112
-#, c-format
-msgid ""
-"\t# BEGIN block(s)\n"
-"\n"
-msgstr ""
-"\t# BEGIN-blok(ken)\n"
-"\n"
-
-#: profile.c:1122
+#: profile.c:203
#, fuzzy, c-format
msgid ""
-"\t# BEGINFILE block(s)\n"
+"\t# %s block(s)\n"
"\n"
msgstr ""
-"\t# BEGIN-blok(ken)\n"
+"\t# END-blok(ken)\n"
"\n"
-#: profile.c:1132
-#, c-format
+#: profile.c:208
+#, fuzzy, c-format
msgid ""
-"\t# Rule(s)\n"
+"\t# %s(s)\n"
"\n"
msgstr ""
"\t# Regel(s)\n"
"\n"
-#: profile.c:1138
-#, fuzzy, c-format
-msgid ""
-"\t# ENDFILE block(s)\n"
-"\n"
-msgstr ""
-"\t# END-blok(ken)\n"
-"\n"
+#: profile.c:278
+#, c-format
+msgid "internal error: %s with null vname"
+msgstr "**interne fout**: %s heeft een lege `vname'"
-#: profile.c:1148
+#: profile.c:945
#, c-format
-msgid ""
-"\t# END block(s)\n"
-"\n"
-msgstr ""
-"\t# END-blok(ken)\n"
-"\n"
+msgid "\t# gawk profile, created %s\n"
+msgstr "\t# gawk-profiel, gemaakt %s\n"
-#: profile.c:1168
+#: profile.c:1328
#, c-format
msgid ""
"\n"
@@ -2015,17 +1925,12 @@ msgstr ""
"\n"
"\t# Functies, alfabetisch geordend\n"
-#: profile.c:1431
+#: profile.c:1367
#, c-format
-msgid "unexpected type %s in prec_level"
-msgstr "onverwacht type %s in prec_level"
-
-#: profile.c:1557
-#, fuzzy, c-format
-msgid "Unknown node type %s in pp_var"
-msgstr "onbekend nodetype %d"
+msgid "redir2str: unknown redirection type %d"
+msgstr ""
-#: re.c:537
+#: re.c:559
#, c-format
msgid "regexp component `%.*s' should probably be `[%.*s]'"
msgstr ""
@@ -2098,18 +2003,40 @@ msgstr "Reguliere expressie is te groot"
msgid "Unmatched ) or \\)"
msgstr "Ongepaarde ) of \\)"
-#: regcomp.c:699
+#: regcomp.c:701
msgid "No previous regular expression"
msgstr "Geen eerdere reguliere expressie"
-#~ msgid "%s: illegal option -- %c\n"
-#~ msgstr "%s: ongeldige optie -- %c\n"
+#~ msgid "call of `length' without parentheses is deprecated by POSIX"
+#~ msgstr "aanroep van `length' zonder haakjes wordt door POSIX afgeraden"
+
+#, fuzzy
+#~ msgid "reference to uninitialized field `$%s'"
+#~ msgstr "verwijzing naar ongeïnitialiseerd veld `$%d'"
+
+#~ msgid "can't convert string to float"
+#~ msgstr "kan string niet converteren naar drijvende-komma-getal"
+
+#~ msgid "`continue' outside a loop is not portable"
+#~ msgstr "`continue' buiten een lus is niet overdraagbaar"
+
+#~ msgid "`break' outside a loop is not portable"
+#~ msgstr "`break' buiten een lus is niet overdraagbaar"
+
+#~ msgid "`nextfile' cannot be called from a BEGIN rule"
+#~ msgstr "`nextfile' kan niet aangeroepen worden in een BEGIN-regel"
+
+#~ msgid "`next' cannot be called from a BEGIN rule"
+#~ msgstr "`next' kan niet aangeroepen worden in een BEGIN-regel"
#~ msgid "file `%s' is a directory"
-#~ msgstr "'%s' is een map"
+#~ msgstr "`%s' is een map"
-#~ msgid "can't open two way socket `%s' for input/output (%s)"
-#~ msgstr "kan tweerichtings-socket '%s' niet openen voor in- en uitvoer (%s)"
+#~ msgid "use `PROCINFO[\"%s\"]' instead of `%s'"
+#~ msgstr "gebruik `PROCINFO[\"%s\"]' in plaats van `%s'"
+
+#~ msgid "use `PROCINFO[...]' instead of `/dev/user'"
+#~ msgstr "gebruik `PROCINFO[...]' in plaats van `/dev/user'"
#~ msgid "\t-W compat\t\t--compat\n"
#~ msgstr "\t-W compat\t\t\t--compat\n"
@@ -2117,30 +2044,121 @@ msgstr "Geen eerdere reguliere expressie"
#~ msgid "\t-W copyleft\t\t--copyleft\n"
#~ msgstr "\t-W copyleft\t\t\t--copyleft\n"
-#~ msgid "\t-W traditional\t\t--traditional\n"
-#~ msgstr "\t-W traditional\t\t\t--traditional\n"
-
#~ msgid "\t-W usage\t\t--usage\n"
#~ msgstr "\t-W usage\t\t\t--usage\n"
-#, fuzzy
-#~ msgid "seek: invalid arguments"
-#~ msgstr "printf: geen argumenten"
+#~ msgid ""
+#~ "\t# BEGIN block(s)\n"
+#~ "\n"
+#~ msgstr ""
+#~ "\t# BEGIN-blok(ken)\n"
+#~ "\n"
-#, fuzzy
-#~ msgid "seek: `%.*s' is not an open file, pipe, or co-process"
-#~ msgstr "close: '%.*s' is geen open bestand, pijp, of co-proces"
+#~ msgid "must use `count$' on all formats or none"
+#~ msgstr "`count$' hoort in alle opmaken gebruikt te worden, of in geen"
+
+#~ msgid "field width is ignored for `%%%%' specifier"
+#~ msgstr "veldbreedte wordt genegeerd voor aanduiding `%%%%'"
+
+#~ msgid "precision is ignored for `%%%%' specifier"
+#~ msgstr "veldprecisie wordt genegeerd voor aanduiding `%%%%'"
+
+#~ msgid "field width and precision are ignored for `%%%%' specifier"
+#~ msgstr "veldbreedte en -precisie worden genegeerd voor aanduiding `%%%%'"
+
+#~ msgid "`$' is not permitted in awk formats"
+#~ msgstr "`$' is niet toegestaan in awk-opmaak"
+
+#~ msgid "arg count with `$' must be > 0"
+#~ msgstr "het aantal argumenten met `$' moet > 0 zijn"
+
+#~ msgid "arg count %ld greater than total number of supplied arguments"
+#~ msgstr "argumentental %ld is groter dan het gegeven aantal argumenten"
+
+#~ msgid "`$' not permitted after period in format"
+#~ msgstr "`$' is niet toegestaan na een punt in de opmaak"
+
+#~ msgid "no `$' supplied for positional field width or precision"
+#~ msgstr "geen `$' opgegeven bij positionele veldbreedte of -precisie"
+
+#~ msgid "`l' is meaningless in awk formats; ignored"
+#~ msgstr "`l' is betekenisloos in awk-opmaak; genegeerd"
+
+#~ msgid "`l' is not permitted in POSIX awk formats"
+#~ msgstr "`l' is niet toegestaan in POSIX awk-opmaak"
+
+#~ msgid "`L' is meaningless in awk formats; ignored"
+#~ msgstr "`L' is betekenisloos in awk-opmaak; genegeerd"
+
+#~ msgid "`L' is not permitted in POSIX awk formats"
+#~ msgstr "`L' is niet toegestaan in POSIX awk-opmaak"
+
+#~ msgid "`h' is meaningless in awk formats; ignored"
+#~ msgstr "`h' is betekenisloos in awk-opmaak; genegeerd"
+
+#~ msgid "`h' is not permitted in POSIX awk formats"
+#~ msgstr "`h' is niet toegestaan in POSIX awk-opmaak"
+
+#~ msgid "[s]printf: value %g is out of range for `%%%c' format"
+#~ msgstr ""
+#~ "[s]printf: waarde %g ligt buiten toegestaan bereik voor opmaak `%%%c'"
+
+#~ msgid ""
+#~ "ignoring unknown format specifier character `%c': no argument converted"
+#~ msgstr ""
+#~ "onbekend aanduidingskarakter `%c' wordt genegeerd: geen argument wordt "
+#~ "geconverteerd"
+
+#~ msgid "not enough arguments to satisfy format string"
+#~ msgstr "niet genoeg argumenten voor opmaakstring"
+
+#~ msgid "^ ran out for this one"
+#~ msgstr "niet genoeg ^ voor deze"
+
+#~ msgid "[s]printf: format specifier does not have control letter"
+#~ msgstr "[s]printf: opmaakaanduiding mist een stuurletter"
+
+#~ msgid "too many arguments supplied for format string"
+#~ msgstr "te veel argumenten voor opmaakstring"
#, fuzzy
-#~ msgid "seek: `%.*s' is not an input file, pipe, or co-process"
-#~ msgstr "close: '%.*s' is geen open bestand, pijp, of co-proces"
+#~ msgid "attempt to use array parameter `%s' in a scalar context"
+#~ msgstr "array `%s' wordt gebruikt in een scalaire context"
+
+#~ msgid "can't open two way socket `%s' for input/output (%s)"
+#~ msgstr "kan tweerichtings-socket `%s' niet openen voor in- en uitvoer (%s)"
+
+#~ msgid "length: untyped argument will be forced to scalar"
+#~ msgstr "lengte: typeloos argument wordt omgezet naar scalair"
+
+#~ msgid ""
+#~ "concatenation: side effects in one expression have changed the length of "
+#~ "another!"
+#~ msgstr ""
+#~ "concatenation: neveneffecten in de ene expressie hebben de lengte van een "
+#~ "andere veranderd!"
+
+#~ msgid "illegal type (%s) in tree_eval"
+#~ msgstr "ongeldig type (%s) in tree_eval()"
+
+#~ msgid "\t# -- main --\n"
+#~ msgstr "\t# -- hoofd --\n"
+
+#~ msgid "invalid tree type %s in redirect()"
+#~ msgstr "ongeldig boomtype %s in redirect()"
#, fuzzy
-#~ msgid "seek: `%.*s' is not a regular file"
-#~ msgstr "'%s' is geen geldige variabelenaam"
+#~ msgid "# treated internally as `delete'"
+#~ msgstr "# wordt intern behandeld als `delete"
-#~ msgid "use `PROCINFO[\"%s\"]' instead of `%s'"
-#~ msgstr "gebruik 'PROCINFO[\"%s\"]' in plaats van '%s'"
+#~ msgid "# this is a dynamically loaded extension function"
+#~ msgstr "# dit is een dynamisch geladen uitbreidingsfunctie"
-#~ msgid "use `PROCINFO[...]' instead of `/dev/user'"
-#~ msgstr "gebruik 'PROCINFO[...]' in plaats van '/dev/user'"
+#~ msgid "unexpected type %s in prec_level"
+#~ msgstr "onverwacht type %s in prec_level"
+
+#~ msgid "Unknown node type %s in pp_var"
+#~ msgstr "onbekend knooptype %s in pp_var"
+
+#~ msgid "%s: illegal option -- %c\n"
+#~ msgstr "%s: ongeldige optie -- %c\n"
diff --git a/po/pl.gmo b/po/pl.gmo
index dc739257..c59e9de3 100644
--- a/po/pl.gmo
+++ b/po/pl.gmo
Binary files differ
diff --git a/po/pl.po b/po/pl.po
index 593443a8..89e37d45 100644
--- a/po/pl.po
+++ b/po/pl.po
@@ -1,1771 +1,1714 @@
# Polish translations for GNU AWK package.
-# Copyright (C) 2003, 2004, 2005, 2007 Free Software Foundation, Inc.
-# Wojciech Polak <polak@gnu.org>, 2003, 2004, 2005, 2007.
+# Copyright (C) 2003, 2004, 2005, 2007, 2008, 2009 Free Software Foundation, Inc.
+# This file is distributed under the same license as the gawk package.
+#
+# Wojciech Polak <polak@gnu.org>, 2003, 2004, 2005, 2007, 2008, 2009.
# additional help by Sergey Poznyakoff <gray@gnu.org>, 2003.
#
msgid ""
msgstr ""
-"Project-Id-Version: gawk 3.1.5f\n"
+"Project-Id-Version: gawk 3.1.6d\n"
"Report-Msgid-Bugs-To: arnold@skeeve.com\n"
-"POT-Creation-Date: 2010-11-12 12:20+0200\n"
-"PO-Revision-Date: 2007-08-17 20:05+0200\n"
+"POT-Creation-Date: 2010-11-17 08:48+0200\n"
+"PO-Revision-Date: 2009-06-20 13:32+0200\n"
"Last-Translator: Wojciech Polak <polak@gnu.org>\n"
"Language-Team: Polish <translation-team-pl@lists.sourceforge.net>\n"
"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=ISO-8859-2\n"
+"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 "
"|| n%100>=20) ? 1 : 2);\n"
-#: array.c:112
+#: array.c:103
+#, c-format
+msgid "from %s"
+msgstr "od %s"
+
+#: array.c:267
+#, fuzzy
+msgid "attempt to use a scalar value as array"
+msgstr "próba użycia skalaru `%s' jako tablicy"
+
+#: array.c:270
#, c-format
msgid "attempt to use function `%s' as an array"
msgstr "próba użycia funkcji `%s' jako tablicy"
-#: array.c:115
+#: array.c:273
#, c-format
msgid "attempt to use scalar parameter `%s' as an array"
msgstr "próba użycia parametru `%s' skalaru jako tablicy"
-#: array.c:118
+#: array.c:276
#, c-format
msgid "attempt to use scalar `%s' as array"
msgstr "próba użycia skalaru `%s' jako tablicy"
-#: array.c:156
+#: array.c:321 array.c:648 eval.c:1075 eval.c:1079 eval.c:1581 eval.c:1649
+#: eval.c:1928
#, c-format
-msgid "from %s"
-msgstr "od %s"
+msgid "attempt to use array `%s' in a scalar context"
+msgstr "próba użycia tablicy `%s' w kontekście skalaru"
-#: array.c:513
+#: array.c:570
#, fuzzy, c-format
msgid "reference to uninitialized element `%s[\"%.*s\"]'"
msgstr "odwołanie do niezainicjowanego elementu `%s[\"%s\"]'"
-#: array.c:519
+#: array.c:576
#, c-format
msgid "subscript of array `%s' is null string"
msgstr "indeks tablicy `%s' jest zerowym łańcuchem"
-#: array.c:623
+#: array.c:684
#, c-format
msgid "delete: index `%s' not in array `%s'"
msgstr "delete: indeks `%s' nie jest w tablicy `%s'"
-#: array.c:792
+#: array.c:705
+#, fuzzy, c-format
+msgid "attempt to use scalar `%s[\"%.*s\"]' as an array"
+msgstr "próba użycia skalaru `%s' jako tablicy"
+
+#: array.c:868
#, c-format
msgid "%s: empty (null)\n"
msgstr "%s: pusty (null)\n"
-#: array.c:797
+#: array.c:873
#, c-format
msgid "%s: empty (zero)\n"
msgstr "%s: pusty (zero)\n"
-#: array.c:801
+#: array.c:877
#, c-format
msgid "%s: table_size = %d, array_size = %d\n"
msgstr "%s: table_size = %d, array_size = %d\n"
-#: array.c:830
+#: array.c:912
#, c-format
msgid "%s: is parameter\n"
msgstr "%s: jest parametrem\n"
-#: array.c:835
+#: array.c:916
#, c-format
msgid "%s: array_ref to %s\n"
msgstr "%s: array_ref do %s\n"
-#: awkgram.y:224 awkgram.y:227
+#: array.c:921
+#, fuzzy
+msgid "adump: argument not an array"
+msgstr "asort: pierwszy argument nie jest tablicÄ…"
+
+#: array.c:1139
+#, fuzzy
+msgid "attempt to use array in a scalar context"
+msgstr "próba użycia tablicy `%s' w kontekście skalaru"
+
+#: array.c:1236
+#, fuzzy
+msgid "asort: second argument not an array"
+msgstr "asort: drugi argument nie jest tablicÄ…"
+
+#: array.c:1237
+#, fuzzy
+msgid "asorti: second argument not an array"
+msgstr "asort: drugi argument nie jest tablicÄ…"
+
+#: array.c:1245
+#, fuzzy
+msgid "asort: first argument not an array"
+msgstr "asort: pierwszy argument nie jest tablicÄ…"
+
+#: array.c:1246
+#, fuzzy
+msgid "asorti: first argument not an array"
+msgstr "asort: pierwszy argument nie jest tablicÄ…"
+
+#: awkgram.y:246
#, c-format
msgid "%s blocks must have an action part"
-msgstr "%s bloków musi posiadaæ czê¶æ dotycz±c± akcji"
+msgstr "%s bloków musi posiadać część dotyczącą akcji"
-#: awkgram.y:230
+#: awkgram.y:249
msgid "each rule must have a pattern or an action part"
-msgstr "ka¿da regu³a musi posiadaæ wzorzec lub czê¶æ dotycz±c± akcji"
+msgstr "każda reguła musi posiadać wzorzec lub część dotyczącą akcji"
-#: awkgram.y:266 awkgram.y:275
+#: awkgram.y:320 awkgram.y:330
msgid "old awk does not support multiple `BEGIN' or `END' rules"
-msgstr "stary awk nie wspiera wielokrotnych regu³ `BEGIN' lub `END'"
+msgstr "stary awk nie wspiera wielokrotnych reguł `BEGIN' lub `END'"
-#: awkgram.y:304
+#: awkgram.y:367
#, c-format
msgid "`%s' is a built-in function, it cannot be redefined"
msgstr ""
-"`%s' jest funkcj± wbudowan±, wiêc nie mo¿e zostaæ ponownie zdefiniowana"
+"`%s' jest funkcją wbudowaną, więc nie może zostać ponownie zdefiniowana"
-#: awkgram.y:350
+#: awkgram.y:427
msgid "regexp constant `//' looks like a C++ comment, but is not"
msgstr ""
-"sta³e wyra¿enie regularne `//' wygl±da jak komentarz C++, ale nim nie jest"
+"stałe wyrażenie regularne `//' wygląda jak komentarz C++, ale nim nie jest"
-#: awkgram.y:353
+#: awkgram.y:430
#, c-format
msgid "regexp constant `/%s/' looks like a C comment, but is not"
msgstr ""
-"sta³e wyra¿enie regularne `/%s/' wygl±da jak komentarz C, ale nim nie jest"
+"stałe wyrażenie regularne `/%s/' wygląda jak komentarz C, ale nim nie jest"
-#: awkgram.y:380 awkgram.y:692
-msgid "statement may have no effect"
-msgstr "instrukcja mo¿e nie mieæ ¿adnego efektu"
+#: awkgram.y:735
+#, fuzzy
+msgid "`break' is not allowed outside a loop or switch"
+msgstr "instrukcja `break' poza pętlą jest niedozwolona"
-#: awkgram.y:477 awkgram.y:480 awkgram.y:504 awkgram.y:511 awkgram.y:518
-#, c-format
-msgid "`%s' used in %s action"
-msgstr "`%s' u¿yty w akcji %s"
+#: awkgram.y:744
+#, fuzzy
+msgid "`continue' is not allowed outside a loop"
+msgstr "instrukcja `continue' poza pętlą jest niedozwolona"
+
+#: awkgram.y:753
+#, fuzzy, c-format
+msgid "`next' used in %s action"
+msgstr "`%s' użyty w akcji %s"
-#: awkgram.y:495 awkgram.y:499
+#: awkgram.y:767 awkgram.y:771
msgid "`nextfile' is a gawk extension"
msgstr "`nextfile' jest rozszerzeniem gawk"
-#: awkgram.y:528
+#: awkgram.y:775
+#, fuzzy, c-format
+msgid "`nextfile' used in %s action"
+msgstr "`%s' użyty w akcji %s"
+
+#: awkgram.y:799
msgid "`return' used outside function context"
-msgstr "`return' u¿yty poza kontekstem funkcji"
+msgstr "`return' użyty poza kontekstem funkcji"
-#: awkgram.y:570
+#: awkgram.y:859
msgid "plain `print' in BEGIN or END rule should probably be `print \"\"'"
msgstr ""
-"zwyk³y `print' w regu³ach BEGIN lub END powinien prawdopodobnie byæ jako "
+"zwykły `print' w regułach BEGIN lub END powinien prawdopodobnie być jako "
"`print \"\"'"
-#: awkgram.y:586 awkgram.y:594
+#: awkgram.y:927 awkgram.y:935
msgid "`delete array' is a gawk extension"
msgstr "`delete tablica' jest rozszerzeniem gawk"
-#: awkgram.y:608 awkgram.y:616
+#: awkgram.y:955 awkgram.y:963
msgid "`delete(array)' is a non-portable tawk extension"
-msgstr "`delete(tablica)' jest nieprzeno¶nym rozszerzeniem tawk"
+msgstr "`delete(tablica)' jest nieprzenośnym rozszerzeniem tawk"
-#: awkgram.y:660
+#: awkgram.y:1004
#, c-format
msgid "duplicate case values in switch body: %s"
-msgstr "powielone warto¶ci case w ciele switch: %s"
+msgstr "powielone wartości case w ciele switch: %s"
-#: awkgram.y:670
-msgid "Duplicate `default' detected in switch body"
+#: awkgram.y:1014
+#, fuzzy
+msgid "duplicate `default' detected in switch body"
msgstr "wykryto powielony `default' w ciele switch"
-#: awkgram.y:759
+#: awkgram.y:1151
msgid "multistage two-way pipelines don't work"
-msgstr "wieloetapowe dwukierunkowe linie potokowe nie dzia³aj±"
+msgstr "wieloetapowe dwukierunkowe linie potokowe nie działają"
-#: awkgram.y:850
+#: awkgram.y:1253
msgid "regular expression on right of assignment"
-msgstr "wyra¿anie regularne po prawej stronie przypisania"
+msgstr "wyrażanie regularne po prawej stronie przypisania"
-#: awkgram.y:860
+#: awkgram.y:1263
msgid "regular expression on left of `~' or `!~' operator"
-msgstr "wyra¿enie regularne po lewej stronie operatora `~' lub `!~'"
+msgstr "wyrażenie regularne po lewej stronie operatora `~' lub `!~'"
-#: awkgram.y:866 awkgram.y:954
+#: awkgram.y:1278 awkgram.y:1423
msgid "old awk does not support the keyword `in' except after `for'"
msgstr ""
-"stary awk nie wspiera s³owa kluczowego `in', z wyj±tkiem po s³owie `for'"
+"stary awk nie wspiera słowa kluczowego `in', z wyjątkiem po słowie `for'"
-#: awkgram.y:872
+#: awkgram.y:1287
msgid "regular expression on right of comparison"
-msgstr "wyra¿enie regularne po prawej stronie porównania"
+msgstr "wyrażenie regularne po prawej stronie porównania"
-#: awkgram.y:936
+#: awkgram.y:1399
#, fuzzy, c-format
-msgid "`getline var' invalid inside %s rule"
-msgstr "nieprawid³owy zdalny port w `%s'"
+msgid "`getline var' invalid inside `%s' rule"
+msgstr "nieprawidłowy zdalny port w `%s'"
-#: awkgram.y:939
-#, c-format
-msgid "`getline' invalid inside %s rule"
-msgstr ""
+#: awkgram.y:1401
+#, fuzzy, c-format
+msgid "`getline' invalid inside `%s' rule"
+msgstr "nieprawidłowy zdalny port w `%s'"
-#: awkgram.y:944
+#: awkgram.y:1407
msgid "non-redirected `getline' undefined inside END action"
msgstr ""
-"komenda `getline' bez przekierowania nie jest zdefiniowana wewn±trz akcji END"
+"komenda `getline' bez przekierowania nie jest zdefiniowana wewnÄ…trz akcji END"
-#: awkgram.y:955
+#: awkgram.y:1424
msgid "old awk does not support multidimensional arrays"
msgstr "stary awk nie wspiera wielowymiarowych tablic"
-#: awkgram.y:1001
+#: awkgram.y:1528
msgid "call of `length' without parentheses is not portable"
-msgstr "wywo³anie `length' bez nawiasów jest nieprzeno¶ne"
-
-#: awkgram.y:1006
-msgid "call of `length' without parentheses is deprecated by POSIX"
-msgstr "wywo³anie `length' bez podania nawiasów jest niezalecane przez POSIX"
+msgstr "wywołanie `length' bez nawiasów jest nieprzenośne"
-#: awkgram.y:1051
+#: awkgram.y:1591
#, fuzzy
msgid "indirect function calls are a gawk extension"
-msgstr "`extension' jest rozszerzeniem gawk"
+msgstr "`nextfile' jest rozszerzeniem gawk"
-#: awkgram.y:1084
-msgid "use of non-array as array"
-msgstr "u¿ycie nie-tablicy jako tablicy"
+#: awkgram.y:1605
+#, fuzzy, c-format
+msgid "can not use special variable `%s' for indirect function call"
+msgstr ""
+"funkcja `%s': nie można użyć specjalnej zmiennej `%s' jako parametru funkcji"
-#: awkgram.y:1087
+#: awkgram.y:1682
msgid "invalid subscript expression"
-msgstr "nieprawid³owe wyra¿enie indeksowe"
+msgstr "nieprawidłowe wyrażenie indeksowe"
-#: awkgram.y:1329
-msgid "unexpected newline or end of string"
-msgstr "niespodziewany znak nowego wiersza lub koñca ³añcucha"
+#: awkgram.y:1722
+msgid "use of non-array as array"
+msgstr "użycie nie-tablicy jako tablicy"
-#: awkgram.y:1446
-msgid "empty program text on command line"
-msgstr "pusty tekst programu w linii poleceñ"
+#: awkgram.y:1993
+msgid "unexpected newline or end of string"
+msgstr "niespodziewany znak nowego wiersza lub końca łańcucha"
-#: awkgram.y:1502
+#: awkgram.y:2248 awkgram.y:2296 awkgram.y:2470
#, c-format
msgid "can't open source file `%s' for reading (%s)"
-msgstr "nie mo¿na otworzyæ pliku ¼ród³owego `%s' do czytania (%s)"
+msgstr "nie można otworzyć pliku źródłowego `%s' do czytania (%s)"
+
+#: awkgram.y:2249 awkgram.y:2297 builtin.c:122
+msgid "reason unknown"
+msgstr "nieznany powód"
+
+#: awkgram.y:2257
+#, fuzzy, c-format
+msgid "already included source file `%s'"
+msgstr "nie można otworzyć pliku źródłowego `%s' (%s)"
-#: awkgram.y:1600
+#: awkgram.y:2281
+#, fuzzy
+msgid "@include is a gawk extension"
+msgstr "`nextfile' jest rozszerzeniem gawk"
+
+#: awkgram.y:2288
+msgid "empty filename after @include"
+msgstr ""
+
+#: awkgram.y:2422
+msgid "empty program text on command line"
+msgstr "pusty tekst programu w linii poleceń"
+
+#: awkgram.y:2537
#, c-format
msgid "can't read sourcefile `%s' (%s)"
-msgstr "nie mo¿na otworzyæ pliku ¼ród³owego `%s' (%s)"
+msgstr "nie można otworzyć pliku źródłowego `%s' (%s)"
-#: awkgram.y:1608
+#: awkgram.y:2547
#, c-format
msgid "source file `%s' is empty"
-msgstr "plik ¼ród³owy `%s' jest pusty"
+msgstr "plik źródłowy `%s' jest pusty"
-#: awkgram.y:1800 awkgram.y:1922 awkgram.y:1940 awkgram.y:2315 awkgram.y:2407
+#: awkgram.y:2732
msgid "source file does not end in newline"
-msgstr "plik ¼ród³owy nie posiada na koñcu znaku nowego wiersza"
+msgstr "plik źródłowy nie posiada na końcu znaku nowego wiersza"
-#: awkgram.y:1862
+#: awkgram.y:2809
msgid "unterminated regexp ends with `\\' at end of file"
msgstr ""
-"niezakoñczone prawid³owo wyra¿enie regularne koñczy siê znakiem `\\' na "
-"koñcu pliku"
+"niezakończone prawidłowo wyrażenie regularne kończy się znakiem `\\' na "
+"końcu pliku"
-#: awkgram.y:1886
+#: awkgram.y:2833
#, c-format
msgid "%s: %d: tawk regex modifier `/.../%c' doesn't work in gawk"
msgstr ""
-"%s: %d: modyfikator wyra¿enia regularnego `/.../%c' tawk nie dzia³a w gawk"
+"%s: %d: modyfikator wyrażenia regularnego `/.../%c' tawk nie działa w gawk"
-#: awkgram.y:1890
+#: awkgram.y:2837
#, c-format
msgid "tawk regex modifier `/.../%c' doesn't work in gawk"
-msgstr "modyfikator wyra¿enia regularnego `/.../%c' tawk nie dzia³a w gawk"
+msgstr "modyfikator wyrażenia regularnego `/.../%c' tawk nie działa w gawk"
-#: awkgram.y:1897
+#: awkgram.y:2844
msgid "unterminated regexp"
-msgstr "niezakoñczone wyra¿enie regularne"
+msgstr "niezakończone wyrażenie regularne"
-#: awkgram.y:1900
+#: awkgram.y:2848
msgid "unterminated regexp at end of file"
-msgstr "niezakoñczone wyra¿enie regularne na koñcu pliku"
+msgstr "niezakończone wyrażenie regularne na końcu pliku"
-#: awkgram.y:1969
+#: awkgram.y:2907
msgid "use of `\\ #...' line continuation is not portable"
-msgstr "u¿ycie `\\ #...' kontynuacji linii nie jest przeno¶ne"
+msgstr "użycie `\\ #...' kontynuacji linii nie jest przenośne"
-#: awkgram.y:1982
+#: awkgram.y:2923
msgid "backslash not last character on line"
msgstr "backslash nie jest ostatnim znakiem w wierszu"
-#: awkgram.y:2027
+#: awkgram.y:2984
msgid "POSIX does not allow operator `**='"
msgstr "POSIX nie zezwala na operator `**='"
-#: awkgram.y:2029
+#: awkgram.y:2986
msgid "old awk does not support operator `**='"
msgstr "stary awk nie wspiera operatora `**='"
-#: awkgram.y:2038
+#: awkgram.y:2995
msgid "POSIX does not allow operator `**'"
msgstr "POSIX nie zezwala na operator `**'"
-#: awkgram.y:2040
+#: awkgram.y:2997
msgid "old awk does not support operator `**'"
msgstr "stary awk nie wspiera operatora `**'"
-#: awkgram.y:2071
+#: awkgram.y:3032
msgid "operator `^=' is not supported in old awk"
msgstr "operator `^=' nie jest wspierany w starym awk"
-#: awkgram.y:2079
+#: awkgram.y:3040
msgid "operator `^' is not supported in old awk"
msgstr "operator `^' nie jest wspierany w starym awk"
-#: awkgram.y:2163 awkgram.y:2178
+#: awkgram.y:3133 awkgram.y:3149
msgid "unterminated string"
-msgstr "niezakoñczony ³añcuch"
+msgstr "niezakończony łańcuch"
-#: awkgram.y:2368
+#: awkgram.y:3345
#, c-format
msgid "invalid char '%c' in expression"
-msgstr "nieprawid³owy znak '%c' w wyra¿eniu"
+msgstr "nieprawidłowy znak '%c' w wyrażeniu"
-#: awkgram.y:2416
+#: awkgram.y:3391
#, c-format
msgid "`%s' is a gawk extension"
msgstr "`%s' jest rozszerzeniem gawk"
-#: awkgram.y:2419
+#: awkgram.y:3394
#, c-format
msgid "`%s' is a Bell Labs extension"
msgstr "`%s' jest rozszerzeniem Bell Labs"
-#: awkgram.y:2422
+#: awkgram.y:3397
#, c-format
msgid "POSIX does not allow `%s'"
msgstr "POSIX nie zezwala na `%s'"
-#: awkgram.y:2426
+#: awkgram.y:3401
#, c-format
msgid "`%s' is not supported in old awk"
msgstr "`%s' nie jest wspierany w starym awk"
-#: awkgram.y:2452
+#: awkgram.y:3465
msgid "`goto' considered harmful!\n"
-msgstr "`goto' uwa¿ane za szkodliwe!\n"
+msgstr "`goto' uważane za szkodliwe!\n"
-#: awkgram.y:2514
+#: awkgram.y:3518
#, c-format
msgid "%d is invalid as number of arguments for %s"
-msgstr "%d jest nieprawid³owe jako liczba argumentów dla %s"
+msgstr "%d jest nieprawidłowe jako liczba argumentów dla %s"
-#: awkgram.y:2533 awkgram.y:2536
+#: awkgram.y:3544 awkgram.y:3547
msgid "match: third argument is a gawk extension"
msgstr "match: trzeci argument jest rozszerzeniem gawk"
-#: awkgram.y:2549
+#: awkgram.y:3575
#, c-format
msgid "%s: string literal as last arg of substitute has no effect"
msgstr ""
-"%s: litera³ ³añcuchowy jako ostatni argument podstawienia nie ma ¿adnego "
+"%s: literał łańcuchowy jako ostatni argument podstawienia nie ma żadnego "
"efektu"
-#: awkgram.y:2552
+#: awkgram.y:3580
#, c-format
msgid "%s third parameter is not a changeable object"
msgstr "%s trzeci parametr nie jest zmiennym obiektem"
-#: awkgram.y:2586 awkgram.y:2589
+#: awkgram.y:3665 awkgram.y:3668
msgid "close: second argument is a gawk extension"
msgstr "close: drugi argument jest rozszerzeniem gawk"
-#: awkgram.y:2599
+#: awkgram.y:3680
msgid "use of dcgettext(_\"...\") is incorrect: remove leading underscore"
-msgstr "nieprawid³owe u¿ycie dcgettext(_\"...\"): usuñ znak podkre¶lenia"
+msgstr "nieprawidłowe użycie dcgettext(_\"...\"): usuń znak podkreślenia"
-#: awkgram.y:2614
+#: awkgram.y:3695
msgid "use of dcngettext(_\"...\") is incorrect: remove leading underscore"
-msgstr "nieprawid³owe u¿ycie dcngettext(_\"...\"): usuñ znak podkre¶lenia"
+msgstr "nieprawidłowe użycie dcngettext(_\"...\"): usuń znak podkreślenia"
-#: awkgram.y:2686
+#: awkgram.y:3787
#, c-format
msgid "function `%s': parameter #%d, `%s', duplicates parameter #%d"
msgstr "funkcja `%s': parametr #%d, `%s', powiela parametr #%d"
-#: awkgram.y:2719
+#: awkgram.y:3829
#, c-format
msgid "function `%s': parameter `%s' shadows global variable"
-msgstr "funkcja `%s': parametr `%s' zas³ania globaln± zmienn±"
+msgstr "funkcja `%s': parametr `%s' zasłania globalną zmienną"
-#: awkgram.y:2831
+#: awkgram.y:3987
#, c-format
msgid "could not open `%s' for writing (%s)"
-msgstr "nie mo¿na otworzyæ `%s' do zapisu (%s)"
+msgstr "nie można otworzyć `%s' do zapisu (%s)"
-#: awkgram.y:2832 profile.c:96
+#: awkgram.y:3988 profile.c:85
msgid "sending profile to standard error"
-msgstr "wysy³anie profilu na standardowe wyj¶cie diagnostyczne"
+msgstr "wysyłanie profilu na standardowe wyjście diagnostyczne"
-#: awkgram.y:2864
+#: awkgram.y:3994
#, c-format
msgid "%s: close failed (%s)"
-msgstr "%s: zamkniêcie nie powiod³o siê (%s)"
+msgstr "%s: zamknięcie nie powiodło się (%s)"
-#: awkgram.y:2985
+#: awkgram.y:4046
msgid "shadow_funcs() called twice!"
-msgstr "shadow_funcs() wywo³ana podwójnie!"
+msgstr "shadow_funcs() wywołana podwójnie!"
-#: awkgram.y:3012
+#: awkgram.y:4052
msgid "there were shadowed variables."
-msgstr "wyst±pi³y przykryte zmienne."
+msgstr "wystąpiły przykryte zmienne."
-#: awkgram.y:3085
+#: awkgram.y:4081
#, c-format
msgid "function `%s': can't use function name as parameter name"
-msgstr "funkcja `%s': nie mo¿na u¿yæ nazwy funkcji jako nazwy parametru"
+msgstr "funkcja `%s': nie można użyć nazwy funkcji jako nazwy parametru"
-#: awkgram.y:3088
-#, fuzzy, c-format
+#: awkgram.y:4086
+#, c-format
msgid "function `%s': can't use special variable `%s' as a function parameter"
-msgstr "funkcja `%s': nie mo¿na u¿yæ nazwy funkcji jako nazwy parametru"
+msgstr ""
+"funkcja `%s': nie można użyć specjalnej zmiennej `%s' jako parametru funkcji"
-#: awkgram.y:3098
+#: awkgram.y:4102
#, c-format
msgid "function name `%s' previously defined"
-msgstr "nazwa funkcji `%s' zosta³a zdefiniowana poprzednio"
+msgstr "nazwa funkcji `%s' została zdefiniowana poprzednio"
-#: awkgram.y:3249 awkgram.y:3255
+#: awkgram.y:4271 awkgram.y:4277
#, c-format
msgid "function `%s' called but never defined"
-msgstr "funkcja `%s' zosta³a wywo³ana, ale nigdy nie zosta³a zdefiniowana"
+msgstr "funkcja `%s' została wywołana, ale nigdy nie została zdefiniowana"
-#: awkgram.y:3258
+#: awkgram.y:4280
#, c-format
msgid "function `%s' defined but never called"
-msgstr "funkcja `%s' zosta³a zdefiniowana, ale nigdy nie zosta³a wywo³ana"
+msgstr "funkcja `%s' została zdefiniowana, ale nigdy nie została wywołana"
-#: awkgram.y:3285
+#: awkgram.y:4311
#, c-format
msgid "regexp constant for parameter #%d yields boolean value"
-msgstr "sta³e wyra¿enie regularne dla parametru #%d daje warto¶æ logiczn±"
+msgstr "stałe wyrażenie regularne dla parametru #%d daje wartość logiczną"
-#: awkgram.y:3329
+#: awkgram.y:4420
#, c-format
msgid ""
"function `%s' called with space between name and `(',\n"
"or used as a variable or an array"
msgstr ""
-"funkcja `%s' zosta³a wywo³ana z bia³ymi znakami pomiêdzy jej nazw± a znakiem "
+"funkcja `%s' została wywołana z białymi znakami pomiędzy jej nazwą a znakiem "
"`(',\n"
-"lub u¿yta jako zmienna lub jako tablica"
+"lub użyta jako zmienna lub jako tablica"
-#: awkgram.y:3750
-#, fuzzy
-msgid "division by zero attempted in `/'"
-msgstr "próba dzielenia przez zero w `/='"
+#: awkgram.y:4673 eval.c:1845
+msgid "division by zero attempted"
+msgstr "próba dzielenia przez zero"
-#: awkgram.y:3755 eval.c:1411
+#: awkgram.y:4682 eval.c:1877
#, c-format
msgid "division by zero attempted in `%%'"
-msgstr "próba dzielenia przez zero w `%%'"
+msgstr "próba dzielenia przez zero w `%%'"
-#: builtin.c:122
+#: awkgram.y:5342
+msgid "statement may have no effect"
+msgstr "instrukcja może nie mieć żadnego efektu"
+
+#: builtin.c:120
#, c-format
msgid "%s to \"%s\" failed (%s)"
-msgstr "%s do \"%s\" nie powiód³ siê (%s)"
+msgstr "%s do \"%s\" nie powiódł się (%s)"
-#: builtin.c:123
+#: builtin.c:121
msgid "standard output"
-msgstr "standardowe wyj¶cie"
-
-#: builtin.c:124
-msgid "reason unknown"
-msgstr "nieznany powód"
+msgstr "standardowe wyjście"
-#: builtin.c:137
+#: builtin.c:135
msgid "exp: received non-numeric argument"
-msgstr "exp: otrzymano argument nie bêd±cy liczb±"
+msgstr "exp: otrzymano argument nie będący liczbą"
-#: builtin.c:143
+#: builtin.c:141
#, c-format
msgid "exp: argument %g is out of range"
-msgstr "exp: argument %g jest poza zasiêgiem"
+msgstr "exp: argument %g jest poza zasięgiem"
-#: builtin.c:201
+#: builtin.c:200
#, c-format
msgid "fflush: cannot flush: pipe `%s' opened for reading, not writing"
msgstr ""
-"fflush: nie mo¿na opró¿niæ: potok `%s' otwarty do czytania, a nie do zapisu"
+"fflush: nie można opróżnić: potok `%s' otwarty do czytania, a nie do zapisu"
-#: builtin.c:204
+#: builtin.c:203
#, c-format
msgid "fflush: cannot flush: file `%s' opened for reading, not writing"
msgstr ""
-"fflush: nie mo¿na opró¿niæ: plik `%s' otwarty do czytania, a nie do zapisu"
+"fflush: nie można opróżnić: plik `%s' otwarty do czytania, a nie do zapisu"
-#: builtin.c:216
+#: builtin.c:215
#, c-format
msgid "fflush: `%s' is not an open file, pipe or co-process"
msgstr "fflush: `%s' nie jest ani otwartym plikiem, ani potokiem, ani procesem"
-#: builtin.c:310
+#: builtin.c:322
msgid "index: received non-string first argument"
-msgstr "index: otrzymano pierwszy argument, który nie jest ³añcuchem"
+msgstr "index: otrzymano pierwszy argument, który nie jest łańcuchem"
-#: builtin.c:312
+#: builtin.c:324
msgid "index: received non-string second argument"
-msgstr "index: otrzymano drugi argument, który nie jest ³añcuchem"
+msgstr "index: otrzymano drugi argument, który nie jest łańcuchem"
-#: builtin.c:434
+#: builtin.c:446
msgid "int: received non-numeric argument"
-msgstr "int: otrzymano argument, który nie jest liczb±"
+msgstr "int: otrzymano argument, który nie jest liczbą"
-#: builtin.c:464
+#: builtin.c:469
+#, fuzzy
msgid "`length(array)' is a gawk extension"
msgstr "`length(tablica)' jest rozszerzeniem gawk"
-#: builtin.c:471
-msgid "length: untyped parameter argument will be forced to scalar"
-msgstr ""
-
-#: builtin.c:480
-msgid "length: untyped argument will be forced to scalar"
-msgstr ""
-
-#: builtin.c:484
+#: builtin.c:477
msgid "length: received non-string argument"
-msgstr "length: otrzymano argument, który nie jest ³añcuchem"
+msgstr "length: otrzymano argument, który nie jest łańcuchem"
-#: builtin.c:515
+#: builtin.c:508
msgid "log: received non-numeric argument"
-msgstr "log: otrzymano argument, który nie jest liczb±"
+msgstr "log: otrzymano argument, który nie jest liczbą"
-#: builtin.c:518
+#: builtin.c:511
#, c-format
msgid "log: received negative argument %g"
msgstr "log: otrzymano ujemny argument %g"
-#: builtin.c:726 builtin.c:729
-msgid "must use `count$' on all formats or none"
-msgstr "nale¿y u¿yæ `count$' we wszystkich formatach lub nic"
-
-#: builtin.c:790
-#, c-format
-msgid "field width is ignored for `%%%%' specifier"
-msgstr ""
-
-#: builtin.c:792
-#, c-format
-msgid "precision is ignored for `%%%%' specifier"
-msgstr ""
-
-#: builtin.c:794
-#, c-format
-msgid "field width and precision are ignored for `%%%%' specifier"
-msgstr ""
-
-#: builtin.c:845
-msgid "`$' is not permitted in awk formats"
-msgstr "`$' jest niedozwolony w formatach awk"
-
-#: builtin.c:851
-msgid "arg count with `$' must be > 0"
-msgstr "argument count z `$' musi byæ > 0"
-
-#: builtin.c:853
-#, c-format
-msgid "arg count %ld greater than total number of supplied arguments"
-msgstr "argument count %ld wiêkszy ni¿ ca³kowita suma argumentów dostarczonych"
-
-#: builtin.c:855
-msgid "`$' not permitted after period in format"
-msgstr "`$' jest niedozwolony po kropce w formacie"
-
-#: builtin.c:868
-msgid "no `$' supplied for positional field width or precision"
-msgstr "brak `$' dla pozycyjnej szeroko¶ci pola lub precyzji"
-
-#: builtin.c:938
-msgid "`l' is meaningless in awk formats; ignored"
-msgstr "`l' jest bezsensowny w formatach awk; zignorowany"
-
-#: builtin.c:942
-msgid "`l' is not permitted in POSIX awk formats"
-msgstr "`l' jest niedozwolony w formatach POSIX awk"
-
-#: builtin.c:953
-msgid "`L' is meaningless in awk formats; ignored"
-msgstr "`L' jest bezsensowny w formatach awk; zignorowany"
-
-#: builtin.c:957
-msgid "`L' is not permitted in POSIX awk formats"
-msgstr "`L' jest niedozwolony w formatach POSIX awk"
-
-#: builtin.c:968
-msgid "`h' is meaningless in awk formats; ignored"
-msgstr "`h' jest bezsensowny w formatach awk; zignorowany"
-
-#: builtin.c:972
-msgid "`h' is not permitted in POSIX awk formats"
-msgstr "`h' jest niedozwolony w formatach POSIX awk"
-
-#: builtin.c:1252
-#, c-format
-msgid "[s]printf: value %g is out of range for `%%%c' format"
-msgstr "[s]printf: warto¶æ %g jest poza zasiêgiem dla formatu `%%%c'"
-
-#: builtin.c:1332
-#, c-format
-msgid "ignoring unknown format specifier character `%c': no argument converted"
-msgstr ""
-
-#: builtin.c:1338
-msgid "not enough arguments to satisfy format string"
-msgstr ""
-"brak wystarczaj±cej liczby argumentów, aby zaspokoiæ ³añcuch formatuj±cy"
-
-#: builtin.c:1340
-msgid "^ ran out for this one"
-msgstr "zabrak³o ^"
-
-#: builtin.c:1346
-msgid "[s]printf: format specifier does not have control letter"
-msgstr "[s]printf: specyfikator formatu nie posiada kontrolnej litery"
-
-#: builtin.c:1349
-msgid "too many arguments supplied for format string"
-msgstr "zbyt du¿o podanych argumentów w ³añcuchu formatuj±cym"
+#: builtin.c:531 builtin.c:573 builtin.c:586 builtin.c:982 builtin.c:994
+#, fuzzy, c-format
+msgid "attempt to use array `%s' in scalar context"
+msgstr "próba użycia tablicy `%s' w kontekście skalaru"
-#: builtin.c:1424 builtin.c:1427
+#: builtin.c:569 builtin.c:580
msgid "printf: no arguments"
-msgstr "printf: brak argumentów"
+msgstr "printf: brak argumentów"
-#: builtin.c:1451
+#: builtin.c:621
msgid "sqrt: received non-numeric argument"
-msgstr "sqrt: otrzymano argument, który nie jest liczb±"
+msgstr "sqrt: otrzymano argument, który nie jest liczbą"
-#: builtin.c:1455
+#: builtin.c:625
#, c-format
msgid "sqrt: called with negative argument %g"
-msgstr "sqrt: wywo³ana z ujemnym argumentem %g"
-
-#: builtin.c:1479
-#, c-format
-msgid "substr: start index %g is invalid, using 1"
-msgstr "substr: pocz±tkowy indeks %g jest nieprawid³owy, nast±pi u¿ycie 1"
+msgstr "sqrt: wywołana z ujemnym argumentem %g"
-#: builtin.c:1484
-#, c-format
-msgid "substr: non-integer start index %g will be truncated"
-msgstr ""
-"substr: pocz±tkowy indeks %g, który nie jest liczb± ca³kowit±, zostanie "
-"obciêty"
-
-#: builtin.c:1510
+#: builtin.c:649
#, c-format
msgid "substr: length %g is not >= 1"
-msgstr "substr: d³ugo¶æ %g nie jest >= 1"
+msgstr "substr: długość %g nie jest >= 1"
-#: builtin.c:1512
+#: builtin.c:651
#, c-format
msgid "substr: length %g is not >= 0"
-msgstr "substr: d³ugo¶æ %g nie jest >= 0"
+msgstr "substr: długość %g nie jest >= 0"
-#: builtin.c:1519
+#: builtin.c:658
#, c-format
msgid "substr: non-integer length %g will be truncated"
-msgstr "substr: d³ugo¶æ %g, która nie jest liczb± ca³kowit±, zostanie obciêta"
+msgstr "substr: długość %g, która nie jest liczbą całkowitą, zostanie obcięta"
-#: builtin.c:1524
+#: builtin.c:663
#, c-format
msgid "substr: length %g too big for string indexing, truncating to %g"
-msgstr "substr: d³ugo¶æ %g zbyt du¿a dla indeksu ³añcucha, obcinanie do %g"
+msgstr "substr: długość %g zbyt duża dla indeksu łańcucha, obcinanie do %g"
+
+#: builtin.c:675
+#, c-format
+msgid "substr: start index %g is invalid, using 1"
+msgstr "substr: początkowy indeks %g jest nieprawidłowy, nastąpi użycie 1"
-#: builtin.c:1536
+#: builtin.c:680
+#, c-format
+msgid "substr: non-integer start index %g will be truncated"
+msgstr ""
+"substr: początkowy indeks %g, który nie jest liczbą całkowitą, zostanie "
+"obcięty"
+
+#: builtin.c:705
msgid "substr: source string is zero length"
-msgstr "substr: ³añcuch ¼ród³owy ma zerow± d³ugo¶æ"
+msgstr "substr: łańcuch źródłowy ma zerową długość"
-#: builtin.c:1552
+#: builtin.c:721
#, c-format
msgid "substr: start index %g is past end of string"
-msgstr "substr: pocz±tkowy indeks %g le¿y poza koñcem ³añcucha"
+msgstr "substr: początkowy indeks %g leży poza końcem łańcucha"
-#: builtin.c:1560
+#: builtin.c:729
#, c-format
msgid ""
"substr: length %g at start index %g exceeds length of first argument (%lu)"
msgstr ""
-"substr: d³ugo¶æ %g zaczynaj±c od %g przekracza d³ugo¶æ pierwszego argumentu "
+"substr: długość %g zaczynając od %g przekracza długość pierwszego argumentu "
"(%lu)"
-#: builtin.c:1637
+#: builtin.c:806
+msgid "strftime: received non-numeric second argument"
+msgstr "strftime: otrzymano drugi argument, który nie jest liczbą"
+
+#: builtin.c:813
msgid "strftime: received non-string first argument"
-msgstr "strftime: otrzymano pierwszy argument, który nie jest ³añcuchem"
+msgstr "strftime: otrzymano pierwszy argument, który nie jest łańcuchem"
-#: builtin.c:1643
+#: builtin.c:819
msgid "strftime: received empty format string"
-msgstr "strftime: otrzymano pusty ³añcuch formatuj±cy"
-
-#: builtin.c:1652
-msgid "strftime: received non-numeric second argument"
-msgstr "strftime: otrzymano drugi argument, który nie jest liczb±"
+msgstr "strftime: otrzymano pusty łańcuch formatujący"
-#: builtin.c:1729
+#: builtin.c:885
msgid "mktime: received non-string argument"
-msgstr "mktime: otrzymano argument, który nie jest ³añcuchem"
+msgstr "mktime: otrzymano argument, który nie jest łańcuchem"
-#: builtin.c:1746
+#: builtin.c:902
msgid "mktime: at least one of the values is out of the default range"
msgstr ""
-#: builtin.c:1781
+#: builtin.c:937
msgid "'system' function not allowed in sandbox mode"
msgstr ""
-#: builtin.c:1786
+#: builtin.c:942
msgid "system: received non-string argument"
-msgstr "system: otrzymano argument, który nie jest ³añcuchem"
+msgstr "system: otrzymano argument, który nie jest łańcuchem"
-#: builtin.c:1907 eval.c:2285
+#: builtin.c:997 eval.c:1105 eval.c:1557 eval.c:1570
+#, c-format
+msgid "reference to uninitialized variable `%s'"
+msgstr "odwołanie do niezainicjowanej zmiennej `%s'"
+
+#: builtin.c:1064
#, c-format
msgid "reference to uninitialized field `$%d'"
-msgstr "odwo³anie do niezainicjowanego pola `$%d'"
+msgstr "odwołanie do niezainicjowanego pola `$%d'"
-#: builtin.c:2012
+#: builtin.c:1098
msgid "tolower: received non-string argument"
-msgstr "tolower: otrzymano argument, który nie jest ³añcuchem"
+msgstr "tolower: otrzymano argument, który nie jest łańcuchem"
-#: builtin.c:2042
+#: builtin.c:1151
msgid "toupper: received non-string argument"
-msgstr "toupper: otrzymano argument, który nie jest ³añcuchem"
+msgstr "toupper: otrzymano argument, który nie jest łańcuchem"
-#: builtin.c:2075
+#: builtin.c:1199
msgid "atan2: received non-numeric first argument"
-msgstr "atan2: otrzymano pierwszy argument, który nie jest liczb±"
+msgstr "atan2: otrzymano pierwszy argument, który nie jest liczbą"
-#: builtin.c:2077
+#: builtin.c:1201
msgid "atan2: received non-numeric second argument"
-msgstr "atan2: otrzymano drugi argument, który nie jest liczb±"
+msgstr "atan2: otrzymano drugi argument, który nie jest liczbą"
-#: builtin.c:2096
+#: builtin.c:1220
msgid "sin: received non-numeric argument"
-msgstr "sin: otrzymano argument, który nie jest liczb±"
+msgstr "sin: otrzymano argument, który nie jest liczbą"
-#: builtin.c:2112
+#: builtin.c:1236
msgid "cos: received non-numeric argument"
-msgstr "cos: otrzymano argument, który nie jest liczb±"
+msgstr "cos: otrzymano argument, który nie jest liczbą"
-#: builtin.c:2165
+#: builtin.c:1289
msgid "srand: received non-numeric argument"
-msgstr "srand: otrzymano argument, który nie jest liczb±"
+msgstr "srand: otrzymano argument, który nie jest liczbą"
-#: builtin.c:2200
+#: builtin.c:1320
msgid "match: third argument is not an array"
-msgstr "match: otrzymano trzeci argument, który nie jest tablic±"
+msgstr "match: otrzymano trzeci argument, który nie jest tablicą"
-#: builtin.c:2750
+#: builtin.c:1827
msgid "gensub: third argument of 0 treated as 1"
msgstr "gensub: trzeci argument 0 potraktowany jako 1"
-#: builtin.c:2866
+#: builtin.c:1869
msgid "lshift: received non-numeric first argument"
-msgstr "lshift: otrzymano pierwszy argument, który nie jest liczb±"
+msgstr "lshift: otrzymano pierwszy argument, który nie jest liczbą"
-#: builtin.c:2868
+#: builtin.c:1871
msgid "lshift: received non-numeric second argument"
-msgstr "lshift: otrzymano drugi argument, który nie jest liczb±"
+msgstr "lshift: otrzymano drugi argument, który nie jest liczbą"
-#: builtin.c:2874
+#: builtin.c:1877
#, c-format
msgid "lshift(%lf, %lf): negative values will give strange results"
-msgstr "lshift(%lf, %lf): ujemne warto¶ci spowoduj± dziwne wyniki"
+msgstr "lshift(%lf, %lf): ujemne wartości spowodują dziwne wyniki"
-#: builtin.c:2876
+#: builtin.c:1879
#, c-format
msgid "lshift(%lf, %lf): fractional values will be truncated"
-msgstr "lshift(%lf, %lf): u³amkowe warto¶ci zostan± obciête"
+msgstr "lshift(%lf, %lf): ułamkowe wartości zostaną obcięte"
-#: builtin.c:2878
+#: builtin.c:1881
#, c-format
msgid "lshift(%lf, %lf): too large shift value will give strange results"
msgstr ""
-"lshift(%lf, %lf): zbyt du¿a warto¶æ przesuniêcia spowoduje dziwne wyniki"
+"lshift(%lf, %lf): zbyt duża wartość przesunięcia spowoduje dziwne wyniki"
-#: builtin.c:2904
+#: builtin.c:1908
msgid "rshift: received non-numeric first argument"
-msgstr "rshift: otrzymano pierwszy argument, który nie jest liczb±"
+msgstr "rshift: otrzymano pierwszy argument, który nie jest liczbą"
-#: builtin.c:2906
+#: builtin.c:1910
msgid "rshift: received non-numeric second argument"
-msgstr "rshift: otrzymano drugi argument, który nie jest liczb±"
+msgstr "rshift: otrzymano drugi argument, który nie jest liczbą"
-#: builtin.c:2912
+#: builtin.c:1916
#, c-format
msgid "rshift(%lf, %lf): negative values will give strange results"
-msgstr "rshift(%lf, %lf): ujemne warto¶ci spowoduj± dziwne wyniki"
+msgstr "rshift(%lf, %lf): ujemne wartości spowodują dziwne wyniki"
-#: builtin.c:2914
+#: builtin.c:1918
#, c-format
msgid "rshift(%lf, %lf): fractional values will be truncated"
-msgstr "rshift(%lf, %lf): u³amkowe warto¶ci zostan± obciête"
+msgstr "rshift(%lf, %lf): ułamkowe wartości zostaną obcięte"
-#: builtin.c:2916
+#: builtin.c:1920
#, c-format
msgid "rshift(%lf, %lf): too large shift value will give strange results"
msgstr ""
-"rshift(%lf, %lf): zbyt du¿a warto¶æ przesuniêcia spowoduje dziwne wyniki"
+"rshift(%lf, %lf): zbyt duża wartość przesunięcia spowoduje dziwne wyniki"
-#: builtin.c:2942
+#: builtin.c:1947
msgid "and: received non-numeric first argument"
-msgstr "and: otrzymano pierwszy argument, który nie jest liczb±"
+msgstr "and: otrzymano pierwszy argument, który nie jest liczbą"
-#: builtin.c:2944
+#: builtin.c:1949
msgid "and: received non-numeric second argument"
-msgstr "and: otrzymano drugi argument, który nie jest liczb±"
+msgstr "and: otrzymano drugi argument, który nie jest liczbą"
-#: builtin.c:2950
+#: builtin.c:1955
#, c-format
msgid "and(%lf, %lf): negative values will give strange results"
-msgstr "and(%lf, %lf): ujemne warto¶ci spowoduj± dziwne wyniki"
+msgstr "and(%lf, %lf): ujemne wartości spowodują dziwne wyniki"
-#: builtin.c:2952
+#: builtin.c:1957
#, c-format
msgid "and(%lf, %lf): fractional values will be truncated"
-msgstr "and(%lf, %lf): u³amkowe warto¶ci zostan± obciête"
+msgstr "and(%lf, %lf): ułamkowe wartości zostaną obcięte"
-#: builtin.c:2978
+#: builtin.c:1984
msgid "or: received non-numeric first argument"
-msgstr "or: otrzymano pierwszy argument, który nie jest liczb±"
+msgstr "or: otrzymano pierwszy argument, który nie jest liczbą"
-#: builtin.c:2980
+#: builtin.c:1986
msgid "or: received non-numeric second argument"
-msgstr "or: otrzymano drugi argument, który nie jest liczb±"
+msgstr "or: otrzymano drugi argument, który nie jest liczbą"
-#: builtin.c:2986
+#: builtin.c:1992
#, c-format
msgid "or(%lf, %lf): negative values will give strange results"
-msgstr "or(%lf, %lf): ujemne warto¶ci spowoduj± dziwne wyniki"
+msgstr "or(%lf, %lf): ujemne wartości spowodują dziwne wyniki"
-#: builtin.c:2988
+#: builtin.c:1994
#, c-format
msgid "or(%lf, %lf): fractional values will be truncated"
-msgstr "or(%lf, %lf): u³amkowe warto¶ci zostan± obciête"
+msgstr "or(%lf, %lf): ułamkowe wartości zostaną obcięte"
-#: builtin.c:3014
+#: builtin.c:2023
msgid "xor: received non-numeric first argument"
-msgstr "xor: otrzymano pierwszy argument, który nie jest liczb±"
+msgstr "xor: otrzymano pierwszy argument, który nie jest liczbą"
-#: builtin.c:3016
+#: builtin.c:2025
msgid "xor: received non-numeric second argument"
-msgstr "xor: otrzymano drugi argument, który nie jest liczb±"
+msgstr "xor: otrzymano drugi argument, który nie jest liczbą"
-#: builtin.c:3022
+#: builtin.c:2031
#, c-format
msgid "xor(%lf, %lf): negative values will give strange results"
-msgstr "xor(%lf, %lf): ujemne warto¶ci spowoduj± dziwne wyniki"
+msgstr "xor(%lf, %lf): ujemne wartości spowodują dziwne wyniki"
-#: builtin.c:3024
+#: builtin.c:2033
#, c-format
msgid "xor(%lf, %lf): fractional values will be truncated"
-msgstr "xor(%lf, %lf): u³amkowe warto¶ci zostan± obciête"
+msgstr "xor(%lf, %lf): ułamkowe wartości zostaną obcięte"
-#: builtin.c:3048
+#: builtin.c:2057 builtin.c:2063
msgid "compl: received non-numeric argument"
-msgstr "compl: otrzymano argument, który nie jest liczb±"
+msgstr "compl: otrzymano argument, który nie jest liczbą"
-#: builtin.c:3054
+#: builtin.c:2065
#, c-format
msgid "compl(%lf): negative value will give strange results"
-msgstr "compl(%lf): ujemne warto¶ci spowoduj± dziwne wyniki"
+msgstr "compl(%lf): ujemne wartości spowodują dziwne wyniki"
-#: builtin.c:3056
+#: builtin.c:2067
#, c-format
msgid "compl(%lf): fractional value will be truncated"
-msgstr "compl(%lf): u³amkowe warto¶ci zostan± obciête"
+msgstr "compl(%lf): ułamkowe wartości zostaną obcięte"
-#: builtin.c:3229
+#: builtin.c:2237
#, c-format
msgid "dcgettext: `%s' is not a valid locale category"
-msgstr "dcgettext: `%s' nie jest prawid³ow± kategori± lokalizacji"
+msgstr "dcgettext: `%s' nie jest prawidłową kategorią lokalizacji"
-#: eval.c:374
+#: eval.c:412
#, c-format
msgid "unknown nodetype %d"
-msgstr "nieznany typ wêz³a %d"
+msgstr "nieznany typ węzła %d"
-#: eval.c:423
-msgid "buffer overflow in genflags2str"
-msgstr "przepe³nienie bufora w genflags2str"
+#: eval.c:423 eval.c:437
+#, fuzzy, c-format
+msgid "unknown opcode %d"
+msgstr "nieznany typ węzła %d"
-#: eval.c:455 eval.c:461 profile.c:787
+#: eval.c:434
#, c-format
-msgid "attempt to use array `%s' in a scalar context"
-msgstr "próba u¿ycia tablicy `%s' w kontek¶cie skalaru"
+msgid "opcode %s not an operator or keyword"
+msgstr ""
+
+#: eval.c:487
+msgid "buffer overflow in genflags2str"
+msgstr "przepełnienie bufora w genflags2str"
-#: eval.c:803
+#: eval.c:613
#, c-format
-msgid "for loop: array `%s' changed size from %ld to %ld during loop execution"
+msgid ""
+"\n"
+"\t# Function Call Stack:\n"
+"\n"
msgstr ""
-"pêtla for: tablica `%s' zmieni³a rozmiar z %ld do %ld podczas wykonywania "
-"pêtli"
-
-#: eval.c:824
-msgid "`break' outside a loop is not portable"
-msgstr "instrukcja `break' poza pêtl± jest nieprzeno¶na"
+"\n"
+"\t# Stos Wywoławczy Funkcji:\n"
+"\n"
-#: eval.c:828
-msgid "`break' outside a loop is not allowed"
-msgstr "instrukcja `break' poza pêtl± jest niedozwolona"
+#: eval.c:640
+msgid "`IGNORECASE' is a gawk extension"
+msgstr "`IGNORECASE' jest rozszerzeniem gawk"
-#: eval.c:845
-msgid "`continue' outside a loop is not portable"
-msgstr "instrukcja `continue' poza pêtl± jest nieprzeno¶na"
+#: eval.c:669
+msgid "`BINMODE' is a gawk extension"
+msgstr "`BINMODE' jest rozszerzeniem gawk"
-#: eval.c:849
-msgid "`continue' outside a loop is not allowed"
-msgstr "instrukcja `continue' poza pêtl± jest niedozwolona"
+#: eval.c:727
+#, c-format
+msgid "BINMODE value `%s' is invalid, treated as 3"
+msgstr "wartość BINMODE `%s' jest nieprawidłowa, przyjęto ją jako 3"
-#: eval.c:883
-msgid "`next' cannot be called from a BEGIN rule"
-msgstr "instrukcja `next' nie mo¿e byæ wywo³ana z wnêtrza regu³y BEGIN"
+#: eval.c:817
+#, c-format
+msgid "bad `%sFMT' specification `%s'"
+msgstr "zła specyfikacja `%sFMT' `%s'"
-#: eval.c:885
-msgid "`next' cannot be called from an END rule"
-msgstr "instrukcja `next' nie mo¿e byæ wywo³ana z wnêtrza regu³y END"
+#: eval.c:895
+msgid "turning off `--lint' due to assignment to `LINT'"
+msgstr "wyłączenie `--lint' z powodu przypisania do `LINT'"
-#: eval.c:887
-#, fuzzy
-msgid "`next' cannot be called from a BEGINFILE rule"
-msgstr "instrukcja `next' nie mo¿e byæ wywo³ana z wnêtrza regu³y BEGIN"
+#: eval.c:1067 eval.c:1544
+#, c-format
+msgid "can't use function name `%s' as variable or array"
+msgstr "nie można użyć nazwy funkcji `%s' jako zmiennej lub tablicy"
-#: eval.c:889
-#, fuzzy
-msgid "`next' cannot be called from an ENDFILE rule"
-msgstr "instrukcja `next' nie mo¿e byæ wywo³ana z wnêtrza regu³y END"
+#: eval.c:1095
+msgid "assignment is not allowed to result of builtin function"
+msgstr "przypisanie do wyniku wbudowanej funkcji nie jest dozwolone"
-#: eval.c:898
-msgid "`nextfile' cannot be called from a BEGIN rule"
-msgstr "instrukcja `nextfile' nie mo¿e byæ wywo³ana z wnêtrza regu³y BEGIN"
+#: eval.c:1104 eval.c:1556 eval.c:1569
+#, c-format
+msgid "reference to uninitialized argument `%s'"
+msgstr "odwołanie do niezainicjowanego argumentu `%s'"
-#: eval.c:900
-msgid "`nextfile' cannot be called from an END rule"
-msgstr "instrukcja `nextfile' nie mo¿e byæ wywo³ana z wnêtrza regu³y END"
+#: eval.c:1123
+msgid "attempt to field reference from non-numeric value"
+msgstr "próba odwołania do pola poprzez nienumeryczną wartość"
-#: eval.c:906
+#: eval.c:1125
#, fuzzy
-msgid "`nextfile' cannot be called from an ENDFILE rule"
-msgstr "instrukcja `nextfile' nie mo¿e byæ wywo³ana z wnêtrza regu³y END"
+msgid "attempt to field reference from null string"
+msgstr "próba odwołania z zerowego łańcucha"
-#: eval.c:963
-msgid "statement has no effect"
-msgstr "instrukcja nie ma ¿adnego efektu"
+#: eval.c:1131
+#, fuzzy, c-format
+msgid "attempt to access field %ld"
+msgstr "próba dostępu do pola %d"
-#: eval.c:1040 eval.c:2133
-#, c-format
-msgid "can't use function name `%s' as variable or array"
-msgstr "nie mo¿na u¿yæ nazwy funkcji `%s' jako zmiennej lub tablicy"
+#: eval.c:1140
+#, fuzzy, c-format
+msgid "reference to uninitialized field `$%ld'"
+msgstr "odwołanie do niezainicjowanego pola `$%d'"
-#: eval.c:1047 eval.c:1053
+#: eval.c:1202
#, c-format
-msgid "reference to uninitialized argument `%s'"
-msgstr "odwo³anie do niezainicjowanego argumentu `%s'"
+msgid "function `%s' called with more arguments than declared"
+msgstr ""
+"funkcja `%s' została wywołana z większą ilością argumentów niż zostało to "
+"zadeklarowane"
-#: eval.c:1062 eval.c:2142
+#: eval.c:1358
#, c-format
-msgid "reference to uninitialized variable `%s'"
-msgstr "odwo³anie do niezainicjowanej zmiennej `%s'"
-
-#: eval.c:1210
-msgid ""
-"concatenation: side effects in one expression have changed the length of "
-"another!"
+msgid "unwind_stack: unexpected type `%s'"
msgstr ""
-"konkatenacja: skutki uboczne w jednym wyra¿eniu spowodowa³y zmianê d³ugo¶ci "
-"innego wyra¿enia!"
-#: eval.c:1315
-msgid "assignment used in conditional context"
-msgstr "przypisanie u¿yte w kontek¶cie warunkowym"
+#: eval.c:1636
+#, fuzzy, c-format
+msgid "attempt to use scalar `%s' as an array"
+msgstr "próba użycia skalaru `%s' jako tablicy"
-#: eval.c:1396
-msgid "division by zero attempted"
-msgstr "próba dzielenia przez zero"
+#: eval.c:1680
+msgid "assignment used in conditional context"
+msgstr "przypisanie użyte w kontekście warunkowym"
-#: eval.c:1426 profile.c:663
-#, c-format
-msgid "illegal type (%s) in tree_eval"
-msgstr "nieprawid³owy typ (%s) w tree_eval"
+#: eval.c:1684
+msgid "statement has no effect"
+msgstr "instrukcja nie ma żadnego efektu"
-#: eval.c:1589
+#: eval.c:2028
msgid "division by zero attempted in `/='"
-msgstr "próba dzielenia przez zero w `/='"
+msgstr "próba dzielenia przez zero w `/='"
-#: eval.c:1611
+#: eval.c:2053
#, c-format
msgid "division by zero attempted in `%%='"
-msgstr "próba dzielenia przez zero w `%%='"
-
-#: eval.c:1891
-#, c-format
-msgid "function `%s' called with more arguments than declared"
-msgstr ""
-"funkcja `%s' zosta³a wywo³ana z wiêksz± ilo¶ci± argumentów ni¿ zosta³o to "
-"zadeklarowane"
-
-#: eval.c:1948
-#, c-format
-msgid "function `%s' not defined"
-msgstr "funkcja `%s' nie zosta³a zdefiniowana"
-
-#: eval.c:1950
-#, c-format
-msgid "identifier `%s' is not a function"
-msgstr ""
+msgstr "próba dzielenia przez zero w `%%='"
-#: eval.c:1997
-#, c-format
-msgid ""
-"function parameter `%s' is not a scalar and cannot be used for indirect "
-"function call"
-msgstr ""
+#: eval.c:2139
+msgid "`continue' outside a loop is not allowed"
+msgstr "instrukcja `continue' poza pętlą jest niedozwolona"
-#: eval.c:2014
-#, c-format
-msgid "indirect call of real function `%s' is silly"
-msgstr ""
+#: eval.c:2145
+#, fuzzy
+msgid "`break' outside a loop is not allowed"
+msgstr "instrukcja `break' poza pętlą jest niedozwolona"
-#: eval.c:2034
+#: eval.c:2229
#, c-format
-msgid "function `%s' called indirectly through `%s' does not exist"
+msgid "for loop: array `%s' changed size from %ld to %ld during loop execution"
msgstr ""
+"pętla for: tablica `%s' zmieniła rozmiar z %ld do %ld podczas wykonywania "
+"pętli"
-#: eval.c:2039
+#: eval.c:2342
#, c-format
-msgid "identifier `%s' cannot be used for indirect function call"
+msgid "function called indirectly through `%s' does not exist"
msgstr ""
-#: eval.c:2105
+#: eval.c:2354
#, c-format
-msgid ""
-"\n"
-"\t# Function Call Stack:\n"
-"\n"
-msgstr ""
-"\n"
-"\t# Stos Wywo³awczy Funkcji:\n"
-"\n"
-
-#: eval.c:2108
-#, c-format
-msgid "\t# -- main --\n"
-msgstr "\t# -- g³ówne --\n"
-
-#: eval.c:2269
-msgid "attempt to field reference from non-numeric value"
-msgstr "próba odwo³ania do pola poprzez nienumeryczn± warto¶æ"
-
-#: eval.c:2271
-msgid "attempt to reference from null string"
-msgstr "próba odwo³ania z zerowego ³añcucha"
-
-#: eval.c:2277
-#, c-format
-msgid "attempt to access field %d"
-msgstr "próba dostêpu do pola %d"
-
-#: eval.c:2298 eval.c:2305 profile.c:843
-msgid "assignment is not allowed to result of builtin function"
-msgstr "przypisanie do wyniku wbudowanej funkcji nie jest dozwolone"
+msgid "function `%s' not defined"
+msgstr "funkcja `%s' nie została zdefiniowana"
-#: eval.c:2369
-msgid "`IGNORECASE' is a gawk extension"
-msgstr "`IGNORECASE' jest rozszerzeniem gawk"
+#: eval.c:2481
+#, fuzzy, c-format
+msgid "`nextfile' cannot be called from a `%s' rule"
+msgstr "instrukcja `nextfile' nie może być wywołana z wnętrza reguły END"
-#: eval.c:2398
-msgid "`BINMODE' is a gawk extension"
-msgstr "`BINMODE' jest rozszerzeniem gawk"
+#: eval.c:2540
+#, fuzzy, c-format
+msgid "`next' cannot be called from a `%s' rule"
+msgstr "instrukcja `next' nie może być wywołana z wnętrza reguły END"
-#: eval.c:2456
+#: eval.c:2602
#, c-format
-msgid "BINMODE value `%s' is invalid, treated as 3"
+msgid "Sorry, don't know how to interpret `%s'"
msgstr ""
-#: eval.c:2546
-#, c-format
-msgid "bad `%sFMT' specification `%s'"
-msgstr "z³a specyfikacja `%sFMT' `%s'"
-
-#: eval.c:2624
-msgid "turning off `--lint' due to assignment to `LINT'"
-msgstr "wy³±czenie `--lint' z powodu przypisania do `LINT'"
-
-#: ext.c:61
-msgid "extensions not allowed in sandbox mode"
+#: ext.c:62
+msgid "extensions are not allowed in sandbox mode"
msgstr ""
-#: ext.c:65 ext.c:70
+#: ext.c:68 ext.c:73
msgid "`extension' is a gawk extension"
msgstr "`extension' jest rozszerzeniem gawk"
-#: ext.c:80
-#, c-format
-msgid "extension: cannot open `%s' (%s)\n"
-msgstr "rozszerzenie: nie mo¿na otworzyæ `%s' (%s)\n"
+#: ext.c:83
+#, fuzzy, c-format
+msgid "fatal: extension: cannot open `%s' (%s)\n"
+msgstr "rozszerzenie: nie można otworzyć `%s' (%s)\n"
-#: ext.c:88
-#, c-format
-msgid "extension: library `%s': cannot call function `%s' (%s)\n"
-msgstr "rozszerzenie: biblioteka `%s': nie mo¿na wywo³aæ funkcji `%s' (%s)\n"
+#: ext.c:93
+#, fuzzy, c-format
+msgid "fatal: extension: library `%s': cannot call function `%s' (%s)\n"
+msgstr "rozszerzenie: biblioteka `%s': nie można wywołać funkcji `%s' (%s)\n"
-#: ext.c:108
+#: ext.c:123
msgid "extension: missing function name"
-msgstr "rozszerzenie: brakuj±ca nazwa funkcji"
+msgstr "rozszerzenie: brakujÄ…ca nazwa funkcji"
-#: ext.c:113
+#: ext.c:128
#, c-format
msgid "extension: illegal character `%c' in function name `%s'"
-msgstr "rozszerzenie: nieprawid³owy znak `%c' w nazwie funkcji `%s'"
+msgstr "rozszerzenie: nieprawidłowy znak `%c' w nazwie funkcji `%s'"
-#: ext.c:119
+#: ext.c:137
#, c-format
msgid "extension: can't redefine function `%s'"
-msgstr "rozszerzenie: nie mo¿na zredefiniowaæ funkcji `%s'"
+msgstr "rozszerzenie: nie można zredefiniować funkcji `%s'"
-#: ext.c:123
+#: ext.c:141
#, c-format
msgid "extension: function `%s' already defined"
-msgstr "rozserzenie: funkcja `%s' zosta³a ju¿ zdefiniowana"
+msgstr "rozserzenie: funkcja `%s' została już zdefiniowana"
-#: ext.c:128
+#: ext.c:146
#, c-format
-msgid "extension: can't use gawk built-in `%s' as function name"
-msgstr "rozszerzenie: nie mo¿na u¿yæ wbudowanej w gawk `%s' jako nazwy funkcji"
+msgid "extension: function name `%s' previously defined"
+msgstr "rozserzenie: nazwa funkcji `%s' została zdefiniowana wcześniej"
-#: ext.c:130
+#: ext.c:148
#, c-format
-msgid "extension: function name `%s' previously defined"
-msgstr "rozserzenie: nazwa funkcji `%s' zosta³a zdefiniowana wcze¶niej"
+msgid "extension: can't use gawk built-in `%s' as function name"
+msgstr "rozszerzenie: nie można użyć wbudowanej w gawk `%s' jako nazwy funkcji"
-#: ext.c:207
+#: ext.c:152
#, c-format
+msgid "make_builtin: negative argument count for function `%s'"
+msgstr ""
+
+#: ext.c:255
+#, fuzzy, c-format
msgid "function `%s' defined to take no more than %d argument(s)"
-msgstr "funkcja `%s' zdefiniowana aby pobraæ nie wiêcej ni¿ %d argument(ów)"
+msgstr "funkcja `%s' zdefiniowana aby pobrać nie więcej niż %d argument(ów)"
-#: ext.c:210
+#: ext.c:258
#, c-format
msgid "function `%s': missing argument #%d"
msgstr "funkcja `%s': brakuje #%d argumentu"
-#: ext.c:220
+#: ext.c:268
#, c-format
msgid "function `%s': argument #%d: attempt to use scalar as an array"
-msgstr "funkcja `%s': argument #%d: próba u¿ycia skalaru jako tablicy"
+msgstr "funkcja `%s': argument #%d: próba użycia skalaru jako tablicy"
-#: ext.c:224
+#: ext.c:272
#, c-format
msgid "function `%s': argument #%d: attempt to use array as a scalar"
-msgstr "funkcja `%s': argument #%d: próba u¿ycia tablicy jako skalaru"
+msgstr "funkcja `%s': argument #%d: próba użycia tablicy jako skalaru"
-#: ext.c:249
+#: ext.c:285
msgid "Operation Not Supported"
msgstr "Operacja nie jest wspierana"
#: field.c:328
msgid "NF set to negative value"
-msgstr "NF ustawiony na warto¶æ ujemn±"
-
-#: field.c:913
-msgid "split: second argument is not an array"
-msgstr "split: drugi argument nie jest tablic±"
+msgstr "NF ustawiony na wartość ujemną"
-#: field.c:922 field.c:932 field.c:937
+#: field.c:939 field.c:946 field.c:950
#, fuzzy
msgid "split: fourth argument is a gawk extension"
msgstr "match: trzeci argument jest rozszerzeniem gawk"
-#: field.c:928
+#: field.c:943
#, fuzzy
msgid "split: fourth argument is not an array"
-msgstr "split: drugi argument nie jest tablic±"
+msgstr "split: drugi argument nie jest tablicÄ…"
-#: field.c:975
-#, fuzzy
-msgid "split: null string for third argument is a gawk extension"
-msgstr "split: zerowy ³añcuch dla trzeciego argumentu jest rozszerzeniem gawk"
+#: field.c:957
+msgid "split: second argument is not an array"
+msgstr "split: drugi argument nie jest tablicÄ…"
-#: field.c:1032
-#, fuzzy
-msgid "patsplit: second argument is not an array"
-msgstr "split: drugi argument nie jest tablic±"
+#: field.c:987
+msgid "split: null string for third arg is a gawk extension"
+msgstr "split: zerowy łańcuch dla trzeciego argumentu jest rozszerzeniem gawk"
-#: field.c:1041
+#: field.c:1028
#, fuzzy
msgid "patsplit: fourth argument is not an array"
-msgstr "split: drugi argument nie jest tablic±"
+msgstr "split: drugi argument nie jest tablicÄ…"
+
+#: field.c:1033
+#, fuzzy
+msgid "patsplit: second argument is not an array"
+msgstr "split: drugi argument nie jest tablicÄ…"
-#: field.c:1067
+#: field.c:1051
#, fuzzy
msgid "patsplit: third argument must be non-null"
-msgstr "match: otrzymano trzeci argument, który nie jest tablic±"
+msgstr "match: otrzymano trzeci argument, który nie jest tablicą"
-#: field.c:1111
+#: field.c:1084
msgid "`FIELDWIDTHS' is a gawk extension"
msgstr "`FIELDWIDTHS' jest rozszerzeniem gawk"
-#: field.c:1141 field.c:1155
+#: field.c:1147
#, c-format
msgid "invalid FIELDWIDTHS value, near `%s'"
-msgstr "nieprawid³owa warto¶æ FIELDWIDTHS, w pobli¿u `%s'"
+msgstr "nieprawidłowa wartość FIELDWIDTHS, w pobliżu `%s'"
-#: field.c:1238
+#: field.c:1220
msgid "null string for `FS' is a gawk extension"
-msgstr "zerowy ³añcuch dla `FS' jest rozszerzeniem gawk"
+msgstr "zerowy łańcuch dla `FS' jest rozszerzeniem gawk"
-#: field.c:1242
+#: field.c:1224
msgid "old awk does not support regexps as value of `FS'"
-msgstr "stary awk nie wspiera wyra¿eñ regularnych jako warto¶ci `FS'"
+msgstr "stary awk nie wspiera wyrażeń regularnych jako wartości `FS'"
-#: field.c:1357
+#: field.c:1343
#, fuzzy
msgid "`FPAT' is a gawk extension"
msgstr "`%s' jest rozszerzeniem gawk"
#: getopt.c:574 getopt.c:590
-#, fuzzy, c-format
+#, c-format
msgid "%s: option '%s' is ambiguous\n"
-msgstr "%s: opcja `%s' jest niejednoznaczna\n"
+msgstr "%s: opcja '%s' jest niejednoznaczna\n"
#: getopt.c:623 getopt.c:627
-#, fuzzy, c-format
+#, c-format
msgid "%s: option '--%s' doesn't allow an argument\n"
-msgstr "%s: opcja `--%s' nie mo¿e mieæ argumentów\n"
+msgstr "%s: opcja '--%s' nie może mieć argumentów\n"
#: getopt.c:636 getopt.c:641
-#, fuzzy, c-format
+#, c-format
msgid "%s: option '%c%s' doesn't allow an argument\n"
-msgstr "%s: opcja `%c%s' nie mo¿e mieæ argumentów\n"
+msgstr "%s: opcja '%c%s' nie może mieć argumentów\n"
#: getopt.c:684 getopt.c:703
#, fuzzy, c-format
msgid "%s: option '--%s' requires an argument\n"
-msgstr "%s: opcja `%s' musi mieæ argument\n"
+msgstr "%s: opcja '%s' wymaga argumentu\n"
#: getopt.c:741 getopt.c:744
-#, fuzzy, c-format
+#, c-format
msgid "%s: unrecognized option '--%s'\n"
-msgstr "%s: nieznana opcja `--%s'\n"
+msgstr "%s: nieznana opcja '--%s'\n"
#: getopt.c:752 getopt.c:755
-#, fuzzy, c-format
+#, c-format
msgid "%s: unrecognized option '%c%s'\n"
-msgstr "%s: nieznana opcja `%c%s'\n"
+msgstr "%s: nieznana opcja '%c%s'\n"
#: getopt.c:804 getopt.c:807
-#, fuzzy, c-format
+#, c-format
msgid "%s: invalid option -- '%c'\n"
-msgstr "%s: b³êdna opcja -- %c\n"
+msgstr "%s: błędna opcja -- '%c'\n"
#: getopt.c:857 getopt.c:874 getopt.c:1082 getopt.c:1100
-#, fuzzy, c-format
+#, c-format
msgid "%s: option requires an argument -- '%c'\n"
-msgstr "%s: opcja musi mieæ argument -- %c\n"
+msgstr "%s: opcja wymaga argumentu -- '%c'\n"
#: getopt.c:930 getopt.c:946
-#, fuzzy, c-format
+#, c-format
msgid "%s: option '-W %s' is ambiguous\n"
-msgstr "%s: opcja `-W %s' jest niejednoznaczna\n"
+msgstr "%s: opcja '-W %s' jest niejednoznaczna\n"
#: getopt.c:970 getopt.c:988
-#, fuzzy, c-format
+#, c-format
msgid "%s: option '-W %s' doesn't allow an argument\n"
-msgstr "%s: opcja `-W %s' nie mo¿e mieæ argumentów\n"
+msgstr "%s: opcja '-W %s' nie może mieć argumentów\n"
#: getopt.c:1009 getopt.c:1027
#, fuzzy, c-format
msgid "%s: option '-W %s' requires an argument\n"
-msgstr "%s: opcja `%s' musi mieæ argument\n"
+msgstr "%s: opcja '%s' wymaga argumentu\n"
-#: io.c:379
+#: io.c:272
#, c-format
msgid "command line argument `%s' is a directory: skipped"
msgstr ""
-#: io.c:413
+#: io.c:275 io.c:372
#, c-format
msgid "cannot open file `%s' for reading (%s)"
-msgstr "nie mo¿na otworzyæ pliku `%s' do czytania (%s)"
+msgstr "nie można otworzyć pliku `%s' do czytania (%s)"
-#: io.c:459 io.c:2999
+#: io.c:419
#, c-format
msgid "error reading input file `%s': %s"
-msgstr "b³±d podczas czytania z pliku `%s': %s"
+msgstr "błąd podczas czytania z pliku `%s': %s"
-#: io.c:506
+#: io.c:470
#, c-format
msgid "close of fd %d (`%s') failed (%s)"
-msgstr "zamkniêcie fd %d (`%s') nie powiod³o siê (%s)"
-
-#: io.c:617
-msgid "redirection not allowed in sandbox mode"
-msgstr ""
+msgstr "zamknięcie fd %d (`%s') nie powiodło się (%s)"
-#: io.c:648
-#, c-format
-msgid "invalid tree type %s in redirect()"
-msgstr "nieprawid³owy typ drzewa %s w funkcji redirect()"
-
-#: io.c:654
+#: io.c:577
#, c-format
msgid "expression in `%s' redirection only has numeric value"
-msgstr "wyra¿enie w przekierowaniu `%s' ma tylko warto¶æ numeryczn±"
+msgstr "wyrażenie w przekierowaniu `%s' ma tylko wartość numeryczną"
-#: io.c:660
+#: io.c:583
#, c-format
msgid "expression for `%s' redirection has null string value"
-msgstr "wyra¿enie dla przekierowania `%s' ma zerow± warto¶æ ³añcucha"
+msgstr "wyrażenie dla przekierowania `%s' ma zerową wartość łańcucha"
-#: io.c:665
+#: io.c:589
#, c-format
msgid "filename `%s' for `%s' redirection may be result of logical expression"
msgstr ""
-"nazwa pliku `%s' dla przekierowania `%s' mo¿e byæ rezultatem logicznego "
-"wyra¿enia"
+"nazwa pliku `%s' dla przekierowania `%s' może być rezultatem logicznego "
+"wyrażenia"
-#: io.c:707
+#: io.c:628
#, c-format
msgid "unnecessary mixing of `>' and `>>' for file `%.*s'"
msgstr "niepotrzebne mieszanie `>' i `>>' dla pliku `%.*s'"
-#: io.c:754
+#: io.c:681
#, c-format
msgid "can't open pipe `%s' for output (%s)"
-msgstr "nie mo¿na otworzyæ potoku `%s' jako wyj¶cia (%s)"
+msgstr "nie można otworzyć potoku `%s' jako wyjścia (%s)"
-#: io.c:763
+#: io.c:691
#, c-format
msgid "can't open pipe `%s' for input (%s)"
-msgstr "nie mo¿na otworzyæ potoku `%s' jako wej¶cia (%s)"
+msgstr "nie można otworzyć potoku `%s' jako wejścia (%s)"
-#: io.c:786
+#: io.c:712
#, c-format
msgid "can't open two way pipe `%s' for input/output (%s)"
msgstr ""
-"nie mo¿na otworzyæ dwukierunkowego potoku `%s' jako wej¶cia/wyj¶cia (%s)"
+"nie można otworzyć dwukierunkowego potoku `%s' jako wejścia/wyjścia (%s)"
-#: io.c:864
+#: io.c:794
#, c-format
msgid "can't redirect from `%s' (%s)"
-msgstr "nie mo¿na przekierowaæ z `%s' (%s)"
+msgstr "nie można przekierować z `%s' (%s)"
-#: io.c:867
+#: io.c:797
#, c-format
msgid "can't redirect to `%s' (%s)"
-msgstr "nie mo¿na przekierowaæ do `%s' (%s)"
+msgstr "nie można przekierować do `%s' (%s)"
-#: io.c:920
+#: io.c:846
msgid ""
"reached system limit for open files: starting to multiplex file descriptors"
msgstr ""
-"osi±gniêto systemowy limit otwartych plików: rozpoczêcie multipleksowania "
-"deskryptorów plików"
+"osiągnięto systemowy limit otwartych plików: rozpoczęcie multipleksowania "
+"deskryptorów plików"
-#: io.c:936
+#: io.c:862
#, c-format
msgid "close of `%s' failed (%s)."
-msgstr "zamkniêcie `%s' nie powiod³o siê (%s)."
+msgstr "zamknięcie `%s' nie powiodło się (%s)."
-#: io.c:944
+#: io.c:870
msgid "too many pipes or input files open"
-msgstr "zbyt du¿o otwartych potoków lub plików wej¶ciowych"
+msgstr "zbyt dużo otwartych potoków lub plików wejściowych"
-#: io.c:967
+#: io.c:892
msgid "close: second argument must be `to' or `from'"
-msgstr "close: drugim argumentem musi byæ `to' lub `from'"
+msgstr "close: drugim argumentem musi być `to' lub `from'"
-#: io.c:981
+#: io.c:909
#, c-format
msgid "close: `%.*s' is not an open file, pipe or co-process"
msgstr ""
"close: `%.*s' nie jest ani otwartym plikiem, ani potokiem, ani procesem"
-#: io.c:986
+#: io.c:914
msgid "close of redirection that was never opened"
-msgstr "zamkniêcie przekierowania, które nigdy nie zosta³o otwarte"
+msgstr "zamknięcie przekierowania, które nigdy nie zostało otwarte"
-#: io.c:1083
+#: io.c:1011
#, c-format
msgid "close: redirection `%s' not opened with `|&', second argument ignored"
msgstr ""
-"close: przekierowanie `%s' nie zosta³o otwarte z `|&', drugi argument "
+"close: przekierowanie `%s' nie zostało otwarte z `|&', drugi argument "
"zignorowany"
-#: io.c:1099
+#: io.c:1027
#, c-format
msgid "failure status (%d) on pipe close of `%s' (%s)"
msgstr "status awarii (%d) podczas zamykania potoku `%s' (%s)"
-#: io.c:1102
+#: io.c:1030
#, c-format
msgid "failure status (%d) on file close of `%s' (%s)"
msgstr "status awarii (%d) podczas zamykania pliku `%s' (%s)"
-#: io.c:1122
+#: io.c:1050
#, c-format
msgid "no explicit close of socket `%s' provided"
-msgstr "brak jawnego zamkniêcia gniazdka `%s'"
+msgstr "brak jawnego zamknięcia gniazdka `%s'"
-#: io.c:1125
+#: io.c:1053
#, c-format
msgid "no explicit close of co-process `%s' provided"
-msgstr "brak jawnego zamkniêcia procesu pomocniczego `%s'"
+msgstr "brak jawnego zamknięcia procesu pomocniczego `%s'"
-#: io.c:1128
+#: io.c:1056
#, c-format
msgid "no explicit close of pipe `%s' provided"
-msgstr "brak jawnego zamkniêcia potoku `%s'"
+msgstr "brak jawnego zamknięcia potoku `%s'"
-#: io.c:1131
+#: io.c:1059
#, c-format
msgid "no explicit close of file `%s' provided"
-msgstr "brak jawnego zamkniêcia pliku `%s'"
+msgstr "brak jawnego zamknięcia pliku `%s'"
-#: io.c:1159 io.c:1214 main.c:832 main.c:874
+#: io.c:1087 io.c:1142 main.c:823 main.c:865
#, c-format
msgid "error writing standard output (%s)"
-msgstr "b³±d podczas zapisu na standardowe wyj¶cie (%s)"
+msgstr "błąd podczas zapisu na standardowe wyjście (%s)"
-#: io.c:1163 io.c:1219
+#: io.c:1091 io.c:1147
#, c-format
msgid "error writing standard error (%s)"
-msgstr "b³±d podczas zapisu na standardowe wyj¶cie diagnostyczne (%s)"
+msgstr "błąd podczas zapisu na standardowe wyjście diagnostyczne (%s)"
-#: io.c:1171
+#: io.c:1099
#, c-format
msgid "pipe flush of `%s' failed (%s)."
-msgstr "opró¿nienie potoku `%s' nie powiod³o siê (%s)."
+msgstr "opróżnienie potoku `%s' nie powiodło się (%s)."
-#: io.c:1174
+#: io.c:1102
#, c-format
msgid "co-process flush of pipe to `%s' failed (%s)."
msgstr ""
-"opró¿nienie potoku do `%s' przez proces pomocniczy nie powiod³o siê (%s)."
+"opróżnienie potoku do `%s' przez proces pomocniczy nie powiodło się (%s)."
-#: io.c:1177
+#: io.c:1105
#, c-format
msgid "file flush of `%s' failed (%s)."
-msgstr "opró¿nienie pliku `%s' nie powiod³o siê (%s)."
+msgstr "opróżnienie pliku `%s' nie powiodło się (%s)."
-#: io.c:1292
+#: io.c:1219
#, c-format
msgid "local port %s invalid in `/inet'"
-msgstr "nieprawid³owy lokalny port %s w `/inet'"
+msgstr "nieprawidłowy lokalny port %s w `/inet'"
-#: io.c:1309
+#: io.c:1236
#, c-format
msgid "remote host and port information (%s, %s) invalid"
-msgstr "informacje o zdalnym ho¶cie i porcie s± nieprawid³owe (%s, %s)"
+msgstr "informacje o zdalnym hoście i porcie są nieprawidłowe (%s, %s)"
-#: io.c:1344
+#: io.c:1276
msgid "/inet/raw client not ready yet, sorry"
msgstr "klient /inet/raw nie jest jeszcze gotowy, przykro mi"
-#: io.c:1347 io.c:1383
+#: io.c:1279 io.c:1320
msgid "only root may use `/inet/raw'."
-msgstr "tylko superu¿ytkownik (root) mo¿e u¿yæ `/inet/raw'."
+msgstr "tylko superużytkownik (root) może użyć `/inet/raw'."
-#: io.c:1381
+#: io.c:1318
msgid "/inet/raw server not ready yet, sorry"
msgstr "serwer /inet/raw nie jest jeszcze gotowy, przykro mi"
-#: io.c:1477
+#: io.c:1417
#, c-format
msgid "no (known) protocol supplied in special filename `%s'"
-msgstr "nie dostarczono (znanego) protoko³u w specjalnym pliku `%s'"
+msgstr "nie dostarczono (znanego) protokołu w specjalnym pliku `%s'"
-#: io.c:1491
+#: io.c:1431
#, c-format
msgid "special file name `%s' is incomplete"
msgstr "specjalna nazwa pliku `%s' jest niekompletna"
-#: io.c:1506
+#: io.c:1447
msgid "must supply a remote hostname to `/inet'"
-msgstr "nale¿y dostarczyæ nazwê zdalnego hosta do `/inet'"
+msgstr "należy dostarczyć nazwę zdalnego hosta do `/inet'"
-#: io.c:1524
+#: io.c:1465
msgid "must supply a remote port to `/inet'"
-msgstr "nale¿y dostarczyæ numer zdalnego portu do `/inet'"
+msgstr "należy dostarczyć numer zdalnego portu do `/inet'"
-#: io.c:1570
+#: io.c:1511
msgid "TCP/IP communications are not supported"
msgstr "Komunikacja TCP/IP nie jest wspierana"
-#: io.c:1758
+#: io.c:1698
#, c-format
msgid "could not open `%s', mode `%s'"
-msgstr "nie mo¿na otworzyæ `%s', tryb `%s'"
+msgstr "nie można otworzyć `%s', tryb `%s'"
-#: io.c:1809
+#: io.c:1749
#, c-format
msgid "close of master pty failed (%s)"
-msgstr "zamkniêcie nadrzêdnego pty nie powiod³o siê (%s)"
+msgstr "zamknięcie nadrzędnego pty nie powiodło się (%s)"
-#: io.c:1811 io.c:1963 io.c:2114
+#: io.c:1751 io.c:1918 io.c:2075
#, c-format
msgid "close of stdout in child failed (%s)"
msgstr ""
-"zamkniêcie standardowego wyj¶cia w procesie potomnym nie powiod³o siê (%s)"
+"zamknięcie standardowego wyjścia w procesie potomnym nie powiodło się (%s)"
-#: io.c:1814
+#: io.c:1754
#, c-format
msgid "moving slave pty to stdout in child failed (dup: %s)"
msgstr ""
-"przesuniêcie podleg³ego pty na standardowe wyj¶cie w procesie potomnym nie "
-"powiod³o siê (dup: %s)"
+"przesunięcie podległego pty na standardowe wyjście w procesie potomnym nie "
+"powiodło się (dup: %s)"
-#: io.c:1816 io.c:1968
+#: io.c:1756 io.c:1923
#, c-format
msgid "close of stdin in child failed (%s)"
msgstr ""
-"zamkniêcie standardowego wej¶cia w procesie potomnym nie powiod³o siê (%s)"
+"zamknięcie standardowego wejścia w procesie potomnym nie powiodło się (%s)"
-#: io.c:1819
+#: io.c:1759
#, c-format
msgid "moving slave pty to stdin in child failed (dup: %s)"
msgstr ""
-"przesuniêcie podleg³ego pty na standardowe wej¶cie w procesie potomnym nie "
-"powiod³o siê (dup: %s)"
+"przesunięcie podległego pty na standardowe wejście w procesie potomnym nie "
+"powiodło się (dup: %s)"
-#: io.c:1821 io.c:1840
+#: io.c:1761 io.c:1782
#, c-format
msgid "close of slave pty failed (%s)"
-msgstr "zamkniêcie podleg³ego pty nie powiod³o siê (%s)"
+msgstr "zamknięcie podległego pty nie powiodło się (%s)"
-#: io.c:1914 io.c:1966 io.c:2095 io.c:2117
+#: io.c:1860 io.c:1921 io.c:2053 io.c:2078
#, c-format
msgid "moving pipe to stdout in child failed (dup: %s)"
msgstr ""
-"przesuniêcie potoku na standardowe wyj¶cie w procesie potomnym nie powiod³o "
-"siê (dup: %s)"
+"przesunięcie potoku na standardowe wyjście w procesie potomnym nie powiodło "
+"siÄ™ (dup: %s)"
-#: io.c:1918 io.c:1971
+#: io.c:1867 io.c:1926
#, c-format
msgid "moving pipe to stdin in child failed (dup: %s)"
msgstr ""
-"przesuniêcie potoku na standardowe wej¶cie w procesie potomnym nie powiod³o "
-"siê (dup: %s)"
+"przesunięcie potoku na standardowe wejście w procesie potomnym nie powiodło "
+"siÄ™ (dup: %s)"
-#: io.c:1935 io.c:2108
+#: io.c:1887 io.c:2068
msgid "restoring stdout in parent process failed\n"
msgstr ""
-"odzyskanie standardowego wyj¶cia w procesie potomnym nie powiod³o siê\n"
+"odzyskanie standardowego wyjścia w procesie potomnym nie powiodło się\n"
-#: io.c:1940
+#: io.c:1895
msgid "restoring stdin in parent process failed\n"
msgstr ""
-"odzyskanie standardowego wej¶cia w procesie potomnym nie powiod³o siê\n"
+"odzyskanie standardowego wejścia w procesie potomnym nie powiodło się\n"
-#: io.c:1974 io.c:2119 io.c:2130
+#: io.c:1929 io.c:2080 io.c:2094
#, c-format
msgid "close of pipe failed (%s)"
-msgstr "zamkniêcie potoku nie powiod³o siê (%s)"
+msgstr "zamknięcie potoku nie powiodło się (%s)"
-#: io.c:2019
+#: io.c:1974
msgid "`|&' not supported"
msgstr "`|&' nie jest wspierany"
-#: io.c:2085
+#: io.c:2040
#, c-format
msgid "cannot open pipe `%s' (%s)"
-msgstr "nie mo¿na otworzyæ potoku `%s' (%s)"
+msgstr "nie można otworzyć potoku `%s' (%s)"
-#: io.c:2126
+#: io.c:2088
#, c-format
msgid "cannot create child process for `%s' (fork: %s)"
-msgstr "nie mo¿na utworzyæ procesu potomnego dla `%s' (fork: %s)"
+msgstr "nie można utworzyć procesu potomnego dla `%s' (fork: %s)"
-#: io.c:2518
+#: io.c:2577
#, c-format
msgid "data file `%s' is empty"
msgstr "plik danych `%s' jest pusty"
-#: io.c:2560 io.c:2568
+#: io.c:2618 io.c:2626
msgid "could not allocate more input memory"
-msgstr "nie mo¿na zarezerwowaæ wiêcej pamiêci wej¶ciowej"
+msgstr "nie można zarezerwować więcej pamięci wejściowej"
-#: io.c:3125
+#: io.c:3173
msgid "multicharacter value of `RS' is a gawk extension"
-msgstr "wieloznakowa warto¶æ `RS' jest rozszerzeniem gawk"
+msgstr "wieloznakowa wartość `RS' jest rozszerzeniem gawk"
-#: main.c:313
+#: main.c:311
msgid "out of memory"
-msgstr ""
+msgstr "brak pamięci"
-#: main.c:381
+#: main.c:388
msgid "`-m[fr]' option irrelevant in gawk"
msgstr "nieistotna opcja `-m[fr]' w gawk"
-#: main.c:383
+#: main.c:390
msgid "-m option usage: `-m[fr] nnn'"
-msgstr "u¿ycie opcji -m: `-m[fr] nnn'"
+msgstr "użycie opcji -m: `-m[fr] nnn'"
-#: main.c:419
+#: main.c:426
#, fuzzy
msgid "empty argument to `-e/--source' ignored"
-msgstr "pusty argument dla opcji `--source' zosta³ zignorowany"
+msgstr "pusty argument dla opcji `--source' został zignorowany"
-#: main.c:485
+#: main.c:492
#, c-format
msgid "%s: option `-W %s' unrecognized, ignored\n"
msgstr "%s: opcja `-W %s' nierozpoznana i zignorowana\n"
-#: main.c:530
+#: main.c:545
#, c-format
msgid "%s: option requires an argument -- %c\n"
-msgstr "%s: opcja musi mieæ argument -- %c\n"
+msgstr "%s: opcja musi mieć argument -- %c\n"
-#: main.c:551
+#: main.c:566
msgid "environment variable `POSIXLY_CORRECT' set: turning on `--posix'"
msgstr ""
-"zmienna ¶rodowiskowa `POSIXLY_CORRECT' ustawiona: `--posix' zosta³ w³±czony"
+"zmienna środowiskowa `POSIXLY_CORRECT' ustawiona: `--posix' został włączony"
-#: main.c:557
+#: main.c:572
msgid "`--posix' overrides `--traditional'"
-msgstr "opcja `--posix' zostanie u¿yta nad `--traditional'"
+msgstr "opcja `--posix' zostanie użyta nad `--traditional'"
-#: main.c:568
+#: main.c:583
msgid "`--posix'/`--traditional' overrides `--non-decimal-data'"
-msgstr "`--posix'/`--traditional' u¿yte nad opcj± `--non-decimal-data'"
+msgstr "`--posix'/`--traditional' użyte nad opcją `--non-decimal-data'"
-#: main.c:572
+#: main.c:587
#, c-format
msgid "running %s setuid root may be a security problem"
msgstr ""
-"uruchamianie %s setuid root mo¿e byæ problemem pod wzglêdem bezpieczeñstwa"
+"uruchamianie %s setuid root może być problemem pod względem bezpieczeństwa"
-#: main.c:577
+#: main.c:592
#, fuzzy
msgid "`--posix' overrides `--binary'"
-msgstr "opcja `--posix' zostanie u¿yta nad `--traditional'"
+msgstr "opcja `--posix' zostanie użyta nad `--traditional'"
-#: main.c:622
+#: main.c:643
#, c-format
msgid "can't set binary mode on stdin (%s)"
-msgstr "nie mo¿na ustawiæ trybu binarnego na standardowym wej¶ciu (%s)"
+msgstr "nie można ustawić trybu binarnego na standardowym wejściu (%s)"
-#: main.c:625
+#: main.c:646
#, c-format
msgid "can't set binary mode on stdout (%s)"
-msgstr "nie mo¿na ustawiæ trybu binarnego na standardowym wyj¶ciu (%s)"
+msgstr "nie można ustawić trybu binarnego na standardowym wyjściu (%s)"
-#: main.c:627
+#: main.c:648
#, c-format
msgid "can't set binary mode on stderr (%s)"
-msgstr "nie mo¿na ustawiæ trybu binarnego na wyj¶ciu diagnostycznym (%s)"
+msgstr "nie można ustawić trybu binarnego na wyjściu diagnostycznym (%s)"
-#: main.c:668
+#: main.c:687
msgid "no program text at all!"
msgstr "brak tekstu programu!"
-#: main.c:773
+#: main.c:762
#, c-format
msgid "Usage: %s [POSIX or GNU style options] -f progfile [--] file ...\n"
msgstr ""
-"U¿ycie: %s [styl opcji POSIX lub GNU] -f plik_z_programem [--] plik ...\n"
+"Użycie: %s [styl opcji POSIX lub GNU] -f plik_z_programem [--] plik ...\n"
-#: main.c:775
+#: main.c:764
#, c-format
msgid "Usage: %s [POSIX or GNU style options] [--] %cprogram%c file ...\n"
-msgstr "U¿ycie: %s [styl opcji POSIX lub GNU] [--] %cprogram%c plik ...\n"
+msgstr "Użycie: %s [styl opcji POSIX lub GNU] [--] %cprogram%c plik ...\n"
-#: main.c:780
+#: main.c:769
#, fuzzy
msgid "POSIX options:\t\tGNU long options: (standard)\n"
-msgstr "Opcje POSIX:\t\tD³ugie opcje GNU:\n"
+msgstr "Opcje POSIX:\t\tDÅ‚ugie opcje GNU:\n"
-#: main.c:781
+#: main.c:770
msgid "\t-f progfile\t\t--file=progfile\n"
msgstr "\t-f program\t\t--file=program\n"
-#: main.c:782
+#: main.c:771
msgid "\t-F fs\t\t\t--field-separator=fs\n"
msgstr "\t-F fs\t\t\t--field-separator=fs\n"
-#: main.c:783
+#: main.c:772
msgid "\t-v var=val\t\t--assign=var=val\n"
-msgstr "\t-v zmienna=warto¶æ\t--assign=zmienna=warto¶æ\n"
+msgstr "\t-v zmienna=wartość\t--assign=zmienna=wartość\n"
-#: main.c:784
+#: main.c:773
#, fuzzy
-msgid "POSIX options:\t\tGNU long options: (extensions)\n"
-msgstr "Opcje POSIX:\t\tD³ugie opcje GNU:\n"
+msgid "Short options:\t\tGNU long options: (extensions)\n"
+msgstr "Opcje POSIX:\t\tDÅ‚ugie opcje GNU:\n"
-#: main.c:785
+#: main.c:774
msgid "\t-m[fr] val\n"
-msgstr "\t-m[fr] warto¶æ\n"
+msgstr "\t-m[fr] wartość\n"
-#: main.c:786
+#: main.c:775
msgid "\t-b\t\t\t--characters-as-bytes\n"
msgstr ""
-#: main.c:787
-msgid "\t-c\t\t\t--compat, --traditional\n"
-msgstr ""
+#: main.c:776
+#, fuzzy
+msgid "\t-c\t\t\t--traditional\n"
+msgstr "\t-W traditional\t\t--traditional\n"
-#: main.c:788
+#: main.c:777
#, fuzzy
-msgid "\t-C\t\t\t--copyleft, --copyright\n"
+msgid "\t-C\t\t\t--copyright\n"
msgstr "\t-W copyright\t\t--copyright\n"
-#: main.c:789
+#: main.c:778
#, fuzzy
msgid "\t-d [file]\t\t--dump-variables[=file]\n"
msgstr "\t-W dump-variables[=plik]\t--dump-variables[=plik]\n"
-#: main.c:790
+#: main.c:779
#, fuzzy
msgid "\t-e 'program-text'\t--source='program-text'\n"
msgstr "\t-W source=tekst-programu\t--source=tekst-programu\n"
-#: main.c:791
+#: main.c:780
#, fuzzy
msgid "\t-E file\t\t\t--exec=file\n"
msgstr "\t-W exec=plik\t\t--exec=plik\n"
-#: main.c:792
+#: main.c:781
#, fuzzy
msgid "\t-g\t\t\t--gen-pot\n"
msgstr "\t-W gen-po\t\t--gen-po\n"
-#: main.c:793
+#: main.c:782
#, fuzzy
-msgid "\t-h\t\t\t--help, --usage\n"
+msgid "\t-h\t\t\t--help\n"
msgstr "\t-W help\t\t\t--help\n"
-#: main.c:794
+#: main.c:783
#, fuzzy
-msgid "\t-l [fatal]\t\t--lint[=fatal]\n"
+msgid "\t-L [fatal]\t\t--lint[=fatal]\n"
msgstr "\t-W lint[=fatal]\t\t--lint[=fatal]\n"
-#: main.c:795
-#, fuzzy
-msgid "\t-L\t\t\t--lint-old\n"
-msgstr "\t-W lint-old\t\t--lint-old\n"
-
-#: main.c:796
+#: main.c:784
#, fuzzy
msgid "\t-n\t\t\t--non-decimal-data\n"
msgstr "\t-W non-decimal-data\t--non-decimal-data\n"
-#: main.c:797
+#: main.c:785
+#, fuzzy
msgid "\t-N\t\t\t--use-lc-numeric\n"
-msgstr ""
+msgstr "\t-W use-lc-numeric\t--use-lc-numeric\n"
-#: main.c:798
+#: main.c:786
msgid "\t-O\t\t\t--optimize\n"
-msgstr ""
+msgstr "\t-O\t\t\t--optimize\n"
-#: main.c:799
+#: main.c:787
#, fuzzy
msgid "\t-p [file]\t\t--profile[=file]\n"
msgstr "\t-W profile[=plik]\t--profile[=plik]\n"
-#: main.c:800
+#: main.c:788
#, fuzzy
msgid "\t-P\t\t\t--posix\n"
msgstr "\t-W posix\t\t--posix\n"
-#: main.c:801
+#: main.c:789
#, fuzzy
msgid "\t-r\t\t\t--re-interval\n"
msgstr "\t-W re-interval\t\t--re-interval\n"
-#: main.c:802
+#: main.c:791
#, fuzzy
+msgid "\t-R file\t\t\t--command=file\n"
+msgstr "\t-W exec=plik\t\t--exec=plik\n"
+
+#: main.c:792
msgid "\t-S\t\t\t--sandbox\n"
-msgstr "\t-W posix\t\t--posix\n"
+msgstr ""
-#: main.c:803
+#: main.c:793
+#, fuzzy
+msgid "\t-t\t\t\t--lint-old\n"
+msgstr "\t-W lint-old\t\t--lint-old\n"
+
+#: main.c:794
#, fuzzy
msgid "\t-V\t\t\t--version\n"
msgstr "\t-W version\t\t--version\n"
-#: main.c:805
+#: main.c:796
msgid "\t-W nostalgia\t\t--nostalgia\n"
msgstr "\t-W nostalgia\t\t--nostalgia\n"
-#: main.c:808
-msgid "\t-W parsedebug\t\t--parsedebug\n"
+#: main.c:799
+#, fuzzy
+msgid "\t-Y\t\t--parsedebug\n"
msgstr "\t-W parsedebug\t\t--parsedebug\n"
#. TRANSLATORS: --help output 5 (end)
@@ -1773,7 +1716,7 @@ msgstr "\t-W parsedebug\t\t--parsedebug\n"
#. for this application. Please add _another line_ with the
#. address for translation bugs.
#. no-wrap
-#: main.c:817
+#: main.c:808
msgid ""
"\n"
"To report bugs, see node `Bugs' in `gawk.info', which is\n"
@@ -1781,32 +1724,32 @@ msgid ""
"\n"
msgstr ""
"\n"
-"Aby zg³osiæ b³±d, prosimy zobaczyæ wêze³ `Bugs' w `gawk.info'\n"
-"lub rozdzia³ p.t. `Reporting Problems and Bugs' w wydrukowanej\n"
+"Aby zgłosić błąd, prosimy zobaczyć węzeł `Bugs' w `gawk.info'\n"
+"lub rozdział p.t. `Reporting Problems and Bugs' w wydrukowanej\n"
"dokumentacji.\n"
"\n"
-#: main.c:821
+#: main.c:812
msgid ""
"gawk is a pattern scanning and processing language.\n"
"By default it reads standard input and writes standard output.\n"
"\n"
msgstr ""
-"gawk jest jêzykiem skanowania i przetwarzania wzorców.\n"
-"Program domy¶lnie czyta standardowe wej¶cie i zapisuje standardowe wyj¶cie.\n"
+"gawk jest językiem skanowania i przetwarzania wzorców.\n"
+"Program domyślnie czyta standardowe wejście i zapisuje standardowe wyjście.\n"
"\n"
-#: main.c:825
+#: main.c:816
msgid ""
"Examples:\n"
"\tgawk '{ sum += $1 }; END { print sum }' file\n"
"\tgawk -F: '{ print $1 }' /etc/passwd\n"
msgstr ""
-"Przyk³ady:\n"
+"Przykłady:\n"
"\tgawk '{ suma += $1 }; END { print suma }' plik\n"
"\tgawk -F: '{ print $1 }' /etc/passwd\n"
-#: main.c:845
+#: main.c:836
#, c-format
msgid ""
"Copyright (C) 1989, 1991-%d Free Software Foundation.\n"
@@ -1819,13 +1762,13 @@ msgid ""
msgstr ""
"Copyright (C) 1989, 1991-%d Free Software Foundation.\n"
"\n"
-"Ten program jest wolnym oprogramowaniem; mo¿esz go rozprowadzaæ dalej\n"
-"i/lub modyfikowaæ na warunkach Powszechnej Licencji Publicznej GNU,\n"
-"wydanej przez Fundacjê Wolnego Oprogramowania - wed³ug wersji 3-giej\n"
-"tej Licencji lub której¶ z pó¼niejszych wersji.\n"
+"Ten program jest wolnym oprogramowaniem; możesz go rozprowadzać dalej\n"
+"i/lub modyfikować na warunkach Powszechnej Licencji Publicznej GNU,\n"
+"wydanej przez Fundację Wolnego Oprogramowania - według wersji 3-ciej\n"
+"tej Licencji lub którejś z późniejszych wersji.\n"
"\n"
-#: main.c:853
+#: main.c:844
msgid ""
"This program is distributed in the hope that it will be useful,\n"
"but WITHOUT ANY WARRANTY; without even the implied warranty of\n"
@@ -1833,210 +1776,174 @@ msgid ""
"GNU General Public License for more details.\n"
"\n"
msgstr ""
-"Ten program rozpowszechniany jest z nadziej±, i¿ bêdzie on\n"
-"u¿yteczny - jednak BEZ JAKIEJKOLWIEK GWARANCJI, nawet domy¶lnej\n"
-"gwarancji PRZYDATNO¦CI HANDLOWEJ albo PRZYDATNO¦CI DO OKRE¦LONYCH\n"
-"ZASTOSOWAÑ. W celu uzyskania bli¿szych informacji przeczytaj\n"
-"Powszechn± Licencjê Publiczn± GNU.\n"
+"Ten program rozpowszechniany jest z nadzieją, iż będzie on\n"
+"użyteczny - jednak BEZ JAKIEJKOLWIEK GWARANCJI, nawet domyślnej\n"
+"gwarancji PRZYDATNOÅšCI HANDLOWEJ albo PRZYDATNOÅšCI DO OKREÅšLONYCH\n"
+"ZASTOSOWAŃ. W celu uzyskania bliższych informacji przeczytaj\n"
+"PowszechnÄ… LicencjÄ™ PublicznÄ… GNU.\n"
"\n"
-#: main.c:864
-#, fuzzy
+#: main.c:855
msgid ""
"You should have received a copy of the GNU General Public License\n"
"along with this program. If not, see http://www.gnu.org/licenses/.\n"
msgstr ""
-"Z pewno¶ci± wraz z niniejszym programem otrzyma³e¶ te¿ egzemplarz\n"
+"Z pewnością wraz z niniejszym programem otrzymałeś też egzemplarz\n"
"Powszechnej Licencji Publicznej GNU (GNU General Public License);\n"
-"je¶li za¶ nie - napisz do Free Software Foundation, Inc.,\n"
-"51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.\n"
+"jeśli zaś nie - odwiedź stronę http://www.gnu.org/licenses/.\n"
-#: main.c:899
+#: main.c:890
msgid "-Ft does not set FS to tab in POSIX awk"
msgstr "-Ft nie ustawia FS na znak tabulatora w POSIX awk"
-#: main.c:1116
+#: main.c:1122
#, c-format
msgid "unknown value for field spec: %d\n"
msgstr ""
-#: main.c:1176
+#: main.c:1182
#, c-format
msgid ""
"%s: `%s' argument to `-v' not in `var=value' form\n"
"\n"
msgstr ""
-"%s: argument `%s' dla `-v' nie jest zgodny ze sk³adni± `zmienna=warto¶æ'\n"
+"%s: argument `%s' dla `-v' nie jest zgodny ze składnią `zmienna=wartość'\n"
"\n"
-#: main.c:1196
+#: main.c:1202
#, c-format
msgid "`%s' is not a legal variable name"
-msgstr "`%s' nie jest dozwolon± nazw± zmiennej"
+msgstr "`%s' nie jest dozwolonÄ… nazwÄ… zmiennej"
-#: main.c:1199
+#: main.c:1205
#, c-format
msgid "`%s' is not a variable name, looking for file `%s=%s'"
-msgstr "`%s' nie jest nazw± zmiennej, szukanie pliku `%s=%s'"
+msgstr "`%s' nie jest nazwÄ… zmiennej, szukanie pliku `%s=%s'"
-#: main.c:1238
+#: main.c:1258
msgid "floating point exception"
-msgstr "wyj±tek zmiennopozycyjny"
+msgstr "wyjÄ…tek zmiennopozycyjny"
-#: main.c:1245
+#: main.c:1265
msgid "fatal error: internal error"
-msgstr "fatalny b³±d: wewnêtrzny b³±d"
+msgstr "fatalny błąd: wewnętrzny błąd"
-#: main.c:1260
-#, fuzzy
+#: main.c:1280
msgid "fatal error: internal error: segfault"
-msgstr "fatalny b³±d: wewnêtrzny b³±d"
+msgstr "fatalny błąd: wewnętrzny błąd: błąd segmentacji"
-#: main.c:1272
-#, fuzzy
+#: main.c:1292
msgid "fatal error: internal error: stack overflow"
-msgstr "fatalny b³±d: wewnêtrzny b³±d"
+msgstr "fatalny błąd: wewnętrzny błąd: przepełnienie stosu"
-#: main.c:1322
+#: main.c:1342
#, c-format
msgid "no pre-opened fd %d"
-msgstr "brak ju¿ otwartego fd %d"
+msgstr "brak już otwartego fd %d"
-#: main.c:1329
+#: main.c:1349
#, c-format
msgid "could not pre-open /dev/null for fd %d"
-msgstr "nie mo¿na otworzyæ zawczasu /dev/null dla fd %d"
+msgstr "nie można otworzyć zawczasu /dev/null dla fd %d"
-#: main.c:1352 main.c:1361
+#: main.c:1372 main.c:1381
#, c-format
msgid "could not find groups: %s"
-msgstr "nie mo¿na znale¼æ grup: %s"
+msgstr "nie można znaleźć grup: %s"
-#: msg.c:54
+#: msg.c:62
#, c-format
msgid "cmd. line:"
-msgstr "linia poleceñ:"
+msgstr "linia poleceń:"
-#: msg.c:120
+#: msg.c:97
msgid "warning: "
-msgstr "ostrze¿enie: "
+msgstr "ostrzeżenie: "
-#: msg.c:142
+#: msg.c:106
msgid "error: "
-msgstr "b³±d: "
+msgstr "błąd: "
-#: msg.c:178
+#: msg.c:129
msgid "fatal: "
-msgstr "fatalny b³±d: "
+msgstr "fatalny błąd: "
-#: node.c:63 node.c:78 node.c:105 node.c:121 node.c:151
-msgid "can't convert string to float"
-msgstr "nie mo¿na zamieniæ ³añcucha do liczby zmiennopozycyjnej"
-
-#: node.c:465
+#: node.c:401
msgid "backslash at end of string"
-msgstr "backslash na koñcu ³añcucha"
+msgstr "backslash na końcu łańcucha"
-#: node.c:609
+#: node.c:502
#, c-format
msgid "old awk does not support the `\\%c' escape sequence"
msgstr "stary awk nie wspiera sekwencji ucieczki `\\%c'"
-#: node.c:660
+#: node.c:553
msgid "POSIX does not allow `\\x' escapes"
-msgstr "POSIX nie zezwala na sekwencjê ucieczki `\\x'"
+msgstr "POSIX nie zezwala na sekwencjÄ™ ucieczki `\\x'"
-#: node.c:666
+#: node.c:559
msgid "no hex digits in `\\x' escape sequence"
msgstr "brak liczb szesnastkowych w sekwencji ucieczki `\\x'"
-#: node.c:688
+#: node.c:581
#, c-format
msgid ""
"hex escape \\x%.*s of %d characters probably not interpreted the way you "
"expect"
msgstr ""
+"szesnastkowa sekwencja ucieczki \\x%.*s %d znaków prawdopodobnie nie została "
+"zinterpretowana jak tego oczekujesz"
-#: node.c:703
+#: node.c:596
#, c-format
msgid "escape sequence `\\%c' treated as plain `%c'"
-msgstr "sekwencja ucieczki `\\%c' potraktowana jako zwyk³e `%c'"
+msgstr "sekwencja ucieczki `\\%c' potraktowana jako zwykłe `%c'"
+
+#: node.c:737
+msgid ""
+"Invalid multibyte data detected. There may be a mismatch between your data "
+"and your locale."
+msgstr ""
#: posix/gawkmisc.c:172
#, c-format
msgid "%s %s `%s': could not set close-on-exec: (fcntl: %s)"
-msgstr "%s %s `%s': nie mo¿na ustawiæ close-on-exec: (fcntl: %s)"
+msgstr "%s %s `%s': nie można ustawić close-on-exec: (fcntl: %s)"
-#: profile.c:94
+#: profile.c:83
#, c-format
msgid "could not open `%s' for writing: %s"
-msgstr "nie mo¿na otworzyæ `%s' do zapisu: %s"
-
-#: profile.c:457
-#, c-format
-msgid "internal error: %s with null vname"
-msgstr "wewnêtrzny b³±d: %s z zerowym vname"
-
-#: profile.c:522
-msgid "# treated internally as `delete'"
-msgstr "# potraktowany wewnêtrznie jako `delete'"
-
-#: profile.c:1076
-#, c-format
-msgid "# this is a dynamically loaded extension function"
-msgstr "# to jest dynamicznie ³adowana funkcja rozszerzenie"
+msgstr "nie można otworzyć `%s' do zapisu: %s"
-#: profile.c:1109
-#, c-format
-msgid "\t# gawk profile, created %s\n"
-msgstr "\t# profil programu gawk, utworzony %s\n"
-
-#: profile.c:1112
-#, c-format
+#: profile.c:203
+#, fuzzy, c-format
msgid ""
-"\t# BEGIN block(s)\n"
+"\t# %s block(s)\n"
"\n"
msgstr ""
-"\t# blok(i) BEGIN\n"
+"\t# blok(i) END\n"
"\n"
-#: profile.c:1122
+#: profile.c:208
#, fuzzy, c-format
msgid ""
-"\t# BEGINFILE block(s)\n"
+"\t# %s(s)\n"
"\n"
msgstr ""
-"\t# blok(i) BEGIN\n"
+"\t# Reguły\n"
"\n"
-#: profile.c:1132
+#: profile.c:278
#, c-format
-msgid ""
-"\t# Rule(s)\n"
-"\n"
-msgstr ""
-"\t# Regu³y\n"
-"\n"
-
-#: profile.c:1138
-#, fuzzy, c-format
-msgid ""
-"\t# ENDFILE block(s)\n"
-"\n"
-msgstr ""
-"\t# blok(i) END\n"
-"\n"
+msgid "internal error: %s with null vname"
+msgstr "wewnętrzny błąd: %s z zerowym vname"
-#: profile.c:1148
+#: profile.c:945
#, c-format
-msgid ""
-"\t# END block(s)\n"
-"\n"
-msgstr ""
-"\t# blok(i) END\n"
-"\n"
+msgid "\t# gawk profile, created %s\n"
+msgstr "\t# profil programu gawk, utworzony %s\n"
-#: profile.c:1168
+#: profile.c:1328
#, c-format
msgid ""
"\n"
@@ -2045,17 +1952,12 @@ msgstr ""
"\n"
"\t# Funkcje, spis alfabetyczny\n"
-#: profile.c:1431
+#: profile.c:1367
#, c-format
-msgid "unexpected type %s in prec_level"
-msgstr "niespodziewany typ %s w prec_level"
-
-#: profile.c:1557
-#, fuzzy, c-format
-msgid "Unknown node type %s in pp_var"
-msgstr "nieznany typ wêz³a %d"
+msgid "redir2str: unknown redirection type %d"
+msgstr ""
-#: re.c:537
+#: re.c:559
#, c-format
msgid "regexp component `%.*s' should probably be `[%.*s]'"
msgstr ""
@@ -2070,23 +1972,23 @@ msgstr "Brak dopasowania"
#: regcomp.c:138
msgid "Invalid regular expression"
-msgstr "Nieprawid³owe wyra¿enie regularne"
+msgstr "Nieprawidłowe wyrażenie regularne"
#: regcomp.c:141
msgid "Invalid collation character"
-msgstr "Nieprawid³owy znak porównania"
+msgstr "Nieprawidłowy znak porównania"
#: regcomp.c:144
msgid "Invalid character class name"
-msgstr "Nieprawid³owa nazwa klasy znaku"
+msgstr "Nieprawidłowa nazwa klasy znaku"
#: regcomp.c:147
msgid "Trailing backslash"
-msgstr "Koñcowy znak backslash"
+msgstr "Końcowy znak backslash"
#: regcomp.c:150
msgid "Invalid back reference"
-msgstr "Nieprawid³owe odwo³anie wsteczne"
+msgstr "Nieprawidłowe odwołanie wsteczne"
#: regcomp.c:153
msgid "Unmatched [ or [^"
@@ -2102,45 +2004,67 @@ msgstr "Niedopasowany znak \\{"
#: regcomp.c:162
msgid "Invalid content of \\{\\}"
-msgstr "Nieprawid³owa zawarto¶æ \\{\\}"
+msgstr "Nieprawidłowa zawartość \\{\\}"
#: regcomp.c:165
msgid "Invalid range end"
-msgstr "Nieprawid³owy koniec zakresu"
+msgstr "Nieprawidłowy koniec zakresu"
#: regcomp.c:168
msgid "Memory exhausted"
-msgstr "Pamiêæ wyczerpana"
+msgstr "Pamięć wyczerpana"
#: regcomp.c:171
msgid "Invalid preceding regular expression"
-msgstr "Nieprawid³owe poprzedzaj±ce wyra¿enie regularne"
+msgstr "Nieprawidłowe poprzedzające wyrażenie regularne"
#: regcomp.c:174
msgid "Premature end of regular expression"
-msgstr "Przedwczesny koniec wyra¿enia regularnego"
+msgstr "Przedwczesny koniec wyrażenia regularnego"
#: regcomp.c:177
msgid "Regular expression too big"
-msgstr "Wyra¿enie regularne jest zbyt du¿e"
+msgstr "Wyrażenie regularne jest zbyt duże"
#: regcomp.c:180
msgid "Unmatched ) or \\)"
msgstr "Niedopasowany znak ) lub \\)"
-#: regcomp.c:699
+#: regcomp.c:701
msgid "No previous regular expression"
-msgstr "Brak poprzedniego wyra¿enia regularnego"
+msgstr "Brak poprzedniego wyrażenia regularnego"
-#~ msgid "%s: illegal option -- %c\n"
-#~ msgstr "%s: niew³a¶ciwa opcja -- %c\n"
+#~ msgid "call of `length' without parentheses is deprecated by POSIX"
+#~ msgstr ""
+#~ "wywołanie `length' bez podania nawiasów jest niezalecane przez POSIX"
+
+#, fuzzy
+#~ msgid "reference to uninitialized field `$%s'"
+#~ msgstr "odwołanie do niezainicjowanego pola `$%d'"
+
+#~ msgid "can't convert string to float"
+#~ msgstr "nie można zamienić łańcucha do liczby zmiennopozycyjnej"
+
+#~ msgid "`continue' outside a loop is not portable"
+#~ msgstr "instrukcja `continue' poza pętlą jest nieprzenośna"
+
+#~ msgid "`break' outside a loop is not portable"
+#~ msgstr "instrukcja `break' poza pętlą jest nieprzenośna"
+
+#~ msgid "`nextfile' cannot be called from a BEGIN rule"
+#~ msgstr "instrukcja `nextfile' nie może być wywołana z wnętrza reguły BEGIN"
+
+#~ msgid "`next' cannot be called from a BEGIN rule"
+#~ msgstr "instrukcja `next' nie może być wywołana z wnętrza reguły BEGIN"
#~ msgid "file `%s' is a directory"
#~ msgstr "plik `%s' jest katalogiem"
-#~ msgid "can't open two way socket `%s' for input/output (%s)"
-#~ msgstr ""
-#~ "nie mo¿na otworzyæ dwukierunkowego gniazda `%s' jako wej¶cia/wyj¶cia (%s)"
+#~ msgid "use `PROCINFO[\"%s\"]' instead of `%s'"
+#~ msgstr "użyj `PROCINFO[\"%s\"]' zamiast `%s'"
+
+#~ msgid "use `PROCINFO[...]' instead of `/dev/user'"
+#~ msgstr "użyj `PROCINFO[...]' zamiast `/dev/user'"
#~ msgid "\t-W compat\t\t--compat\n"
#~ msgstr "\t-W compat\t\t--compat\n"
@@ -2148,80 +2072,165 @@ msgstr "Brak poprzedniego wyra¿enia regularnego"
#~ msgid "\t-W copyleft\t\t--copyleft\n"
#~ msgstr "\t-W copyleft\t\t--copyleft\n"
-#~ msgid "\t-W traditional\t\t--traditional\n"
-#~ msgstr "\t-W traditional\t\t--traditional\n"
-
#~ msgid "\t-W usage\t\t--usage\n"
#~ msgstr "\t-W usage\t\t--usage\n"
-#, fuzzy
-#~ msgid "seek: invalid arguments"
-#~ msgstr "printf: brak argumentów"
+#~ msgid ""
+#~ "\t# BEGIN block(s)\n"
+#~ "\n"
+#~ msgstr ""
+#~ "\t# blok(i) BEGIN\n"
+#~ "\n"
-#, fuzzy
-#~ msgid "seek: `%.*s' is not an open file, pipe, or co-process"
+#~ msgid "must use `count$' on all formats or none"
+#~ msgstr "należy użyć `count$' we wszystkich formatach lub nic"
+
+#~ msgid "field width is ignored for `%%%%' specifier"
+#~ msgstr "szerokość pola jest ignorowana dla specyfikatora `%%%%'"
+
+#~ msgid "precision is ignored for `%%%%' specifier"
+#~ msgstr "precyzja jest ignorowana dla specyfikatora `%%%%'"
+
+#~ msgid "field width and precision are ignored for `%%%%' specifier"
+#~ msgstr "szerokość pola i precyzja są ignorowane dla specyfikatora `%%%%'"
+
+#~ msgid "`$' is not permitted in awk formats"
+#~ msgstr "`$' jest niedozwolony w formatach awk"
+
+#~ msgid "arg count with `$' must be > 0"
+#~ msgstr "argument count z `$' musi być > 0"
+
+#~ msgid "arg count %ld greater than total number of supplied arguments"
#~ msgstr ""
-#~ "close: `%.*s' nie jest ani otwartym plikiem, ani potokiem, ani procesem"
+#~ "argument count %ld większy niż całkowita suma argumentów dostarczonych"
+
+#~ msgid "`$' not permitted after period in format"
+#~ msgstr "`$' jest niedozwolony po kropce w formacie"
+
+#~ msgid "no `$' supplied for positional field width or precision"
+#~ msgstr "brak `$' dla pozycyjnej szerokości pola lub precyzji"
+
+#~ msgid "`l' is meaningless in awk formats; ignored"
+#~ msgstr "`l' jest bezsensowny w formatach awk; zignorowany"
+
+#~ msgid "`l' is not permitted in POSIX awk formats"
+#~ msgstr "`l' jest niedozwolony w formatach POSIX awk"
+
+#~ msgid "`L' is meaningless in awk formats; ignored"
+#~ msgstr "`L' jest bezsensowny w formatach awk; zignorowany"
+
+#~ msgid "`L' is not permitted in POSIX awk formats"
+#~ msgstr "`L' jest niedozwolony w formatach POSIX awk"
+
+#~ msgid "`h' is meaningless in awk formats; ignored"
+#~ msgstr "`h' jest bezsensowny w formatach awk; zignorowany"
+
+#~ msgid "`h' is not permitted in POSIX awk formats"
+#~ msgstr "`h' jest niedozwolony w formatach POSIX awk"
+
+#~ msgid "[s]printf: value %g is out of range for `%%%c' format"
+#~ msgstr "[s]printf: wartość %g jest poza zasięgiem dla formatu `%%%c'"
+
+#~ msgid ""
+#~ "ignoring unknown format specifier character `%c': no argument converted"
+#~ msgstr ""
+#~ "pominięcie nieznanego formatu specyfikatora znaku `%c': nie skonwertowano "
+#~ "argumentu"
+
+#~ msgid "not enough arguments to satisfy format string"
+#~ msgstr ""
+#~ "brak wystarczającej liczby argumentów, aby zaspokoić łańcuch formatujący"
+
+#~ msgid "^ ran out for this one"
+#~ msgstr "zabrakło ^"
+
+#~ msgid "[s]printf: format specifier does not have control letter"
+#~ msgstr "[s]printf: specyfikator formatu nie posiada kontrolnej litery"
+
+#~ msgid "too many arguments supplied for format string"
+#~ msgstr "zbyt dużo podanych argumentów w łańcuchu formatującym"
#, fuzzy
-#~ msgid "seek: `%.*s' is not an input file, pipe, or co-process"
+#~ msgid "attempt to use array parameter `%s' in a scalar context"
+#~ msgstr "próba użycia tablicy `%s' w kontekście skalaru"
+
+#~ msgid "can't open two way socket `%s' for input/output (%s)"
#~ msgstr ""
-#~ "close: `%.*s' nie jest ani otwartym plikiem, ani potokiem, ani procesem"
+#~ "nie można otworzyć dwukierunkowego gniazda `%s' jako wejścia/wyjścia (%s)"
+
+#~ msgid "length: untyped argument will be forced to scalar"
+#~ msgstr "length: argument bez określonego typu zostanie uznany za skalar"
+
+#~ msgid ""
+#~ "concatenation: side effects in one expression have changed the length of "
+#~ "another!"
+#~ msgstr ""
+#~ "konkatenacja: skutki uboczne w jednym wyrażeniu spowodowały zmianę "
+#~ "długości innego wyrażenia!"
+
+#~ msgid "illegal type (%s) in tree_eval"
+#~ msgstr "nieprawidłowy typ (%s) w tree_eval"
+
+#~ msgid "\t# -- main --\n"
+#~ msgstr "\t# -- główne --\n"
+
+#~ msgid "invalid tree type %s in redirect()"
+#~ msgstr "nieprawidłowy typ drzewa %s w funkcji redirect()"
#, fuzzy
-#~ msgid "seek: `%.*s' is not a regular file"
-#~ msgstr "`%s' nie jest dozwolon± nazw± zmiennej"
+#~ msgid "# treated internally as `delete'"
+#~ msgstr "# potraktowany wewnętrznie jako `delete"
-#~ msgid "use `PROCINFO[\"%s\"]' instead of `%s'"
-#~ msgstr "u¿yj `PROCINFO[\"%s\"]' zamiast `%s'"
+#~ msgid "# this is a dynamically loaded extension function"
+#~ msgstr "# to jest dynamicznie Å‚adowana funkcja rozszerzenie"
-#~ msgid "use `PROCINFO[...]' instead of `/dev/user'"
-#~ msgstr "u¿yj `PROCINFO[...]' zamiast `/dev/user'"
+#~ msgid "unexpected type %s in prec_level"
+#~ msgstr "niespodziewany typ %s w prec_level"
+
+#~ msgid "Unknown node type %s in pp_var"
+#~ msgstr "Nieznany typ węzła %s w pp_var"
+
+#~ msgid "%s: illegal option -- %c\n"
+#~ msgstr "%s: niewłaściwa opcja -- %c\n"
#~ msgid "function %s called\n"
-#~ msgstr "wywo³ano funkcjê %s\n"
+#~ msgstr "wywołano funkcję %s\n"
#~ msgid "field %d in FIELDWIDTHS, must be > 0"
-#~ msgstr "pole nr %d w FIELDWIDTHS musi byæ wiêksze od zera"
+#~ msgstr "pole nr %d w FIELDWIDTHS musi być większe od zera"
#~ msgid "delete: illegal use of variable `%s' as array"
-#~ msgstr "delete: nieprawid³owe u¿ycie zmiennej `%s' jako tablicy"
-
-#~ msgid "asort: first argument is not an array"
-#~ msgstr "asort: pierwszy argument nie jest tablic±"
-
-#~ msgid "asort: second argument is not an array"
-#~ msgstr "asort: drugi argument nie jest tablic±"
+#~ msgstr "delete: nieprawidłowe użycie zmiennej `%s' jako tablicy"
#~ msgid ""
#~ "\n"
#~ "To report bugs, see node `Bugs' in `gawk.info', which is\n"
#~ msgstr ""
#~ "\n"
-#~ "Aby zg³osiæ b³êdy, prosimy zobaczyæ wêze³ `Bugs' w `gawk.info', który "
+#~ "Aby zgłosić błędy, prosimy zobaczyć węzeł `Bugs' w `gawk.info', który "
#~ "jest\n"
#~ msgid "invalid syntax in name `%s' for variable assignment"
-#~ msgstr "b³±d sk³adni w nazwie `%s' dla przypisania zmiennej"
+#~ msgstr "błąd składni w nazwie `%s' dla przypisania zmiennej"
#~ msgid "internal error: Node_var_array with null vname"
-#~ msgstr "wewnêtrzny b³±d: Node_var_array z zerowym vname"
+#~ msgstr "wewnętrzny błąd: Node_var_array z zerowym vname"
#~ msgid "or used in other expression context"
-#~ msgstr "lub u¿yty w innym kontek¶cie wyra¿enia"
+#~ msgstr "lub użyty w innym kontekście wyrażenia"
#~ msgid "`%s' is a function, assignment is not allowed"
-#~ msgstr "`%s' jest funkcj±, zatem przypisanie nie jest dozwolone"
+#~ msgstr "`%s' jest funkcjÄ…, zatem przypisanie nie jest dozwolone"
#~ msgid "BEGIN blocks must have an action part"
-#~ msgstr "Blok BEGIN musi posiadaæ czê¶æ dotycz±c± akcji"
+#~ msgstr "Blok BEGIN musi posiadać część dotyczącą akcji"
#~ msgid "`nextfile' used in BEGIN or END action"
-#~ msgstr "`nextfile' u¿yty w akcji BEGIN lub END"
+#~ msgstr "`nextfile' użyty w akcji BEGIN lub END"
#~ msgid "non-redirected `getline' undefined inside BEGIN or END action"
#~ msgstr ""
-#~ "komenda `getline' bez przekierowania nie jest zdefiniowana wewn±trz akcji "
+#~ "komenda `getline' bez przekierowania nie jest zdefiniowana wewnÄ…trz akcji "
#~ "BEGIN lub END"
#~ msgid "fptr %x not in tokentab\n"
diff --git a/po/pt_BR.gmo b/po/pt_BR.gmo
index 2d34f76d..60fe55fa 100644
--- a/po/pt_BR.gmo
+++ b/po/pt_BR.gmo
Binary files differ
diff --git a/po/pt_BR.po b/po/pt_BR.po
index 3fa821a4..84d79677 100644
--- a/po/pt_BR.po
+++ b/po/pt_BR.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: gawk 3.1.2g\n"
"Report-Msgid-Bugs-To: arnold@skeeve.com\n"
-"POT-Creation-Date: 2010-11-12 12:20+0200\n"
+"POT-Creation-Date: 2010-11-17 08:48+0200\n"
"PO-Revision-Date: 2003-06-26 16:18+0300\n"
"Last-Translator: Juan Carlos Castro y Castro <jcastro@vialink.com.br>\n"
"Language-Team: Brazilian Portuguese <ldp-br@bazar.conectiva.com.br>\n"
@@ -15,405 +15,482 @@ msgstr ""
"Content-Type: text/plain; charset=iso-8859-1\n"
"Content-Transfer-Encoding: 8bit\n"
-#: array.c:112
+#: array.c:103
+#, c-format
+msgid "from %s"
+msgstr "de %s"
+
+#: array.c:267
+#, fuzzy
+msgid "attempt to use a scalar value as array"
+msgstr "tentativa de usar escalar `%s' como vetor"
+
+#: array.c:270
#, fuzzy, c-format
msgid "attempt to use function `%s' as an array"
msgstr "tentativa de usar escalar `%s' como vetor"
-#: array.c:115
+#: array.c:273
#, c-format
msgid "attempt to use scalar parameter `%s' as an array"
msgstr "tentativa de usar parâmetro escalar `%s' como vetor"
-#: array.c:118
+#: array.c:276
#, c-format
msgid "attempt to use scalar `%s' as array"
msgstr "tentativa de usar escalar `%s' como vetor"
-#: array.c:156
+#: array.c:321 array.c:648 eval.c:1075 eval.c:1079 eval.c:1581 eval.c:1649
+#: eval.c:1928
#, c-format
-msgid "from %s"
-msgstr "de %s"
+msgid "attempt to use array `%s' in a scalar context"
+msgstr "tentativa de usar vetor `%s' em um contexto escalar"
-#: array.c:513
+#: array.c:570
#, fuzzy, c-format
msgid "reference to uninitialized element `%s[\"%.*s\"]'"
msgstr "referência a elemento não inicializado `%s[\"%s\"]'"
-#: array.c:519
+#: array.c:576
#, c-format
msgid "subscript of array `%s' is null string"
msgstr "índice do vetor `%s' é uma string nula"
-#: array.c:623
+#: array.c:684
#, c-format
msgid "delete: index `%s' not in array `%s'"
msgstr "delete: índice `%s' não está no vetor `%s'"
-#: array.c:792
+#: array.c:705
+#, fuzzy, c-format
+msgid "attempt to use scalar `%s[\"%.*s\"]' as an array"
+msgstr "tentativa de usar escalar `%s' como vetor"
+
+#: array.c:868
#, c-format
msgid "%s: empty (null)\n"
msgstr "%s: vazio (nulo)\n"
-#: array.c:797
+#: array.c:873
#, c-format
msgid "%s: empty (zero)\n"
msgstr "%s: vazio (zero)\n"
-#: array.c:801
+#: array.c:877
#, c-format
msgid "%s: table_size = %d, array_size = %d\n"
msgstr "%s: table_size = %d, array_size = %d\n"
-#: array.c:830
+#: array.c:912
#, c-format
msgid "%s: is parameter\n"
msgstr "%s: é parâmetro\n"
-#: array.c:835
+#: array.c:916
#, c-format
msgid "%s: array_ref to %s\n"
msgstr "%s: array_ref para %s\n"
-#: awkgram.y:224 awkgram.y:227
+#: array.c:921
+#, fuzzy
+msgid "adump: argument not an array"
+msgstr "asort: primeiro argumento não é um vetor"
+
+#: array.c:1139
+#, fuzzy
+msgid "attempt to use array in a scalar context"
+msgstr "tentativa de usar vetor `%s' em um contexto escalar"
+
+#: array.c:1236
+#, fuzzy
+msgid "asort: second argument not an array"
+msgstr "asort: segundo argumento não é um vetor"
+
+#: array.c:1237
+#, fuzzy
+msgid "asorti: second argument not an array"
+msgstr "asort: segundo argumento não é um vetor"
+
+#: array.c:1245
+#, fuzzy
+msgid "asort: first argument not an array"
+msgstr "asort: primeiro argumento não é um vetor"
+
+#: array.c:1246
+#, fuzzy
+msgid "asorti: first argument not an array"
+msgstr "asort: primeiro argumento não é um vetor"
+
+#: awkgram.y:246
#, c-format
msgid "%s blocks must have an action part"
msgstr "blocos %s devem ter uma parte de ação"
-#: awkgram.y:230
+#: awkgram.y:249
msgid "each rule must have a pattern or an action part"
msgstr "cada regra deve ter um padrão ou uma parte de ação"
-#: awkgram.y:266 awkgram.y:275
+#: awkgram.y:320 awkgram.y:330
#, fuzzy
msgid "old awk does not support multiple `BEGIN' or `END' rules"
msgstr "o velho awk não suporta o operador `**'"
-#: awkgram.y:304
+#: awkgram.y:367
#, c-format
msgid "`%s' is a built-in function, it cannot be redefined"
msgstr "`%s' é uma função intrínseca, não pode ser redefinida"
-#: awkgram.y:350
+#: awkgram.y:427
#, fuzzy
msgid "regexp constant `//' looks like a C++ comment, but is not"
msgstr "constante de expr. reg. `/%s/' parece um comentário C, mas não é"
-#: awkgram.y:353
+#: awkgram.y:430
#, c-format
msgid "regexp constant `/%s/' looks like a C comment, but is not"
msgstr "constante de expr. reg. `/%s/' parece um comentário C, mas não é"
-#: awkgram.y:380 awkgram.y:692
-msgid "statement may have no effect"
-msgstr "declaração pode não ter efeito"
+#: awkgram.y:735
+#, fuzzy
+msgid "`break' is not allowed outside a loop or switch"
+msgstr "`break' fora de um loop não é permitido"
-#: awkgram.y:477 awkgram.y:480 awkgram.y:504 awkgram.y:511 awkgram.y:518
-#, c-format
-msgid "`%s' used in %s action"
+#: awkgram.y:744
+#, fuzzy
+msgid "`continue' is not allowed outside a loop"
+msgstr "`continue' fora de um loop não é permitido"
+
+#: awkgram.y:753
+#, fuzzy, c-format
+msgid "`next' used in %s action"
msgstr "`%s' usado em ação %s"
-#: awkgram.y:495 awkgram.y:499
+#: awkgram.y:767 awkgram.y:771
msgid "`nextfile' is a gawk extension"
msgstr "`nextfile' é uma extensão do gawk"
-#: awkgram.y:528
+#: awkgram.y:775
+#, fuzzy, c-format
+msgid "`nextfile' used in %s action"
+msgstr "`%s' usado em ação %s"
+
+#: awkgram.y:799
msgid "`return' used outside function context"
msgstr "`return' usado fora do contexto de função"
-#: awkgram.y:570
+#: awkgram.y:859
msgid "plain `print' in BEGIN or END rule should probably be `print \"\"'"
msgstr ""
"`print' sozinho em regra BEGIN ou END provavelmente deveria ser `print \"\"'"
-#: awkgram.y:586 awkgram.y:594
+#: awkgram.y:927 awkgram.y:935
msgid "`delete array' is a gawk extension"
msgstr "`delete array' é uma extensão do gawk"
-#: awkgram.y:608 awkgram.y:616
+#: awkgram.y:955 awkgram.y:963
msgid "`delete(array)' is a non-portable tawk extension"
msgstr "`delete(array)' é uma extensão não-portável do tawk"
-#: awkgram.y:660
+#: awkgram.y:1004
#, c-format
msgid "duplicate case values in switch body: %s"
msgstr "valores de case duplicados no corpo do switch: %s"
-#: awkgram.y:670
-msgid "Duplicate `default' detected in switch body"
+#: awkgram.y:1014
+#, fuzzy
+msgid "duplicate `default' detected in switch body"
msgstr "Detectado `default' duplicado no corpo do switch"
-#: awkgram.y:759
+#: awkgram.y:1151
msgid "multistage two-way pipelines don't work"
msgstr "pipelines bidirecionais de múltiplos estágios não funcionam"
-#: awkgram.y:850
+#: awkgram.y:1253
msgid "regular expression on right of assignment"
msgstr "expressão regular à direita de atribuição"
-#: awkgram.y:860
+#: awkgram.y:1263
msgid "regular expression on left of `~' or `!~' operator"
msgstr "expressão regular à esquerda de operador `~' ou `!~'"
-#: awkgram.y:866 awkgram.y:954
+#: awkgram.y:1278 awkgram.y:1423
#, fuzzy
msgid "old awk does not support the keyword `in' except after `for'"
msgstr "o velho awk não suporta o operador `**'"
-#: awkgram.y:872
+#: awkgram.y:1287
msgid "regular expression on right of comparison"
msgstr "expressão regular à direita de comparação"
-#: awkgram.y:936
+#: awkgram.y:1399
#, fuzzy, c-format
-msgid "`getline var' invalid inside %s rule"
+msgid "`getline var' invalid inside `%s' rule"
msgstr "porta remota inválida em `%s'"
-#: awkgram.y:939
-#, c-format
-msgid "`getline' invalid inside %s rule"
-msgstr ""
+#: awkgram.y:1401
+#, fuzzy, c-format
+msgid "`getline' invalid inside `%s' rule"
+msgstr "porta remota inválida em `%s'"
-#: awkgram.y:944
+#: awkgram.y:1407
msgid "non-redirected `getline' undefined inside END action"
msgstr "`getline' não-redirecionado não é definido dentro da ação END"
-#: awkgram.y:955
+#: awkgram.y:1424
#, fuzzy
msgid "old awk does not support multidimensional arrays"
msgstr "o velho awk não suporta o operador `**'"
-#: awkgram.y:1001
+#: awkgram.y:1528
msgid "call of `length' without parentheses is not portable"
msgstr "chamada a `length' sem parênteses não é portável"
-#: awkgram.y:1006
-msgid "call of `length' without parentheses is deprecated by POSIX"
-msgstr "chamada a `length' sem parênteses é obsoleta de acordo com POSIX"
-
-#: awkgram.y:1051
+#: awkgram.y:1591
#, fuzzy
msgid "indirect function calls are a gawk extension"
-msgstr "`extension' é uma extensão do gawk"
+msgstr "`nextfile' é uma extensão do gawk"
-#: awkgram.y:1084
-msgid "use of non-array as array"
-msgstr "uso de não-vetor como vetor"
+#: awkgram.y:1605
+#, fuzzy, c-format
+msgid "can not use special variable `%s' for indirect function call"
+msgstr "função `%s': não se pode usar o nome da função como nome de parâmetro"
-#: awkgram.y:1087
+#: awkgram.y:1682
msgid "invalid subscript expression"
msgstr "expressão de índice inválida"
-#: awkgram.y:1329
+#: awkgram.y:1722
+msgid "use of non-array as array"
+msgstr "uso de não-vetor como vetor"
+
+#: awkgram.y:1993
msgid "unexpected newline or end of string"
msgstr "fim de linha ou de string inesperado"
-#: awkgram.y:1446
-msgid "empty program text on command line"
-msgstr "texto de programa vazio na linha de comando"
-
-#: awkgram.y:1502
+#: awkgram.y:2248 awkgram.y:2296 awkgram.y:2470
#, c-format
msgid "can't open source file `%s' for reading (%s)"
msgstr "impossível abrir arquivo-fonte `%s' para leitura (%s)"
-#: awkgram.y:1600
+#: awkgram.y:2249 awkgram.y:2297 builtin.c:122
+msgid "reason unknown"
+msgstr "motivo desconhecido"
+
+#: awkgram.y:2257
+#, fuzzy, c-format
+msgid "already included source file `%s'"
+msgstr "impossível ler arquivo-fonte `%s' (%s)"
+
+#: awkgram.y:2281
+#, fuzzy
+msgid "@include is a gawk extension"
+msgstr "`nextfile' é uma extensão do gawk"
+
+#: awkgram.y:2288
+msgid "empty filename after @include"
+msgstr ""
+
+#: awkgram.y:2422
+msgid "empty program text on command line"
+msgstr "texto de programa vazio na linha de comando"
+
+#: awkgram.y:2537
#, c-format
msgid "can't read sourcefile `%s' (%s)"
msgstr "impossível ler arquivo-fonte `%s' (%s)"
-#: awkgram.y:1608
+#: awkgram.y:2547
#, c-format
msgid "source file `%s' is empty"
msgstr "arquivo-fonte `%s' está vazio"
-#: awkgram.y:1800 awkgram.y:1922 awkgram.y:1940 awkgram.y:2315 awkgram.y:2407
+#: awkgram.y:2732
msgid "source file does not end in newline"
msgstr "arquivo-fonte não termina em fim-de-linha"
-#: awkgram.y:1862
+#: awkgram.y:2809
msgid "unterminated regexp ends with `\\' at end of file"
msgstr "expressão regular inacabada termina com `\\' ao fim do arquivo"
-#: awkgram.y:1886
+#: awkgram.y:2833
#, c-format
msgid "%s: %d: tawk regex modifier `/.../%c' doesn't work in gawk"
msgstr ""
-#: awkgram.y:1890
+#: awkgram.y:2837
#, c-format
msgid "tawk regex modifier `/.../%c' doesn't work in gawk"
msgstr ""
-#: awkgram.y:1897
+#: awkgram.y:2844
msgid "unterminated regexp"
msgstr "expressão regular inacabada"
-#: awkgram.y:1900
+#: awkgram.y:2848
msgid "unterminated regexp at end of file"
msgstr "expressão regular inacabada no fim do arquivo"
-#: awkgram.y:1969
+#: awkgram.y:2907
msgid "use of `\\ #...' line continuation is not portable"
msgstr "uso da continuação de linha `\\ #...' não é portável"
-#: awkgram.y:1982
+#: awkgram.y:2923
msgid "backslash not last character on line"
msgstr "`\\' não é o último caracter da linha"
-#: awkgram.y:2027
+#: awkgram.y:2984
msgid "POSIX does not allow operator `**='"
msgstr "POSIX não permite o operador `**='"
-#: awkgram.y:2029
+#: awkgram.y:2986
msgid "old awk does not support operator `**='"
msgstr "o velho awk não suporta o operador `**='"
-#: awkgram.y:2038
+#: awkgram.y:2995
msgid "POSIX does not allow operator `**'"
msgstr "POSIX não permite o operador `**'"
-#: awkgram.y:2040
+#: awkgram.y:2997
msgid "old awk does not support operator `**'"
msgstr "o velho awk não suporta o operador `**'"
-#: awkgram.y:2071
+#: awkgram.y:3032
msgid "operator `^=' is not supported in old awk"
msgstr "o velho awk não suporta o operador `^='"
-#: awkgram.y:2079
+#: awkgram.y:3040
msgid "operator `^' is not supported in old awk"
msgstr "o velho awk não suporta o operador `^'"
-#: awkgram.y:2163 awkgram.y:2178
+#: awkgram.y:3133 awkgram.y:3149
msgid "unterminated string"
msgstr "string inacabada"
-#: awkgram.y:2368
+#: awkgram.y:3345
#, c-format
msgid "invalid char '%c' in expression"
msgstr "caracter inválido '%c' em expressão"
-#: awkgram.y:2416
+#: awkgram.y:3391
#, c-format
msgid "`%s' is a gawk extension"
msgstr "`%s' é uma extensão do gawk"
-#: awkgram.y:2419
+#: awkgram.y:3394
#, c-format
msgid "`%s' is a Bell Labs extension"
msgstr "`%s' é uma extensão da Bell Labs"
-#: awkgram.y:2422
+#: awkgram.y:3397
#, c-format
msgid "POSIX does not allow `%s'"
msgstr "POSIX não permite `%s'"
-#: awkgram.y:2426
+#: awkgram.y:3401
#, c-format
msgid "`%s' is not supported in old awk"
msgstr "`%s' não é suportado no velho awk"
-#: awkgram.y:2452
+#: awkgram.y:3465
msgid "`goto' considered harmful!\n"
msgstr "`goto' é considerado danoso!\n"
-#: awkgram.y:2514
+#: awkgram.y:3518
#, c-format
msgid "%d is invalid as number of arguments for %s"
msgstr "%d é inválido como número de argumentos para %s"
-#: awkgram.y:2533 awkgram.y:2536
+#: awkgram.y:3544 awkgram.y:3547
msgid "match: third argument is a gawk extension"
msgstr "match: terceiro argumento é uma extensão do gawk"
-#: awkgram.y:2549
+#: awkgram.y:3575
#, c-format
msgid "%s: string literal as last arg of substitute has no effect"
msgstr ""
"%s: string literal como último argumento de substituição não tem efeito"
-#: awkgram.y:2552
+#: awkgram.y:3580
#, c-format
msgid "%s third parameter is not a changeable object"
msgstr "terceiro parâmetro %s não é um objeto modificável"
-#: awkgram.y:2586 awkgram.y:2589
+#: awkgram.y:3665 awkgram.y:3668
msgid "close: second argument is a gawk extension"
msgstr "close: segundo argumento é uma extensão do gawk"
-#: awkgram.y:2599
+#: awkgram.y:3680
msgid "use of dcgettext(_\"...\") is incorrect: remove leading underscore"
msgstr "uso de dcgettext(_\"...\") é incorreto: remova o `_' precedente"
-#: awkgram.y:2614
+#: awkgram.y:3695
msgid "use of dcngettext(_\"...\") is incorrect: remove leading underscore"
msgstr "uso de dcngettext(_\"...\") é incorreto: remova o `_' precedente"
-#: awkgram.y:2686
+#: awkgram.y:3787
#, c-format
msgid "function `%s': parameter #%d, `%s', duplicates parameter #%d"
msgstr "função `%s': parâmetro #%d, `%s', duplica parâmetro #%d"
-#: awkgram.y:2719
+#: awkgram.y:3829
#, c-format
msgid "function `%s': parameter `%s' shadows global variable"
msgstr "função `%s': parâmetro `%s' encobre variável global"
-#: awkgram.y:2831
+#: awkgram.y:3987
#, c-format
msgid "could not open `%s' for writing (%s)"
msgstr "impossível abrir `%s' para escrita (%s)"
-#: awkgram.y:2832 profile.c:96
+#: awkgram.y:3988 profile.c:85
msgid "sending profile to standard error"
msgstr "enviando perfil para saída de erros"
-#: awkgram.y:2864
+#: awkgram.y:3994
#, c-format
msgid "%s: close failed (%s)"
msgstr "%s: `close' falhou (%s)"
-#: awkgram.y:2985
+#: awkgram.y:4046
msgid "shadow_funcs() called twice!"
msgstr "shadow_funcs() chamada duas vezes!"
-#: awkgram.y:3012
+#: awkgram.y:4052
msgid "there were shadowed variables."
msgstr "houve variáveis encobertas."
-#: awkgram.y:3085
+#: awkgram.y:4081
#, c-format
msgid "function `%s': can't use function name as parameter name"
msgstr "função `%s': não se pode usar o nome da função como nome de parâmetro"
-#: awkgram.y:3088
+#: awkgram.y:4086
#, fuzzy, c-format
msgid "function `%s': can't use special variable `%s' as a function parameter"
msgstr "função `%s': não se pode usar o nome da função como nome de parâmetro"
-#: awkgram.y:3098
+#: awkgram.y:4102
#, c-format
msgid "function name `%s' previously defined"
msgstr "nome de função `%s' definido anteriormente"
-#: awkgram.y:3249 awkgram.y:3255
+#: awkgram.y:4271 awkgram.y:4277
#, c-format
msgid "function `%s' called but never defined"
msgstr "função `%s' chamada mas nunca definida"
-#: awkgram.y:3258
+#: awkgram.y:4280
#, c-format
msgid "function `%s' defined but never called"
msgstr "função `%s' definida mas nunca chamada"
-#: awkgram.y:3285
+#: awkgram.y:4311
#, c-format
msgid "regexp constant for parameter #%d yields boolean value"
msgstr ""
"constante com expr. regular para parâmetro nº %d retorna valor booleano"
-#: awkgram.y:3329
+#: awkgram.y:4420
#, fuzzy, c-format
msgid ""
"function `%s' called with space between name and `(',\n"
@@ -422,236 +499,142 @@ msgstr ""
"função `%s' chamada com espaço entre o nome e o `(',\n"
"%s"
-#: awkgram.y:3750
-#, fuzzy
-msgid "division by zero attempted in `/'"
-msgstr "tentativa de divisão por zero em `/='"
+#: awkgram.y:4673 eval.c:1845
+msgid "division by zero attempted"
+msgstr "tentativa de divisão por zero"
-#: awkgram.y:3755 eval.c:1411
+#: awkgram.y:4682 eval.c:1877
#, c-format
msgid "division by zero attempted in `%%'"
msgstr "tentativa de divisão por zero em `%%'"
-#: builtin.c:122
+#: awkgram.y:5342
+msgid "statement may have no effect"
+msgstr "declaração pode não ter efeito"
+
+#: builtin.c:120
#, c-format
msgid "%s to \"%s\" failed (%s)"
msgstr "%s para \"%s\" falhou (%s)"
-#: builtin.c:123
+#: builtin.c:121
msgid "standard output"
msgstr "saída padrão"
-#: builtin.c:124
-msgid "reason unknown"
-msgstr "motivo desconhecido"
-
-#: builtin.c:137
+#: builtin.c:135
msgid "exp: received non-numeric argument"
msgstr "exp: recebeu argumento não-numérico"
-#: builtin.c:143
+#: builtin.c:141
#, c-format
msgid "exp: argument %g is out of range"
msgstr "exp: argumento %g está fora da faixa"
-#: builtin.c:201
+#: builtin.c:200
#, c-format
msgid "fflush: cannot flush: pipe `%s' opened for reading, not writing"
msgstr ""
"fflush: erro ao descarregar: pipe `%s' aberto para leitura, não gravação"
-#: builtin.c:204
+#: builtin.c:203
#, c-format
msgid "fflush: cannot flush: file `%s' opened for reading, not writing"
msgstr ""
"fflush: erro ao descarregar: arquivo `%s' aberto para leitura, não gravação"
-#: builtin.c:216
+#: builtin.c:215
#, c-format
msgid "fflush: `%s' is not an open file, pipe or co-process"
msgstr "fflush: `%s' não é um arquivo aberto, pipe ou co-processo"
-#: builtin.c:310
+#: builtin.c:322
msgid "index: received non-string first argument"
msgstr "index: recebeu primeiro argumento não-string"
-#: builtin.c:312
+#: builtin.c:324
msgid "index: received non-string second argument"
msgstr "index: recebeu segundo argumento não-string"
-#: builtin.c:434
+#: builtin.c:446
msgid "int: received non-numeric argument"
msgstr "int: recebeu argumento não-numérico"
-#: builtin.c:464
+#: builtin.c:469
#, fuzzy
msgid "`length(array)' is a gawk extension"
msgstr "`delete array' é uma extensão do gawk"
-#: builtin.c:471
-msgid "length: untyped parameter argument will be forced to scalar"
-msgstr ""
-
-#: builtin.c:480
-msgid "length: untyped argument will be forced to scalar"
-msgstr ""
-
-#: builtin.c:484
+#: builtin.c:477
msgid "length: received non-string argument"
msgstr "length: recebeu argumento não-string"
-#: builtin.c:515
+#: builtin.c:508
msgid "log: received non-numeric argument"
msgstr "log: recebeu argumento não-numérico"
-#: builtin.c:518
+#: builtin.c:511
#, c-format
msgid "log: received negative argument %g"
msgstr "log: recebeu argumento negativo %g"
-#: builtin.c:726 builtin.c:729
-msgid "must use `count$' on all formats or none"
-msgstr "deve usar `count$' em todos os formatos ou nenhum"
-
-#: builtin.c:790
-#, c-format
-msgid "field width is ignored for `%%%%' specifier"
-msgstr ""
-
-#: builtin.c:792
-#, c-format
-msgid "precision is ignored for `%%%%' specifier"
-msgstr ""
-
-#: builtin.c:794
-#, c-format
-msgid "field width and precision are ignored for `%%%%' specifier"
-msgstr ""
-
-#: builtin.c:845
-msgid "`$' is not permitted in awk formats"
-msgstr "`$' não é permitido em formatos awk"
-
-#: builtin.c:851
-msgid "arg count with `$' must be > 0"
-msgstr "nº de argumentos com `$' deve ser > 0"
-
-#: builtin.c:853
-#, c-format
-msgid "arg count %ld greater than total number of supplied arguments"
-msgstr "nº de argumentos %ld maior que nº total de argumentos fornecidos"
-
-#: builtin.c:855
-msgid "`$' not permitted after period in format"
-msgstr "`$' não é permitido depois de ponto no formato"
-
-#: builtin.c:868
-msgid "no `$' supplied for positional field width or precision"
-msgstr "nenhum `$' fornecido para tamanho ou precisão de campo posicional"
-
-#: builtin.c:938
-msgid "`l' is meaningless in awk formats; ignored"
-msgstr "`l' não faz sentido em formatos awk; ignorado"
-
-#: builtin.c:942
-msgid "`l' is not permitted in POSIX awk formats"
-msgstr "`l' não é permitido em formatos POSIX awk"
-
-#: builtin.c:953
-msgid "`L' is meaningless in awk formats; ignored"
-msgstr "`L' não faz sentido em formatos awk; ignorado"
-
-#: builtin.c:957
-msgid "`L' is not permitted in POSIX awk formats"
-msgstr "`L' não é permitido em formatos POSIX awk"
-
-#: builtin.c:968
-msgid "`h' is meaningless in awk formats; ignored"
-msgstr "`h' não faz sentido em formatos awk; ignorado"
-
-#: builtin.c:972
-msgid "`h' is not permitted in POSIX awk formats"
-msgstr "`h' não é permitido em formatos POSIX awk"
-
-#: builtin.c:1252
-#, c-format
-msgid "[s]printf: value %g is out of range for `%%%c' format"
-msgstr "[s]printf: valor %g fora da faixa para formato `%%%c'"
-
-#: builtin.c:1332
-#, c-format
-msgid "ignoring unknown format specifier character `%c': no argument converted"
-msgstr ""
-
-#: builtin.c:1338
-msgid "not enough arguments to satisfy format string"
-msgstr "argumentos insuficientes para a string de formato"
-
-#: builtin.c:1340
-msgid "^ ran out for this one"
-msgstr "^ acabou para este aqui"
-
-#: builtin.c:1346
-msgid "[s]printf: format specifier does not have control letter"
-msgstr "[s]printf: declaração de formato não tem letra de controle"
-
-#: builtin.c:1349
-msgid "too many arguments supplied for format string"
-msgstr "excesso de argumentos para a string de formato"
+#: builtin.c:531 builtin.c:573 builtin.c:586 builtin.c:982 builtin.c:994
+#, fuzzy, c-format
+msgid "attempt to use array `%s' in scalar context"
+msgstr "tentativa de usar vetor `%s' em um contexto escalar"
-#: builtin.c:1424 builtin.c:1427
+#: builtin.c:569 builtin.c:580
msgid "printf: no arguments"
msgstr "printf: nenhum argumento"
-#: builtin.c:1451
+#: builtin.c:621
msgid "sqrt: received non-numeric argument"
msgstr "sqrt: recebeu argumento não-numérico"
-#: builtin.c:1455
+#: builtin.c:625
#, c-format
msgid "sqrt: called with negative argument %g"
msgstr "sqrt: chamada com argumento negativo %g"
-#: builtin.c:1479
-#, c-format
-msgid "substr: start index %g is invalid, using 1"
-msgstr "substr: posição inicial %g é inválida, usando 1"
-
-#: builtin.c:1484
-#, c-format
-msgid "substr: non-integer start index %g will be truncated"
-msgstr "substr: posição inicial %g não-inteira será truncada"
-
-#: builtin.c:1510
+#: builtin.c:649
#, fuzzy, c-format
msgid "substr: length %g is not >= 1"
msgstr "substr: comprimento %g é <= 0"
-#: builtin.c:1512
+#: builtin.c:651
#, fuzzy, c-format
msgid "substr: length %g is not >= 0"
msgstr "substr: comprimento %g é <= 0"
-#: builtin.c:1519
+#: builtin.c:658
#, c-format
msgid "substr: non-integer length %g will be truncated"
msgstr "substr: comprimento %g não-inteiro será truncado"
-#: builtin.c:1524
+#: builtin.c:663
#, c-format
msgid "substr: length %g too big for string indexing, truncating to %g"
msgstr "substr: comprimento %g excessivo para indexação, truncando para %g"
-#: builtin.c:1536
+#: builtin.c:675
+#, c-format
+msgid "substr: start index %g is invalid, using 1"
+msgstr "substr: posição inicial %g é inválida, usando 1"
+
+#: builtin.c:680
+#, c-format
+msgid "substr: non-integer start index %g will be truncated"
+msgstr "substr: posição inicial %g não-inteira será truncada"
+
+#: builtin.c:705
msgid "substr: source string is zero length"
msgstr "substr: string origem tem comprimento zero"
-#: builtin.c:1552
+#: builtin.c:721
#, c-format
msgid "substr: start index %g is past end of string"
msgstr "substr: posição inicial %g além do fim da string"
-#: builtin.c:1560
+#: builtin.c:729
#, c-format
msgid ""
"substr: length %g at start index %g exceeds length of first argument (%lu)"
@@ -659,475 +642,435 @@ msgstr ""
"substr: comprimento %g a partir da posição %g excede tamanho do 1º argumento "
"(%lu)"
-#: builtin.c:1637
+#: builtin.c:806
+msgid "strftime: received non-numeric second argument"
+msgstr "strftime: recebeu segundo argumento não-numérico"
+
+#: builtin.c:813
msgid "strftime: received non-string first argument"
msgstr "strftime: recebeu primeiro argumento não-string"
-#: builtin.c:1643
+#: builtin.c:819
msgid "strftime: received empty format string"
msgstr "strftime: recebeu string de formato vazia"
-#: builtin.c:1652
-msgid "strftime: received non-numeric second argument"
-msgstr "strftime: recebeu segundo argumento não-numérico"
-
-#: builtin.c:1729
+#: builtin.c:885
msgid "mktime: received non-string argument"
msgstr "mktime: recebeu argumento não-string"
-#: builtin.c:1746
+#: builtin.c:902
msgid "mktime: at least one of the values is out of the default range"
msgstr ""
-#: builtin.c:1781
+#: builtin.c:937
msgid "'system' function not allowed in sandbox mode"
msgstr ""
-#: builtin.c:1786
+#: builtin.c:942
msgid "system: received non-string argument"
msgstr "system: recebeu argumento não-string"
-#: builtin.c:1907 eval.c:2285
+#: builtin.c:997 eval.c:1105 eval.c:1557 eval.c:1570
+#, c-format
+msgid "reference to uninitialized variable `%s'"
+msgstr "referência a variável não inicializada `%s'"
+
+#: builtin.c:1064
#, c-format
msgid "reference to uninitialized field `$%d'"
msgstr "referência a campo não inicializado `$%d'"
-#: builtin.c:2012
+#: builtin.c:1098
msgid "tolower: received non-string argument"
msgstr "tolower: recebeu argumento não-string"
-#: builtin.c:2042
+#: builtin.c:1151
msgid "toupper: received non-string argument"
msgstr "toupper: recebeu argumento não-string"
-#: builtin.c:2075
+#: builtin.c:1199
msgid "atan2: received non-numeric first argument"
msgstr "atan2: recebeu primeiro argumento não-numérico"
-#: builtin.c:2077
+#: builtin.c:1201
msgid "atan2: received non-numeric second argument"
msgstr "atan2: recebeu segundo argumento não-numérico"
-#: builtin.c:2096
+#: builtin.c:1220
msgid "sin: received non-numeric argument"
msgstr "sin: recebeu argumento não-numérico"
-#: builtin.c:2112
+#: builtin.c:1236
msgid "cos: received non-numeric argument"
msgstr "cos: recebeu argumento não-numérico"
-#: builtin.c:2165
+#: builtin.c:1289
msgid "srand: received non-numeric argument"
msgstr "srand: recebeu argumento não-numérico"
-#: builtin.c:2200
+#: builtin.c:1320
msgid "match: third argument is not an array"
msgstr "match: terceiro argumento não é um vetor"
-#: builtin.c:2750
+#: builtin.c:1827
+#, fuzzy
msgid "gensub: third argument of 0 treated as 1"
msgstr "gensub: 3º argumento 0 tratado como 1"
-#: builtin.c:2866
+#: builtin.c:1869
msgid "lshift: received non-numeric first argument"
msgstr "lshift: recebeu primeiro argumento não-numérico"
-#: builtin.c:2868
+#: builtin.c:1871
#, fuzzy
msgid "lshift: received non-numeric second argument"
msgstr "strftime: recebeu segundo argumento não-numérico"
-#: builtin.c:2874
+#: builtin.c:1877
#, c-format
msgid "lshift(%lf, %lf): negative values will give strange results"
msgstr "lshift(%lf, %lf): valores negativos darão resultados estranhos"
-#: builtin.c:2876
+#: builtin.c:1879
#, c-format
msgid "lshift(%lf, %lf): fractional values will be truncated"
msgstr "lshift(%lf, %lf): valores fracionários serão truncados"
-#: builtin.c:2878
+#: builtin.c:1881
#, c-format
msgid "lshift(%lf, %lf): too large shift value will give strange results"
msgstr "lshift(%lf, %lf): deslocamento excessivo dará resultados estranhos"
-#: builtin.c:2904
+#: builtin.c:1908
msgid "rshift: received non-numeric first argument"
msgstr "rshift: recebeu primeiro argumento não-numérico"
-#: builtin.c:2906
+#: builtin.c:1910
#, fuzzy
msgid "rshift: received non-numeric second argument"
msgstr "strftime: recebeu segundo argumento não-numérico"
-#: builtin.c:2912
+#: builtin.c:1916
#, c-format
msgid "rshift(%lf, %lf): negative values will give strange results"
msgstr "rshift(%lf, %lf): valores negativos darão resultados estranhos"
-#: builtin.c:2914
+#: builtin.c:1918
#, c-format
msgid "rshift(%lf, %lf): fractional values will be truncated"
msgstr "rshift(%lf, %lf): valores fracionários serão truncados"
-#: builtin.c:2916
+#: builtin.c:1920
#, c-format
msgid "rshift(%lf, %lf): too large shift value will give strange results"
msgstr "rshift(%lf, %lf): deslocamento excessivo dará resultados estranhos"
-#: builtin.c:2942
+#: builtin.c:1947
msgid "and: received non-numeric first argument"
msgstr "and: recebeu primeiro argumento não-numérico"
-#: builtin.c:2944
+#: builtin.c:1949
#, fuzzy
msgid "and: received non-numeric second argument"
msgstr "atan2: recebeu segundo argumento não-numérico"
-#: builtin.c:2950
+#: builtin.c:1955
#, c-format
msgid "and(%lf, %lf): negative values will give strange results"
msgstr "and(%lf, %lf): valores negativos darão resultados estranhos"
-#: builtin.c:2952
+#: builtin.c:1957
#, c-format
msgid "and(%lf, %lf): fractional values will be truncated"
msgstr "and(%lf, %lf): valores fracionários serão truncados"
-#: builtin.c:2978
+#: builtin.c:1984
msgid "or: received non-numeric first argument"
msgstr "or: recebeu primeiro argumento não-numérico"
-#: builtin.c:2980
+#: builtin.c:1986
#, fuzzy
msgid "or: received non-numeric second argument"
msgstr "atan2: recebeu segundo argumento não-numérico"
-#: builtin.c:2986
+#: builtin.c:1992
#, c-format
msgid "or(%lf, %lf): negative values will give strange results"
msgstr "or(%lf, %lf): valores negativos darão resultados estranhos"
-#: builtin.c:2988
+#: builtin.c:1994
#, c-format
msgid "or(%lf, %lf): fractional values will be truncated"
msgstr "or(%lf, %lf): valores fracionários serão truncados"
-#: builtin.c:3014
+#: builtin.c:2023
msgid "xor: received non-numeric first argument"
msgstr "xor: recebeu primeiro argumento não-numérico"
-#: builtin.c:3016
+#: builtin.c:2025
#, fuzzy
msgid "xor: received non-numeric second argument"
msgstr "atan2: recebeu segundo argumento não-numérico"
-#: builtin.c:3022
+#: builtin.c:2031
#, c-format
msgid "xor(%lf, %lf): negative values will give strange results"
msgstr "xor(%lf, %lf): valores negativos darão resultados estranhos"
-#: builtin.c:3024
+#: builtin.c:2033
#, c-format
msgid "xor(%lf, %lf): fractional values will be truncated"
msgstr "xor(%lf, %lf): valores fracionários serão truncados"
-#: builtin.c:3048
+#: builtin.c:2057 builtin.c:2063
msgid "compl: received non-numeric argument"
msgstr "compl: recebeu primeiro argumento não-numérico"
-#: builtin.c:3054
+#: builtin.c:2065
#, c-format
msgid "compl(%lf): negative value will give strange results"
msgstr "compl(%lf): valores negativos darão resultados estranhos"
-#: builtin.c:3056
+#: builtin.c:2067
#, c-format
msgid "compl(%lf): fractional value will be truncated"
msgstr "compl(%lf): valores fracionários serão truncados"
-#: builtin.c:3229
+#: builtin.c:2237
#, c-format
msgid "dcgettext: `%s' is not a valid locale category"
msgstr "dcgettext: `%s' não é uma categoria de \"locale\" válida"
-#: eval.c:374
+#: eval.c:412
#, c-format
msgid "unknown nodetype %d"
msgstr "tipo de nodo desconhecido %d"
-#: eval.c:423
-msgid "buffer overflow in genflags2str"
-msgstr "estouro de buffer em genflags2str"
+#: eval.c:423 eval.c:437
+#, fuzzy, c-format
+msgid "unknown opcode %d"
+msgstr "tipo de nodo desconhecido %d"
-#: eval.c:455 eval.c:461 profile.c:787
+#: eval.c:434
#, c-format
-msgid "attempt to use array `%s' in a scalar context"
-msgstr "tentativa de usar vetor `%s' em um contexto escalar"
+msgid "opcode %s not an operator or keyword"
+msgstr ""
-#: eval.c:803
+#: eval.c:487
+msgid "buffer overflow in genflags2str"
+msgstr "estouro de buffer em genflags2str"
+
+#: eval.c:613
#, c-format
-msgid "for loop: array `%s' changed size from %ld to %ld during loop execution"
+msgid ""
+"\n"
+"\t# Function Call Stack:\n"
+"\n"
msgstr ""
-"loop for: vetor `%s' mudou de tamanho de %ld para %ld durante a execução"
-
-#: eval.c:824
-msgid "`break' outside a loop is not portable"
-msgstr "`break' fora de um loop não é portável"
+"\n"
+"\t# Pilha de Chamadas de Função:\n"
+"\n"
-#: eval.c:828
-msgid "`break' outside a loop is not allowed"
-msgstr "`break' fora de um loop não é permitido"
+#: eval.c:640
+msgid "`IGNORECASE' is a gawk extension"
+msgstr "`IGNORECASE' é uma extensão do gawk"
-#: eval.c:845
-msgid "`continue' outside a loop is not portable"
-msgstr "`continue' fora de um loop não é portável"
+#: eval.c:669
+msgid "`BINMODE' is a gawk extension"
+msgstr "`BINMODE' é uma extensão do gawk"
-#: eval.c:849
-msgid "`continue' outside a loop is not allowed"
-msgstr "`continue' fora de um loop não é permitido"
+#: eval.c:727
+#, c-format
+msgid "BINMODE value `%s' is invalid, treated as 3"
+msgstr ""
-#: eval.c:883
-msgid "`next' cannot be called from a BEGIN rule"
-msgstr "`next' não pode ser chamado de uma regra BEGIN"
+#: eval.c:817
+#, c-format
+msgid "bad `%sFMT' specification `%s'"
+msgstr "especificação `%sFMT' inválida `%s'"
-#: eval.c:885
-msgid "`next' cannot be called from an END rule"
-msgstr "`next' não pode ser chamado de uma regra END"
+#: eval.c:895
+msgid "turning off `--lint' due to assignment to `LINT'"
+msgstr "desativando `--lint' devido a atribuição a `LINT'"
-#: eval.c:887
-#, fuzzy
-msgid "`next' cannot be called from a BEGINFILE rule"
-msgstr "`next' não pode ser chamado de uma regra BEGIN"
+#: eval.c:1067 eval.c:1544
+#, c-format
+msgid "can't use function name `%s' as variable or array"
+msgstr "não se pode usar o nome de função `%s' como variável ou vetor"
-#: eval.c:889
-#, fuzzy
-msgid "`next' cannot be called from an ENDFILE rule"
-msgstr "`next' não pode ser chamado de uma regra END"
+#: eval.c:1095
+msgid "assignment is not allowed to result of builtin function"
+msgstr "atribuição não pode resultar de funções intrínsecas"
-#: eval.c:898
-msgid "`nextfile' cannot be called from a BEGIN rule"
-msgstr "`nextfile' não pode ser chamado de uma regra BEGIN"
+#: eval.c:1104 eval.c:1556 eval.c:1569
+#, c-format
+msgid "reference to uninitialized argument `%s'"
+msgstr "referência a argumento não inicializado `%s'"
-#: eval.c:900
-msgid "`nextfile' cannot be called from an END rule"
-msgstr "`nextfile' não pode ser chamado de uma regra END"
+#: eval.c:1123
+msgid "attempt to field reference from non-numeric value"
+msgstr "tentativa de referência a campo a partir de valor não-numérico"
-#: eval.c:906
+#: eval.c:1125
#, fuzzy
-msgid "`nextfile' cannot be called from an ENDFILE rule"
-msgstr "`nextfile' não pode ser chamado de uma regra END"
+msgid "attempt to field reference from null string"
+msgstr "tentativa de referência a partir de string nula"
-#: eval.c:963
-msgid "statement has no effect"
-msgstr "declaração não tem efeito"
+#: eval.c:1131
+#, fuzzy, c-format
+msgid "attempt to access field %ld"
+msgstr "tentativa de acessar campo %d"
-#: eval.c:1040 eval.c:2133
-#, c-format
-msgid "can't use function name `%s' as variable or array"
-msgstr "não se pode usar o nome de função `%s' como variável ou vetor"
+#: eval.c:1140
+#, fuzzy, c-format
+msgid "reference to uninitialized field `$%ld'"
+msgstr "referência a campo não inicializado `$%d'"
-#: eval.c:1047 eval.c:1053
+#: eval.c:1202
#, c-format
-msgid "reference to uninitialized argument `%s'"
-msgstr "referência a argumento não inicializado `%s'"
+msgid "function `%s' called with more arguments than declared"
+msgstr "função `%s' chamada com mais argumentos que os declarados"
-#: eval.c:1062 eval.c:2142
+#: eval.c:1358
#, c-format
-msgid "reference to uninitialized variable `%s'"
-msgstr "referência a variável não inicializada `%s'"
-
-#: eval.c:1210
-msgid ""
-"concatenation: side effects in one expression have changed the length of "
-"another!"
+msgid "unwind_stack: unexpected type `%s'"
msgstr ""
-"concatenação: efeitos colaterais em um contexto mudaram o comprimento de "
-"outro!"
-#: eval.c:1315
+#: eval.c:1636
+#, fuzzy, c-format
+msgid "attempt to use scalar `%s' as an array"
+msgstr "tentativa de usar escalar `%s' como vetor"
+
+#: eval.c:1680
msgid "assignment used in conditional context"
msgstr "atribuição usada em contexto condicional"
-#: eval.c:1396
-msgid "division by zero attempted"
-msgstr "tentativa de divisão por zero"
-
-#: eval.c:1426 profile.c:663
-#, c-format
-msgid "illegal type (%s) in tree_eval"
-msgstr "tipo ilegal (%s) em tree_eval"
+#: eval.c:1684
+msgid "statement has no effect"
+msgstr "declaração não tem efeito"
-#: eval.c:1589
+#: eval.c:2028
msgid "division by zero attempted in `/='"
msgstr "tentativa de divisão por zero em `/='"
-#: eval.c:1611
+#: eval.c:2053
#, c-format
msgid "division by zero attempted in `%%='"
msgstr "tentativa de divisão por zero em `%%='"
-#: eval.c:1891
-#, c-format
-msgid "function `%s' called with more arguments than declared"
-msgstr "função `%s' chamada com mais argumentos que os declarados"
-
-#: eval.c:1948
-#, c-format
-msgid "function `%s' not defined"
-msgstr "função `%s' não definida"
-
-#: eval.c:1950
-#, c-format
-msgid "identifier `%s' is not a function"
-msgstr ""
-
-#: eval.c:1997
-#, c-format
-msgid ""
-"function parameter `%s' is not a scalar and cannot be used for indirect "
-"function call"
-msgstr ""
-
-#: eval.c:2014
-#, c-format
-msgid "indirect call of real function `%s' is silly"
-msgstr ""
+#: eval.c:2139
+msgid "`continue' outside a loop is not allowed"
+msgstr "`continue' fora de um loop não é permitido"
-#: eval.c:2034
-#, c-format
-msgid "function `%s' called indirectly through `%s' does not exist"
-msgstr ""
+#: eval.c:2145
+#, fuzzy
+msgid "`break' outside a loop is not allowed"
+msgstr "`break' fora de um loop não é permitido"
-#: eval.c:2039
+#: eval.c:2229
#, c-format
-msgid "identifier `%s' cannot be used for indirect function call"
+msgid "for loop: array `%s' changed size from %ld to %ld during loop execution"
msgstr ""
+"loop for: vetor `%s' mudou de tamanho de %ld para %ld durante a execução"
-#: eval.c:2105
+#: eval.c:2342
#, c-format
-msgid ""
-"\n"
-"\t# Function Call Stack:\n"
-"\n"
+msgid "function called indirectly through `%s' does not exist"
msgstr ""
-"\n"
-"\t# Pilha de Chamadas de Função:\n"
-"\n"
-#: eval.c:2108
+#: eval.c:2354
#, c-format
-msgid "\t# -- main --\n"
-msgstr "\t# -- main --\n"
-
-#: eval.c:2269
-msgid "attempt to field reference from non-numeric value"
-msgstr "tentativa de referência a campo a partir de valor não-numérico"
-
-#: eval.c:2271
-msgid "attempt to reference from null string"
-msgstr "tentativa de referência a partir de string nula"
-
-#: eval.c:2277
-#, c-format
-msgid "attempt to access field %d"
-msgstr "tentativa de acessar campo %d"
-
-#: eval.c:2298 eval.c:2305 profile.c:843
-msgid "assignment is not allowed to result of builtin function"
-msgstr "atribuição não pode resultar de funções intrínsecas"
+msgid "function `%s' not defined"
+msgstr "função `%s' não definida"
-#: eval.c:2369
-msgid "`IGNORECASE' is a gawk extension"
-msgstr "`IGNORECASE' é uma extensão do gawk"
+#: eval.c:2481
+#, fuzzy, c-format
+msgid "`nextfile' cannot be called from a `%s' rule"
+msgstr "`nextfile' não pode ser chamado de uma regra END"
-#: eval.c:2398
-msgid "`BINMODE' is a gawk extension"
-msgstr "`BINMODE' é uma extensão do gawk"
+#: eval.c:2540
+#, fuzzy, c-format
+msgid "`next' cannot be called from a `%s' rule"
+msgstr "`next' não pode ser chamado de uma regra END"
-#: eval.c:2456
+#: eval.c:2602
#, c-format
-msgid "BINMODE value `%s' is invalid, treated as 3"
+msgid "Sorry, don't know how to interpret `%s'"
msgstr ""
-#: eval.c:2546
-#, c-format
-msgid "bad `%sFMT' specification `%s'"
-msgstr "especificação `%sFMT' inválida `%s'"
-
-#: eval.c:2624
-msgid "turning off `--lint' due to assignment to `LINT'"
-msgstr "desativando `--lint' devido a atribuição a `LINT'"
-
-#: ext.c:61
-msgid "extensions not allowed in sandbox mode"
+#: ext.c:62
+msgid "extensions are not allowed in sandbox mode"
msgstr ""
-#: ext.c:65 ext.c:70
+#: ext.c:68 ext.c:73
msgid "`extension' is a gawk extension"
msgstr "`extension' é uma extensão do gawk"
-#: ext.c:80
-#, c-format
-msgid "extension: cannot open `%s' (%s)\n"
+#: ext.c:83
+#, fuzzy, c-format
+msgid "fatal: extension: cannot open `%s' (%s)\n"
msgstr "extension: impossível abrir `%s' (%s)\n"
-#: ext.c:88
-#, c-format
-msgid "extension: library `%s': cannot call function `%s' (%s)\n"
+#: ext.c:93
+#, fuzzy, c-format
+msgid "fatal: extension: library `%s': cannot call function `%s' (%s)\n"
msgstr "extension: biblioteca `%s': impossível chamar função `%s' (%s)\n"
-#: ext.c:108
+#: ext.c:123
msgid "extension: missing function name"
msgstr ""
-#: ext.c:113
+#: ext.c:128
#, fuzzy, c-format
msgid "extension: illegal character `%c' in function name `%s'"
msgstr "extension: biblioteca `%s': impossível chamar função `%s' (%s)\n"
-#: ext.c:119
+#: ext.c:137
#, fuzzy, c-format
msgid "extension: can't redefine function `%s'"
msgstr "extension: impossível abrir `%s' (%s)\n"
-#: ext.c:123
+#: ext.c:141
#, fuzzy, c-format
msgid "extension: function `%s' already defined"
msgstr "função `%s' não definida"
-#: ext.c:128
-#, c-format
-msgid "extension: can't use gawk built-in `%s' as function name"
-msgstr ""
-
-#: ext.c:130
+#: ext.c:146
#, fuzzy, c-format
msgid "extension: function name `%s' previously defined"
msgstr "nome de função `%s' definido anteriormente"
-#: ext.c:207
+#: ext.c:148
+#, fuzzy, c-format
+msgid "extension: can't use gawk built-in `%s' as function name"
+msgstr "função `%s': não se pode usar o nome da função como nome de parâmetro"
+
+#: ext.c:152
+#, c-format
+msgid "make_builtin: negative argument count for function `%s'"
+msgstr ""
+
+#: ext.c:255
#, fuzzy, c-format
msgid "function `%s' defined to take no more than %d argument(s)"
msgstr "função `%s' definida mas nunca chamada"
-#: ext.c:210
+#: ext.c:258
#, fuzzy, c-format
msgid "function `%s': missing argument #%d"
msgstr "função `%s' não definida"
-#: ext.c:220
+#: ext.c:268
#, fuzzy, c-format
msgid "function `%s': argument #%d: attempt to use scalar as an array"
msgstr "tentativa de usar escalar `%s' como vetor"
-#: ext.c:224
+#: ext.c:272
#, c-format
msgid "function `%s': argument #%d: attempt to use array as a scalar"
msgstr ""
-#: ext.c:249
+#: ext.c:285
msgid "Operation Not Supported"
msgstr "Operação Não Suportada"
@@ -1135,59 +1078,58 @@ msgstr "Operação Não Suportada"
msgid "NF set to negative value"
msgstr "valor negativo atribuído a NF"
-#: field.c:913
-msgid "split: second argument is not an array"
-msgstr "split: segundo argumento não é um vetor"
-
-#: field.c:922 field.c:932 field.c:937
+#: field.c:939 field.c:946 field.c:950
#, fuzzy
msgid "split: fourth argument is a gawk extension"
msgstr "match: terceiro argumento é uma extensão do gawk"
-#: field.c:928
+#: field.c:943
#, fuzzy
msgid "split: fourth argument is not an array"
msgstr "split: segundo argumento não é um vetor"
-#: field.c:975
-#, fuzzy
-msgid "split: null string for third argument is a gawk extension"
+#: field.c:957
+msgid "split: second argument is not an array"
+msgstr "split: segundo argumento não é um vetor"
+
+#: field.c:987
+msgid "split: null string for third arg is a gawk extension"
msgstr "split: string nula para segundo argumento é uma extensão do gawk"
-#: field.c:1032
+#: field.c:1028
#, fuzzy
-msgid "patsplit: second argument is not an array"
+msgid "patsplit: fourth argument is not an array"
msgstr "split: segundo argumento não é um vetor"
-#: field.c:1041
+#: field.c:1033
#, fuzzy
-msgid "patsplit: fourth argument is not an array"
+msgid "patsplit: second argument is not an array"
msgstr "split: segundo argumento não é um vetor"
-#: field.c:1067
+#: field.c:1051
#, fuzzy
msgid "patsplit: third argument must be non-null"
msgstr "match: terceiro argumento não é um vetor"
-#: field.c:1111
+#: field.c:1084
msgid "`FIELDWIDTHS' is a gawk extension"
msgstr "`FIELDWIDTHS' é uma extensão do gawk"
-#: field.c:1141 field.c:1155
+#: field.c:1147
#, c-format
msgid "invalid FIELDWIDTHS value, near `%s'"
msgstr ""
-#: field.c:1238
+#: field.c:1220
msgid "null string for `FS' is a gawk extension"
msgstr "string nula para `FS' é uma extensão do gawk"
-#: field.c:1242
+#: field.c:1224
#, fuzzy
msgid "old awk does not support regexps as value of `FS'"
msgstr "o velho awk não suporta o operador `**'"
-#: field.c:1357
+#: field.c:1343
#, fuzzy
msgid "`FPAT' is a gawk extension"
msgstr "`%s' é uma extensão do gawk"
@@ -1247,499 +1189,496 @@ msgstr "%s: opção `-W %s' não aceita argumento\n"
msgid "%s: option '-W %s' requires an argument\n"
msgstr "%s: opção `%s' requer argumento\n"
-#: io.c:379
+#: io.c:272
#, c-format
msgid "command line argument `%s' is a directory: skipped"
msgstr ""
-#: io.c:413
+#: io.c:275 io.c:372
#, c-format
msgid "cannot open file `%s' for reading (%s)"
msgstr "impossível abrir arquivo `%s' para leitura (%s)"
-#: io.c:459 io.c:2999
+#: io.c:419
#, c-format
msgid "error reading input file `%s': %s"
msgstr "erro ao ler arquivo de entrada `%s': %s"
-#: io.c:506
+#: io.c:470
#, c-format
msgid "close of fd %d (`%s') failed (%s)"
msgstr "fechamento do descritor %d (`%s') falhou (%s)"
-#: io.c:617
-msgid "redirection not allowed in sandbox mode"
-msgstr ""
-
-#: io.c:648
-#, c-format
-msgid "invalid tree type %s in redirect()"
-msgstr "tipo de árvore %s inválido em redirect()"
-
-#: io.c:654
+#: io.c:577
#, c-format
msgid "expression in `%s' redirection only has numeric value"
msgstr "expressão no redirecionamento `%s' só tem valor numérico"
-#: io.c:660
+#: io.c:583
#, c-format
msgid "expression for `%s' redirection has null string value"
msgstr "expressão para o redirecionamento `%s' tem valor string nulo"
-#: io.c:665
+#: io.c:589
#, c-format
msgid "filename `%s' for `%s' redirection may be result of logical expression"
msgstr ""
"nome de arquivo `%s' para redirecionamento `%s' pode ser resultado de "
"expressão lógica"
-#: io.c:707
+#: io.c:628
#, c-format
msgid "unnecessary mixing of `>' and `>>' for file `%.*s'"
msgstr "mistura desnecessária de `>' e `>>' para arquivo `%.*s'"
-#: io.c:754
+#: io.c:681
#, c-format
msgid "can't open pipe `%s' for output (%s)"
msgstr "impossível abrir pipe `%s' para saída (%s)"
-#: io.c:763
+#: io.c:691
#, c-format
msgid "can't open pipe `%s' for input (%s)"
msgstr "impossível abrir pipe `%s' para entrada (%s)"
-#: io.c:786
+#: io.c:712
#, c-format
msgid "can't open two way pipe `%s' for input/output (%s)"
msgstr "impossível abrir pipe bidirecional `%s' para entrada/saída (%s)"
-#: io.c:864
+#: io.c:794
#, c-format
msgid "can't redirect from `%s' (%s)"
msgstr "impossível redirecionar de `%s' (%s)"
-#: io.c:867
+#: io.c:797
#, c-format
msgid "can't redirect to `%s' (%s)"
msgstr "impossível redirecionar para `%s' (%s)"
-#: io.c:920
+#: io.c:846
msgid ""
"reached system limit for open files: starting to multiplex file descriptors"
msgstr ""
"alcançado limite do sistema para arquivos abertos; começando a multiplexar "
"descritores de arquivos"
-#: io.c:936
+#: io.c:862
#, c-format
msgid "close of `%s' failed (%s)."
msgstr "fechamento de `%s' falhou (%s)"
-#: io.c:944
+#: io.c:870
msgid "too many pipes or input files open"
msgstr "excesso de pipes ou arquivos de entrada abertos"
-#: io.c:967
+#: io.c:892
msgid "close: second argument must be `to' or `from'"
msgstr "close: segundo argumento deve ser `to' ou `from'"
-#: io.c:981
+#: io.c:909
#, c-format
msgid "close: `%.*s' is not an open file, pipe or co-process"
msgstr "close: `%.*s' não é um arquivo aberto, pipe ou co-processo"
-#: io.c:986
+#: io.c:914
msgid "close of redirection that was never opened"
msgstr "fechamento de redirecionamento que nunca foi aberto"
-#: io.c:1083
+#: io.c:1011
#, c-format
msgid "close: redirection `%s' not opened with `|&', second argument ignored"
msgstr ""
"close: redirecionamento `%s' não foi aberto com `|&', segundo argumento "
"ignorado"
-#: io.c:1099
+#: io.c:1027
#, c-format
msgid "failure status (%d) on pipe close of `%s' (%s)"
msgstr "status de falha (%d) ao fechar pipe de `%s' (%s)"
-#: io.c:1102
+#: io.c:1030
#, c-format
msgid "failure status (%d) on file close of `%s' (%s)"
msgstr "status de falha (%d) ao fechar arquivo de `%s' (%s)"
-#: io.c:1122
+#: io.c:1050
#, c-format
msgid "no explicit close of socket `%s' provided"
msgstr "fechamento explícito do socket `%s' não fornecido"
-#: io.c:1125
+#: io.c:1053
#, c-format
msgid "no explicit close of co-process `%s' provided"
msgstr "fechamento explícito do co-processo `%s' não fornecido"
-#: io.c:1128
+#: io.c:1056
#, c-format
msgid "no explicit close of pipe `%s' provided"
msgstr "fechamento explícito do pipe `%s' não fornecido"
-#: io.c:1131
+#: io.c:1059
#, c-format
msgid "no explicit close of file `%s' provided"
msgstr "fechamento explícito do arquivo `%s' não fornecido"
-#: io.c:1159 io.c:1214 main.c:832 main.c:874
+#: io.c:1087 io.c:1142 main.c:823 main.c:865
#, c-format
msgid "error writing standard output (%s)"
msgstr "erro ao escrever na saída padrão (%s)"
-#: io.c:1163 io.c:1219
+#: io.c:1091 io.c:1147
#, c-format
msgid "error writing standard error (%s)"
msgstr "erro ao escrever na saída padrão de erros (%s)"
-#: io.c:1171
+#: io.c:1099
#, c-format
msgid "pipe flush of `%s' failed (%s)."
msgstr "descarga de pipe de `%s' falhou (%s)."
-#: io.c:1174
+#: io.c:1102
#, c-format
msgid "co-process flush of pipe to `%s' failed (%s)."
msgstr "descarga de co-processo de pipe para `%s' falhou (%s)."
-#: io.c:1177
+#: io.c:1105
#, c-format
msgid "file flush of `%s' failed (%s)."
msgstr "descarga de arquivo de `%s' falhou (%s)."
-#: io.c:1292
+#: io.c:1219
#, fuzzy, c-format
msgid "local port %s invalid in `/inet'"
msgstr "porta local inválida em `%s'"
-#: io.c:1309
+#: io.c:1236
#, c-format
msgid "remote host and port information (%s, %s) invalid"
msgstr ""
-#: io.c:1344
+#: io.c:1276
msgid "/inet/raw client not ready yet, sorry"
msgstr "infelizmente, o cliente de /inet/raw não está concluído"
-#: io.c:1347 io.c:1383
+#: io.c:1279 io.c:1320
msgid "only root may use `/inet/raw'."
msgstr "apenas root pode usar `/inet/raw'."
-#: io.c:1381
+#: io.c:1318
msgid "/inet/raw server not ready yet, sorry"
msgstr "infelizmente, o servidor de /inet/raw não está concluído"
-#: io.c:1477
+#: io.c:1417
#, c-format
msgid "no (known) protocol supplied in special filename `%s'"
msgstr ""
"nenhum protocolo (conhecido) fornecido em nome de arquivo especial `%s'"
-#: io.c:1491
+#: io.c:1431
#, c-format
msgid "special file name `%s' is incomplete"
msgstr "nome de arquivo especial `%s' está incompleto"
-#: io.c:1506
+#: io.c:1447
msgid "must supply a remote hostname to `/inet'"
msgstr "deve ser fornecido um nome de host remoto para `/inet'"
-#: io.c:1524
+#: io.c:1465
msgid "must supply a remote port to `/inet'"
msgstr "deve ser fornecida uma porta remota para `/inet'"
-#: io.c:1570
+#: io.c:1511
msgid "TCP/IP communications are not supported"
msgstr "comunicação TCP/IP não é suportada"
-#: io.c:1758
+#: io.c:1698
#, c-format
msgid "could not open `%s', mode `%s'"
msgstr "impossível abrir `%s', modo `%s'"
-#: io.c:1809
+#: io.c:1749
#, c-format
msgid "close of master pty failed (%s)"
msgstr "falha ao fechar pty mestre (%s)"
-#: io.c:1811 io.c:1963 io.c:2114
+#: io.c:1751 io.c:1918 io.c:2075
#, c-format
msgid "close of stdout in child failed (%s)"
msgstr "falha ao fechar stdout em filho (%s)"
-#: io.c:1814
+#: io.c:1754
#, c-format
msgid "moving slave pty to stdout in child failed (dup: %s)"
msgstr "falha ao mover pty escrava para stdout em filho (dup: %s)"
-#: io.c:1816 io.c:1968
+#: io.c:1756 io.c:1923
#, c-format
msgid "close of stdin in child failed (%s)"
msgstr "falha ao fechar stdin em filho (%s)"
-#: io.c:1819
+#: io.c:1759
#, c-format
msgid "moving slave pty to stdin in child failed (dup: %s)"
msgstr "falha ao mover pty escrava para stdin em filho (dup: %s)"
-#: io.c:1821 io.c:1840
+#: io.c:1761 io.c:1782
#, c-format
msgid "close of slave pty failed (%s)"
msgstr "falha ao fechar pty escrava (%s)"
-#: io.c:1914 io.c:1966 io.c:2095 io.c:2117
+#: io.c:1860 io.c:1921 io.c:2053 io.c:2078
#, c-format
msgid "moving pipe to stdout in child failed (dup: %s)"
msgstr "falha ao mover pipe para stdout em processo pai (dup: %s)"
-#: io.c:1918 io.c:1971
+#: io.c:1867 io.c:1926
#, c-format
msgid "moving pipe to stdin in child failed (dup: %s)"
msgstr "falha ao mover pipe para stdin em processo pai (dup: %s)"
-#: io.c:1935 io.c:2108
+#: io.c:1887 io.c:2068
msgid "restoring stdout in parent process failed\n"
msgstr "falha ao restaurar stdout em processo pai\n"
-#: io.c:1940
+#: io.c:1895
msgid "restoring stdin in parent process failed\n"
msgstr "falha ao restaurar stdin em processo pai\n"
-#: io.c:1974 io.c:2119 io.c:2130
+#: io.c:1929 io.c:2080 io.c:2094
#, c-format
msgid "close of pipe failed (%s)"
msgstr "falha ao fechar pipe (%s)"
-#: io.c:2019
+#: io.c:1974
msgid "`|&' not supported"
msgstr "`|&' não suportado"
-#: io.c:2085
+#: io.c:2040
#, c-format
msgid "cannot open pipe `%s' (%s)"
msgstr "impossível abrir pipe `%s' (%s)"
-#: io.c:2126
+#: io.c:2088
#, c-format
msgid "cannot create child process for `%s' (fork: %s)"
msgstr "impossível criar processo filho para `%s' (fork: %s)"
-#: io.c:2518
+#: io.c:2577
#, c-format
msgid "data file `%s' is empty"
msgstr "arquivo de dados `%s' vazio"
-#: io.c:2560 io.c:2568
+#: io.c:2618 io.c:2626
msgid "could not allocate more input memory"
msgstr "impossível alocar mais memória de entrada"
-#: io.c:3125
+#: io.c:3173
msgid "multicharacter value of `RS' is a gawk extension"
msgstr "valor de múltiplos caracteres para `RS' é uma extensão do gawk"
-#: main.c:313
+#: main.c:311
msgid "out of memory"
msgstr ""
-#: main.c:381
+#: main.c:388
msgid "`-m[fr]' option irrelevant in gawk"
msgstr "opção `-m[fr] é irrelevante no gawk"
-#: main.c:383
+#: main.c:390
msgid "-m option usage: `-m[fr] nnn'"
msgstr "uso da opção -m: `-m[fr] nnn'"
-#: main.c:419
+#: main.c:426
#, fuzzy
msgid "empty argument to `-e/--source' ignored"
msgstr "argumento vazio para --source ignorado"
-#: main.c:485
+#: main.c:492
#, c-format
msgid "%s: option `-W %s' unrecognized, ignored\n"
msgstr "%s: opção `-W %s' não reconhecida, ignorada\n"
-#: main.c:530
+#: main.c:545
#, c-format
msgid "%s: option requires an argument -- %c\n"
msgstr "%s: opção requer argumento -- %c\n"
-#: main.c:551
+#: main.c:566
msgid "environment variable `POSIXLY_CORRECT' set: turning on `--posix'"
msgstr "variável de ambiente `POSIXLY_CORRECT' ativada: ligando `--posix'"
-#: main.c:557
+#: main.c:572
msgid "`--posix' overrides `--traditional'"
msgstr "`--posix' sobrepõe `--traditional'"
-#: main.c:568
+#: main.c:583
msgid "`--posix'/`--traditional' overrides `--non-decimal-data'"
msgstr "`--posix'/`--traditional' sobrepõe `--non-decimal-data'"
-#: main.c:572
+#: main.c:587
#, c-format
msgid "running %s setuid root may be a security problem"
msgstr "rodar %s com setuid root pode ser um problema de segurança"
-#: main.c:577
+#: main.c:592
#, fuzzy
msgid "`--posix' overrides `--binary'"
msgstr "`--posix' sobrepõe `--traditional'"
-#: main.c:622
+#: main.c:643
#, c-format
msgid "can't set binary mode on stdin (%s)"
msgstr "impossível ativar modo binário em stdin (%s)"
-#: main.c:625
+#: main.c:646
#, c-format
msgid "can't set binary mode on stdout (%s)"
msgstr "impossível ativar modo binário em stdout (%s)"
-#: main.c:627
+#: main.c:648
#, c-format
msgid "can't set binary mode on stderr (%s)"
msgstr "impossível ativar modo binário em stderr (%s)"
-#: main.c:668
+#: main.c:687
msgid "no program text at all!"
msgstr "nenhum texto de programa"
-#: main.c:773
+#: main.c:762
#, c-format
msgid "Usage: %s [POSIX or GNU style options] -f progfile [--] file ...\n"
msgstr "Uso: %s [opções estilo POSIX ou GNU] -f arqprog [--] arquivo ...\n"
-#: main.c:775
+#: main.c:764
#, c-format
msgid "Usage: %s [POSIX or GNU style options] [--] %cprogram%c file ...\n"
msgstr "Uso: %s [opções estilo POSIX ou GNU] [--] %cprograma%c arquivo ...\n"
-#: main.c:780
+#: main.c:769
#, fuzzy
msgid "POSIX options:\t\tGNU long options: (standard)\n"
msgstr "Opções POSIX: \t\tOpções longas GNU:\n"
-#: main.c:781
+#: main.c:770
msgid "\t-f progfile\t\t--file=progfile\n"
msgstr "\t-f arqprog \t\t--file=arqprog\n"
-#: main.c:782
+#: main.c:771
msgid "\t-F fs\t\t\t--field-separator=fs\n"
msgstr "\t-F fs\t\t\t--field-separator=fs\n"
-#: main.c:783
+#: main.c:772
msgid "\t-v var=val\t\t--assign=var=val\n"
msgstr "\t-v var=val\t\t--assign=var=val\n"
-#: main.c:784
+#: main.c:773
#, fuzzy
-msgid "POSIX options:\t\tGNU long options: (extensions)\n"
+msgid "Short options:\t\tGNU long options: (extensions)\n"
msgstr "Opções POSIX: \t\tOpções longas GNU:\n"
-#: main.c:785
+#: main.c:774
msgid "\t-m[fr] val\n"
msgstr "\t-m[fr] val\n"
-#: main.c:786
+#: main.c:775
msgid "\t-b\t\t\t--characters-as-bytes\n"
msgstr ""
-#: main.c:787
-msgid "\t-c\t\t\t--compat, --traditional\n"
-msgstr ""
+#: main.c:776
+#, fuzzy
+msgid "\t-c\t\t\t--traditional\n"
+msgstr "\t-W traditional\t\t--traditional\n"
-#: main.c:788
+#: main.c:777
#, fuzzy
-msgid "\t-C\t\t\t--copyleft, --copyright\n"
+msgid "\t-C\t\t\t--copyright\n"
msgstr "\t-W copyright\t\t--copyright\n"
-#: main.c:789
+#: main.c:778
#, fuzzy
msgid "\t-d [file]\t\t--dump-variables[=file]\n"
msgstr "\t-W dump-variables[=arq] \t--dump-variables[=arq]\n"
-#: main.c:790
+#: main.c:779
#, fuzzy
msgid "\t-e 'program-text'\t--source='program-text'\n"
msgstr "\t-W source=program-text\t--source=program-text\n"
-#: main.c:791
+#: main.c:780
#, fuzzy
msgid "\t-E file\t\t\t--exec=file\n"
msgstr "\t-W profile[=arq] \t--profile[=arq]\n"
-#: main.c:792
+#: main.c:781
#, fuzzy
msgid "\t-g\t\t\t--gen-pot\n"
msgstr "\t-W gen-po\t\t--gen-po\n"
-#: main.c:793
+#: main.c:782
#, fuzzy
-msgid "\t-h\t\t\t--help, --usage\n"
+msgid "\t-h\t\t\t--help\n"
msgstr "\t-W help\t\t\t--help\n"
-#: main.c:794
+#: main.c:783
#, fuzzy
-msgid "\t-l [fatal]\t\t--lint[=fatal]\n"
+msgid "\t-L [fatal]\t\t--lint[=fatal]\n"
msgstr "\t-W lint[=fatal]\t\t--lint[=fatal]\n"
-#: main.c:795
-#, fuzzy
-msgid "\t-L\t\t\t--lint-old\n"
-msgstr "\t-W lint-old\t\t--lint-old\n"
-
-#: main.c:796
+#: main.c:784
#, fuzzy
msgid "\t-n\t\t\t--non-decimal-data\n"
msgstr "\t-W non-decimal-data\t--non-decimal-data\n"
-#: main.c:797
+#: main.c:785
msgid "\t-N\t\t\t--use-lc-numeric\n"
msgstr ""
-#: main.c:798
+#: main.c:786
msgid "\t-O\t\t\t--optimize\n"
msgstr ""
-#: main.c:799
+#: main.c:787
#, fuzzy
msgid "\t-p [file]\t\t--profile[=file]\n"
msgstr "\t-W profile[=arq] \t--profile[=arq]\n"
-#: main.c:800
+#: main.c:788
#, fuzzy
msgid "\t-P\t\t\t--posix\n"
msgstr "\t-W posix\t\t--posix\n"
-#: main.c:801
+#: main.c:789
#, fuzzy
msgid "\t-r\t\t\t--re-interval\n"
msgstr "\t-W re-interval\t\t--re-interval\n"
-#: main.c:802
+#: main.c:791
#, fuzzy
+msgid "\t-R file\t\t\t--command=file\n"
+msgstr "\t-W profile[=arq] \t--profile[=arq]\n"
+
+#: main.c:792
msgid "\t-S\t\t\t--sandbox\n"
-msgstr "\t-W posix\t\t--posix\n"
+msgstr ""
-#: main.c:803
+#: main.c:793
+#, fuzzy
+msgid "\t-t\t\t\t--lint-old\n"
+msgstr "\t-W lint-old\t\t--lint-old\n"
+
+#: main.c:794
#, fuzzy
msgid "\t-V\t\t\t--version\n"
msgstr "\t-W version\t\t--version\n"
-#: main.c:805
+#: main.c:796
msgid "\t-W nostalgia\t\t--nostalgia\n"
msgstr "\t-W nostalgia\t\t--nostalgia\n"
-#: main.c:808
-msgid "\t-W parsedebug\t\t--parsedebug\n"
+#: main.c:799
+#, fuzzy
+msgid "\t-Y\t\t--parsedebug\n"
msgstr "\t-W parsedebug\t\t--parsedebug\n"
#. TRANSLATORS: --help output 5 (end)
@@ -1747,7 +1686,7 @@ msgstr "\t-W parsedebug\t\t--parsedebug\n"
#. for this application. Please add _another line_ with the
#. address for translation bugs.
#. no-wrap
-#: main.c:817
+#: main.c:808
msgid ""
"\n"
"To report bugs, see node `Bugs' in `gawk.info', which is\n"
@@ -1759,7 +1698,7 @@ msgstr ""
"seção `Reportando Problemas e Bugs' na versão impressa.\n"
"\n"
-#: main.c:821
+#: main.c:812
msgid ""
"gawk is a pattern scanning and processing language.\n"
"By default it reads standard input and writes standard output.\n"
@@ -1769,7 +1708,7 @@ msgstr ""
"Por padrão, o gawk lê a entrada padrão e escreve na saída padrão.\n"
"\n"
-#: main.c:825
+#: main.c:816
msgid ""
"Examples:\n"
"\tgawk '{ sum += $1 }; END { print sum }' file\n"
@@ -1779,8 +1718,8 @@ msgstr ""
"\tgawk '{ soma += $1 }; END { print soma }' arquivo\n"
"\tgawk -F: '{ print $1 }' /etc/passwd\n"
-#: main.c:845
-#, c-format
+#: main.c:836
+#, fuzzy, c-format
msgid ""
"Copyright (C) 1989, 1991-%d Free Software Foundation.\n"
"\n"
@@ -1794,11 +1733,11 @@ msgstr ""
"\n"
"Este programa é Software Livre; você pode redistribuí-lo e/ou modificá-lo\n"
"de acordo com os termos da Licença Pública Geral GNU (GNU GPL) na "
-"formapublicada pela Free Software Foundation; ou a versão 3 da licença ou "
+"formapublicada pela Free Software Foundation; ou a versão 2 da licença ou "
"(aoseu critério) qualquer versão posterior.\n"
"\n"
-#: main.c:853
+#: main.c:844
msgid ""
"This program is distributed in the hope that it will be useful,\n"
"but WITHOUT ANY WARRANTY; without even the implied warranty of\n"
@@ -1810,7 +1749,7 @@ msgstr ""
"QUALQUER GARANTIA. Veja a Licença Pública Geral GNU (GNU GPL)\n"
"para mais detalhes.\n"
-#: main.c:864
+#: main.c:855
#, fuzzy
msgid ""
"You should have received a copy of the GNU General Public License\n"
@@ -1818,19 +1757,18 @@ msgid ""
msgstr ""
"Você deve ter recebido uma cópia da Licença Pública Geral GNU (GNU GPL)\n"
"junto com este programa; caso contrário, escreva à Free Software\n"
-"Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, "
-"USA.\n"
+"Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.\n"
-#: main.c:899
+#: main.c:890
msgid "-Ft does not set FS to tab in POSIX awk"
msgstr "-Ft não faz FS ser tab no awk POSIX"
-#: main.c:1116
+#: main.c:1122
#, c-format
msgid "unknown value for field spec: %d\n"
msgstr ""
-#: main.c:1176
+#: main.c:1182
#, c-format
msgid ""
"%s: `%s' argument to `-v' not in `var=value' form\n"
@@ -1839,174 +1777,140 @@ msgstr ""
"%s: argumento `%s' para `-v' não está na forma `var=valor'\n"
"\n"
-#: main.c:1196
+#: main.c:1202
#, c-format
msgid "`%s' is not a legal variable name"
msgstr "`%s' não é um nome legal de variável"
-#: main.c:1199
+#: main.c:1205
#, c-format
msgid "`%s' is not a variable name, looking for file `%s=%s'"
msgstr "`%s' não é um nome de variável, procurando arquivo `%s=%s'"
-#: main.c:1238
+#: main.c:1258
msgid "floating point exception"
msgstr "exceção de ponto flutuante"
-#: main.c:1245
+#: main.c:1265
msgid "fatal error: internal error"
msgstr "erro fatal: erro interno"
-#: main.c:1260
+#: main.c:1280
#, fuzzy
msgid "fatal error: internal error: segfault"
msgstr "erro fatal: erro interno"
-#: main.c:1272
+#: main.c:1292
#, fuzzy
msgid "fatal error: internal error: stack overflow"
msgstr "erro fatal: erro interno"
-#: main.c:1322
+#: main.c:1342
#, c-format
msgid "no pre-opened fd %d"
msgstr "nenhum descritor pré-aberto %d"
-#: main.c:1329
+#: main.c:1349
#, c-format
msgid "could not pre-open /dev/null for fd %d"
msgstr "impossível pré-abrir /dev/null para descritor %d"
-#: main.c:1352 main.c:1361
+#: main.c:1372 main.c:1381
#, c-format
msgid "could not find groups: %s"
msgstr "impossível achar grupos: %s"
-#: msg.c:54
+#: msg.c:62
#, c-format
msgid "cmd. line:"
msgstr "lin. de com.:"
-#: msg.c:120
+#: msg.c:97
msgid "warning: "
msgstr "aviso: "
-#: msg.c:142
+#: msg.c:106
msgid "error: "
msgstr "erro: "
-#: msg.c:178
+#: msg.c:129
msgid "fatal: "
msgstr "fatal: "
-#: node.c:63 node.c:78 node.c:105 node.c:121 node.c:151
-msgid "can't convert string to float"
-msgstr "impossível converter string para float"
-
-#: node.c:465
+#: node.c:401
msgid "backslash at end of string"
msgstr "barra invertida (\\) no fim da string"
-#: node.c:609
+#: node.c:502
#, fuzzy, c-format
msgid "old awk does not support the `\\%c' escape sequence"
msgstr "o velho awk não suporta o operador `**'"
-#: node.c:660
+#: node.c:553
msgid "POSIX does not allow `\\x' escapes"
msgstr "POSIX não permite escapes do tipo `\\x'"
-#: node.c:666
+#: node.c:559
msgid "no hex digits in `\\x' escape sequence"
msgstr "nenhum dígito hexa em seqüência de escape `\\x'"
-#: node.c:688
+#: node.c:581
#, c-format
msgid ""
"hex escape \\x%.*s of %d characters probably not interpreted the way you "
"expect"
msgstr ""
-#: node.c:703
+#: node.c:596
#, c-format
msgid "escape sequence `\\%c' treated as plain `%c'"
msgstr "seqüência de escape `\\%c' tratada como `%c' normal"
+#: node.c:737
+msgid ""
+"Invalid multibyte data detected. There may be a mismatch between your data "
+"and your locale."
+msgstr ""
+
#: posix/gawkmisc.c:172
#, c-format
msgid "%s %s `%s': could not set close-on-exec: (fcntl: %s)"
msgstr "%s %s `%s': impossível ativar fechar-ao-executar: (fcntl: %s)"
-#: profile.c:94
+#: profile.c:83
#, c-format
msgid "could not open `%s' for writing: %s"
msgstr "impossível abrir `%s' para escrita: %s"
-#: profile.c:457
-#, c-format
-msgid "internal error: %s with null vname"
-msgstr "erro interno: %s com vname nulo"
-
-#: profile.c:522
-msgid "# treated internally as `delete'"
-msgstr "# tratado internamente como `delete'"
-
-#: profile.c:1076
-#, c-format
-msgid "# this is a dynamically loaded extension function"
-msgstr ""
-
-#: profile.c:1109
-#, c-format
-msgid "\t# gawk profile, created %s\n"
-msgstr "\t# perfil gawk, criado %s\n"
-
-#: profile.c:1112
-#, c-format
-msgid ""
-"\t# BEGIN block(s)\n"
-"\n"
-msgstr ""
-"\t# bloco(s) BEGIN\n"
-"\n"
-
-#: profile.c:1122
+#: profile.c:203
#, fuzzy, c-format
msgid ""
-"\t# BEGINFILE block(s)\n"
+"\t# %s block(s)\n"
"\n"
msgstr ""
-"\t# bloco(s) BEGIN\n"
+"\t# bloco(s) END\n"
"\n"
-#: profile.c:1132
-#, c-format
+#: profile.c:208
+#, fuzzy, c-format
msgid ""
-"\t# Rule(s)\n"
+"\t# %s(s)\n"
"\n"
msgstr ""
"\t# Regra(s)\n"
"\n"
-#: profile.c:1138
-#, fuzzy, c-format
-msgid ""
-"\t# ENDFILE block(s)\n"
-"\n"
-msgstr ""
-"\t# bloco(s) END\n"
-"\n"
+#: profile.c:278
+#, c-format
+msgid "internal error: %s with null vname"
+msgstr "erro interno: %s com vname nulo"
-#: profile.c:1148
+#: profile.c:945
#, c-format
-msgid ""
-"\t# END block(s)\n"
-"\n"
-msgstr ""
-"\t# bloco(s) END\n"
-"\n"
+msgid "\t# gawk profile, created %s\n"
+msgstr "\t# perfil gawk, criado %s\n"
-#: profile.c:1168
+#: profile.c:1328
#, c-format
msgid ""
"\n"
@@ -2015,17 +1919,12 @@ msgstr ""
"\n"
"\t# Funções, listadas alfabeticamente\n"
-#: profile.c:1431
+#: profile.c:1367
#, c-format
-msgid "unexpected type %s in prec_level"
-msgstr "tipo inesperado %s em prec_level"
-
-#: profile.c:1557
-#, fuzzy, c-format
-msgid "Unknown node type %s in pp_var"
-msgstr "tipo de nodo desconhecido %d"
+msgid "redir2str: unknown redirection type %d"
+msgstr ""
-#: re.c:537
+#: re.c:559
#, c-format
msgid "regexp component `%.*s' should probably be `[%.*s]'"
msgstr ""
@@ -2098,18 +1997,40 @@ msgstr "Expressão regular grande demais"
msgid "Unmatched ) or \\)"
msgstr ") ou \\) desemparelhado"
-#: regcomp.c:699
+#: regcomp.c:701
msgid "No previous regular expression"
msgstr "Nenhuma expressão regular anterior"
-#~ msgid "%s: illegal option -- %c\n"
-#~ msgstr "%s: opção ilegal -- %c\n"
+#~ msgid "call of `length' without parentheses is deprecated by POSIX"
+#~ msgstr "chamada a `length' sem parênteses é obsoleta de acordo com POSIX"
+
+#, fuzzy
+#~ msgid "reference to uninitialized field `$%s'"
+#~ msgstr "referência a campo não inicializado `$%d'"
+
+#~ msgid "can't convert string to float"
+#~ msgstr "impossível converter string para float"
+
+#~ msgid "`continue' outside a loop is not portable"
+#~ msgstr "`continue' fora de um loop não é portável"
+
+#~ msgid "`break' outside a loop is not portable"
+#~ msgstr "`break' fora de um loop não é portável"
+
+#~ msgid "`nextfile' cannot be called from a BEGIN rule"
+#~ msgstr "`nextfile' não pode ser chamado de uma regra BEGIN"
+
+#~ msgid "`next' cannot be called from a BEGIN rule"
+#~ msgstr "`next' não pode ser chamado de uma regra BEGIN"
#~ msgid "file `%s' is a directory"
#~ msgstr "arquivo `%s' é um diretório"
-#~ msgid "can't open two way socket `%s' for input/output (%s)"
-#~ msgstr "impossível abrir socket bidirecional `%s' para entrada/saída (%s)"
+#~ msgid "use `PROCINFO[\"%s\"]' instead of `%s'"
+#~ msgstr "use `PROCINFO[\"%s\"]' em vez de `%s'"
+
+#~ msgid "use `PROCINFO[...]' instead of `/dev/user'"
+#~ msgstr "use `PROCINFO[...]' em vez de `/dev/user'"
#~ msgid "\t-W compat\t\t--compat\n"
#~ msgstr "\t-W compat\t\t--compat\n"
@@ -2117,33 +2038,109 @@ msgstr "Nenhuma expressão regular anterior"
#~ msgid "\t-W copyleft\t\t--copyleft\n"
#~ msgstr "\t-W copyleft\t\t--copyleft\n"
-#~ msgid "\t-W traditional\t\t--traditional\n"
-#~ msgstr "\t-W traditional\t\t--traditional\n"
-
#~ msgid "\t-W usage\t\t--usage\n"
#~ msgstr "\t-W usage\t\t--usage\n"
-#, fuzzy
-#~ msgid "seek: invalid arguments"
-#~ msgstr "printf: nenhum argumento"
+#~ msgid ""
+#~ "\t# BEGIN block(s)\n"
+#~ "\n"
+#~ msgstr ""
+#~ "\t# bloco(s) BEGIN\n"
+#~ "\n"
+
+#~ msgid "must use `count$' on all formats or none"
+#~ msgstr "deve usar `count$' em todos os formatos ou nenhum"
+
+#~ msgid "`$' is not permitted in awk formats"
+#~ msgstr "`$' não é permitido em formatos awk"
+
+#~ msgid "arg count with `$' must be > 0"
+#~ msgstr "nº de argumentos com `$' deve ser > 0"
+
+#~ msgid "arg count %ld greater than total number of supplied arguments"
+#~ msgstr "nº de argumentos %ld maior que nº total de argumentos fornecidos"
+
+#~ msgid "`$' not permitted after period in format"
+#~ msgstr "`$' não é permitido depois de ponto no formato"
+
+#~ msgid "no `$' supplied for positional field width or precision"
+#~ msgstr "nenhum `$' fornecido para tamanho ou precisão de campo posicional"
+
+#~ msgid "`l' is meaningless in awk formats; ignored"
+#~ msgstr "`l' não faz sentido em formatos awk; ignorado"
+
+#~ msgid "`l' is not permitted in POSIX awk formats"
+#~ msgstr "`l' não é permitido em formatos POSIX awk"
+
+#~ msgid "`L' is meaningless in awk formats; ignored"
+#~ msgstr "`L' não faz sentido em formatos awk; ignorado"
+
+#~ msgid "`L' is not permitted in POSIX awk formats"
+#~ msgstr "`L' não é permitido em formatos POSIX awk"
+
+#~ msgid "`h' is meaningless in awk formats; ignored"
+#~ msgstr "`h' não faz sentido em formatos awk; ignorado"
+
+#~ msgid "`h' is not permitted in POSIX awk formats"
+#~ msgstr "`h' não é permitido em formatos POSIX awk"
+
+#~ msgid "[s]printf: value %g is out of range for `%%%c' format"
+#~ msgstr "[s]printf: valor %g fora da faixa para formato `%%%c'"
+
+#~ msgid "not enough arguments to satisfy format string"
+#~ msgstr "argumentos insuficientes para a string de formato"
+
+#~ msgid "^ ran out for this one"
+#~ msgstr "^ acabou para este aqui"
+
+#~ msgid "[s]printf: format specifier does not have control letter"
+#~ msgstr "[s]printf: declaração de formato não tem letra de controle"
+
+#~ msgid "too many arguments supplied for format string"
+#~ msgstr "excesso de argumentos para a string de formato"
#, fuzzy
-#~ msgid "seek: `%.*s' is not an open file, pipe, or co-process"
-#~ msgstr "close: `%.*s' não é um arquivo aberto, pipe ou co-processo"
+#~ msgid "attempt to use array parameter `%s' in a scalar context"
+#~ msgstr "tentativa de usar vetor `%s' em um contexto escalar"
+
+#~ msgid "can't open two way socket `%s' for input/output (%s)"
+#~ msgstr "impossível abrir socket bidirecional `%s' para entrada/saída (%s)"
+
+#~ msgid ""
+#~ "concatenation: side effects in one expression have changed the length of "
+#~ "another!"
+#~ msgstr ""
+#~ "concatenação: efeitos colaterais em um contexto mudaram o comprimento de "
+#~ "outro!"
+
+#~ msgid "illegal type (%s) in tree_eval"
+#~ msgstr "tipo ilegal (%s) em tree_eval"
+
+#~ msgid "\t# -- main --\n"
+#~ msgstr "\t# -- main --\n"
+
+#~ msgid "invalid tree type %s in redirect()"
+#~ msgstr "tipo de árvore %s inválido em redirect()"
#, fuzzy
-#~ msgid "seek: `%.*s' is not an input file, pipe, or co-process"
-#~ msgstr "close: `%.*s' não é um arquivo aberto, pipe ou co-processo"
+#~ msgid "# treated internally as `delete'"
+#~ msgstr "# tratado internamente como `delete'"
+
+#~ msgid "unexpected type %s in prec_level"
+#~ msgstr "tipo inesperado %s em prec_level"
#, fuzzy
-#~ msgid "seek: `%.*s' is not a regular file"
-#~ msgstr "`%s' não é um nome legal de variável"
+#~ msgid "Unknown node type %s in pp_var"
+#~ msgstr "tipo de nodo desconhecido %d"
-#~ msgid "use `PROCINFO[\"%s\"]' instead of `%s'"
-#~ msgstr "use `PROCINFO[\"%s\"]' em vez de `%s'"
+#~ msgid "%s: illegal option -- %c\n"
+#~ msgstr "%s: opção ilegal -- %c\n"
-#~ msgid "use `PROCINFO[...]' instead of `/dev/user'"
-#~ msgstr "use `PROCINFO[...]' em vez de `/dev/user'"
+#~ msgid "or used as a variable or an array"
+#~ msgstr "ou usado como uma variável ou vetor"
+
+#~ msgid "substr: length %g is < 0"
+#~ msgstr "substr: comprimento %g é < 0"
#~ msgid "function %s called\n"
#~ msgstr "função %s chamada\n"
@@ -2151,9 +2148,6 @@ msgstr "Nenhuma expressão regular anterior"
#~ msgid "field %d in FIELDWIDTHS, must be > 0"
#~ msgstr "campo %d em FIELDWIDTHS deve ser > 0"
-#~ msgid "remote port invalid in `%s'"
-#~ msgstr "porta remota inválida em `%s'"
-
#~ msgid "regex match failed, not enough memory to match string \"%.*s%s\""
#~ msgstr ""
#~ "busca por exp. reg. falhou, memória insuficiente para testar string \"%.*s"
@@ -2162,11 +2156,5 @@ msgstr "Nenhuma expressão regular anterior"
#~ msgid "delete: illegal use of variable `%s' as array"
#~ msgstr "delete: uso ilegal da variável `%s' como vetor"
-#~ msgid "asort: first argument is not an array"
-#~ msgstr "asort: primeiro argumento não é um vetor"
-
-#~ msgid "asort: second argument is not an array"
-#~ msgstr "asort: segundo argumento não é um vetor"
-
#~ msgid "internal error: Node_var_array with null vname"
#~ msgstr "erro interno: Node_var_array com vname nulo"
diff --git a/po/ro.gmo b/po/ro.gmo
index c0106f04..ab930bc1 100644
--- a/po/ro.gmo
+++ b/po/ro.gmo
Binary files differ
diff --git a/po/ro.po b/po/ro.po
index 55416c3d..4a321d6b 100644
--- a/po/ro.po
+++ b/po/ro.po
@@ -6,7 +6,7 @@ msgid ""
msgstr ""
"Project-Id-Version: gawk 3.1.31\n"
"Report-Msgid-Bugs-To: arnold@skeeve.com\n"
-"POT-Creation-Date: 2010-11-12 12:20+0200\n"
+"POT-Creation-Date: 2010-11-17 08:48+0200\n"
"PO-Revision-Date: 2003-09-15 17:48+0300\n"
"Last-Translator: Eugen Hoanca <eugenh@urban-grafx.ro>\n"
"Language-Team: Romanian <translation-team-ro@lists.sourceforge.net>\n"
@@ -14,416 +14,492 @@ msgstr ""
"Content-Type: text/plain; charset=ISO-8859-2\n"
"Content-Transfer-Encoding: 8bit\n"
-#: array.c:112
+#: array.c:103
+#, fuzzy, c-format
+msgid "from %s"
+msgstr "%s (din %s)"
+
+#: array.c:267
+#, fuzzy
+msgid "attempt to use a scalar value as array"
+msgstr "încercare de a utiliza scalarul `%s' ca array"
+
+#: array.c:270
#, fuzzy, c-format
msgid "attempt to use function `%s' as an array"
msgstr "încercare de folosire a funcþiei `%s' ca array"
-#: array.c:115
+#: array.c:273
#, c-format
msgid "attempt to use scalar parameter `%s' as an array"
msgstr "încercare de utilizare a parametrului scalar `%s' drept array"
-#: array.c:118
+#: array.c:276
#, c-format
msgid "attempt to use scalar `%s' as array"
msgstr "încercare de a utiliza scalarul `%s' ca array"
-#: array.c:156
-#, fuzzy, c-format
-msgid "from %s"
-msgstr "%s (din %s)"
+#: array.c:321 array.c:648 eval.c:1075 eval.c:1079 eval.c:1581 eval.c:1649
+#: eval.c:1928
+#, c-format
+msgid "attempt to use array `%s' in a scalar context"
+msgstr "încercare de a utiliza array-ul `%s' într-un context scalar"
-#: array.c:513
+#: array.c:570
#, fuzzy, c-format
msgid "reference to uninitialized element `%s[\"%.*s\"]'"
msgstr "referinþã la elementul neiniþializat `%s[\"%s\"]'"
-#: array.c:519
+#: array.c:576
#, c-format
msgid "subscript of array `%s' is null string"
msgstr "înscrierea array-ului `%s' este ºir null"
-#: array.c:623
+#: array.c:684
#, c-format
msgid "delete: index `%s' not in array `%s'"
msgstr "delete: indexul `%s' nu este în array-ul `%s'"
-#: array.c:792
+#: array.c:705
+#, fuzzy, c-format
+msgid "attempt to use scalar `%s[\"%.*s\"]' as an array"
+msgstr "încercare de a utiliza scalarul `%s' ca array"
+
+#: array.c:868
#, c-format
msgid "%s: empty (null)\n"
msgstr "%s: vid (null)\n"
-#: array.c:797
+#: array.c:873
#, c-format
msgid "%s: empty (zero)\n"
msgstr "%s: vid (zero)\n"
-#: array.c:801
+#: array.c:877
#, c-format
msgid "%s: table_size = %d, array_size = %d\n"
msgstr "%s: table_size = %d, array_size = %d\n"
-#: array.c:830
+#: array.c:912
#, fuzzy, c-format
msgid "%s: is parameter\n"
msgstr "%s: este parametru!\n"
-#: array.c:835
+#: array.c:916
#, c-format
msgid "%s: array_ref to %s\n"
msgstr "%s: array_ref cãtre %s\n"
-#: awkgram.y:224 awkgram.y:227
+#: array.c:921
+#, fuzzy
+msgid "adump: argument not an array"
+msgstr "asort: primul argument nu este un array"
+
+#: array.c:1139
+#, fuzzy
+msgid "attempt to use array in a scalar context"
+msgstr "încercare de a utiliza array-ul `%s' într-un context scalar"
+
+#: array.c:1236
+#, fuzzy
+msgid "asort: second argument not an array"
+msgstr "asort: al doilea argument nu este un array"
+
+#: array.c:1237
+#, fuzzy
+msgid "asorti: second argument not an array"
+msgstr "asort: al doilea argument nu este un array"
+
+#: array.c:1245
+#, fuzzy
+msgid "asort: first argument not an array"
+msgstr "asort: primul argument nu este un array"
+
+#: array.c:1246
+#, fuzzy
+msgid "asorti: first argument not an array"
+msgstr "asort: primul argument nu este un array"
+
+#: awkgram.y:246
#, fuzzy, c-format
msgid "%s blocks must have an action part"
msgstr "Blocurile de END trebuie sã aibã un fragment de acþiune"
-#: awkgram.y:230
+#: awkgram.y:249
#, fuzzy
msgid "each rule must have a pattern or an action part"
msgstr "Blocurile de END trebuie sã aibã un fragment de acþiune"
-#: awkgram.y:266 awkgram.y:275
+#: awkgram.y:320 awkgram.y:330
#, fuzzy
msgid "old awk does not support multiple `BEGIN' or `END' rules"
msgstr "vechiul awk nu supoortã operatorul `**'"
-#: awkgram.y:304
+#: awkgram.y:367
#, c-format
msgid "`%s' is a built-in function, it cannot be redefined"
msgstr "`%s' este funcþie internã, nu poate fi redefinitã"
-#: awkgram.y:350
+#: awkgram.y:427
#, fuzzy
msgid "regexp constant `//' looks like a C++ comment, but is not"
msgstr "constanta regexp `/%s/' aratã ca un comentariu C, dar nu este"
-#: awkgram.y:353
+#: awkgram.y:430
#, c-format
msgid "regexp constant `/%s/' looks like a C comment, but is not"
msgstr "constanta regexp `/%s/' aratã ca un comentariu C, dar nu este"
-#: awkgram.y:380 awkgram.y:692
-msgid "statement may have no effect"
-msgstr "declaraþia poate sã nu aibã nici un efect"
+#: awkgram.y:735
+#, fuzzy
+msgid "`break' is not allowed outside a loop or switch"
+msgstr "`break' în afara buclei nu este permis"
+
+#: awkgram.y:744
+#, fuzzy
+msgid "`continue' is not allowed outside a loop"
+msgstr "`continue' în afara buclei nu este permis"
-#: awkgram.y:477 awkgram.y:480 awkgram.y:504 awkgram.y:511 awkgram.y:518
+#: awkgram.y:753
#, fuzzy, c-format
-msgid "`%s' used in %s action"
+msgid "`next' used in %s action"
msgstr "`next' folosit în acþiune BEGIN sau END"
-#: awkgram.y:495 awkgram.y:499
+#: awkgram.y:767 awkgram.y:771
msgid "`nextfile' is a gawk extension"
msgstr "`nextfile' este extensie gawk"
-#: awkgram.y:528
+#: awkgram.y:775
+#, fuzzy, c-format
+msgid "`nextfile' used in %s action"
+msgstr "`next' folosit în acþiune BEGIN sau END"
+
+#: awkgram.y:799
msgid "`return' used outside function context"
msgstr "`return' folosit în afara contextului funcþiei"
-#: awkgram.y:570
+#: awkgram.y:859
msgid "plain `print' in BEGIN or END rule should probably be `print \"\"'"
msgstr ""
"`print' simplu din regulile BEGIN sau END ar trebui sã fie probabil `print "
"\"\"'"
-#: awkgram.y:586 awkgram.y:594
+#: awkgram.y:927 awkgram.y:935
msgid "`delete array' is a gawk extension"
msgstr "`delete array' este extensie gawk"
-#: awkgram.y:608 awkgram.y:616
+#: awkgram.y:955 awkgram.y:963
#, fuzzy
msgid "`delete(array)' is a non-portable tawk extension"
msgstr "`delete array' este extensie gawk"
-#: awkgram.y:660
+#: awkgram.y:1004
#, c-format
msgid "duplicate case values in switch body: %s"
msgstr ""
-#: awkgram.y:670
-msgid "Duplicate `default' detected in switch body"
+#: awkgram.y:1014
+msgid "duplicate `default' detected in switch body"
msgstr ""
-#: awkgram.y:759
+#: awkgram.y:1151
msgid "multistage two-way pipelines don't work"
msgstr "legãturile(pipelines) bidirecþionale multistage nu vor funcþiona"
-#: awkgram.y:850
+#: awkgram.y:1253
msgid "regular expression on right of assignment"
msgstr "expresie regularã în dreapta atribuirii"
-#: awkgram.y:860
+#: awkgram.y:1263
msgid "regular expression on left of `~' or `!~' operator"
msgstr "expresie regularã în stânga operatorului `~' sau `!~'"
-#: awkgram.y:866 awkgram.y:954
+#: awkgram.y:1278 awkgram.y:1423
#, fuzzy
msgid "old awk does not support the keyword `in' except after `for'"
msgstr "vechiul awk nu supoortã operatorul `**'"
-#: awkgram.y:872
+#: awkgram.y:1287
msgid "regular expression on right of comparison"
msgstr "expresie regularã în dreapta comparaþiei"
-#: awkgram.y:936
+#: awkgram.y:1399
#, fuzzy, c-format
-msgid "`getline var' invalid inside %s rule"
+msgid "`getline var' invalid inside `%s' rule"
msgstr "port remote invalid în `%s'"
-#: awkgram.y:939
-#, c-format
-msgid "`getline' invalid inside %s rule"
-msgstr ""
+#: awkgram.y:1401
+#, fuzzy, c-format
+msgid "`getline' invalid inside `%s' rule"
+msgstr "port remote invalid în `%s'"
-#: awkgram.y:944
+#: awkgram.y:1407
msgid "non-redirected `getline' undefined inside END action"
msgstr "`getline' nedefinitã ºi neredirectatã înãuntrul unei acþiuni END"
-#: awkgram.y:955
+#: awkgram.y:1424
#, fuzzy
msgid "old awk does not support multidimensional arrays"
msgstr "vechiul awk nu supoortã operatorul `**'"
-#: awkgram.y:1001
+#: awkgram.y:1528
msgid "call of `length' without parentheses is not portable"
msgstr "apelarea lui `legth' fãrã paranteze nu este portabilã"
-#: awkgram.y:1006
-msgid "call of `length' without parentheses is deprecated by POSIX"
-msgstr "apelarea lui `length' fãrã paranteze nu mai este folositã în POSIX"
-
-#: awkgram.y:1051
+#: awkgram.y:1591
#, fuzzy
msgid "indirect function calls are a gawk extension"
-msgstr "`extension' este o extensie gawk"
+msgstr "`nextfile' este extensie gawk"
-#: awkgram.y:1084
-msgid "use of non-array as array"
-msgstr ""
+#: awkgram.y:1605
+#, fuzzy, c-format
+msgid "can not use special variable `%s' for indirect function call"
+msgstr "funcþia `%s': nu se poate folosi numele funcþiei ca nume de parametru"
-#: awkgram.y:1087
+#: awkgram.y:1682
msgid "invalid subscript expression"
msgstr "expresie subscript invalidã"
-#: awkgram.y:1329
+#: awkgram.y:1722
+msgid "use of non-array as array"
+msgstr ""
+
+#: awkgram.y:1993
#, fuzzy
msgid "unexpected newline or end of string"
msgstr "linie nouã neaºteptatã"
-#: awkgram.y:1446
-msgid "empty program text on command line"
-msgstr "text program vid în linia de comandã"
-
-#: awkgram.y:1502
+#: awkgram.y:2248 awkgram.y:2296 awkgram.y:2470
#, c-format
msgid "can't open source file `%s' for reading (%s)"
msgstr "nu se poate deschide fiºierul sursã `%s' pentru citire (%s)"
-#: awkgram.y:1600
+#: awkgram.y:2249 awkgram.y:2297 builtin.c:122
+msgid "reason unknown"
+msgstr "motiv necunoscut"
+
+#: awkgram.y:2257
+#, fuzzy, c-format
+msgid "already included source file `%s'"
+msgstr "nu se poate citi fiºierul sursã `%s' (%s)"
+
+#: awkgram.y:2281
+#, fuzzy
+msgid "@include is a gawk extension"
+msgstr "`nextfile' este extensie gawk"
+
+#: awkgram.y:2288
+msgid "empty filename after @include"
+msgstr ""
+
+#: awkgram.y:2422
+msgid "empty program text on command line"
+msgstr "text program vid în linia de comandã"
+
+#: awkgram.y:2537
#, c-format
msgid "can't read sourcefile `%s' (%s)"
msgstr "nu se poate citi fiºierul sursã `%s' (%s)"
-#: awkgram.y:1608
+#: awkgram.y:2547
#, c-format
msgid "source file `%s' is empty"
msgstr "fiºierul sursã `%s' este vid"
-#: awkgram.y:1800 awkgram.y:1922 awkgram.y:1940 awkgram.y:2315 awkgram.y:2407
+#: awkgram.y:2732
msgid "source file does not end in newline"
msgstr "fiºierul sursã nu se terminã în linie nouã"
-#: awkgram.y:1862
+#: awkgram.y:2809
msgid "unterminated regexp ends with `\\' at end of file"
msgstr "regexp-ul neterminat se terminã cu `\\'` la sfârºitul fiºierului"
-#: awkgram.y:1886
+#: awkgram.y:2833
#, c-format
msgid "%s: %d: tawk regex modifier `/.../%c' doesn't work in gawk"
msgstr ""
-#: awkgram.y:1890
+#: awkgram.y:2837
#, c-format
msgid "tawk regex modifier `/.../%c' doesn't work in gawk"
msgstr ""
-#: awkgram.y:1897
+#: awkgram.y:2844
msgid "unterminated regexp"
msgstr "regexp neterminat"
-#: awkgram.y:1900
+#: awkgram.y:2848
msgid "unterminated regexp at end of file"
msgstr "regexp neterminat la sfârºitul fiºierului"
-#: awkgram.y:1969
+#: awkgram.y:2907
msgid "use of `\\ #...' line continuation is not portable"
msgstr "folosirea continuãrii liniei `\\ #...' nu este portabilã"
-#: awkgram.y:1982
+#: awkgram.y:2923
msgid "backslash not last character on line"
msgstr "backslash nu este ultimul caracter din linie"
-#: awkgram.y:2027
+#: awkgram.y:2984
msgid "POSIX does not allow operator `**='"
msgstr "POSIX nu permite operatorul `**='"
-#: awkgram.y:2029
+#: awkgram.y:2986
msgid "old awk does not support operator `**='"
msgstr "vechiul awk nu suportã operatorul `**='"
-#: awkgram.y:2038
+#: awkgram.y:2995
msgid "POSIX does not allow operator `**'"
msgstr "POSIX nu permite operatorul `**'"
-#: awkgram.y:2040
+#: awkgram.y:2997
msgid "old awk does not support operator `**'"
msgstr "vechiul awk nu supoortã operatorul `**'"
-#: awkgram.y:2071
+#: awkgram.y:3032
msgid "operator `^=' is not supported in old awk"
msgstr "operatorul `^=' nu este suportat în vechiul awk"
-#: awkgram.y:2079
+#: awkgram.y:3040
msgid "operator `^' is not supported in old awk"
msgstr "operator `^' nu este suportat în vechiul awk"
-#: awkgram.y:2163 awkgram.y:2178
+#: awkgram.y:3133 awkgram.y:3149
msgid "unterminated string"
msgstr "ºir de caractere neterminat"
-#: awkgram.y:2368
+#: awkgram.y:3345
#, c-format
msgid "invalid char '%c' in expression"
msgstr "caracter invalid `%c' în expresie"
-#: awkgram.y:2416
+#: awkgram.y:3391
#, c-format
msgid "`%s' is a gawk extension"
msgstr "`%s' este extensie gawk"
-#: awkgram.y:2419
+#: awkgram.y:3394
#, c-format
msgid "`%s' is a Bell Labs extension"
msgstr "`%s' este extensie Bell Labs"
-#: awkgram.y:2422
+#: awkgram.y:3397
#, c-format
msgid "POSIX does not allow `%s'"
msgstr "POSIX nu permite `%s'"
-#: awkgram.y:2426
+#: awkgram.y:3401
#, c-format
msgid "`%s' is not supported in old awk"
msgstr "`%s' nu este suportat în vechiul awk"
-#: awkgram.y:2452
+#: awkgram.y:3465
msgid "`goto' considered harmful!\n"
msgstr "`goto' este considerat periculos!\n"
-#: awkgram.y:2514
+#: awkgram.y:3518
#, c-format
msgid "%d is invalid as number of arguments for %s"
msgstr "%d este invalid ca numãr de argumente pentru %s"
-#: awkgram.y:2533 awkgram.y:2536
+#: awkgram.y:3544 awkgram.y:3547
msgid "match: third argument is a gawk extension"
msgstr "match: al treilea argument este extensie gawk"
-#: awkgram.y:2549
+#: awkgram.y:3575
#, c-format
msgid "%s: string literal as last arg of substitute has no effect"
msgstr ""
"%s: ºirul de caractere literal ca ultim argument al înlocuitorului nu are "
"nici un efect"
-#: awkgram.y:2552
+#: awkgram.y:3580
#, fuzzy, c-format
msgid "%s third parameter is not a changeable object"
msgstr "al treilea parametru al sub nu este un obiect modificabil"
-#: awkgram.y:2586 awkgram.y:2589
+#: awkgram.y:3665 awkgram.y:3668
msgid "close: second argument is a gawk extension"
msgstr "close: al doilea argument este extensie gawk"
-#: awkgram.y:2599
+#: awkgram.y:3680
msgid "use of dcgettext(_\"...\") is incorrect: remove leading underscore"
msgstr ""
"folosirea lui dcgettext(_\"...\") este incorectã: eliminaþi liniuþa_jos de "
"la început"
-#: awkgram.y:2614
+#: awkgram.y:3695
#, fuzzy
msgid "use of dcngettext(_\"...\") is incorrect: remove leading underscore"
msgstr ""
"folosirea lui dcgettext(_\"...\") este incorectã: eliminaþi liniuþa_jos de "
"la început"
-#: awkgram.y:2686
+#: awkgram.y:3787
#, c-format
msgid "function `%s': parameter #%d, `%s', duplicates parameter #%d"
msgstr "funcþia `%s': parametrul #%d, `%s', parametrul duplicat #%d"
-#: awkgram.y:2719
+#: awkgram.y:3829
#, c-format
msgid "function `%s': parameter `%s' shadows global variable"
msgstr ""
"funcþia `%s': parametrul `%s' nu mai þine cont de(shadows) variabila globalã"
-#: awkgram.y:2831
+#: awkgram.y:3987
#, c-format
msgid "could not open `%s' for writing (%s)"
msgstr "nu s-a putut deschide `%s' pentru scriere (%s)"
-#: awkgram.y:2832 profile.c:96
+#: awkgram.y:3988 profile.c:85
msgid "sending profile to standard error"
msgstr "se trimite profilul la dipsozitivul de eroare standard"
-#: awkgram.y:2864
+#: awkgram.y:3994
#, c-format
msgid "%s: close failed (%s)"
msgstr "%s: închidere eºuatã (%s)"
-#: awkgram.y:2985
+#: awkgram.y:4046
msgid "shadow_funcs() called twice!"
msgstr "shadow_funcs() apelatã de douã ori!"
-#: awkgram.y:3012
+#: awkgram.y:4052
msgid "there were shadowed variables."
msgstr ""
-#: awkgram.y:3085
+#: awkgram.y:4081
#, c-format
msgid "function `%s': can't use function name as parameter name"
msgstr "funcþia `%s': nu se poate folosi numele funcþiei ca nume de parametru"
-#: awkgram.y:3088
+#: awkgram.y:4086
#, fuzzy, c-format
msgid "function `%s': can't use special variable `%s' as a function parameter"
msgstr "funcþia `%s': nu se poate folosi numele funcþiei ca nume de parametru"
-#: awkgram.y:3098
+#: awkgram.y:4102
#, c-format
msgid "function name `%s' previously defined"
msgstr "numele funcþiei `%s' a mai fost definit înainte"
-#: awkgram.y:3249 awkgram.y:3255
+#: awkgram.y:4271 awkgram.y:4277
#, c-format
msgid "function `%s' called but never defined"
msgstr "funcþia `%s' este apelatã dar niciodatã definitã"
-#: awkgram.y:3258
+#: awkgram.y:4280
#, c-format
msgid "function `%s' defined but never called"
msgstr "funcþia `%s' este definitã dar niciodatã apelatã"
-#: awkgram.y:3285
+#: awkgram.y:4311
#, c-format
msgid "regexp constant for parameter #%d yields boolean value"
msgstr ""
"regexp constant pentru parametrul #%d solicitã(yields) valoare booleanã"
-#: awkgram.y:3329
+#: awkgram.y:4420
#, fuzzy, c-format
msgid ""
"function `%s' called with space between name and `(',\n"
@@ -432,242 +508,144 @@ msgstr ""
"funcþia `%s' apelatã cu un spaþiu între nume ºi `(',\n"
"%s"
-#: awkgram.y:3750
-#, fuzzy
-msgid "division by zero attempted in `/'"
-msgstr "s-a încercat împãrþire la zero în `/='"
+#: awkgram.y:4673 eval.c:1845
+msgid "division by zero attempted"
+msgstr "s-a încercat împãrþire la zero"
-#: awkgram.y:3755 eval.c:1411
+#: awkgram.y:4682 eval.c:1877
#, c-format
msgid "division by zero attempted in `%%'"
msgstr "s-a încercat împãrþire la zero în `%%'"
-#: builtin.c:122
+#: awkgram.y:5342
+msgid "statement may have no effect"
+msgstr "declaraþia poate sã nu aibã nici un efect"
+
+#: builtin.c:120
#, c-format
msgid "%s to \"%s\" failed (%s)"
msgstr "%s cãtre \"%s\" eºuatã (%s)"
-#: builtin.c:123
+#: builtin.c:121
msgid "standard output"
msgstr "ieºire(output) standard"
-#: builtin.c:124
-msgid "reason unknown"
-msgstr "motiv necunoscut"
-
-#: builtin.c:137
+#: builtin.c:135
msgid "exp: received non-numeric argument"
msgstr "exp: s-a primit argument nenumeric"
-#: builtin.c:143
+#: builtin.c:141
#, c-format
msgid "exp: argument %g is out of range"
msgstr "exp: argumentul %g este în afara domeniului"
-#: builtin.c:201
+#: builtin.c:200
#, c-format
msgid "fflush: cannot flush: pipe `%s' opened for reading, not writing"
msgstr ""
"fflush: nu s-a putut face flush: legãtura(pipe) `%s' a fost deschisã pentru "
"citire, nu scriere"
-#: builtin.c:204
+#: builtin.c:203
#, c-format
msgid "fflush: cannot flush: file `%s' opened for reading, not writing"
msgstr ""
"fflush: nu s-a putut face flush: fiºierul `%s' a fost deschis pentru citire, "
"nu scriere"
-#: builtin.c:216
+#: builtin.c:215
#, c-format
msgid "fflush: `%s' is not an open file, pipe or co-process"
msgstr "fflush: `%s' nu este fiºier deschis, legãturã(pipe) sau co-proces"
-#: builtin.c:310
+#: builtin.c:322
msgid "index: received non-string first argument"
msgstr "index: s-a primit un prim argument non-ºir de caractere"
-#: builtin.c:312
+#: builtin.c:324
msgid "index: received non-string second argument"
msgstr "index: s-a primit un al doilea argument non-ºir de caractere"
-#: builtin.c:434
+#: builtin.c:446
msgid "int: received non-numeric argument"
msgstr "int: s-a primit argument nenumeric"
-#: builtin.c:464
+#: builtin.c:469
#, fuzzy
msgid "`length(array)' is a gawk extension"
msgstr "`delete array' este extensie gawk"
-#: builtin.c:471
-msgid "length: untyped parameter argument will be forced to scalar"
-msgstr ""
-
-#: builtin.c:480
-msgid "length: untyped argument will be forced to scalar"
-msgstr ""
-
-#: builtin.c:484
+#: builtin.c:477
msgid "length: received non-string argument"
msgstr "legth: s-a primit argument non-string"
-#: builtin.c:515
+#: builtin.c:508
msgid "log: received non-numeric argument"
msgstr "log: s-a primit argument nenumeric"
-#: builtin.c:518
+#: builtin.c:511
#, c-format
msgid "log: received negative argument %g"
msgstr "log: s-a primit argument %g negativ"
-#: builtin.c:726 builtin.c:729
-msgid "must use `count$' on all formats or none"
-msgstr ""
-
-#: builtin.c:790
-#, c-format
-msgid "field width is ignored for `%%%%' specifier"
-msgstr ""
-
-#: builtin.c:792
-#, c-format
-msgid "precision is ignored for `%%%%' specifier"
-msgstr ""
-
-#: builtin.c:794
-#, c-format
-msgid "field width and precision are ignored for `%%%%' specifier"
-msgstr ""
-
-#: builtin.c:845
-msgid "`$' is not permitted in awk formats"
-msgstr "`$' nu este permis în formatele awk"
-
-#: builtin.c:851
-msgid "arg count with `$' must be > 0"
-msgstr "numãrul de arg cu `%' trebuie sã fie > 0"
-
-#: builtin.c:853
+#: builtin.c:531 builtin.c:573 builtin.c:586 builtin.c:982 builtin.c:994
#, fuzzy, c-format
-msgid "arg count %ld greater than total number of supplied arguments"
-msgstr ""
-"numãrul de arg %d este mai mare decât numãrul total de argumente furnizate"
-
-#: builtin.c:855
-msgid "`$' not permitted after period in format"
-msgstr "`$' nu este permis în format dupã punct"
-
-#: builtin.c:868
-msgid "no `$' supplied for positional field width or precision"
-msgstr ""
-"nu s-a furnizat nici un `$' pentru câmpul poziþional lungime sau precisie"
-
-#: builtin.c:938
-msgid "`l' is meaningless in awk formats; ignored"
-msgstr "`l' nu are sens în formatele awk; ignorat"
-
-#: builtin.c:942
-msgid "`l' is not permitted in POSIX awk formats"
-msgstr "`l' nu este permis în formatele awk POSIX"
-
-#: builtin.c:953
-msgid "`L' is meaningless in awk formats; ignored"
-msgstr "`L' nu are sens în formatele awk; ignorat"
-
-#: builtin.c:957
-msgid "`L' is not permitted in POSIX awk formats"
-msgstr "`L' nu este permis în formatele POSIX awk"
-
-#: builtin.c:968
-msgid "`h' is meaningless in awk formats; ignored"
-msgstr "`h' nu are sens în formatele awl; ignorat"
-
-#: builtin.c:972
-msgid "`h' is not permitted in POSIX awk formats"
-msgstr "`h' nu este permis în formatele POSIX awk"
-
-#: builtin.c:1252
-#, c-format
-msgid "[s]printf: value %g is out of range for `%%%c' format"
-msgstr ""
-
-#: builtin.c:1332
-#, c-format
-msgid "ignoring unknown format specifier character `%c': no argument converted"
-msgstr ""
-
-#: builtin.c:1338
-msgid "not enough arguments to satisfy format string"
-msgstr ""
-"nu existã destule argumente pentru satisfacerea formatului ºirului de "
-"caractere"
-
-#: builtin.c:1340
-msgid "^ ran out for this one"
-msgstr "^ insuficient pentru aceasta"
-
-#: builtin.c:1346
-msgid "[s]printf: format specifier does not have control letter"
-msgstr "[s]printf: specificatorul de format nu are literã de control"
-
-#: builtin.c:1349
-msgid "too many arguments supplied for format string"
-msgstr "prea multe argumente furnizate pentru formatul ºirului de caractere"
+msgid "attempt to use array `%s' in scalar context"
+msgstr "încercare de a utiliza array-ul `%s' într-un context scalar"
-#: builtin.c:1424 builtin.c:1427
+#: builtin.c:569 builtin.c:580
msgid "printf: no arguments"
msgstr "printf: nici un argument"
-#: builtin.c:1451
+#: builtin.c:621
msgid "sqrt: received non-numeric argument"
msgstr "sqrt: s-a primit argument nenumeric"
-#: builtin.c:1455
+#: builtin.c:625
#, c-format
msgid "sqrt: called with negative argument %g"
msgstr "sqrt: apelat cu argumentul negativ %g"
-#: builtin.c:1479
-#, c-format
-msgid "substr: start index %g is invalid, using 1"
-msgstr "substr: indexul de start %g este invalid, se foloseºte -1"
-
-#: builtin.c:1484
-#, c-format
-msgid "substr: non-integer start index %g will be truncated"
-msgstr "substr: indexul de start ne-întreg(integer) %g va fi trunchiat"
-
-#: builtin.c:1510
+#: builtin.c:649
#, fuzzy, c-format
msgid "substr: length %g is not >= 1"
msgstr "substr: lungimea %g este <= 0"
-#: builtin.c:1512
+#: builtin.c:651
#, fuzzy, c-format
msgid "substr: length %g is not >= 0"
msgstr "substr: lungimea %g este <= 0"
-#: builtin.c:1519
+#: builtin.c:658
#, c-format
msgid "substr: non-integer length %g will be truncated"
msgstr "substr lungimea ne-întregului(integer) %g va fi trunchiatã"
-#: builtin.c:1524
+#: builtin.c:663
#, c-format
msgid "substr: length %g too big for string indexing, truncating to %g"
msgstr ""
-#: builtin.c:1536
+#: builtin.c:675
+#, c-format
+msgid "substr: start index %g is invalid, using 1"
+msgstr "substr: indexul de start %g este invalid, se foloseºte -1"
+
+#: builtin.c:680
+#, c-format
+msgid "substr: non-integer start index %g will be truncated"
+msgstr "substr: indexul de start ne-întreg(integer) %g va fi trunchiat"
+
+#: builtin.c:705
msgid "substr: source string is zero length"
msgstr "substr: ºirul de caractere sursã are lungime zero"
-#: builtin.c:1552
+#: builtin.c:721
#, fuzzy, c-format
msgid "substr: start index %g is past end of string"
msgstr "substr: indexul de start %d este fostul sfârºit de ºir de caractere"
-#: builtin.c:1560
+#: builtin.c:729
#, fuzzy, c-format
msgid ""
"substr: length %g at start index %g exceeds length of first argument (%lu)"
@@ -675,485 +653,444 @@ msgstr ""
"substr: lungimea %d la indexul de start %d depãºeºte lungimea primului "
"argument (%d)"
-#: builtin.c:1637
+#: builtin.c:806
+#, fuzzy
+msgid "strftime: received non-numeric second argument"
+msgstr "strftime: s-a primit un al doilea argument nenumeric"
+
+#: builtin.c:813
#, fuzzy
msgid "strftime: received non-string first argument"
msgstr "strftime: s-a primit primul argument non ºir de caractere"
-#: builtin.c:1643
+#: builtin.c:819
msgid "strftime: received empty format string"
msgstr "strftime: s-a primit ºir de caractere în format vid"
-#: builtin.c:1652
-#, fuzzy
-msgid "strftime: received non-numeric second argument"
-msgstr "strftime: s-a primit un al doilea argument nenumeric"
-
-#: builtin.c:1729
+#: builtin.c:885
msgid "mktime: received non-string argument"
msgstr "mktime: s-a primit argument non ºir de caractere"
-#: builtin.c:1746
+#: builtin.c:902
msgid "mktime: at least one of the values is out of the default range"
msgstr ""
-#: builtin.c:1781
+#: builtin.c:937
msgid "'system' function not allowed in sandbox mode"
msgstr ""
-#: builtin.c:1786
+#: builtin.c:942
#, fuzzy
msgid "system: received non-string argument"
msgstr "system: s-a primit argument non ºir de caractere"
-#: builtin.c:1907 eval.c:2285
+#: builtin.c:997 eval.c:1105 eval.c:1557 eval.c:1570
+#, c-format
+msgid "reference to uninitialized variable `%s'"
+msgstr "referinþã la variabila neiniþializatã `%s'"
+
+#: builtin.c:1064
#, fuzzy, c-format
msgid "reference to uninitialized field `$%d'"
msgstr "referinþã la variabila neiniþializatã `%s'"
-#: builtin.c:2012
+#: builtin.c:1098
#, fuzzy
msgid "tolower: received non-string argument"
msgstr "tolower: s-a primit argument non-ºir de caractere"
-#: builtin.c:2042
+#: builtin.c:1151
#, fuzzy
msgid "toupper: received non-string argument"
msgstr "toupper: s-a primit argument non-ºir de caractere"
-#: builtin.c:2075
+#: builtin.c:1199
msgid "atan2: received non-numeric first argument"
msgstr "atan2: s-a primit un prim argument nenumeric"
-#: builtin.c:2077
+#: builtin.c:1201
msgid "atan2: received non-numeric second argument"
msgstr "atan2: s-a primit un al doilea argument nenumeric"
-#: builtin.c:2096
+#: builtin.c:1220
msgid "sin: received non-numeric argument"
msgstr "sin: s-a primit un argument nenumeric"
-#: builtin.c:2112
+#: builtin.c:1236
msgid "cos: received non-numeric argument"
msgstr "cos: s-a primit un argument nenumeric"
-#: builtin.c:2165
+#: builtin.c:1289
msgid "srand: received non-numeric argument"
msgstr "srand: s-a primit un argument nenumeric"
-#: builtin.c:2200
+#: builtin.c:1320
msgid "match: third argument is not an array"
msgstr "match: al treilea argument nu este un array"
-#: builtin.c:2750
+#: builtin.c:1827
#, fuzzy
msgid "gensub: third argument of 0 treated as 1"
msgstr "gensub: al 3-lea argument care este 0 va fi considerat 1"
-#: builtin.c:2866
+#: builtin.c:1869
msgid "lshift: received non-numeric first argument"
msgstr "lshift: s-a primit un prim argument nenumeric"
-#: builtin.c:2868
+#: builtin.c:1871
#, fuzzy
msgid "lshift: received non-numeric second argument"
-msgstr "strftime: s-a primit un al doilea argument nenumeric"
+msgstr "atan2: s-a primit un al doilea argument nenumeric"
-#: builtin.c:2874
+#: builtin.c:1877
#, c-format
msgid "lshift(%lf, %lf): negative values will give strange results"
msgstr "lshift(%lf, %lf): valorile negative vor furniza rezultate ciudate"
-#: builtin.c:2876
+#: builtin.c:1879
#, c-format
msgid "lshift(%lf, %lf): fractional values will be truncated"
msgstr "lshift(%lf, %lf): valorile fracþionale vor fi trunchiate"
-#: builtin.c:2878
+#: builtin.c:1881
#, c-format
msgid "lshift(%lf, %lf): too large shift value will give strange results"
msgstr ""
"lshift(%lf, %lf): valorile schimbate prea mult vor da rezultate ciudate"
-#: builtin.c:2904
+#: builtin.c:1908
msgid "rshift: received non-numeric first argument"
msgstr "rshift: s-a primit un prim argument nenumeric"
-#: builtin.c:2906
+#: builtin.c:1910
#, fuzzy
msgid "rshift: received non-numeric second argument"
-msgstr "strftime: s-a primit un al doilea argument nenumeric"
+msgstr "atan2: s-a primit un al doilea argument nenumeric"
-#: builtin.c:2912
+#: builtin.c:1916
#, c-format
msgid "rshift(%lf, %lf): negative values will give strange results"
msgstr "rshift(%lf, %lf): valorile negative vor da rezultate ciudate"
-#: builtin.c:2914
+#: builtin.c:1918
#, c-format
msgid "rshift(%lf, %lf): fractional values will be truncated"
msgstr "rshift(%lf, %lf): valorile fracþionale vor fi trunchiate"
-#: builtin.c:2916
+#: builtin.c:1920
#, c-format
msgid "rshift(%lf, %lf): too large shift value will give strange results"
msgstr ""
"rshift(%lf, %lf): valorile schimbate prea mult vor da rezultate ciudate"
-#: builtin.c:2942
+#: builtin.c:1947
msgid "and: received non-numeric first argument"
msgstr "and: s-a primit un prim argument nenumeric"
-#: builtin.c:2944
+#: builtin.c:1949
#, fuzzy
msgid "and: received non-numeric second argument"
msgstr "atan2: s-a primit un al doilea argument nenumeric"
-#: builtin.c:2950
+#: builtin.c:1955
#, c-format
msgid "and(%lf, %lf): negative values will give strange results"
msgstr "and(%lf, %lf): valorile negative vor da rezultate ciudate"
-#: builtin.c:2952
+#: builtin.c:1957
#, c-format
msgid "and(%lf, %lf): fractional values will be truncated"
msgstr "and(%lf, %lf): valorile fracþionale vor fi trunchiate"
-#: builtin.c:2978
+#: builtin.c:1984
msgid "or: received non-numeric first argument"
msgstr "or: s-a primit un prim argument nenumeric"
-#: builtin.c:2980
+#: builtin.c:1986
#, fuzzy
msgid "or: received non-numeric second argument"
msgstr "atan2: s-a primit un al doilea argument nenumeric"
-#: builtin.c:2986
+#: builtin.c:1992
#, c-format
msgid "or(%lf, %lf): negative values will give strange results"
msgstr "or(%lf, %lf): valorile negative for da rezultate ciudate"
-#: builtin.c:2988
+#: builtin.c:1994
#, c-format
msgid "or(%lf, %lf): fractional values will be truncated"
msgstr "or(%lf, %lf): valorile fracþionale vor fi trunchiate"
-#: builtin.c:3014
+#: builtin.c:2023
msgid "xor: received non-numeric first argument"
msgstr "xor: s-a primit un prim argument nenumeric"
-#: builtin.c:3016
+#: builtin.c:2025
#, fuzzy
msgid "xor: received non-numeric second argument"
msgstr "atan2: s-a primit un al doilea argument nenumeric"
-#: builtin.c:3022
+#: builtin.c:2031
#, c-format
msgid "xor(%lf, %lf): negative values will give strange results"
msgstr "xor(%lf, %lf): valorile negative vor da rezultate ciudate"
-#: builtin.c:3024
+#: builtin.c:2033
#, c-format
msgid "xor(%lf, %lf): fractional values will be truncated"
msgstr "xor(%lf, %lf): valorile fracþionale vor fi trunchiate"
-#: builtin.c:3048
+#: builtin.c:2057 builtin.c:2063
msgid "compl: received non-numeric argument"
msgstr "compl: s-a primit argument nenumeric"
-#: builtin.c:3054
+#: builtin.c:2065
#, c-format
msgid "compl(%lf): negative value will give strange results"
msgstr "compl(%lf): valorile negative vor da rezultate ciudate"
-#: builtin.c:3056
+#: builtin.c:2067
#, c-format
msgid "compl(%lf): fractional value will be truncated"
msgstr "compl(%lf): valorile fracþionale vor fi trunchiate"
-#: builtin.c:3229
+#: builtin.c:2237
#, c-format
msgid "dcgettext: `%s' is not a valid locale category"
msgstr "dcgettext: `%s' nu este o categorie localã validã"
-#: eval.c:374
+#: eval.c:412
#, c-format
msgid "unknown nodetype %d"
msgstr "tip nod %d necunoscut"
-#: eval.c:423
+#: eval.c:423 eval.c:437
+#, fuzzy, c-format
+msgid "unknown opcode %d"
+msgstr "tip nod %d necunoscut"
+
+#: eval.c:434
+#, c-format
+msgid "opcode %s not an operator or keyword"
+msgstr ""
+
+#: eval.c:487
msgid "buffer overflow in genflags2str"
msgstr "depãºire(overflow) de buffer în genflags2str"
-#: eval.c:455 eval.c:461 profile.c:787
+#: eval.c:613
#, c-format
-msgid "attempt to use array `%s' in a scalar context"
-msgstr "încercare de a utiliza array-ul `%s' într-un context scalar"
-
-#: eval.c:803
-#, fuzzy, c-format
-msgid "for loop: array `%s' changed size from %ld to %ld during loop execution"
+msgid ""
+"\n"
+"\t# Function Call Stack:\n"
+"\n"
msgstr ""
-"for loop: array-ul `%s' ºi-a schimbat mãrimea din %d în %d în timpul "
-"execuþiei buclei"
-
-#: eval.c:824
-msgid "`break' outside a loop is not portable"
-msgstr "`break' în afara buclei nu este portabil"
+"\n"
+"\t# Stiva de Apelare a Funcþiei:\n"
+"\n"
-#: eval.c:828
-msgid "`break' outside a loop is not allowed"
-msgstr "`break' în afara buclei nu este permis"
+#: eval.c:640
+msgid "`IGNORECASE' is a gawk extension"
+msgstr "`IGNORECASE' este extensie gawk"
-#: eval.c:845
-msgid "`continue' outside a loop is not portable"
-msgstr "`continue' în afara buclei nu este portabil"
+#: eval.c:669
+msgid "`BINMODE' is a gawk extension"
+msgstr "`BINMODE' este extensie gawk"
-#: eval.c:849
-msgid "`continue' outside a loop is not allowed"
-msgstr "`continue' în afara buclei nu este permis"
+#: eval.c:727
+#, c-format
+msgid "BINMODE value `%s' is invalid, treated as 3"
+msgstr ""
-#: eval.c:883
-msgid "`next' cannot be called from a BEGIN rule"
-msgstr "`next' nu poate fi apelat dintr-o regulã BEGIN"
+#: eval.c:817
+#, c-format
+msgid "bad `%sFMT' specification `%s'"
+msgstr "`%sFMT' specificaþie `%s' invalidã"
-#: eval.c:885
-msgid "`next' cannot be called from an END rule"
-msgstr "`next' nu poate fi apelat dintr-o regulã END"
+#: eval.c:895
+msgid "turning off `--lint' due to assignment to `LINT'"
+msgstr "se dezactiveazã `--lint' din cauza atribuirii lui `LINT'"
-#: eval.c:887
-#, fuzzy
-msgid "`next' cannot be called from a BEGINFILE rule"
-msgstr "`next' nu poate fi apelat dintr-o regulã BEGIN"
+#: eval.c:1067 eval.c:1544
+#, c-format
+msgid "can't use function name `%s' as variable or array"
+msgstr "nu se poate folosi numele funcþiei `%s' ca variabilã sau array"
-#: eval.c:889
-#, fuzzy
-msgid "`next' cannot be called from an ENDFILE rule"
-msgstr "`next' nu poate fi apelat dintr-o regulã END"
+#: eval.c:1095
+msgid "assignment is not allowed to result of builtin function"
+msgstr "atribuirea nu este permisã rezultatului funcþiei interne"
-#: eval.c:898
-msgid "`nextfile' cannot be called from a BEGIN rule"
-msgstr "`nextfile' nu poate fi apelat dintr-o regulã BEGIN"
+#: eval.c:1104 eval.c:1556 eval.c:1569
+#, c-format
+msgid "reference to uninitialized argument `%s'"
+msgstr "referinþã la argumentul neiniþializat `%s'"
-#: eval.c:900
-msgid "`nextfile' cannot be called from an END rule"
-msgstr "`nextfile' nu poate fi apelat dintr-o regulã END"
+#: eval.c:1123
+msgid "attempt to field reference from non-numeric value"
+msgstr "încercare de referinþã la câmp din valoare nenumericã"
-#: eval.c:906
+#: eval.c:1125
#, fuzzy
-msgid "`nextfile' cannot be called from an ENDFILE rule"
-msgstr "`nextfile' nu poate fi apelat dintr-o regulã END"
+msgid "attempt to field reference from null string"
+msgstr "încercare de referinþã din ºir de caractere vid(null)"
-#: eval.c:963
-msgid "statement has no effect"
-msgstr "declaraþia nu are nici un efect"
+#: eval.c:1131
+#, fuzzy, c-format
+msgid "attempt to access field %ld"
+msgstr "încercare de accesare a câmpului %d"
-#: eval.c:1040 eval.c:2133
-#, c-format
-msgid "can't use function name `%s' as variable or array"
-msgstr "nu se poate folosi numele funcþiei `%s' ca variabilã sau array"
+#: eval.c:1140
+#, fuzzy, c-format
+msgid "reference to uninitialized field `$%ld'"
+msgstr "referinþã la variabila neiniþializatã `%s'"
-#: eval.c:1047 eval.c:1053
+#: eval.c:1202
#, c-format
-msgid "reference to uninitialized argument `%s'"
-msgstr "referinþã la argumentul neiniþializat `%s'"
+msgid "function `%s' called with more arguments than declared"
+msgstr ""
+"funcþia `%s' a fost apelatã cu mai multe argumente decât cele declarate"
-#: eval.c:1062 eval.c:2142
+#: eval.c:1358
#, c-format
-msgid "reference to uninitialized variable `%s'"
-msgstr "referinþã la variabila neiniþializatã `%s'"
-
-#: eval.c:1210
-msgid ""
-"concatenation: side effects in one expression have changed the length of "
-"another!"
+msgid "unwind_stack: unexpected type `%s'"
msgstr ""
-"concatenation: efectele secundare dintr-o expresie au schimbat lungimea "
-"alteia!"
-#: eval.c:1315
+#: eval.c:1636
+#, fuzzy, c-format
+msgid "attempt to use scalar `%s' as an array"
+msgstr "încercare de a utiliza scalarul `%s' ca array"
+
+#: eval.c:1680
msgid "assignment used in conditional context"
msgstr "atribuire folositã în context condiþional"
-#: eval.c:1396
-msgid "division by zero attempted"
-msgstr "s-a încercat împãrþire la zero"
-
-#: eval.c:1426 profile.c:663
-#, c-format
-msgid "illegal type (%s) in tree_eval"
-msgstr "tip ilegal (%s) în tree_eval"
+#: eval.c:1684
+msgid "statement has no effect"
+msgstr "declaraþia nu are nici un efect"
-#: eval.c:1589
+#: eval.c:2028
msgid "division by zero attempted in `/='"
msgstr "s-a încercat împãrþire la zero în `/='"
-#: eval.c:1611
+#: eval.c:2053
#, c-format
msgid "division by zero attempted in `%%='"
msgstr "s-a încercat împãrþire la zero în `%%='"
-#: eval.c:1891
-#, c-format
-msgid "function `%s' called with more arguments than declared"
-msgstr ""
-"funcþia `%s' a fost apelatã cu mai multe argumente decât cele declarate"
-
-#: eval.c:1948
-#, c-format
-msgid "function `%s' not defined"
-msgstr "funcþia `%s' nu este definitã"
-
-#: eval.c:1950
-#, c-format
-msgid "identifier `%s' is not a function"
-msgstr ""
-
-#: eval.c:1997
-#, c-format
-msgid ""
-"function parameter `%s' is not a scalar and cannot be used for indirect "
-"function call"
-msgstr ""
-
-#: eval.c:2014
-#, c-format
-msgid "indirect call of real function `%s' is silly"
-msgstr ""
+#: eval.c:2139
+msgid "`continue' outside a loop is not allowed"
+msgstr "`continue' în afara buclei nu este permis"
-#: eval.c:2034
-#, c-format
-msgid "function `%s' called indirectly through `%s' does not exist"
-msgstr ""
+#: eval.c:2145
+#, fuzzy
+msgid "`break' outside a loop is not allowed"
+msgstr "`break' în afara buclei nu este permis"
-#: eval.c:2039
-#, c-format
-msgid "identifier `%s' cannot be used for indirect function call"
+#: eval.c:2229
+#, fuzzy, c-format
+msgid "for loop: array `%s' changed size from %ld to %ld during loop execution"
msgstr ""
+"for loop: array-ul `%s' ºi-a schimbat mãrimea din %d în %d în timpul "
+"execuþiei buclei"
-#: eval.c:2105
+#: eval.c:2342
#, c-format
-msgid ""
-"\n"
-"\t# Function Call Stack:\n"
-"\n"
+msgid "function called indirectly through `%s' does not exist"
msgstr ""
-"\n"
-"\t# Stiva de Apelare a Funcþiei:\n"
-"\n"
-
-#: eval.c:2108
-#, c-format
-msgid "\t# -- main --\n"
-msgstr "\t# -- principal(main) --\n"
-#: eval.c:2269
-msgid "attempt to field reference from non-numeric value"
-msgstr "încercare de referinþã la câmp din valoare nenumericã"
-
-#: eval.c:2271
-msgid "attempt to reference from null string"
-msgstr "încercare de referinþã din ºir de caractere vid(null)"
-
-#: eval.c:2277
+#: eval.c:2354
#, c-format
-msgid "attempt to access field %d"
-msgstr "încercare de accesare a câmpului %d"
-
-#: eval.c:2298 eval.c:2305 profile.c:843
-msgid "assignment is not allowed to result of builtin function"
-msgstr "atribuirea nu este permisã rezultatului funcþiei interne"
+msgid "function `%s' not defined"
+msgstr "funcþia `%s' nu este definitã"
-#: eval.c:2369
-msgid "`IGNORECASE' is a gawk extension"
-msgstr "`IGNORECASE' este extensie gawk"
+#: eval.c:2481
+#, fuzzy, c-format
+msgid "`nextfile' cannot be called from a `%s' rule"
+msgstr "`nextfile' nu poate fi apelat dintr-o regulã END"
-#: eval.c:2398
-msgid "`BINMODE' is a gawk extension"
-msgstr "`BINMODE' este extensie gawk"
+#: eval.c:2540
+#, fuzzy, c-format
+msgid "`next' cannot be called from a `%s' rule"
+msgstr "`next' nu poate fi apelat dintr-o regulã END"
-#: eval.c:2456
+#: eval.c:2602
#, c-format
-msgid "BINMODE value `%s' is invalid, treated as 3"
+msgid "Sorry, don't know how to interpret `%s'"
msgstr ""
-#: eval.c:2546
-#, c-format
-msgid "bad `%sFMT' specification `%s'"
-msgstr "`%sFMT' specificaþie `%s' invalidã"
-
-#: eval.c:2624
-msgid "turning off `--lint' due to assignment to `LINT'"
-msgstr "se dezactiveazã `--lint' din cauza atribuirii lui `LINT'"
-
-#: ext.c:61
-msgid "extensions not allowed in sandbox mode"
+#: ext.c:62
+msgid "extensions are not allowed in sandbox mode"
msgstr ""
-#: ext.c:65 ext.c:70
+#: ext.c:68 ext.c:73
msgid "`extension' is a gawk extension"
msgstr "`extension' este o extensie gawk"
-#: ext.c:80
-#, c-format
-msgid "extension: cannot open `%s' (%s)\n"
+#: ext.c:83
+#, fuzzy, c-format
+msgid "fatal: extension: cannot open `%s' (%s)\n"
msgstr "extension: nu s-a putut deschide `%s' (%s)\n"
-#: ext.c:88
-#, c-format
-msgid "extension: library `%s': cannot call function `%s' (%s)\n"
+#: ext.c:93
+#, fuzzy, c-format
+msgid "fatal: extension: library `%s': cannot call function `%s' (%s)\n"
msgstr "extension: biblioteca `%s': nu pot apela funcþia `%s' (%s)\n"
-#: ext.c:108
+#: ext.c:123
msgid "extension: missing function name"
msgstr ""
-#: ext.c:113
+#: ext.c:128
#, fuzzy, c-format
msgid "extension: illegal character `%c' in function name `%s'"
msgstr "extension: biblioteca `%s': nu pot apela funcþia `%s' (%s)\n"
-#: ext.c:119
+#: ext.c:137
#, fuzzy, c-format
msgid "extension: can't redefine function `%s'"
msgstr "extension: nu s-a putut deschide `%s' (%s)\n"
-#: ext.c:123
+#: ext.c:141
#, fuzzy, c-format
msgid "extension: function `%s' already defined"
msgstr "funcþia `%s' nu este definitã"
-#: ext.c:128
-#, c-format
-msgid "extension: can't use gawk built-in `%s' as function name"
-msgstr ""
-
-#: ext.c:130
+#: ext.c:146
#, fuzzy, c-format
msgid "extension: function name `%s' previously defined"
msgstr "numele funcþiei `%s' a mai fost definit înainte"
-#: ext.c:207
+#: ext.c:148
+#, fuzzy, c-format
+msgid "extension: can't use gawk built-in `%s' as function name"
+msgstr "funcþia `%s': nu se poate folosi numele funcþiei ca nume de parametru"
+
+#: ext.c:152
+#, c-format
+msgid "make_builtin: negative argument count for function `%s'"
+msgstr ""
+
+#: ext.c:255
#, fuzzy, c-format
msgid "function `%s' defined to take no more than %d argument(s)"
msgstr "funcþia `%s' este definitã dar niciodatã apelatã"
-#: ext.c:210
+#: ext.c:258
#, fuzzy, c-format
msgid "function `%s': missing argument #%d"
msgstr "funcþia `%s' nu este definitã"
-#: ext.c:220
+#: ext.c:268
#, fuzzy, c-format
msgid "function `%s': argument #%d: attempt to use scalar as an array"
msgstr "încercare de a utiliza scalarul `%s' ca array"
-#: ext.c:224
+#: ext.c:272
#, c-format
msgid "function `%s': argument #%d: attempt to use array as a scalar"
msgstr ""
-#: ext.c:249
+#: ext.c:285
msgid "Operation Not Supported"
msgstr "Operaþie NeSuportatã"
@@ -1161,59 +1098,58 @@ msgstr "Operaþie NeSuportatã"
msgid "NF set to negative value"
msgstr "NF setat la valoare negativã"
-#: field.c:913
-msgid "split: second argument is not an array"
-msgstr "split: al doilea argument nu este un array"
-
-#: field.c:922 field.c:932 field.c:937
+#: field.c:939 field.c:946 field.c:950
#, fuzzy
msgid "split: fourth argument is a gawk extension"
msgstr "match: al treilea argument este extensie gawk"
-#: field.c:928
+#: field.c:943
#, fuzzy
msgid "split: fourth argument is not an array"
msgstr "split: al doilea argument nu este un array"
-#: field.c:975
-#, fuzzy
-msgid "split: null string for third argument is a gawk extension"
+#: field.c:957
+msgid "split: second argument is not an array"
+msgstr "split: al doilea argument nu este un array"
+
+#: field.c:987
+msgid "split: null string for third arg is a gawk extension"
msgstr "split: ºirul nul pentru al treilea arg este o extensie gawk"
-#: field.c:1032
+#: field.c:1028
#, fuzzy
-msgid "patsplit: second argument is not an array"
+msgid "patsplit: fourth argument is not an array"
msgstr "split: al doilea argument nu este un array"
-#: field.c:1041
+#: field.c:1033
#, fuzzy
-msgid "patsplit: fourth argument is not an array"
+msgid "patsplit: second argument is not an array"
msgstr "split: al doilea argument nu este un array"
-#: field.c:1067
+#: field.c:1051
#, fuzzy
msgid "patsplit: third argument must be non-null"
msgstr "match: al treilea argument nu este un array"
-#: field.c:1111
+#: field.c:1084
msgid "`FIELDWIDTHS' is a gawk extension"
msgstr "`FIELDWIDTHS' este extensie gawk"
-#: field.c:1141 field.c:1155
+#: field.c:1147
#, c-format
msgid "invalid FIELDWIDTHS value, near `%s'"
msgstr ""
-#: field.c:1238
+#: field.c:1220
msgid "null string for `FS' is a gawk extension"
msgstr "ºirul de caractere null pentru `FS' este extensie gawk"
-#: field.c:1242
+#: field.c:1224
#, fuzzy
msgid "old awk does not support regexps as value of `FS'"
msgstr "vechiul awk nu supoortã operatorul `**'"
-#: field.c:1357
+#: field.c:1343
#, fuzzy
msgid "`FPAT' is a gawk extension"
msgstr "`%s' este extensie gawk"
@@ -1273,504 +1209,501 @@ msgstr "%s: opþiunea `-W %s' nu permite parametri\n"
msgid "%s: option '-W %s' requires an argument\n"
msgstr "%s: opþiunea `%s' necesitã un parametru\n"
-#: io.c:379
+#: io.c:272
#, c-format
msgid "command line argument `%s' is a directory: skipped"
msgstr ""
-#: io.c:413
+#: io.c:275 io.c:372
#, c-format
msgid "cannot open file `%s' for reading (%s)"
msgstr "nu s-a putu deschide `%s' pentru citire (%s)"
-#: io.c:459 io.c:2999
+#: io.c:419
#, c-format
msgid "error reading input file `%s': %s"
msgstr "eroare în citirea fiºierului de intrare(input) `%s': %s"
-#: io.c:506
+#: io.c:470
#, c-format
msgid "close of fd %d (`%s') failed (%s)"
msgstr "închiderea lui fd %d (`%s') eºuatã (%s)"
-#: io.c:617
-msgid "redirection not allowed in sandbox mode"
-msgstr ""
-
-#: io.c:648
-#, c-format
-msgid "invalid tree type %s in redirect()"
-msgstr "tip arbore(tree) invalid %s în redirect()"
-
-#: io.c:654
+#: io.c:577
#, c-format
msgid "expression in `%s' redirection only has numeric value"
msgstr "expresia din redirectarea `%s' are doar valoare numericã"
-#: io.c:660
+#: io.c:583
#, c-format
msgid "expression for `%s' redirection has null string value"
msgstr "expresia din redirectarea `%s' are valoar de ºir null"
-#: io.c:665
+#: io.c:589
#, c-format
msgid "filename `%s' for `%s' redirection may be result of logical expression"
msgstr ""
"numele de fiºier `%s' pentru redirectarea `%s' poate fi rezultatul unei "
"expresii logice"
-#: io.c:707
+#: io.c:628
#, c-format
msgid "unnecessary mixing of `>' and `>>' for file `%.*s'"
msgstr "amestecare nenecesarã a `>' ºi `>>' pentru fiºierul `%.*s'"
-#: io.c:754
+#: io.c:681
#, c-format
msgid "can't open pipe `%s' for output (%s)"
msgstr "nu se poate deschide legãtura(pipe) `%s' pentru output (%s)"
-#: io.c:763
+#: io.c:691
#, c-format
msgid "can't open pipe `%s' for input (%s)"
msgstr "nu se poate deschide legãtura(pipe) `%s' pentru input (%s)"
-#: io.c:786
+#: io.c:712
#, c-format
msgid "can't open two way pipe `%s' for input/output (%s)"
msgstr ""
"nu se poate deschide legãtura(pipe) bidirecþionalã `%s' pentru input/output "
"(%s)"
-#: io.c:864
+#: io.c:794
#, c-format
msgid "can't redirect from `%s' (%s)"
msgstr "nu se poate redirecta din `%s' (%s)"
-#: io.c:867
+#: io.c:797
#, c-format
msgid "can't redirect to `%s' (%s)"
msgstr "nu se poate redirecta cãtre `%s' (%s)"
-#: io.c:920
+#: io.c:846
msgid ""
"reached system limit for open files: starting to multiplex file descriptors"
msgstr ""
"s-a atins limita sistemului pentru fiºiere deschise: se începe muliplexarea "
"desciptorilor de fiºier"
-#: io.c:936
+#: io.c:862
#, c-format
msgid "close of `%s' failed (%s)."
msgstr "închiderea `%s' eºuatã (%s)."
-#: io.c:944
+#: io.c:870
msgid "too many pipes or input files open"
msgstr "prea multe legãturi(pipe) sau fiºiere de intrare(input) deschise"
-#: io.c:967
+#: io.c:892
msgid "close: second argument must be `to' or `from'"
msgstr "close: al doilea argument trebuie sã fie `to' sau `from'"
-#: io.c:981
+#: io.c:909
#, c-format
msgid "close: `%.*s' is not an open file, pipe or co-process"
msgstr ""
"close: `%.*s' nu este un fiºier deschis, o legãturã(pipe) sau un coproces"
-#: io.c:986
+#: io.c:914
msgid "close of redirection that was never opened"
msgstr "închiderea unei redirectãri care n-a fost deschisã niciodatã"
-#: io.c:1083
+#: io.c:1011
#, c-format
msgid "close: redirection `%s' not opened with `|&', second argument ignored"
msgstr ""
"close: redirectarea `%s' nu a fost deschisã cu `|&', al doilea argument "
"ignorat"
-#: io.c:1099
+#: io.c:1027
#, c-format
msgid "failure status (%d) on pipe close of `%s' (%s)"
msgstr "stare de avarie (%d) în legãtura(pipe) închisã în `%s' (%s)"
-#: io.c:1102
+#: io.c:1030
#, c-format
msgid "failure status (%d) on file close of `%s' (%s)"
msgstr "stare de avarie (%d) în fiºierul închis în `%s' (%s)"
-#: io.c:1122
+#: io.c:1050
#, c-format
msgid "no explicit close of socket `%s' provided"
msgstr "nu s-a furnizat închiderea explicitã a socketului `%s'"
-#: io.c:1125
+#: io.c:1053
#, c-format
msgid "no explicit close of co-process `%s' provided"
msgstr "nu s-a furnizat închiderea explicitã a coprocesului `%s' "
-#: io.c:1128
+#: io.c:1056
#, c-format
msgid "no explicit close of pipe `%s' provided"
msgstr "nu s-a furnizat închiderea explicitã a legãturii(pipe) `%s'"
-#: io.c:1131
+#: io.c:1059
#, c-format
msgid "no explicit close of file `%s' provided"
msgstr "nu s-a furnizat închiderea explicitã a fiºierului `%s'"
-#: io.c:1159 io.c:1214 main.c:832 main.c:874
+#: io.c:1087 io.c:1142 main.c:823 main.c:865
#, c-format
msgid "error writing standard output (%s)"
msgstr "eroare în scrierea la ieºirea(output) standard (%s)"
-#: io.c:1163 io.c:1219
+#: io.c:1091 io.c:1147
#, c-format
msgid "error writing standard error (%s)"
msgstr "eroare în scrierea la dispozitivul standard de eroare (%s)"
-#: io.c:1171
+#: io.c:1099
#, c-format
msgid "pipe flush of `%s' failed (%s)."
msgstr "flush-ul legãturii(pipe) `%s' eºuat (%s)."
-#: io.c:1174
+#: io.c:1102
#, c-format
msgid "co-process flush of pipe to `%s' failed (%s)."
msgstr "flush-ul legãturii(pipe) coprocesului la `%s' eºuat (%s)."
-#: io.c:1177
+#: io.c:1105
#, c-format
msgid "file flush of `%s' failed (%s)."
msgstr "flush-ul de fiºier al `%s' eºuat (%s)."
-#: io.c:1292
+#: io.c:1219
#, fuzzy, c-format
msgid "local port %s invalid in `/inet'"
msgstr "port local invalid în `%s'"
-#: io.c:1309
+#: io.c:1236
#, c-format
msgid "remote host and port information (%s, %s) invalid"
msgstr ""
-#: io.c:1344
+#: io.c:1276
msgid "/inet/raw client not ready yet, sorry"
msgstr "clientul /inet/raw nu este pregãtit încã, scuze"
-#: io.c:1347 io.c:1383
+#: io.c:1279 io.c:1320
msgid "only root may use `/inet/raw'."
msgstr "doar root-ul poate folosi `/inet/raw'."
-#: io.c:1381
+#: io.c:1318
msgid "/inet/raw server not ready yet, sorry"
msgstr "serverul /inet/raw nu este pregãtit încã, scuze"
-#: io.c:1477
+#: io.c:1417
#, c-format
msgid "no (known) protocol supplied in special filename `%s'"
msgstr "nici un protocol (cunoscut) furnizat în numele de fiºier special `%s'"
-#: io.c:1491
+#: io.c:1431
#, c-format
msgid "special file name `%s' is incomplete"
msgstr "numele special de fiºier `%s' nu este complet"
-#: io.c:1506
+#: io.c:1447
msgid "must supply a remote hostname to `/inet'"
msgstr "trebuie furnizat un nume de host remote pentru `/inet'"
-#: io.c:1524
+#: io.c:1465
msgid "must supply a remote port to `/inet'"
msgstr "trebuie furnizat un port remote pentru `/inet'"
-#: io.c:1570
+#: io.c:1511
msgid "TCP/IP communications are not supported"
msgstr "Comunicaþiile TCP/IP nu sunt suportate"
-#: io.c:1758
+#: io.c:1698
#, c-format
msgid "could not open `%s', mode `%s'"
msgstr "nu s-a putut deschide `%s', modul `%s'"
-#: io.c:1809
+#: io.c:1749
#, fuzzy, c-format
msgid "close of master pty failed (%s)"
msgstr "închiderea legãturii(pipe) a eºuat (%s)"
-#: io.c:1811 io.c:1963 io.c:2114
+#: io.c:1751 io.c:1918 io.c:2075
#, c-format
msgid "close of stdout in child failed (%s)"
msgstr "închiderea stdout în copil(child) a eºuat (%s)"
-#: io.c:1814
+#: io.c:1754
#, fuzzy, c-format
msgid "moving slave pty to stdout in child failed (dup: %s)"
msgstr "mutarea legãturii(pipe) la stdout în copil(child) a eºuat (dup: %s)"
-#: io.c:1816 io.c:1968
+#: io.c:1756 io.c:1923
#, c-format
msgid "close of stdin in child failed (%s)"
msgstr "închiderea stdin în copil(child) a eºuat (%s)"
-#: io.c:1819
+#: io.c:1759
#, fuzzy, c-format
msgid "moving slave pty to stdin in child failed (dup: %s)"
msgstr "mutarea legãturii(pipe) la stdin în copil(child) a eºuat (dup: %s)"
-#: io.c:1821 io.c:1840
+#: io.c:1761 io.c:1782
#, fuzzy, c-format
msgid "close of slave pty failed (%s)"
msgstr "închiderea legãturii(pipe) a eºuat (%s)"
-#: io.c:1914 io.c:1966 io.c:2095 io.c:2117
+#: io.c:1860 io.c:1921 io.c:2053 io.c:2078
#, c-format
msgid "moving pipe to stdout in child failed (dup: %s)"
msgstr "mutarea legãturii(pipe) la stdout în copil(child) a eºuat (dup: %s)"
-#: io.c:1918 io.c:1971
+#: io.c:1867 io.c:1926
#, c-format
msgid "moving pipe to stdin in child failed (dup: %s)"
msgstr "mutarea legãturii(pipe) la stdin în copil(child) a eºuat (dup: %s)"
-#: io.c:1935 io.c:2108
+#: io.c:1887 io.c:2068
msgid "restoring stdout in parent process failed\n"
msgstr "refacerea stdout în procesul pãrinte a eºuat\n"
-#: io.c:1940
+#: io.c:1895
msgid "restoring stdin in parent process failed\n"
msgstr "refacerea stdin în procesul pãrinte a eºuat\n"
-#: io.c:1974 io.c:2119 io.c:2130
+#: io.c:1929 io.c:2080 io.c:2094
#, c-format
msgid "close of pipe failed (%s)"
msgstr "închiderea legãturii(pipe) a eºuat (%s)"
-#: io.c:2019
+#: io.c:1974
msgid "`|&' not supported"
msgstr "`|&' nesuportat"
-#: io.c:2085
+#: io.c:2040
#, c-format
msgid "cannot open pipe `%s' (%s)"
msgstr "nu s-a putut deschide legãtura(pipe) `%s' (%s)"
-#: io.c:2126
+#: io.c:2088
#, c-format
msgid "cannot create child process for `%s' (fork: %s)"
msgstr "nu s-a putu crea proces copil(child) pentru `%s' (fork: %s)"
-#: io.c:2518
+#: io.c:2577
#, c-format
msgid "data file `%s' is empty"
msgstr "fiºierul de date `%s' este vid"
-#: io.c:2560 io.c:2568
+#: io.c:2618 io.c:2626
msgid "could not allocate more input memory"
msgstr ""
-#: io.c:3125
+#: io.c:3173
msgid "multicharacter value of `RS' is a gawk extension"
msgstr "valoarea multicaracter a `RS' este extensie gawk"
-#: main.c:313
+#: main.c:311
msgid "out of memory"
-msgstr ""
+msgstr "memorie plinã"
-#: main.c:381
+#: main.c:388
msgid "`-m[fr]' option irrelevant in gawk"
msgstr "`-m[fr]' opþiune irelevantã în gawk"
-#: main.c:383
+#: main.c:390
msgid "-m option usage: `-m[fr] nnn'"
msgstr "folosirea opþiunii -m : `-m[fr] nnn'"
-#: main.c:419
+#: main.c:426
#, fuzzy
msgid "empty argument to `-e/--source' ignored"
msgstr "argument vid pentru `--source' ignorat"
-#: main.c:485
+#: main.c:492
#, c-format
msgid "%s: option `-W %s' unrecognized, ignored\n"
msgstr "%s: opþiunea `-W %s' nu e recunoscutã, ignoratã\n"
-#: main.c:530
+#: main.c:545
#, c-format
msgid "%s: option requires an argument -- %c\n"
msgstr "%s: opþiunea necesitã un parametru -- %c\n"
-#: main.c:551
+#: main.c:566
msgid "environment variable `POSIXLY_CORRECT' set: turning on `--posix'"
msgstr ""
"este setatã variabila de mediu `POSIXLY_CORRECT': se activeazã `--posix'"
-#: main.c:557
+#: main.c:572
msgid "`--posix' overrides `--traditional'"
msgstr "`--posix' suprascrie `--traditional'"
-#: main.c:568
+#: main.c:583
msgid "`--posix'/`--traditional' overrides `--non-decimal-data'"
msgstr "`--posix'/`--traditional' suprascrie `--non-decimal-data'"
-#: main.c:572
+#: main.c:587
#, fuzzy, c-format
msgid "running %s setuid root may be a security problem"
msgstr "dacã se ruleazã %s setuid root poate apãrea o problemã de securitate"
-#: main.c:577
+#: main.c:592
#, fuzzy
msgid "`--posix' overrides `--binary'"
msgstr "`--posix' suprascrie `--traditional'"
-#: main.c:622
+#: main.c:643
#, fuzzy, c-format
msgid "can't set binary mode on stdin (%s)"
msgstr "nu se poate seta modul pe stdin (%s)"
-#: main.c:625
+#: main.c:646
#, fuzzy, c-format
msgid "can't set binary mode on stdout (%s)"
msgstr "nu se poate seta modul pe stdout (%s)"
-#: main.c:627
+#: main.c:648
#, fuzzy, c-format
msgid "can't set binary mode on stderr (%s)"
msgstr "nu se poate seta modul pe stderr (%s)"
-#: main.c:668
+#: main.c:687
msgid "no program text at all!"
msgstr "nu existã nici un text de program!"
-#: main.c:773
+#: main.c:762
#, c-format
msgid "Usage: %s [POSIX or GNU style options] -f progfile [--] file ...\n"
msgstr ""
"Folosire: %s [opþiuni stil POSIX sau GNU] -f fiºierprogram [--] fiºier ...\n"
-#: main.c:775
+#: main.c:764
#, c-format
msgid "Usage: %s [POSIX or GNU style options] [--] %cprogram%c file ...\n"
msgstr ""
"Folosire: %s [opþiuni stil POSIX sau GNU] [--] %cprogram%c fiºier ...\n"
-#: main.c:780
+#: main.c:769
#, fuzzy
msgid "POSIX options:\t\tGNU long options: (standard)\n"
msgstr "opþiuni POSIX:\t\topþiuni lungi GNU:\n"
-#: main.c:781
+#: main.c:770
msgid "\t-f progfile\t\t--file=progfile\n"
msgstr "\t-f fiºierprogram\t\t--file=fiºierprogram\n"
-#: main.c:782
+#: main.c:771
msgid "\t-F fs\t\t\t--field-separator=fs\n"
msgstr "\t-F fs\t\t\t--field-separator=fs\n"
-#: main.c:783
+#: main.c:772
msgid "\t-v var=val\t\t--assign=var=val\n"
msgstr "\t-v var=val\t\t--assign=var=val\n"
-#: main.c:784
+#: main.c:773
#, fuzzy
-msgid "POSIX options:\t\tGNU long options: (extensions)\n"
+msgid "Short options:\t\tGNU long options: (extensions)\n"
msgstr "opþiuni POSIX:\t\topþiuni lungi GNU:\n"
-#: main.c:785
+#: main.c:774
msgid "\t-m[fr] val\n"
msgstr "\t-m[fr] val\n"
-#: main.c:786
+#: main.c:775
msgid "\t-b\t\t\t--characters-as-bytes\n"
msgstr ""
-#: main.c:787
-msgid "\t-c\t\t\t--compat, --traditional\n"
-msgstr ""
+#: main.c:776
+#, fuzzy
+msgid "\t-c\t\t\t--traditional\n"
+msgstr "\t-W traditional\t\t--traditional\n"
-#: main.c:788
+#: main.c:777
#, fuzzy
-msgid "\t-C\t\t\t--copyleft, --copyright\n"
+msgid "\t-C\t\t\t--copyright\n"
msgstr "\t-W copyright\t\t--copyright\n"
-#: main.c:789
+#: main.c:778
#, fuzzy
msgid "\t-d [file]\t\t--dump-variables[=file]\n"
msgstr "\t-W dump-variables[=fiºier]\t--dump-variables[=fiºier]\n"
-#: main.c:790
+#: main.c:779
#, fuzzy
msgid "\t-e 'program-text'\t--source='program-text'\n"
msgstr "\t-W source=program-text\t--source=program-text\n"
-#: main.c:791
+#: main.c:780
#, fuzzy
msgid "\t-E file\t\t\t--exec=file\n"
msgstr "\t-W profile[=fiºier]\t--profile[=fiºier]\n"
-#: main.c:792
+#: main.c:781
#, fuzzy
msgid "\t-g\t\t\t--gen-pot\n"
msgstr "\t-W gen-po\t\t--gen-po\n"
-#: main.c:793
+#: main.c:782
#, fuzzy
-msgid "\t-h\t\t\t--help, --usage\n"
+msgid "\t-h\t\t\t--help\n"
msgstr "\t-W help\t\t\t--help\n"
-#: main.c:794
+#: main.c:783
#, fuzzy
-msgid "\t-l [fatal]\t\t--lint[=fatal]\n"
+msgid "\t-L [fatal]\t\t--lint[=fatal]\n"
msgstr "\t-W lint[=fatal]\t\t--lint[=fatal]\n"
-#: main.c:795
-#, fuzzy
-msgid "\t-L\t\t\t--lint-old\n"
-msgstr "\t-W lint-old\t\t--lint-old\n"
-
-#: main.c:796
+#: main.c:784
#, fuzzy
msgid "\t-n\t\t\t--non-decimal-data\n"
msgstr "\t-W non-decimal-data\t--non-decimal-data\n"
-#: main.c:797
+#: main.c:785
msgid "\t-N\t\t\t--use-lc-numeric\n"
msgstr ""
-#: main.c:798
+#: main.c:786
msgid "\t-O\t\t\t--optimize\n"
msgstr ""
-#: main.c:799
+#: main.c:787
#, fuzzy
msgid "\t-p [file]\t\t--profile[=file]\n"
msgstr "\t-W profile[=fiºier]\t--profile[=fiºier]\n"
-#: main.c:800
+#: main.c:788
#, fuzzy
msgid "\t-P\t\t\t--posix\n"
msgstr "\t-W posix\t\t--posix\n"
-#: main.c:801
+#: main.c:789
#, fuzzy
msgid "\t-r\t\t\t--re-interval\n"
msgstr "\t-W re-interval\t\t--re-interval\n"
-#: main.c:802
+#: main.c:791
#, fuzzy
+msgid "\t-R file\t\t\t--command=file\n"
+msgstr "\t-W profile[=fiºier]\t--profile[=fiºier]\n"
+
+#: main.c:792
msgid "\t-S\t\t\t--sandbox\n"
-msgstr "\t-W posix\t\t--posix\n"
+msgstr ""
-#: main.c:803
+#: main.c:793
+#, fuzzy
+msgid "\t-t\t\t\t--lint-old\n"
+msgstr "\t-W lint-old\t\t--lint-old\n"
+
+#: main.c:794
#, fuzzy
msgid "\t-V\t\t\t--version\n"
msgstr "\t-W version\t\t--version\n"
-#: main.c:805
+#: main.c:796
msgid "\t-W nostalgia\t\t--nostalgia\n"
msgstr "\t-W nostalgia\t\t--nostalgia\n"
-#: main.c:808
-msgid "\t-W parsedebug\t\t--parsedebug\n"
+#: main.c:799
+#, fuzzy
+msgid "\t-Y\t\t--parsedebug\n"
msgstr "\t-W parsedebug\t\t--parsedebug\n"
#. TRANSLATORS: --help output 5 (end)
@@ -1778,7 +1711,7 @@ msgstr "\t-W parsedebug\t\t--parsedebug\n"
#. for this application. Please add _another line_ with the
#. address for translation bugs.
#. no-wrap
-#: main.c:817
+#: main.c:808
#, fuzzy
msgid ""
"\n"
@@ -1787,22 +1720,22 @@ msgid ""
"\n"
msgstr "secþiunea `Reporting Problems and Bugs' în versiunea tipãritã.\n"
-#: main.c:821
+#: main.c:812
msgid ""
"gawk is a pattern scanning and processing language.\n"
"By default it reads standard input and writes standard output.\n"
"\n"
msgstr ""
-#: main.c:825
+#: main.c:816
msgid ""
"Examples:\n"
"\tgawk '{ sum += $1 }; END { print sum }' file\n"
"\tgawk -F: '{ print $1 }' /etc/passwd\n"
msgstr ""
-#: main.c:845
-#, c-format
+#: main.c:836
+#, fuzzy, c-format
msgid ""
"Copyright (C) 1989, 1991-%d Free Software Foundation.\n"
"\n"
@@ -1816,11 +1749,11 @@ msgstr ""
"\n"
"Acest program este software liber; poate fi redistribuit ºi/sau modificat\n"
"sub termenii Licenþei Publice Generale GNU publicatã de \n"
-"Free Software Foundation; fie versiunea 3 a Licenþei, fie\n"
+"Free Software Foundation; fie versiunea 2 a Licenþei, fie\n"
"(la latitudinea dumneavoastrã) orice versiune ulterioarã.\n"
"\n"
-#: main.c:853
+#: main.c:844
msgid ""
"This program is distributed in the hope that it will be useful,\n"
"but WITHOUT ANY WARRANTY; without even the implied warranty of\n"
@@ -1835,7 +1768,7 @@ msgstr ""
"\n"
"\n"
-#: main.c:864
+#: main.c:855
#, fuzzy
msgid ""
"You should have received a copy of the GNU General Public License\n"
@@ -1843,193 +1776,158 @@ msgid ""
msgstr ""
"Ar fi trebuit sã primiþi o copie a Licenþei Publice Generale GNU\n"
"împreunã cu acest program; dacã nu, scrieþi la Free Software\n"
-"Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, "
-"USA.\n"
+"Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.\n"
-#: main.c:899
+#: main.c:890
msgid "-Ft does not set FS to tab in POSIX awk"
msgstr "-Ft nu seteazã FS în tab în POSIX awk"
-#: main.c:1116
+#: main.c:1122
#, c-format
msgid "unknown value for field spec: %d\n"
msgstr ""
-#: main.c:1176
+#: main.c:1182
#, c-format
msgid ""
"%s: `%s' argument to `-v' not in `var=value' form\n"
"\n"
msgstr ""
-#: main.c:1196
+#: main.c:1202
#, c-format
msgid "`%s' is not a legal variable name"
msgstr ""
-#: main.c:1199
+#: main.c:1205
#, c-format
msgid "`%s' is not a variable name, looking for file `%s=%s'"
msgstr ""
-#: main.c:1238
+#: main.c:1258
msgid "floating point exception"
msgstr "excepþie virgulã mobilã"
-#: main.c:1245
+#: main.c:1265
msgid "fatal error: internal error"
msgstr "eroare fatalã: eroare internã"
-#: main.c:1260
+#: main.c:1280
#, fuzzy
msgid "fatal error: internal error: segfault"
msgstr "eroare fatalã: eroare internã"
-#: main.c:1272
+#: main.c:1292
#, fuzzy
msgid "fatal error: internal error: stack overflow"
msgstr "eroare fatalã: eroare internã"
-#: main.c:1322
+#: main.c:1342
#, c-format
msgid "no pre-opened fd %d"
msgstr "nici un fd predeschis %d"
-#: main.c:1329
+#: main.c:1349
#, c-format
msgid "could not pre-open /dev/null for fd %d"
msgstr "nu s-a putut predeschide /dev/null pentru fd %d"
-#: main.c:1352 main.c:1361
+#: main.c:1372 main.c:1381
#, c-format
msgid "could not find groups: %s"
msgstr "nu am putut gãsi grupurile: %s"
-#: msg.c:54
+#: msg.c:62
#, c-format
msgid "cmd. line:"
msgstr "linie cmd:"
-#: msg.c:120
+#: msg.c:97
msgid "warning: "
msgstr "avertisment: "
-#: msg.c:142
+#: msg.c:106
msgid "error: "
msgstr "eroare: "
-#: msg.c:178
+#: msg.c:129
msgid "fatal: "
msgstr "fatal: "
-#: node.c:63 node.c:78 node.c:105 node.c:121 node.c:151
-msgid "can't convert string to float"
-msgstr "nu se poate converti ºir de caractere în float"
-
-#: node.c:465
+#: node.c:401
msgid "backslash at end of string"
msgstr "backslash la sfârºitul ºirului de caractere"
-#: node.c:609
+#: node.c:502
#, fuzzy, c-format
msgid "old awk does not support the `\\%c' escape sequence"
msgstr "vechiul awk nu supoortã operatorul `**'"
-#: node.c:660
+#: node.c:553
msgid "POSIX does not allow `\\x' escapes"
msgstr "POSIX nu permite escape-uri `\\x'"
-#: node.c:666
+#: node.c:559
msgid "no hex digits in `\\x' escape sequence"
msgstr "nu existã digiþi hexa în secvenþa de escape `\\x'"
-#: node.c:688
+#: node.c:581
#, c-format
msgid ""
"hex escape \\x%.*s of %d characters probably not interpreted the way you "
"expect"
msgstr ""
-#: node.c:703
+#: node.c:596
#, c-format
msgid "escape sequence `\\%c' treated as plain `%c'"
msgstr "secvenþa de escape `\\%c' tratatã ca `%c' simplu"
+#: node.c:737
+msgid ""
+"Invalid multibyte data detected. There may be a mismatch between your data "
+"and your locale."
+msgstr ""
+
#: posix/gawkmisc.c:172
#, c-format
msgid "%s %s `%s': could not set close-on-exec: (fcntl: %s)"
msgstr "%s %s `%s': nu s-a putut seta close-on-exec: (fcntl: %s)"
-#: profile.c:94
+#: profile.c:83
#, c-format
msgid "could not open `%s' for writing: %s"
msgstr "nu am putut deschide `%s' pentru scriere: %s"
-#: profile.c:457
+#: profile.c:203
#, fuzzy, c-format
-msgid "internal error: %s with null vname"
-msgstr "eroare internã: Node_var cu vname null"
-
-#: profile.c:522
-msgid "# treated internally as `delete'"
-msgstr ""
-
-#: profile.c:1076
-#, c-format
-msgid "# this is a dynamically loaded extension function"
-msgstr ""
-
-#: profile.c:1109
-#, c-format
-msgid "\t# gawk profile, created %s\n"
-msgstr "\t# profil gawk, creat %s\n"
-
-#: profile.c:1112
-#, c-format
msgid ""
-"\t# BEGIN block(s)\n"
+"\t# %s block(s)\n"
"\n"
msgstr ""
-"\t# bloc(uri) BEGIN\n"
+"\t# bloc(uri) END\n"
"\n"
-#: profile.c:1122
+#: profile.c:208
#, fuzzy, c-format
msgid ""
-"\t# BEGINFILE block(s)\n"
-"\n"
-msgstr ""
-"\t# bloc(uri) BEGIN\n"
-"\n"
-
-#: profile.c:1132
-#, c-format
-msgid ""
-"\t# Rule(s)\n"
+"\t# %s(s)\n"
"\n"
msgstr ""
"\t# Regulã(i)\n"
"\n"
-#: profile.c:1138
+#: profile.c:278
#, fuzzy, c-format
-msgid ""
-"\t# ENDFILE block(s)\n"
-"\n"
-msgstr ""
-"\t# bloc(uri) END\n"
-"\n"
+msgid "internal error: %s with null vname"
+msgstr "eroare internã: Node_var cu vname null"
-#: profile.c:1148
+#: profile.c:945
#, c-format
-msgid ""
-"\t# END block(s)\n"
-"\n"
-msgstr ""
-"\t# bloc(uri) END\n"
-"\n"
+msgid "\t# gawk profile, created %s\n"
+msgstr "\t# profil gawk, creat %s\n"
-#: profile.c:1168
+#: profile.c:1328
#, c-format
msgid ""
"\n"
@@ -2038,17 +1936,12 @@ msgstr ""
"\n"
"\t# Funcþii, listate alfabetic\n"
-#: profile.c:1431
+#: profile.c:1367
#, c-format
-msgid "unexpected type %s in prec_level"
-msgstr "tip %s neaºteptat în prec_level"
-
-#: profile.c:1557
-#, fuzzy, c-format
-msgid "Unknown node type %s in pp_var"
-msgstr "tip nod %d necunoscut"
+msgid "redir2str: unknown redirection type %d"
+msgstr ""
-#: re.c:537
+#: re.c:559
#, c-format
msgid "regexp component `%.*s' should probably be `[%.*s]'"
msgstr ""
@@ -2121,19 +2014,40 @@ msgstr "Expresie regularã prea mare"
msgid "Unmatched ) or \\)"
msgstr ") or \\) fãrã reciprocã"
-#: regcomp.c:699
+#: regcomp.c:701
msgid "No previous regular expression"
msgstr "Nu existã expresii regulare anterioare"
-#~ msgid "%s: illegal option -- %c\n"
-#~ msgstr "%s: opþiune ilegalã -- %c\n"
+#~ msgid "call of `length' without parentheses is deprecated by POSIX"
+#~ msgstr "apelarea lui `length' fãrã paranteze nu mai este folositã în POSIX"
+
+#, fuzzy
+#~ msgid "reference to uninitialized field `$%s'"
+#~ msgstr "referinþã la variabila neiniþializatã `%s'"
+
+#~ msgid "can't convert string to float"
+#~ msgstr "nu se poate converti ºir de caractere în float"
+
+#~ msgid "`continue' outside a loop is not portable"
+#~ msgstr "`continue' în afara buclei nu este portabil"
+
+#~ msgid "`break' outside a loop is not portable"
+#~ msgstr "`break' în afara buclei nu este portabil"
+
+#~ msgid "`nextfile' cannot be called from a BEGIN rule"
+#~ msgstr "`nextfile' nu poate fi apelat dintr-o regulã BEGIN"
+
+#~ msgid "`next' cannot be called from a BEGIN rule"
+#~ msgstr "`next' nu poate fi apelat dintr-o regulã BEGIN"
#~ msgid "file `%s' is a directory"
#~ msgstr "fiºierul `%s' este director"
-#~ msgid "can't open two way socket `%s' for input/output (%s)"
-#~ msgstr ""
-#~ "nu se poate deschide socketul bidirecþional `%s' pentru input/output (%s)"
+#~ msgid "use `PROCINFO[\"%s\"]' instead of `%s'"
+#~ msgstr "folosiþi `PROCINFO[\"%s\"]' în loc de `%s'"
+
+#~ msgid "use `PROCINFO[...]' instead of `/dev/user'"
+#~ msgstr "folosiþi `PROCINFO[...]' în loc de `/dev/user'"
#~ msgid "\t-W compat\t\t--compat\n"
#~ msgstr "\t-W compat\t\t--compat\n"
@@ -2141,51 +2055,103 @@ msgstr "Nu existã expresii regulare anterioare"
#~ msgid "\t-W copyleft\t\t--copyleft\n"
#~ msgstr "\t-W copyleft\t\t--copyleft\n"
-#~ msgid "\t-W traditional\t\t--traditional\n"
-#~ msgstr "\t-W traditional\t\t--traditional\n"
-
#~ msgid "\t-W usage\t\t--usage\n"
#~ msgstr "\t-W usage\t\t--usage\n"
-#, fuzzy
-#~ msgid "seek: invalid arguments"
-#~ msgstr "printf: nici un argument"
+#~ msgid ""
+#~ "\t# BEGIN block(s)\n"
+#~ "\n"
+#~ msgstr ""
+#~ "\t# bloc(uri) BEGIN\n"
+#~ "\n"
+
+#~ msgid "`$' is not permitted in awk formats"
+#~ msgstr "`$' nu este permis în formatele awk"
+
+#~ msgid "arg count with `$' must be > 0"
+#~ msgstr "numãrul de arg cu `%' trebuie sã fie > 0"
#, fuzzy
-#~ msgid "seek: `%.*s' is not an open file, pipe, or co-process"
+#~ msgid "arg count %ld greater than total number of supplied arguments"
+#~ msgstr ""
+#~ "numãrul de arg %d este mai mare decât numãrul total de argumente furnizate"
+
+#~ msgid "`$' not permitted after period in format"
+#~ msgstr "`$' nu este permis în format dupã punct"
+
+#~ msgid "no `$' supplied for positional field width or precision"
+#~ msgstr ""
+#~ "nu s-a furnizat nici un `$' pentru câmpul poziþional lungime sau precisie"
+
+#~ msgid "`l' is meaningless in awk formats; ignored"
+#~ msgstr "`l' nu are sens în formatele awk; ignorat"
+
+#~ msgid "`l' is not permitted in POSIX awk formats"
+#~ msgstr "`l' nu este permis în formatele awk POSIX"
+
+#~ msgid "`L' is meaningless in awk formats; ignored"
+#~ msgstr "`L' nu are sens în formatele awk; ignorat"
+
+#~ msgid "`L' is not permitted in POSIX awk formats"
+#~ msgstr "`L' nu este permis în formatele POSIX awk"
+
+#~ msgid "`h' is meaningless in awk formats; ignored"
+#~ msgstr "`h' nu are sens în formatele awl; ignorat"
+
+#~ msgid "`h' is not permitted in POSIX awk formats"
+#~ msgstr "`h' nu este permis în formatele POSIX awk"
+
+#~ msgid "not enough arguments to satisfy format string"
#~ msgstr ""
-#~ "close: `%.*s' nu este un fiºier deschis, o legãturã(pipe) sau un coproces"
+#~ "nu existã destule argumente pentru satisfacerea formatului ºirului de "
+#~ "caractere"
+
+#~ msgid "^ ran out for this one"
+#~ msgstr "^ insuficient pentru aceasta"
+
+#~ msgid "[s]printf: format specifier does not have control letter"
+#~ msgstr "[s]printf: specificatorul de format nu are literã de control"
+
+#~ msgid "too many arguments supplied for format string"
+#~ msgstr "prea multe argumente furnizate pentru formatul ºirului de caractere"
#, fuzzy
-#~ msgid "seek: `%.*s' is not an input file, pipe, or co-process"
+#~ msgid "attempt to use array parameter `%s' in a scalar context"
+#~ msgstr "încercare de a utiliza array-ul `%s' într-un context scalar"
+
+#~ msgid "can't open two way socket `%s' for input/output (%s)"
#~ msgstr ""
-#~ "close: `%.*s' nu este un fiºier deschis, o legãturã(pipe) sau un coproces"
+#~ "nu se poate deschide socketul bidirecþional `%s' pentru input/output (%s)"
-#~ msgid "use `PROCINFO[\"%s\"]' instead of `%s'"
-#~ msgstr "folosiþi `PROCINFO[\"%s\"]' în loc de `%s'"
+#~ msgid "%s: illegal option -- %c\n"
+#~ msgstr "%s: opþiune ilegalã -- %c\n"
-#~ msgid "use `PROCINFO[...]' instead of `/dev/user'"
-#~ msgstr "folosiþi `PROCINFO[...]' în loc de `/dev/user'"
+#~ msgid ""
+#~ "concatenation: side effects in one expression have changed the length of "
+#~ "another!"
+#~ msgstr ""
+#~ "concatenation: efectele secundare dintr-o expresie au schimbat lungimea "
+#~ "alteia!"
-#~ msgid "function %s called\n"
-#~ msgstr "funcþia %s a fost apelatã\n"
+#~ msgid "illegal type (%s) in tree_eval"
+#~ msgstr "tip ilegal (%s) în tree_eval"
-#~ msgid "field %d in FIELDWIDTHS, must be > 0"
-#~ msgstr "câmpul %d din FIELDWIDTHS trebuie sã fie > 0"
+#~ msgid "\t# -- main --\n"
+#~ msgstr "\t# -- principal(main) --\n"
+
+#~ msgid "invalid tree type %s in redirect()"
+#~ msgstr "tip arbore(tree) invalid %s în redirect()"
+
+#~ msgid "unexpected type %s in prec_level"
+#~ msgstr "tip %s neaºteptat în prec_level"
#, fuzzy
-#~ msgid "or used as a variable or an array"
-#~ msgstr "nu se poate folosi numele funcþiei `%s' ca variabilã sau array"
+#~ msgid "Unknown node type %s in pp_var"
+#~ msgstr "tip nod %d necunoscut"
#~ msgid "delete: illegal use of variable `%s' as array"
#~ msgstr "delete: folosire ilegalã a variabilei `%s' ca array"
-#~ msgid "asort: first argument is not an array"
-#~ msgstr "asort: primul argument nu este un array"
-
-#~ msgid "asort: second argument is not an array"
-#~ msgstr "asort: al doilea argument nu este un array"
-
#~ msgid ""
#~ "\n"
#~ "To report bugs, see node `Bugs' in `gawk.info', which is\n"
@@ -2243,8 +2209,11 @@ msgstr "Nu existã expresii regulare anterioare"
#~ msgid "Unbalanced )"
#~ msgstr ") fãrã reciproc"
-#~ msgid "remote port invalid in `%s'"
-#~ msgstr "port remote invalid în `%s'"
+#~ msgid "field %d in FIELDWIDTHS, must be > 0"
+#~ msgstr "câmpul %d din FIELDWIDTHS trebuie sã fie > 0"
+
+#~ msgid "function %s called\n"
+#~ msgstr "funcþia %s a fost apelatã\n"
#~ msgid "internal error: file `%s', line %d\n"
#~ msgstr "eroare internã: fiºierul `%s', linia %d\n"
diff --git a/po/rw.gmo b/po/rw.gmo
index 2f96fe06..c082508c 100644
--- a/po/rw.gmo
+++ b/po/rw.gmo
Binary files differ
diff --git a/po/rw.po b/po/rw.po
index a35658cc..d83843f5 100644
--- a/po/rw.po
+++ b/po/rw.po
@@ -16,7 +16,7 @@ msgid ""
msgstr ""
"Project-Id-Version: gawk 3.1.4\n"
"Report-Msgid-Bugs-To: arnold@skeeve.com\n"
-"POT-Creation-Date: 2010-11-12 12:20+0200\n"
+"POT-Creation-Date: 2010-11-17 08:48+0200\n"
"PO-Revision-Date: 2005-04-04 10:55-0700\n"
"Last-Translator: Steven Michael Murphy <murf@e-tools.com>\n"
"Language-Team: Kinyarwanda <translation-team-rw@lists.sourceforge.net>\n"
@@ -24,439 +24,514 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-#: array.c:112
+#: array.c:103
+#, fuzzy, c-format
+msgid "from %s"
+msgstr "Kuva:"
+
+#: array.c:267
+#, fuzzy
+msgid "attempt to use a scalar value as array"
+msgstr "Kuri Gukoresha Nka Imbonerahamwe"
+
+#: array.c:270
#, fuzzy, c-format
msgid "attempt to use function `%s' as an array"
msgstr "Kuri Gukoresha Umumaro Nka Imbonerahamwe"
-#: array.c:115
+#: array.c:273
#, fuzzy, c-format
msgid "attempt to use scalar parameter `%s' as an array"
msgstr "Kuri Gukoresha Nka Imbonerahamwe"
-#: array.c:118
+#: array.c:276
#, fuzzy, c-format
msgid "attempt to use scalar `%s' as array"
msgstr "Kuri Gukoresha Nka Imbonerahamwe"
-#: array.c:156
+#: array.c:321 array.c:648 eval.c:1075 eval.c:1079 eval.c:1581 eval.c:1649
+#: eval.c:1928
#, fuzzy, c-format
-msgid "from %s"
-msgstr "Kuva:"
+msgid "attempt to use array `%s' in a scalar context"
+msgstr "Kuri Gukoresha Imbonerahamwe in a Imvugiro"
-#: array.c:513
+#: array.c:570
#, fuzzy, c-format
msgid "reference to uninitialized element `%s[\"%.*s\"]'"
msgstr "Indango Kuri Itatangijwe Ikigize:"
-#: array.c:519
+#: array.c:576
#, fuzzy, c-format
msgid "subscript of array `%s' is null string"
msgstr "Inyandiko nyesi Bya Imbonerahamwe ni NTAGIHARI Ikurikiranyanyuguti"
-#: array.c:623
+#: array.c:684
#, fuzzy, c-format
msgid "delete: index `%s' not in array `%s'"
msgstr "Gusiba Umubarendanga OYA in Imbonerahamwe"
-#: array.c:792
+#: array.c:705
+#, fuzzy, c-format
+msgid "attempt to use scalar `%s[\"%.*s\"]' as an array"
+msgstr "Kuri Gukoresha Nka Imbonerahamwe"
+
+#: array.c:868
#, fuzzy, c-format
msgid "%s: empty (null)\n"
msgstr "%s:ubusa NTAGIHARI"
-#: array.c:797
+#: array.c:873
#, fuzzy, c-format
msgid "%s: empty (zero)\n"
msgstr "%s:ubusa Zeru"
-#: array.c:801
+#: array.c:877
#, c-format
msgid "%s: table_size = %d, array_size = %d\n"
msgstr ""
-#: array.c:830
+#: array.c:912
#, fuzzy, c-format
msgid "%s: is parameter\n"
msgstr "%s:ni"
-#: array.c:835
+#: array.c:916
#, fuzzy, c-format
msgid "%s: array_ref to %s\n"
msgstr "%s:Kuri"
-#: awkgram.y:224 awkgram.y:227
+#: array.c:921
+#, fuzzy
+msgid "adump: argument not an array"
+msgstr "BIHUYE ni OYA Imbonerahamwe"
+
+#: array.c:1139
+#, fuzzy
+msgid "attempt to use array in a scalar context"
+msgstr "Kuri Gukoresha Imbonerahamwe in a Imvugiro"
+
+#: array.c:1236
+#, fuzzy
+msgid "asort: second argument not an array"
+msgstr "Gutandukanya ISEGONDA ni OYA Imbonerahamwe"
+
+#: array.c:1237
+#, fuzzy
+msgid "asorti: second argument not an array"
+msgstr "Gutandukanya ISEGONDA ni OYA Imbonerahamwe"
+
+#: array.c:1245
+#, fuzzy
+msgid "asort: first argument not an array"
+msgstr "BIHUYE ni OYA Imbonerahamwe"
+
+#: array.c:1246
+#, fuzzy
+msgid "asorti: first argument not an array"
+msgstr "BIHUYE ni OYA Imbonerahamwe"
+
+#: awkgram.y:246
#, fuzzy, c-format
msgid "%s blocks must have an action part"
msgstr "%sIgikorwa"
-#: awkgram.y:230
+#: awkgram.y:249
#, fuzzy
msgid "each rule must have a pattern or an action part"
msgstr "a Ishusho Cyangwa Igikorwa"
-#: awkgram.y:266 awkgram.y:275
+#: awkgram.y:320 awkgram.y:330
#, fuzzy
msgid "old awk does not support multiple `BEGIN' or `END' rules"
msgstr "ki/ bishaje OYA Gushigikira Mukoresha"
-#: awkgram.y:304
+#: awkgram.y:367
#, fuzzy, c-format
msgid "`%s' is a built-in function, it cannot be redefined"
msgstr "`%s'ni a in Umumaro"
-#: awkgram.y:350
+#: awkgram.y:427
#, fuzzy
msgid "regexp constant `//' looks like a C++ comment, but is not"
msgstr "nka a C Icyo wongeraho ni OYA"
-#: awkgram.y:353
+#: awkgram.y:430
#, fuzzy, c-format
msgid "regexp constant `/%s/' looks like a C comment, but is not"
msgstr "nka a C Icyo wongeraho ni OYA"
-#: awkgram.y:380 awkgram.y:692
+#: awkgram.y:735
#, fuzzy
-msgid "statement may have no effect"
-msgstr "Inyandiko Gicurasi Oya INGARUKA"
+msgid "`break' is not allowed outside a loop or switch"
+msgstr "`Hanze a ni OYA"
+
+#: awkgram.y:744
+#, fuzzy
+msgid "`continue' is not allowed outside a loop"
+msgstr "`Hanze a ni OYA"
-#: awkgram.y:477 awkgram.y:480 awkgram.y:504 awkgram.y:511 awkgram.y:518
+#: awkgram.y:753
#, fuzzy, c-format
-msgid "`%s' used in %s action"
+msgid "`next' used in %s action"
msgstr "`%s'in Igikorwa"
-#: awkgram.y:495 awkgram.y:499
+#: awkgram.y:767 awkgram.y:771
#, fuzzy
msgid "`nextfile' is a gawk extension"
msgstr "`ni a Umugereka"
-#: awkgram.y:528
+#: awkgram.y:775
+#, fuzzy, c-format
+msgid "`nextfile' used in %s action"
+msgstr "`%s'in Igikorwa"
+
+#: awkgram.y:799
#, fuzzy
msgid "`return' used outside function context"
msgstr "`Hanze Umumaro Imvugiro"
-#: awkgram.y:570
+#: awkgram.y:859
#, fuzzy
msgid "plain `print' in BEGIN or END rule should probably be `print \"\"'"
msgstr "Byuzuye in Cyangwa Gucapa"
-#: awkgram.y:586 awkgram.y:594
+#: awkgram.y:927 awkgram.y:935
#, fuzzy
msgid "`delete array' is a gawk extension"
msgstr "`Gusiba ni a Umugereka"
-#: awkgram.y:608 awkgram.y:616
+#: awkgram.y:955 awkgram.y:963
#, fuzzy
msgid "`delete(array)' is a non-portable tawk extension"
msgstr "`Gusiba Imbonerahamwe ni a Umugereka"
-#: awkgram.y:660
+#: awkgram.y:1004
#, fuzzy, c-format
msgid "duplicate case values in switch body: %s"
msgstr "Gusubiramo Uduciro in Hindura Umubiri"
-#: awkgram.y:670
+#: awkgram.y:1014
#, fuzzy
-msgid "Duplicate `default' detected in switch body"
+msgid "duplicate `default' detected in switch body"
msgstr "in Hindura Umubiri"
-#: awkgram.y:759
+#: awkgram.y:1151
#, fuzzy
msgid "multistage two-way pipelines don't work"
msgstr "Akazi"
-#: awkgram.y:850
+#: awkgram.y:1253
#, fuzzy
msgid "regular expression on right of assignment"
msgstr "Ibisanzwe imvugo ku Iburyo: Bya Igenera"
-#: awkgram.y:860
+#: awkgram.y:1263
#, fuzzy
msgid "regular expression on left of `~' or `!~' operator"
msgstr "Ibisanzwe imvugo ku Ibumoso: Bya Cyangwa Mukoresha"
-#: awkgram.y:866 awkgram.y:954
+#: awkgram.y:1278 awkgram.y:1423
#, fuzzy
msgid "old awk does not support the keyword `in' except after `for'"
msgstr "ki/ bishaje OYA Gushigikira Mukoresha"
-#: awkgram.y:872
+#: awkgram.y:1287
#, fuzzy
msgid "regular expression on right of comparison"
msgstr "Ibisanzwe imvugo ku Iburyo: Bya"
-#: awkgram.y:936
+#: awkgram.y:1399
#, fuzzy, c-format
-msgid "`getline var' invalid inside %s rule"
+msgid "`getline var' invalid inside `%s' rule"
msgstr "Umuyoboro Sibyo in"
-#: awkgram.y:939
-#, c-format
-msgid "`getline' invalid inside %s rule"
-msgstr ""
+#: awkgram.y:1401
+#, fuzzy, c-format
+msgid "`getline' invalid inside `%s' rule"
+msgstr "Umuyoboro Sibyo in"
-#: awkgram.y:944
+#: awkgram.y:1407
#, fuzzy
msgid "non-redirected `getline' undefined inside END action"
msgstr "kidasobanuye Mo Imbere Igikorwa"
-#: awkgram.y:955
+#: awkgram.y:1424
#, fuzzy
msgid "old awk does not support multidimensional arrays"
msgstr "ki/ bishaje OYA Gushigikira Mukoresha"
-#: awkgram.y:1001
+#: awkgram.y:1528
#, fuzzy
msgid "call of `length' without parentheses is not portable"
msgstr "Bya ni OYA"
-#: awkgram.y:1006
-#, fuzzy
-msgid "call of `length' without parentheses is deprecated by POSIX"
-msgstr "Bya ni Bitemewe. ku"
-
-#: awkgram.y:1051
+#: awkgram.y:1591
#, fuzzy
msgid "indirect function calls are a gawk extension"
msgstr "`ni a Umugereka"
-#: awkgram.y:1084
-#, fuzzy
-msgid "use of non-array as array"
-msgstr "Gukoresha Bya Imbonerahamwe Nka Imbonerahamwe"
+#: awkgram.y:1605
+#, fuzzy, c-format
+msgid "can not use special variable `%s' for indirect function call"
+msgstr "Umumaro Gukoresha Umumaro Izina: Nka Izina:"
-#: awkgram.y:1087
+#: awkgram.y:1682
#, fuzzy
msgid "invalid subscript expression"
msgstr "Sibyo Inyandiko nyesi imvugo"
-#: awkgram.y:1329
+#: awkgram.y:1722
#, fuzzy
-msgid "unexpected newline or end of string"
-msgstr "Cyangwa Impera Bya Ikurikiranyanyuguti"
+msgid "use of non-array as array"
+msgstr "Gukoresha Bya Imbonerahamwe Nka Imbonerahamwe"
-#: awkgram.y:1446
+#: awkgram.y:1993
#, fuzzy
-msgid "empty program text on command line"
-msgstr "ubusa Porogaramu Umwandiko ku Komandi: Umurongo"
+msgid "unexpected newline or end of string"
+msgstr "Cyangwa Impera Bya Ikurikiranyanyuguti"
-#: awkgram.y:1502
+#: awkgram.y:2248 awkgram.y:2296 awkgram.y:2470
#, fuzzy, c-format
msgid "can't open source file `%s' for reading (%s)"
msgstr "Gufungura Inkomoko IDOSIYE kugirango"
-#: awkgram.y:1600
+#: awkgram.y:2249 awkgram.y:2297 builtin.c:122
+#, fuzzy
+msgid "reason unknown"
+msgstr "Kitazwi"
+
+#: awkgram.y:2257
+#, fuzzy, c-format
+msgid "already included source file `%s'"
+msgstr "Gusoma"
+
+#: awkgram.y:2281
+#, fuzzy
+msgid "@include is a gawk extension"
+msgstr "`ni a Umugereka"
+
+#: awkgram.y:2288
+msgid "empty filename after @include"
+msgstr ""
+
+#: awkgram.y:2422
+#, fuzzy
+msgid "empty program text on command line"
+msgstr "ubusa Porogaramu Umwandiko ku Komandi: Umurongo"
+
+#: awkgram.y:2537
#, fuzzy, c-format
msgid "can't read sourcefile `%s' (%s)"
msgstr "Gusoma"
-#: awkgram.y:1608
+#: awkgram.y:2547
#, fuzzy, c-format
msgid "source file `%s' is empty"
msgstr "Inkomoko IDOSIYE ni ubusa"
-#: awkgram.y:1800 awkgram.y:1922 awkgram.y:1940 awkgram.y:2315 awkgram.y:2407
+#: awkgram.y:2732
#, fuzzy
msgid "source file does not end in newline"
msgstr "Inkomoko IDOSIYE OYA Impera in"
-#: awkgram.y:1862
+#: awkgram.y:2809
#, fuzzy
msgid "unterminated regexp ends with `\\' at end of file"
msgstr "Na: ku Impera Bya IDOSIYE"
-#: awkgram.y:1886
+#: awkgram.y:2833
#, c-format
msgid "%s: %d: tawk regex modifier `/.../%c' doesn't work in gawk"
msgstr ""
-#: awkgram.y:1890
+#: awkgram.y:2837
#, c-format
msgid "tawk regex modifier `/.../%c' doesn't work in gawk"
msgstr ""
-#: awkgram.y:1897
+#: awkgram.y:2844
msgid "unterminated regexp"
msgstr ""
-#: awkgram.y:1900
+#: awkgram.y:2848
#, fuzzy
msgid "unterminated regexp at end of file"
msgstr "ku Impera Bya IDOSIYE"
-#: awkgram.y:1969
+#: awkgram.y:2907
#, fuzzy
msgid "use of `\\ #...' line continuation is not portable"
msgstr "Gukoresha Bya Umurongo ni OYA"
-#: awkgram.y:1982
+#: awkgram.y:2923
#, fuzzy
msgid "backslash not last character on line"
msgstr "OYA Iheruka Inyuguti ku Umurongo"
-#: awkgram.y:2027
+#: awkgram.y:2984
#, fuzzy
msgid "POSIX does not allow operator `**='"
msgstr "OYA Kwemerera Mukoresha"
-#: awkgram.y:2029
+#: awkgram.y:2986
#, fuzzy
msgid "old awk does not support operator `**='"
msgstr "ki/ bishaje OYA Gushigikira Mukoresha"
-#: awkgram.y:2038
+#: awkgram.y:2995
#, fuzzy
msgid "POSIX does not allow operator `**'"
msgstr "OYA Kwemerera Mukoresha"
-#: awkgram.y:2040
+#: awkgram.y:2997
#, fuzzy
msgid "old awk does not support operator `**'"
msgstr "ki/ bishaje OYA Gushigikira Mukoresha"
-#: awkgram.y:2071
+#: awkgram.y:3032
#, fuzzy
msgid "operator `^=' is not supported in old awk"
msgstr "Mukoresha ni OYA in ki/ bishaje"
-#: awkgram.y:2079
+#: awkgram.y:3040
#, fuzzy
msgid "operator `^' is not supported in old awk"
msgstr "Mukoresha ni OYA in ki/ bishaje"
-#: awkgram.y:2163 awkgram.y:2178
+#: awkgram.y:3133 awkgram.y:3149
#, fuzzy
msgid "unterminated string"
msgstr "Ikurikiranyanyuguti"
-#: awkgram.y:2368
+#: awkgram.y:3345
#, fuzzy, c-format
msgid "invalid char '%c' in expression"
msgstr "Sibyo INYUGUTI in imvugo"
-#: awkgram.y:2416
+#: awkgram.y:3391
#, fuzzy, c-format
msgid "`%s' is a gawk extension"
msgstr "`%s'ni a Umugereka"
-#: awkgram.y:2419
+#: awkgram.y:3394
#, fuzzy, c-format
msgid "`%s' is a Bell Labs extension"
msgstr "`%s'ni a Umugereka"
-#: awkgram.y:2422
+#: awkgram.y:3397
#, fuzzy, c-format
msgid "POSIX does not allow `%s'"
msgstr "OYA Kwemerera"
-#: awkgram.y:2426
+#: awkgram.y:3401
#, fuzzy, c-format
msgid "`%s' is not supported in old awk"
msgstr "`%s'ni OYA in ki/ bishaje"
-#: awkgram.y:2452
+#: awkgram.y:3465
msgid "`goto' considered harmful!\n"
msgstr ""
-#: awkgram.y:2514
+#: awkgram.y:3518
#, fuzzy, c-format
msgid "%d is invalid as number of arguments for %s"
msgstr "%dni Sibyo Nka Umubare Bya ingingo kugirango"
-#: awkgram.y:2533 awkgram.y:2536
+#: awkgram.y:3544 awkgram.y:3547
#, fuzzy
msgid "match: third argument is a gawk extension"
msgstr "BIHUYE ni a Umugereka"
-#: awkgram.y:2549
+#: awkgram.y:3575
#, fuzzy, c-format
msgid "%s: string literal as last arg of substitute has no effect"
msgstr "%s:Ikurikiranyanyuguti Nka Iheruka Bya GUSIMBURANYA Oya INGARUKA"
-#: awkgram.y:2552
+#: awkgram.y:3580
#, fuzzy, c-format
msgid "%s third parameter is not a changeable object"
msgstr "%sni OYA a Igikoresho"
-#: awkgram.y:2586 awkgram.y:2589
+#: awkgram.y:3665 awkgram.y:3668
#, fuzzy
msgid "close: second argument is a gawk extension"
msgstr "Gufunga ISEGONDA ni a Umugereka"
-#: awkgram.y:2599
+#: awkgram.y:3680
#, fuzzy
msgid "use of dcgettext(_\"...\") is incorrect: remove leading underscore"
msgstr "Gukoresha Bya ni Gukuraho... Nyobora"
-#: awkgram.y:2614
+#: awkgram.y:3695
#, fuzzy
msgid "use of dcngettext(_\"...\") is incorrect: remove leading underscore"
msgstr "Gukoresha Bya ni Gukuraho... Nyobora"
-#: awkgram.y:2686
+#: awkgram.y:3787
#, fuzzy, c-format
msgid "function `%s': parameter #%d, `%s', duplicates parameter #%d"
msgstr "Umumaro"
-#: awkgram.y:2719
+#: awkgram.y:3829
#, fuzzy, c-format
msgid "function `%s': parameter `%s' shadows global variable"
msgstr "Umumaro IMPINDURAGACIRO"
-#: awkgram.y:2831
+#: awkgram.y:3987
#, fuzzy, c-format
msgid "could not open `%s' for writing (%s)"
msgstr "OYA Gufungura kugirango"
-#: awkgram.y:2832 profile.c:96
+#: awkgram.y:3988 profile.c:85
#, fuzzy
msgid "sending profile to standard error"
msgstr "Ibijyana Kuri Bisanzwe Ikosa"
-#: awkgram.y:2864
+#: awkgram.y:3994
#, fuzzy, c-format
msgid "%s: close failed (%s)"
msgstr "%s:Gufunga Byanze"
-#: awkgram.y:2985
+#: awkgram.y:4046
msgid "shadow_funcs() called twice!"
msgstr ""
-#: awkgram.y:3012
+#: awkgram.y:4052
#, fuzzy
msgid "there were shadowed variables."
msgstr "Bihawe igicucu Ibihinduka"
-#: awkgram.y:3085
+#: awkgram.y:4081
#, fuzzy, c-format
msgid "function `%s': can't use function name as parameter name"
msgstr "Umumaro Gukoresha Umumaro Izina: Nka Izina:"
-#: awkgram.y:3088
+#: awkgram.y:4086
#, fuzzy, c-format
msgid "function `%s': can't use special variable `%s' as a function parameter"
msgstr "Umumaro Gukoresha Umumaro Izina: Nka Izina:"
-#: awkgram.y:3098
+#: awkgram.y:4102
#, fuzzy, c-format
msgid "function name `%s' previously defined"
msgstr "Umumaro Izina:"
-#: awkgram.y:3249 awkgram.y:3255
+#: awkgram.y:4271 awkgram.y:4277
#, fuzzy, c-format
msgid "function `%s' called but never defined"
msgstr "Umumaro Nta narimwe"
-#: awkgram.y:3258
+#: awkgram.y:4280
#, fuzzy, c-format
msgid "function `%s' defined but never called"
msgstr "Umumaro Nta narimwe"
-#: awkgram.y:3285
+#: awkgram.y:4311
#, fuzzy, c-format
msgid "regexp constant for parameter #%d yields boolean value"
msgstr "kugirango Icyungo Agaciro"
-#: awkgram.y:3329
+#: awkgram.y:4420
#, fuzzy, c-format
msgid ""
"function `%s' called with space between name and `(',\n"
@@ -465,770 +540,613 @@ msgstr ""
"Umumaro Na: Umwanya hagati Izina: Na Cyangwa Nka a IMPINDURAGACIRO Cyangwa "
"Imbonerahamwe"
-#: awkgram.y:3750
+#: awkgram.y:4673 eval.c:1845
#, fuzzy
-msgid "division by zero attempted in `/'"
-msgstr "ku Zeru in"
+msgid "division by zero attempted"
+msgstr "ku Zeru"
-#: awkgram.y:3755 eval.c:1411
+#: awkgram.y:4682 eval.c:1877
#, fuzzy, c-format
msgid "division by zero attempted in `%%'"
msgstr "ku Zeru in"
-#: builtin.c:122
+#: awkgram.y:5342
+#, fuzzy
+msgid "statement may have no effect"
+msgstr "Inyandiko Gicurasi Oya INGARUKA"
+
+#: builtin.c:120
#, fuzzy, c-format
msgid "%s to \"%s\" failed (%s)"
msgstr "%sKuri Byanze"
-#: builtin.c:123
+#: builtin.c:121
#, fuzzy
msgid "standard output"
msgstr "Bisanzwe Ibisohoka"
-#: builtin.c:124
-#, fuzzy
-msgid "reason unknown"
-msgstr "Kitazwi"
-
-#: builtin.c:137
+#: builtin.c:135
#, fuzzy
msgid "exp: received non-numeric argument"
msgstr "EXP BYAKIRIWE Bikurikije umubare"
-#: builtin.c:143
+#: builtin.c:141
#, fuzzy, c-format
msgid "exp: argument %g is out of range"
msgstr "EXP ni Inyuma Bya Urutonde"
-#: builtin.c:201
+#: builtin.c:200
#, fuzzy, c-format
msgid "fflush: cannot flush: pipe `%s' opened for reading, not writing"
msgstr "kugirango OYA"
-#: builtin.c:204
+#: builtin.c:203
#, fuzzy, c-format
msgid "fflush: cannot flush: file `%s' opened for reading, not writing"
msgstr "IDOSIYE kugirango OYA"
-#: builtin.c:216
+#: builtin.c:215
#, fuzzy, c-format
msgid "fflush: `%s' is not an open file, pipe or co-process"
msgstr "ni OYA Gufungura IDOSIYE Cyangwa"
-#: builtin.c:310
+#: builtin.c:322
#, fuzzy
msgid "index: received non-string first argument"
msgstr "Umubarendanga BYAKIRIWE Ikurikiranyanyuguti Itangira"
-#: builtin.c:312
+#: builtin.c:324
#, fuzzy
msgid "index: received non-string second argument"
msgstr "Umubarendanga BYAKIRIWE Ikurikiranyanyuguti ISEGONDA"
-#: builtin.c:434
+#: builtin.c:446
#, fuzzy
msgid "int: received non-numeric argument"
msgstr "INT BYAKIRIWE Bikurikije umubare"
-#: builtin.c:464
+#: builtin.c:469
#, fuzzy
msgid "`length(array)' is a gawk extension"
msgstr "`Gusiba ni a Umugereka"
-#: builtin.c:471
-msgid "length: untyped parameter argument will be forced to scalar"
-msgstr ""
-
-#: builtin.c:480
-msgid "length: untyped argument will be forced to scalar"
-msgstr ""
-
-#: builtin.c:484
+#: builtin.c:477
#, fuzzy
msgid "length: received non-string argument"
msgstr "Uburebure BYAKIRIWE Ikurikiranyanyuguti"
-#: builtin.c:515
+#: builtin.c:508
#, fuzzy
msgid "log: received non-numeric argument"
msgstr "LOG BYAKIRIWE Bikurikije umubare"
-#: builtin.c:518
+#: builtin.c:511
#, fuzzy, c-format
msgid "log: received negative argument %g"
msgstr "LOG BYAKIRIWE"
-#: builtin.c:726 builtin.c:729
-#, fuzzy
-msgid "must use `count$' on all formats or none"
-msgstr "Gukoresha IBARA ku Byose Imiterere Cyangwa Ntacyo"
-
-#: builtin.c:790
-#, c-format
-msgid "field width is ignored for `%%%%' specifier"
-msgstr ""
-
-#: builtin.c:792
-#, c-format
-msgid "precision is ignored for `%%%%' specifier"
-msgstr ""
-
-#: builtin.c:794
-#, c-format
-msgid "field width and precision are ignored for `%%%%' specifier"
-msgstr ""
-
-#: builtin.c:845
-#, fuzzy
-msgid "`$' is not permitted in awk formats"
-msgstr "`$'ni OYA in Imiterere"
-
-#: builtin.c:851
-#, fuzzy
-msgid "arg count with `$' must be > 0"
-msgstr "IBARA Na: 0"
-
-#: builtin.c:853
-#, fuzzy, c-format
-msgid "arg count %ld greater than total number of supplied arguments"
-msgstr "IBARA Biruta Igiteranyo Umubare Bya ingingo"
-
-#: builtin.c:855
-#, fuzzy
-msgid "`$' not permitted after period in format"
-msgstr "`$'OYA Nyuma Igihe in Imiterere"
-
-#: builtin.c:868
-#, fuzzy
-msgid "no `$' supplied for positional field width or precision"
-msgstr "Oya kugirango Umwanya Ubugari Cyangwa"
-
-#: builtin.c:938
-#, fuzzy
-msgid "`l' is meaningless in awk formats; ignored"
-msgstr "`ni in Imiterere"
-
-#: builtin.c:942
-#, fuzzy
-msgid "`l' is not permitted in POSIX awk formats"
-msgstr "`ni OYA in Imiterere"
-
-#: builtin.c:953
-#, fuzzy
-msgid "`L' is meaningless in awk formats; ignored"
-msgstr "`ni in Imiterere"
-
-#: builtin.c:957
-#, fuzzy
-msgid "`L' is not permitted in POSIX awk formats"
-msgstr "`ni OYA in Imiterere"
-
-#: builtin.c:968
-#, fuzzy
-msgid "`h' is meaningless in awk formats; ignored"
-msgstr "`ni in Imiterere"
-
-#: builtin.c:972
-#, fuzzy
-msgid "`h' is not permitted in POSIX awk formats"
-msgstr "`ni OYA in Imiterere"
-
-#: builtin.c:1252
+#: builtin.c:531 builtin.c:573 builtin.c:586 builtin.c:982 builtin.c:994
#, fuzzy, c-format
-msgid "[s]printf: value %g is out of range for `%%%c' format"
-msgstr "[S Agaciro ni Inyuma Bya Urutonde kugirango Imiterere"
-
-#: builtin.c:1332
-#, c-format
-msgid "ignoring unknown format specifier character `%c': no argument converted"
-msgstr ""
-
-#: builtin.c:1338
-#, fuzzy
-msgid "not enough arguments to satisfy format string"
-msgstr "OYA ingingo Kuri Imiterere Ikurikiranyanyuguti"
-
-#: builtin.c:1340
-#, fuzzy
-msgid "^ ran out for this one"
-msgstr "^Inyuma kugirango iyi"
-
-#: builtin.c:1346
-#, fuzzy
-msgid "[s]printf: format specifier does not have control letter"
-msgstr "[S Imiterere OYA Igenzura Ibaruwa..."
-
-#: builtin.c:1349
-#, fuzzy
-msgid "too many arguments supplied for format string"
-msgstr "ingingo kugirango Imiterere Ikurikiranyanyuguti"
+msgid "attempt to use array `%s' in scalar context"
+msgstr "Kuri Gukoresha Imbonerahamwe in a Imvugiro"
-#: builtin.c:1424 builtin.c:1427
+#: builtin.c:569 builtin.c:580
#, fuzzy
msgid "printf: no arguments"
msgstr "Oya ingingo"
-#: builtin.c:1451
+#: builtin.c:621
#, fuzzy
msgid "sqrt: received non-numeric argument"
msgstr "SQRT BYAKIRIWE Bikurikije umubare"
-#: builtin.c:1455
+#: builtin.c:625
#, fuzzy, c-format
msgid "sqrt: called with negative argument %g"
msgstr "SQRT Na:"
-#: builtin.c:1479
-#, fuzzy, c-format
-msgid "substr: start index %g is invalid, using 1"
-msgstr "Gutangira Umubarendanga ni Sibyo ikoresha 1."
-
-#: builtin.c:1484
-#, fuzzy, c-format
-msgid "substr: non-integer start index %g will be truncated"
-msgstr "Umubare wuzuye Gutangira Umubarendanga"
-
-#: builtin.c:1510
+#: builtin.c:649
#, fuzzy, c-format
msgid "substr: length %g is not >= 1"
msgstr "Uburebure ni OYA 1."
-#: builtin.c:1512
+#: builtin.c:651
#, fuzzy, c-format
msgid "substr: length %g is not >= 0"
msgstr "Uburebure ni OYA 0"
-#: builtin.c:1519
+#: builtin.c:658
#, fuzzy, c-format
msgid "substr: non-integer length %g will be truncated"
msgstr "Umubare wuzuye Uburebure"
-#: builtin.c:1524
+#: builtin.c:663
#, fuzzy, c-format
msgid "substr: length %g too big for string indexing, truncating to %g"
msgstr "Uburebure kugirango Ikurikiranyanyuguti gushyiraho umugereka Kuri"
-#: builtin.c:1536
+#: builtin.c:675
+#, fuzzy, c-format
+msgid "substr: start index %g is invalid, using 1"
+msgstr "Gutangira Umubarendanga ni Sibyo ikoresha 1."
+
+#: builtin.c:680
+#, fuzzy, c-format
+msgid "substr: non-integer start index %g will be truncated"
+msgstr "Umubare wuzuye Gutangira Umubarendanga"
+
+#: builtin.c:705
#, fuzzy
msgid "substr: source string is zero length"
msgstr "Inkomoko Ikurikiranyanyuguti ni Zeru Uburebure"
-#: builtin.c:1552
+#: builtin.c:721
#, fuzzy, c-format
msgid "substr: start index %g is past end of string"
msgstr "Gutangira Umubarendanga ni Impera Bya Ikurikiranyanyuguti"
-#: builtin.c:1560
+#: builtin.c:729
#, fuzzy, c-format
msgid ""
"substr: length %g at start index %g exceeds length of first argument (%lu)"
msgstr "Uburebure ku Gutangira Umubarendanga Uburebure Bya Itangira"
-#: builtin.c:1637
+#: builtin.c:806
+#, fuzzy
+msgid "strftime: received non-numeric second argument"
+msgstr "BYAKIRIWE Bikurikije umubare ISEGONDA"
+
+#: builtin.c:813
#, fuzzy
msgid "strftime: received non-string first argument"
msgstr "BYAKIRIWE Ikurikiranyanyuguti Itangira"
-#: builtin.c:1643
+#: builtin.c:819
#, fuzzy
msgid "strftime: received empty format string"
msgstr "BYAKIRIWE ubusa Imiterere Ikurikiranyanyuguti"
-#: builtin.c:1652
-#, fuzzy
-msgid "strftime: received non-numeric second argument"
-msgstr "BYAKIRIWE Bikurikije umubare ISEGONDA"
-
-#: builtin.c:1729
+#: builtin.c:885
#, fuzzy
msgid "mktime: received non-string argument"
msgstr "BYAKIRIWE Ikurikiranyanyuguti"
-#: builtin.c:1746
+#: builtin.c:902
msgid "mktime: at least one of the values is out of the default range"
msgstr ""
-#: builtin.c:1781
+#: builtin.c:937
msgid "'system' function not allowed in sandbox mode"
msgstr ""
-#: builtin.c:1786
+#: builtin.c:942
#, fuzzy
msgid "system: received non-string argument"
msgstr "Sisitemu BYAKIRIWE Ikurikiranyanyuguti"
-#: builtin.c:1907 eval.c:2285
+#: builtin.c:997 eval.c:1105 eval.c:1557 eval.c:1570
+#, fuzzy, c-format
+msgid "reference to uninitialized variable `%s'"
+msgstr "Indango Kuri Itatangijwe IMPINDURAGACIRO"
+
+#: builtin.c:1064
#, fuzzy, c-format
msgid "reference to uninitialized field `$%d'"
msgstr "Indango Kuri Itatangijwe Umwanya"
-#: builtin.c:2012
+#: builtin.c:1098
#, fuzzy
msgid "tolower: received non-string argument"
msgstr "BYAKIRIWE Ikurikiranyanyuguti"
-#: builtin.c:2042
+#: builtin.c:1151
#, fuzzy
msgid "toupper: received non-string argument"
msgstr "BYAKIRIWE Ikurikiranyanyuguti"
-#: builtin.c:2075
+#: builtin.c:1199
#, fuzzy
msgid "atan2: received non-numeric first argument"
msgstr "ATAN2 BYAKIRIWE Bikurikije umubare Itangira"
-#: builtin.c:2077
+#: builtin.c:1201
#, fuzzy
msgid "atan2: received non-numeric second argument"
msgstr "ATAN2 BYAKIRIWE Bikurikije umubare ISEGONDA"
-#: builtin.c:2096
+#: builtin.c:1220
#, fuzzy
msgid "sin: received non-numeric argument"
msgstr "SIN BYAKIRIWE Bikurikije umubare"
-#: builtin.c:2112
+#: builtin.c:1236
#, fuzzy
msgid "cos: received non-numeric argument"
msgstr "COS BYAKIRIWE Bikurikije umubare"
-#: builtin.c:2165
+#: builtin.c:1289
#, fuzzy
msgid "srand: received non-numeric argument"
msgstr "BYAKIRIWE Bikurikije umubare"
-#: builtin.c:2200
+#: builtin.c:1320
#, fuzzy
msgid "match: third argument is not an array"
msgstr "BIHUYE ni OYA Imbonerahamwe"
-#: builtin.c:2750
+#: builtin.c:1827
#, fuzzy
msgid "gensub: third argument of 0 treated as 1"
msgstr "Bya 0 Nka 1."
-#: builtin.c:2866
+#: builtin.c:1869
#, fuzzy
msgid "lshift: received non-numeric first argument"
msgstr "BYAKIRIWE Bikurikije umubare Itangira"
-#: builtin.c:2868
+#: builtin.c:1871
#, fuzzy
msgid "lshift: received non-numeric second argument"
msgstr "BYAKIRIWE Bikurikije umubare ISEGONDA"
-#: builtin.c:2874
+#: builtin.c:1877
#, fuzzy, c-format
msgid "lshift(%lf, %lf): negative values will give strange results"
msgstr "Uduciro Ibisubizo ku"
-#: builtin.c:2876
+#: builtin.c:1879
#, fuzzy, c-format
msgid "lshift(%lf, %lf): fractional values will be truncated"
msgstr "Uduciro"
-#: builtin.c:2878
+#: builtin.c:1881
#, fuzzy, c-format
msgid "lshift(%lf, %lf): too large shift value will give strange results"
msgstr "Binini Gusunika Agaciro Ibisubizo ku"
-#: builtin.c:2904
+#: builtin.c:1908
#, fuzzy
msgid "rshift: received non-numeric first argument"
msgstr "BYAKIRIWE Bikurikije umubare Itangira"
-#: builtin.c:2906
+#: builtin.c:1910
#, fuzzy
msgid "rshift: received non-numeric second argument"
msgstr "BYAKIRIWE Bikurikije umubare ISEGONDA"
-#: builtin.c:2912
+#: builtin.c:1916
#, fuzzy, c-format
msgid "rshift(%lf, %lf): negative values will give strange results"
msgstr "Uduciro Ibisubizo ku"
-#: builtin.c:2914
+#: builtin.c:1918
#, fuzzy, c-format
msgid "rshift(%lf, %lf): fractional values will be truncated"
msgstr "Uduciro"
-#: builtin.c:2916
+#: builtin.c:1920
#, fuzzy, c-format
msgid "rshift(%lf, %lf): too large shift value will give strange results"
msgstr "Binini Gusunika Agaciro Ibisubizo ku"
-#: builtin.c:2942
+#: builtin.c:1947
#, fuzzy
msgid "and: received non-numeric first argument"
msgstr "Na BYAKIRIWE Bikurikije umubare Itangira"
-#: builtin.c:2944
+#: builtin.c:1949
#, fuzzy
msgid "and: received non-numeric second argument"
msgstr "Na BYAKIRIWE Bikurikije umubare ISEGONDA"
-#: builtin.c:2950
+#: builtin.c:1955
#, fuzzy, c-format
msgid "and(%lf, %lf): negative values will give strange results"
msgstr "Na Uduciro Ibisubizo ku"
-#: builtin.c:2952
+#: builtin.c:1957
#, fuzzy, c-format
msgid "and(%lf, %lf): fractional values will be truncated"
msgstr "Na Uduciro"
-#: builtin.c:2978
+#: builtin.c:1984
#, fuzzy
msgid "or: received non-numeric first argument"
msgstr "Cyangwa BYAKIRIWE Bikurikije umubare Itangira"
-#: builtin.c:2980
+#: builtin.c:1986
#, fuzzy
msgid "or: received non-numeric second argument"
msgstr "Cyangwa BYAKIRIWE Bikurikije umubare ISEGONDA"
-#: builtin.c:2986
+#: builtin.c:1992
#, fuzzy, c-format
msgid "or(%lf, %lf): negative values will give strange results"
msgstr "Cyangwa Uduciro Ibisubizo ku"
-#: builtin.c:2988
+#: builtin.c:1994
#, fuzzy, c-format
msgid "or(%lf, %lf): fractional values will be truncated"
msgstr "Cyangwa Uduciro"
-#: builtin.c:3014
+#: builtin.c:2023
#, fuzzy
msgid "xor: received non-numeric first argument"
msgstr "BYAKIRIWE Bikurikije umubare Itangira"
-#: builtin.c:3016
+#: builtin.c:2025
#, fuzzy
msgid "xor: received non-numeric second argument"
msgstr "BYAKIRIWE Bikurikije umubare ISEGONDA"
-#: builtin.c:3022
+#: builtin.c:2031
#, fuzzy, c-format
msgid "xor(%lf, %lf): negative values will give strange results"
msgstr "Uduciro Ibisubizo ku"
-#: builtin.c:3024
+#: builtin.c:2033
#, fuzzy, c-format
msgid "xor(%lf, %lf): fractional values will be truncated"
msgstr "Uduciro"
-#: builtin.c:3048
+#: builtin.c:2057 builtin.c:2063
#, fuzzy
msgid "compl: received non-numeric argument"
msgstr "BYAKIRIWE Bikurikije umubare"
-#: builtin.c:3054
+#: builtin.c:2065
#, fuzzy, c-format
msgid "compl(%lf): negative value will give strange results"
msgstr "Agaciro Ibisubizo ku"
-#: builtin.c:3056
+#: builtin.c:2067
#, fuzzy, c-format
msgid "compl(%lf): fractional value will be truncated"
msgstr "Agaciro"
-#: builtin.c:3229
+#: builtin.c:2237
#, fuzzy, c-format
msgid "dcgettext: `%s' is not a valid locale category"
msgstr "ni OYA a Byemewe Umwanya Icyiciro"
-#: eval.c:374
+#: eval.c:412
#, fuzzy, c-format
msgid "unknown nodetype %d"
msgstr "Kitazwi"
-#: eval.c:423
-#, fuzzy
-msgid "buffer overflow in genflags2str"
-msgstr "Byarenze urugero in"
-
-#: eval.c:455 eval.c:461 profile.c:787
-#, fuzzy, c-format
-msgid "attempt to use array `%s' in a scalar context"
-msgstr "Kuri Gukoresha Imbonerahamwe in a Imvugiro"
-
-#: eval.c:803
+#: eval.c:423 eval.c:437
#, fuzzy, c-format
-msgid "for loop: array `%s' changed size from %ld to %ld during loop execution"
-msgstr "kugirango Imbonerahamwe Byahinduwe Ingano Bivuye Kuri"
-
-#: eval.c:824
-#, fuzzy
-msgid "`break' outside a loop is not portable"
-msgstr "`Hanze a ni OYA"
-
-#: eval.c:828
-#, fuzzy
-msgid "`break' outside a loop is not allowed"
-msgstr "`Hanze a ni OYA"
-
-#: eval.c:845
-#, fuzzy
-msgid "`continue' outside a loop is not portable"
-msgstr "`Hanze a ni OYA"
-
-#: eval.c:849
-#, fuzzy
-msgid "`continue' outside a loop is not allowed"
-msgstr "`Hanze a ni OYA"
+msgid "unknown opcode %d"
+msgstr "Kitazwi"
-#: eval.c:883
-#, fuzzy
-msgid "`next' cannot be called from a BEGIN rule"
-msgstr "`Bivuye a"
+#: eval.c:434
+#, c-format
+msgid "opcode %s not an operator or keyword"
+msgstr ""
-#: eval.c:885
+#: eval.c:487
#, fuzzy
-msgid "`next' cannot be called from an END rule"
-msgstr "`Bivuye"
+msgid "buffer overflow in genflags2str"
+msgstr "Byarenze urugero in"
-#: eval.c:887
-#, fuzzy
-msgid "`next' cannot be called from a BEGINFILE rule"
-msgstr "`Bivuye a"
+#: eval.c:613
+#, c-format
+msgid ""
+"\n"
+"\t# Function Call Stack:\n"
+"\n"
+msgstr ""
-#: eval.c:889
+#: eval.c:640
#, fuzzy
-msgid "`next' cannot be called from an ENDFILE rule"
-msgstr "`Bivuye"
+msgid "`IGNORECASE' is a gawk extension"
+msgstr "`ni a Umugereka"
-#: eval.c:898
+#: eval.c:669
#, fuzzy
-msgid "`nextfile' cannot be called from a BEGIN rule"
-msgstr "`Bivuye a"
+msgid "`BINMODE' is a gawk extension"
+msgstr "`ni a Umugereka"
-#: eval.c:900
-#, fuzzy
-msgid "`nextfile' cannot be called from an END rule"
-msgstr "`Bivuye"
+#: eval.c:727
+#, c-format
+msgid "BINMODE value `%s' is invalid, treated as 3"
+msgstr ""
-#: eval.c:906
-#, fuzzy
-msgid "`nextfile' cannot be called from an ENDFILE rule"
-msgstr "`Bivuye"
+#: eval.c:817
+#, c-format
+msgid "bad `%sFMT' specification `%s'"
+msgstr ""
-#: eval.c:963
+#: eval.c:895
#, fuzzy
-msgid "statement has no effect"
-msgstr "Inyandiko Oya INGARUKA"
+msgid "turning off `--lint' due to assignment to `LINT'"
+msgstr "Bidakora Kuri Igenera Kuri"
-#: eval.c:1040 eval.c:2133
+#: eval.c:1067 eval.c:1544
#, fuzzy, c-format
msgid "can't use function name `%s' as variable or array"
msgstr "Gukoresha Umumaro Izina: Nka IMPINDURAGACIRO Cyangwa Imbonerahamwe"
-#: eval.c:1047 eval.c:1053
+#: eval.c:1095
+#, fuzzy
+msgid "assignment is not allowed to result of builtin function"
+msgstr "Igenera ni OYA Kuri Igisubizo Bya Umumaro"
+
+#: eval.c:1104 eval.c:1556 eval.c:1569
#, fuzzy, c-format
msgid "reference to uninitialized argument `%s'"
msgstr "Indango Kuri Itatangijwe"
-#: eval.c:1062 eval.c:2142
-#, fuzzy, c-format
-msgid "reference to uninitialized variable `%s'"
-msgstr "Indango Kuri Itatangijwe IMPINDURAGACIRO"
-
-#: eval.c:1210
-#, fuzzy
-msgid ""
-"concatenation: side effects in one expression have changed the length of "
-"another!"
-msgstr "Ingaruka in imvugo Byahinduwe i Uburebure Bya"
-
-#: eval.c:1315
+#: eval.c:1123
#, fuzzy
-msgid "assignment used in conditional context"
-msgstr "Igenera in Imvugiro"
+msgid "attempt to field reference from non-numeric value"
+msgstr "Kuri Umwanya Indango Bivuye Bikurikije umubare Agaciro"
-#: eval.c:1396
+#: eval.c:1125
#, fuzzy
-msgid "division by zero attempted"
-msgstr "ku Zeru"
+msgid "attempt to field reference from null string"
+msgstr "Kuri Indango Bivuye NTAGIHARI Ikurikiranyanyuguti"
-#: eval.c:1426 profile.c:663
+#: eval.c:1131
#, fuzzy, c-format
-msgid "illegal type (%s) in tree_eval"
-msgstr "Ubwoko in"
-
-#: eval.c:1589
-#, fuzzy
-msgid "division by zero attempted in `/='"
-msgstr "ku Zeru in"
+msgid "attempt to access field %ld"
+msgstr "Kuri Umwanya"
-#: eval.c:1611
+#: eval.c:1140
#, fuzzy, c-format
-msgid "division by zero attempted in `%%='"
-msgstr "ku Zeru in"
+msgid "reference to uninitialized field `$%ld'"
+msgstr "Indango Kuri Itatangijwe Umwanya"
-#: eval.c:1891
+#: eval.c:1202
#, fuzzy, c-format
msgid "function `%s' called with more arguments than declared"
msgstr "Umumaro Na: Birenzeho ingingo"
-#: eval.c:1948
-#, fuzzy, c-format
-msgid "function `%s' not defined"
-msgstr "Umumaro OYA"
-
-#: eval.c:1950
-#, c-format
-msgid "identifier `%s' is not a function"
-msgstr ""
-
-#: eval.c:1997
-#, c-format
-msgid ""
-"function parameter `%s' is not a scalar and cannot be used for indirect "
-"function call"
-msgstr ""
-
-#: eval.c:2014
-#, c-format
-msgid "indirect call of real function `%s' is silly"
-msgstr ""
-
-#: eval.c:2034
-#, c-format
-msgid "function `%s' called indirectly through `%s' does not exist"
-msgstr ""
-
-#: eval.c:2039
+#: eval.c:1358
#, c-format
-msgid "identifier `%s' cannot be used for indirect function call"
+msgid "unwind_stack: unexpected type `%s'"
msgstr ""
-#: eval.c:2105
-#, c-format
-msgid ""
-"\n"
-"\t# Function Call Stack:\n"
-"\n"
-msgstr ""
+#: eval.c:1636
+#, fuzzy, c-format
+msgid "attempt to use scalar `%s' as an array"
+msgstr "Kuri Gukoresha Nka Imbonerahamwe"
-#: eval.c:2108
-#, c-format
-msgid "\t# -- main --\n"
-msgstr ""
+#: eval.c:1680
+#, fuzzy
+msgid "assignment used in conditional context"
+msgstr "Igenera in Imvugiro"
-#: eval.c:2269
+#: eval.c:1684
#, fuzzy
-msgid "attempt to field reference from non-numeric value"
-msgstr "Kuri Umwanya Indango Bivuye Bikurikije umubare Agaciro"
+msgid "statement has no effect"
+msgstr "Inyandiko Oya INGARUKA"
-#: eval.c:2271
+#: eval.c:2028
#, fuzzy
-msgid "attempt to reference from null string"
-msgstr "Kuri Indango Bivuye NTAGIHARI Ikurikiranyanyuguti"
+msgid "division by zero attempted in `/='"
+msgstr "ku Zeru in"
-#: eval.c:2277
+#: eval.c:2053
#, fuzzy, c-format
-msgid "attempt to access field %d"
-msgstr "Kuri Umwanya"
+msgid "division by zero attempted in `%%='"
+msgstr "ku Zeru in"
-#: eval.c:2298 eval.c:2305 profile.c:843
+#: eval.c:2139
#, fuzzy
-msgid "assignment is not allowed to result of builtin function"
-msgstr "Igenera ni OYA Kuri Igisubizo Bya Umumaro"
+msgid "`continue' outside a loop is not allowed"
+msgstr "`Hanze a ni OYA"
-#: eval.c:2369
+#: eval.c:2145
#, fuzzy
-msgid "`IGNORECASE' is a gawk extension"
-msgstr "`ni a Umugereka"
+msgid "`break' outside a loop is not allowed"
+msgstr "`Hanze a ni OYA"
-#: eval.c:2398
-#, fuzzy
-msgid "`BINMODE' is a gawk extension"
-msgstr "`ni a Umugereka"
+#: eval.c:2229
+#, fuzzy, c-format
+msgid "for loop: array `%s' changed size from %ld to %ld during loop execution"
+msgstr "kugirango Imbonerahamwe Byahinduwe Ingano Bivuye Kuri"
-#: eval.c:2456
+#: eval.c:2342
#, c-format
-msgid "BINMODE value `%s' is invalid, treated as 3"
+msgid "function called indirectly through `%s' does not exist"
msgstr ""
-#: eval.c:2546
+#: eval.c:2354
+#, fuzzy, c-format
+msgid "function `%s' not defined"
+msgstr "Umumaro OYA"
+
+#: eval.c:2481
+#, fuzzy, c-format
+msgid "`nextfile' cannot be called from a `%s' rule"
+msgstr "`Bivuye"
+
+#: eval.c:2540
+#, fuzzy, c-format
+msgid "`next' cannot be called from a `%s' rule"
+msgstr "`Bivuye"
+
+#: eval.c:2602
#, c-format
-msgid "bad `%sFMT' specification `%s'"
+msgid "Sorry, don't know how to interpret `%s'"
msgstr ""
-#: eval.c:2624
-#, fuzzy
-msgid "turning off `--lint' due to assignment to `LINT'"
-msgstr "Bidakora Kuri Igenera Kuri"
-
-#: ext.c:61
-msgid "extensions not allowed in sandbox mode"
+#: ext.c:62
+msgid "extensions are not allowed in sandbox mode"
msgstr ""
-#: ext.c:65 ext.c:70
+#: ext.c:68 ext.c:73
#, fuzzy
msgid "`extension' is a gawk extension"
msgstr "`ni a Umugereka"
-#: ext.c:80
+#: ext.c:83
#, fuzzy, c-format
-msgid "extension: cannot open `%s' (%s)\n"
+msgid "fatal: extension: cannot open `%s' (%s)\n"
msgstr "Umugereka Gufungura"
-#: ext.c:88
+#: ext.c:93
#, fuzzy, c-format
-msgid "extension: library `%s': cannot call function `%s' (%s)\n"
+msgid "fatal: extension: library `%s': cannot call function `%s' (%s)\n"
msgstr "Umugereka Isomero Umumaro"
-#: ext.c:108
+#: ext.c:123
#, fuzzy
msgid "extension: missing function name"
msgstr "Umugereka Ibuze Umumaro Izina:"
-#: ext.c:113
+#: ext.c:128
#, fuzzy, c-format
msgid "extension: illegal character `%c' in function name `%s'"
msgstr "Umugereka Inyuguti in Umumaro Izina:"
-#: ext.c:119
+#: ext.c:137
#, fuzzy, c-format
msgid "extension: can't redefine function `%s'"
msgstr "Umugereka Umumaro"
-#: ext.c:123
+#: ext.c:141
#, fuzzy, c-format
msgid "extension: function `%s' already defined"
msgstr "Umugereka Umumaro"
-#: ext.c:128
+#: ext.c:146
+#, fuzzy, c-format
+msgid "extension: function name `%s' previously defined"
+msgstr "Umugereka Umumaro Izina:"
+
+#: ext.c:148
#, fuzzy, c-format
msgid "extension: can't use gawk built-in `%s' as function name"
msgstr "Umugereka Gukoresha in Nka Umumaro Izina:"
-#: ext.c:130
-#, fuzzy, c-format
-msgid "extension: function name `%s' previously defined"
-msgstr "Umugereka Umumaro Izina:"
+#: ext.c:152
+#, c-format
+msgid "make_builtin: negative argument count for function `%s'"
+msgstr ""
-#: ext.c:207
+#: ext.c:255
#, fuzzy, c-format
msgid "function `%s' defined to take no more than %d argument(s)"
msgstr "Umumaro Kuri Oya Birenzeho S"
-#: ext.c:210
+#: ext.c:258
#, fuzzy, c-format
msgid "function `%s': missing argument #%d"
msgstr "Umumaro Ibuze"
-#: ext.c:220
+#: ext.c:268
#, fuzzy, c-format
msgid "function `%s': argument #%d: attempt to use scalar as an array"
msgstr "Umumaro Kuri Gukoresha Nka Imbonerahamwe"
-#: ext.c:224
+#: ext.c:272
#, fuzzy, c-format
msgid "function `%s': argument #%d: attempt to use array as a scalar"
msgstr "Umumaro Kuri Gukoresha Imbonerahamwe Nka a"
-#: ext.c:249
+#: ext.c:285
msgid "Operation Not Supported"
msgstr ""
@@ -1237,62 +1155,62 @@ msgstr ""
msgid "NF set to negative value"
msgstr "Gushyiraho Kuri Agaciro"
-#: field.c:913
-#, fuzzy
-msgid "split: second argument is not an array"
-msgstr "Gutandukanya ISEGONDA ni OYA Imbonerahamwe"
-
-#: field.c:922 field.c:932 field.c:937
+#: field.c:939 field.c:946 field.c:950
#, fuzzy
msgid "split: fourth argument is a gawk extension"
msgstr "BIHUYE ni a Umugereka"
-#: field.c:928
+#: field.c:943
#, fuzzy
msgid "split: fourth argument is not an array"
msgstr "Gutandukanya ISEGONDA ni OYA Imbonerahamwe"
-#: field.c:975
+#: field.c:957
+#, fuzzy
+msgid "split: second argument is not an array"
+msgstr "Gutandukanya ISEGONDA ni OYA Imbonerahamwe"
+
+#: field.c:987
#, fuzzy
-msgid "split: null string for third argument is a gawk extension"
+msgid "split: null string for third arg is a gawk extension"
msgstr "Gutandukanya NTAGIHARI Ikurikiranyanyuguti kugirango ni a Umugereka"
-#: field.c:1032
+#: field.c:1028
#, fuzzy
-msgid "patsplit: second argument is not an array"
+msgid "patsplit: fourth argument is not an array"
msgstr "Gutandukanya ISEGONDA ni OYA Imbonerahamwe"
-#: field.c:1041
+#: field.c:1033
#, fuzzy
-msgid "patsplit: fourth argument is not an array"
+msgid "patsplit: second argument is not an array"
msgstr "Gutandukanya ISEGONDA ni OYA Imbonerahamwe"
-#: field.c:1067
+#: field.c:1051
#, fuzzy
msgid "patsplit: third argument must be non-null"
msgstr "BIHUYE ni OYA Imbonerahamwe"
-#: field.c:1111
+#: field.c:1084
#, fuzzy
msgid "`FIELDWIDTHS' is a gawk extension"
msgstr "`ni a Umugereka"
-#: field.c:1141 field.c:1155
+#: field.c:1147
#, c-format
msgid "invalid FIELDWIDTHS value, near `%s'"
msgstr ""
-#: field.c:1238
+#: field.c:1220
#, fuzzy
msgid "null string for `FS' is a gawk extension"
msgstr "NTAGIHARI Ikurikiranyanyuguti kugirango ni a Umugereka"
-#: field.c:1242
+#: field.c:1224
#, fuzzy
msgid "old awk does not support regexps as value of `FS'"
msgstr "ki/ bishaje OYA Gushigikira Mukoresha"
-#: field.c:1357
+#: field.c:1343
#, fuzzy
msgid "`FPAT' is a gawk extension"
msgstr "`%s'ni a Umugereka"
@@ -1352,509 +1270,506 @@ msgstr "%s:Ihitamo Kwemerera"
msgid "%s: option '-W %s' requires an argument\n"
msgstr "%s:Ihitamo"
-#: io.c:379
+#: io.c:272
#, c-format
msgid "command line argument `%s' is a directory: skipped"
msgstr ""
-#: io.c:413
+#: io.c:275 io.c:372
#, fuzzy, c-format
msgid "cannot open file `%s' for reading (%s)"
msgstr "Gufungura IDOSIYE kugirango"
-#: io.c:459 io.c:2999
+#: io.c:419
#, fuzzy, c-format
msgid "error reading input file `%s': %s"
msgstr "Ikosa Iyinjiza IDOSIYE"
-#: io.c:506
+#: io.c:470
#, fuzzy, c-format
msgid "close of fd %d (`%s') failed (%s)"
msgstr "Gufunga Bya Byanze"
-#: io.c:617
-msgid "redirection not allowed in sandbox mode"
-msgstr ""
-
-#: io.c:648
-#, fuzzy, c-format
-msgid "invalid tree type %s in redirect()"
-msgstr "Sibyo Ubwoko in"
-
-#: io.c:654
+#: io.c:577
#, fuzzy, c-format
msgid "expression in `%s' redirection only has numeric value"
msgstr "imvugo in Bikurikije umubare Agaciro"
-#: io.c:660
+#: io.c:583
#, fuzzy, c-format
msgid "expression for `%s' redirection has null string value"
msgstr "imvugo kugirango NTAGIHARI Ikurikiranyanyuguti Agaciro"
-#: io.c:665
+#: io.c:589
#, fuzzy, c-format
msgid "filename `%s' for `%s' redirection may be result of logical expression"
msgstr ""
"Izina ry'idosiye: kugirango Gicurasi Igisubizo Bya Bijyanye n'inyurabwenge "
"imvugo"
-#: io.c:707
+#: io.c:628
#, fuzzy, c-format
msgid "unnecessary mixing of `>' and `>>' for file `%.*s'"
msgstr "Bya Na kugirango IDOSIYE"
-#: io.c:754
+#: io.c:681
#, fuzzy, c-format
msgid "can't open pipe `%s' for output (%s)"
msgstr "Gufungura kugirango Ibisohoka"
-#: io.c:763
+#: io.c:691
#, fuzzy, c-format
msgid "can't open pipe `%s' for input (%s)"
msgstr "Gufungura kugirango Iyinjiza"
-#: io.c:786
+#: io.c:712
#, fuzzy, c-format
msgid "can't open two way pipe `%s' for input/output (%s)"
msgstr "Gufungura kugirango Iyinjiza Ibisohoka"
-#: io.c:864
+#: io.c:794
#, fuzzy, c-format
msgid "can't redirect from `%s' (%s)"
msgstr "Bivuye"
-#: io.c:867
+#: io.c:797
#, fuzzy, c-format
msgid "can't redirect to `%s' (%s)"
msgstr "Kuri"
-#: io.c:920
+#: io.c:846
#, fuzzy
msgid ""
"reached system limit for open files: starting to multiplex file descriptors"
msgstr "Sisitemu kugirango Gufungura Idosiye Kuri IDOSIYE"
-#: io.c:936
+#: io.c:862
#, fuzzy, c-format
msgid "close of `%s' failed (%s)."
msgstr "Gufunga Bya Byanze"
-#: io.c:944
+#: io.c:870
#, fuzzy
msgid "too many pipes or input files open"
msgstr "Cyangwa Iyinjiza Idosiye Gufungura"
-#: io.c:967
+#: io.c:892
#, fuzzy
msgid "close: second argument must be `to' or `from'"
msgstr "Gufunga ISEGONDA Cyangwa"
-#: io.c:981
+#: io.c:909
#, fuzzy, c-format
msgid "close: `%.*s' is not an open file, pipe or co-process"
msgstr "Gufunga."
-#: io.c:986
+#: io.c:914
#, fuzzy
msgid "close of redirection that was never opened"
msgstr "Gufunga Bya Nta narimwe"
-#: io.c:1083
+#: io.c:1011
#, fuzzy, c-format
msgid "close: redirection `%s' not opened with `|&', second argument ignored"
msgstr "Gufunga OYA Na: ISEGONDA"
-#: io.c:1099
+#: io.c:1027
#, fuzzy, c-format
msgid "failure status (%d) on pipe close of `%s' (%s)"
msgstr "Imimerere ku Gufunga Bya"
-#: io.c:1102
+#: io.c:1030
#, fuzzy, c-format
msgid "failure status (%d) on file close of `%s' (%s)"
msgstr "Imimerere ku IDOSIYE Gufunga Bya"
-#: io.c:1122
+#: io.c:1050
#, fuzzy, c-format
msgid "no explicit close of socket `%s' provided"
msgstr "Oya Gufunga Bya"
-#: io.c:1125
+#: io.c:1053
#, fuzzy, c-format
msgid "no explicit close of co-process `%s' provided"
msgstr "Oya Gufunga Bya"
-#: io.c:1128
+#: io.c:1056
#, fuzzy, c-format
msgid "no explicit close of pipe `%s' provided"
msgstr "Oya Gufunga Bya"
-#: io.c:1131
+#: io.c:1059
#, fuzzy, c-format
msgid "no explicit close of file `%s' provided"
msgstr "Oya Gufunga Bya IDOSIYE"
-#: io.c:1159 io.c:1214 main.c:832 main.c:874
+#: io.c:1087 io.c:1142 main.c:823 main.c:865
#, fuzzy, c-format
msgid "error writing standard output (%s)"
msgstr "Ikosa Bisanzwe Ibisohoka"
-#: io.c:1163 io.c:1219
+#: io.c:1091 io.c:1147
#, fuzzy, c-format
msgid "error writing standard error (%s)"
msgstr "Ikosa Bisanzwe Ikosa"
-#: io.c:1171
+#: io.c:1099
#, fuzzy, c-format
msgid "pipe flush of `%s' failed (%s)."
msgstr "Bya Byanze"
-#: io.c:1174
+#: io.c:1102
#, fuzzy, c-format
msgid "co-process flush of pipe to `%s' failed (%s)."
msgstr "Bya Kuri Byanze"
-#: io.c:1177
+#: io.c:1105
#, fuzzy, c-format
msgid "file flush of `%s' failed (%s)."
msgstr "IDOSIYE Bya Byanze"
-#: io.c:1292
+#: io.c:1219
#, fuzzy, c-format
msgid "local port %s invalid in `/inet'"
msgstr "Umuyoboro Sibyo in"
-#: io.c:1309
+#: io.c:1236
#, c-format
msgid "remote host and port information (%s, %s) invalid"
msgstr ""
-#: io.c:1344
+#: io.c:1276
#, fuzzy
msgid "/inet/raw client not ready yet, sorry"
msgstr "/Umukiriya OYA Cyiteguye"
-#: io.c:1347 io.c:1383
+#: io.c:1279 io.c:1320
#, fuzzy
msgid "only root may use `/inet/raw'."
msgstr "Imizi Gicurasi Gukoresha"
-#: io.c:1381
+#: io.c:1318
#, fuzzy
msgid "/inet/raw server not ready yet, sorry"
msgstr "/Seriveri OYA Cyiteguye"
-#: io.c:1477
+#: io.c:1417
#, fuzzy, c-format
msgid "no (known) protocol supplied in special filename `%s'"
msgstr "Oya Porotokole in Bidasanzwe Izina ry'idosiye:"
-#: io.c:1491
+#: io.c:1431
#, fuzzy, c-format
msgid "special file name `%s' is incomplete"
msgstr "Bidasanzwe IDOSIYE Izina: ni"
-#: io.c:1506
+#: io.c:1447
#, fuzzy
msgid "must supply a remote hostname to `/inet'"
msgstr "a Izina ry'inturo: Kuri"
-#: io.c:1524
+#: io.c:1465
#, fuzzy
msgid "must supply a remote port to `/inet'"
msgstr "a Umuyoboro Kuri"
-#: io.c:1570
+#: io.c:1511
#, fuzzy
msgid "TCP/IP communications are not supported"
msgstr "OYA"
-#: io.c:1758
+#: io.c:1698
#, fuzzy, c-format
msgid "could not open `%s', mode `%s'"
msgstr "OYA Gufungura Ubwoko"
-#: io.c:1809
+#: io.c:1749
#, fuzzy, c-format
msgid "close of master pty failed (%s)"
msgstr "Gufunga Bya Mugenga Byanze"
-#: io.c:1811 io.c:1963 io.c:2114
+#: io.c:1751 io.c:1918 io.c:2075
#, fuzzy, c-format
msgid "close of stdout in child failed (%s)"
msgstr "Gufunga Bya in Byanze"
-#: io.c:1814
+#: io.c:1754
#, fuzzy, c-format
msgid "moving slave pty to stdout in child failed (dup: %s)"
msgstr "Kuri in Byanze"
-#: io.c:1816 io.c:1968
+#: io.c:1756 io.c:1923
#, fuzzy, c-format
msgid "close of stdin in child failed (%s)"
msgstr "Gufunga Bya in Byanze"
-#: io.c:1819
+#: io.c:1759
#, fuzzy, c-format
msgid "moving slave pty to stdin in child failed (dup: %s)"
msgstr "Kuri in Byanze"
-#: io.c:1821 io.c:1840
+#: io.c:1761 io.c:1782
#, fuzzy, c-format
msgid "close of slave pty failed (%s)"
msgstr "Gufunga Bya Byanze"
-#: io.c:1914 io.c:1966 io.c:2095 io.c:2117
+#: io.c:1860 io.c:1921 io.c:2053 io.c:2078
#, fuzzy, c-format
msgid "moving pipe to stdout in child failed (dup: %s)"
msgstr "Kuri in Byanze"
-#: io.c:1918 io.c:1971
+#: io.c:1867 io.c:1926
#, fuzzy, c-format
msgid "moving pipe to stdin in child failed (dup: %s)"
msgstr "Kuri in Byanze"
-#: io.c:1935 io.c:2108
+#: io.c:1887 io.c:2068
#, fuzzy
msgid "restoring stdout in parent process failed\n"
msgstr "in"
-#: io.c:1940
+#: io.c:1895
#, fuzzy
msgid "restoring stdin in parent process failed\n"
msgstr "in"
-#: io.c:1974 io.c:2119 io.c:2130
+#: io.c:1929 io.c:2080 io.c:2094
#, fuzzy, c-format
msgid "close of pipe failed (%s)"
msgstr "Gufunga Bya Byanze"
-#: io.c:2019
+#: io.c:1974
#, fuzzy
msgid "`|&' not supported"
msgstr "`|&'OYA"
-#: io.c:2085
+#: io.c:2040
#, fuzzy, c-format
msgid "cannot open pipe `%s' (%s)"
msgstr "Gufungura"
-#: io.c:2126
+#: io.c:2088
#, fuzzy, c-format
msgid "cannot create child process for `%s' (fork: %s)"
msgstr "Kurema kugirango"
-#: io.c:2518
+#: io.c:2577
#, fuzzy, c-format
msgid "data file `%s' is empty"
msgstr "Ibyatanzwe IDOSIYE ni ubusa"
-#: io.c:2560 io.c:2568
+#: io.c:2618 io.c:2626
#, fuzzy
msgid "could not allocate more input memory"
msgstr "OYA Birenzeho Iyinjiza Ububiko"
-#: io.c:3125
+#: io.c:3173
#, fuzzy
msgid "multicharacter value of `RS' is a gawk extension"
msgstr "Agaciro Bya ni a Umugereka"
-#: main.c:313
+#: main.c:311
msgid "out of memory"
msgstr ""
-#: main.c:381
+#: main.c:388
#, fuzzy
msgid "`-m[fr]' option irrelevant in gawk"
msgstr "`-M Ihitamo in"
-#: main.c:383
+#: main.c:390
#, fuzzy
msgid "-m option usage: `-m[fr] nnn'"
msgstr "-M Ihitamo Ikoresha: M"
-#: main.c:419
+#: main.c:426
#, fuzzy
msgid "empty argument to `-e/--source' ignored"
msgstr "ubusa Kuri"
-#: main.c:485
+#: main.c:492
#, fuzzy, c-format
msgid "%s: option `-W %s' unrecognized, ignored\n"
msgstr "%s:Ihitamo"
-#: main.c:530
+#: main.c:545
#, fuzzy, c-format
msgid "%s: option requires an argument -- %c\n"
msgstr "%s:Ihitamo"
-#: main.c:551
+#: main.c:566
#, fuzzy
msgid "environment variable `POSIXLY_CORRECT' set: turning on `--posix'"
msgstr "IMPINDURAGACIRO Gushyiraho ku"
-#: main.c:557
+#: main.c:572
msgid "`--posix' overrides `--traditional'"
msgstr ""
-#: main.c:568
+#: main.c:583
#, fuzzy
msgid "`--posix'/`--traditional' overrides `--non-decimal-data'"
msgstr "`--NYACUMI"
-#: main.c:572
+#: main.c:587
#, fuzzy, c-format
msgid "running %s setuid root may be a security problem"
msgstr "Imizi Gicurasi a Umutekano"
-#: main.c:577
+#: main.c:592
#, fuzzy
msgid "`--posix' overrides `--binary'"
msgstr "`--NYACUMI"
-#: main.c:622
+#: main.c:643
#, fuzzy, c-format
msgid "can't set binary mode on stdin (%s)"
msgstr "Gushyiraho Nyabibiri Ubwoko ku"
-#: main.c:625
+#: main.c:646
#, fuzzy, c-format
msgid "can't set binary mode on stdout (%s)"
msgstr "Gushyiraho Nyabibiri Ubwoko ku"
-#: main.c:627
+#: main.c:648
#, fuzzy, c-format
msgid "can't set binary mode on stderr (%s)"
msgstr "Gushyiraho Nyabibiri Ubwoko ku"
-#: main.c:668
+#: main.c:687
#, fuzzy
msgid "no program text at all!"
msgstr "Oya Porogaramu Umwandiko ku Byose"
-#: main.c:773
+#: main.c:762
#, fuzzy, c-format
msgid "Usage: %s [POSIX or GNU style options] -f progfile [--] file ...\n"
msgstr "Cyangwa IMISUSIRE Amahitamo F IDOSIYE"
-#: main.c:775
+#: main.c:764
#, fuzzy, c-format
msgid "Usage: %s [POSIX or GNU style options] [--] %cprogram%c file ...\n"
msgstr "Cyangwa IMISUSIRE Amahitamo IDOSIYE"
-#: main.c:780
+#: main.c:769
#, fuzzy
msgid "POSIX options:\t\tGNU long options: (standard)\n"
msgstr "Amahitamo Amahitamo"
-#: main.c:781
+#: main.c:770
#, fuzzy
msgid "\t-f progfile\t\t--file=progfile\n"
msgstr "-F IDOSIYE"
-#: main.c:782
+#: main.c:771
#, fuzzy
msgid "\t-F fs\t\t\t--field-separator=fs\n"
msgstr "-Umwanya Mutandukanya"
-#: main.c:783
+#: main.c:772
#, fuzzy
msgid "\t-v var=val\t\t--assign=var=val\n"
msgstr "-v VAR Kugenera... VAR"
-#: main.c:784
+#: main.c:773
#, fuzzy
-msgid "POSIX options:\t\tGNU long options: (extensions)\n"
+msgid "Short options:\t\tGNU long options: (extensions)\n"
msgstr "Amahitamo Amahitamo"
-#: main.c:785
+#: main.c:774
#, fuzzy
msgid "\t-m[fr] val\n"
msgstr "-M"
-#: main.c:786
+#: main.c:775
msgid "\t-b\t\t\t--characters-as-bytes\n"
msgstr ""
-#: main.c:787
-msgid "\t-c\t\t\t--compat, --traditional\n"
+#: main.c:776
+msgid "\t-c\t\t\t--traditional\n"
msgstr ""
-#: main.c:788
-msgid "\t-C\t\t\t--copyleft, --copyright\n"
+#: main.c:777
+msgid "\t-C\t\t\t--copyright\n"
msgstr ""
-#: main.c:789
+#: main.c:778
#, fuzzy
msgid "\t-d [file]\t\t--dump-variables[=file]\n"
msgstr "-Ibihinduka IDOSIYE Ibihinduka IDOSIYE"
-#: main.c:790
+#: main.c:779
#, fuzzy
msgid "\t-e 'program-text'\t--source='program-text'\n"
msgstr "-Inkomoko Porogaramu Inkomoko Porogaramu"
-#: main.c:791
+#: main.c:780
#, fuzzy
msgid "\t-E file\t\t\t--exec=file\n"
msgstr "-Ibijyana IDOSIYE Ibijyana IDOSIYE"
-#: main.c:792
+#: main.c:781
msgid "\t-g\t\t\t--gen-pot\n"
msgstr ""
-#: main.c:793
-msgid "\t-h\t\t\t--help, --usage\n"
-msgstr ""
-
-#: main.c:794
-msgid "\t-l [fatal]\t\t--lint[=fatal]\n"
+#: main.c:782
+msgid "\t-h\t\t\t--help\n"
msgstr ""
-#: main.c:795
-msgid "\t-L\t\t\t--lint-old\n"
-msgstr ""
+#: main.c:783
+#, fuzzy
+msgid "\t-L [fatal]\t\t--lint[=fatal]\n"
+msgstr "-Ibijyana IDOSIYE Ibijyana IDOSIYE"
-#: main.c:796
+#: main.c:784
#, fuzzy
msgid "\t-n\t\t\t--non-decimal-data\n"
msgstr "-NYACUMI NYACUMI"
-#: main.c:797
+#: main.c:785
msgid "\t-N\t\t\t--use-lc-numeric\n"
msgstr ""
-#: main.c:798
+#: main.c:786
msgid "\t-O\t\t\t--optimize\n"
msgstr ""
-#: main.c:799
+#: main.c:787
#, fuzzy
msgid "\t-p [file]\t\t--profile[=file]\n"
msgstr "-Ibijyana IDOSIYE Ibijyana IDOSIYE"
-#: main.c:800
+#: main.c:788
msgid "\t-P\t\t\t--posix\n"
msgstr ""
-#: main.c:801
+#: main.c:789
msgid "\t-r\t\t\t--re-interval\n"
msgstr ""
-#: main.c:802
+#: main.c:791
+#, fuzzy
+msgid "\t-R file\t\t\t--command=file\n"
+msgstr "-Ibijyana IDOSIYE Ibijyana IDOSIYE"
+
+#: main.c:792
msgid "\t-S\t\t\t--sandbox\n"
msgstr ""
-#: main.c:803
+#: main.c:793
+msgid "\t-t\t\t\t--lint-old\n"
+msgstr ""
+
+#: main.c:794
msgid "\t-V\t\t\t--version\n"
msgstr ""
-#: main.c:805
+#: main.c:796
msgid "\t-W nostalgia\t\t--nostalgia\n"
msgstr ""
-#: main.c:808
-msgid "\t-W parsedebug\t\t--parsedebug\n"
+#: main.c:799
+msgid "\t-Y\t\t--parsedebug\n"
msgstr ""
#. TRANSLATORS: --help output 5 (end)
@@ -1862,7 +1777,7 @@ msgstr ""
#. for this application. Please add _another line_ with the
#. address for translation bugs.
#. no-wrap
-#: main.c:817
+#: main.c:808
#, fuzzy
msgid ""
"\n"
@@ -1871,7 +1786,7 @@ msgid ""
"\n"
msgstr "Icyegeranyo in Na in i Byacapwe Verisiyo"
-#: main.c:821
+#: main.c:812
#, fuzzy
msgid ""
"gawk is a pattern scanning and processing language.\n"
@@ -1881,7 +1796,7 @@ msgstr ""
"ni a Ishusho Na Inonosora Ururimi Mburabuzi Bisanzwe Iyinjiza Na Bisanzwe "
"Ibisohoka"
-#: main.c:825
+#: main.c:816
#, fuzzy
msgid ""
"Examples:\n"
@@ -1889,7 +1804,7 @@ msgid ""
"\tgawk -F: '{ print $1 }' /etc/passwd\n"
msgstr "Igiteranyo Gucapa Igiteranyo Gucapa"
-#: main.c:845
+#: main.c:836
#, fuzzy, c-format
msgid ""
"Copyright (C) 1989, 1991-%d Free Software Foundation.\n"
@@ -1903,7 +1818,7 @@ msgstr ""
"C Porogaramu ni Kigenga Na Cyangwa i Bya i Nka Verisiyo 3. Bya i ku Ihitamo "
"Verisiyo"
-#: main.c:853
+#: main.c:844
#, fuzzy
msgid ""
"This program is distributed in the hope that it will be useful,\n"
@@ -1914,7 +1829,7 @@ msgid ""
msgstr ""
"Porogaramu ni in i ATARIIGIHARWE i Cyangwa A kugirango Birenzeho Birambuye"
-#: main.c:864
+#: main.c:855
#, fuzzy
msgid ""
"You should have received a copy of the GNU General Public License\n"
@@ -1922,208 +1837,173 @@ msgid ""
msgstr ""
"BYAKIRIWE a Gukoporora Bya i Na: iyi Porogaramu NIBA OYA Kwandika Kuri i"
-#: main.c:899
+#: main.c:890
#, fuzzy
msgid "-Ft does not set FS to tab in POSIX awk"
msgstr "-OYA Gushyiraho Kuri Isunika in"
-#: main.c:1116
+#: main.c:1122
#, c-format
msgid "unknown value for field spec: %d\n"
msgstr ""
-#: main.c:1176
+#: main.c:1182
#, fuzzy, c-format
msgid ""
"%s: `%s' argument to `-v' not in `var=value' form\n"
"\n"
msgstr "%s:`%s'Kuri OYA in VAR"
-#: main.c:1196
+#: main.c:1202
#, fuzzy, c-format
msgid "`%s' is not a legal variable name"
msgstr "`%s'ni OYA a By'amategeko IMPINDURAGACIRO Izina:"
-#: main.c:1199
+#: main.c:1205
#, fuzzy, c-format
msgid "`%s' is not a variable name, looking for file `%s=%s'"
msgstr "`%s'ni OYA a IMPINDURAGACIRO Izina: kugirango IDOSIYE"
-#: main.c:1238
+#: main.c:1258
#, fuzzy
msgid "floating point exception"
msgstr "Bihindagurika Akadomo Irengayobora(-)"
-#: main.c:1245
+#: main.c:1265
#, fuzzy
msgid "fatal error: internal error"
msgstr "Ikosa By'imbere Ikosa"
-#: main.c:1260
+#: main.c:1280
#, fuzzy
msgid "fatal error: internal error: segfault"
msgstr "Ikosa By'imbere Ikosa"
-#: main.c:1272
+#: main.c:1292
#, fuzzy
msgid "fatal error: internal error: stack overflow"
msgstr "Ikosa By'imbere Ikosa"
-#: main.c:1322
+#: main.c:1342
#, fuzzy, c-format
msgid "no pre-opened fd %d"
msgstr "Oya Byahawe imiterere mbere"
-#: main.c:1329
+#: main.c:1349
#, fuzzy, c-format
msgid "could not pre-open /dev/null for fd %d"
msgstr "OYA Byahawe imiterere mbere Gufungura NTAGIHARI kugirango"
-#: main.c:1352 main.c:1361
+#: main.c:1372 main.c:1381
#, fuzzy, c-format
msgid "could not find groups: %s"
msgstr "OYA Gushaka Amatsinda"
-#: msg.c:54
+#: msg.c:62
#, fuzzy, c-format
msgid "cmd. line:"
msgstr "Cmd+."
-#: msg.c:120
+#: msg.c:97
#, fuzzy
msgid "warning: "
msgstr "Iburira!"
# starmath/source\smres.src:RID_ERR_IDENT.text
-#: msg.c:142
+#: msg.c:106
#, fuzzy
msgid "error: "
msgstr "IKOSA"
-#: msg.c:178
+#: msg.c:129
msgid "fatal: "
msgstr ""
-#: node.c:63 node.c:78 node.c:105 node.c:121 node.c:151
-#, fuzzy
-msgid "can't convert string to float"
-msgstr "GUHINDURA Ikurikiranyanyuguti Kuri Kureremba"
-
-#: node.c:465
+#: node.c:401
#, fuzzy
msgid "backslash at end of string"
msgstr "ku Impera Bya Ikurikiranyanyuguti"
-#: node.c:609
+#: node.c:502
#, fuzzy, c-format
msgid "old awk does not support the `\\%c' escape sequence"
msgstr "ki/ bishaje OYA Gushigikira Mukoresha"
-#: node.c:660
+#: node.c:553
#, fuzzy
msgid "POSIX does not allow `\\x' escapes"
msgstr "OYA Kwemerera"
-#: node.c:666
+#: node.c:559
#, fuzzy
msgid "no hex digits in `\\x' escape sequence"
msgstr "Oya in"
-#: node.c:688
+#: node.c:581
#, c-format
msgid ""
"hex escape \\x%.*s of %d characters probably not interpreted the way you "
"expect"
msgstr ""
-#: node.c:703
+#: node.c:596
#, fuzzy, c-format
msgid "escape sequence `\\%c' treated as plain `%c'"
msgstr "Nka Byuzuye"
+#: node.c:737
+msgid ""
+"Invalid multibyte data detected. There may be a mismatch between your data "
+"and your locale."
+msgstr ""
+
#: posix/gawkmisc.c:172
#, fuzzy, c-format
msgid "%s %s `%s': could not set close-on-exec: (fcntl: %s)"
msgstr "%s%s`%s':OYA Gushyiraho Gufunga ku"
-#: profile.c:94
+#: profile.c:83
#, fuzzy, c-format
msgid "could not open `%s' for writing: %s"
msgstr "OYA Gufungura kugirango"
-#: profile.c:457
-#, fuzzy, c-format
-msgid "internal error: %s with null vname"
-msgstr "By'imbere Ikosa Na: NTAGIHARI"
-
-#: profile.c:522
-#, fuzzy
-msgid "# treated internally as `delete'"
-msgstr "#Nka"
-
-#: profile.c:1076
-#, fuzzy, c-format
-msgid "# this is a dynamically loaded extension function"
-msgstr "#iyi ni a Umugereka Umumaro"
-
-#: profile.c:1109
-#, fuzzy, c-format
-msgid "\t# gawk profile, created %s\n"
-msgstr "#Ibijyana Byaremwe"
-
-#: profile.c:1112
-#, fuzzy, c-format
-msgid ""
-"\t# BEGIN block(s)\n"
-"\n"
-msgstr "#Funga S"
-
-#: profile.c:1122
+#: profile.c:203
#, fuzzy, c-format
msgid ""
-"\t# BEGINFILE block(s)\n"
+"\t# %s block(s)\n"
"\n"
msgstr "#Funga S"
-#: profile.c:1132
+#: profile.c:208
#, fuzzy, c-format
msgid ""
-"\t# Rule(s)\n"
+"\t# %s(s)\n"
"\n"
msgstr "#S"
-#: profile.c:1138
+#: profile.c:278
#, fuzzy, c-format
-msgid ""
-"\t# ENDFILE block(s)\n"
-"\n"
-msgstr "#Funga S"
+msgid "internal error: %s with null vname"
+msgstr "By'imbere Ikosa Na: NTAGIHARI"
-#: profile.c:1148
+#: profile.c:945
#, fuzzy, c-format
-msgid ""
-"\t# END block(s)\n"
-"\n"
-msgstr "#Funga S"
+msgid "\t# gawk profile, created %s\n"
+msgstr "#Ibijyana Byaremwe"
-#: profile.c:1168
+#: profile.c:1328
#, c-format
msgid ""
"\n"
"\t# Functions, listed alphabetically\n"
msgstr ""
-#: profile.c:1431
-#, fuzzy, c-format
-msgid "unexpected type %s in prec_level"
-msgstr "Ubwoko in"
-
-#: profile.c:1557
-#, fuzzy, c-format
-msgid "Unknown node type %s in pp_var"
-msgstr "Kitazwi"
+#: profile.c:1367
+#, c-format
+msgid "redir2str: unknown redirection type %d"
+msgstr ""
-#: re.c:537
+#: re.c:559
#, c-format
msgid "regexp component `%.*s' should probably be `[%.*s]'"
msgstr ""
@@ -2209,38 +2089,42 @@ msgstr "imvugo"
msgid "Unmatched ) or \\)"
msgstr "Cyangwa"
-#: regcomp.c:699
+#: regcomp.c:701
#, fuzzy
msgid "No previous regular expression"
msgstr "Ibanjirije Ibisanzwe imvugo"
#, fuzzy
-#~ msgid "%s: illegal option -- %c\n"
-#~ msgstr "%s:Ihitamo"
+#~ msgid "call of `length' without parentheses is deprecated by POSIX"
+#~ msgstr "Bya ni Bitemewe. ku"
#, fuzzy
-#~ msgid "file `%s' is a directory"
-#~ msgstr "IDOSIYE ni a bushyinguro"
+#~ msgid "reference to uninitialized field `$%s'"
+#~ msgstr "Indango Kuri Itatangijwe Umwanya"
#, fuzzy
-#~ msgid "can't open two way socket `%s' for input/output (%s)"
-#~ msgstr "Gufungura kugirango Iyinjiza Ibisohoka"
+#~ msgid "can't convert string to float"
+#~ msgstr "GUHINDURA Ikurikiranyanyuguti Kuri Kureremba"
#, fuzzy
-#~ msgid "seek: invalid arguments"
-#~ msgstr "Oya ingingo"
+#~ msgid "`continue' outside a loop is not portable"
+#~ msgstr "`Hanze a ni OYA"
#, fuzzy
-#~ msgid "seek: `%.*s' is not an open file, pipe, or co-process"
-#~ msgstr "Gufunga."
+#~ msgid "`break' outside a loop is not portable"
+#~ msgstr "`Hanze a ni OYA"
#, fuzzy
-#~ msgid "seek: `%.*s' is not an input file, pipe, or co-process"
-#~ msgstr "Gufunga."
+#~ msgid "`nextfile' cannot be called from a BEGIN rule"
+#~ msgstr "`Bivuye a"
#, fuzzy
-#~ msgid "seek: `%.*s' is not a regular file"
-#~ msgstr "`%s'ni OYA a By'amategeko IMPINDURAGACIRO Izina:"
+#~ msgid "`next' cannot be called from a BEGIN rule"
+#~ msgstr "`Bivuye a"
+
+#, fuzzy
+#~ msgid "file `%s' is a directory"
+#~ msgstr "IDOSIYE ni a bushyinguro"
#, fuzzy
#~ msgid "use `PROCINFO[\"%s\"]' instead of `%s'"
@@ -2251,6 +2135,122 @@ msgstr "Ibanjirije Ibisanzwe imvugo"
#~ msgstr "Gukoresha Bya"
#, fuzzy
+#~ msgid ""
+#~ "\t# BEGIN block(s)\n"
+#~ "\n"
+#~ msgstr "#Funga S"
+
+#, fuzzy
+#~ msgid "must use `count$' on all formats or none"
+#~ msgstr "Gukoresha IBARA ku Byose Imiterere Cyangwa Ntacyo"
+
+#, fuzzy
+#~ msgid "`$' is not permitted in awk formats"
+#~ msgstr "`$'ni OYA in Imiterere"
+
+#, fuzzy
+#~ msgid "arg count with `$' must be > 0"
+#~ msgstr "IBARA Na: 0"
+
+#, fuzzy
+#~ msgid "arg count %ld greater than total number of supplied arguments"
+#~ msgstr "IBARA Biruta Igiteranyo Umubare Bya ingingo"
+
+#, fuzzy
+#~ msgid "`$' not permitted after period in format"
+#~ msgstr "`$'OYA Nyuma Igihe in Imiterere"
+
+#, fuzzy
+#~ msgid "no `$' supplied for positional field width or precision"
+#~ msgstr "Oya kugirango Umwanya Ubugari Cyangwa"
+
+#, fuzzy
+#~ msgid "`l' is meaningless in awk formats; ignored"
+#~ msgstr "`ni in Imiterere"
+
+#, fuzzy
+#~ msgid "`l' is not permitted in POSIX awk formats"
+#~ msgstr "`ni OYA in Imiterere"
+
+#, fuzzy
+#~ msgid "`L' is meaningless in awk formats; ignored"
+#~ msgstr "`ni in Imiterere"
+
+#, fuzzy
+#~ msgid "`L' is not permitted in POSIX awk formats"
+#~ msgstr "`ni OYA in Imiterere"
+
+#, fuzzy
+#~ msgid "`h' is meaningless in awk formats; ignored"
+#~ msgstr "`ni in Imiterere"
+
+#, fuzzy
+#~ msgid "`h' is not permitted in POSIX awk formats"
+#~ msgstr "`ni OYA in Imiterere"
+
+#, fuzzy
+#~ msgid "[s]printf: value %g is out of range for `%%%c' format"
+#~ msgstr "[S Agaciro ni Inyuma Bya Urutonde kugirango Imiterere"
+
+#, fuzzy
+#~ msgid "not enough arguments to satisfy format string"
+#~ msgstr "OYA ingingo Kuri Imiterere Ikurikiranyanyuguti"
+
+#, fuzzy
+#~ msgid "^ ran out for this one"
+#~ msgstr "^Inyuma kugirango iyi"
+
+#, fuzzy
+#~ msgid "[s]printf: format specifier does not have control letter"
+#~ msgstr "[S Imiterere OYA Igenzura Ibaruwa..."
+
+#, fuzzy
+#~ msgid "too many arguments supplied for format string"
+#~ msgstr "ingingo kugirango Imiterere Ikurikiranyanyuguti"
+
+#, fuzzy
+#~ msgid "attempt to use array parameter `%s' in a scalar context"
+#~ msgstr "Kuri Gukoresha Imbonerahamwe in a Imvugiro"
+
+#, fuzzy
+#~ msgid "can't open two way socket `%s' for input/output (%s)"
+#~ msgstr "Gufungura kugirango Iyinjiza Ibisohoka"
+
+#, fuzzy
+#~ msgid ""
+#~ "concatenation: side effects in one expression have changed the length of "
+#~ "another!"
+#~ msgstr "Ingaruka in imvugo Byahinduwe i Uburebure Bya"
+
+#, fuzzy
+#~ msgid "illegal type (%s) in tree_eval"
+#~ msgstr "Ubwoko in"
+
+#, fuzzy
+#~ msgid "invalid tree type %s in redirect()"
+#~ msgstr "Sibyo Ubwoko in"
+
+#, fuzzy
+#~ msgid "# treated internally as `delete'"
+#~ msgstr "#Nka"
+
+#, fuzzy
+#~ msgid "# this is a dynamically loaded extension function"
+#~ msgstr "#iyi ni a Umugereka Umumaro"
+
+#, fuzzy
+#~ msgid "unexpected type %s in prec_level"
+#~ msgstr "Ubwoko in"
+
+#, fuzzy
+#~ msgid "Unknown node type %s in pp_var"
+#~ msgstr "Kitazwi"
+
+#, fuzzy
+#~ msgid "%s: illegal option -- %c\n"
+#~ msgstr "%s:Ihitamo"
+
+#, fuzzy
#~ msgid "function %s called\n"
#~ msgstr "Umumaro"
diff --git a/po/sv.gmo b/po/sv.gmo
index e4e16369..ef16d3be 100644
--- a/po/sv.gmo
+++ b/po/sv.gmo
Binary files differ
diff --git a/po/sv.po b/po/sv.po
index 959be96e..97ab3bb7 100644
--- a/po/sv.po
+++ b/po/sv.po
@@ -1,661 +1,643 @@
# Swedish translation of gawk
# Copyright (C) 2003 Free Software Foundation, Inc.
+# This file is distributed under the same license as the gawk package.
# Martin Sjögren <md9ms@mdstud.chalmers.se>, 2001-2002.
-#
-# $Id: sv.po,v 1.6 2010/05/06 19:01:21 arnold Exp $
+# Christer Andersson <klamm@comhem.se>, 2007.
#
msgid ""
msgstr ""
-"Project-Id-Version: gawk 3.1.1m\n"
+"Project-Id-Version: gawk 3.1.6\n"
"Report-Msgid-Bugs-To: arnold@skeeve.com\n"
-"POT-Creation-Date: 2010-11-12 12:20+0200\n"
-"PO-Revision-Date: 2003-02-27 19:54+0100\n"
-"Last-Translator: Martin Sjögren <md9ms@mdstud.chalmers.se>\n"
-"Language-Team: Swedish <sv@li.org>\n"
+"POT-Creation-Date: 2010-11-17 08:48+0200\n"
+"PO-Revision-Date: 2008-01-16 05:30+0100\n"
+"Last-Translator: Christer Andersson <klamm@comhem.se>\n"
+"Language-Team: Swedish <tp-sv@listor.tp-sv.se>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=iso-8859-1\n"
"Content-Transfer-Encoding: 8bit\n"
-#: array.c:112
-#, fuzzy, c-format
+#: array.c:103
+#, c-format
+msgid "from %s"
+msgstr "från %s"
+
+#: array.c:267
+#, fuzzy
+msgid "attempt to use a scalar value as array"
+msgstr "försök att använda skalären \"%s\" som vektor"
+
+#: array.c:270
+#, c-format
msgid "attempt to use function `%s' as an array"
msgstr "försök att använda funktionen \"%s\" som vektor"
-#: array.c:115
+#: array.c:273
#, c-format
msgid "attempt to use scalar parameter `%s' as an array"
msgstr "försök att använda skalärparametern \"%s\" som en vektor"
-#: array.c:118
+#: array.c:276
#, c-format
msgid "attempt to use scalar `%s' as array"
msgstr "försök att använda skalären \"%s\" som vektor"
-#: array.c:156
+#: array.c:321 array.c:648 eval.c:1075 eval.c:1079 eval.c:1581 eval.c:1649
+#: eval.c:1928
#, c-format
-msgid "from %s"
-msgstr "från %s"
+msgid "attempt to use array `%s' in a scalar context"
+msgstr "försök att använda vektorn \"%s\" i skalärsammanhang"
-#: array.c:513
+#: array.c:570
#, fuzzy, c-format
msgid "reference to uninitialized element `%s[\"%.*s\"]'"
msgstr "referens till ickeinitierat element \"%s[\"%s\"]\""
-#: array.c:519
+#: array.c:576
#, c-format
msgid "subscript of array `%s' is null string"
msgstr "index i vektorn \"%s\" är en tom sträng"
-#: array.c:623
+#: array.c:684
#, c-format
msgid "delete: index `%s' not in array `%s'"
msgstr "delete: index \"%s\" finns inte i vektorn \"%s\""
-#: array.c:792
+#: array.c:705
+#, fuzzy, c-format
+msgid "attempt to use scalar `%s[\"%.*s\"]' as an array"
+msgstr "försök att använda skalären \"%s\" som vektor"
+
+#: array.c:868
#, c-format
msgid "%s: empty (null)\n"
msgstr "%s: tom (null)\n"
-#: array.c:797
+#: array.c:873
#, c-format
msgid "%s: empty (zero)\n"
msgstr "%s: tom (noll)\n"
-#: array.c:801
+#: array.c:877
#, c-format
msgid "%s: table_size = %d, array_size = %d\n"
msgstr "%s: tabellstorlek = %d, vektorstorlek = %d\n"
-#: array.c:830
+#: array.c:912
#, c-format
msgid "%s: is parameter\n"
msgstr "%s: är en parameter\n"
-#: array.c:835
+#: array.c:916
#, c-format
msgid "%s: array_ref to %s\n"
msgstr "%s: vektorreferens till %s\n"
-#: awkgram.y:224 awkgram.y:227
+#: array.c:921
+#, fuzzy
+msgid "adump: argument not an array"
+msgstr "asort: första argumentet är inte en vektor"
+
+#: array.c:1139
+#, fuzzy
+msgid "attempt to use array in a scalar context"
+msgstr "försök att använda vektorn \"%s\" i skalärsammanhang"
+
+#: array.c:1236
+#, fuzzy
+msgid "asort: second argument not an array"
+msgstr "asort: andra argumentet är inte en vektor"
+
+#: array.c:1237
+#, fuzzy
+msgid "asorti: second argument not an array"
+msgstr "asort: andra argumentet är inte en vektor"
+
+#: array.c:1245
+#, fuzzy
+msgid "asort: first argument not an array"
+msgstr "asort: första argumentet är inte en vektor"
+
+#: array.c:1246
+#, fuzzy
+msgid "asorti: first argument not an array"
+msgstr "asort: första argumentet är inte en vektor"
+
+#: awkgram.y:246
#, c-format
msgid "%s blocks must have an action part"
msgstr "%s-block måste ha en åtgärdsdel"
-#: awkgram.y:230
+#: awkgram.y:249
msgid "each rule must have a pattern or an action part"
msgstr "varje regel måste ha ett mönster eller en åtgärdsdel"
-#: awkgram.y:266 awkgram.y:275
-#, fuzzy
+#: awkgram.y:320 awkgram.y:330
msgid "old awk does not support multiple `BEGIN' or `END' rules"
-msgstr "gamla awk stöder inte operatorn \"**\""
+msgstr "gamla awk stöder inte flera \"BEGIN\"- eller \"END\"-regler"
-#: awkgram.y:304
+#: awkgram.y:367
#, c-format
msgid "`%s' is a built-in function, it cannot be redefined"
msgstr "\"%s\" är en inbyggd funktion, den kan inte definieras om"
-#: awkgram.y:350
-#, fuzzy
+#: awkgram.y:427
msgid "regexp constant `//' looks like a C++ comment, but is not"
-msgstr "regexp-konstanten \"/%s/\" ser ut som en C-kommentar men är inte det"
+msgstr "regexp-konstanten \"//\" ser ut som en C++-kommentar men är inte det"
-#: awkgram.y:353
+#: awkgram.y:430
#, c-format
msgid "regexp constant `/%s/' looks like a C comment, but is not"
msgstr "regexp-konstanten \"/%s/\" ser ut som en C-kommentar men är inte det"
-#: awkgram.y:380 awkgram.y:692
-msgid "statement may have no effect"
-msgstr "kommandot kanske inte har någon effekt"
+#: awkgram.y:735
+#, fuzzy
+msgid "`break' is not allowed outside a loop or switch"
+msgstr "\"break\" utanför en slinga är inte tillåtet"
-#: awkgram.y:477 awkgram.y:480 awkgram.y:504 awkgram.y:511 awkgram.y:518
-#, c-format
-msgid "`%s' used in %s action"
+#: awkgram.y:744
+#, fuzzy
+msgid "`continue' is not allowed outside a loop"
+msgstr "\"continue\" utanför en slinga är inte tillåtet"
+
+#: awkgram.y:753
+#, fuzzy, c-format
+msgid "`next' used in %s action"
msgstr "\"%s\" använd i %s-åtgärden"
-#: awkgram.y:495 awkgram.y:499
+#: awkgram.y:767 awkgram.y:771
msgid "`nextfile' is a gawk extension"
msgstr "\"nextfile\" är en gawk-utökning"
-#: awkgram.y:528
+#: awkgram.y:775
+#, fuzzy, c-format
+msgid "`nextfile' used in %s action"
+msgstr "\"%s\" använd i %s-åtgärden"
+
+#: awkgram.y:799
msgid "`return' used outside function context"
msgstr "\"return\" använd utanför funktion"
-#: awkgram.y:570
+#: awkgram.y:859
msgid "plain `print' in BEGIN or END rule should probably be `print \"\"'"
msgstr ""
"ensamt \"print\" i BEGIN eller END-regel bör troligen vara 'print \"\"'"
-#: awkgram.y:586 awkgram.y:594
+#: awkgram.y:927 awkgram.y:935
msgid "`delete array' is a gawk extension"
msgstr "\"delete array\" är en gawk-utökning"
-#: awkgram.y:608 awkgram.y:616
+#: awkgram.y:955 awkgram.y:963
msgid "`delete(array)' is a non-portable tawk extension"
msgstr "\"delete(array)\" är en icke portabel tawk-utökning"
-#: awkgram.y:660
+#: awkgram.y:1004
#, c-format
msgid "duplicate case values in switch body: %s"
-msgstr ""
+msgstr "upprepade case-värden i switch-sats: %s"
-#: awkgram.y:670
-msgid "Duplicate `default' detected in switch body"
-msgstr ""
+#: awkgram.y:1014
+#, fuzzy
+msgid "duplicate `default' detected in switch body"
+msgstr "Flera \"default\"-fall upptäcktes i switch-sats"
-#: awkgram.y:759
+#: awkgram.y:1151
msgid "multistage two-way pipelines don't work"
msgstr "flerstegs dubbelriktade rör fungerar inte"
-#: awkgram.y:850
+#: awkgram.y:1253
msgid "regular expression on right of assignment"
msgstr "reguljärt uttryck i högerledet av en tilldelning"
-#: awkgram.y:860
+#: awkgram.y:1263
msgid "regular expression on left of `~' or `!~' operator"
msgstr "reguljärt uttryck på vänster sida om en \"~\"- eller \"!~\"-operator"
-#: awkgram.y:866 awkgram.y:954
-#, fuzzy
+#: awkgram.y:1278 awkgram.y:1423
msgid "old awk does not support the keyword `in' except after `for'"
msgstr "gamla awk stöder inte operatorn \"**\""
-#: awkgram.y:872
+#: awkgram.y:1287
msgid "regular expression on right of comparison"
msgstr "reguljärt uttryck i högerledet av en jämförelse"
-#: awkgram.y:936
+#: awkgram.y:1399
#, fuzzy, c-format
-msgid "`getline var' invalid inside %s rule"
+msgid "`getline var' invalid inside `%s' rule"
msgstr "fjärrporten ogiltig i \"%s\""
-#: awkgram.y:939
-#, c-format
-msgid "`getline' invalid inside %s rule"
-msgstr ""
+#: awkgram.y:1401
+#, fuzzy, c-format
+msgid "`getline' invalid inside `%s' rule"
+msgstr "fjärrporten ogiltig i \"%s\""
-#: awkgram.y:944
+#: awkgram.y:1407
msgid "non-redirected `getline' undefined inside END action"
msgstr "icke omdirigerad \"getline\" odefinierad inuti END-åtgärd"
-#: awkgram.y:955
-#, fuzzy
+#: awkgram.y:1424
msgid "old awk does not support multidimensional arrays"
-msgstr "gamla awk stöder inte operatorn \"**\""
+msgstr "gamla awk stöder inte flerdimensionella vektorer"
-#: awkgram.y:1001
+#: awkgram.y:1528
msgid "call of `length' without parentheses is not portable"
msgstr "anrop av \"length\" utan parenteser är inte portabelt"
-#: awkgram.y:1006
-msgid "call of `length' without parentheses is deprecated by POSIX"
-msgstr "anrop av \"length\" utan parenteser är föråldrat enligt POSIX"
-
-#: awkgram.y:1051
+#: awkgram.y:1591
#, fuzzy
msgid "indirect function calls are a gawk extension"
-msgstr "\"extension\" är en gawk-utökning"
+msgstr "\"nextfile\" är en gawk-utökning"
-#: awkgram.y:1084
-msgid "use of non-array as array"
-msgstr ""
+#: awkgram.y:1605
+#, fuzzy, c-format
+msgid "can not use special variable `%s' for indirect function call"
+msgstr "funktionen \"%s\": kan inte använda funktionsnamn som parameternamn"
-#: awkgram.y:1087
+#: awkgram.y:1682
msgid "invalid subscript expression"
msgstr "ogiltig indexuttryck"
-#: awkgram.y:1329
+#: awkgram.y:1722
+msgid "use of non-array as array"
+msgstr "icke-vektor används som vektor"
+
+#: awkgram.y:1993
msgid "unexpected newline or end of string"
msgstr "oväntat nyradstecken eller slut på strängen"
-#: awkgram.y:1446
-msgid "empty program text on command line"
-msgstr "tom programtext på kommandoraden"
-
-#: awkgram.y:1502
+#: awkgram.y:2248 awkgram.y:2296 awkgram.y:2470
#, c-format
msgid "can't open source file `%s' for reading (%s)"
msgstr "kan inte öppna källfilen \"%s\" för läsning (%s)"
-#: awkgram.y:1600
+#: awkgram.y:2249 awkgram.y:2297 builtin.c:122
+msgid "reason unknown"
+msgstr "okänd anledning"
+
+#: awkgram.y:2257
+#, fuzzy, c-format
+msgid "already included source file `%s'"
+msgstr "kan inte läsa källfilen \"%s\" (%s)"
+
+#: awkgram.y:2281
+#, fuzzy
+msgid "@include is a gawk extension"
+msgstr "\"nextfile\" är en gawk-utökning"
+
+#: awkgram.y:2288
+msgid "empty filename after @include"
+msgstr ""
+
+#: awkgram.y:2422
+msgid "empty program text on command line"
+msgstr "tom programtext på kommandoraden"
+
+#: awkgram.y:2537
#, c-format
msgid "can't read sourcefile `%s' (%s)"
msgstr "kan inte läsa källfilen \"%s\" (%s)"
-#: awkgram.y:1608
+#: awkgram.y:2547
#, c-format
msgid "source file `%s' is empty"
msgstr "källfilen \"%s\" är tom"
-#: awkgram.y:1800 awkgram.y:1922 awkgram.y:1940 awkgram.y:2315 awkgram.y:2407
+#: awkgram.y:2732
msgid "source file does not end in newline"
msgstr "källfilen slutar inte med en ny rad"
-#: awkgram.y:1862
+#: awkgram.y:2809
msgid "unterminated regexp ends with `\\' at end of file"
msgstr "oavslutat reguljärt uttryck slutar med \"\\\" i slutet av filen"
-#: awkgram.y:1886
+#: awkgram.y:2833
#, c-format
msgid "%s: %d: tawk regex modifier `/.../%c' doesn't work in gawk"
msgstr ""
+"%s: %d: tawk-modifierare för reguljära uttryck \"/.../%c\" fungerar inte i "
+"gawk"
-#: awkgram.y:1890
+#: awkgram.y:2837
#, c-format
msgid "tawk regex modifier `/.../%c' doesn't work in gawk"
msgstr ""
+"tawk-modifierare för reguljära uttryck \"/.../%c\" fungerar inte i gawk"
-#: awkgram.y:1897
+#: awkgram.y:2844
msgid "unterminated regexp"
msgstr "oavslutat reguljärt uttryck"
-#: awkgram.y:1900
+#: awkgram.y:2848
msgid "unterminated regexp at end of file"
msgstr "oavslutat reguljärt uttryck i slutet av filen"
-#: awkgram.y:1969
+#: awkgram.y:2907
msgid "use of `\\ #...' line continuation is not portable"
msgstr "Användning av \"\\ #...\" för radfortsättning är inte portabelt"
-#: awkgram.y:1982
+#: awkgram.y:2923
msgid "backslash not last character on line"
msgstr "sista tecknet på raden är inte ett omvänt snedstreck"
-#: awkgram.y:2027
+#: awkgram.y:2984
msgid "POSIX does not allow operator `**='"
msgstr "POSIX tillåter inte operatorn \"**=\""
-#: awkgram.y:2029
+#: awkgram.y:2986
msgid "old awk does not support operator `**='"
msgstr "gamla awk stöder inte operatorn \"**=\""
-#: awkgram.y:2038
+#: awkgram.y:2995
msgid "POSIX does not allow operator `**'"
msgstr "POSIX tillåter inte operatorn \"**\""
-#: awkgram.y:2040
+#: awkgram.y:2997
msgid "old awk does not support operator `**'"
msgstr "gamla awk stöder inte operatorn \"**\""
-#: awkgram.y:2071
+#: awkgram.y:3032
msgid "operator `^=' is not supported in old awk"
msgstr "operatorn \"^=\" stöds inte i gamla awk"
-#: awkgram.y:2079
+#: awkgram.y:3040
msgid "operator `^' is not supported in old awk"
msgstr "operatorn \"^\" stöds inte i gamla awk"
-#: awkgram.y:2163 awkgram.y:2178
+#: awkgram.y:3133 awkgram.y:3149
msgid "unterminated string"
msgstr "oavslutad sträng"
-#: awkgram.y:2368
+#: awkgram.y:3345
#, c-format
msgid "invalid char '%c' in expression"
msgstr "ogiltigt tecken \"%c\" i uttryck"
-#: awkgram.y:2416
+#: awkgram.y:3391
#, c-format
msgid "`%s' is a gawk extension"
msgstr "\"%s\" är en gawk-utökning"
-#: awkgram.y:2419
+#: awkgram.y:3394
#, c-format
msgid "`%s' is a Bell Labs extension"
msgstr "\"%s\" är en Bell Labs-utökning"
-#: awkgram.y:2422
+#: awkgram.y:3397
#, c-format
msgid "POSIX does not allow `%s'"
msgstr "POSIX tillåter inte \"%s\""
-#: awkgram.y:2426
+#: awkgram.y:3401
#, c-format
msgid "`%s' is not supported in old awk"
msgstr "\"%s\" stöds inte i gamla awk"
-#: awkgram.y:2452
+#: awkgram.y:3465
msgid "`goto' considered harmful!\n"
msgstr "\"goto\" anses skadlig!\n"
-#: awkgram.y:2514
+#: awkgram.y:3518
#, c-format
msgid "%d is invalid as number of arguments for %s"
msgstr "%d är ett ogiltigt antal argument för %s"
-#: awkgram.y:2533 awkgram.y:2536
+#: awkgram.y:3544 awkgram.y:3547
msgid "match: third argument is a gawk extension"
msgstr "match: tredje argumentet är en gawk-utökning"
-#: awkgram.y:2549
+#: awkgram.y:3575
#, c-format
msgid "%s: string literal as last arg of substitute has no effect"
msgstr ""
"%s: bokstavlig sträng som sista argument till ersättning har ingen effekt"
-#: awkgram.y:2552
+#: awkgram.y:3580
#, c-format
msgid "%s third parameter is not a changeable object"
msgstr "%s: tredje argumentet är inte ett ändringsbart objekt"
-#: awkgram.y:2586 awkgram.y:2589
+#: awkgram.y:3665 awkgram.y:3668
msgid "close: second argument is a gawk extension"
msgstr "close: andra argumentet är en gawk-utökning"
-#: awkgram.y:2599
+#: awkgram.y:3680
msgid "use of dcgettext(_\"...\") is incorrect: remove leading underscore"
msgstr ""
"användandet av dcgettext(_\"...\") är felaktigt: ta bort det inledande "
"understrykningstecknet"
-#: awkgram.y:2614
+#: awkgram.y:3695
msgid "use of dcngettext(_\"...\") is incorrect: remove leading underscore"
msgstr ""
"användandet av dcngettext(_\"...\") är felaktigt: ta bort det inledande "
"understrykningstecknet"
-#: awkgram.y:2686
+#: awkgram.y:3787
#, c-format
msgid "function `%s': parameter #%d, `%s', duplicates parameter #%d"
msgstr "funktionen \"%s\": parameter %d, \"%s\", är samma som parameter %d"
-#: awkgram.y:2719
+#: awkgram.y:3829
#, c-format
msgid "function `%s': parameter `%s' shadows global variable"
msgstr "funktionen \"%s\": parametern \"%s\" överskuggar en global variabel"
-#: awkgram.y:2831
+#: awkgram.y:3987
#, c-format
msgid "could not open `%s' for writing (%s)"
-msgstr "kunde inte öpnna \"%s\" för skrivning (%s)"
+msgstr "kunde inte öppna \"%s\" för skrivning (%s)"
-#: awkgram.y:2832 profile.c:96
+#: awkgram.y:3988 profile.c:85
msgid "sending profile to standard error"
msgstr "skickar profilen till standard fel"
-#: awkgram.y:2864
+#: awkgram.y:3994
#, c-format
msgid "%s: close failed (%s)"
msgstr "%s: misslyckades att stänga (%s)"
-#: awkgram.y:2985
+#: awkgram.y:4046
msgid "shadow_funcs() called twice!"
msgstr "shadow_funcs() anropad två gånger!"
-#: awkgram.y:3012
+#: awkgram.y:4052
msgid "there were shadowed variables."
msgstr "det fanns överskuggade variabler."
-#: awkgram.y:3085
+#: awkgram.y:4081
#, c-format
msgid "function `%s': can't use function name as parameter name"
msgstr "funktionen \"%s\": kan inte använda funktionsnamn som parameternamn"
-#: awkgram.y:3088
+#: awkgram.y:4086
#, fuzzy, c-format
msgid "function `%s': can't use special variable `%s' as a function parameter"
msgstr "funktionen \"%s\": kan inte använda funktionsnamn som parameternamn"
-#: awkgram.y:3098
+#: awkgram.y:4102
#, c-format
msgid "function name `%s' previously defined"
msgstr "funktionsnamnet \"%s\" är definierat sedan tidigare"
-#: awkgram.y:3249 awkgram.y:3255
+#: awkgram.y:4271 awkgram.y:4277
#, c-format
msgid "function `%s' called but never defined"
msgstr "funktionen \"%s\" anropad men aldrig definierad"
-#: awkgram.y:3258
+#: awkgram.y:4280
#, c-format
msgid "function `%s' defined but never called"
msgstr "funktionen \"%s\" definierad men aldrig anropad"
-#: awkgram.y:3285
+#: awkgram.y:4311
#, c-format
msgid "regexp constant for parameter #%d yields boolean value"
msgstr "konstant reguljärt uttryck för parameter %d ger ett booleskt värde"
-#: awkgram.y:3329
-#, fuzzy, c-format
+#: awkgram.y:4420
+#, c-format
msgid ""
"function `%s' called with space between name and `(',\n"
"or used as a variable or an array"
msgstr ""
"funktionen \"%s\" anropad med blanktecken mellan namnet och \"(\",\n"
-"%s"
+"eller använd som variabel eller vektor"
-#: awkgram.y:3750
-#, fuzzy
-msgid "division by zero attempted in `/'"
-msgstr "försökte dividera med noll i \"/=\""
+#: awkgram.y:4673 eval.c:1845
+msgid "division by zero attempted"
+msgstr "försökte dividera med noll"
-#: awkgram.y:3755 eval.c:1411
+#: awkgram.y:4682 eval.c:1877
#, c-format
msgid "division by zero attempted in `%%'"
msgstr "försökte dividera med noll i \"%%\""
-#: builtin.c:122
+#: awkgram.y:5342
+msgid "statement may have no effect"
+msgstr "kommandot kanske inte har någon effekt"
+
+#: builtin.c:120
#, c-format
msgid "%s to \"%s\" failed (%s)"
msgstr "%s till \"%s\" misslyckades (%s)"
-#: builtin.c:123
+#: builtin.c:121
msgid "standard output"
msgstr "standard ut"
-#: builtin.c:124
-msgid "reason unknown"
-msgstr "okänd anledning"
-
-#: builtin.c:137
+#: builtin.c:135
msgid "exp: received non-numeric argument"
msgstr "exp: fick ett ickenumeriskt argument"
-#: builtin.c:143
+#: builtin.c:141
#, c-format
msgid "exp: argument %g is out of range"
msgstr "exp: argumentet %g är inte inom tillåten gräns"
-#: builtin.c:201
+#: builtin.c:200
#, c-format
msgid "fflush: cannot flush: pipe `%s' opened for reading, not writing"
msgstr ""
"fflush: kan inte spola: röret \"%s\" öppnat för läsning, inte skrivning"
-#: builtin.c:204
+#: builtin.c:203
#, c-format
msgid "fflush: cannot flush: file `%s' opened for reading, not writing"
msgstr ""
"fflush: kan inte spola: filen \"%s\" öppnad för läsning, inte skrivning"
-#: builtin.c:216
+#: builtin.c:215
#, c-format
msgid "fflush: `%s' is not an open file, pipe or co-process"
msgstr "fflush: \"%s\" är inte en öppen fil, rör eller koprocess"
-#: builtin.c:310
+#: builtin.c:322
msgid "index: received non-string first argument"
msgstr "index: första argumentet är inte en sträng"
-#: builtin.c:312
+#: builtin.c:324
msgid "index: received non-string second argument"
msgstr "index: andra argumentet är inte en sträng"
-#: builtin.c:434
+#: builtin.c:446
msgid "int: received non-numeric argument"
msgstr "int: fick ett ickenumeriskt argument"
-#: builtin.c:464
+#: builtin.c:469
#, fuzzy
msgid "`length(array)' is a gawk extension"
-msgstr "\"delete array\" är en gawk-utökning"
+msgstr "\"length(array)\" är en gawk-utökning"
-#: builtin.c:471
-msgid "length: untyped parameter argument will be forced to scalar"
-msgstr ""
-
-#: builtin.c:480
-msgid "length: untyped argument will be forced to scalar"
-msgstr ""
-
-#: builtin.c:484
+#: builtin.c:477
msgid "length: received non-string argument"
msgstr "length: fick ett argument som inte är en sträng"
-#: builtin.c:515
+#: builtin.c:508
msgid "log: received non-numeric argument"
msgstr "log: fick ett ickenumeriskt argument"
-#: builtin.c:518
+#: builtin.c:511
#, c-format
msgid "log: received negative argument %g"
msgstr "log: fick ett negativt argumentet %g"
-#: builtin.c:726 builtin.c:729
-msgid "must use `count$' on all formats or none"
-msgstr "måste använda \"count$\" på alla eller inga format"
-
-#: builtin.c:790
-#, c-format
-msgid "field width is ignored for `%%%%' specifier"
-msgstr ""
-
-#: builtin.c:792
-#, c-format
-msgid "precision is ignored for `%%%%' specifier"
-msgstr ""
-
-#: builtin.c:794
-#, c-format
-msgid "field width and precision are ignored for `%%%%' specifier"
-msgstr ""
-
-#: builtin.c:845
-msgid "`$' is not permitted in awk formats"
-msgstr "\"$\" tillåts inte i awkformat"
-
-#: builtin.c:851
-msgid "arg count with `$' must be > 0"
-msgstr "argumentantalet med \"$\" måste vara > 0"
-
-#: builtin.c:853
-#, c-format
-msgid "arg count %ld greater than total number of supplied arguments"
-msgstr "argumentantalet %ld är större än antalet givna argument"
-
-#: builtin.c:855
-msgid "`$' not permitted after period in format"
-msgstr "\"$\" tillåts inte efter en punkt i formatet"
-
-#: builtin.c:868
-msgid "no `$' supplied for positional field width or precision"
-msgstr "inget \"$\" bifogat för positionsangiven fältbredd eller precision"
-
-#: builtin.c:938
-msgid "`l' is meaningless in awk formats; ignored"
-msgstr "\"l\" är meningslös i awk-format, ignorerad"
-
-#: builtin.c:942
-msgid "`l' is not permitted in POSIX awk formats"
-msgstr "\"l\" tillåts inte i POSIX awk-format"
-
-#: builtin.c:953
-msgid "`L' is meaningless in awk formats; ignored"
-msgstr "\"L\" är meningslös i awk-format, ignorerad"
-
-#: builtin.c:957
-msgid "`L' is not permitted in POSIX awk formats"
-msgstr "\"L\" tillåts inte i POSIX awk-format"
-
-#: builtin.c:968
-msgid "`h' is meaningless in awk formats; ignored"
-msgstr "\"h\" är meningslös i awk-format, ignorerad"
-
-#: builtin.c:972
-msgid "`h' is not permitted in POSIX awk formats"
-msgstr "\"h\" tillåts inte i POSIX awk-format"
-
-#: builtin.c:1252
-#, c-format
-msgid "[s]printf: value %g is out of range for `%%%c' format"
-msgstr ""
-
-#: builtin.c:1332
-#, c-format
-msgid "ignoring unknown format specifier character `%c': no argument converted"
-msgstr ""
-
-#: builtin.c:1338
-msgid "not enough arguments to satisfy format string"
-msgstr "för få argument för formatsträngen"
-
-#: builtin.c:1340
-msgid "^ ran out for this one"
-msgstr "^ tog slut här"
-
-#: builtin.c:1346
-msgid "[s]printf: format specifier does not have control letter"
-msgstr "[s]printf: formatspecifieraren har ingen kommandobokstav"
-
-#: builtin.c:1349
-msgid "too many arguments supplied for format string"
-msgstr "för många argument för formatsträngen"
+#: builtin.c:531 builtin.c:573 builtin.c:586 builtin.c:982 builtin.c:994
+#, fuzzy, c-format
+msgid "attempt to use array `%s' in scalar context"
+msgstr "försök att använda vektorn \"%s\" i skalärsammanhang"
-#: builtin.c:1424 builtin.c:1427
+#: builtin.c:569 builtin.c:580
msgid "printf: no arguments"
msgstr "printf: inga argument"
-#: builtin.c:1451
+#: builtin.c:621
msgid "sqrt: received non-numeric argument"
msgstr "sqrt: fick ickenumeriskt argument"
-#: builtin.c:1455
+#: builtin.c:625
#, c-format
msgid "sqrt: called with negative argument %g"
msgstr "sqrt: anropad med negativt argument %g"
-#: builtin.c:1479
-#, c-format
-msgid "substr: start index %g is invalid, using 1"
-msgstr "substr: startindex %g är ogiltigt, använder 1"
-
-#: builtin.c:1484
+#: builtin.c:649
#, c-format
-msgid "substr: non-integer start index %g will be truncated"
-msgstr "substr: startindex %g som inte är ett heltal kommer trunkeras"
-
-#: builtin.c:1510
-#, fuzzy, c-format
msgid "substr: length %g is not >= 1"
-msgstr "substr: längden %g är <= 0"
+msgstr "substr: längden %g är inte >= 1"
-#: builtin.c:1512
-#, fuzzy, c-format
+#: builtin.c:651
+#, c-format
msgid "substr: length %g is not >= 0"
-msgstr "substr: längden %g är <= 0"
+msgstr "substr: längden %g är inte >= 0"
-#: builtin.c:1519
+#: builtin.c:658
#, c-format
msgid "substr: non-integer length %g will be truncated"
msgstr "substr: längden %g som inte är ett heltal kommer trunkeras"
-#: builtin.c:1524
+#: builtin.c:663
#, c-format
msgid "substr: length %g too big for string indexing, truncating to %g"
msgstr "substr: längden %g är för stor för strängindexering, trunkeras till %g"
-#: builtin.c:1536
+#: builtin.c:675
+#, c-format
+msgid "substr: start index %g is invalid, using 1"
+msgstr "substr: startindex %g är ogiltigt, använder 1"
+
+#: builtin.c:680
+#, c-format
+msgid "substr: non-integer start index %g will be truncated"
+msgstr "substr: startindex %g som inte är ett heltal kommer trunkeras"
+
+#: builtin.c:705
msgid "substr: source string is zero length"
msgstr "substr: källsträngen är tom"
-#: builtin.c:1552
+#: builtin.c:721
#, c-format
msgid "substr: start index %g is past end of string"
msgstr "substr: startindex %g är bortom strängens slut"
-#: builtin.c:1560
+#: builtin.c:729
#, c-format
msgid ""
"substr: length %g at start index %g exceeds length of first argument (%lu)"
@@ -663,475 +645,431 @@ msgstr ""
"substr: längden %g vid startindex %g överskrider det första argumentets "
"längd (%lu)"
-#: builtin.c:1637
+#: builtin.c:806
+msgid "strftime: received non-numeric second argument"
+msgstr "strftime: fick ett ickenumeriskt andra argument"
+
+#: builtin.c:813
msgid "strftime: received non-string first argument"
msgstr "strftime: fick ett första argument som inte är en sträng"
-#: builtin.c:1643
+#: builtin.c:819
msgid "strftime: received empty format string"
msgstr "strftime: fick en tom formatsträng"
-#: builtin.c:1652
-msgid "strftime: received non-numeric second argument"
-msgstr "strftime: fick ett ickenumeriskt andra argument"
-
-#: builtin.c:1729
+#: builtin.c:885
msgid "mktime: received non-string argument"
msgstr "mktime: fick ett argument som inte är en sträng"
-#: builtin.c:1746
+#: builtin.c:902
msgid "mktime: at least one of the values is out of the default range"
msgstr ""
-#: builtin.c:1781
+#: builtin.c:937
msgid "'system' function not allowed in sandbox mode"
msgstr ""
-#: builtin.c:1786
+#: builtin.c:942
msgid "system: received non-string argument"
msgstr "system: fick ett argument som inte är en sträng"
-#: builtin.c:1907 eval.c:2285
-#, fuzzy, c-format
-msgid "reference to uninitialized field `$%d'"
+#: builtin.c:997 eval.c:1105 eval.c:1557 eval.c:1570
+#, c-format
+msgid "reference to uninitialized variable `%s'"
msgstr "referens till icke initierad variabel \"%s\""
-#: builtin.c:2012
+#: builtin.c:1064
+#, c-format
+msgid "reference to uninitialized field `$%d'"
+msgstr "referens till icke initierat fält \"$%d\""
+
+#: builtin.c:1098
msgid "tolower: received non-string argument"
msgstr "tolower: fick ett argument som inte är en sträng"
-#: builtin.c:2042
+#: builtin.c:1151
msgid "toupper: received non-string argument"
msgstr "toupper: fick ett argument som inte är en sträng"
-#: builtin.c:2075
+#: builtin.c:1199
msgid "atan2: received non-numeric first argument"
msgstr "atan2: fick ett ickenumeriskt första argument"
-#: builtin.c:2077
+#: builtin.c:1201
msgid "atan2: received non-numeric second argument"
msgstr "atan2: fick ett ickenumeriskt andra argument"
-#: builtin.c:2096
+#: builtin.c:1220
msgid "sin: received non-numeric argument"
msgstr "sin: fick ett ickenumeriskt argument"
-#: builtin.c:2112
+#: builtin.c:1236
msgid "cos: received non-numeric argument"
msgstr "cos: fick ett ickenumeriskt argument"
-#: builtin.c:2165
+#: builtin.c:1289
msgid "srand: received non-numeric argument"
msgstr "srand: fick ett ickenumeriskt argument"
-#: builtin.c:2200
+#: builtin.c:1320
msgid "match: third argument is not an array"
msgstr "match: tredje argumentet är inte en vektor"
-#: builtin.c:2750
+#: builtin.c:1827
msgid "gensub: third argument of 0 treated as 1"
-msgstr "gensub: Nollan i tredje argumentet behandlad som en etta"
+msgstr "gensub: nollan i tredje argumentet behandlad som en etta"
-#: builtin.c:2866
+#: builtin.c:1869
msgid "lshift: received non-numeric first argument"
msgstr "lshift: fick ett ickenumeriskt första argument"
-#: builtin.c:2868
-#, fuzzy
+#: builtin.c:1871
msgid "lshift: received non-numeric second argument"
-msgstr "strftime: fick ett ickenumeriskt andra argument"
+msgstr "lshift: fick ett ickenumeriskt andra argument"
-#: builtin.c:2874
+#: builtin.c:1877
#, c-format
msgid "lshift(%lf, %lf): negative values will give strange results"
msgstr "lshift(%lf, %lf): negativa värden kommer ge konstiga resultat"
-#: builtin.c:2876
+#: builtin.c:1879
#, c-format
msgid "lshift(%lf, %lf): fractional values will be truncated"
msgstr "lshift(%lf, %lf): flyttalsvärden kommer trunkeras"
-#: builtin.c:2878
+#: builtin.c:1881
#, c-format
msgid "lshift(%lf, %lf): too large shift value will give strange results"
msgstr "lshift(%lf, %lf): för stora skiftvärden kommer ge konstiga resultat"
-#: builtin.c:2904
+#: builtin.c:1908
msgid "rshift: received non-numeric first argument"
msgstr "rshift: fick ett ickenumeriskt första argument"
-#: builtin.c:2906
-#, fuzzy
+#: builtin.c:1910
msgid "rshift: received non-numeric second argument"
-msgstr "strftime: fick ett ickenumeriskt andra argument"
+msgstr "rshift: fick ett ickenumeriskt andra argument"
-#: builtin.c:2912
+#: builtin.c:1916
#, c-format
msgid "rshift(%lf, %lf): negative values will give strange results"
msgstr "rshift(%lf, %lf): negativa värden kommer ge konstiga resultat"
-#: builtin.c:2914
+#: builtin.c:1918
#, c-format
msgid "rshift(%lf, %lf): fractional values will be truncated"
msgstr "rshift(%lf, %lf): flyttalsvärden kommer trunkeras"
-#: builtin.c:2916
+#: builtin.c:1920
#, c-format
msgid "rshift(%lf, %lf): too large shift value will give strange results"
msgstr "rshift(%lf, %lf): för stora skiftvärden kommer ge konstiga resultat"
-#: builtin.c:2942
+#: builtin.c:1947
msgid "and: received non-numeric first argument"
msgstr "and: fick ett ickenumeriskt första argument"
-#: builtin.c:2944
-#, fuzzy
+#: builtin.c:1949
msgid "and: received non-numeric second argument"
-msgstr "atan2: fick ett ickenumeriskt andra argument"
+msgstr "and: fick ett ickenumeriskt andra argument"
-#: builtin.c:2950
+#: builtin.c:1955
#, c-format
msgid "and(%lf, %lf): negative values will give strange results"
msgstr "and(%lf, %lf): negativa värden kommer ge konstiga resultat"
-#: builtin.c:2952
+#: builtin.c:1957
#, c-format
msgid "and(%lf, %lf): fractional values will be truncated"
msgstr "and(%lf, %lf): flyttalsvärden kommer trunkeras"
-#: builtin.c:2978
+#: builtin.c:1984
msgid "or: received non-numeric first argument"
msgstr "or: fick ett ickenumeriskt första argument"
-#: builtin.c:2980
-#, fuzzy
+#: builtin.c:1986
msgid "or: received non-numeric second argument"
-msgstr "atan2: fick ett ickenumeriskt andra argument"
+msgstr "or: fick ett ickenumeriskt andra argument"
-#: builtin.c:2986
+#: builtin.c:1992
#, c-format
msgid "or(%lf, %lf): negative values will give strange results"
msgstr "or(%lf, %lf): negativa värden kommer ge konstiga resultat"
-#: builtin.c:2988
+#: builtin.c:1994
#, c-format
msgid "or(%lf, %lf): fractional values will be truncated"
msgstr "or(%lf, %lf): flyttalsvärden kommer trunkeras"
-#: builtin.c:3014
+#: builtin.c:2023
msgid "xor: received non-numeric first argument"
msgstr "xor: fick ett ickenumeriskt första argument"
-#: builtin.c:3016
-#, fuzzy
+#: builtin.c:2025
msgid "xor: received non-numeric second argument"
-msgstr "atan2: fick ett ickenumeriskt andra argument"
+msgstr "xor: fick ett ickenumeriskt andra argument"
-#: builtin.c:3022
+#: builtin.c:2031
#, c-format
msgid "xor(%lf, %lf): negative values will give strange results"
msgstr "xor(%lf, %lf): negativa värden kommer ge konstiga resultat"
-#: builtin.c:3024
+#: builtin.c:2033
#, c-format
msgid "xor(%lf, %lf): fractional values will be truncated"
msgstr "xor(%lf, %lf): flyttalsvärden kommer trunkeras"
-#: builtin.c:3048
+#: builtin.c:2057 builtin.c:2063
msgid "compl: received non-numeric argument"
msgstr "compl: fick ett ickenumeriskt argument"
-#: builtin.c:3054
+#: builtin.c:2065
#, c-format
msgid "compl(%lf): negative value will give strange results"
msgstr "compl(%lf): negativa värden kommer ge konstiga resultat"
-#: builtin.c:3056
+#: builtin.c:2067
#, c-format
msgid "compl(%lf): fractional value will be truncated"
msgstr "compl(%lf): flyttalsvärden kommer trunkeras"
-#: builtin.c:3229
+#: builtin.c:2237
#, c-format
msgid "dcgettext: `%s' is not a valid locale category"
msgstr "dcgettext: \"%s\" är inte en giltig lokalkategori"
-#: eval.c:374
+#: eval.c:412
#, c-format
msgid "unknown nodetype %d"
msgstr "okänd nodtyp %d"
-#: eval.c:423
-msgid "buffer overflow in genflags2str"
-msgstr "buffertöverflöd i genflags2str"
+#: eval.c:423 eval.c:437
+#, fuzzy, c-format
+msgid "unknown opcode %d"
+msgstr "okänd nodtyp %d"
-#: eval.c:455 eval.c:461 profile.c:787
+#: eval.c:434
#, c-format
-msgid "attempt to use array `%s' in a scalar context"
-msgstr "försök att använda vektorn \"%s\" i skalärsammanhang"
+msgid "opcode %s not an operator or keyword"
+msgstr ""
-#: eval.c:803
+#: eval.c:487
+msgid "buffer overflow in genflags2str"
+msgstr "buffertöverflöd i genflags2str"
+
+#: eval.c:613
#, c-format
-msgid "for loop: array `%s' changed size from %ld to %ld during loop execution"
+msgid ""
+"\n"
+"\t# Function Call Stack:\n"
+"\n"
msgstr ""
-"forslinga: vektorn \"%s\" ändrade storlek från %ld till %ld under "
-"slingexekvering"
-
-#: eval.c:824
-msgid "`break' outside a loop is not portable"
-msgstr "\"break\" utanför en slinga är inte portabelt"
+"\n"
+"\t# Funktionsanropsstack:\n"
+"\n"
-#: eval.c:828
-msgid "`break' outside a loop is not allowed"
-msgstr "\"break\" utanför en slinga är inte tillåtet"
+#: eval.c:640
+msgid "`IGNORECASE' is a gawk extension"
+msgstr "\"IGNORECASE\" är en gawk-utökning"
-#: eval.c:845
-msgid "`continue' outside a loop is not portable"
-msgstr "\"continue\" utanför en slinga är inte portabelt"
+#: eval.c:669
+msgid "`BINMODE' is a gawk extension"
+msgstr "\"BINMODE\" är en gawk-utökning"
-#: eval.c:849
-msgid "`continue' outside a loop is not allowed"
-msgstr "\"continue\" utanför en slinga är inte tillåtet"
+#: eval.c:727
+#, c-format
+msgid "BINMODE value `%s' is invalid, treated as 3"
+msgstr ""
-#: eval.c:883
-msgid "`next' cannot be called from a BEGIN rule"
-msgstr "\"next\" kan inte anropas från en BEGIN-regel"
+#: eval.c:817
+#, c-format
+msgid "bad `%sFMT' specification `%s'"
+msgstr "felaktig \"%sFMT\"-specifikation \"%s\""
-#: eval.c:885
-msgid "`next' cannot be called from an END rule"
-msgstr "\"next\" kan inte anropas från en END-regel"
+#: eval.c:895
+msgid "turning off `--lint' due to assignment to `LINT'"
+msgstr "slår av \"--lint\" på grund av en tilldelning till \"LINT\""
-#: eval.c:887
-#, fuzzy
-msgid "`next' cannot be called from a BEGINFILE rule"
-msgstr "\"next\" kan inte anropas från en BEGIN-regel"
+#: eval.c:1067 eval.c:1544
+#, c-format
+msgid "can't use function name `%s' as variable or array"
+msgstr "kan inte använda funktionsnamnet \"%s\" som variabel eller vektor"
-#: eval.c:889
-#, fuzzy
-msgid "`next' cannot be called from an ENDFILE rule"
-msgstr "\"next\" kan inte anropas från en END-regel"
+#: eval.c:1095
+msgid "assignment is not allowed to result of builtin function"
+msgstr "det är inte tillåtet att tilldela resultatet från en inbyggd funktion"
-#: eval.c:898
-msgid "`nextfile' cannot be called from a BEGIN rule"
-msgstr "\"nextfile\" kan inte anropas från en BEGIN-regel"
+#: eval.c:1104 eval.c:1556 eval.c:1569
+#, c-format
+msgid "reference to uninitialized argument `%s'"
+msgstr "referens till icke initierat argument \"%s\""
-#: eval.c:900
-msgid "`nextfile' cannot be called from an END rule"
-msgstr "\"nextfile\" kan inte anropas från en END-regel"
+#: eval.c:1123
+msgid "attempt to field reference from non-numeric value"
+msgstr "försök att fältreferera från ickenumeriskt värde"
-#: eval.c:906
+#: eval.c:1125
#, fuzzy
-msgid "`nextfile' cannot be called from an ENDFILE rule"
-msgstr "\"nextfile\" kan inte anropas från en END-regel"
+msgid "attempt to field reference from null string"
+msgstr "försök att referera från tom sträng"
-#: eval.c:963
-msgid "statement has no effect"
-msgstr "kommandot har ingen effekt"
+#: eval.c:1131
+#, fuzzy, c-format
+msgid "attempt to access field %ld"
+msgstr "försök att komma åt fält nummer %d"
-#: eval.c:1040 eval.c:2133
-#, c-format
-msgid "can't use function name `%s' as variable or array"
-msgstr "kan inte använda funktionsnamnet \"%s\" som variabel eller vektor"
+#: eval.c:1140
+#, fuzzy, c-format
+msgid "reference to uninitialized field `$%ld'"
+msgstr "referens till icke initierat fält \"$%d\""
-#: eval.c:1047 eval.c:1053
+#: eval.c:1202
#, c-format
-msgid "reference to uninitialized argument `%s'"
-msgstr "referens till icke initierat argument \"%s\""
+msgid "function `%s' called with more arguments than declared"
+msgstr "funktionen \"%s\" anropad med fler argument än vad som deklarerats"
-#: eval.c:1062 eval.c:2142
+#: eval.c:1358
#, c-format
-msgid "reference to uninitialized variable `%s'"
-msgstr "referens till icke initierad variabel \"%s\""
-
-#: eval.c:1210
-msgid ""
-"concatenation: side effects in one expression have changed the length of "
-"another!"
+msgid "unwind_stack: unexpected type `%s'"
msgstr ""
-"concatenation: sidoeffekter i ett uttryck har ändrat längden av ett annat!"
-#: eval.c:1315
+#: eval.c:1636
+#, fuzzy, c-format
+msgid "attempt to use scalar `%s' as an array"
+msgstr "försök att använda skalären \"%s\" som vektor"
+
+#: eval.c:1680
msgid "assignment used in conditional context"
msgstr "tilldelning använt i jämförelsesammanhang"
-#: eval.c:1396
-msgid "division by zero attempted"
-msgstr "försökte dividera med noll"
-
-#: eval.c:1426 profile.c:663
-#, c-format
-msgid "illegal type (%s) in tree_eval"
-msgstr "otillåten typ (%s) i tree_eval"
+#: eval.c:1684
+msgid "statement has no effect"
+msgstr "kommandot har ingen effekt"
-#: eval.c:1589
+#: eval.c:2028
msgid "division by zero attempted in `/='"
msgstr "försökte dividera med noll i \"/=\""
-#: eval.c:1611
+#: eval.c:2053
#, c-format
msgid "division by zero attempted in `%%='"
msgstr "försökte dividera med noll i \"%%=\""
-#: eval.c:1891
-#, c-format
-msgid "function `%s' called with more arguments than declared"
-msgstr "funktionen \"%s\" anropad med fler argument än vad som deklarerats"
-
-#: eval.c:1948
-#, c-format
-msgid "function `%s' not defined"
-msgstr "funktionen \"%s\" är inte definierad"
-
-#: eval.c:1950
-#, c-format
-msgid "identifier `%s' is not a function"
-msgstr ""
-
-#: eval.c:1997
-#, c-format
-msgid ""
-"function parameter `%s' is not a scalar and cannot be used for indirect "
-"function call"
-msgstr ""
-
-#: eval.c:2014
-#, c-format
-msgid "indirect call of real function `%s' is silly"
-msgstr ""
+#: eval.c:2139
+msgid "`continue' outside a loop is not allowed"
+msgstr "\"continue\" utanför en slinga är inte tillåtet"
-#: eval.c:2034
-#, c-format
-msgid "function `%s' called indirectly through `%s' does not exist"
-msgstr ""
+#: eval.c:2145
+#, fuzzy
+msgid "`break' outside a loop is not allowed"
+msgstr "\"break\" utanför en slinga är inte tillåtet"
-#: eval.c:2039
+#: eval.c:2229
#, c-format
-msgid "identifier `%s' cannot be used for indirect function call"
+msgid "for loop: array `%s' changed size from %ld to %ld during loop execution"
msgstr ""
+"forslinga: vektorn \"%s\" ändrade storlek från %ld till %ld under "
+"slingexekvering"
-#: eval.c:2105
+#: eval.c:2342
#, c-format
-msgid ""
-"\n"
-"\t# Function Call Stack:\n"
-"\n"
+msgid "function called indirectly through `%s' does not exist"
msgstr ""
-"\n"
-"\t# Funktionsanropsstack:\n"
-"\n"
-#: eval.c:2108
+#: eval.c:2354
#, c-format
-msgid "\t# -- main --\n"
-msgstr "\t# -- main --\n"
-
-#: eval.c:2269
-msgid "attempt to field reference from non-numeric value"
-msgstr "försök att fältreferera från ickenumeriskt värde"
-
-#: eval.c:2271
-msgid "attempt to reference from null string"
-msgstr "försök att referera från tom sträng"
-
-#: eval.c:2277
-#, c-format
-msgid "attempt to access field %d"
-msgstr "försök att komma åt fält nummer %d"
-
-#: eval.c:2298 eval.c:2305 profile.c:843
-msgid "assignment is not allowed to result of builtin function"
-msgstr "det är inte tillåtet att tilldela resultatet från en inbyggd funktion"
+msgid "function `%s' not defined"
+msgstr "funktionen \"%s\" är inte definierad"
-#: eval.c:2369
-msgid "`IGNORECASE' is a gawk extension"
-msgstr "\"IGNORECASE\" är en gawk-utökning"
+#: eval.c:2481
+#, fuzzy, c-format
+msgid "`nextfile' cannot be called from a `%s' rule"
+msgstr "\"nextfile\" kan inte anropas från en END-regel"
-#: eval.c:2398
-msgid "`BINMODE' is a gawk extension"
-msgstr "\"BINMODE\" är en gawk-utökning"
+#: eval.c:2540
+#, fuzzy, c-format
+msgid "`next' cannot be called from a `%s' rule"
+msgstr "\"next\" kan inte anropas från en END-regel"
-#: eval.c:2456
+#: eval.c:2602
#, c-format
-msgid "BINMODE value `%s' is invalid, treated as 3"
+msgid "Sorry, don't know how to interpret `%s'"
msgstr ""
-#: eval.c:2546
-#, c-format
-msgid "bad `%sFMT' specification `%s'"
-msgstr "felaktig \"%sFMT\"-specifikation \"%s\""
-
-#: eval.c:2624
-msgid "turning off `--lint' due to assignment to `LINT'"
-msgstr "slår av \"--lint\" på grund av en tilldelning till \"LINT\""
-
-#: ext.c:61
-msgid "extensions not allowed in sandbox mode"
+#: ext.c:62
+msgid "extensions are not allowed in sandbox mode"
msgstr ""
-#: ext.c:65 ext.c:70
+#: ext.c:68 ext.c:73
msgid "`extension' is a gawk extension"
msgstr "\"extension\" är en gawk-utökning"
-#: ext.c:80
-#, c-format
-msgid "extension: cannot open `%s' (%s)\n"
+#: ext.c:83
+#, fuzzy, c-format
+msgid "fatal: extension: cannot open `%s' (%s)\n"
msgstr "extension: kan inte öppna \"%s\" (%s)\n"
-#: ext.c:88
-#, c-format
-msgid "extension: library `%s': cannot call function `%s' (%s)\n"
+#: ext.c:93
+#, fuzzy, c-format
+msgid "fatal: extension: library `%s': cannot call function `%s' (%s)\n"
msgstr "extension: bibliotek \"%s\": kan inte anropa funktionen \"%s\" (%s)\n"
-#: ext.c:108
+#: ext.c:123
msgid "extension: missing function name"
-msgstr ""
+msgstr "extension: saknar funktionsnamn"
-#: ext.c:113
-#, fuzzy, c-format
+#: ext.c:128
+#, c-format
msgid "extension: illegal character `%c' in function name `%s'"
-msgstr "extension: bibliotek \"%s\": kan inte anropa funktionen \"%s\" (%s)\n"
+msgstr "extension: ogiltigt tecken \"%c\" i funktionsnamnet \"%s\""
-#: ext.c:119
-#, fuzzy, c-format
+#: ext.c:137
+#, c-format
msgid "extension: can't redefine function `%s'"
-msgstr "extension: kan inte öppna \"%s\" (%s)\n"
+msgstr "extension: kan inte definiera om funktionen \"%s\""
-#: ext.c:123
-#, fuzzy, c-format
+#: ext.c:141
+#, c-format
msgid "extension: function `%s' already defined"
-msgstr "funktionen \"%s\" är inte definierad"
+msgstr "extension: funktionen \"%s\" är redan definierad"
-#: ext.c:128
+#: ext.c:146
+#, c-format
+msgid "extension: function name `%s' previously defined"
+msgstr "extension: funktionsnamnet \"%s\" är definierat sedan tidigare"
+
+#: ext.c:148
#, c-format
msgid "extension: can't use gawk built-in `%s' as function name"
msgstr ""
+"extension: kan inte använda gawks inbyggda \"%s\" som ett funktionsnamn"
-#: ext.c:130
-#, fuzzy, c-format
-msgid "extension: function name `%s' previously defined"
-msgstr "funktionsnamnet \"%s\" är definierat sedan tidigare"
+#: ext.c:152
+#, c-format
+msgid "make_builtin: negative argument count for function `%s'"
+msgstr ""
-#: ext.c:207
+#: ext.c:255
#, fuzzy, c-format
msgid "function `%s' defined to take no more than %d argument(s)"
-msgstr "funktionen \"%s\" definierad men aldrig anropad"
+msgstr "funktionen \"%s\" definierades för att ta maximalt %d argument"
-#: ext.c:210
-#, fuzzy, c-format
+#: ext.c:258
+#, c-format
msgid "function `%s': missing argument #%d"
-msgstr "funktionen \"%s\" är inte definierad"
+msgstr "funktionen \"%s\": argument %d saknas"
-#: ext.c:220
-#, fuzzy, c-format
+#: ext.c:268
+#, c-format
msgid "function `%s': argument #%d: attempt to use scalar as an array"
-msgstr "försök att använda skalären \"%s\" som vektor"
+msgstr "funktionen \"%s\": argument %d: försök att använda skalär som vektor"
-#: ext.c:224
+#: ext.c:272
#, c-format
msgid "function `%s': argument #%d: attempt to use array as a scalar"
-msgstr ""
+msgstr "funktionen \"%s\": argument %d: försök att använda vektor som skalär"
-#: ext.c:249
+#: ext.c:285
msgid "Operation Not Supported"
msgstr "Operationen stöds inte"
@@ -1139,59 +1077,57 @@ msgstr "Operationen stöds inte"
msgid "NF set to negative value"
msgstr "NF satt till ett negativt värde"
-#: field.c:913
-msgid "split: second argument is not an array"
-msgstr "split: andra argumentet är inte en vektor"
-
-#: field.c:922 field.c:932 field.c:937
+#: field.c:939 field.c:946 field.c:950
#, fuzzy
msgid "split: fourth argument is a gawk extension"
msgstr "match: tredje argumentet är en gawk-utökning"
-#: field.c:928
+#: field.c:943
#, fuzzy
msgid "split: fourth argument is not an array"
msgstr "split: andra argumentet är inte en vektor"
-#: field.c:975
-#, fuzzy
-msgid "split: null string for third argument is a gawk extension"
+#: field.c:957
+msgid "split: second argument is not an array"
+msgstr "split: andra argumentet är inte en vektor"
+
+#: field.c:987
+msgid "split: null string for third arg is a gawk extension"
msgstr "split: tom sträng som tredje argument är en gawk-utökning"
-#: field.c:1032
+#: field.c:1028
#, fuzzy
-msgid "patsplit: second argument is not an array"
+msgid "patsplit: fourth argument is not an array"
msgstr "split: andra argumentet är inte en vektor"
-#: field.c:1041
+#: field.c:1033
#, fuzzy
-msgid "patsplit: fourth argument is not an array"
+msgid "patsplit: second argument is not an array"
msgstr "split: andra argumentet är inte en vektor"
-#: field.c:1067
+#: field.c:1051
#, fuzzy
msgid "patsplit: third argument must be non-null"
msgstr "match: tredje argumentet är inte en vektor"
-#: field.c:1111
+#: field.c:1084
msgid "`FIELDWIDTHS' is a gawk extension"
msgstr "\"FIELDWIDTHS\" är en gawk-utökning"
-#: field.c:1141 field.c:1155
+#: field.c:1147
#, c-format
msgid "invalid FIELDWIDTHS value, near `%s'"
-msgstr ""
+msgstr "ogiltigt FIELDWITHS-värde i närheten av \"%s\""
-#: field.c:1238
+#: field.c:1220
msgid "null string for `FS' is a gawk extension"
msgstr "tom sträng som \"FS\" är en gawk-utökning"
-#: field.c:1242
-#, fuzzy
+#: field.c:1224
msgid "old awk does not support regexps as value of `FS'"
-msgstr "gamla awk stöder inte operatorn \"**\""
+msgstr "gamla awk stöder inte reguljära uttryck som värden på \"FS\""
-#: field.c:1357
+#: field.c:1343
#, fuzzy
msgid "`FPAT' is a gawk extension"
msgstr "\"%s\" är en gawk-utökning"
@@ -1251,499 +1187,497 @@ msgstr "%s: flaggan \"-W %s\" tillåter inte något argument\n"
msgid "%s: option '-W %s' requires an argument\n"
msgstr "%s: flaggan \"%s\" kräver ett argument\n"
-#: io.c:379
+#: io.c:272
#, c-format
msgid "command line argument `%s' is a directory: skipped"
msgstr ""
-#: io.c:413
+#: io.c:275 io.c:372
#, c-format
msgid "cannot open file `%s' for reading (%s)"
msgstr "kan inte öppna filen \"%s\" för läsning (%s)"
-#: io.c:459 io.c:2999
+#: io.c:419
#, c-format
msgid "error reading input file `%s': %s"
msgstr "fel vid läsning av indatafilen \"%s\": %s"
-#: io.c:506
+#: io.c:470
#, c-format
msgid "close of fd %d (`%s') failed (%s)"
msgstr "stängning av fd %d (\"%s\") misslyckades (%s)"
-#: io.c:617
-msgid "redirection not allowed in sandbox mode"
-msgstr ""
-
-#: io.c:648
-#, c-format
-msgid "invalid tree type %s in redirect()"
-msgstr "ogiltig trädtyp %s i redirect()"
-
-#: io.c:654
+#: io.c:577
#, c-format
msgid "expression in `%s' redirection only has numeric value"
msgstr "uttrycket i \"%s\"-omdirigering har bara numeriskt värde"
-#: io.c:660
+#: io.c:583
#, c-format
msgid "expression for `%s' redirection has null string value"
msgstr "uttrycket för \"%s\"-omdirigering har en tom sträng som värde"
-#: io.c:665
+#: io.c:589
#, c-format
msgid "filename `%s' for `%s' redirection may be result of logical expression"
msgstr ""
"filnamnet \"%s\" för \"%s\"-omdirigering kan vara resultatet av ett logiskt "
"uttryck"
-#: io.c:707
+#: io.c:628
#, c-format
msgid "unnecessary mixing of `>' and `>>' for file `%.*s'"
msgstr "onödig blandning av \">\" och \">>\" för filen \"%.*s\""
-#: io.c:754
+#: io.c:681
#, c-format
msgid "can't open pipe `%s' for output (%s)"
msgstr "kan inte öppna röret \"%s\" för utmatning (%s)"
-#: io.c:763
+#: io.c:691
#, c-format
msgid "can't open pipe `%s' for input (%s)"
msgstr "kan inte öppna röret \"%s\" för inmatning (%s)"
-#: io.c:786
+#: io.c:712
#, c-format
msgid "can't open two way pipe `%s' for input/output (%s)"
msgstr "kan inte öppna tvåvägsröret \"%s\" för in-/utmatning (%s)"
-#: io.c:864
+#: io.c:794
#, c-format
msgid "can't redirect from `%s' (%s)"
msgstr "kan inte dirigera om från \"%s\" (%s)"
-#: io.c:867
+#: io.c:797
#, c-format
msgid "can't redirect to `%s' (%s)"
msgstr "kan inte dirigera om till \"%s\" (%s)"
-#: io.c:920
+#: io.c:846
msgid ""
"reached system limit for open files: starting to multiplex file descriptors"
msgstr ""
"nådde systembegränsningen för öppna filer: börjar multiplexa fildeskriptorer"
-#: io.c:936
+#: io.c:862
#, c-format
msgid "close of `%s' failed (%s)."
msgstr "stängning av \"%s\" misslyckades (%s)"
-#: io.c:944
+#: io.c:870
msgid "too many pipes or input files open"
msgstr "för många rör eller indatafiler öppna"
-#: io.c:967
+#: io.c:892
msgid "close: second argument must be `to' or `from'"
msgstr "close: andra argumentet måste vara \"to\" eller \"from\""
-#: io.c:981
+#: io.c:909
#, c-format
msgid "close: `%.*s' is not an open file, pipe or co-process"
msgstr "close: \"%.*s\" är inte en öppen fil, rör eller koprocess"
-#: io.c:986
+#: io.c:914
msgid "close of redirection that was never opened"
msgstr "stängning av omdirigering som aldrig öppnades"
-#: io.c:1083
+#: io.c:1011
#, c-format
msgid "close: redirection `%s' not opened with `|&', second argument ignored"
msgstr ""
"close: omdirigeringen \"%s\" öppnades inte med \"|&\", andra argumentet "
"ignorerat"
-#: io.c:1099
+#: io.c:1027
#, c-format
msgid "failure status (%d) on pipe close of `%s' (%s)"
msgstr "felstatus (%d) från rörstängning av \"%s\" (%s)"
-#: io.c:1102
+#: io.c:1030
#, c-format
msgid "failure status (%d) on file close of `%s' (%s)"
msgstr "felstatus (%d) från filstängning av \"%s\" (%s)"
-#: io.c:1122
+#: io.c:1050
#, c-format
msgid "no explicit close of socket `%s' provided"
msgstr "ingen explicit stängning av uttaget \"%s\" tillhandahållen"
-#: io.c:1125
+#: io.c:1053
#, c-format
msgid "no explicit close of co-process `%s' provided"
msgstr "ingen explicit stängning av koprocessen \"%s\" tillhandahållen"
-#: io.c:1128
+#: io.c:1056
#, c-format
msgid "no explicit close of pipe `%s' provided"
msgstr "ingen explicit stängning av röret \"%s\" tillhandahållen"
-#: io.c:1131
+#: io.c:1059
#, c-format
msgid "no explicit close of file `%s' provided"
msgstr "ingen explicit stängning av filen \"%s\" tillhandahållen"
-#: io.c:1159 io.c:1214 main.c:832 main.c:874
+#: io.c:1087 io.c:1142 main.c:823 main.c:865
#, c-format
msgid "error writing standard output (%s)"
msgstr "fel vid skrivning till standard ut (%s)"
-#: io.c:1163 io.c:1219
+#: io.c:1091 io.c:1147
#, c-format
msgid "error writing standard error (%s)"
msgstr "fel vid skrivning till standard fel (%s)"
-#: io.c:1171
+#: io.c:1099
#, c-format
msgid "pipe flush of `%s' failed (%s)."
msgstr "rörspolning av \"%s\" misslyckades (%s)"
-#: io.c:1174
+#: io.c:1102
#, c-format
msgid "co-process flush of pipe to `%s' failed (%s)."
msgstr "koprocesspolning av röret till \"%s\" misslyckades (%s)"
-#: io.c:1177
+#: io.c:1105
#, c-format
msgid "file flush of `%s' failed (%s)."
msgstr "filspolning av \"%s\" misslyckades (%s)"
-#: io.c:1292
-#, fuzzy, c-format
+#: io.c:1219
+#, c-format
msgid "local port %s invalid in `/inet'"
-msgstr "lokal port ogiltig i \"%s\""
+msgstr "lokal port %s ogiltig i \"/inet\""
-#: io.c:1309
+#: io.c:1236
#, c-format
msgid "remote host and port information (%s, %s) invalid"
-msgstr ""
+msgstr "ogiltig information (%s, %s) för fjärrvärd och fjärrport"
-#: io.c:1344
+#: io.c:1276
msgid "/inet/raw client not ready yet, sorry"
msgstr "/inet/raw-klient är tyvärr inte klar än"
-#: io.c:1347 io.c:1383
+#: io.c:1279 io.c:1320
msgid "only root may use `/inet/raw'."
msgstr "bara root kan använda \"/inet/raw\"."
-#: io.c:1381
+#: io.c:1318
msgid "/inet/raw server not ready yet, sorry"
msgstr "/inet/raw-server inte redo än, ledsen"
-#: io.c:1477
+#: io.c:1417
#, c-format
msgid "no (known) protocol supplied in special filename `%s'"
msgstr ""
"inget (känt) protokoll tillhandahållet i det speciella filnamnet \"%s\""
-#: io.c:1491
+#: io.c:1431
#, c-format
msgid "special file name `%s' is incomplete"
msgstr "speciellt filnamn \"%s\" är ofullständigt"
-#: io.c:1506
+#: io.c:1447
msgid "must supply a remote hostname to `/inet'"
msgstr "måste tillhandahålla ett fjärrdatornamn till \"/inet\""
-#: io.c:1524
+#: io.c:1465
msgid "must supply a remote port to `/inet'"
msgstr "måste tillhandahålla en fjärrport till \"/inet\""
-#: io.c:1570
+#: io.c:1511
msgid "TCP/IP communications are not supported"
msgstr "TCP/IP-kommunikation stöds inte"
-#: io.c:1758
+#: io.c:1698
#, c-format
msgid "could not open `%s', mode `%s'"
msgstr "kunde inte öppna \"%s\", läge \"%s\""
-#: io.c:1809
+#: io.c:1749
#, c-format
msgid "close of master pty failed (%s)"
msgstr "stängning av huvudpty misslyckades (%s)"
-#: io.c:1811 io.c:1963 io.c:2114
+#: io.c:1751 io.c:1918 io.c:2075
#, c-format
msgid "close of stdout in child failed (%s)"
msgstr "stängning av standard ut i barnet misslyckades (%s)"
-#: io.c:1814
+#: io.c:1754
#, c-format
msgid "moving slave pty to stdout in child failed (dup: %s)"
msgstr "flyttandet av slavpty till standard ut i barnet misslyckades (dup: %s)"
-#: io.c:1816 io.c:1968
+#: io.c:1756 io.c:1923
#, c-format
msgid "close of stdin in child failed (%s)"
msgstr "stängning av standard in i barnet misslyckades (%s)"
-#: io.c:1819
+#: io.c:1759
#, c-format
msgid "moving slave pty to stdin in child failed (dup: %s)"
msgstr "flyttandet av slavpty till standard in i barnet misslyckades (dup: %s)"
-#: io.c:1821 io.c:1840
+#: io.c:1761 io.c:1782
#, c-format
msgid "close of slave pty failed (%s)"
msgstr "stängning av slavpty misslyckades (%s)"
-#: io.c:1914 io.c:1966 io.c:2095 io.c:2117
+#: io.c:1860 io.c:1921 io.c:2053 io.c:2078
#, c-format
msgid "moving pipe to stdout in child failed (dup: %s)"
msgstr "flyttande av rör till standard ut i barnet misslyckades (dup: %s)"
-#: io.c:1918 io.c:1971
+#: io.c:1867 io.c:1926
#, c-format
msgid "moving pipe to stdin in child failed (dup: %s)"
msgstr "flyttande av rör till standard in i barnet misslyckades (dup: %s)"
-#: io.c:1935 io.c:2108
+#: io.c:1887 io.c:2068
msgid "restoring stdout in parent process failed\n"
msgstr "återställande av standard ut i förälderprocessen misslyckades\n"
-#: io.c:1940
+#: io.c:1895
msgid "restoring stdin in parent process failed\n"
msgstr "återställande av standard in i förälderprocessen misslyckades\n"
-#: io.c:1974 io.c:2119 io.c:2130
+#: io.c:1929 io.c:2080 io.c:2094
#, c-format
msgid "close of pipe failed (%s)"
msgstr "stängning av röret misslyckades (%s)"
-#: io.c:2019
+#: io.c:1974
msgid "`|&' not supported"
msgstr "\"|&\" stöds inte"
-#: io.c:2085
+#: io.c:2040
#, c-format
msgid "cannot open pipe `%s' (%s)"
msgstr "kan inte öppna röret \"%s\" (%s)"
-#: io.c:2126
+#: io.c:2088
#, c-format
msgid "cannot create child process for `%s' (fork: %s)"
msgstr "kan inte skapa barnprocess för \"%s\" (fork: %s)"
-#: io.c:2518
+#: io.c:2577
#, c-format
msgid "data file `%s' is empty"
msgstr "datafilen \"%s\" är tom"
-#: io.c:2560 io.c:2568
+#: io.c:2618 io.c:2626
msgid "could not allocate more input memory"
msgstr "kunde inte allokera mer indataminne"
-#: io.c:3125
+#: io.c:3173
msgid "multicharacter value of `RS' is a gawk extension"
msgstr "flerteckensvärdet av \"RS\" är en gawk-utökning"
-#: main.c:313
+#: main.c:311
msgid "out of memory"
-msgstr ""
+msgstr "slut på minne"
-#: main.c:381
+#: main.c:388
msgid "`-m[fr]' option irrelevant in gawk"
msgstr "\"-m[fr]\"-flaggan är irrelevant i gawk"
-#: main.c:383
+#: main.c:390
msgid "-m option usage: `-m[fr] nnn'"
msgstr "-m-flaggans användning: \"-m[fr] nnn\""
-#: main.c:419
+#: main.c:426
#, fuzzy
msgid "empty argument to `-e/--source' ignored"
msgstr "tomt argument till \"--source\" ignorerat"
-#: main.c:485
+#: main.c:492
#, c-format
msgid "%s: option `-W %s' unrecognized, ignored\n"
msgstr "%s: flaggan \"-W %s\" okänd, ignorerad\n"
-#: main.c:530
+#: main.c:545
#, c-format
msgid "%s: option requires an argument -- %c\n"
msgstr "%s: flaggan kräver ett argument -- %c\n"
-#: main.c:551
+#: main.c:566
msgid "environment variable `POSIXLY_CORRECT' set: turning on `--posix'"
msgstr "miljövariabeln \"POSIXLY_CORRECT\" satt: slår på \"--posix\""
-#: main.c:557
+#: main.c:572
msgid "`--posix' overrides `--traditional'"
msgstr "\"--posix\" åsidosätter \"--traditional\""
-#: main.c:568
+#: main.c:583
msgid "`--posix'/`--traditional' overrides `--non-decimal-data'"
msgstr "\"--posix\"/\"--traditional\" åsidosätter \"--non-decimal-data\""
-#: main.c:572
+#: main.c:587
#, c-format
msgid "running %s setuid root may be a security problem"
msgstr "att köra %s setuid root kan vara ett säkerhetsproblem"
-#: main.c:577
+#: main.c:592
#, fuzzy
msgid "`--posix' overrides `--binary'"
msgstr "\"--posix\" åsidosätter \"--traditional\""
-#: main.c:622
+#: main.c:643
#, c-format
msgid "can't set binary mode on stdin (%s)"
msgstr "kan inte sätta binärläge på standard in (%s)"
-#: main.c:625
+#: main.c:646
#, c-format
msgid "can't set binary mode on stdout (%s)"
msgstr "kan inte sätta binärläge på standard ut (%s)"
-#: main.c:627
+#: main.c:648
#, c-format
msgid "can't set binary mode on stderr (%s)"
msgstr "kan inte sätta binärläge på standard fel (%s)"
-#: main.c:668
+#: main.c:687
msgid "no program text at all!"
msgstr "ingen programtext alls!"
-#: main.c:773
+#: main.c:762
#, c-format
msgid "Usage: %s [POSIX or GNU style options] -f progfile [--] file ...\n"
msgstr ""
"Användning: %s [POSIX- eller GNU-stilsflaggor] -f progfil [--] fil ...\n"
-#: main.c:775
+#: main.c:764
#, c-format
msgid "Usage: %s [POSIX or GNU style options] [--] %cprogram%c file ...\n"
msgstr "Användning: %s [POSIX- eller GNU-stilsflaggor] %cprogram%c fil ...\n"
-#: main.c:780
+#: main.c:769
#, fuzzy
msgid "POSIX options:\t\tGNU long options: (standard)\n"
msgstr "POSIX-flaggor:\t\tGNU långa flaggor:\n"
-#: main.c:781
+#: main.c:770
msgid "\t-f progfile\t\t--file=progfile\n"
msgstr "\t-f progfil\t\t--file=progfil\n"
-#: main.c:782
+#: main.c:771
msgid "\t-F fs\t\t\t--field-separator=fs\n"
msgstr "\t-F fs\t\t\t--field-separator=fs\n"
-#: main.c:783
+#: main.c:772
msgid "\t-v var=val\t\t--assign=var=val\n"
msgstr "\t-v var=värde\t\t--assign=var=värde\n"
-#: main.c:784
+#: main.c:773
#, fuzzy
-msgid "POSIX options:\t\tGNU long options: (extensions)\n"
+msgid "Short options:\t\tGNU long options: (extensions)\n"
msgstr "POSIX-flaggor:\t\tGNU långa flaggor:\n"
-#: main.c:785
+#: main.c:774
msgid "\t-m[fr] val\n"
msgstr "\t-m[fr] värde\n"
-#: main.c:786
+#: main.c:775
msgid "\t-b\t\t\t--characters-as-bytes\n"
msgstr ""
-#: main.c:787
-msgid "\t-c\t\t\t--compat, --traditional\n"
-msgstr ""
+#: main.c:776
+#, fuzzy
+msgid "\t-c\t\t\t--traditional\n"
+msgstr "\t-W traditional\t\t--traditional\n"
-#: main.c:788
+#: main.c:777
#, fuzzy
-msgid "\t-C\t\t\t--copyleft, --copyright\n"
+msgid "\t-C\t\t\t--copyright\n"
msgstr "\t-W copyright\t\t--copyright\n"
-#: main.c:789
+#: main.c:778
#, fuzzy
msgid "\t-d [file]\t\t--dump-variables[=file]\n"
msgstr "\t-W dump-variables[=fil]\t--dump-variables[=fil]\n"
-#: main.c:790
+#: main.c:779
#, fuzzy
msgid "\t-e 'program-text'\t--source='program-text'\n"
msgstr "\t-W source=programtext\t--source=programtext\n"
-#: main.c:791
+#: main.c:780
#, fuzzy
msgid "\t-E file\t\t\t--exec=file\n"
-msgstr "\t-W profile[=fil]\t--profile[=fil]\n"
+msgstr "\t-W exec=fil\t\t--exec=fil\n"
-#: main.c:792
+#: main.c:781
#, fuzzy
msgid "\t-g\t\t\t--gen-pot\n"
msgstr "\t-W gen-po\t\t--gen-po\n"
-#: main.c:793
+#: main.c:782
#, fuzzy
-msgid "\t-h\t\t\t--help, --usage\n"
+msgid "\t-h\t\t\t--help\n"
msgstr "\t-W help\t\t\t--help\n"
-#: main.c:794
+#: main.c:783
#, fuzzy
-msgid "\t-l [fatal]\t\t--lint[=fatal]\n"
+msgid "\t-L [fatal]\t\t--lint[=fatal]\n"
msgstr "\t-W lint[=fatal]\t\t--lint[=fatal]\n"
-#: main.c:795
-#, fuzzy
-msgid "\t-L\t\t\t--lint-old\n"
-msgstr "\t-W lint-old\t\t--lint-old\n"
-
-#: main.c:796
+#: main.c:784
#, fuzzy
msgid "\t-n\t\t\t--non-decimal-data\n"
msgstr "\t-W non-decimal-data\t--non-decimal-data\n"
-#: main.c:797
+#: main.c:785
+#, fuzzy
msgid "\t-N\t\t\t--use-lc-numeric\n"
-msgstr ""
+msgstr "\t-W use-lc-numeric\t--use-lc-numeric\n"
-#: main.c:798
+#: main.c:786
msgid "\t-O\t\t\t--optimize\n"
msgstr ""
-#: main.c:799
+#: main.c:787
#, fuzzy
msgid "\t-p [file]\t\t--profile[=file]\n"
msgstr "\t-W profile[=fil]\t--profile[=fil]\n"
-#: main.c:800
+#: main.c:788
#, fuzzy
msgid "\t-P\t\t\t--posix\n"
msgstr "\t-W posix\t\t--posix\n"
-#: main.c:801
+#: main.c:789
#, fuzzy
msgid "\t-r\t\t\t--re-interval\n"
msgstr "\t-W re-interval\t\t--re-interval\n"
-#: main.c:802
+#: main.c:791
#, fuzzy
+msgid "\t-R file\t\t\t--command=file\n"
+msgstr "\t-W exec=fil\t\t--exec=fil\n"
+
+#: main.c:792
msgid "\t-S\t\t\t--sandbox\n"
-msgstr "\t-W posix\t\t--posix\n"
+msgstr ""
-#: main.c:803
+#: main.c:793
+#, fuzzy
+msgid "\t-t\t\t\t--lint-old\n"
+msgstr "\t-W lint-old\t\t--lint-old\n"
+
+#: main.c:794
#, fuzzy
msgid "\t-V\t\t\t--version\n"
msgstr "\t-W version\t\t--version\n"
-#: main.c:805
+#: main.c:796
msgid "\t-W nostalgia\t\t--nostalgia\n"
msgstr "\t-W nostalgia\t\t--nostalgia\n"
-#: main.c:808
-msgid "\t-W parsedebug\t\t--parsedebug\n"
+#: main.c:799
+#, fuzzy
+msgid "\t-Y\t\t--parsedebug\n"
msgstr "\t-W parsedebug\t\t--parsedebug\n"
#. TRANSLATORS: --help output 5 (end)
@@ -1751,7 +1685,7 @@ msgstr "\t-W parsedebug\t\t--parsedebug\n"
#. for this application. Please add _another line_ with the
#. address for translation bugs.
#. no-wrap
-#: main.c:817
+#: main.c:808
msgid ""
"\n"
"To report bugs, see node `Bugs' in `gawk.info', which is\n"
@@ -1765,7 +1699,7 @@ msgstr ""
"Rapportera synpunkter på översättningen till <sv@li.org>.\n"
"\n"
-#: main.c:821
+#: main.c:812
msgid ""
"gawk is a pattern scanning and processing language.\n"
"By default it reads standard input and writes standard output.\n"
@@ -1775,7 +1709,7 @@ msgstr ""
"Normalt läser det från standard in och skriver till standard ut.\n"
"\n"
-#: main.c:825
+#: main.c:816
msgid ""
"Examples:\n"
"\tgawk '{ sum += $1 }; END { print sum }' file\n"
@@ -1785,7 +1719,7 @@ msgstr ""
"\tgawk '{ sum += $1 }; END { print sum }' fil\n"
"\tgawk -F: '{print $1 }' /etc/passwd\n"
-#: main.c:845
+#: main.c:836
#, c-format
msgid ""
"Copyright (C) 1989, 1991-%d Free Software Foundation.\n"
@@ -1804,7 +1738,7 @@ msgstr ""
"någon senare version.\n"
"\n"
-#: main.c:853
+#: main.c:844
msgid ""
"This program is distributed in the hope that it will be useful,\n"
"but WITHOUT ANY WARRANTY; without even the implied warranty of\n"
@@ -1818,200 +1752,164 @@ msgstr ""
"General Public License för ytterligare information.\n"
"\n"
-#: main.c:864
-#, fuzzy
+#: main.c:855
msgid ""
"You should have received a copy of the GNU General Public License\n"
"along with this program. If not, see http://www.gnu.org/licenses/.\n"
msgstr ""
"Du bör ha fått en kopia av GNU General Public License tillsammans\n"
-"med detta program. Om inte, skriv till Free Software Foundation,\n"
-"Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.\n"
+"med detta program. Om inte, se http//www.gnu.org/liceences/.\n"
-#: main.c:899
+#: main.c:890
msgid "-Ft does not set FS to tab in POSIX awk"
msgstr "-Ft sätter inte FS till tab i POSIX-awk"
-#: main.c:1116
+#: main.c:1122
#, c-format
msgid "unknown value for field spec: %d\n"
msgstr ""
-#: main.c:1176
+#: main.c:1182
#, c-format
msgid ""
"%s: `%s' argument to `-v' not in `var=value' form\n"
"\n"
msgstr "%s: Argumentet \"%s\" till \"-v\" är inte på formatet \"var=värde\"\n"
-#: main.c:1196
+#: main.c:1202
#, c-format
msgid "`%s' is not a legal variable name"
msgstr "\"%s\" är inte ett giltigt variabelnamn"
-#: main.c:1199
+#: main.c:1205
#, c-format
msgid "`%s' is not a variable name, looking for file `%s=%s'"
msgstr "\"%s\" är inte ett variabelnamn, letar efter filen \"%s=%s\""
-#: main.c:1238
+#: main.c:1258
msgid "floating point exception"
msgstr "flyttalsundantag"
-#: main.c:1245
+#: main.c:1265
msgid "fatal error: internal error"
msgstr "ödesdigert fel: internt fel"
-#: main.c:1260
+#: main.c:1280
#, fuzzy
msgid "fatal error: internal error: segfault"
msgstr "ödesdigert fel: internt fel"
-#: main.c:1272
+#: main.c:1292
#, fuzzy
msgid "fatal error: internal error: stack overflow"
msgstr "ödesdigert fel: internt fel"
-#: main.c:1322
+#: main.c:1342
#, c-format
msgid "no pre-opened fd %d"
msgstr "ingen föröppnad fd %d"
-#: main.c:1329
+#: main.c:1349
#, c-format
msgid "could not pre-open /dev/null for fd %d"
msgstr "kunde inte föröppna /dev/null för fd %d"
-#: main.c:1352 main.c:1361
+#: main.c:1372 main.c:1381
#, c-format
msgid "could not find groups: %s"
msgstr "kunde inte hitta grupper: %s"
-#: msg.c:54
+#: msg.c:62
#, c-format
msgid "cmd. line:"
msgstr "kommandorad:"
-#: msg.c:120
+#: msg.c:97
msgid "warning: "
msgstr "varning: "
-#: msg.c:142
+#: msg.c:106
msgid "error: "
msgstr "fel: "
-#: msg.c:178
+#: msg.c:129
msgid "fatal: "
msgstr "ödesdigert: "
-#: node.c:63 node.c:78 node.c:105 node.c:121 node.c:151
-msgid "can't convert string to float"
-msgstr "kan inte konvertera en sträng till flyttal"
-
-#: node.c:465
+#: node.c:401
msgid "backslash at end of string"
msgstr "omvänt snedstreck i slutet av strängen"
-#: node.c:609
+#: node.c:502
#, c-format
msgid "old awk does not support the `\\%c' escape sequence"
msgstr "gamla awk stöder inte kontrollsekvensen \"\\%c\""
-#: node.c:660
+#: node.c:553
msgid "POSIX does not allow `\\x' escapes"
msgstr "POSIX tillåter inte \"\\x\"-kontrollsekvenser"
-#: node.c:666
+#: node.c:559
msgid "no hex digits in `\\x' escape sequence"
msgstr "inga hexadecimala siffror i \"\\x\"-kontrollsekvenser"
-#: node.c:688
+#: node.c:581
#, c-format
msgid ""
"hex escape \\x%.*s of %d characters probably not interpreted the way you "
"expect"
msgstr ""
-#: node.c:703
+#: node.c:596
#, c-format
msgid "escape sequence `\\%c' treated as plain `%c'"
msgstr "kontrollsekvensen \"\\%c\" behandlad som bara \"%c\""
+#: node.c:737
+msgid ""
+"Invalid multibyte data detected. There may be a mismatch between your data "
+"and your locale."
+msgstr ""
+
#: posix/gawkmisc.c:172
#, c-format
msgid "%s %s `%s': could not set close-on-exec: (fcntl: %s)"
msgstr "%s %s \"%s\": kunde inte sätta stäng-vid-exec (fcntl: %s)"
-#: profile.c:94
+#: profile.c:83
#, c-format
msgid "could not open `%s' for writing: %s"
msgstr "kunde inte öppna \"%s\" för skrivning: %s"
-#: profile.c:457
+#: profile.c:203
#, fuzzy, c-format
-msgid "internal error: %s with null vname"
-msgstr "internt fel: Node_var med null vname"
-
-#: profile.c:522
-msgid "# treated internally as `delete'"
-msgstr "# behandlad internt som \"delete\""
-
-#: profile.c:1076
-#, c-format
-msgid "# this is a dynamically loaded extension function"
-msgstr ""
-
-#: profile.c:1109
-#, c-format
-msgid "\t# gawk profile, created %s\n"
-msgstr "\t# gawkprofil, skapad %s\n"
-
-#: profile.c:1112
-#, c-format
msgid ""
-"\t# BEGIN block(s)\n"
+"\t# %s block(s)\n"
"\n"
msgstr ""
-"\t# BEGIN-block\n"
+"\t# END-block\n"
"\n"
-#: profile.c:1122
+#: profile.c:208
#, fuzzy, c-format
msgid ""
-"\t# BEGINFILE block(s)\n"
-"\n"
-msgstr ""
-"\t# BEGIN-block\n"
-"\n"
-
-#: profile.c:1132
-#, c-format
-msgid ""
-"\t# Rule(s)\n"
+"\t# %s(s)\n"
"\n"
msgstr ""
"\t# Regel/regler\n"
"\n"
-#: profile.c:1138
-#, fuzzy, c-format
-msgid ""
-"\t# ENDFILE block(s)\n"
-"\n"
-msgstr ""
-"\t# END-block\n"
-"\n"
+#: profile.c:278
+#, c-format
+msgid "internal error: %s with null vname"
+msgstr "internt fel: %s med null vname"
-#: profile.c:1148
+#: profile.c:945
#, c-format
-msgid ""
-"\t# END block(s)\n"
-"\n"
-msgstr ""
-"\t# END-block\n"
-"\n"
+msgid "\t# gawk profile, created %s\n"
+msgstr "\t# gawkprofil, skapad %s\n"
-#: profile.c:1168
+#: profile.c:1328
#, c-format
msgid ""
"\n"
@@ -2020,17 +1918,12 @@ msgstr ""
"\n"
"\t# Funktioner, listade alfabetiskt\n"
-#: profile.c:1431
+#: profile.c:1367
#, c-format
-msgid "unexpected type %s in prec_level"
-msgstr "oväntad typ %s i prec_level"
-
-#: profile.c:1557
-#, fuzzy, c-format
-msgid "Unknown node type %s in pp_var"
-msgstr "okänd nodtyp %d"
+msgid "redir2str: unknown redirection type %d"
+msgstr ""
-#: re.c:537
+#: re.c:559
#, c-format
msgid "regexp component `%.*s' should probably be `[%.*s]'"
msgstr ""
@@ -2103,18 +1996,40 @@ msgstr "Reguljärt uttryck för stort"
msgid "Unmatched ) or \\)"
msgstr "Obalanserad ) eller \\)"
-#: regcomp.c:699
+#: regcomp.c:701
msgid "No previous regular expression"
msgstr "Inget föregående reguljärt uttryck"
-#~ msgid "%s: illegal option -- %c\n"
-#~ msgstr "%s: otillåten flagga -- %c\n"
+#~ msgid "call of `length' without parentheses is deprecated by POSIX"
+#~ msgstr "anrop av \"length\" utan parenteser är föråldrat enligt POSIX"
+
+#, fuzzy
+#~ msgid "reference to uninitialized field `$%s'"
+#~ msgstr "referens till icke initierat fält \"$%d\""
+
+#~ msgid "can't convert string to float"
+#~ msgstr "kan inte konvertera en sträng till flyttal"
+
+#~ msgid "`continue' outside a loop is not portable"
+#~ msgstr "\"continue\" utanför en slinga är inte portabelt"
+
+#~ msgid "`break' outside a loop is not portable"
+#~ msgstr "\"break\" utanför en slinga är inte portabelt"
+
+#~ msgid "`nextfile' cannot be called from a BEGIN rule"
+#~ msgstr "\"nextfile\" kan inte anropas från en BEGIN-regel"
+
+#~ msgid "`next' cannot be called from a BEGIN rule"
+#~ msgstr "\"next\" kan inte anropas från en BEGIN-regel"
#~ msgid "file `%s' is a directory"
#~ msgstr "filen \"%s\" är en katalog"
-#~ msgid "can't open two way socket `%s' for input/output (%s)"
-#~ msgstr "kan inte öppna tvåvägsuttaget \"%s\" för in-/utmatning (%s)"
+#~ msgid "use `PROCINFO[\"%s\"]' instead of `%s'"
+#~ msgstr "använd \"PROCINFO[\"%s\"]\" istället för \"%s\""
+
+#~ msgid "use `PROCINFO[...]' instead of `/dev/user'"
+#~ msgstr "använd \"PROCINFO[...]\" istället för \"dev/user\""
#~ msgid "\t-W compat\t\t--compat\n"
#~ msgstr "\t-W compat\t\t--compat\n"
@@ -2122,73 +2037,130 @@ msgstr "Inget föregående reguljärt uttryck"
#~ msgid "\t-W copyleft\t\t--copyleft\n"
#~ msgstr "\t-W copyleft\t\t--copyleft\n"
-#~ msgid "\t-W traditional\t\t--traditional\n"
-#~ msgstr "\t-W traditional\t\t--traditional\n"
-
#~ msgid "\t-W usage\t\t--usage\n"
#~ msgstr "\t-W usage\t\t--usage\n"
-#, fuzzy
-#~ msgid "seek: invalid arguments"
-#~ msgstr "printf: inga argument"
+#~ msgid ""
+#~ "\t# BEGIN block(s)\n"
+#~ "\n"
+#~ msgstr ""
+#~ "\t# BEGIN-block\n"
+#~ "\n"
-#, fuzzy
-#~ msgid "seek: `%.*s' is not an open file, pipe, or co-process"
-#~ msgstr "close: \"%.*s\" är inte en öppen fil, rör eller koprocess"
+#~ msgid "must use `count$' on all formats or none"
+#~ msgstr "måste använda \"count$\" på alla eller inga format"
-#, fuzzy
-#~ msgid "seek: `%.*s' is not an input file, pipe, or co-process"
-#~ msgstr "close: \"%.*s\" är inte en öppen fil, rör eller koprocess"
+#~ msgid "`$' is not permitted in awk formats"
+#~ msgstr "\"$\" tillåts inte i awk-format"
-#, fuzzy
-#~ msgid "seek: `%.*s' is not a regular file"
-#~ msgstr "\"%s\" är inte ett giltigt variabelnamn"
+#~ msgid "arg count with `$' must be > 0"
+#~ msgstr "argumentantalet med \"$\" måste vara > 0"
-#~ msgid "use `PROCINFO[\"%s\"]' instead of `%s'"
-#~ msgstr "använd \"PROCINFO[\"%s\"]\" istället för \"%s\""
+#~ msgid "arg count %ld greater than total number of supplied arguments"
+#~ msgstr "argumentantalet %ld är större än antalet givna argument"
-#~ msgid "use `PROCINFO[...]' instead of `/dev/user'"
-#~ msgstr "använd \"PROCINFO[...]\" istället för \"dev/user\""
+#~ msgid "`$' not permitted after period in format"
+#~ msgstr "\"$\" tillåts inte efter en punkt i formatet"
-#~ msgid "function %s called\n"
-#~ msgstr "funktionen %s anropad\n"
+#~ msgid "no `$' supplied for positional field width or precision"
+#~ msgstr "inget \"$\" bifogat för positionsangiven fältbredd eller precision"
-#~ msgid "field %d in FIELDWIDTHS, must be > 0"
-#~ msgstr "fält %d i FIELDWIDTHS måste vara > 0"
+#~ msgid "`l' is meaningless in awk formats; ignored"
+#~ msgstr "\"l\" är meningslös i awk-format, ignorerad"
-#~ msgid "or used as a variable or an array"
-#~ msgstr "eller använd som variabel eller vektor"
+#~ msgid "`l' is not permitted in POSIX awk formats"
+#~ msgstr "\"l\" tillåts inte i POSIX awk-format"
-#~ msgid "regex match failed, not enough memory to match string \"%.*s%s\""
+#~ msgid "`L' is meaningless in awk formats; ignored"
+#~ msgstr "\"L\" är meningslös i awk-format, ignorerad"
+
+#~ msgid "`L' is not permitted in POSIX awk formats"
+#~ msgstr "\"L\" tillåts inte i POSIX awk-format"
+
+#~ msgid "`h' is meaningless in awk formats; ignored"
+#~ msgstr "\"h\" är meningslös i awk-format, ignorerad"
+
+#~ msgid "`h' is not permitted in POSIX awk formats"
+#~ msgstr "\"h\" tillåts inte i POSIX awk-format"
+
+#~ msgid "[s]printf: value %g is out of range for `%%%c' format"
#~ msgstr ""
-#~ "regexmatchning misslyckades, inte tillräckligt mycket minne för att "
-#~ "matcha \"%.*s%s\""
+#~ "[s]printf: värdet %g är utanför \"%%%c\"-formatets giltiga intervall"
-#~ msgid "substr: length %g is < 0"
-#~ msgstr "substr: längden %g är < 0"
+#~ msgid "not enough arguments to satisfy format string"
+#~ msgstr "för få argument för formatsträngen"
-#~ msgid "delete: illegal use of variable `%s' as array"
-#~ msgstr "delete: otillåten användning av variabeln \"%s\" som vektor"
+#~ msgid "^ ran out for this one"
+#~ msgstr "^ tog slut här"
+
+#~ msgid "[s]printf: format specifier does not have control letter"
+#~ msgstr "[s]printf: formatspecifieraren har ingen kommandobokstav"
+
+#~ msgid "too many arguments supplied for format string"
+#~ msgstr "för många argument för formatsträngen"
#, fuzzy
-#~ msgid "%s: gvar_ref to %s\n"
-#~ msgstr "%s: vektorreferens till %s\n"
+#~ msgid "attempt to use array parameter `%s' in a scalar context"
+#~ msgstr "försök att använda vektorn \"%s\" i skalärsammanhang"
-#~ msgid "asort: first argument is not an array"
-#~ msgstr "asort: första argumentet är inte en vektor"
+#~ msgid "can't open two way socket `%s' for input/output (%s)"
+#~ msgstr "kan inte öppna tvåvägsuttaget \"%s\" för in-/utmatning (%s)"
+
+#~ msgid ""
+#~ "concatenation: side effects in one expression have changed the length of "
+#~ "another!"
+#~ msgstr ""
+#~ "concatenation: sidoeffekter i ett uttryck har ändrat längden av ett annat!"
+
+#~ msgid "illegal type (%s) in tree_eval"
+#~ msgstr "otillåten typ (%s) i tree_eval"
-#~ msgid "asort: second argument is not an array"
-#~ msgstr "asort: andra argumentet är inte en vektor"
+#~ msgid "\t# -- main --\n"
+#~ msgstr "\t# -- main --\n"
+
+#~ msgid "invalid tree type %s in redirect()"
+#~ msgstr "ogiltig trädtyp %s i redirect()"
#, fuzzy
-#~ msgid ""
-#~ "attempt to use array parameter `%s' that was passed from global scalar `%"
-#~ "s'"
-#~ msgstr "försök att använda skalärparametern \"%s\" som en vektor"
+#~ msgid "# treated internally as `delete'"
+#~ msgstr "# behandlad internt som \"delete\""
+
+#~ msgid "# this is a dynamically loaded extension function"
+#~ msgstr "# detta är en dynamiskt inläst utökningsfunktion"
+
+#~ msgid "unexpected type %s in prec_level"
+#~ msgstr "oväntad typ %s i prec_level"
+
+#, fuzzy
+#~ msgid "Unknown node type %s in pp_var"
+#~ msgstr "okänd nodtyp %d"
+
+#~ msgid "%s: illegal option -- %c\n"
+#~ msgstr "%s: otillåten flagga -- %c\n"
+
+#~ msgid "delete: illegal use of variable `%s' as array"
+#~ msgstr "delete: otillåten användning av variabeln \"%s\" som vektor"
+
+#~ msgid "or used as a variable or an array"
+#~ msgstr "eller använd som variabel eller vektor"
+
+#~ msgid "substr: length %g is < 0"
+#~ msgstr "substr: längden %g är < 0"
+
+#~ msgid "function %s called\n"
+#~ msgstr "funktionen %s anropad\n"
+
+#~ msgid "field %d in FIELDWIDTHS, must be > 0"
+#~ msgstr "fält %d i FIELDWIDTHS måste vara > 0"
#~ msgid "internal error: Node_var_array with null vname"
#~ msgstr "internt fel: Node_var_vektor med null vname"
+#~ msgid "regex match failed, not enough memory to match string \"%.*s%s\""
+#~ msgstr ""
+#~ "regexmatchning misslyckades, inte tillräckligt mycket minne för att "
+#~ "matcha \"%.*s%s\""
+
#~ msgid ""
#~ "\n"
#~ "To report bugs, see node `Bugs' in `gawk.info', which is\n"
diff --git a/po/tr.gmo b/po/tr.gmo
index ad77514f..f22fc587 100644
--- a/po/tr.gmo
+++ b/po/tr.gmo
Binary files differ
diff --git a/po/tr.po b/po/tr.po
index 24d29ae9..64b6961f 100644
--- a/po/tr.po
+++ b/po/tr.po
@@ -6,7 +6,7 @@ msgid ""
msgstr ""
"Project-Id-Version: gawk 3.1.5f\n"
"Report-Msgid-Bugs-To: arnold@skeeve.com\n"
-"POT-Creation-Date: 2010-11-12 12:20+0200\n"
+"POT-Creation-Date: 2010-11-17 08:48+0200\n"
"PO-Revision-Date: 2007-05-19 19:32+0300\n"
"Last-Translator: Nilgün Belma Bugüner <nilgun@buguner.name.tr>\n"
"Language-Team: Turkish <gnu-tr-u12a@lists.sourceforge.net>\n"
@@ -15,398 +15,475 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: KBabel 1.11.4\n"
-#: array.c:112
+#: array.c:103
+#, c-format
+msgid "from %s"
+msgstr "%s'den"
+
+#: array.c:267
+#, fuzzy
+msgid "attempt to use a scalar value as array"
+msgstr "sayısal `%s' dizi olarak kullanılmaya çalışılıyor"
+
+#: array.c:270
#, c-format
msgid "attempt to use function `%s' as an array"
msgstr "`%s' işlevi dizi olarak kullanılmaya çalışılıyor"
-#: array.c:115
+#: array.c:273
#, c-format
msgid "attempt to use scalar parameter `%s' as an array"
msgstr "sayısal paramaetre `%s' bir dizi olarak kullanılmaya çalışılıyor"
-#: array.c:118
+#: array.c:276
#, c-format
msgid "attempt to use scalar `%s' as array"
msgstr "sayısal `%s' dizi olarak kullanılmaya çalışılıyor"
-#: array.c:156
+#: array.c:321 array.c:648 eval.c:1075 eval.c:1079 eval.c:1581 eval.c:1649
+#: eval.c:1928
#, c-format
-msgid "from %s"
-msgstr "%s'den"
+msgid "attempt to use array `%s' in a scalar context"
+msgstr "`%s' dizisi bir sayısal bağlamda kullanılmaya çalışılıyor"
-#: array.c:513
+#: array.c:570
#, fuzzy, c-format
msgid "reference to uninitialized element `%s[\"%.*s\"]'"
msgstr "ilklendirilmemiş öğeye ( %s[\"%s\"] ) başvuru yapılıyor"
-#: array.c:519
+#: array.c:576
#, c-format
msgid "subscript of array `%s' is null string"
msgstr "dizinin indisi `%s' bir null dizge"
-#: array.c:623
+#: array.c:684
#, c-format
msgid "delete: index `%s' not in array `%s'"
msgstr "delete: `%s' indeksi `%s' dizisinde deÄŸil"
-#: array.c:792
+#: array.c:705
+#, fuzzy, c-format
+msgid "attempt to use scalar `%s[\"%.*s\"]' as an array"
+msgstr "sayısal `%s' dizi olarak kullanılmaya çalışılıyor"
+
+#: array.c:868
#, c-format
msgid "%s: empty (null)\n"
msgstr "%s: boÅŸ (null)\n"
-#: array.c:797
+#: array.c:873
#, c-format
msgid "%s: empty (zero)\n"
msgstr "%s: boş (sıfır)\n"
-#: array.c:801
+#: array.c:877
#, c-format
msgid "%s: table_size = %d, array_size = %d\n"
msgstr "%s: tablo_uzunluÄŸu = %d, dizi_indisi = %d\n"
-#: array.c:830
+#: array.c:912
#, c-format
msgid "%s: is parameter\n"
msgstr "%s: parametredir\n"
-#: array.c:835
+#: array.c:916
#, c-format
msgid "%s: array_ref to %s\n"
msgstr "%s: %s için dizi başvurusu\n"
-#: awkgram.y:224 awkgram.y:227
+#: array.c:921
+#, fuzzy
+msgid "adump: argument not an array"
+msgstr "match: üçüncü argüman bir dizi değil"
+
+#: array.c:1139
+#, fuzzy
+msgid "attempt to use array in a scalar context"
+msgstr "`%s' dizisi bir sayısal bağlamda kullanılmaya çalışılıyor"
+
+#: array.c:1236
+#, fuzzy
+msgid "asort: second argument not an array"
+msgstr "split: ikinci argüman bir dizi değil"
+
+#: array.c:1237
+#, fuzzy
+msgid "asorti: second argument not an array"
+msgstr "split: ikinci argüman bir dizi değil"
+
+#: array.c:1245
+#, fuzzy
+msgid "asort: first argument not an array"
+msgstr "match: üçüncü argüman bir dizi değil"
+
+#: array.c:1246
+#, fuzzy
+msgid "asorti: first argument not an array"
+msgstr "match: üçüncü argüman bir dizi değil"
+
+#: awkgram.y:246
#, c-format
msgid "%s blocks must have an action part"
msgstr "%s blokları bir eylem bölümü içermeli"
-#: awkgram.y:230
+#: awkgram.y:249
msgid "each rule must have a pattern or an action part"
msgstr "her kural bir eylem bölümü veya bir kalıp içermeli"
-#: awkgram.y:266 awkgram.y:275
+#: awkgram.y:320 awkgram.y:330
msgid "old awk does not support multiple `BEGIN' or `END' rules"
msgstr "eski awk çok sayıda `BEGIN' veya `END' kuralını desteklemiyor"
-#: awkgram.y:304
+#: awkgram.y:367
#, c-format
msgid "`%s' is a built-in function, it cannot be redefined"
msgstr "`%s' bir yerleÅŸik iÅŸlevdir, yeniden atanamaz"
-#: awkgram.y:350
+#: awkgram.y:427
msgid "regexp constant `//' looks like a C++ comment, but is not"
msgstr "düzenli ifade sabiti `//' bir C++ açıklaması gibi görünüyor ama değil"
-#: awkgram.y:353
+#: awkgram.y:430
#, c-format
msgid "regexp constant `/%s/' looks like a C comment, but is not"
msgstr "düzenli ifade sabiti `/%s/' bir C açıklaması gibi görünüyor ama değil"
-#: awkgram.y:380 awkgram.y:692
-msgid "statement may have no effect"
-msgstr "deyim bir etkiye sahip olmayabilir"
+#: awkgram.y:735
+#, fuzzy
+msgid "`break' is not allowed outside a loop or switch"
+msgstr "döngü dışında `break' kullanımı yasak"
-#: awkgram.y:477 awkgram.y:480 awkgram.y:504 awkgram.y:511 awkgram.y:518
-#, c-format
-msgid "`%s' used in %s action"
+#: awkgram.y:744
+#, fuzzy
+msgid "`continue' is not allowed outside a loop"
+msgstr "döngü dışında `continue' kullanımı yasak"
+
+#: awkgram.y:753
+#, fuzzy, c-format
+msgid "`next' used in %s action"
msgstr "`%s' %s eyleminde kullanılmış"
-#: awkgram.y:495 awkgram.y:499
+#: awkgram.y:767 awkgram.y:771
msgid "`nextfile' is a gawk extension"
msgstr "`nextfile' bir gawk uzantısıdır"
-#: awkgram.y:528
+#: awkgram.y:775
+#, fuzzy, c-format
+msgid "`nextfile' used in %s action"
+msgstr "`%s' %s eyleminde kullanılmış"
+
+#: awkgram.y:799
msgid "`return' used outside function context"
msgstr "`return' işlev bağlamının dışında kullanılmış"
-#: awkgram.y:570
+#: awkgram.y:859
msgid "plain `print' in BEGIN or END rule should probably be `print \"\"'"
msgstr "BEGIN veya END kuralındaki `print' aslında `print \"\"' olmalıydı"
-#: awkgram.y:586 awkgram.y:594
+#: awkgram.y:927 awkgram.y:935
msgid "`delete array' is a gawk extension"
msgstr "`delete array' bir gawk uzantısıdır"
-#: awkgram.y:608 awkgram.y:616
+#: awkgram.y:955 awkgram.y:963
msgid "`delete(array)' is a non-portable tawk extension"
msgstr "`delete array' uyarlanabilir olmayan bir gawk uzantısıdır"
-#: awkgram.y:660
+#: awkgram.y:1004
#, c-format
msgid "duplicate case values in switch body: %s"
msgstr "switch içinde yinelenmiş case değerleri var: %s"
-#: awkgram.y:670
-msgid "Duplicate `default' detected in switch body"
+#: awkgram.y:1014
+#, fuzzy
+msgid "duplicate `default' detected in switch body"
msgstr "switch içinde yinelenmiş `default' saptandı"
-#: awkgram.y:759
+#: awkgram.y:1151
msgid "multistage two-way pipelines don't work"
msgstr "çok katlı iki yönlü veriyolları çalışmaz"
-#: awkgram.y:850
+#: awkgram.y:1253
msgid "regular expression on right of assignment"
msgstr "düzenli ifade atamanın sağında"
-#: awkgram.y:860
+#: awkgram.y:1263
msgid "regular expression on left of `~' or `!~' operator"
msgstr "düzenli ifade `~' ya da `!~' işlemiminin solunda"
-#: awkgram.y:866 awkgram.y:954
+#: awkgram.y:1278 awkgram.y:1423
msgid "old awk does not support the keyword `in' except after `for'"
msgstr "eski awk `for'dan sonra gelmeyen `in' anahtar sözcüğünü desteklemiyor"
-#: awkgram.y:872
+#: awkgram.y:1287
msgid "regular expression on right of comparison"
msgstr "düzenli ifade karşılaştırmanın sağında"
-#: awkgram.y:936
+#: awkgram.y:1399
#, c-format
-msgid "`getline var' invalid inside %s rule"
+msgid "`getline var' invalid inside `%s' rule"
msgstr ""
-#: awkgram.y:939
+#: awkgram.y:1401
#, c-format
-msgid "`getline' invalid inside %s rule"
+msgid "`getline' invalid inside `%s' rule"
msgstr ""
-#: awkgram.y:944
+#: awkgram.y:1407
msgid "non-redirected `getline' undefined inside END action"
msgstr "END eyleminin içinde yönlendirme yapmayan `getline' tanımsız"
-#: awkgram.y:955
+#: awkgram.y:1424
msgid "old awk does not support multidimensional arrays"
msgstr "eski awk çok boyutlu dizileri desteklemiyor"
-#: awkgram.y:1001
+#: awkgram.y:1528
msgid "call of `length' without parentheses is not portable"
msgstr "parantezsiz `length' çağrısı taşınabilir değil"
-#: awkgram.y:1006
-msgid "call of `length' without parentheses is deprecated by POSIX"
-msgstr "parantezsiz `length' çağrısı POSIX'e uygun değil"
-
-#: awkgram.y:1051
+#: awkgram.y:1591
#, fuzzy
msgid "indirect function calls are a gawk extension"
-msgstr "`extension' bir gawk uzantısıdır"
+msgstr "`nextfile' bir gawk uzantısıdır"
-#: awkgram.y:1084
-msgid "use of non-array as array"
-msgstr "dizi olmayan değişken dizi olarak kullanılmış"
+#: awkgram.y:1605
+#, fuzzy, c-format
+msgid "can not use special variable `%s' for indirect function call"
+msgstr "işlev `%s': işlev ismi parametre ismi olarak kullanılamaz"
-#: awkgram.y:1087
+#: awkgram.y:1682
msgid "invalid subscript expression"
msgstr "indis ifadesi geçersiz"
-#: awkgram.y:1329
+#: awkgram.y:1722
+msgid "use of non-array as array"
+msgstr "dizi olmayan değişken dizi olarak kullanılmış"
+
+#: awkgram.y:1993
msgid "unexpected newline or end of string"
msgstr "beklenmeyen satırsonu ya da dizge sonu"
-#: awkgram.y:1446
-msgid "empty program text on command line"
-msgstr "komut satırında boş program metni"
-
-#: awkgram.y:1502
+#: awkgram.y:2248 awkgram.y:2296 awkgram.y:2470
#, c-format
msgid "can't open source file `%s' for reading (%s)"
msgstr "kaynak dosyası `%s' okumak için açılamıyor (%s)"
-#: awkgram.y:1600
+#: awkgram.y:2249 awkgram.y:2297 builtin.c:122
+msgid "reason unknown"
+msgstr "sebebi bilinmiyor"
+
+#: awkgram.y:2257
+#, fuzzy, c-format
+msgid "already included source file `%s'"
+msgstr "kaynak dosyası `%s' okunamıyor (%s)"
+
+#: awkgram.y:2281
+#, fuzzy
+msgid "@include is a gawk extension"
+msgstr "`nextfile' bir gawk uzantısıdır"
+
+#: awkgram.y:2288
+msgid "empty filename after @include"
+msgstr ""
+
+#: awkgram.y:2422
+msgid "empty program text on command line"
+msgstr "komut satırında boş program metni"
+
+#: awkgram.y:2537
#, c-format
msgid "can't read sourcefile `%s' (%s)"
msgstr "kaynak dosyası `%s' okunamıyor (%s)"
-#: awkgram.y:1608
+#: awkgram.y:2547
#, c-format
msgid "source file `%s' is empty"
msgstr "kaynak dosyası `%s' boş"
-#: awkgram.y:1800 awkgram.y:1922 awkgram.y:1940 awkgram.y:2315 awkgram.y:2407
+#: awkgram.y:2732
msgid "source file does not end in newline"
msgstr "kaynak dosyasının sonunda satırsonu eksik"
-#: awkgram.y:1862
+#: awkgram.y:2809
msgid "unterminated regexp ends with `\\' at end of file"
msgstr "sonlandırılmamış düzenli ifade dosya sonunda `\\' ile bitiyor"
-#: awkgram.y:1886
+#: awkgram.y:2833
#, c-format
msgid "%s: %d: tawk regex modifier `/.../%c' doesn't work in gawk"
msgstr "%s: %d: tawk regex değiştirici `/.../%c' gawk'ta çalışmaz"
-#: awkgram.y:1890
+#: awkgram.y:2837
#, c-format
msgid "tawk regex modifier `/.../%c' doesn't work in gawk"
msgstr "tawk regex değiştirici `/.../%c' gawk'ta çalışmaz"
-#: awkgram.y:1897
+#: awkgram.y:2844
msgid "unterminated regexp"
msgstr "sonlandırılmamış düzenli ifade"
-#: awkgram.y:1900
+#: awkgram.y:2848
msgid "unterminated regexp at end of file"
msgstr "dosya sonunda sonlandırılmamış düzenli ifade"
-#: awkgram.y:1969
+#: awkgram.y:2907
msgid "use of `\\ #...' line continuation is not portable"
msgstr "`\\ #...' satır uzatma kullanımı taşınabilir değil"
-#: awkgram.y:1982
+#: awkgram.y:2923
msgid "backslash not last character on line"
msgstr "tersbölü satırdaki son karakter değil"
-#: awkgram.y:2027
+#: awkgram.y:2984
msgid "POSIX does not allow operator `**='"
msgstr "`**=' iÅŸlemimi POSIX uyumlu deÄŸil"
-#: awkgram.y:2029
+#: awkgram.y:2986
msgid "old awk does not support operator `**='"
msgstr "`**=' iÅŸlemimini eski awk desteklemiyor"
-#: awkgram.y:2038
+#: awkgram.y:2995
msgid "POSIX does not allow operator `**'"
msgstr "`**' iÅŸlemimi POSIX uyumlu deÄŸil"
-#: awkgram.y:2040
+#: awkgram.y:2997
msgid "old awk does not support operator `**'"
msgstr "`**' iÅŸlemimini eski awk desteklemiyor"
-#: awkgram.y:2071
+#: awkgram.y:3032
msgid "operator `^=' is not supported in old awk"
msgstr "`^=' iÅŸlemimini eski awk desteklemiyor"
-#: awkgram.y:2079
+#: awkgram.y:3040
msgid "operator `^' is not supported in old awk"
msgstr "`^' iÅŸlemimini eski awk desteklemiyor"
-#: awkgram.y:2163 awkgram.y:2178
+#: awkgram.y:3133 awkgram.y:3149
msgid "unterminated string"
msgstr "sonlandırılmamış dizge"
-#: awkgram.y:2368
+#: awkgram.y:3345
#, c-format
msgid "invalid char '%c' in expression"
msgstr "ifade içinde '%c' karakteri geçersiz"
-#: awkgram.y:2416
+#: awkgram.y:3391
#, c-format
msgid "`%s' is a gawk extension"
msgstr "`%s' bir gawk uzantısıdır"
-#: awkgram.y:2419
+#: awkgram.y:3394
#, c-format
msgid "`%s' is a Bell Labs extension"
msgstr "`%s' bir Bell Laboratuarları uzantısıdır"
-#: awkgram.y:2422
+#: awkgram.y:3397
#, c-format
msgid "POSIX does not allow `%s'"
msgstr "`%s' POSIX uyumlu deÄŸil"
-#: awkgram.y:2426
+#: awkgram.y:3401
#, c-format
msgid "`%s' is not supported in old awk"
msgstr "`%s' eski awk tarafından desteklemiyor"
-#: awkgram.y:2452
+#: awkgram.y:3465
msgid "`goto' considered harmful!\n"
msgstr "`goto' zararlı sayılır!\n"
-#: awkgram.y:2514
+#: awkgram.y:3518
#, c-format
msgid "%d is invalid as number of arguments for %s"
msgstr "%d argüman sayısı olarak %s için geçersiz"
-#: awkgram.y:2533 awkgram.y:2536
+#: awkgram.y:3544 awkgram.y:3547
msgid "match: third argument is a gawk extension"
msgstr "match: üçüncü argüman bir gawk uzantısı"
-#: awkgram.y:2549
+#: awkgram.y:3575
#, c-format
msgid "%s: string literal as last arg of substitute has no effect"
msgstr "%s: yerine kullanılan son argüman olarak dizge sabiti etkisiz"
-#: awkgram.y:2552
+#: awkgram.y:3580
#, c-format
msgid "%s third parameter is not a changeable object"
msgstr "üçüncü %s parametresi değiştirilebilir bir nesne değil"
-#: awkgram.y:2586 awkgram.y:2589
+#: awkgram.y:3665 awkgram.y:3668
msgid "close: second argument is a gawk extension"
msgstr "close: ikinci argüman bir gawk uzantısı"
-#: awkgram.y:2599
+#: awkgram.y:3680
msgid "use of dcgettext(_\"...\") is incorrect: remove leading underscore"
msgstr "dcgettext(_\"...\") kullanımı yanlış: altçizgiyi kaldırın"
-#: awkgram.y:2614
+#: awkgram.y:3695
msgid "use of dcngettext(_\"...\") is incorrect: remove leading underscore"
msgstr "dcngettext(_\"...\") kullanımı yanlış: altçizgiyi kaldırın"
-#: awkgram.y:2686
+#: awkgram.y:3787
#, c-format
msgid "function `%s': parameter #%d, `%s', duplicates parameter #%d"
msgstr "`%s' işlevi: %d. parametre, `%s', %d. parametrenin tekrarı"
-#: awkgram.y:2719
+#: awkgram.y:3829
#, c-format
msgid "function `%s': parameter `%s' shadows global variable"
msgstr "`%s' işlevi: parametre, `%s'global değişkeni gölgeliyor"
-#: awkgram.y:2831
+#: awkgram.y:3987
#, c-format
msgid "could not open `%s' for writing (%s)"
msgstr "`%s' yazmak için açılamadı (%s)"
-#: awkgram.y:2832 profile.c:96
+#: awkgram.y:3988 profile.c:85
msgid "sending profile to standard error"
msgstr "profil standart hataya gönderiliyor"
-#: awkgram.y:2864
+#: awkgram.y:3994
#, c-format
msgid "%s: close failed (%s)"
msgstr "%s: kapatma başarısız (%s)"
-#: awkgram.y:2985
+#: awkgram.y:4046
msgid "shadow_funcs() called twice!"
msgstr "shadow_funcs() iki kere çağrıldı!"
-#: awkgram.y:3012
+#: awkgram.y:4052
msgid "there were shadowed variables."
msgstr "gölgeli değişkenler vardı."
-#: awkgram.y:3085
+#: awkgram.y:4081
#, c-format
msgid "function `%s': can't use function name as parameter name"
msgstr "işlev `%s': işlev ismi parametre ismi olarak kullanılamaz"
-#: awkgram.y:3088
+#: awkgram.y:4086
#, fuzzy, c-format
msgid "function `%s': can't use special variable `%s' as a function parameter"
msgstr "işlev `%s': işlev ismi parametre ismi olarak kullanılamaz"
-#: awkgram.y:3098
+#: awkgram.y:4102
#, c-format
msgid "function name `%s' previously defined"
msgstr "işlev ismi `%s' önceden atanmış"
-#: awkgram.y:3249 awkgram.y:3255
+#: awkgram.y:4271 awkgram.y:4277
#, c-format
msgid "function `%s' called but never defined"
msgstr "`%s' işlevi çağrıldı ama hiç atanmamış"
-#: awkgram.y:3258
+#: awkgram.y:4280
#, c-format
msgid "function `%s' defined but never called"
msgstr "`%s' işlevi atanmış ama hiç çağrılmadı"
-#: awkgram.y:3285
+#: awkgram.y:4311
#, c-format
msgid "regexp constant for parameter #%d yields boolean value"
msgstr "%d numaralı argüman bir düzenli ifade sabiti"
-#: awkgram.y:3329
+#: awkgram.y:4420
#, c-format
msgid ""
"function `%s' called with space between name and `(',\n"
@@ -415,239 +492,146 @@ msgstr ""
"`%s' işlevi `(' ile isim arasında boşlukla çağrılmış,\n"
"ya da bir değişken veya bir dizi olarak kullanılmış"
-#: awkgram.y:3750
-#, fuzzy
-msgid "division by zero attempted in `/'"
-msgstr "`/='de sıfırla bölme hatası"
+#: awkgram.y:4673 eval.c:1845
+msgid "division by zero attempted"
+msgstr "sıfırla bölme hatası"
-#: awkgram.y:3755 eval.c:1411
+#: awkgram.y:4682 eval.c:1877
#, c-format
msgid "division by zero attempted in `%%'"
msgstr "`%%'de sıfırla bölme hatası"
-#: builtin.c:122
+#: awkgram.y:5342
+msgid "statement may have no effect"
+msgstr "deyim bir etkiye sahip olmayabilir"
+
+#: builtin.c:120
#, c-format
msgid "%s to \"%s\" failed (%s)"
msgstr "%s \"%s\"ya yazılamadı (%s)"
-#: builtin.c:123
+#: builtin.c:121
msgid "standard output"
msgstr "standart çıktı"
-#: builtin.c:124
-msgid "reason unknown"
-msgstr "sebebi bilinmiyor"
-
-#: builtin.c:137
+#: builtin.c:135
msgid "exp: received non-numeric argument"
msgstr "exp: sayısal olmayan argüman alındı"
-#: builtin.c:143
+#: builtin.c:141
#, c-format
msgid "exp: argument %g is out of range"
msgstr "exp: %g kapsamdışı"
-#: builtin.c:201
+#: builtin.c:200
#, c-format
msgid "fflush: cannot flush: pipe `%s' opened for reading, not writing"
msgstr ""
"fflush: kanala yazılamadı: veriyolu `%s' okumak için açıldı, yazmak için "
"deÄŸil"
-#: builtin.c:204
+#: builtin.c:203
#, c-format
msgid "fflush: cannot flush: file `%s' opened for reading, not writing"
msgstr ""
"fflush: kanala yazılamadı: dosya `%s' okumak için açıldı, yazmak için değil"
-#: builtin.c:216
+#: builtin.c:215
#, c-format
msgid "fflush: `%s' is not an open file, pipe or co-process"
msgstr "fflush: `%s' bir açık dosya, veriyolu ya da bir yan işlem değil"
-#: builtin.c:310
+#: builtin.c:322
msgid "index: received non-string first argument"
msgstr "index: ilk argüman dizge olmayan türde alındı"
-#: builtin.c:312
+#: builtin.c:324
msgid "index: received non-string second argument"
msgstr "index: ikinci argüman dizge olmayan türde alındı"
-#: builtin.c:434
+#: builtin.c:446
msgid "int: received non-numeric argument"
msgstr "int: sayısal olmayan argüman alındı"
-#: builtin.c:464
+#: builtin.c:469
+#, fuzzy
msgid "`length(array)' is a gawk extension"
msgstr "`length(array)' bir gawk uzantısıdır"
-#: builtin.c:471
-msgid "length: untyped parameter argument will be forced to scalar"
-msgstr ""
-
-#: builtin.c:480
-msgid "length: untyped argument will be forced to scalar"
-msgstr ""
-
-#: builtin.c:484
+#: builtin.c:477
msgid "length: received non-string argument"
msgstr "length: dizge olmayan argüman alındı"
-#: builtin.c:515
+#: builtin.c:508
msgid "log: received non-numeric argument"
msgstr "log: sayısal olmayan argüman alındı"
-#: builtin.c:518
+#: builtin.c:511
#, c-format
msgid "log: received negative argument %g"
msgstr "log: negatif argüman %g alındı"
-#: builtin.c:726 builtin.c:729
-msgid "must use `count$' on all formats or none"
-msgstr "tüm biçemlerde ya `count$' kullanmalısınız ya da hiçbir şey"
-
-#: builtin.c:790
-#, c-format
-msgid "field width is ignored for `%%%%' specifier"
-msgstr ""
-
-#: builtin.c:792
-#, c-format
-msgid "precision is ignored for `%%%%' specifier"
-msgstr ""
-
-#: builtin.c:794
-#, c-format
-msgid "field width and precision are ignored for `%%%%' specifier"
-msgstr ""
-
-#: builtin.c:845
-msgid "`$' is not permitted in awk formats"
-msgstr "`$' awk biçemlerde kullanılmaz"
-
-#: builtin.c:851
-msgid "arg count with `$' must be > 0"
-msgstr "`$' ile birlikte verilen argüman sayısı > 0 olmalıdır"
-
-#: builtin.c:853
-#, c-format
-msgid "arg count %ld greater than total number of supplied arguments"
-msgstr "argüman sayısı %ld sağlanmış toplam argüman sayısından büyük"
-
-#: builtin.c:855
-msgid "`$' not permitted after period in format"
-msgstr "`$' biçem içinde noktadan sonra kullanılmaz"
-
-#: builtin.c:868
-msgid "no `$' supplied for positional field width or precision"
-msgstr "konumsal alan genişliği ya da duyarlığı için `$' kullanılmamış"
-
-#: builtin.c:938
-msgid "`l' is meaningless in awk formats; ignored"
-msgstr "`l' awk biçemlerde anlamsız; yoksayıldı"
-
-#: builtin.c:942
-msgid "`l' is not permitted in POSIX awk formats"
-msgstr "`l' POSIX awk biçemlerde kullanılmaz"
-
-#: builtin.c:953
-msgid "`L' is meaningless in awk formats; ignored"
-msgstr "`L' awk biçemlerde anlamsız; yoksayıldı"
-
-#: builtin.c:957
-msgid "`L' is not permitted in POSIX awk formats"
-msgstr "`L' POSIX awk biçemlerde kullanılmaz"
-
-#: builtin.c:968
-msgid "`h' is meaningless in awk formats; ignored"
-msgstr "`h' awk biçemlerde anlamsız; yoksayıldı"
-
-#: builtin.c:972
-msgid "`h' is not permitted in POSIX awk formats"
-msgstr "`h' POSIX awk biçemlerde kullanılmaz"
-
-#: builtin.c:1252
-#, c-format
-msgid "[s]printf: value %g is out of range for `%%%c' format"
-msgstr "[s]printf: %g değeri `%%%c' biçimi için kapsamdışı"
-
-#: builtin.c:1332
-#, c-format
-msgid "ignoring unknown format specifier character `%c': no argument converted"
-msgstr ""
-
-#: builtin.c:1338
-msgid "not enough arguments to satisfy format string"
-msgstr "biçem dizgesini oluşturacak yeterli argüman yok"
-
-#: builtin.c:1340
-msgid "^ ran out for this one"
-msgstr "bir bunun için ^ tükendi"
-
-#: builtin.c:1346
-msgid "[s]printf: format specifier does not have control letter"
-msgstr "[s]printf: biçem belirteci denetim karakteri içermiyor"
-
-#: builtin.c:1349
-msgid "too many arguments supplied for format string"
-msgstr "biçem dizgesi için çok fazla argüman sağlanmış"
+#: builtin.c:531 builtin.c:573 builtin.c:586 builtin.c:982 builtin.c:994
+#, fuzzy, c-format
+msgid "attempt to use array `%s' in scalar context"
+msgstr "`%s' dizisi bir sayısal bağlamda kullanılmaya çalışılıyor"
-#: builtin.c:1424 builtin.c:1427
+#: builtin.c:569 builtin.c:580
msgid "printf: no arguments"
msgstr "printf: argüman yok"
-#: builtin.c:1451
+#: builtin.c:621
msgid "sqrt: received non-numeric argument"
msgstr "sqrt: sayısal olmayan argüman alındı"
-#: builtin.c:1455
+#: builtin.c:625
#, c-format
msgid "sqrt: called with negative argument %g"
msgstr "sqrt: negatif argüman %g ile çağrıldı"
-#: builtin.c:1479
-#, c-format
-msgid "substr: start index %g is invalid, using 1"
-msgstr "substr: başlangıç indeksi olarak %g geçersiz, 1 kullanılıyor"
-
-#: builtin.c:1484
-#, c-format
-msgid "substr: non-integer start index %g will be truncated"
-msgstr ""
-"substr: tamsayı olmayan başlangıç indeksi %g den ondalık kısım çıkarılacak"
-
-#: builtin.c:1510
+#: builtin.c:649
#, c-format
msgid "substr: length %g is not >= 1"
msgstr "substr: uzunluk %g >= 1 deÄŸil"
-#: builtin.c:1512
+#: builtin.c:651
#, c-format
msgid "substr: length %g is not >= 0"
msgstr "substr: uzunluk %g => 0 deÄŸil"
-#: builtin.c:1519
+#: builtin.c:658
#, c-format
msgid "substr: non-integer length %g will be truncated"
msgstr "substr: tamsayı olmayan uzunluk %g den ondalık kısım çıkarılacak"
-#: builtin.c:1524
+#: builtin.c:663
#, c-format
msgid "substr: length %g too big for string indexing, truncating to %g"
msgstr ""
"substr: dizge indislemesi için uzunluk olarak %g çok fazla, %g den sonrası "
"gözardı ediliyor"
-#: builtin.c:1536
+#: builtin.c:675
+#, c-format
+msgid "substr: start index %g is invalid, using 1"
+msgstr "substr: başlangıç indeksi olarak %g geçersiz, 1 kullanılıyor"
+
+#: builtin.c:680
+#, c-format
+msgid "substr: non-integer start index %g will be truncated"
+msgstr ""
+"substr: tamsayı olmayan başlangıç indeksi %g den ondalık kısım çıkarılacak"
+
+#: builtin.c:705
msgid "substr: source string is zero length"
msgstr "substr: kaynak dizge sıfır uzunlukta"
-#: builtin.c:1552
+#: builtin.c:721
#, c-format
msgid "substr: start index %g is past end of string"
msgstr "substr: başlangıç indisi %g dizgenin sonundan sonra"
-#: builtin.c:1560
+#: builtin.c:729
#, c-format
msgid ""
"substr: length %g at start index %g exceeds length of first argument (%lu)"
@@ -655,474 +639,434 @@ msgstr ""
"substr: uzunluk %g, %g başlangıç indisinde ilk argümanın uzunluğunu (%lu) "
"aÅŸar"
-#: builtin.c:1637
+#: builtin.c:806
+msgid "strftime: received non-numeric second argument"
+msgstr "strftime: ikinci argüman sayısal olmayan türde alındı"
+
+#: builtin.c:813
msgid "strftime: received non-string first argument"
msgstr "strftime: ilk argüman dizge olmayan türde alındı"
-#: builtin.c:1643
+#: builtin.c:819
msgid "strftime: received empty format string"
msgstr "strftime: boş biçem dizgesi alındı"
-#: builtin.c:1652
-msgid "strftime: received non-numeric second argument"
-msgstr "strftime: ikinci argüman sayısal olmayan türde alındı"
-
-#: builtin.c:1729
+#: builtin.c:885
msgid "mktime: received non-string argument"
msgstr "mktime: dizge olmayan argüman alındı"
-#: builtin.c:1746
+#: builtin.c:902
msgid "mktime: at least one of the values is out of the default range"
msgstr ""
-#: builtin.c:1781
+#: builtin.c:937
msgid "'system' function not allowed in sandbox mode"
msgstr ""
-#: builtin.c:1786
+#: builtin.c:942
msgid "system: received non-string argument"
msgstr "system: dizge olmayan argüman alındı"
-#: builtin.c:1907 eval.c:2285
+#: builtin.c:997 eval.c:1105 eval.c:1557 eval.c:1570
+#, c-format
+msgid "reference to uninitialized variable `%s'"
+msgstr "öndeğer ataması yapılmamış `%s' değişkenine başvuru"
+
+#: builtin.c:1064
#, c-format
msgid "reference to uninitialized field `$%d'"
msgstr "ilklendirilmemiş `$%d' alanına başvuru"
-#: builtin.c:2012
+#: builtin.c:1098
msgid "tolower: received non-string argument"
msgstr "tolower: dizge olmayan argüman alındı"
-#: builtin.c:2042
+#: builtin.c:1151
msgid "toupper: received non-string argument"
msgstr "toupper: dizge olmayan argüman alındı"
-#: builtin.c:2075
+#: builtin.c:1199
msgid "atan2: received non-numeric first argument"
msgstr "atan2: ilk argüman sayısal olmayan türde alındı"
-#: builtin.c:2077
+#: builtin.c:1201
msgid "atan2: received non-numeric second argument"
msgstr "atan2: ikinci argüman sayısal olmayan türde alındı"
-#: builtin.c:2096
+#: builtin.c:1220
msgid "sin: received non-numeric argument"
msgstr "sin: sayısal olmayan argüman alındı"
-#: builtin.c:2112
+#: builtin.c:1236
msgid "cos: received non-numeric argument"
msgstr "cos: sayısal olmayan argüman alındı"
-#: builtin.c:2165
+#: builtin.c:1289
msgid "srand: received non-numeric argument"
msgstr "srand: sayısal olmayan argüman alındı"
-#: builtin.c:2200
+#: builtin.c:1320
msgid "match: third argument is not an array"
msgstr "match: üçüncü argüman bir dizi değil"
-#: builtin.c:2750
+#: builtin.c:1827
msgid "gensub: third argument of 0 treated as 1"
msgstr "gensub: 0 olan 3. argüman 1 kabul edildi"
-#: builtin.c:2866
+#: builtin.c:1869
msgid "lshift: received non-numeric first argument"
msgstr "lshift: ilk argüman sayısal olmayan türde alındı"
-#: builtin.c:2868
+#: builtin.c:1871
msgid "lshift: received non-numeric second argument"
msgstr "lshift: ikinci argüman sayısal değil"
-#: builtin.c:2874
+#: builtin.c:1877
#, c-format
msgid "lshift(%lf, %lf): negative values will give strange results"
msgstr "lshift(%lf, %lf): negatif değerler tuhaf sonuçlar verecek"
-#: builtin.c:2876
+#: builtin.c:1879
#, c-format
msgid "lshift(%lf, %lf): fractional values will be truncated"
msgstr "lshift(%lf, %lf): tamsayı kısım kalacak şekilde kalanı atılacak"
-#: builtin.c:2878
+#: builtin.c:1881
#, c-format
msgid "lshift(%lf, %lf): too large shift value will give strange results"
msgstr "lshift(%lf, %lf): çok büyük kaydırma değeri tuhaf sonuçlar verecek"
-#: builtin.c:2904
+#: builtin.c:1908
msgid "rshift: received non-numeric first argument"
msgstr "rshift: ilk argüman sayısal olmayan türde alındı"
-#: builtin.c:2906
+#: builtin.c:1910
msgid "rshift: received non-numeric second argument"
msgstr "rshift: ikinci argüman sayısal değil"
-#: builtin.c:2912
+#: builtin.c:1916
#, c-format
msgid "rshift(%lf, %lf): negative values will give strange results"
msgstr "rshift(%lf, %lf): negatif değerler tuhaf sonuçlar verecek"
-#: builtin.c:2914
+#: builtin.c:1918
#, c-format
msgid "rshift(%lf, %lf): fractional values will be truncated"
msgstr "rshift(%lf, %lf): tamsayı kısım kalacak şekilde kalanı atılacak"
-#: builtin.c:2916
+#: builtin.c:1920
#, c-format
msgid "rshift(%lf, %lf): too large shift value will give strange results"
msgstr "rshift(%lf, %lf): çok büyük kaydırma değeri tuhaf sonuçlar verecek"
-#: builtin.c:2942
+#: builtin.c:1947
msgid "and: received non-numeric first argument"
msgstr "and: ilk argüman sayısal olmayan türde alındı"
-#: builtin.c:2944
+#: builtin.c:1949
msgid "and: received non-numeric second argument"
msgstr "and: ikinci argüman sayısal değil"
-#: builtin.c:2950
+#: builtin.c:1955
#, c-format
msgid "and(%lf, %lf): negative values will give strange results"
msgstr "and(%lf, %lf): negatif değerler tuhaf sonuçlar verecek"
-#: builtin.c:2952
+#: builtin.c:1957
#, c-format
msgid "and(%lf, %lf): fractional values will be truncated"
msgstr "and(%lf, %lf): tamsayı kısım kalacak şekilde kalanı atılacak"
-#: builtin.c:2978
+#: builtin.c:1984
msgid "or: received non-numeric first argument"
msgstr "or: ilk argüman sayısal olmayan türde alındı"
-#: builtin.c:2980
+#: builtin.c:1986
msgid "or: received non-numeric second argument"
msgstr "or: ikinci argüman sayısal değil"
-#: builtin.c:2986
+#: builtin.c:1992
#, c-format
msgid "or(%lf, %lf): negative values will give strange results"
msgstr "or(%lf, %lf): negatif değerler tuhaf sonuçlar verecek"
-#: builtin.c:2988
+#: builtin.c:1994
#, c-format
msgid "or(%lf, %lf): fractional values will be truncated"
msgstr "or(%lf, %lf): tamsayı kısım kalacak şekilde kalanı atılacak"
-#: builtin.c:3014
+#: builtin.c:2023
msgid "xor: received non-numeric first argument"
msgstr "xor: ilk argüman sayısal olmayan türde alındı"
-#: builtin.c:3016
+#: builtin.c:2025
msgid "xor: received non-numeric second argument"
msgstr "xor: ikinci argüman sayısal değil"
-#: builtin.c:3022
+#: builtin.c:2031
#, c-format
msgid "xor(%lf, %lf): negative values will give strange results"
msgstr "xor(%lf, %lf): negatif değerler tuhaf sonuçlar verecek"
-#: builtin.c:3024
+#: builtin.c:2033
#, c-format
msgid "xor(%lf, %lf): fractional values will be truncated"
msgstr "xor(%lf, %lf): tamsayı kısım kalacak şekilde kalanı atılacak"
-#: builtin.c:3048
+#: builtin.c:2057 builtin.c:2063
msgid "compl: received non-numeric argument"
msgstr "compl: sayısal olmayan argüman alındı"
-#: builtin.c:3054
+#: builtin.c:2065
#, c-format
msgid "compl(%lf): negative value will give strange results"
msgstr "compl(%lf): negatif değerler tuhaf sonuçlar verecek"
-#: builtin.c:3056
+#: builtin.c:2067
#, c-format
msgid "compl(%lf): fractional value will be truncated"
msgstr "compl(%lf): tamsayı kısım kalacak şekilde kalanı atılacak"
-#: builtin.c:3229
+#: builtin.c:2237
#, c-format
msgid "dcgettext: `%s' is not a valid locale category"
msgstr "dcgettext: `%s' geçerli bir yerel kategori değil"
-#: eval.c:374
+#: eval.c:412
#, c-format
msgid "unknown nodetype %d"
msgstr "%d. düğümtürü bilinmiyor"
-#: eval.c:423
-msgid "buffer overflow in genflags2str"
-msgstr "genflags2str içinde tampon taştı"
+#: eval.c:423 eval.c:437
+#, fuzzy, c-format
+msgid "unknown opcode %d"
+msgstr "%d. düğümtürü bilinmiyor"
-#: eval.c:455 eval.c:461 profile.c:787
+#: eval.c:434
#, c-format
-msgid "attempt to use array `%s' in a scalar context"
-msgstr "`%s' dizisi bir sayısal bağlamda kullanılmaya çalışılıyor"
+msgid "opcode %s not an operator or keyword"
+msgstr ""
-#: eval.c:803
+#: eval.c:487
+msgid "buffer overflow in genflags2str"
+msgstr "genflags2str içinde tampon taştı"
+
+#: eval.c:613
#, c-format
-msgid "for loop: array `%s' changed size from %ld to %ld during loop execution"
+msgid ""
+"\n"
+"\t# Function Call Stack:\n"
+"\n"
msgstr ""
-"for loop: `%s' dizisinin boyu döngünün yorumlanması sırasında %ld iken %ld "
-"oldu"
-
-#: eval.c:824
-msgid "`break' outside a loop is not portable"
-msgstr "döngü dışında `break' kullanımı taşınabilir değil"
+"\n"
+"\t# İşlev Çağrı Yığını:\n"
+"\n"
-#: eval.c:828
-msgid "`break' outside a loop is not allowed"
-msgstr "döngü dışında `break' kullanımı yasak"
+#: eval.c:640
+msgid "`IGNORECASE' is a gawk extension"
+msgstr "`IGNORECASE' bir gawk uzantısıdır"
-#: eval.c:845
-msgid "`continue' outside a loop is not portable"
-msgstr "döngü dışında `continue' kullanımı taşınabilir değil"
+#: eval.c:669
+msgid "`BINMODE' is a gawk extension"
+msgstr "`BINMODE' bir gawk uzantısıdır"
-#: eval.c:849
-msgid "`continue' outside a loop is not allowed"
-msgstr "döngü dışında `continue' kullanımı yasak"
+#: eval.c:727
+#, c-format
+msgid "BINMODE value `%s' is invalid, treated as 3"
+msgstr ""
-#: eval.c:883
-msgid "`next' cannot be called from a BEGIN rule"
-msgstr "`next' bir BEGIN kuralından çağrılamaz"
+#: eval.c:817
+#, c-format
+msgid "bad `%sFMT' specification `%s'"
+msgstr "`%sFMT' özelliği `%s' hatalı"
-#: eval.c:885
-msgid "`next' cannot be called from an END rule"
-msgstr "`next' bir END kuralından çağrılamaz"
+#: eval.c:895
+msgid "turning off `--lint' due to assignment to `LINT'"
+msgstr "`LINT' atamasından dolayı `--lint' kapatılıyor"
-#: eval.c:887
-#, fuzzy
-msgid "`next' cannot be called from a BEGINFILE rule"
-msgstr "`next' bir BEGIN kuralından çağrılamaz"
+#: eval.c:1067 eval.c:1544
+#, c-format
+msgid "can't use function name `%s' as variable or array"
+msgstr "`%s' işlev ismi bir değişken ya da dizi olarak kullanılamaz"
-#: eval.c:889
-#, fuzzy
-msgid "`next' cannot be called from an ENDFILE rule"
-msgstr "`next' bir END kuralından çağrılamaz"
+#: eval.c:1095
+msgid "assignment is not allowed to result of builtin function"
+msgstr "deÄŸiÅŸken ismine yerleÅŸik iÅŸlevin sonucu atanamaz"
-#: eval.c:898
-msgid "`nextfile' cannot be called from a BEGIN rule"
-msgstr "`nextfile' bir BEGIN kuralından çağrılamaz"
+#: eval.c:1104 eval.c:1556 eval.c:1569
+#, c-format
+msgid "reference to uninitialized argument `%s'"
+msgstr "başlangıç değeri olmayan `%s' argümanına başvuru"
-#: eval.c:900
-msgid "`nextfile' cannot be called from an END rule"
-msgstr "`nextfile' bir END kuralından çağrılamaz"
+#: eval.c:1123
+msgid "attempt to field reference from non-numeric value"
+msgstr "sayısal olmayan değerden alan başvurusu"
-#: eval.c:906
+#: eval.c:1125
#, fuzzy
-msgid "`nextfile' cannot be called from an ENDFILE rule"
-msgstr "`nextfile' bir END kuralından çağrılamaz"
+msgid "attempt to field reference from null string"
+msgstr "null dizgeden alan baÅŸvurusu"
-#: eval.c:963
-msgid "statement has no effect"
-msgstr "deyim etkisiz"
+#: eval.c:1131
+#, fuzzy, c-format
+msgid "attempt to access field %ld"
+msgstr "%d. alana erişilmeye çalışılıyor"
-#: eval.c:1040 eval.c:2133
-#, c-format
-msgid "can't use function name `%s' as variable or array"
-msgstr "`%s' işlev ismi bir değişken ya da dizi olarak kullanılamaz"
+#: eval.c:1140
+#, fuzzy, c-format
+msgid "reference to uninitialized field `$%ld'"
+msgstr "ilklendirilmemiş `$%d' alanına başvuru"
-#: eval.c:1047 eval.c:1053
+#: eval.c:1202
#, c-format
-msgid "reference to uninitialized argument `%s'"
-msgstr "başlangıç değeri olmayan `%s' argümanına başvuru"
+msgid "function `%s' called with more arguments than declared"
+msgstr "`%s' işlevi bildirilenden daha fazla argümanla çağrıldı"
-#: eval.c:1062 eval.c:2142
+#: eval.c:1358
#, c-format
-msgid "reference to uninitialized variable `%s'"
-msgstr "öndeğer ataması yapılmamış `%s' değişkenine başvuru"
-
-#: eval.c:1210
-msgid ""
-"concatenation: side effects in one expression have changed the length of "
-"another!"
+msgid "unwind_stack: unexpected type `%s'"
msgstr ""
-"bitiÅŸtirme: bir ifadenin yan etkileri diÄŸerinin uzunluÄŸunu deÄŸiÅŸtirmiÅŸ!"
-#: eval.c:1315
+#: eval.c:1636
+#, fuzzy, c-format
+msgid "attempt to use scalar `%s' as an array"
+msgstr "sayısal `%s' dizi olarak kullanılmaya çalışılıyor"
+
+#: eval.c:1680
msgid "assignment used in conditional context"
msgstr "koşul bağlamında atama yapılmış"
-#: eval.c:1396
-msgid "division by zero attempted"
-msgstr "sıfırla bölme hatası"
-
-#: eval.c:1426 profile.c:663
-#, c-format
-msgid "illegal type (%s) in tree_eval"
-msgstr "tree_eval içinde kuraldışı tür (%s)"
+#: eval.c:1684
+msgid "statement has no effect"
+msgstr "deyim etkisiz"
-#: eval.c:1589
+#: eval.c:2028
msgid "division by zero attempted in `/='"
msgstr "`/='de sıfırla bölme hatası"
-#: eval.c:1611
+#: eval.c:2053
#, c-format
msgid "division by zero attempted in `%%='"
msgstr "`%%='de sıfırla bölme hatası"
-#: eval.c:1891
-#, c-format
-msgid "function `%s' called with more arguments than declared"
-msgstr "`%s' işlevi bildirilenden daha fazla argümanla çağrıldı"
-
-#: eval.c:1948
-#, c-format
-msgid "function `%s' not defined"
-msgstr "`%s' işlevi tanımsız"
-
-#: eval.c:1950
-#, c-format
-msgid "identifier `%s' is not a function"
-msgstr ""
-
-#: eval.c:1997
-#, c-format
-msgid ""
-"function parameter `%s' is not a scalar and cannot be used for indirect "
-"function call"
-msgstr ""
-
-#: eval.c:2014
-#, c-format
-msgid "indirect call of real function `%s' is silly"
-msgstr ""
+#: eval.c:2139
+msgid "`continue' outside a loop is not allowed"
+msgstr "döngü dışında `continue' kullanımı yasak"
-#: eval.c:2034
-#, c-format
-msgid "function `%s' called indirectly through `%s' does not exist"
-msgstr ""
+#: eval.c:2145
+#, fuzzy
+msgid "`break' outside a loop is not allowed"
+msgstr "döngü dışında `break' kullanımı yasak"
-#: eval.c:2039
+#: eval.c:2229
#, c-format
-msgid "identifier `%s' cannot be used for indirect function call"
+msgid "for loop: array `%s' changed size from %ld to %ld during loop execution"
msgstr ""
+"for loop: `%s' dizisinin boyu döngünün yorumlanması sırasında %ld iken %ld "
+"oldu"
-#: eval.c:2105
+#: eval.c:2342
#, c-format
-msgid ""
-"\n"
-"\t# Function Call Stack:\n"
-"\n"
+msgid "function called indirectly through `%s' does not exist"
msgstr ""
-"\n"
-"\t# İşlev Çağrı Yığını:\n"
-"\n"
-
-#: eval.c:2108
-#, c-format
-msgid "\t# -- main --\n"
-msgstr "\t# -- main --\n"
-
-#: eval.c:2269
-msgid "attempt to field reference from non-numeric value"
-msgstr "sayısal olmayan değerden alan başvurusu"
-#: eval.c:2271
-msgid "attempt to reference from null string"
-msgstr "null dizgeden alan baÅŸvurusu"
-
-#: eval.c:2277
+#: eval.c:2354
#, c-format
-msgid "attempt to access field %d"
-msgstr "%d. alana erişilmeye çalışılıyor"
-
-#: eval.c:2298 eval.c:2305 profile.c:843
-msgid "assignment is not allowed to result of builtin function"
-msgstr "deÄŸiÅŸken ismine yerleÅŸik iÅŸlevin sonucu atanamaz"
+msgid "function `%s' not defined"
+msgstr "`%s' işlevi tanımsız"
-#: eval.c:2369
-msgid "`IGNORECASE' is a gawk extension"
-msgstr "`IGNORECASE' bir gawk uzantısıdır"
+#: eval.c:2481
+#, fuzzy, c-format
+msgid "`nextfile' cannot be called from a `%s' rule"
+msgstr "`nextfile' bir END kuralından çağrılamaz"
-#: eval.c:2398
-msgid "`BINMODE' is a gawk extension"
-msgstr "`BINMODE' bir gawk uzantısıdır"
+#: eval.c:2540
+#, fuzzy, c-format
+msgid "`next' cannot be called from a `%s' rule"
+msgstr "`next' bir END kuralından çağrılamaz"
-#: eval.c:2456
+#: eval.c:2602
#, c-format
-msgid "BINMODE value `%s' is invalid, treated as 3"
+msgid "Sorry, don't know how to interpret `%s'"
msgstr ""
-#: eval.c:2546
-#, c-format
-msgid "bad `%sFMT' specification `%s'"
-msgstr "`%sFMT' özelliği `%s' hatalı"
-
-#: eval.c:2624
-msgid "turning off `--lint' due to assignment to `LINT'"
-msgstr "`LINT' atamasından dolayı `--lint' kapatılıyor"
-
-#: ext.c:61
-msgid "extensions not allowed in sandbox mode"
+#: ext.c:62
+msgid "extensions are not allowed in sandbox mode"
msgstr ""
-#: ext.c:65 ext.c:70
+#: ext.c:68 ext.c:73
msgid "`extension' is a gawk extension"
msgstr "`extension' bir gawk uzantısıdır"
-#: ext.c:80
-#, c-format
-msgid "extension: cannot open `%s' (%s)\n"
+#: ext.c:83
+#, fuzzy, c-format
+msgid "fatal: extension: cannot open `%s' (%s)\n"
msgstr "extension: `%s' açılamıyor (%s)\n"
-#: ext.c:88
-#, c-format
-msgid "extension: library `%s': cannot call function `%s' (%s)\n"
+#: ext.c:93
+#, fuzzy, c-format
+msgid "fatal: extension: library `%s': cannot call function `%s' (%s)\n"
msgstr "extension: kitaplık `%s': `%s' işlevi çağrılamıyor (%s)\n"
-#: ext.c:108
+#: ext.c:123
msgid "extension: missing function name"
msgstr "extension: iÅŸlev ismi eksik"
-#: ext.c:113
+#: ext.c:128
#, c-format
msgid "extension: illegal character `%c' in function name `%s'"
msgstr "extension: `%2$s' işlevindeki `%1$c' karakteri kuraldışı"
-#: ext.c:119
+#: ext.c:137
#, c-format
msgid "extension: can't redefine function `%s'"
msgstr "extension: `%s' işlevi yeniden tanımlanamaz"
-#: ext.c:123
+#: ext.c:141
#, c-format
msgid "extension: function `%s' already defined"
msgstr "extension: `%s' işlevi zaten tanımlı"
-#: ext.c:128
+#: ext.c:146
+#, c-format
+msgid "extension: function name `%s' previously defined"
+msgstr "extension: işlev ismi `%s' evvelce tanımlanmış"
+
+#: ext.c:148
#, c-format
msgid "extension: can't use gawk built-in `%s' as function name"
msgstr "extension: bir gawk yerleÅŸiÄŸi olan `%s' iÅŸlev ismi olamaz"
-#: ext.c:130
+#: ext.c:152
#, c-format
-msgid "extension: function name `%s' previously defined"
-msgstr "extension: işlev ismi `%s' evvelce tanımlanmış"
+msgid "make_builtin: negative argument count for function `%s'"
+msgstr ""
-#: ext.c:207
-#, c-format
+#: ext.c:255
+#, fuzzy, c-format
msgid "function `%s' defined to take no more than %d argument(s)"
msgstr "`%s' işlevi en çok `%d' argüman alabilecek şekilde tanımlı"
-#: ext.c:210
+#: ext.c:258
#, c-format
msgid "function `%s': missing argument #%d"
msgstr "`%s' işlevi: %d. argüman eksik"
-#: ext.c:220
+#: ext.c:268
#, c-format
msgid "function `%s': argument #%d: attempt to use scalar as an array"
msgstr ""
"`%s' işlevi: %d. argüman: tek değerli değişken bir dizi olarak kullanılmaya "
"çalışılıyor"
-#: ext.c:224
+#: ext.c:272
#, c-format
msgid "function `%s': argument #%d: attempt to use array as a scalar"
msgstr ""
"`%s' işlevi: %d. argüman: dizi tek değerli bir değişken olarak kullanılmaya "
"çalışılıyor"
-#: ext.c:249
+#: ext.c:285
msgid "Operation Not Supported"
msgstr "Ä°ÅŸlem Desteklenmiyor"
@@ -1130,58 +1074,57 @@ msgstr "Ä°ÅŸlem Desteklenmiyor"
msgid "NF set to negative value"
msgstr "NF negatif değere ayarlı"
-#: field.c:913
-msgid "split: second argument is not an array"
-msgstr "split: ikinci argüman bir dizi değil"
-
-#: field.c:922 field.c:932 field.c:937
+#: field.c:939 field.c:946 field.c:950
#, fuzzy
msgid "split: fourth argument is a gawk extension"
msgstr "match: üçüncü argüman bir gawk uzantısı"
-#: field.c:928
+#: field.c:943
#, fuzzy
msgid "split: fourth argument is not an array"
msgstr "split: ikinci argüman bir dizi değil"
-#: field.c:975
-#, fuzzy
-msgid "split: null string for third argument is a gawk extension"
+#: field.c:957
+msgid "split: second argument is not an array"
+msgstr "split: ikinci argüman bir dizi değil"
+
+#: field.c:987
+msgid "split: null string for third arg is a gawk extension"
msgstr "split: üçüncü argüman olan null dizge bir gawk uzantısı"
-#: field.c:1032
+#: field.c:1028
#, fuzzy
-msgid "patsplit: second argument is not an array"
+msgid "patsplit: fourth argument is not an array"
msgstr "split: ikinci argüman bir dizi değil"
-#: field.c:1041
+#: field.c:1033
#, fuzzy
-msgid "patsplit: fourth argument is not an array"
+msgid "patsplit: second argument is not an array"
msgstr "split: ikinci argüman bir dizi değil"
-#: field.c:1067
+#: field.c:1051
#, fuzzy
msgid "patsplit: third argument must be non-null"
msgstr "match: üçüncü argüman bir dizi değil"
-#: field.c:1111
+#: field.c:1084
msgid "`FIELDWIDTHS' is a gawk extension"
msgstr "`FIELDWIDTHS' bir gawk uzantısıdır"
-#: field.c:1141 field.c:1155
+#: field.c:1147
#, c-format
msgid "invalid FIELDWIDTHS value, near `%s'"
msgstr "`%s' yanında FIELDWIDTHS değeri geçersiz"
-#: field.c:1238
+#: field.c:1220
msgid "null string for `FS' is a gawk extension"
msgstr "`FS' için null dizge bir gawk uzantısıdır"
-#: field.c:1242
+#: field.c:1224
msgid "old awk does not support regexps as value of `FS'"
msgstr "eski awk düzenli ifadeleri `FS' değeriyle desteklemiyor"
-#: field.c:1357
+#: field.c:1343
#, fuzzy
msgid "`FPAT' is a gawk extension"
msgstr "`%s' bir gawk uzantısıdır"
@@ -1241,501 +1184,498 @@ msgstr "%s: `-W %s' seçeneği argümansız kullanılır\n"
msgid "%s: option '-W %s' requires an argument\n"
msgstr "%s: `%s' seçeneği bir argümanla kullanılır\n"
-#: io.c:379
+#: io.c:272
#, c-format
msgid "command line argument `%s' is a directory: skipped"
msgstr ""
-#: io.c:413
+#: io.c:275 io.c:372
#, c-format
msgid "cannot open file `%s' for reading (%s)"
msgstr "`%s' okumak için açılamıyor (%s)"
-#: io.c:459 io.c:2999
+#: io.c:419
#, c-format
msgid "error reading input file `%s': %s"
msgstr "`%s' girdi dosyası okunurken hata: %s"
-#: io.c:506
+#: io.c:470
#, c-format
msgid "close of fd %d (`%s') failed (%s)"
msgstr "dosya tanımlayıcı %d (`%s') başarısız (%s)"
-#: io.c:617
-msgid "redirection not allowed in sandbox mode"
-msgstr ""
-
-#: io.c:648
-#, c-format
-msgid "invalid tree type %s in redirect()"
-msgstr "redirect() içindeki ağaç türü %s geçersiz"
-
-#: io.c:654
+#: io.c:577
#, c-format
msgid "expression in `%s' redirection only has numeric value"
msgstr "`%s' yönlendirmesi içindeki ifade sadece sayısal değer içeriyor"
-#: io.c:660
+#: io.c:583
#, c-format
msgid "expression for `%s' redirection has null string value"
msgstr "`%s' yönlendirmesi içindeki ifade null dizge değeri içeriyor"
-#: io.c:665
+#: io.c:589
#, c-format
msgid "filename `%s' for `%s' redirection may be result of logical expression"
msgstr ""
"`%s' dosya ismi (`%s' yönlendirmesi için) mantıksal ifadenin sonucu olabilir"
-#: io.c:707
+#: io.c:628
#, c-format
msgid "unnecessary mixing of `>' and `>>' for file `%.*s'"
msgstr "`%.*s' dosyası için `>' ve `>>' karışımı gereksiz"
-#: io.c:754
+#: io.c:681
#, c-format
msgid "can't open pipe `%s' for output (%s)"
msgstr "`%s' veriyolu çıktı için açılamadı (%s)"
-#: io.c:763
+#: io.c:691
#, c-format
msgid "can't open pipe `%s' for input (%s)"
msgstr "`%s' veriyolu girdi için açılamadı (%s)"
-#: io.c:786
+#: io.c:712
#, c-format
msgid "can't open two way pipe `%s' for input/output (%s)"
msgstr "iki yönlü `%s' veriyolu G/Ç için açılamıyor (%s)"
-#: io.c:864
+#: io.c:794
#, c-format
msgid "can't redirect from `%s' (%s)"
msgstr "`%s'den yönlendirilemiyor (%s)"
-#: io.c:867
+#: io.c:797
#, c-format
msgid "can't redirect to `%s' (%s)"
msgstr "`%s'e yönlendirilemiyor (%s)"
-#: io.c:920
+#: io.c:846
msgid ""
"reached system limit for open files: starting to multiplex file descriptors"
msgstr ""
"açık dosyalar için sistem sınırı aşıldı: çoğul dosya tanımlayıcılara "
"baÅŸlarken"
-#: io.c:936
+#: io.c:862
#, c-format
msgid "close of `%s' failed (%s)."
msgstr "`%s' kapatılamadı (%s)."
-#: io.c:944
+#: io.c:870
msgid "too many pipes or input files open"
msgstr "çok fazla veriyolu ya da dosya açık"
-#: io.c:967
+#: io.c:892
msgid "close: second argument must be `to' or `from'"
msgstr "close: ikinci argüman `to' ya da `from' olmalı"
-#: io.c:981
+#: io.c:909
#, c-format
msgid "close: `%.*s' is not an open file, pipe or co-process"
msgstr "close: `%.*s' bir açık dosya, veriyolu ya da alt-işlem değil"
-#: io.c:986
+#: io.c:914
msgid "close of redirection that was never opened"
msgstr "hiç açılmamış bir yönlendirmenin kapatılması"
-#: io.c:1083
+#: io.c:1011
#, c-format
msgid "close: redirection `%s' not opened with `|&', second argument ignored"
msgstr ""
"close: `%s' yönlendirmesi bir `|&' ile açılmamış, ikinci argüman yoksayıldı"
-#: io.c:1099
+#: io.c:1027
#, c-format
msgid "failure status (%d) on pipe close of `%s' (%s)"
msgstr "başarısızlık durumu (%d): `%s' veriyolunun kapatılması (%s)"
-#: io.c:1102
+#: io.c:1030
#, c-format
msgid "failure status (%d) on file close of `%s' (%s)"
msgstr "başarısızlık durumu (%d): `%s' dosyasının kapatılması (%s)"
-#: io.c:1122
+#: io.c:1050
#, c-format
msgid "no explicit close of socket `%s' provided"
msgstr "`%s' soketinin açıkça kapatılması istenmedi"
-#: io.c:1125
+#: io.c:1053
#, c-format
msgid "no explicit close of co-process `%s' provided"
msgstr "`%s' alt-işleminin açıkça kapatılması istenmedi"
-#: io.c:1128
+#: io.c:1056
#, c-format
msgid "no explicit close of pipe `%s' provided"
msgstr "`%s' veriyolunun açıkça kapatılması istenmedi"
-#: io.c:1131
+#: io.c:1059
#, c-format
msgid "no explicit close of file `%s' provided"
msgstr "`%s' dosyasının açıkça kapatılması istenmedi"
-#: io.c:1159 io.c:1214 main.c:832 main.c:874
+#: io.c:1087 io.c:1142 main.c:823 main.c:865
#, c-format
msgid "error writing standard output (%s)"
msgstr "standart çıktıya yazarken hata (%s)"
-#: io.c:1163 io.c:1219
+#: io.c:1091 io.c:1147
#, c-format
msgid "error writing standard error (%s)"
msgstr "standart hataya yazarken hata (%s)"
-#: io.c:1171
+#: io.c:1099
#, c-format
msgid "pipe flush of `%s' failed (%s)."
msgstr "`%s'in veriyolu ile veri aktarımı başarısız (%s)."
-#: io.c:1174
+#: io.c:1102
#, c-format
msgid "co-process flush of pipe to `%s' failed (%s)."
msgstr "`%s'e veriyolunun alt-işlemi ile veri aktarımı başarısız (%s)."
-#: io.c:1177
+#: io.c:1105
#, c-format
msgid "file flush of `%s' failed (%s)."
msgstr "`%s'in dosya ile veri aktarımı başarısız (%s)."
-#: io.c:1292
+#: io.c:1219
#, c-format
msgid "local port %s invalid in `/inet'"
msgstr "yerel port `%s' `/inet' için geçersiz"
-#: io.c:1309
+#: io.c:1236
#, c-format
msgid "remote host and port information (%s, %s) invalid"
msgstr "uzak konak ve port bilgisi (%s, %s) geçersiz"
-#: io.c:1344
+#: io.c:1276
msgid "/inet/raw client not ready yet, sorry"
msgstr "/inet/raw istemci henüz hazır değil"
-#: io.c:1347 io.c:1383
+#: io.c:1279 io.c:1320
msgid "only root may use `/inet/raw'."
msgstr "`/inet/raw' sadece root tarafından kullanılabilir"
-#: io.c:1381
+#: io.c:1318
msgid "/inet/raw server not ready yet, sorry"
msgstr "/inet/raw sunucu henüz hazır değil"
-#: io.c:1477
+#: io.c:1417
#, c-format
msgid "no (known) protocol supplied in special filename `%s'"
msgstr "özel dosya ismi `%s' içinde (bilinen) bir protokol sağlanmamış"
-#: io.c:1491
+#: io.c:1431
#, c-format
msgid "special file name `%s' is incomplete"
msgstr "özel dosya ismi `%s' tamamlanmamış"
-#: io.c:1506
+#: io.c:1447
msgid "must supply a remote hostname to `/inet'"
msgstr "`/inet' e bir karşı makina ismi sağlanmalı"
-#: io.c:1524
+#: io.c:1465
msgid "must supply a remote port to `/inet'"
msgstr "`/inet' e bir karşı port sağlanmalı"
-#: io.c:1570
+#: io.c:1511
msgid "TCP/IP communications are not supported"
msgstr "TCP/IP haberleÅŸmesi desteklenmiyor"
-#: io.c:1758
+#: io.c:1698
#, c-format
msgid "could not open `%s', mode `%s'"
msgstr "`%s', `%s' kipinde açılamadı"
-#: io.c:1809
+#: io.c:1749
#, c-format
msgid "close of master pty failed (%s)"
msgstr "ana pty kapatılamadı (%s)"
-#: io.c:1811 io.c:1963 io.c:2114
+#: io.c:1751 io.c:1918 io.c:2075
#, c-format
msgid "close of stdout in child failed (%s)"
msgstr "ast süreçte stdÇ kapatılamadı (%s)"
-#: io.c:1814
+#: io.c:1754
#, c-format
msgid "moving slave pty to stdout in child failed (dup: %s)"
msgstr "ast süreçte yardımcı pty standart çıktıya taşınamadı (dup: %s)"
-#: io.c:1816 io.c:1968
+#: io.c:1756 io.c:1923
#, c-format
msgid "close of stdin in child failed (%s)"
msgstr "ast süreçte stdG kapatılamadı (%s)"
-#: io.c:1819
+#: io.c:1759
#, c-format
msgid "moving slave pty to stdin in child failed (dup: %s)"
msgstr "ast süreçte yardımcı pty standart girdiye taşınamadı (dup: %s)"
-#: io.c:1821 io.c:1840
+#: io.c:1761 io.c:1782
#, c-format
msgid "close of slave pty failed (%s)"
msgstr "yardımcı pty kapatılamadı (%s)"
-#: io.c:1914 io.c:1966 io.c:2095 io.c:2117
+#: io.c:1860 io.c:1921 io.c:2053 io.c:2078
#, c-format
msgid "moving pipe to stdout in child failed (dup: %s)"
msgstr "ast süreçte veriyolu standart çıktıya taşınamadı (dup: %s)"
-#: io.c:1918 io.c:1971
+#: io.c:1867 io.c:1926
#, c-format
msgid "moving pipe to stdin in child failed (dup: %s)"
msgstr "ast süreçte veriyolu standart girdiye taşınamadı (dup: %s)"
-#: io.c:1935 io.c:2108
+#: io.c:1887 io.c:2068
msgid "restoring stdout in parent process failed\n"
msgstr "üst süreçte stdÇ eski durumuna getirilemedi\n"
-#: io.c:1940
+#: io.c:1895
msgid "restoring stdin in parent process failed\n"
msgstr "üst süreçte stdG eski durumuna getirilemedi\n"
-#: io.c:1974 io.c:2119 io.c:2130
+#: io.c:1929 io.c:2080 io.c:2094
#, c-format
msgid "close of pipe failed (%s)"
msgstr "veriyolu kapatılamadı (%s)"
-#: io.c:2019
+#: io.c:1974
msgid "`|&' not supported"
msgstr "`|&' desteklenmiyor"
-#: io.c:2085
+#: io.c:2040
#, c-format
msgid "cannot open pipe `%s' (%s)"
msgstr "`%s' veriyolu açılamıyor (%s)"
-#: io.c:2126
+#: io.c:2088
#, c-format
msgid "cannot create child process for `%s' (fork: %s)"
msgstr "`%s' için ast süreç oluşturulamıyor (fork: %s)"
-#: io.c:2518
+#: io.c:2577
#, c-format
msgid "data file `%s' is empty"
msgstr "veri dosyası `%s' boş"
-#: io.c:2560 io.c:2568
+#: io.c:2618 io.c:2626
msgid "could not allocate more input memory"
msgstr "daha fazla girdi belleği ayrılamadı"
-#: io.c:3125
+#: io.c:3173
msgid "multicharacter value of `RS' is a gawk extension"
msgstr "`RS' çoklu karakter değeri bir gawk uzantısıdır"
-#: main.c:313
+#: main.c:311
msgid "out of memory"
msgstr ""
-#: main.c:381
+#: main.c:388
msgid "`-m[fr]' option irrelevant in gawk"
msgstr "`-m[fr]' seçeneği gawk'da böyle kullanılmaz"
-#: main.c:383
+#: main.c:390
msgid "-m option usage: `-m[fr] nnn'"
msgstr "-m seçeneğinin kullanımı: `-m[fr] nnn'"
-#: main.c:419
+#: main.c:426
#, fuzzy
msgid "empty argument to `-e/--source' ignored"
msgstr "`--source' seçeneği için boş argüman yoksayıldı"
-#: main.c:485
+#: main.c:492
#, c-format
msgid "%s: option `-W %s' unrecognized, ignored\n"
msgstr "%s: `-W %s' seçeneği tanımlı değil, yok sayıldı\n"
-#: main.c:530
+#: main.c:545
#, c-format
msgid "%s: option requires an argument -- %c\n"
msgstr "%s: seçenek bir argümanla kullanılır -- %c\n"
-#: main.c:551
+#: main.c:566
msgid "environment variable `POSIXLY_CORRECT' set: turning on `--posix'"
msgstr "ortam değişkeni `POSIXLY_CORRECT' var: `--posix' kullanılıyor"
-#: main.c:557
+#: main.c:572
msgid "`--posix' overrides `--traditional'"
msgstr "`--posix' seçeneği `--traditional' seçeneğini etkisiz kılar"
-#: main.c:568
+#: main.c:583
msgid "`--posix'/`--traditional' overrides `--non-decimal-data'"
msgstr ""
"`--posix'/`--traditional' seçenekleri `--non-decimal-data' seçeneğini "
"etkisiz kılar"
-#: main.c:572
+#: main.c:587
#, c-format
msgid "running %s setuid root may be a security problem"
msgstr "%s root yetkileriyle çalıştırıldığında güvenlik sorunları olabilir"
-#: main.c:577
+#: main.c:592
#, fuzzy
msgid "`--posix' overrides `--binary'"
msgstr "`--posix' seçeneği `--traditional' seçeneğini etkisiz kılar"
-#: main.c:622
+#: main.c:643
#, c-format
msgid "can't set binary mode on stdin (%s)"
msgstr "standart girdi ikilik kipe ayarlanamaz (%s)"
-#: main.c:625
+#: main.c:646
#, c-format
msgid "can't set binary mode on stdout (%s)"
msgstr "standart çıktı ikilik kipe ayarlanamaz (%s)"
-#: main.c:627
+#: main.c:648
#, c-format
msgid "can't set binary mode on stderr (%s)"
msgstr "standart hata ikilik kipe ayarlanamaz (%s)"
-#: main.c:668
+#: main.c:687
msgid "no program text at all!"
msgstr "program metni hiç yok!"
-#: main.c:773
+#: main.c:762
#, c-format
msgid "Usage: %s [POSIX or GNU style options] -f progfile [--] file ...\n"
msgstr ""
"Kullanımı: %s [POSIX veya GNU tarzı seçenekler] -f progdosyası [--] "
"dosya ...\n"
-#: main.c:775
+#: main.c:764
#, c-format
msgid "Usage: %s [POSIX or GNU style options] [--] %cprogram%c file ...\n"
msgstr ""
"Kullanımı: %s [POSIX veya GNU tarzı seçenekler] %cprogram%c dosya ...\n"
-#: main.c:780
+#: main.c:769
#, fuzzy
msgid "POSIX options:\t\tGNU long options: (standard)\n"
msgstr "POSIX seçenekleri: GNU uzun seçenekleri:\n"
-#: main.c:781
+#: main.c:770
msgid "\t-f progfile\t\t--file=progfile\n"
msgstr " -f progDosyası --file=progDosyası\n"
-#: main.c:782
+#: main.c:771
msgid "\t-F fs\t\t\t--field-separator=fs\n"
msgstr " -F ayraç --field-separator=ayraç\n"
-#: main.c:783
+#: main.c:772
msgid "\t-v var=val\t\t--assign=var=val\n"
msgstr " -v var=deÄŸer --assign=var=deÄŸer\n"
-#: main.c:784
+#: main.c:773
#, fuzzy
-msgid "POSIX options:\t\tGNU long options: (extensions)\n"
+msgid "Short options:\t\tGNU long options: (extensions)\n"
msgstr "POSIX seçenekleri: GNU uzun seçenekleri:\n"
-#: main.c:785
+#: main.c:774
msgid "\t-m[fr] val\n"
msgstr " -m[fr] deÄŸer\n"
-#: main.c:786
+#: main.c:775
msgid "\t-b\t\t\t--characters-as-bytes\n"
msgstr ""
-#: main.c:787
-msgid "\t-c\t\t\t--compat, --traditional\n"
-msgstr ""
+#: main.c:776
+#, fuzzy
+msgid "\t-c\t\t\t--traditional\n"
+msgstr " -W traditional --traditional\n"
-#: main.c:788
+#: main.c:777
#, fuzzy
-msgid "\t-C\t\t\t--copyleft, --copyright\n"
+msgid "\t-C\t\t\t--copyright\n"
msgstr " -W copyright --copyright\n"
-#: main.c:789
+#: main.c:778
#, fuzzy
msgid "\t-d [file]\t\t--dump-variables[=file]\n"
msgstr " -W dump-variables[=dosya] --dump-variables[=dosya]\n"
-#: main.c:790
+#: main.c:779
#, fuzzy
msgid "\t-e 'program-text'\t--source='program-text'\n"
msgstr " -W source=program-metni --source=program-metni\n"
-#: main.c:791
+#: main.c:780
#, fuzzy
msgid "\t-E file\t\t\t--exec=file\n"
msgstr " -W exec=dosya --exec=dosya\n"
-#: main.c:792
+#: main.c:781
#, fuzzy
msgid "\t-g\t\t\t--gen-pot\n"
msgstr " -W gen-po --gen-po\n"
-#: main.c:793
+#: main.c:782
#, fuzzy
-msgid "\t-h\t\t\t--help, --usage\n"
+msgid "\t-h\t\t\t--help\n"
msgstr " -W help --help\n"
-#: main.c:794
+#: main.c:783
#, fuzzy
-msgid "\t-l [fatal]\t\t--lint[=fatal]\n"
+msgid "\t-L [fatal]\t\t--lint[=fatal]\n"
msgstr " -W lint[=ölümcül] --lint[=ölümcül]\n"
-#: main.c:795
-#, fuzzy
-msgid "\t-L\t\t\t--lint-old\n"
-msgstr " -W lint-old --lint-old\n"
-
-#: main.c:796
+#: main.c:784
#, fuzzy
msgid "\t-n\t\t\t--non-decimal-data\n"
msgstr " -W non-decimal-data --non-decimal-data\n"
-#: main.c:797
+#: main.c:785
msgid "\t-N\t\t\t--use-lc-numeric\n"
msgstr ""
-#: main.c:798
+#: main.c:786
msgid "\t-O\t\t\t--optimize\n"
msgstr ""
-#: main.c:799
+#: main.c:787
#, fuzzy
msgid "\t-p [file]\t\t--profile[=file]\n"
msgstr " -W profile[=dosya] --profile[=dosya]\n"
-#: main.c:800
+#: main.c:788
#, fuzzy
msgid "\t-P\t\t\t--posix\n"
msgstr " -W posix --posix\n"
-#: main.c:801
+#: main.c:789
#, fuzzy
msgid "\t-r\t\t\t--re-interval\n"
msgstr " -W re-interval --re-interval\n"
-#: main.c:802
+#: main.c:791
#, fuzzy
+msgid "\t-R file\t\t\t--command=file\n"
+msgstr " -W exec=dosya --exec=dosya\n"
+
+#: main.c:792
msgid "\t-S\t\t\t--sandbox\n"
-msgstr " -W posix --posix\n"
+msgstr ""
+
+#: main.c:793
+#, fuzzy
+msgid "\t-t\t\t\t--lint-old\n"
+msgstr " -W lint-old --lint-old\n"
-#: main.c:803
+#: main.c:794
#, fuzzy
msgid "\t-V\t\t\t--version\n"
msgstr " -W version --version\n"
-#: main.c:805
+#: main.c:796
msgid "\t-W nostalgia\t\t--nostalgia\n"
msgstr " -W nostalgia --nostalgia\n"
-#: main.c:808
-msgid "\t-W parsedebug\t\t--parsedebug\n"
+#: main.c:799
+#, fuzzy
+msgid "\t-Y\t\t--parsedebug\n"
msgstr " -W parsedebug --parsedebug\n"
#. TRANSLATORS: --help output 5 (end)
@@ -1743,7 +1683,7 @@ msgstr " -W parsedebug --parsedebug\n"
#. for this application. Please add _another line_ with the
#. address for translation bugs.
#. no-wrap
-#: main.c:817
+#: main.c:808
msgid ""
"\n"
"To report bugs, see node `Bugs' in `gawk.info', which is\n"
@@ -1757,7 +1697,7 @@ msgstr ""
"Çeviri hatalarını <gnu-tr@belgeler.org> adresine bildiriniz.\n"
"\n"
-#: main.c:821
+#: main.c:812
msgid ""
"gawk is a pattern scanning and processing language.\n"
"By default it reads standard input and writes standard output.\n"
@@ -1767,7 +1707,7 @@ msgstr ""
"Öntanımlı olarak standart girdiyi okur ve standart çıktıya yazar.\n"
"\n"
-#: main.c:825
+#: main.c:816
msgid ""
"Examples:\n"
"\tgawk '{ sum += $1 }; END { print sum }' file\n"
@@ -1777,8 +1717,8 @@ msgstr ""
"\tgawk '{ sum += $1 }; END { print sum }' dosya\n"
"\tgawk -F: '{ print $1 }' /etc/passwd\n"
-#: main.c:845
-#, c-format
+#: main.c:836
+#, fuzzy, c-format
msgid ""
"Copyright (C) 1989, 1991-%d Free Software Foundation.\n"
"\n"
@@ -1791,12 +1731,12 @@ msgstr ""
"Telif hakkı (C) 1989, 1991-%d Free Software Foundation.\n"
"\n"
"Bu program bir serbest yazılımdır. Bu yazılımı Free Software Foundation\n"
-"tarafından yayınlanmış olan GNU Genel Kamu Lisansının 3. ya da daha sonraki\n"
+"tarafından yayınlanmış olan GNU Genel Kamu Lisansının 2. ya da daha sonraki\n"
"bir sürümünün koşulları altında kopyalayabilir, dağıtabilir ve/veya\n"
"üzerinde değişiklik yapabilirsiniz.\n"
"\n"
-#: main.c:853
+#: main.c:844
msgid ""
"This program is distributed in the hope that it will be useful,\n"
"but WITHOUT ANY WARRANTY; without even the implied warranty of\n"
@@ -1810,7 +1750,7 @@ msgstr ""
"edinmek için GNU Genel Kamu Lisansına bakınız.\n"
"\n"
-#: main.c:864
+#: main.c:855
#, fuzzy
msgid ""
"You should have received a copy of the GNU General Public License\n"
@@ -1820,16 +1760,16 @@ msgstr ""
"olacaksınız; yoksa Free Software Foundation, Inc., 51 Franklin Street,\n"
"Fifth Floor, Boston, MA 02110-1301, USA adresinden isteyebilirsiniz.\n"
-#: main.c:899
+#: main.c:890
msgid "-Ft does not set FS to tab in POSIX awk"
msgstr "POSIX awk -Ft ile dosya sistemini belirlemez"
-#: main.c:1116
+#: main.c:1122
#, c-format
msgid "unknown value for field spec: %d\n"
msgstr ""
-#: main.c:1176
+#: main.c:1182
#, c-format
msgid ""
"%s: `%s' argument to `-v' not in `var=value' form\n"
@@ -1838,174 +1778,140 @@ msgstr ""
"%s: `-v' ile verilen `%s' argümanı `var=değer' biçiminde değil\n"
"\n"
-#: main.c:1196
+#: main.c:1202
#, c-format
msgid "`%s' is not a legal variable name"
msgstr "`%s' kurala uygun bir deÄŸiÅŸken ismi deÄŸil"
-#: main.c:1199
+#: main.c:1205
#, c-format
msgid "`%s' is not a variable name, looking for file `%s=%s'"
msgstr "`%2$s=%3$s' için dosyaya bakınca, `%1$s' bir değişken ismi değil"
-#: main.c:1238
+#: main.c:1258
msgid "floating point exception"
msgstr "Gerçel sayı istisnası"
-#: main.c:1245
+#: main.c:1265
msgid "fatal error: internal error"
msgstr "ölümcül iç hata"
-#: main.c:1260
+#: main.c:1280
#, fuzzy
msgid "fatal error: internal error: segfault"
msgstr "ölümcül iç hata"
-#: main.c:1272
+#: main.c:1292
#, fuzzy
msgid "fatal error: internal error: stack overflow"
msgstr "ölümcül iç hata"
-#: main.c:1322
+#: main.c:1342
#, c-format
msgid "no pre-opened fd %d"
msgstr "ön açılışlı bir %d dosya tanımlayıcısı yok"
-#: main.c:1329
+#: main.c:1349
#, c-format
msgid "could not pre-open /dev/null for fd %d"
msgstr "%d dosya tanımlayıcısı için /dev/null ön açılışı yapılamadı"
-#: main.c:1352 main.c:1361
+#: main.c:1372 main.c:1381
#, c-format
msgid "could not find groups: %s"
msgstr "gruplar bulunamadı: %s"
-#: msg.c:54
+#: msg.c:62
#, c-format
msgid "cmd. line:"
msgstr "komut satırı:"
-#: msg.c:120
+#: msg.c:97
msgid "warning: "
msgstr "uyarı: "
-#: msg.c:142
+#: msg.c:106
msgid "error: "
msgstr "hata: "
-#: msg.c:178
+#: msg.c:129
msgid "fatal: "
msgstr "ölümcül: "
-#: node.c:63 node.c:78 node.c:105 node.c:121 node.c:151
-msgid "can't convert string to float"
-msgstr "dizge gerçel sayıya dönüştürülemiyor"
-
-#: node.c:465
+#: node.c:401
msgid "backslash at end of string"
msgstr "dizge sonunda tersbölü"
-#: node.c:609
+#: node.c:502
#, c-format
msgid "old awk does not support the `\\%c' escape sequence"
msgstr "eski awk `\\%c' önceleme dizilimini desteklemiyor"
-#: node.c:660
+#: node.c:553
msgid "POSIX does not allow `\\x' escapes"
msgstr "POSIX `\\x' öncelemelerine izin vermez"
-#: node.c:666
+#: node.c:559
msgid "no hex digits in `\\x' escape sequence"
msgstr "`\\x' önceleme dizgesinde onaltılık rakamlar yok"
-#: node.c:688
+#: node.c:581
#, c-format
msgid ""
"hex escape \\x%.*s of %d characters probably not interpreted the way you "
"expect"
msgstr ""
-#: node.c:703
+#: node.c:596
#, c-format
msgid "escape sequence `\\%c' treated as plain `%c'"
msgstr "`\\%c' önceleme dizgesi `%c' olarak kullanıldı"
+#: node.c:737
+msgid ""
+"Invalid multibyte data detected. There may be a mismatch between your data "
+"and your locale."
+msgstr ""
+
#: posix/gawkmisc.c:172
#, c-format
msgid "%s %s `%s': could not set close-on-exec: (fcntl: %s)"
msgstr "%s %s `%s': close-on-exec belirlenemedi: (fcntl: %s)"
-#: profile.c:94
+#: profile.c:83
#, c-format
msgid "could not open `%s' for writing: %s"
msgstr "`%s' yazmak için açılamadı: %s"
-#: profile.c:457
-#, c-format
-msgid "internal error: %s with null vname"
-msgstr "iç hata: null vname'li %s"
-
-#: profile.c:522
-msgid "# treated internally as `delete'"
-msgstr "# dahili olarak `delete' varsayıldı"
-
-#: profile.c:1076
-#, c-format
-msgid "# this is a dynamically loaded extension function"
-msgstr "# bu özdevimli olarak yüklenmiş bir ek işlevdir"
-
-#: profile.c:1109
-#, c-format
-msgid "\t# gawk profile, created %s\n"
-msgstr "\t# gawk profili, oluÅŸturuldu: %s\n"
-
-#: profile.c:1112
-#, c-format
-msgid ""
-"\t# BEGIN block(s)\n"
-"\n"
-msgstr ""
-"\t# BEGIN blokları\n"
-"\n"
-
-#: profile.c:1122
+#: profile.c:203
#, fuzzy, c-format
msgid ""
-"\t# BEGINFILE block(s)\n"
+"\t# %s block(s)\n"
"\n"
msgstr ""
-"\t# BEGIN blokları\n"
+"\t# END blokları\n"
"\n"
-#: profile.c:1132
-#, c-format
+#: profile.c:208
+#, fuzzy, c-format
msgid ""
-"\t# Rule(s)\n"
+"\t# %s(s)\n"
"\n"
msgstr ""
"\t# Kurallar\n"
"\n"
-#: profile.c:1138
-#, fuzzy, c-format
-msgid ""
-"\t# ENDFILE block(s)\n"
-"\n"
-msgstr ""
-"\t# END blokları\n"
-"\n"
+#: profile.c:278
+#, c-format
+msgid "internal error: %s with null vname"
+msgstr "iç hata: null vname'li %s"
-#: profile.c:1148
+#: profile.c:945
#, c-format
-msgid ""
-"\t# END block(s)\n"
-"\n"
-msgstr ""
-"\t# END blokları\n"
-"\n"
+msgid "\t# gawk profile, created %s\n"
+msgstr "\t# gawk profili, oluÅŸturuldu: %s\n"
-#: profile.c:1168
+#: profile.c:1328
#, c-format
msgid ""
"\n"
@@ -2014,17 +1920,12 @@ msgstr ""
"\n"
"\t# İşlevler, alfabetik sırayla\n"
-#: profile.c:1431
+#: profile.c:1367
#, c-format
-msgid "unexpected type %s in prec_level"
-msgstr "prec_level'da anlaşılamayan tür %s"
-
-#: profile.c:1557
-#, fuzzy, c-format
-msgid "Unknown node type %s in pp_var"
-msgstr "%d. düğümtürü bilinmiyor"
+msgid "redir2str: unknown redirection type %d"
+msgstr ""
-#: re.c:537
+#: re.c:559
#, c-format
msgid "regexp component `%.*s' should probably be `[%.*s]'"
msgstr ""
@@ -2097,18 +1998,40 @@ msgstr "Düzenli ifade çok büyük"
msgid "Unmatched ) or \\)"
msgstr ") ya da \\) eÅŸleÅŸmiyor"
-#: regcomp.c:699
+#: regcomp.c:701
msgid "No previous regular expression"
msgstr "Daha önce düzenli ifade yok"
-#~ msgid "%s: illegal option -- %c\n"
-#~ msgstr "%s: kuraldışı seçenek -- %c\n"
+#~ msgid "call of `length' without parentheses is deprecated by POSIX"
+#~ msgstr "parantezsiz `length' çağrısı POSIX'e uygun değil"
+
+#, fuzzy
+#~ msgid "reference to uninitialized field `$%s'"
+#~ msgstr "ilklendirilmemiş `$%d' alanına başvuru"
+
+#~ msgid "can't convert string to float"
+#~ msgstr "dizge gerçel sayıya dönüştürülemiyor"
+
+#~ msgid "`continue' outside a loop is not portable"
+#~ msgstr "döngü dışında `continue' kullanımı taşınabilir değil"
+
+#~ msgid "`break' outside a loop is not portable"
+#~ msgstr "döngü dışında `break' kullanımı taşınabilir değil"
+
+#~ msgid "`nextfile' cannot be called from a BEGIN rule"
+#~ msgstr "`nextfile' bir BEGIN kuralından çağrılamaz"
+
+#~ msgid "`next' cannot be called from a BEGIN rule"
+#~ msgstr "`next' bir BEGIN kuralından çağrılamaz"
#~ msgid "file `%s' is a directory"
#~ msgstr "`%s' dosya deÄŸil dizin"
-#~ msgid "can't open two way socket `%s' for input/output (%s)"
-#~ msgstr "iki yönlü `%s' soketi G/Ç için açılamıyor (%s)"
+#~ msgid "use `PROCINFO[\"%s\"]' instead of `%s'"
+#~ msgstr "`PROCINFO[\"%s\"]' kullanın (`%s' yerine)"
+
+#~ msgid "use `PROCINFO[...]' instead of `/dev/user'"
+#~ msgstr "`/dev/user' yerine `PROCINFO[...]' kullanın"
#~ msgid "\t-W compat\t\t--compat\n"
#~ msgstr " -W compat --compat\n"
@@ -2116,30 +2039,102 @@ msgstr "Daha önce düzenli ifade yok"
#~ msgid "\t-W copyleft\t\t--copyleft\n"
#~ msgstr " -W copyleft --copyleft\n"
-#~ msgid "\t-W traditional\t\t--traditional\n"
-#~ msgstr " -W traditional --traditional\n"
-
#~ msgid "\t-W usage\t\t--usage\n"
#~ msgstr " -W usage --usage\n"
-#, fuzzy
-#~ msgid "seek: invalid arguments"
-#~ msgstr "printf: argüman yok"
+#~ msgid ""
+#~ "\t# BEGIN block(s)\n"
+#~ "\n"
+#~ msgstr ""
+#~ "\t# BEGIN blokları\n"
+#~ "\n"
-#, fuzzy
-#~ msgid "seek: `%.*s' is not an open file, pipe, or co-process"
-#~ msgstr "close: `%.*s' bir açık dosya, veriyolu ya da alt-işlem değil"
+#~ msgid "must use `count$' on all formats or none"
+#~ msgstr "tüm biçemlerde ya `count$' kullanmalısınız ya da hiçbir şey"
+
+#~ msgid "`$' is not permitted in awk formats"
+#~ msgstr "`$' awk biçemlerde kullanılmaz"
+
+#~ msgid "arg count with `$' must be > 0"
+#~ msgstr "`$' ile birlikte verilen argüman sayısı > 0 olmalıdır"
+
+#~ msgid "arg count %ld greater than total number of supplied arguments"
+#~ msgstr "argüman sayısı %ld sağlanmış toplam argüman sayısından büyük"
+
+#~ msgid "`$' not permitted after period in format"
+#~ msgstr "`$' biçem içinde noktadan sonra kullanılmaz"
+
+#~ msgid "no `$' supplied for positional field width or precision"
+#~ msgstr "konumsal alan genişliği ya da duyarlığı için `$' kullanılmamış"
+
+#~ msgid "`l' is meaningless in awk formats; ignored"
+#~ msgstr "`l' awk biçemlerde anlamsız; yoksayıldı"
+
+#~ msgid "`l' is not permitted in POSIX awk formats"
+#~ msgstr "`l' POSIX awk biçemlerde kullanılmaz"
+
+#~ msgid "`L' is meaningless in awk formats; ignored"
+#~ msgstr "`L' awk biçemlerde anlamsız; yoksayıldı"
+
+#~ msgid "`L' is not permitted in POSIX awk formats"
+#~ msgstr "`L' POSIX awk biçemlerde kullanılmaz"
+
+#~ msgid "`h' is meaningless in awk formats; ignored"
+#~ msgstr "`h' awk biçemlerde anlamsız; yoksayıldı"
+
+#~ msgid "`h' is not permitted in POSIX awk formats"
+#~ msgstr "`h' POSIX awk biçemlerde kullanılmaz"
+
+#~ msgid "[s]printf: value %g is out of range for `%%%c' format"
+#~ msgstr "[s]printf: %g değeri `%%%c' biçimi için kapsamdışı"
+
+#~ msgid "not enough arguments to satisfy format string"
+#~ msgstr "biçem dizgesini oluşturacak yeterli argüman yok"
+
+#~ msgid "^ ran out for this one"
+#~ msgstr "bir bunun için ^ tükendi"
+
+#~ msgid "[s]printf: format specifier does not have control letter"
+#~ msgstr "[s]printf: biçem belirteci denetim karakteri içermiyor"
+
+#~ msgid "too many arguments supplied for format string"
+#~ msgstr "biçem dizgesi için çok fazla argüman sağlanmış"
#, fuzzy
-#~ msgid "seek: `%.*s' is not an input file, pipe, or co-process"
-#~ msgstr "close: `%.*s' bir açık dosya, veriyolu ya da alt-işlem değil"
+#~ msgid "attempt to use array parameter `%s' in a scalar context"
+#~ msgstr "`%s' dizisi bir sayısal bağlamda kullanılmaya çalışılıyor"
+
+#~ msgid "can't open two way socket `%s' for input/output (%s)"
+#~ msgstr "iki yönlü `%s' soketi G/Ç için açılamıyor (%s)"
+
+#~ msgid ""
+#~ "concatenation: side effects in one expression have changed the length of "
+#~ "another!"
+#~ msgstr ""
+#~ "bitiÅŸtirme: bir ifadenin yan etkileri diÄŸerinin uzunluÄŸunu deÄŸiÅŸtirmiÅŸ!"
+
+#~ msgid "illegal type (%s) in tree_eval"
+#~ msgstr "tree_eval içinde kuraldışı tür (%s)"
+
+#~ msgid "\t# -- main --\n"
+#~ msgstr "\t# -- main --\n"
+
+#~ msgid "invalid tree type %s in redirect()"
+#~ msgstr "redirect() içindeki ağaç türü %s geçersiz"
#, fuzzy
-#~ msgid "seek: `%.*s' is not a regular file"
-#~ msgstr "`%s' kurala uygun bir deÄŸiÅŸken ismi deÄŸil"
+#~ msgid "# treated internally as `delete'"
+#~ msgstr "# dahili olarak `delete' varsayıldı"
-#~ msgid "use `PROCINFO[\"%s\"]' instead of `%s'"
-#~ msgstr "`PROCINFO[\"%s\"]' kullanın (`%s' yerine)"
+#~ msgid "# this is a dynamically loaded extension function"
+#~ msgstr "# bu özdevimli olarak yüklenmiş bir ek işlevdir"
-#~ msgid "use `PROCINFO[...]' instead of `/dev/user'"
-#~ msgstr "`/dev/user' yerine `PROCINFO[...]' kullanın"
+#~ msgid "unexpected type %s in prec_level"
+#~ msgstr "prec_level'da anlaşılamayan tür %s"
+
+#, fuzzy
+#~ msgid "Unknown node type %s in pp_var"
+#~ msgstr "%d. düğümtürü bilinmiyor"
+
+#~ msgid "%s: illegal option -- %c\n"
+#~ msgstr "%s: kuraldışı seçenek -- %c\n"
diff --git a/po/vi.gmo b/po/vi.gmo
index 0a6a8803..b3f47344 100644
--- a/po/vi.gmo
+++ b/po/vi.gmo
Binary files differ
diff --git a/po/vi.po b/po/vi.po
index 8a0c072f..674782c8 100644
--- a/po/vi.po
+++ b/po/vi.po
@@ -4,669 +4,650 @@
#
msgid ""
msgstr ""
-"Project-Id-Version: gawk 3.1.5f\n"
+"Project-Id-Version: gawk 3.1.6\n"
"Report-Msgid-Bugs-To: arnold@skeeve.com\n"
-"POT-Creation-Date: 2010-11-12 12:20+0200\n"
-"PO-Revision-Date: 2007-05-28 21:28+0930\n"
+"POT-Creation-Date: 2010-11-17 08:48+0200\n"
+"PO-Revision-Date: 2007-11-30 22:29+1030\n"
"Last-Translator: Clytie Siddall <clytie@riverland.net.au>\n"
"Language-Team: Vietnamese <vi-VN@googlegroups.com>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=1; plural=0;\n"
-"X-Generator: LocFactoryEditor 1.6.3b1\n"
+"X-Generator: LocFactoryEditor 1.7b1\n"
-#: array.c:112
+#: array.c:103
+#, c-format
+msgid "from %s"
+msgstr "từ %s"
+
+#: array.c:267
+#, fuzzy
+msgid "attempt to use a scalar value as array"
+msgstr "cố dùng Ä‘iá»u cô hÆ°á»›ng « %s » là mảng"
+
+#: array.c:270
#, c-format
msgid "attempt to use function `%s' as an array"
msgstr "cố gắng dùng chức năng « %s » như mảng"
-#: array.c:115
+#: array.c:273
#, c-format
msgid "attempt to use scalar parameter `%s' as an array"
msgstr "cố gắng dùng tham số vô hướng « %s » như là mảng"
-#: array.c:118
+#: array.c:276
#, c-format
msgid "attempt to use scalar `%s' as array"
msgstr "cố dùng Ä‘iá»u cô hÆ°á»›ng « %s » là mảng"
-#: array.c:156
+#: array.c:321 array.c:648 eval.c:1075 eval.c:1079 eval.c:1581 eval.c:1649
+#: eval.c:1928
#, c-format
-msgid "from %s"
-msgstr "từ %s"
+msgid "attempt to use array `%s' in a scalar context"
+msgstr "cố gắng dùng mảng « %s » trong một ngữ cảnh vô hướng"
-#: array.c:513
-#, c-format
+#: array.c:570
+#, fuzzy, c-format
msgid "reference to uninitialized element `%s[\"%.*s\"]'"
-msgstr "tham chiếu đến phần tử chưa sở khởi « %s[\"%.*s\"] »"
+msgstr "tham chiếu đến phần tử chưa sở khởi « %s[\"%s\"] »"
-#: array.c:519
+#: array.c:576
#, c-format
msgid "subscript of array `%s' is null string"
-msgstr "chữ in dưới mảng « %s » là chuỗi rỗng"
+msgstr "chữ in dưới mảng «%s» là chuỗi rỗng"
-#: array.c:623
+#: array.c:684
#, c-format
msgid "delete: index `%s' not in array `%s'"
-msgstr "delete: (xoá) số mũ « %s » không phải nằm trong mảng « %s »"
+msgstr "delete: (xóa bá») số mÅ© « %s » không phải nằm trong mảng « %s »"
+
+#: array.c:705
+#, fuzzy, c-format
+msgid "attempt to use scalar `%s[\"%.*s\"]' as an array"
+msgstr "cố dùng Ä‘iá»u cô hÆ°á»›ng « %s » là mảng"
-#: array.c:792
+#: array.c:868
#, c-format
msgid "%s: empty (null)\n"
msgstr "%s: rỗng (vô giá trị)\n"
-#: array.c:797
+#: array.c:873
#, c-format
msgid "%s: empty (zero)\n"
msgstr "%s: rỗng (số không)\n"
-#: array.c:801
+#: array.c:877
#, c-format
msgid "%s: table_size = %d, array_size = %d\n"
msgstr "%s: cỡ_bảng = %d, cỡ_mảng = %d\n"
-#: array.c:830
+#: array.c:912
#, c-format
msgid "%s: is parameter\n"
msgstr "%s: là tham số\n"
-#: array.c:835
+#: array.c:916
#, c-format
msgid "%s: array_ref to %s\n"
msgstr "%s: « array_ref » (mảng tham chiếu) đến « %s »\n"
-#: awkgram.y:224 awkgram.y:227
+#: array.c:921
+#, fuzzy
+msgid "adump: argument not an array"
+msgstr "match: (khớp) đối số thứ ba không phải là mảng"
+
+#: array.c:1139
+#, fuzzy
+msgid "attempt to use array in a scalar context"
+msgstr "cố gắng dùng mảng « %s » trong một ngữ cảnh vô hướng"
+
+#: array.c:1236
+#, fuzzy
+msgid "asort: second argument not an array"
+msgstr "split: (chia tách) đối số thứ hai không phải là mảng"
+
+#: array.c:1237
+#, fuzzy
+msgid "asorti: second argument not an array"
+msgstr "split: (chia tách) đối số thứ hai không phải là mảng"
+
+#: array.c:1245
+#, fuzzy
+msgid "asort: first argument not an array"
+msgstr "match: (khớp) đối số thứ ba không phải là mảng"
+
+#: array.c:1246
+#, fuzzy
+msgid "asorti: first argument not an array"
+msgstr "match: (khớp) đối số thứ ba không phải là mảng"
+
+#: awkgram.y:246
#, c-format
msgid "%s blocks must have an action part"
msgstr "Má»i khối %s phải có má»™t phần kiểu hành Ä‘á»™ng"
-#: awkgram.y:230
+#: awkgram.y:249
msgid "each rule must have a pattern or an action part"
msgstr "Má»i quy tắc phải có má»™t mẫu hay phần kiểu hành Ä‘á»™ng"
-#: awkgram.y:266 awkgram.y:275
+#: awkgram.y:320 awkgram.y:330
msgid "old awk does not support multiple `BEGIN' or `END' rules"
msgstr ""
"awk cÅ© không há»— trợ nhiá»u quy tắc kiểu « BEGIN » (bắt đầu) hay « END » (kết "
"thúc)"
-#: awkgram.y:304
+#: awkgram.y:367
#, c-format
msgid "`%s' is a built-in function, it cannot be redefined"
msgstr "« %s » là một hàm có sẵn nên nó không thể được định nghĩa lái."
-#: awkgram.y:350
+#: awkgram.y:427
msgid "regexp constant `//' looks like a C++ comment, but is not"
msgstr ""
"hằng biểu thức chính quy « // » hình như một chú thích C, nhưng mà không phải"
-#: awkgram.y:353
+#: awkgram.y:430
#, c-format
msgid "regexp constant `/%s/' looks like a C comment, but is not"
msgstr ""
"hằng biểu thức chính quy « /%s/ » hình như một chú thích C, nhưng mà không "
"phải"
-#: awkgram.y:380 awkgram.y:692
-msgid "statement may have no effect"
-msgstr "câu có lẽ sẽ không có tác dụng"
+#: awkgram.y:735
+#, fuzzy
+msgid "`break' is not allowed outside a loop or switch"
+msgstr "không cho phép « break » (ngắt) nằm ở ngoại vòng lặp"
-#: awkgram.y:477 awkgram.y:480 awkgram.y:504 awkgram.y:511 awkgram.y:518
-#, c-format
-msgid "`%s' used in %s action"
+#: awkgram.y:744
+#, fuzzy
+msgid "`continue' is not allowed outside a loop"
+msgstr "không cho phép « continue » (tiếp tục) nằm ở ngoại vòng lặp"
+
+#: awkgram.y:753
+#, fuzzy, c-format
+msgid "`next' used in %s action"
msgstr "« %s » được dùng trong hành động %s"
-#: awkgram.y:495 awkgram.y:499
+#: awkgram.y:767 awkgram.y:771
msgid "`nextfile' is a gawk extension"
msgstr "« nextfile » (tập tin kế tiếp) là một phần mở rộng gawk"
-#: awkgram.y:528
+#: awkgram.y:775
+#, fuzzy, c-format
+msgid "`nextfile' used in %s action"
+msgstr "« %s » được dùng trong hành động %s"
+
+#: awkgram.y:799
msgid "`return' used outside function context"
msgstr "« return » (trở vá») được dùng ở ngoại ngữ cảnh hàm"
-#: awkgram.y:570
+#: awkgram.y:859
msgid "plain `print' in BEGIN or END rule should probably be `print \"\"'"
msgstr ""
"« print » (in) chuẩn trong quy tắc « BEGIN » (bắt đầu) hay « END » (kết thúc) "
"rất có thể nên là « print\"\" »"
-#: awkgram.y:586 awkgram.y:594
+#: awkgram.y:927 awkgram.y:935
msgid "`delete array' is a gawk extension"
msgstr "« delete array » (xóa bỠmảng) là một phần mở rộng gawk"
-#: awkgram.y:608 awkgram.y:616
+#: awkgram.y:955 awkgram.y:963
msgid "`delete(array)' is a non-portable tawk extension"
msgstr "« delete array » (xóa bỠmảng) là phần mở rộng gawk không thể mang theo"
-#: awkgram.y:660
+#: awkgram.y:1004
#, c-format
msgid "duplicate case values in switch body: %s"
msgstr "gặp giá trị case trùng trong thân chuyển đổi (switch body): %s"
-#: awkgram.y:670
-msgid "Duplicate `default' detected in switch body"
+#: awkgram.y:1014
+#, fuzzy
+msgid "duplicate `default' detected in switch body"
msgstr ""
"Phát hiện « default » (mặc định) trong thân chuyển đổi (switch body): %s"
-#: awkgram.y:759
+#: awkgram.y:1151
msgid "multistage two-way pipelines don't work"
msgstr "Ä‘Æ°á»ng ống dẫn hai chiếu Ä‘a giai Ä‘oạn không phải hoạt Ä‘á»™ng được"
-#: awkgram.y:850
+#: awkgram.y:1253
msgid "regular expression on right of assignment"
msgstr "biểu thức chính quy nằm bên phải Ä‘iá»u gán"
-#: awkgram.y:860
+#: awkgram.y:1263
msgid "regular expression on left of `~' or `!~' operator"
msgstr "biểu thức chính quy nằm bên trái toán tử « ~ » hay « !~ »"
-#: awkgram.y:866 awkgram.y:954
+#: awkgram.y:1278 awkgram.y:1423
msgid "old awk does not support the keyword `in' except after `for'"
msgstr "awk cũ không hỗ trợ từ khoá « in », trừ khi nằm sau « for »"
-#: awkgram.y:872
+#: awkgram.y:1287
msgid "regular expression on right of comparison"
msgstr "biểu thức chính quy nằm bên phải sự so sánh"
-#: awkgram.y:936
-#, fuzzy, c-format
-msgid "`getline var' invalid inside %s rule"
-msgstr "trong « %s » có cổng từ xa không hợp lệ"
+#: awkgram.y:1399
+#, c-format
+msgid "`getline var' invalid inside `%s' rule"
+msgstr ""
-#: awkgram.y:939
+#: awkgram.y:1401
#, c-format
-msgid "`getline' invalid inside %s rule"
+msgid "`getline' invalid inside `%s' rule"
msgstr ""
-#: awkgram.y:944
+#: awkgram.y:1407
msgid "non-redirected `getline' undefined inside END action"
msgstr ""
"trong hành động « END » (kết thúc) có « getline » (lấy dòng) không được chuyển "
"hướng lại và chưa được xác định."
-#: awkgram.y:955
+#: awkgram.y:1424
msgid "old awk does not support multidimensional arrays"
msgstr "awk cÅ© không há»— trợ mảng Ä‘a chiá»u"
-#: awkgram.y:1001
+#: awkgram.y:1528
msgid "call of `length' without parentheses is not portable"
msgstr "không thể mang lá»i gá»i « length » (Ä‘á»™ dài) không có dấu ngoặc"
-#: awkgram.y:1006
-msgid "call of `length' without parentheses is deprecated by POSIX"
-msgstr "POSIX phản đối lá»i gá»i « length » (Ä‘á»™ dài) không có dấu ngoặc"
-
-#: awkgram.y:1051
+#: awkgram.y:1591
#, fuzzy
msgid "indirect function calls are a gawk extension"
-msgstr "« extension » là một phần mở rộng gawk"
+msgstr "« nextfile » (tập tin kế tiếp) là một phần mở rộng gawk"
-#: awkgram.y:1084
-msgid "use of non-array as array"
-msgstr "việc dùng Ä‘iá»u khác mảng nhÆ° là mảng"
+#: awkgram.y:1605
+#, fuzzy, c-format
+msgid "can not use special variable `%s' for indirect function call"
+msgstr "chức năng « %s »: không thể dùng tên chức năng như là tên tham số"
-#: awkgram.y:1087
+#: awkgram.y:1682
msgid "invalid subscript expression"
msgstr "biểu thức in thấp không hợp lệ"
-#: awkgram.y:1329
+#: awkgram.y:1722
+msgid "use of non-array as array"
+msgstr "việc dùng Ä‘iá»u khác mảng nhÆ° là mảng"
+
+#: awkgram.y:1993
msgid "unexpected newline or end of string"
msgstr "gặp dòng mới bất ngỠhay kết thúc của chuỗi"
-#: awkgram.y:1446
-msgid "empty program text on command line"
-msgstr "gặp đoạn chữ chương trình rỗng nằm trên dòng lệnh"
-
-#: awkgram.y:1502
+#: awkgram.y:2248 awkgram.y:2296 awkgram.y:2470
#, c-format
msgid "can't open source file `%s' for reading (%s)"
msgstr "không thể mở tập tin nguồn « %s » để Ä‘á»c (%s)"
-#: awkgram.y:1600
+#: awkgram.y:2249 awkgram.y:2297 builtin.c:122
+msgid "reason unknown"
+msgstr "không biết sao"
+
+#: awkgram.y:2257
+#, fuzzy, c-format
+msgid "already included source file `%s'"
+msgstr "không thể Ä‘á»c tập tin nguồn « %s » (%s)"
+
+#: awkgram.y:2281
+#, fuzzy
+msgid "@include is a gawk extension"
+msgstr "« nextfile » (tập tin kế tiếp) là một phần mở rộng gawk"
+
+#: awkgram.y:2288
+msgid "empty filename after @include"
+msgstr ""
+
+#: awkgram.y:2422
+msgid "empty program text on command line"
+msgstr "gặp đoạn chữ chương trình rỗng nằm trên dòng lệnh"
+
+#: awkgram.y:2537
#, c-format
msgid "can't read sourcefile `%s' (%s)"
msgstr "không thể Ä‘á»c tập tin nguồn « %s » (%s)"
-#: awkgram.y:1608
+#: awkgram.y:2547
#, c-format
msgid "source file `%s' is empty"
msgstr "tập tin nguồn « %s » là rỗng"
-#: awkgram.y:1800 awkgram.y:1922 awkgram.y:1940 awkgram.y:2315 awkgram.y:2407
+#: awkgram.y:2732
msgid "source file does not end in newline"
msgstr "tập tin nguồn không kết thúc với dòng mới"
-#: awkgram.y:1862
+#: awkgram.y:2809
msgid "unterminated regexp ends with `\\' at end of file"
msgstr ""
"biểu thức chính quy chưa được chấm dứt kết thúc với « \\ » tại kết thúc của "
"tập tin"
-#: awkgram.y:1886
+#: awkgram.y:2833
#, c-format
msgid "%s: %d: tawk regex modifier `/.../%c' doesn't work in gawk"
msgstr ""
"%s: %d: bộ sửa đổi biểu thức chính quy tawk « /.../%c » không hoạt động được "
"trong gawk"
-#: awkgram.y:1890
+#: awkgram.y:2837
#, c-format
msgid "tawk regex modifier `/.../%c' doesn't work in gawk"
msgstr ""
"bộ sửa đổi biểu thức chính quy tawk « /.../%c » không hoạt động được trong "
"gawk"
-#: awkgram.y:1897
+#: awkgram.y:2844
msgid "unterminated regexp"
msgstr "biểu thức chính quy chưa được chấm dứt"
-#: awkgram.y:1900
+#: awkgram.y:2848
msgid "unterminated regexp at end of file"
msgstr "biểu thức chính quy chưa được chấm dứt nằm tại kết thúc của tập tin"
-#: awkgram.y:1969
+#: awkgram.y:2907
msgid "use of `\\ #...' line continuation is not portable"
msgstr "không thể mang khả năng dùng « \\#... » để tiếp tục dòng"
-#: awkgram.y:1982
+#: awkgram.y:2923
msgid "backslash not last character on line"
msgstr "xuyệc ngược không phải là ký tự cuối cùng nằm trên dòng"
-#: awkgram.y:2027
+#: awkgram.y:2984
msgid "POSIX does not allow operator `**='"
msgstr "POSIX không cho phép toán tử « **= »"
-#: awkgram.y:2029
+#: awkgram.y:2986
msgid "old awk does not support operator `**='"
msgstr "awk cũ không hỗ trợ toán tử « **= »"
-#: awkgram.y:2038
+#: awkgram.y:2995
msgid "POSIX does not allow operator `**'"
msgstr "POSIX không cho phép toán tử « ** »"
-#: awkgram.y:2040
+#: awkgram.y:2997
msgid "old awk does not support operator `**'"
msgstr "awk cũ không hỗ trợ toán tử « ** »"
-#: awkgram.y:2071
+#: awkgram.y:3032
msgid "operator `^=' is not supported in old awk"
msgstr "awk cũ không hỗ trợ toán tử « ^= »"
-#: awkgram.y:2079
+#: awkgram.y:3040
msgid "operator `^' is not supported in old awk"
msgstr "awk cũ không hỗ trợ toán tử « ^ »"
-#: awkgram.y:2163 awkgram.y:2178
+#: awkgram.y:3133 awkgram.y:3149
msgid "unterminated string"
msgstr "chuỗi không được chấm dứt"
-#: awkgram.y:2368
+#: awkgram.y:3345
#, c-format
msgid "invalid char '%c' in expression"
msgstr "biểu thức một ký tự không hợp lệ « %c » nằm trong biểu thức"
-#: awkgram.y:2416
+#: awkgram.y:3391
#, c-format
msgid "`%s' is a gawk extension"
msgstr "« %s » là một phần mở rộng gawk"
-#: awkgram.y:2419
+#: awkgram.y:3394
#, c-format
msgid "`%s' is a Bell Labs extension"
msgstr "« %s » là một phần mở rộng của Bell Labs (Phòng thí nghiệm Bell)"
-#: awkgram.y:2422
+#: awkgram.y:3397
#, c-format
msgid "POSIX does not allow `%s'"
msgstr "POSIX không cho phép « %s »"
-#: awkgram.y:2426
+#: awkgram.y:3401
#, c-format
msgid "`%s' is not supported in old awk"
msgstr "awk cũ không hỗ trợ « %s »"
-#: awkgram.y:2452
+#: awkgram.y:3465
msgid "`goto' considered harmful!\n"
msgstr "« goto » được xem là gây tai hại\n"
-#: awkgram.y:2514
+#: awkgram.y:3518
#, c-format
msgid "%d is invalid as number of arguments for %s"
msgstr "« %d » không hợp lệ như là số đối số cho « %s »"
-#: awkgram.y:2533 awkgram.y:2536
+#: awkgram.y:3544 awkgram.y:3547
msgid "match: third argument is a gawk extension"
msgstr "match: (khớp) đối số thứ ba là phần mở rộng gawk"
-#: awkgram.y:2549
+#: awkgram.y:3575
#, c-format
msgid "%s: string literal as last arg of substitute has no effect"
msgstr ""
"%s: khi đối số cuối cùng của sự thay thế, hằng mã nguồn chuỗi không có tác "
"dụng"
-#: awkgram.y:2552
+#: awkgram.y:3580
#, c-format
msgid "%s third parameter is not a changeable object"
msgstr "tham số thứ ba %s không phải là một đối tượng có thể thay đổi"
-#: awkgram.y:2586 awkgram.y:2589
+#: awkgram.y:3665 awkgram.y:3668
msgid "close: second argument is a gawk extension"
msgstr "close: (đóng) đối số thứ hai là phần mở rộng gawk"
-#: awkgram.y:2599
+#: awkgram.y:3680
msgid "use of dcgettext(_\"...\") is incorrect: remove leading underscore"
msgstr "dùng « dcgettext(_\"...\") » không đúng: hãy gỡ bỠgạch dưới nằm trước"
-#: awkgram.y:2614
+#: awkgram.y:3695
msgid "use of dcngettext(_\"...\") is incorrect: remove leading underscore"
msgstr "dùng « dcgettext(_\"...\") » không đúng: hãy gỡ bỠgạch dưới nằm trước"
-#: awkgram.y:2686
+#: awkgram.y:3787
#, c-format
msgid "function `%s': parameter #%d, `%s', duplicates parameter #%d"
msgstr "chức năng « %s »: tham số « #%d », « %s », nhân đôi tham số « #%d »"
-#: awkgram.y:2719
+#: awkgram.y:3829
#, c-format
msgid "function `%s': parameter `%s' shadows global variable"
msgstr "chức năng « %s »: tham số « %s » che biến toàn cục"
-#: awkgram.y:2831
+#: awkgram.y:3987
#, c-format
msgid "could not open `%s' for writing (%s)"
msgstr "không mở được «%s» để ghi (%s)"
-#: awkgram.y:2832 profile.c:96
+#: awkgram.y:3988 profile.c:85
msgid "sending profile to standard error"
msgstr "đang gởi hồ sơ cho thiết bị lỗi chuẩn"
-#: awkgram.y:2864
+#: awkgram.y:3994
#, c-format
msgid "%s: close failed (%s)"
msgstr "%s: lỗi đóng (%s)"
-#: awkgram.y:2985
+#: awkgram.y:4046
msgid "shadow_funcs() called twice!"
msgstr "shadow_funcs() (hàm bóng) được gá»i hai lần !"
-#: awkgram.y:3012
+#: awkgram.y:4052
msgid "there were shadowed variables."
msgstr "có biến bị bóng."
-#: awkgram.y:3085
+#: awkgram.y:4081
#, c-format
msgid "function `%s': can't use function name as parameter name"
msgstr "chức năng « %s »: không thể dùng tên chức năng như là tên tham số"
-#: awkgram.y:3088
+#: awkgram.y:4086
#, fuzzy, c-format
msgid "function `%s': can't use special variable `%s' as a function parameter"
msgstr "chức năng « %s »: không thể dùng tên chức năng như là tên tham số"
-#: awkgram.y:3098
+#: awkgram.y:4102
#, c-format
msgid "function name `%s' previously defined"
msgstr "tên chức năng « %s » được xác định trước"
-#: awkgram.y:3249 awkgram.y:3255
+#: awkgram.y:4271 awkgram.y:4277
#, c-format
msgid "function `%s' called but never defined"
msgstr "chức năng « %s » được gá»i nhÆ°ng mà chÆ°a xác định"
-#: awkgram.y:3258
+#: awkgram.y:4280
#, c-format
msgid "function `%s' defined but never called"
msgstr "chức năng « %s » được xác định nhÆ°ng mà chÆ°a được gá»i"
-#: awkgram.y:3285
+#: awkgram.y:4311
#, c-format
msgid "regexp constant for parameter #%d yields boolean value"
msgstr "hằng biểu thức chính quy cho tham số « #%d » làm giá trị luận lý (bun)"
-#: awkgram.y:3329
+#: awkgram.y:4420
#, c-format
msgid ""
"function `%s' called with space between name and `(',\n"
"or used as a variable or an array"
msgstr ""
-"hàm « %s » được gá»i vá»›i dấu cách nằm giữa tên và « ( »\n"
+"chức năng « %s » được gá»i vá»›i dấu cách nằm giữa tên và « ( »\n"
"hoặc được dùng như là biến hay mảng"
-#: awkgram.y:3750
-msgid "division by zero attempted in `/'"
-msgstr "thử chia cho không trong « / »"
+#: awkgram.y:4673 eval.c:1845
+msgid "division by zero attempted"
+msgstr "cố gắng chia cho số không"
-#: awkgram.y:3755 eval.c:1411
+#: awkgram.y:4682 eval.c:1877
#, c-format
msgid "division by zero attempted in `%%'"
-msgstr "thử chia cho không trong « %% »"
+msgstr "cố gắng chia cho số không trong « %% »"
+
+#: awkgram.y:5342
+msgid "statement may have no effect"
+msgstr "câu có lẽ sẽ không có tác dụng"
-#: builtin.c:122
+#: builtin.c:120
#, c-format
msgid "%s to \"%s\" failed (%s)"
msgstr "%s tới « %s » bị lỗi (%s)"
-#: builtin.c:123
+#: builtin.c:121
msgid "standard output"
msgstr "thiết bị xuất chuẩn"
-#: builtin.c:124
-msgid "reason unknown"
-msgstr "không biết sao"
-
-#: builtin.c:137
+#: builtin.c:135
msgid "exp: received non-numeric argument"
msgstr "exp: đã nhận đối số không phải thuộc số"
-#: builtin.c:143
+#: builtin.c:141
#, c-format
msgid "exp: argument %g is out of range"
msgstr "exp: đối số « %g » ở ngoại phạm vị"
-#: builtin.c:201
+#: builtin.c:200
#, c-format
msgid "fflush: cannot flush: pipe `%s' opened for reading, not writing"
msgstr ""
-"fflush: không thể xoá sạch: ống dẫn « %s » được mở để Ä‘á»c, không phải để ghi"
+"fflush: không thể xóa sạch: ống dẫn « %s » được mở để Ä‘á»c, không phải để ghi"
-#: builtin.c:204
+#: builtin.c:203
#, c-format
msgid "fflush: cannot flush: file `%s' opened for reading, not writing"
msgstr ""
-"fflush: không thể xoá sạch: tập tin « %s » được mở để Ä‘á»c, không phải để ghi"
+"fflush: không thể xóa sạch: tập tin «%s» được mở để Ä‘á»c, không phải để ghi"
-#: builtin.c:216
+#: builtin.c:215
#, c-format
msgid "fflush: `%s' is not an open file, pipe or co-process"
msgstr "fflush: « %s » không phải là tập tin đã mở, ống dẫn hay đồng tiến trình"
-#: builtin.c:310
+#: builtin.c:322
msgid "index: received non-string first argument"
msgstr "index: (chỉ mục) đã nhận đối số thứ nhất không phải là chuỗi"
-#: builtin.c:312
+#: builtin.c:324
msgid "index: received non-string second argument"
msgstr "index: (chỉ mục) đã nhận đối số thứ hai không phải là chuỗi"
-#: builtin.c:434
+#: builtin.c:446
msgid "int: received non-numeric argument"
msgstr "int: (số nguyên?) đã nhận đối số không phải thuộc số"
-#: builtin.c:464
+#: builtin.c:469
+#, fuzzy
msgid "`length(array)' is a gawk extension"
msgstr "« length(array) » (độ dài mảng) là một phần mở rộng gawk"
-#: builtin.c:471
-msgid "length: untyped parameter argument will be forced to scalar"
-msgstr ""
-"length: (chiá»u dài) tham số không có loại thì bị ép buá»™c thành vô hÆ°á»›ng"
-
-#: builtin.c:480
-msgid "length: untyped argument will be forced to scalar"
-msgstr "length: (chiá»u dài) đối số không có loại thì bị ép buá»™c thành vô hÆ°á»›ng"
-
-#: builtin.c:484
+#: builtin.c:477
msgid "length: received non-string argument"
-msgstr "length: (chiá»u dài) đã nhận đối số không phải chuá»—i"
+msgstr "length: (độ dài) đã nhận đối số không phải chuỗi"
-#: builtin.c:515
+#: builtin.c:508
msgid "log: received non-numeric argument"
msgstr "log: (bản ghi) đã nhận đối số không phải thuộc số"
-#: builtin.c:518
+#: builtin.c:511
#, c-format
msgid "log: received negative argument %g"
-msgstr "log: (bản ghi) đã nhận đối số âm « %g »"
-
-#: builtin.c:726 builtin.c:729
-msgid "must use `count$' on all formats or none"
-msgstr "phải dùng « count$ » vá»›i má»i dạng thức hay không dùng cả"
+msgstr "log: (bản ghi) đã nhận đối số âm «%g»"
-#: builtin.c:790
-#, c-format
-msgid "field width is ignored for `%%%%' specifier"
-msgstr "chiá»u rá»™ng trÆ°á»ng bị bá» qua đối vá»›i toán tá»­ « %%%% »"
-
-#: builtin.c:792
-#, c-format
-msgid "precision is ignored for `%%%%' specifier"
-msgstr "độ chính xác bị bỠqua đối với toán tử « %%%% »"
-
-#: builtin.c:794
-#, c-format
-msgid "field width and precision are ignored for `%%%%' specifier"
-msgstr "chiá»u rá»™ng trÆ°á»ng và Ä‘á»™ chính xác bị bá» qua đối vá»›i toán tá»­ « %%%% »"
-
-#: builtin.c:845
-msgid "`$' is not permitted in awk formats"
-msgstr "không cho phép « $ » trong định dạng awk"
-
-#: builtin.c:851
-msgid "arg count with `$' must be > 0"
-msgstr "số đếm đối số với « $ » phải là >0"
-
-#: builtin.c:853
-#, c-format
-msgid "arg count %ld greater than total number of supplied arguments"
-msgstr "số đếm đối số %ld lớn hơn tổng số đối số được cung cấp"
-
-#: builtin.c:855
-msgid "`$' not permitted after period in format"
-msgstr "không cho phép « $ » nằm sau dấu chấm trong định dạng"
-
-#: builtin.c:868
-msgid "no `$' supplied for positional field width or precision"
-msgstr ""
-"chÆ°a cung cấp « $ » cho Ä‘á»™ rá»™ng trÆ°á»ng thuá»™c vị trí hay cho Ä‘á»™ chính xác"
-
-#: builtin.c:938
-msgid "`l' is meaningless in awk formats; ignored"
-msgstr "chữ « l » không có nghĩa trong định dạng awk nên bị bỠqua"
-
-#: builtin.c:942
-msgid "`l' is not permitted in POSIX awk formats"
-msgstr "không cho phép chữ « l » nằm trong định dạng awk POSIX"
-
-#: builtin.c:953
-msgid "`L' is meaningless in awk formats; ignored"
-msgstr "chữ « L » không có nghĩa trong định dạng awk nên bị bỠqua"
-
-#: builtin.c:957
-msgid "`L' is not permitted in POSIX awk formats"
-msgstr "không cho phép chữ « L » nằm trong định dạng awk POSIX"
-
-#: builtin.c:968
-msgid "`h' is meaningless in awk formats; ignored"
-msgstr "chữ « h » không có nghĩa trong định dạng awk nên bị bỠqua"
-
-#: builtin.c:972
-msgid "`h' is not permitted in POSIX awk formats"
-msgstr "không cho phép chữ « h » nằm trong định dạng awk POSIX"
-
-#: builtin.c:1252
-#, c-format
-msgid "[s]printf: value %g is out of range for `%%%c' format"
-msgstr "[s]printf: giá trị %g ở ngoại phạm vị cho dạng thức « %%%c »"
-
-#: builtin.c:1332
-#, c-format
-msgid "ignoring unknown format specifier character `%c': no argument converted"
-msgstr ""
-"đang bỠqua ký tự ghi rõ định dạng không rõ « %c »: không có đối số được "
-"chuyển đổi"
-
-#: builtin.c:1338
-msgid "not enough arguments to satisfy format string"
-msgstr "chưa có đủ đối số để đáp ứng chuỗi định dạng"
-
-#: builtin.c:1340
-msgid "^ ran out for this one"
-msgstr "bị hết « ^ » cho Ä‘iá»u này"
-
-#: builtin.c:1346
-msgid "[s]printf: format specifier does not have control letter"
-msgstr "[s]printf: Ä‘iá»u ghi rõ định dạng không có chữ Ä‘iá»u khiển"
-
-#: builtin.c:1349
-msgid "too many arguments supplied for format string"
-msgstr "quá nhiá»u đối số được cung cấp cho chuá»—i định dạng"
+#: builtin.c:531 builtin.c:573 builtin.c:586 builtin.c:982 builtin.c:994
+#, fuzzy, c-format
+msgid "attempt to use array `%s' in scalar context"
+msgstr "cố gắng dùng mảng « %s » trong một ngữ cảnh vô hướng"
-#: builtin.c:1424 builtin.c:1427
+#: builtin.c:569 builtin.c:580
msgid "printf: no arguments"
msgstr "printf: không có đối số"
-#: builtin.c:1451
+#: builtin.c:621
msgid "sqrt: received non-numeric argument"
msgstr "sqrt: (căn bậc hai) đã nhận đối số không phải thuộc số"
-#: builtin.c:1455
+#: builtin.c:625
#, c-format
msgid "sqrt: called with negative argument %g"
-msgstr "sqrt: (căn bậc hai) đã gá»i vá»›i đối số âm « %g »"
+msgstr "sqrt: (căn bậc hai) đã gá»i vá»›i đối số âm «%g»"
-#: builtin.c:1479
-#, c-format
-msgid "substr: start index %g is invalid, using 1"
-msgstr "substr: (chuỗi phụ) số chỉ mục đầu « %g » không hợp lệ nên dùng 1"
-
-#: builtin.c:1484
-#, c-format
-msgid "substr: non-integer start index %g will be truncated"
-msgstr ""
-"substr: (chuỗi phụ) số chỉ mục đầu không phải số nguyên « %g » sẽ bị cắt ngắn"
-
-#: builtin.c:1510
+#: builtin.c:649
#, c-format
msgid "substr: length %g is not >= 1"
msgstr "substr: (chuỗi phụ) độ dài %g không phải ≥1"
-#: builtin.c:1512
+#: builtin.c:651
#, c-format
msgid "substr: length %g is not >= 0"
msgstr "substr: (chuỗi phụ) độ dài %g không phải ≥0"
-#: builtin.c:1519
+#: builtin.c:658
#, c-format
msgid "substr: non-integer length %g will be truncated"
msgstr "substr: (chuỗi phụ) sẽ cắt xén độ dài không phải số nguyên « %g »"
-#: builtin.c:1524
+#: builtin.c:663
#, c-format
msgid "substr: length %g too big for string indexing, truncating to %g"
msgstr "substr: độ dài %g quá lớn để chỉ mục chuỗi nên xén ngắn thành %g"
-#: builtin.c:1536
+#: builtin.c:675
+#, c-format
+msgid "substr: start index %g is invalid, using 1"
+msgstr "substr: (chuỗi phụ) số chỉ mục đầu « %g » không hợp lệ nên dùng 1"
+
+#: builtin.c:680
+#, c-format
+msgid "substr: non-integer start index %g will be truncated"
+msgstr ""
+"substr: (chuỗi phụ) số chỉ mục đầu không phải số nguyên « %g » sẽ bị cắt ngắn"
+
+#: builtin.c:705
msgid "substr: source string is zero length"
msgstr "substr: (chuỗi con) chuỗi nguồn có độ dài số không"
-#: builtin.c:1552
+#: builtin.c:721
#, c-format
msgid "substr: start index %g is past end of string"
msgstr "substr: (chuỗi phụ) số chỉ mục đầu %g nằm sau kết thúc của chuỗi"
-#: builtin.c:1560
+#: builtin.c:729
#, c-format
msgid ""
"substr: length %g at start index %g exceeds length of first argument (%lu)"
@@ -674,481 +655,436 @@ msgstr ""
"substr: (chuỗi phụ) độ dài %g tại số chỉ mục đầu %g vượt quá độ dài của đối "
"số đầu (%lu)"
-#: builtin.c:1637
+#: builtin.c:806
+msgid "strftime: received non-numeric second argument"
+msgstr "strftime: đã nhận đối số thứ hai khác thuộc số"
+
+#: builtin.c:813
msgid "strftime: received non-string first argument"
msgstr "strftime: đã nhận đối số thứ nhất khác chuỗi"
-#: builtin.c:1643
+#: builtin.c:819
msgid "strftime: received empty format string"
msgstr "strftime: đã nhận chuỗi định dạng rỗng"
-#: builtin.c:1652
-msgid "strftime: received non-numeric second argument"
-msgstr "strftime: đã nhận đối số thứ hai khác thuộc số"
-
-#: builtin.c:1729
+#: builtin.c:885
msgid "mktime: received non-string argument"
msgstr "mktime: đã nhận đối số khác chuỗi"
-#: builtin.c:1746
+#: builtin.c:902
msgid "mktime: at least one of the values is out of the default range"
msgstr ""
-#: builtin.c:1781
+#: builtin.c:937
msgid "'system' function not allowed in sandbox mode"
msgstr ""
-#: builtin.c:1786
+#: builtin.c:942
msgid "system: received non-string argument"
msgstr "system: (hệ thống) đã nhận đối số khác chuỗi"
-#: builtin.c:1907 eval.c:2285
+#: builtin.c:997 eval.c:1105 eval.c:1557 eval.c:1570
+#, c-format
+msgid "reference to uninitialized variable `%s'"
+msgstr "gặp tham chiếu đến biến chưa được sở khởi « %s »"
+
+#: builtin.c:1064
#, c-format
msgid "reference to uninitialized field `$%d'"
msgstr "gặp tham chiếu đến trÆ°á»ng chÆ°a được sở khởi « $%d »"
-#: builtin.c:2012
+#: builtin.c:1098
msgid "tolower: received non-string argument"
msgstr "tolower: (đến thấp hơn) đã nhận đối số khác chuỗi"
-#: builtin.c:2042
+#: builtin.c:1151
msgid "toupper: received non-string argument"
msgstr "toupper: (đến cao hơn) đã nhận đối số khác chuỗi"
-#: builtin.c:2075
+#: builtin.c:1199
msgid "atan2: received non-numeric first argument"
msgstr "atan2: đã nhận đối số thứ nhất khác thuộc số"
-#: builtin.c:2077
+#: builtin.c:1201
msgid "atan2: received non-numeric second argument"
msgstr "atan2: đã nhận đối số thứ hai khác thuộc số"
-#: builtin.c:2096
+#: builtin.c:1220
msgid "sin: received non-numeric argument"
msgstr "sin: đã nhận đối số không phải thuộc số"
-#: builtin.c:2112
+#: builtin.c:1236
msgid "cos: received non-numeric argument"
msgstr "cos: đã nhận đối số không phải thuộc số"
-#: builtin.c:2165
+#: builtin.c:1289
msgid "srand: received non-numeric argument"
msgstr "srand: đã nhận đối số không phải thuộc số"
-#: builtin.c:2200
+#: builtin.c:1320
msgid "match: third argument is not an array"
msgstr "match: (khớp) đối số thứ ba không phải là mảng"
-#: builtin.c:2750
+#: builtin.c:1827
msgid "gensub: third argument of 0 treated as 1"
msgstr "gensub: đối số thứ ba 0 được xử lý như 1"
-#: builtin.c:2866
+#: builtin.c:1869
msgid "lshift: received non-numeric first argument"
msgstr "lshift: đã nhận đối số đầu không phải thuộc số"
-#: builtin.c:2868
+#: builtin.c:1871
msgid "lshift: received non-numeric second argument"
msgstr "lshift: (dịch bên trái) đã nhận đối số thứ hai khác thuộc số"
-#: builtin.c:2874
+#: builtin.c:1877
#, c-format
msgid "lshift(%lf, %lf): negative values will give strange results"
msgstr "lshift(%lf, %lf): giá trị âm sẽ gây ra kết quả lạ"
-#: builtin.c:2876
+#: builtin.c:1879
#, c-format
msgid "lshift(%lf, %lf): fractional values will be truncated"
msgstr "lshift(%lf, %lf): giá trị thuộc phân số sẽ bị xén ngắn"
-#: builtin.c:2878
+#: builtin.c:1881
#, c-format
msgid "lshift(%lf, %lf): too large shift value will give strange results"
msgstr "lshift(%lf, %lf): giá trị dịch quá lớn sẽ gây ra kết quả lạ"
-#: builtin.c:2904
+#: builtin.c:1908
msgid "rshift: received non-numeric first argument"
msgstr "rshift: đã nhận đối số thứ nhất khác thuộc số"
-#: builtin.c:2906
+#: builtin.c:1910
msgid "rshift: received non-numeric second argument"
msgstr "rshift: (dịch bên phải) đã nhận đối số thứ hai khác thuộc số"
-#: builtin.c:2912
+#: builtin.c:1916
#, c-format
msgid "rshift(%lf, %lf): negative values will give strange results"
msgstr "rshift(%lf, %lf): giá trị âm sẽ gây ra kết quả lạ"
-#: builtin.c:2914
+#: builtin.c:1918
#, c-format
msgid "rshift(%lf, %lf): fractional values will be truncated"
msgstr "rshift(%lf, %lf): giá trị thuộc phân số sẽ bị xén ngắn"
-#: builtin.c:2916
+#: builtin.c:1920
#, c-format
msgid "rshift(%lf, %lf): too large shift value will give strange results"
msgstr "rshift(%lf, %lf): giá trị dịch quá lớn sẽ gây ra kết quả lạ"
-#: builtin.c:2942
+#: builtin.c:1947
msgid "and: received non-numeric first argument"
msgstr "and: (và) đã nhận đối số đầu không phải thuộc số"
-#: builtin.c:2944
+#: builtin.c:1949
msgid "and: received non-numeric second argument"
msgstr "and: (và) đã nhận đối số thứ hai khác thuộc số"
-#: builtin.c:2950
+#: builtin.c:1955
#, c-format
msgid "and(%lf, %lf): negative values will give strange results"
msgstr "and(%lf, %lf): (và) giá trị âm sẽ gây ra kết quả lạ"
-#: builtin.c:2952
+#: builtin.c:1957
#, c-format
msgid "and(%lf, %lf): fractional values will be truncated"
msgstr "and(%lf, %lf): (và) giá trị thuộc phân số sẽ bị xén ngắn"
-#: builtin.c:2978
+#: builtin.c:1984
msgid "or: received non-numeric first argument"
msgstr "or: (hoặc) đã nhận đối số đầu không phải thuộc số"
-#: builtin.c:2980
+#: builtin.c:1986
msgid "or: received non-numeric second argument"
msgstr "or: (hoặc) đã nhận đối số thứ hai khác thuộc số"
-#: builtin.c:2986
+#: builtin.c:1992
#, c-format
msgid "or(%lf, %lf): negative values will give strange results"
msgstr "or(%lf, %lf): (hoặc) giá trị âm sẽ gây ra kết quả lạ"
-#: builtin.c:2988
+#: builtin.c:1994
#, c-format
msgid "or(%lf, %lf): fractional values will be truncated"
msgstr "or(%lf, %lf): (hoặc) giá trị thuộc phân số sẽ bị xén ngắn"
-#: builtin.c:3014
+#: builtin.c:2023
msgid "xor: received non-numeric first argument"
msgstr "xor: (không hoặc) đã nhận đối số thứ nhất khác thuộc số"
-#: builtin.c:3016
+#: builtin.c:2025
msgid "xor: received non-numeric second argument"
msgstr "xor: đã nhận đối số thứ hai khác thuộc số"
-#: builtin.c:3022
+#: builtin.c:2031
#, c-format
msgid "xor(%lf, %lf): negative values will give strange results"
msgstr "xor(%lf, %lf): (không hoặc) giá trị âm sẽ gây ra kết quả lạ"
-#: builtin.c:3024
+#: builtin.c:2033
#, c-format
msgid "xor(%lf, %lf): fractional values will be truncated"
msgstr "xor(%lf, %lf): (không hoặc) giá trị thuộc phân số sẽ bị xén ngắn"
-#: builtin.c:3048
+#: builtin.c:2057 builtin.c:2063
msgid "compl: received non-numeric argument"
msgstr "compl: (biên dịch) đã nhận đối số khác thuộc số"
-#: builtin.c:3054
+#: builtin.c:2065
#, c-format
msgid "compl(%lf): negative value will give strange results"
msgstr "compl(%lf): (biên dịch) giá trị âm sẽ gây ra kết quả lạ"
-#: builtin.c:3056
+#: builtin.c:2067
#, c-format
msgid "compl(%lf): fractional value will be truncated"
msgstr "compl(%lf): (biên dịch) giá trị thuộc phân số se bị xén ngắn"
-#: builtin.c:3229
+#: builtin.c:2237
#, c-format
msgid "dcgettext: `%s' is not a valid locale category"
msgstr "dcgettext: «%s» không phải là má»™t phân loại miá»n địa phÆ°Æ¡ng hợp lệ"
-#: eval.c:374
+#: eval.c:412
#, c-format
msgid "unknown nodetype %d"
msgstr "không biết kiểu nút %d"
-#: eval.c:423
-msgid "buffer overflow in genflags2str"
-msgstr "tràn bộ đệm trong « genflags2str » (tạo ra cỠđến chuỗi)"
-
-#: eval.c:455 eval.c:461 profile.c:787
-#, c-format
-msgid "attempt to use array `%s' in a scalar context"
-msgstr "cố gắng dùng mảng « %s » trong một ngữ cảnh vô hướng"
+#: eval.c:423 eval.c:437
+#, fuzzy, c-format
+msgid "unknown opcode %d"
+msgstr "không biết kiểu nút %d"
-#: eval.c:803
+#: eval.c:434
#, c-format
-msgid "for loop: array `%s' changed size from %ld to %ld during loop execution"
+msgid "opcode %s not an operator or keyword"
msgstr ""
-"cho loop: (cho vòng lặp) mảng « %s » đã thay đổi kích thước từ %ld đến %ld "
-"trong khi thực hiện vòng lặp"
-
-#: eval.c:824
-msgid "`break' outside a loop is not portable"
-msgstr "không thể mang khả năng « break » (ngắt) nằm ở ngoại vòng lặp"
-
-#: eval.c:828
-msgid "`break' outside a loop is not allowed"
-msgstr "không cho phép « break » (ngắt) nằm ở ngoại vòng lặp"
-
-#: eval.c:845
-msgid "`continue' outside a loop is not portable"
-msgstr "không thể mang khả năng « continue » (tiếp tục) nằm ở ngoại vòng lặp"
-
-#: eval.c:849
-msgid "`continue' outside a loop is not allowed"
-msgstr "không cho phép « continue » (tiếp tục) nằm ở ngoại vòng lặp"
-
-#: eval.c:883
-msgid "`next' cannot be called from a BEGIN rule"
-msgstr "không thể gá»i « next » (kế tiếp) từ quy tắc « BEGIN » (bắt đầu)"
-#: eval.c:885
-msgid "`next' cannot be called from an END rule"
-msgstr "không thể gá»i « next » (kế tiếp) từ quy tắc « END » kết thúc)"
+#: eval.c:487
+msgid "buffer overflow in genflags2str"
+msgstr "tràn bộ đệm trong « genflags2str » (tạo ra cỠđến chuỗi)"
-#: eval.c:887
-#, fuzzy
-msgid "`next' cannot be called from a BEGINFILE rule"
-msgstr "không thể gá»i « next » (kế tiếp) từ quy tắc « BEGIN » (bắt đầu)"
+#: eval.c:613
+#, c-format
+msgid ""
+"\n"
+"\t# Function Call Stack:\n"
+"\n"
+msgstr ""
+"\n"
+"\t# Äống gá»i chức năng:\n"
+"\n"
-#: eval.c:889
-#, fuzzy
-msgid "`next' cannot be called from an ENDFILE rule"
-msgstr "không thể gá»i « next » (kế tiếp) từ quy tắc « END » kết thúc)"
+#: eval.c:640
+msgid "`IGNORECASE' is a gawk extension"
+msgstr "« IGNORECASE » (bá» qua chữ hoa/thÆ°á»ng) là phần mở rá»™ng gawk"
-#: eval.c:898
-msgid "`nextfile' cannot be called from a BEGIN rule"
-msgstr ""
-"không thể gá»i « nextfile » (tập tin kế tiếp) từ quy tắc « BEGIN » (bắt đầu)"
+#: eval.c:669
+msgid "`BINMODE' is a gawk extension"
+msgstr "« BINMODE » (chế độ nhị phân) là phần mở rộng gawk"
-#: eval.c:900
-msgid "`nextfile' cannot be called from an END rule"
+#: eval.c:727
+#, c-format
+msgid "BINMODE value `%s' is invalid, treated as 3"
msgstr ""
-"không thể gá»i « nextfile » (tập tin kế tiếp) từ quy tắc « END » kết thúc)"
-#: eval.c:906
-#, fuzzy
-msgid "`nextfile' cannot be called from an ENDFILE rule"
-msgstr ""
-"không thể gá»i « nextfile » (tập tin kế tiếp) từ quy tắc « END » kết thúc)"
+#: eval.c:817
+#, c-format
+msgid "bad `%sFMT' specification `%s'"
+msgstr "đặc tả « %sFMT » sai « %s »"
-#: eval.c:963
-msgid "statement has no effect"
-msgstr "câu không có tác dụng"
+#: eval.c:895
+msgid "turning off `--lint' due to assignment to `LINT'"
+msgstr "đang tắt « --lint » do việc gán cho « LINT »"
-#: eval.c:1040 eval.c:2133
+#: eval.c:1067 eval.c:1544
#, c-format
msgid "can't use function name `%s' as variable or array"
msgstr "không thể dùng tên chức năng « %s » như là biến hay mảng"
-#: eval.c:1047 eval.c:1053
+#: eval.c:1095
+msgid "assignment is not allowed to result of builtin function"
+msgstr "không cho phép gán cho kết quả của chức năng « builtin » (có sẵn)"
+
+#: eval.c:1104 eval.c:1556 eval.c:1569
#, c-format
msgid "reference to uninitialized argument `%s'"
msgstr "gặp tham chiếu đến đối số chưa được sở khởi « %s »"
-#: eval.c:1062 eval.c:2142
+#: eval.c:1123
+msgid "attempt to field reference from non-numeric value"
+msgstr "cố gắng tham chiếu trÆ°á»ng từ giá trị khác thuá»™c số"
+
+#: eval.c:1125
+#, fuzzy
+msgid "attempt to field reference from null string"
+msgstr "cố tham chiếu từ chuỗi vô giá trị"
+
+#: eval.c:1131
+#, fuzzy, c-format
+msgid "attempt to access field %ld"
+msgstr "cố gắng truy cập trÆ°á»ng %d"
+
+#: eval.c:1140
+#, fuzzy, c-format
+msgid "reference to uninitialized field `$%ld'"
+msgstr "gặp tham chiếu đến trÆ°á»ng chÆ°a được sở khởi « $%d »"
+
+#: eval.c:1202
#, c-format
-msgid "reference to uninitialized variable `%s'"
-msgstr "gặp tham chiếu đến biến chưa được sở khởi « %s »"
+msgid "function `%s' called with more arguments than declared"
+msgstr "chức năng « %s » được gá»i vá»›i số đối số hÆ¡n số được tuyên bố"
-#: eval.c:1210
-msgid ""
-"concatenation: side effects in one expression have changed the length of "
-"another!"
+#: eval.c:1358
+#, c-format
+msgid "unwind_stack: unexpected type `%s'"
msgstr ""
-"concatenation: (nối chuỗi) hiệu ứng khác trong một biểu thức nào đó đã thay "
-"đổi độ dài của một biểu thức khác !"
-#: eval.c:1315
+#: eval.c:1636
+#, fuzzy, c-format
+msgid "attempt to use scalar `%s' as an array"
+msgstr "cố dùng Ä‘iá»u cô hÆ°á»›ng « %s » là mảng"
+
+#: eval.c:1680
msgid "assignment used in conditional context"
msgstr "Ä‘iá»u gán được dùng trong ngữ cảnh Ä‘iá»u kiện"
-#: eval.c:1396
-msgid "division by zero attempted"
-msgstr "cố gắng chia cho số không"
-
-#: eval.c:1426 profile.c:663
-#, c-format
-msgid "illegal type (%s) in tree_eval"
-msgstr "không cho phép kiểu (%s) trong « tree_eval » (ước lượng cây)"
+#: eval.c:1684
+msgid "statement has no effect"
+msgstr "câu không có tác dụng"
-#: eval.c:1589
+#: eval.c:2028
msgid "division by zero attempted in `/='"
msgstr "cố gắng chia cho số không trong « /= »"
-#: eval.c:1611
+#: eval.c:2053
#, c-format
msgid "division by zero attempted in `%%='"
msgstr "cố gắng chia cho số không trong « %%= »"
-#: eval.c:1891
-#, c-format
-msgid "function `%s' called with more arguments than declared"
-msgstr "chức năng « %s » được gá»i vá»›i số đối số hÆ¡n số được tuyên bố"
-
-#: eval.c:1948
-#, c-format
-msgid "function `%s' not defined"
-msgstr "chưa xác định chức năng « %s »"
-
-#: eval.c:1950
-#, c-format
-msgid "identifier `%s' is not a function"
-msgstr ""
-
-#: eval.c:1997
-#, c-format
-msgid ""
-"function parameter `%s' is not a scalar and cannot be used for indirect "
-"function call"
-msgstr ""
+#: eval.c:2139
+msgid "`continue' outside a loop is not allowed"
+msgstr "không cho phép « continue » (tiếp tục) nằm ở ngoại vòng lặp"
-#: eval.c:2014
-#, c-format
-msgid "indirect call of real function `%s' is silly"
-msgstr ""
+#: eval.c:2145
+#, fuzzy
+msgid "`break' outside a loop is not allowed"
+msgstr "không cho phép « break » (ngắt) nằm ở ngoại vòng lặp"
-#: eval.c:2034
+#: eval.c:2229
#, c-format
-msgid "function `%s' called indirectly through `%s' does not exist"
+msgid "for loop: array `%s' changed size from %ld to %ld during loop execution"
msgstr ""
+"cho loop: (cho vòng lặp) mảng « %s » đã thay đổi kích thước từ %ld đến %ld "
+"trong khi thực hiện vòng lặp"
-#: eval.c:2039
+#: eval.c:2342
#, c-format
-msgid "identifier `%s' cannot be used for indirect function call"
+msgid "function called indirectly through `%s' does not exist"
msgstr ""
-#: eval.c:2105
+#: eval.c:2354
#, c-format
-msgid ""
-"\n"
-"\t# Function Call Stack:\n"
-"\n"
-msgstr ""
-"\n"
-"\t# Äống gá»i chức năng:\n"
-"\n"
+msgid "function `%s' not defined"
+msgstr "chưa xác định chức năng « %s »"
-#: eval.c:2108
-#, c-format
-msgid "\t# -- main --\n"
+#: eval.c:2481
+#, fuzzy, c-format
+msgid "`nextfile' cannot be called from a `%s' rule"
msgstr ""
-"\t# -- main --\n"
-"(chính)\n"
-
-#: eval.c:2269
-msgid "attempt to field reference from non-numeric value"
-msgstr "cố gắng tham chiếu trÆ°á»ng từ giá trị khác thuá»™c số"
-
-#: eval.c:2271
-msgid "attempt to reference from null string"
-msgstr "cố tham chiếu từ chuỗi vô giá trị"
-
-#: eval.c:2277
-#, c-format
-msgid "attempt to access field %d"
-msgstr "cố gắng truy cập trÆ°á»ng %d"
-
-#: eval.c:2298 eval.c:2305 profile.c:843
-msgid "assignment is not allowed to result of builtin function"
-msgstr "không cho phép gán cho kết quả của chức năng « builtin » (có sẵn)"
-
-#: eval.c:2369
-msgid "`IGNORECASE' is a gawk extension"
-msgstr "« IGNORECASE » (bá» qua chữ hoa/thÆ°á»ng) là phần mở rá»™ng gawk"
+"không thể gá»i « nextfile » (tập tin kế tiếp) từ quy tắc « END » kết thúc)"
-#: eval.c:2398
-msgid "`BINMODE' is a gawk extension"
-msgstr "« BINMODE » (chế độ nhị phân) là phần mở rộng gawk"
+#: eval.c:2540
+#, fuzzy, c-format
+msgid "`next' cannot be called from a `%s' rule"
+msgstr "không thể gá»i « next » (kế tiếp) từ quy tắc « END » kết thúc)"
-#: eval.c:2456
+#: eval.c:2602
#, c-format
-msgid "BINMODE value `%s' is invalid, treated as 3"
+msgid "Sorry, don't know how to interpret `%s'"
msgstr ""
-#: eval.c:2546
-#, c-format
-msgid "bad `%sFMT' specification `%s'"
-msgstr "đặc tả « %sFMT » sai « %s »"
-
-#: eval.c:2624
-msgid "turning off `--lint' due to assignment to `LINT'"
-msgstr "đang tắt « --lint » do việc gán cho « LINT »"
-
-#: ext.c:61
-msgid "extensions not allowed in sandbox mode"
+#: ext.c:62
+msgid "extensions are not allowed in sandbox mode"
msgstr ""
-#: ext.c:65 ext.c:70
+#: ext.c:68 ext.c:73
msgid "`extension' is a gawk extension"
msgstr "« extension » là một phần mở rộng gawk"
-#: ext.c:80
-#, c-format
-msgid "extension: cannot open `%s' (%s)\n"
+#: ext.c:83
+#, fuzzy, c-format
+msgid "fatal: extension: cannot open `%s' (%s)\n"
msgstr "extension: (phần mở rộng) không thể mở « %s » (%s)\n"
-#: ext.c:88
-#, c-format
-msgid "extension: library `%s': cannot call function `%s' (%s)\n"
+#: ext.c:93
+#, fuzzy, c-format
+msgid "fatal: extension: library `%s': cannot call function `%s' (%s)\n"
msgstr ""
"extension: (phần mở rá»™ng) thÆ° viện « %s »: không thể gá»i chức năng « %s » (%"
"s)\n"
-#: ext.c:108
+#: ext.c:123
msgid "extension: missing function name"
msgstr "extension: (phần mở rộng) tên chức năng còn thiếu"
-#: ext.c:113
+#: ext.c:128
#, c-format
msgid "extension: illegal character `%c' in function name `%s'"
msgstr ""
"extension: (phần mở rộng) gặp ký tự cấm « %c » nằm trong tên chức năng « %s »"
-#: ext.c:119
+#: ext.c:137
#, c-format
msgid "extension: can't redefine function `%s'"
msgstr "extension: (phần mở rộng) không thể xác định lại chức năng « %s »"
-#: ext.c:123
+#: ext.c:141
#, c-format
msgid "extension: function `%s' already defined"
msgstr "extension: (phần mở rộng) chức năng « %s » đã được xác định"
-#: ext.c:128
+#: ext.c:146
+#, c-format
+msgid "extension: function name `%s' previously defined"
+msgstr "tên chức năng « %s » đã được xác định trước"
+
+#: ext.c:148
#, c-format
msgid "extension: can't use gawk built-in `%s' as function name"
msgstr ""
"extension: (phần mở rá»™ng) không thể dùng Ä‘iá»u có sẵn của gawk « %s » nhÆ° là "
"tên chức năng"
-#: ext.c:130
+#: ext.c:152
#, c-format
-msgid "extension: function name `%s' previously defined"
-msgstr "tên chức năng « %s » đã được xác định trước"
+msgid "make_builtin: negative argument count for function `%s'"
+msgstr ""
-#: ext.c:207
-#, c-format
+#: ext.c:255
+#, fuzzy, c-format
msgid "function `%s' defined to take no more than %d argument(s)"
msgstr "chức năng « %s » được xác định để chấp nhấn %d đối số tối đa"
-#: ext.c:210
+#: ext.c:258
#, c-format
msgid "function `%s': missing argument #%d"
msgstr "chức năng « %s » còn thiếu đối số thứ %d"
-#: ext.c:220
+#: ext.c:268
#, c-format
msgid "function `%s': argument #%d: attempt to use scalar as an array"
msgstr "chức năng « %s »: đối số thứ %d: cố gắng dùng Ä‘iá»u vô hÆ°á»›ng nhÆ° là mảng"
-#: ext.c:224
+#: ext.c:272
#, c-format
msgid "function `%s': argument #%d: attempt to use array as a scalar"
msgstr "chức năng « %s »: đối số thứ %d: cố gắng dùng mảng nhÆ° là Ä‘iá»u vô hÆ°á»›ng"
-#: ext.c:249
+#: ext.c:285
msgid "Operation Not Supported"
msgstr "Thao tác không được hỗ trợ"
@@ -1156,59 +1092,58 @@ msgstr "Thao tác không được hỗ trợ"
msgid "NF set to negative value"
msgstr "« NF » được đặt thành giá trị âm"
-#: field.c:913
-msgid "split: second argument is not an array"
-msgstr "split: (chia tách) đối số thứ hai không phải là mảng"
-
-#: field.c:922 field.c:932 field.c:937
+#: field.c:939 field.c:946 field.c:950
#, fuzzy
msgid "split: fourth argument is a gawk extension"
msgstr "match: (khớp) đối số thứ ba là phần mở rộng gawk"
-#: field.c:928
+#: field.c:943
#, fuzzy
msgid "split: fourth argument is not an array"
msgstr "split: (chia tách) đối số thứ hai không phải là mảng"
-#: field.c:975
-#, fuzzy
-msgid "split: null string for third argument is a gawk extension"
+#: field.c:957
+msgid "split: second argument is not an array"
+msgstr "split: (chia tách) đối số thứ hai không phải là mảng"
+
+#: field.c:987
+msgid "split: null string for third arg is a gawk extension"
msgstr ""
"split: (chia tách) chuỗi vô giá trị cho đối số thứ ba là phần mở rộng gawk"
-#: field.c:1032
+#: field.c:1028
#, fuzzy
-msgid "patsplit: second argument is not an array"
+msgid "patsplit: fourth argument is not an array"
msgstr "split: (chia tách) đối số thứ hai không phải là mảng"
-#: field.c:1041
+#: field.c:1033
#, fuzzy
-msgid "patsplit: fourth argument is not an array"
+msgid "patsplit: second argument is not an array"
msgstr "split: (chia tách) đối số thứ hai không phải là mảng"
-#: field.c:1067
+#: field.c:1051
#, fuzzy
msgid "patsplit: third argument must be non-null"
msgstr "match: (khớp) đối số thứ ba không phải là mảng"
-#: field.c:1111
+#: field.c:1084
msgid "`FIELDWIDTHS' is a gawk extension"
msgstr "« FIELDWIDTHS » (Ä‘á»™ rá»™ng trÆ°á»ng) là phần mở rá»™ng gawk"
-#: field.c:1141 field.c:1155
+#: field.c:1147
#, c-format
msgid "invalid FIELDWIDTHS value, near `%s'"
msgstr "giá trị FIELDWIDTHS (Ä‘á»™ rá»™ng trÆ°á»ng) không hợp lệ, gần « %s »"
-#: field.c:1238
+#: field.c:1220
msgid "null string for `FS' is a gawk extension"
msgstr "chuỗi vô giá trị cho « FS » là phần mở rộng gawk"
-#: field.c:1242
+#: field.c:1224
msgid "old awk does not support regexps as value of `FS'"
msgstr "awk cũ không hỗ trợ biểu thức chính quy làm giá trị của « FS »"
-#: field.c:1357
+#: field.c:1343
#, fuzzy
msgid "`FPAT' is a gawk extension"
msgstr "« %s » là một phần mở rộng gawk"
@@ -1268,450 +1203,444 @@ msgstr "%s: tùy chá»n «-W %s» không cho phép đối số\n"
msgid "%s: option '-W %s' requires an argument\n"
msgstr "%s: tùy chá»n «%s» cần đến đối số\n"
-#: io.c:379
+#: io.c:272
#, c-format
msgid "command line argument `%s' is a directory: skipped"
msgstr ""
-#: io.c:413
+#: io.c:275 io.c:372
#, c-format
msgid "cannot open file `%s' for reading (%s)"
msgstr "không mở được tập tin «%s» để ghi (%s)"
-#: io.c:459 io.c:2999
+#: io.c:419
#, c-format
msgid "error reading input file `%s': %s"
msgstr "gặp lá»—i khi Ä‘á»c tập tin nhập « %s »: %s"
-#: io.c:506
+#: io.c:470
#, c-format
msgid "close of fd %d (`%s') failed (%s)"
msgstr "lỗi đóng « fd %d » (« %s ») (%s)"
-#: io.c:617
-msgid "redirection not allowed in sandbox mode"
-msgstr ""
-
-#: io.c:648
-#, c-format
-msgid "invalid tree type %s in redirect()"
-msgstr "kiểu cây không hợp lệ « %s » trong « redirect() »"
-
-#: io.c:654
+#: io.c:577
#, c-format
msgid "expression in `%s' redirection only has numeric value"
msgstr "biểu thức trong Ä‘iá»u chuyển hÆ°á»›ng « %s » chỉ có giá trị thuá»™c số"
-#: io.c:660
+#: io.c:583
#, c-format
msgid "expression for `%s' redirection has null string value"
msgstr "biểu thức cho Ä‘iá»u chuyển hÆ°á»›ng «%s» có giá trị chuá»—i vô giá trị"
-#: io.c:665
+#: io.c:589
#, c-format
msgid "filename `%s' for `%s' redirection may be result of logical expression"
msgstr ""
"tên tập tin «%s» cho Ä‘iá»u chuyển hÆ°á»›ng «%s» có lẽ là kết quả của biểu thức "
"luận lý"
-#: io.c:707
+#: io.c:628
#, c-format
msgid "unnecessary mixing of `>' and `>>' for file `%.*s'"
msgstr "không cần hợp « > » và « >> » cho tập tin « %.*s »"
-#: io.c:754
+#: io.c:681
#, c-format
msgid "can't open pipe `%s' for output (%s)"
msgstr "không thể mở ống dẫn « %s » để xuất (%s)"
-#: io.c:763
+#: io.c:691
#, c-format
msgid "can't open pipe `%s' for input (%s)"
msgstr "không thể mở ống dẫn « %s » để nhập (%s)"
-#: io.c:786
+#: io.c:712
#, c-format
msgid "can't open two way pipe `%s' for input/output (%s)"
msgstr "không thể mở ống dẫn hai chiá»u « %s » để nhập/xuất (%s)"
-#: io.c:864
+#: io.c:794
#, c-format
msgid "can't redirect from `%s' (%s)"
msgstr "không thể chuyển hướng từ « %s » (%s)"
-#: io.c:867
+#: io.c:797
#, c-format
msgid "can't redirect to `%s' (%s)"
msgstr "không thể chuyển hướng đến «%s» (%s)"
-#: io.c:920
+#: io.c:846
msgid ""
"reached system limit for open files: starting to multiplex file descriptors"
msgstr ""
"đã tá»›i giá»›i hạn hệ thống vá» tập tin được mở nên bắt đầu phối hợp nhiá»u dòng "
"Ä‘iá»u mô tả tập tin"
-#: io.c:936
+#: io.c:862
#, c-format
msgid "close of `%s' failed (%s)."
msgstr "lỗi đóng « %s » (%s)"
-#: io.c:944
+#: io.c:870
msgid "too many pipes or input files open"
msgstr "quá nhiá»u ống dẫn hay tập tin nhập được mở"
-#: io.c:967
+#: io.c:892
msgid "close: second argument must be `to' or `from'"
msgstr "close: (đóng) đối số thứ hai phải là « to » (đến) hay « from » (từ)"
-#: io.c:981
+#: io.c:909
#, c-format
msgid "close: `%.*s' is not an open file, pipe or co-process"
msgstr ""
"close: (đóng) « %.*s » không phải là tập tin được mở, ống dẫn hay tiến trình "
"vá»›i nhau"
-#: io.c:986
+#: io.c:914
msgid "close of redirection that was never opened"
msgstr "việc đóng Ä‘iá»u chuyển hÆ°á»›ng chÆ°a mở"
-#: io.c:1083
+#: io.c:1011
#, c-format
msgid "close: redirection `%s' not opened with `|&', second argument ignored"
msgstr ""
"close: (đóng) Ä‘iá»u chuyển hÆ°á»›ng « %s » không được mở bởi « |& » nên đối số thứ "
"hai bị bỠqua"
-#: io.c:1099
+#: io.c:1027
#, c-format
msgid "failure status (%d) on pipe close of `%s' (%s)"
msgstr "trạng thái thất bại (%d) khi đóng ống dẫn «%s» (%s)"
-#: io.c:1102
+#: io.c:1030
#, c-format
msgid "failure status (%d) on file close of `%s' (%s)"
msgstr "trạng thái thất bại (%d) khi đóng tập tin «%s» (%s)"
-#: io.c:1122
+#: io.c:1050
#, c-format
msgid "no explicit close of socket `%s' provided"
msgstr "không có việc đóng dứt khoát ổ cắm « %s » được cung cấp"
-#: io.c:1125
+#: io.c:1053
#, c-format
msgid "no explicit close of co-process `%s' provided"
msgstr "không có việc đóng dứt khoát đồng tiến trình « %s » được cung cấp"
-#: io.c:1128
+#: io.c:1056
#, c-format
msgid "no explicit close of pipe `%s' provided"
msgstr "không có việc đóng dứt khoát ống dẫn « %s » được cung cấp"
-#: io.c:1131
+#: io.c:1059
#, c-format
msgid "no explicit close of file `%s' provided"
msgstr "không có việc đóng dứt khoát tập tin « %s » được cung cấp"
-#: io.c:1159 io.c:1214 main.c:832 main.c:874
+#: io.c:1087 io.c:1142 main.c:823 main.c:865
#, c-format
msgid "error writing standard output (%s)"
msgstr "gặp lỗi khi ghi thiết bị xụất chuẩn (%s)"
-#: io.c:1163 io.c:1219
+#: io.c:1091 io.c:1147
#, c-format
msgid "error writing standard error (%s)"
msgstr "gặp lỗi khi ghi thiết bị lỗi chuẩn (%s)"
-#: io.c:1171
+#: io.c:1099
#, c-format
msgid "pipe flush of `%s' failed (%s)."
msgstr "lỗi xóa sạch ống dẫn « %s » (%s)"
-#: io.c:1174
+#: io.c:1102
#, c-format
msgid "co-process flush of pipe to `%s' failed (%s)."
msgstr "lỗi xóa sạch ống dẫn đồng tiến trình đến « %s » (%s)"
-#: io.c:1177
+#: io.c:1105
#, c-format
msgid "file flush of `%s' failed (%s)."
msgstr "lỗi xóa sạch tập tin « %s » (%s)"
-#: io.c:1292
+#: io.c:1219
#, c-format
msgid "local port %s invalid in `/inet'"
msgstr "cổng cục bộ %s không hợp lệ trong « /inet »"
-#: io.c:1309
+#: io.c:1236
#, c-format
msgid "remote host and port information (%s, %s) invalid"
msgstr "thông tin vỠmáy/cổng ở xa (%s, %s) không phải hợp lệ"
-#: io.c:1344
+#: io.c:1276
msgid "/inet/raw client not ready yet, sorry"
msgstr "tiếc là ứng dụng khách <inet/raw> chưa sẵn sàng"
-#: io.c:1347 io.c:1383
+#: io.c:1279 io.c:1320
msgid "only root may use `/inet/raw'."
msgstr "chỉ ngÆ°á»i chủ (root) có thể dùng </inet/raw> thôi"
-#: io.c:1381
+#: io.c:1318
msgid "/inet/raw server not ready yet, sorry"
msgstr "tiếc là trình phục vụ </inet/raw> chưa sẵn sàng"
-#: io.c:1477
+#: io.c:1417
#, c-format
msgid "no (known) protocol supplied in special filename `%s'"
msgstr ""
"trong tên tập tin đặc biệt « %s » không cung cấp giao thức (đã biết) nào"
-#: io.c:1491
+#: io.c:1431
#, c-format
msgid "special file name `%s' is incomplete"
msgstr "tên tập tin đặc biệt « %s » chưa xong"
-#: io.c:1506
+#: io.c:1447
msgid "must supply a remote hostname to `/inet'"
msgstr "phải cung cấp một tên máy từ xa cho </inet>"
-#: io.c:1524
+#: io.c:1465
msgid "must supply a remote port to `/inet'"
msgstr "phải cung cấp một cổng từ xa cho </inet>"
-#: io.c:1570
+#: io.c:1511
msgid "TCP/IP communications are not supported"
msgstr "truyá»n thông TCP/IP không được há»— trợ"
-#: io.c:1758
+#: io.c:1698
#, c-format
msgid "could not open `%s', mode `%s'"
msgstr "không mở được «%s», chế độ «%s»"
-#: io.c:1809
+#: io.c:1749
#, c-format
msgid "close of master pty failed (%s)"
msgstr "lỗi đóng pty (tài sản?) chính (%s)"
-#: io.c:1811 io.c:1963 io.c:2114
+#: io.c:1751 io.c:1918 io.c:2075
#, c-format
msgid "close of stdout in child failed (%s)"
msgstr "lỗi đóng thiết bị xuất chuẩn trong tiến trình con (%s)"
-#: io.c:1814
+#: io.c:1754
#, c-format
msgid "moving slave pty to stdout in child failed (dup: %s)"
msgstr ""
"lá»—i di chuyển pty (tài sản?) phụ tá»›i thiết bị xuất chuẩn trong Ä‘iá»u con "
"(nhân đôi: %s)"
-#: io.c:1816 io.c:1968
+#: io.c:1756 io.c:1923
#, c-format
msgid "close of stdin in child failed (%s)"
msgstr "lỗi đóng thiết bị nhập chuẩn trong tiến trình con (%s)"
-#: io.c:1819
+#: io.c:1759
#, c-format
msgid "moving slave pty to stdin in child failed (dup: %s)"
msgstr ""
"lá»—i di chuyển pty (tài sản?) phụ tá»›i thiết bị nhập chuẩn trong Ä‘iá»u con "
"(nhân đôi: %s)"
-#: io.c:1821 io.c:1840
+#: io.c:1761 io.c:1782
#, c-format
msgid "close of slave pty failed (%s)"
msgstr "lỗi đóng pty (tài sản?) phụ (%s)"
-#: io.c:1914 io.c:1966 io.c:2095 io.c:2117
+#: io.c:1860 io.c:1921 io.c:2053 io.c:2078
#, c-format
msgid "moving pipe to stdout in child failed (dup: %s)"
msgstr ""
"lỗi di chuyển ống dẫn đến thiết bị xuất chuẩn trong tiến trình con (dup: %s) "
"(nhân đôi)"
-#: io.c:1918 io.c:1971
+#: io.c:1867 io.c:1926
#, c-format
msgid "moving pipe to stdin in child failed (dup: %s)"
msgstr ""
"lỗi di chuyển ống dẫn đến thiết bị nhập chuẩn trong tiến trình con (dup: %s) "
"(nhân đôi)"
-#: io.c:1935 io.c:2108
+#: io.c:1887 io.c:2068
msgid "restoring stdout in parent process failed\n"
msgstr "lỗi phục hồi thiết bị xuất chuẩn trong tiến trình mẹ\n"
-#: io.c:1940
+#: io.c:1895
msgid "restoring stdin in parent process failed\n"
msgstr "lỗi phục hồi thiết bị nhập chuẩn trong tiến trình mẹ\n"
-#: io.c:1974 io.c:2119 io.c:2130
+#: io.c:1929 io.c:2080 io.c:2094
#, c-format
msgid "close of pipe failed (%s)"
msgstr "lỗi đóng ống dẫn (%s)"
-#: io.c:2019
+#: io.c:1974
msgid "`|&' not supported"
msgstr "« |& » không được hỗ trợ"
-#: io.c:2085
+#: io.c:2040
#, c-format
msgid "cannot open pipe `%s' (%s)"
msgstr "không thể mở ống dẫn « %s » (%s)"
-#: io.c:2126
+#: io.c:2088
#, c-format
msgid "cannot create child process for `%s' (fork: %s)"
msgstr "không thể tạo tiến trình con cho « %s » (fork: %s)"
-#: io.c:2518
+#: io.c:2577
#, c-format
msgid "data file `%s' is empty"
msgstr "tập tin dữ liệu « %s » là rỗng"
-#: io.c:2560 io.c:2568
+#: io.c:2618 io.c:2626
msgid "could not allocate more input memory"
msgstr "không thể cấp phát bộ nhớ nhập thêm nữa"
-#: io.c:3125
+#: io.c:3173
msgid "multicharacter value of `RS' is a gawk extension"
msgstr "giá trị đa ký tự của « RS » là phần mở rộng gawk"
-#: main.c:313
+#: main.c:311
msgid "out of memory"
-msgstr "hết bộ nhớ"
+msgstr ""
-#: main.c:381
+#: main.c:388
msgid "`-m[fr]' option irrelevant in gawk"
msgstr "tùy chá»n « -m[fr] » không thích Ä‘ang trong gawk"
-#: main.c:383
+#: main.c:390
msgid "-m option usage: `-m[fr] nnn'"
msgstr "cách sá»­ dụng tùy chá»n «-m»: « -m[fr] nnn »"
-#: main.c:419
+#: main.c:426
#, fuzzy
msgid "empty argument to `-e/--source' ignored"
msgstr "đối số rỗng tới « --source » (nguồn) bị bỠqua"
-#: main.c:485
+#: main.c:492
#, c-format
msgid "%s: option `-W %s' unrecognized, ignored\n"
msgstr "%s: tùy chá»n « -W %s » không được nhận diện nên bị bá» qua\n"
-#: main.c:530
+#: main.c:545
#, c-format
msgid "%s: option requires an argument -- %c\n"
msgstr "%s: tùy chá»n cần đến đối số « -- %c »\n"
-#: main.c:551
+#: main.c:566
msgid "environment variable `POSIXLY_CORRECT' set: turning on `--posix'"
msgstr ""
"biến môi trÆ°á»ng « POSIXLY_CORRECT » (đúng kiểu POSIX) đã được đặt; Ä‘ang bật "
"tùy chá»n « --posix »"
-#: main.c:557
+#: main.c:572
msgid "`--posix' overrides `--traditional'"
msgstr "tùy chá»n « --posix » có quyá»n cao hÆ¡n « --traditional » (truyá»n thống)"
-#: main.c:568
+#: main.c:583
msgid "`--posix'/`--traditional' overrides `--non-decimal-data'"
msgstr ""
"« --posix »/« --traditional » (truyá»n thống) có quyá»n cao hÆ¡n « --non-decimal-"
"data » (dữ liệu khác thập phân)"
-#: main.c:572
+#: main.c:587
#, c-format
msgid "running %s setuid root may be a security problem"
msgstr "việc chạy %s với tư cách « setuid root » có thể rủi rỠbảo mật"
-#: main.c:577
+#: main.c:592
#, fuzzy
msgid "`--posix' overrides `--binary'"
msgstr "tùy chá»n « --posix » có quyá»n cao hÆ¡n « --traditional » (truyá»n thống)"
-#: main.c:622
+#: main.c:643
#, c-format
msgid "can't set binary mode on stdin (%s)"
msgstr "không thể đặt chế độ nhị phân trên thiết bị nhập chuẩn (%s)"
-#: main.c:625
+#: main.c:646
#, c-format
msgid "can't set binary mode on stdout (%s)"
msgstr "không thể đặt chế độ nhị phân trên thiết bị xuất chuẩn (%s)"
-#: main.c:627
+#: main.c:648
#, c-format
msgid "can't set binary mode on stderr (%s)"
msgstr "không thể đặt chế độ nhị phân trên thiết bị lỗi chuẩn (%s)"
-#: main.c:668
+#: main.c:687
msgid "no program text at all!"
msgstr "không có đoạn chữ chương trình nào cả !"
-#: main.c:773
+#: main.c:762
#, c-format
msgid "Usage: %s [POSIX or GNU style options] -f progfile [--] file ...\n"
msgstr ""
"Cách sá»­ dụng: %s [tùy chá»n kiểu POSIX hay GNU] -f tập_tin_chÆ°Æ¡ng_trình [--] "
"tập_tin ...\n"
-#: main.c:775
+#: main.c:764
#, c-format
msgid "Usage: %s [POSIX or GNU style options] [--] %cprogram%c file ...\n"
msgstr ""
"Cách sá»­ dụng: %s [tùy chá»n kiểu POSIX hay GNU] [--] %cchÆ°Æ¡ng_trình%c "
"tập_tin ...\n"
-#: main.c:780
+#: main.c:769
#, fuzzy
msgid "POSIX options:\t\tGNU long options: (standard)\n"
msgstr "tùy chá»n POSIX:\t\ttùy chá»n dài GNU:\n"
-#: main.c:781
+#: main.c:770
msgid "\t-f progfile\t\t--file=progfile\n"
msgstr "\t-f tập_tin_chương_trình\t\t--file=tập_tin_chương_trình\n"
-#: main.c:782
+#: main.c:771
msgid "\t-F fs\t\t\t--field-separator=fs\n"
msgstr "\t-F fs\t\t\t--field-separator=Ä‘iá»u phân cách trÆ°á»ng\n"
-#: main.c:783
+#: main.c:772
msgid "\t-v var=val\t\t--assign=var=val\n"
msgstr ""
"\t-v var=giá trị\t\t--assign=biến=giá_trị\n"
"(assign: gán, var: biến)\n"
-#: main.c:784
+#: main.c:773
#, fuzzy
-msgid "POSIX options:\t\tGNU long options: (extensions)\n"
+msgid "Short options:\t\tGNU long options: (extensions)\n"
msgstr "tùy chá»n POSIX:\t\ttùy chá»n dài GNU:\n"
-#: main.c:785
+#: main.c:774
msgid "\t-m[fr] val\n"
msgstr "\t-m[fr] giá_trị\n"
-#: main.c:786
+#: main.c:775
msgid "\t-b\t\t\t--characters-as-bytes\n"
msgstr ""
-#: main.c:787
-msgid "\t-c\t\t\t--compat, --traditional\n"
+#: main.c:776
+#, fuzzy
+msgid "\t-c\t\t\t--traditional\n"
msgstr ""
+"\t-W traditional\t\t--traditional\n"
+"(truyá»n thống)\n"
-#: main.c:788
+#: main.c:777
#, fuzzy
-msgid "\t-C\t\t\t--copyleft, --copyright\n"
+msgid "\t-C\t\t\t--copyright\n"
msgstr ""
"\t-W copyright\t\t--copyright\n"
"(tác quyá»n)\n"
-#: main.c:789
+#: main.c:778
#, fuzzy
msgid "\t-d [file]\t\t--dump-variables[=file]\n"
msgstr ""
"\t-W dump-variables[=tập_tin]\t--dump-variables[=tập_tin]\n"
"(đổ các biến)\n"
-#: main.c:790
+#: main.c:779
#, fuzzy
msgid "\t-e 'program-text'\t--source='program-text'\n"
msgstr ""
@@ -1719,68 +1648,62 @@ msgstr ""
"(source: nguồn\n"
"program-text: đoạn chữ của chương trình)\n"
-#: main.c:791
+#: main.c:780
#, fuzzy
msgid "\t-E file\t\t\t--exec=file\n"
msgstr "\t-W exec=tập_tin\t\t--exec=tập_tin\n"
-#: main.c:792
+#: main.c:781
#, fuzzy
msgid "\t-g\t\t\t--gen-pot\n"
msgstr ""
"\t-W gen-po\t\t--gen-po\n"
"(gen là viết tắt cho generate: tạo ra)\n"
-#: main.c:793
+#: main.c:782
#, fuzzy
-msgid "\t-h\t\t\t--help, --usage\n"
+msgid "\t-h\t\t\t--help\n"
msgstr ""
"\t-W help\t\t\t--help\n"
"(trợ giúp)\n"
-#: main.c:794
+#: main.c:783
#, fuzzy
-msgid "\t-l [fatal]\t\t--lint[=fatal]\n"
+msgid "\t-L [fatal]\t\t--lint[=fatal]\n"
msgstr ""
"\t-W lint[=fatal]\t\t--lint[=fatal]\n"
"(l? int là viết tắt cho integer: số nguyên\n"
"fatal: nghiêm trá»ng)\n"
-#: main.c:795
-#, fuzzy
-msgid "\t-L\t\t\t--lint-old\n"
-msgstr ""
-"\t-W lint-old\t\t--lint-old\n"
-"(old: cũ)\n"
-
-#: main.c:796
+#: main.c:784
#, fuzzy
msgid "\t-n\t\t\t--non-decimal-data\n"
msgstr ""
"\t-W non-decimal-data\t--non-decimal-data\n"
"(dữ liệu khác thập phân)\n"
-#: main.c:797
+#: main.c:785
+#, fuzzy
msgid "\t-N\t\t\t--use-lc-numeric\n"
-msgstr ""
+msgstr "\t-W use-lc-numeric\t--use-lc-numeric\n"
-#: main.c:798
+#: main.c:786
msgid "\t-O\t\t\t--optimize\n"
msgstr ""
-#: main.c:799
+#: main.c:787
#, fuzzy
msgid "\t-p [file]\t\t--profile[=file]\n"
msgstr ""
"\t-W profile[=tập_tin]\t--profile[=tập_tin]\n"
"(profile: hồ sơ)\n"
-#: main.c:800
+#: main.c:788
#, fuzzy
msgid "\t-P\t\t\t--posix\n"
msgstr "\t-W posix\t\t--posix\n"
-#: main.c:801
+#: main.c:789
#, fuzzy
msgid "\t-r\t\t\t--re-interval\n"
msgstr ""
@@ -1788,26 +1711,38 @@ msgstr ""
"(re-[động từ]: [làm] lại\n"
"interval: thá»i gian giữa hai lúc)\n"
-#: main.c:802
+#: main.c:791
#, fuzzy
+msgid "\t-R file\t\t\t--command=file\n"
+msgstr "\t-W exec=tập_tin\t\t--exec=tập_tin\n"
+
+#: main.c:792
msgid "\t-S\t\t\t--sandbox\n"
-msgstr "\t-W posix\t\t--posix\n"
+msgstr ""
-#: main.c:803
+#: main.c:793
+#, fuzzy
+msgid "\t-t\t\t\t--lint-old\n"
+msgstr ""
+"\t-W lint-old\t\t--lint-old\n"
+"(old: cũ)\n"
+
+#: main.c:794
#, fuzzy
msgid "\t-V\t\t\t--version\n"
msgstr ""
"\t-W version\t\t--version\n"
"(phiên bản)\n"
-#: main.c:805
+#: main.c:796
msgid "\t-W nostalgia\t\t--nostalgia\n"
msgstr ""
"\t-W nostalgia\t\t--nostalgia\n"
"(nỗi luyến tiếc quá khứ)\n"
-#: main.c:808
-msgid "\t-W parsedebug\t\t--parsedebug\n"
+#: main.c:799
+#, fuzzy
+msgid "\t-Y\t\t--parsedebug\n"
msgstr ""
"\t-W parsedebug\t\t--parsedebug\n"
"(parse: phân tách\n"
@@ -1818,7 +1753,7 @@ msgstr ""
#. for this application. Please add _another line_ with the
#. address for translation bugs.
#. no-wrap
-#: main.c:817
+#: main.c:808
msgid ""
"\n"
"To report bugs, see node `Bugs' in `gawk.info', which is\n"
@@ -1832,7 +1767,7 @@ msgstr ""
"trong bản in.\n"
"\n"
-#: main.c:821
+#: main.c:812
msgid ""
"gawk is a pattern scanning and processing language.\n"
"By default it reads standard input and writes standard output.\n"
@@ -1842,7 +1777,7 @@ msgstr ""
"Mặc định là nó Ä‘á»c thiết bị nhập chuẩn và ghi ra thiết bị xuất chuẩn.\n"
"\n"
-#: main.c:825
+#: main.c:816
msgid ""
"Examples:\n"
"\tgawk '{ sum += $1 }; END { print sum }' file\n"
@@ -1852,7 +1787,7 @@ msgstr ""
"\tgawk '{ sum += $1 }; END { print sum }' file\n"
"\tgawk -F: '{ print $1 }' /etc/passwd\n"
-#: main.c:845
+#: main.c:836
#, c-format
msgid ""
"Copyright (C) 1989, 1991-%d Free Software Foundation.\n"
@@ -1865,13 +1800,13 @@ msgid ""
msgstr ""
"Tác quyá»n © năm 1989, 1991-%d của Tổ chức Phần má»m Tá»± do.\n"
"\n"
-"ChÆ°Æ¡ng trình này là phần má»m tá»± do; bạn có thể phân phối lại nó\n"
-"và/hay sá»­a đổi nó vá»›i Ä‘iá»u kiện của Bản Quyá»n Công Chung GNU (GPL)\n"
-"nhÆ° do Tổ chức Phần má»m Tá»± do xuất bản, hoặc phiên bản 3\n"
-"của Bản Quyá»n, hoặc (tùy chá»n) bất cứ phiên bản sau nào.\n"
+"ChÆ°Æ¡ng trình này là phần má»m tá»± do; bạn có thể phát hành lại nó và/hoặc sá»­a "
+"đổi nó vá»›i Ä‘iá»u kiện của Giấy Phép Công Cá»™ng GNU nhÆ° được xuất bản bởi Tổ "
+"Chức Phần Má»m Tá»± Do; hoặc phiên bản 3 của Giấy Phép này, hoặc (tùy chá»n) bất "
+"kỳ phiên bản sau nào.\n"
"\n"
-#: main.c:853
+#: main.c:844
msgid ""
"This program is distributed in the hope that it will be useful,\n"
"but WITHOUT ANY WARRANTY; without even the implied warranty of\n"
@@ -1885,29 +1820,25 @@ msgstr ""
"Hãy xem Bản Quyá»n Công Chung GNU (GPL) để tìm chi tiết.\n"
"\n"
-#: main.c:864
-#, fuzzy
+#: main.c:855
msgid ""
"You should have received a copy of the GNU General Public License\n"
"along with this program. If not, see http://www.gnu.org/licenses/.\n"
msgstr ""
-"Bện nên đã nhận má»™t bản sao của Bản Quyá»n Công Chung GNU\n"
-"cùng với chương trình này; nếu không, hãy viết thư cho\n"
-"Tổ chức Phần má»m Tá»± do:\n"
-"Free Software Foundation, Inc.,\n"
-"51 Franklin Street, Fifth Floor,\n"
-"Boston, MA 02110-1301, USA (Mỹ).\n"
+"Bện nên đã nhận một bản sao của Giấy Phép Công Cộng GNU\n"
+"cùng với chương trình này. Không thì xem địa chỉ « http://www.gnu.org/"
+"licenses/ ».\n"
-#: main.c:899
+#: main.c:890
msgid "-Ft does not set FS to tab in POSIX awk"
msgstr "-Ft không đặt FS (hệ thống tập tin?) là tab trong awk POSIX"
-#: main.c:1116
+#: main.c:1122
#, c-format
msgid "unknown value for field spec: %d\n"
msgstr ""
-#: main.c:1176
+#: main.c:1182
#, c-format
msgid ""
"%s: `%s' argument to `-v' not in `var=value' form\n"
@@ -1916,101 +1847,101 @@ msgstr ""
"%s: đối số « %s » đối với « -v » không phải có dạng « biến=giá_trị »\n"
"\n"
-#: main.c:1196
+#: main.c:1202
#, c-format
msgid "`%s' is not a legal variable name"
msgstr "« %s » không phải là tên biến hợp lệ"
-#: main.c:1199
+#: main.c:1205
#, c-format
msgid "`%s' is not a variable name, looking for file `%s=%s'"
msgstr "« %s » không phải là tên biến; đang tìm tập tin « %s=%s »"
-#: main.c:1238
+#: main.c:1258
msgid "floating point exception"
msgstr "ngoại lệ điểm phù động"
-#: main.c:1245
+#: main.c:1265
msgid "fatal error: internal error"
msgstr "lá»—i nghiêm trá»ng: lá»—i ná»™i bá»™"
-#: main.c:1260
+#: main.c:1280
#, fuzzy
msgid "fatal error: internal error: segfault"
msgstr "lá»—i nghiêm trá»ng: lá»—i ná»™i bá»™"
-#: main.c:1272
+#: main.c:1292
#, fuzzy
msgid "fatal error: internal error: stack overflow"
msgstr "lá»—i nghiêm trá»ng: lá»—i ná»™i bá»™"
-#: main.c:1322
+#: main.c:1342
#, c-format
msgid "no pre-opened fd %d"
msgstr "không có fd (chỉ thị tập tin?) %d đã mở trước"
-#: main.c:1329
+#: main.c:1349
#, c-format
msgid "could not pre-open /dev/null for fd %d"
msgstr "không thể mở </dev/null> trước cho fd (chỉ thị tập tin?) %d"
-#: main.c:1352 main.c:1361
+#: main.c:1372 main.c:1381
#, c-format
msgid "could not find groups: %s"
msgstr "không tìm thấy nhóm: %s"
-#: msg.c:54
+#: msg.c:62
#, c-format
msgid "cmd. line:"
msgstr "dòng lệnh:"
-#: msg.c:120
+#: msg.c:97
msgid "warning: "
msgstr "cảnh báo : "
-#: msg.c:142
+#: msg.c:106
msgid "error: "
msgstr "lá»—i: "
-#: msg.c:178
+#: msg.c:129
msgid "fatal: "
msgstr "nghiêm trá»ng: "
-#: node.c:63 node.c:78 node.c:105 node.c:121 node.c:151
-msgid "can't convert string to float"
-msgstr "không thể chuyển đổi chuá»—i sang Ä‘iá»u lÆ¡ lá»­ng"
-
-#: node.c:465
+#: node.c:401
msgid "backslash at end of string"
msgstr "gặp xuyệc ngoặc tại kết thúc của chuỗi"
-#: node.c:609
+#: node.c:502
#, c-format
msgid "old awk does not support the `\\%c' escape sequence"
msgstr "awk cũ không hỗ trợ dãy thoát « \\%c »"
-#: node.c:660
+#: node.c:553
msgid "POSIX does not allow `\\x' escapes"
msgstr "POSIX không cho phép Ä‘iá»u thoát « \\x »"
-#: node.c:666
+#: node.c:559
msgid "no hex digits in `\\x' escape sequence"
msgstr "không có số thập lúc nằm trong dây thoát « \\x »"
-#: node.c:688
+#: node.c:581
#, c-format
msgid ""
"hex escape \\x%.*s of %d characters probably not interpreted the way you "
"expect"
msgstr ""
-"dây thoát thập lục \\x%.*s chứa %d ký tá»± mà rất có thể không phải được Ä‘á»c "
-"bằng cách dự định"
-#: node.c:703
+#: node.c:596
#, c-format
msgid "escape sequence `\\%c' treated as plain `%c'"
msgstr "dây thoát « \\%c » được xử lý như là « %c » chuẩn"
+#: node.c:737
+msgid ""
+"Invalid multibyte data detected. There may be a mismatch between your data "
+"and your locale."
+msgstr ""
+
#: posix/gawkmisc.c:172
#, c-format
msgid "%s %s `%s': could not set close-on-exec: (fcntl: %s)"
@@ -2018,76 +1949,40 @@ msgstr ""
"%s %s « %s »: không thể đặt « close-on-exec » (đóng một khi thực hiện) (fcntl: "
"%s)"
-#: profile.c:94
+#: profile.c:83
#, c-format
msgid "could not open `%s' for writing: %s"
msgstr "không thể mở « %s » để ghi: %s"
-#: profile.c:457
-#, c-format
-msgid "internal error: %s with null vname"
-msgstr "lỗi nội bộ: %s với vname (tên biến?) vô giá trị"
-
-#: profile.c:522
-msgid "# treated internally as `delete'"
-msgstr "# được xá»­ lý ná»™i bá»™ là « delete » (xoá bá»)"
-
-#: profile.c:1076
-#, c-format
-msgid "# this is a dynamically loaded extension function"
-msgstr "# đây là một chức năng mở rộng được tải động"
-
-#: profile.c:1109
-#, c-format
-msgid "\t# gawk profile, created %s\n"
-msgstr "\t# hồ sơ gawk, được tạo %s\n"
-
-#: profile.c:1112
-#, c-format
-msgid ""
-"\t# BEGIN block(s)\n"
-"\n"
-msgstr ""
-"\t# khối BEGIN (bắt đầu)\n"
-"\n"
-
-#: profile.c:1122
+#: profile.c:203
#, fuzzy, c-format
msgid ""
-"\t# BEGINFILE block(s)\n"
+"\t# %s block(s)\n"
"\n"
msgstr ""
-"\t# khối BEGIN (bắt đầu)\n"
+"\t# khối END (kết thúc)\n"
"\n"
-#: profile.c:1132
-#, c-format
+#: profile.c:208
+#, fuzzy, c-format
msgid ""
-"\t# Rule(s)\n"
+"\t# %s(s)\n"
"\n"
msgstr ""
"\t# Quy tắc\n"
"\n"
-#: profile.c:1138
-#, fuzzy, c-format
-msgid ""
-"\t# ENDFILE block(s)\n"
-"\n"
-msgstr ""
-"\t# khối END (kết thúc)\n"
-"\n"
+#: profile.c:278
+#, c-format
+msgid "internal error: %s with null vname"
+msgstr "lỗi nội bộ: %s với vname (tên biến?) vô giá trị"
-#: profile.c:1148
+#: profile.c:945
#, c-format
-msgid ""
-"\t# END block(s)\n"
-"\n"
-msgstr ""
-"\t# khối END (kết thúc)\n"
-"\n"
+msgid "\t# gawk profile, created %s\n"
+msgstr "\t# hồ sơ gawk, được tạo %s\n"
-#: profile.c:1168
+#: profile.c:1328
#, c-format
msgid ""
"\n"
@@ -2096,17 +1991,12 @@ msgstr ""
"\n"
"\t# Danh sách các chức năng theo thứ tự abc\n"
-#: profile.c:1431
+#: profile.c:1367
#, c-format
-msgid "unexpected type %s in prec_level"
-msgstr "gặp kiểu bất ngỠ« %s » trong « prec_level » (cấp nằm trước?)"
-
-#: profile.c:1557
-#, fuzzy, c-format
-msgid "Unknown node type %s in pp_var"
-msgstr "không biết kiểu nút %d"
+msgid "redir2str: unknown redirection type %d"
+msgstr ""
-#: re.c:537
+#: re.c:559
#, c-format
msgid "regexp component `%.*s' should probably be `[%.*s]'"
msgstr ""
@@ -2179,18 +2069,42 @@ msgstr "Biểu thức chính quy quá lớn"
msgid "Unmatched ) or \\)"
msgstr "Chưa khớp « ) » hay « \\) »"
-#: regcomp.c:699
+#: regcomp.c:701
msgid "No previous regular expression"
msgstr "Không có biểu thức chính quy nằm trước"
-#~ msgid "%s: illegal option -- %c\n"
-#~ msgstr "%s: không cho phép tùy chá»n « -- %c »\n"
+#~ msgid "call of `length' without parentheses is deprecated by POSIX"
+#~ msgstr "POSIX phản đối lá»i gá»i « length » (Ä‘á»™ dài) không có dấu ngoặc"
+
+#, fuzzy
+#~ msgid "reference to uninitialized field `$%s'"
+#~ msgstr "gặp tham chiếu đến trÆ°á»ng chÆ°a được sở khởi « $%d »"
+
+#~ msgid "can't convert string to float"
+#~ msgstr "không thể chuyển đổi chuá»—i sang Ä‘iá»u lÆ¡ lá»­ng"
+
+#~ msgid "`continue' outside a loop is not portable"
+#~ msgstr "không thể mang khả năng « continue » (tiếp tục) nằm ở ngoại vòng lặp"
+
+#~ msgid "`break' outside a loop is not portable"
+#~ msgstr "không thể mang khả năng « break » (ngắt) nằm ở ngoại vòng lặp"
+
+#~ msgid "`nextfile' cannot be called from a BEGIN rule"
+#~ msgstr ""
+#~ "không thể gá»i « nextfile » (tập tin kế tiếp) từ quy tắc « BEGIN » (bắt đầu)"
+
+#~ msgid "`next' cannot be called from a BEGIN rule"
+#~ msgstr "không thể gá»i « next » (kế tiếp) từ quy tắc « BEGIN » (bắt đầu)"
#~ msgid "file `%s' is a directory"
#~ msgstr "tập tin « %s » là thư mục"
-#~ msgid "can't open two way socket `%s' for input/output (%s)"
-#~ msgstr "không thể mở ổ cắm hai chiá»u « %s » để nhập/xuất (%s)"
+#~ msgid "use `PROCINFO[\"%s\"]' instead of `%s'"
+#~ msgstr "hãy dùng « PROCINFO[\"%s\"] » (thông tin tiến trình) thay cho « %s »"
+
+#~ msgid "use `PROCINFO[...]' instead of `/dev/user'"
+#~ msgstr ""
+#~ "hãy dùng « PROCINFO[...] » (thông tin tiến trình) thay cho </dev/user>"
#~ msgid "\t-W compat\t\t--compat\n"
#~ msgstr ""
@@ -2202,117 +2116,108 @@ msgstr "Không có biểu thức chính quy nằm trước"
#~ "\t-W copyleft\t\t--copyleft\n"
#~ "(tắc quyá»n ngược)\n"
-#~ msgid "\t-W traditional\t\t--traditional\n"
-#~ msgstr ""
-#~ "\t-W traditional\t\t--traditional\n"
-#~ "(truyá»n thống)\n"
-
#~ msgid "\t-W usage\t\t--usage\n"
#~ msgstr ""
#~ "\t-W usage\t\t--usage\n"
#~ "(cách sử dụng)\n"
-#, fuzzy
-#~ msgid "seek: invalid arguments"
-#~ msgstr "printf: không có đối số"
-
-#, fuzzy
-#~ msgid "seek: `%.*s' is not an open file, pipe, or co-process"
+#~ msgid ""
+#~ "\t# BEGIN block(s)\n"
+#~ "\n"
#~ msgstr ""
-#~ "close: (đóng) « %.*s » không phải là tập tin được mở, ống dẫn hay tiến "
-#~ "trình với nhau"
+#~ "\t# khối BEGIN (bắt đầu)\n"
+#~ "\n"
-#, fuzzy
-#~ msgid "seek: `%.*s' is not an input file, pipe, or co-process"
-#~ msgstr ""
-#~ "close: (đóng) « %.*s » không phải là tập tin được mở, ống dẫn hay tiến "
-#~ "trình với nhau"
+#~ msgid "must use `count$' on all formats or none"
+#~ msgstr "phải dùng « count$ » vá»›i má»i dạng thức hay không dùng cả"
-#, fuzzy
-#~ msgid "seek: `%.*s' is not a regular file"
-#~ msgstr "« %s » không phải là tên biến hợp lệ"
+#~ msgid "`$' is not permitted in awk formats"
+#~ msgstr "không cho phép « $ » trong định dạng awk"
-#~ msgid "use `PROCINFO[\"%s\"]' instead of `%s'"
-#~ msgstr "hãy dùng « PROCINFO[\"%s\"] » (thông tin tiến trình) thay cho « %s »"
+#~ msgid "arg count with `$' must be > 0"
+#~ msgstr "số đếm đối số với « $ » phải là >0"
-#~ msgid "use `PROCINFO[...]' instead of `/dev/user'"
-#~ msgstr ""
-#~ "hãy dùng « PROCINFO[...] » (thông tin tiến trình) thay cho </dev/user>"
+#~ msgid "arg count %ld greater than total number of supplied arguments"
+#~ msgstr "số đếm đối số %ld lớn hơn tổng số đối số được cung cấp"
-#~ msgid "delete: illegal use of variable `%s' as array"
-#~ msgstr "delete: (xóa bá») không cho phép cách dùng biến «%s» là mảng"
+#~ msgid "`$' not permitted after period in format"
+#~ msgstr "không cho phép « $ » nằm sau dấu chấm trong định dạng"
-#~ msgid "asort: first argument is not an array"
-#~ msgstr "asort: (sắp xếp) đối số đầu không phải là mảng"
+#~ msgid "no `$' supplied for positional field width or precision"
+#~ msgstr ""
+#~ "chÆ°a cung cấp « $ » cho Ä‘á»™ rá»™ng trÆ°á»ng thuá»™c vị trí hay cho Ä‘á»™ chính xác"
-#~ msgid "asort: second argument is not an array"
-#~ msgstr "asort: (sắp xếp) đối số thứ hai không phải là mảng"
+#~ msgid "`l' is meaningless in awk formats; ignored"
+#~ msgstr "chữ « l » không có nghĩa trong định dạng awk nên bị bỠqua"
-#~ msgid ""
-#~ "\n"
-#~ "To report bugs, see node `Bugs' in `gawk.info', which is\n"
-#~ msgstr ""
-#~ "\n"
-#~ "Äể thông báo lá»—i, hãy xem phần « Bugs » (lá»—i) trong tập tin « gawk.info "
-#~ "», \n"
+#~ msgid "`l' is not permitted in POSIX awk formats"
+#~ msgstr "không cho phép chữ « l » nằm trong định dạng awk POSIX"
-#~ msgid "invalid syntax in name `%s' for variable assignment"
-#~ msgstr "cú pháp không hợp lệ trong tên « %s » đối vá»›i Ä‘iá»u gán biến"
+#~ msgid "`L' is meaningless in awk formats; ignored"
+#~ msgstr "chữ « L » không có nghĩa trong định dạng awk nên bị bỠqua"
-#~ msgid "internal error: Node_var_array with null vname"
-#~ msgstr "lỗi nội bộ: « Node_var_array » với vname (tên biến?) vô giá trị"
+#~ msgid "`L' is not permitted in POSIX awk formats"
+#~ msgstr "không cho phép chữ « L » nằm trong định dạng awk POSIX"
-#~ msgid "or used in other expression context"
-#~ msgstr "hoặc được dùng trong ngữ cảnh biểu thức khác"
+#~ msgid "`h' is meaningless in awk formats; ignored"
+#~ msgstr "chữ « h » không có nghĩa trong định dạng awk nên bị bỠqua"
-#~ msgid "`%s' is a function, assignment is not allowed"
-#~ msgstr "« %s » là một chức năng thì không cho phép gán"
+#~ msgid "`h' is not permitted in POSIX awk formats"
+#~ msgstr "không cho phép chữ « h » nằm trong định dạng awk POSIX"
-#~ msgid "BEGIN blocks must have an action part"
-#~ msgstr "Má»i khối BEGIN (bắt đầu) phải có má»™t phần kiểu hành Ä‘á»™ng"
+#~ msgid "[s]printf: value %g is out of range for `%%%c' format"
+#~ msgstr "[s]printf: giá trị %g ở ngoại phạm vị cho dạng thức « %%%c »"
-#~ msgid "`nextfile' used in BEGIN or END action"
-#~ msgstr ""
-#~ "« nextfile » (tập tin kế tiếp) được dùng trong hành động « BEGIN » (bắt "
-#~ "đầu) hay « END » (kết thúc)"
+#~ msgid "not enough arguments to satisfy format string"
+#~ msgstr "chưa có đủ đối số để đáp ứng chuỗi định dạng"
-#~ msgid "non-redirected `getline' undefined inside BEGIN or END action"
-#~ msgstr ""
-#~ "trong hành động « BEGIN » (đầu) hay « END » (kết thúc), có « getline » (lấy "
-#~ "dòng) không được chuyển hướng lại và chưa được xác định."
+#~ msgid "^ ran out for this one"
+#~ msgstr "hết « ^ » cho Ä‘iá»u này"
-#~ msgid "fptr %x not in tokentab\n"
-#~ msgstr "« fptr %x » không phải nằm trong « tokentab »\n"
+#~ msgid "[s]printf: format specifier does not have control letter"
+#~ msgstr "[s]printf: Ä‘iá»u ghi rõ định dạng không có chữ Ä‘iá»u khiển"
-#~ msgid "gsub third parameter is not a changeable object"
-#~ msgstr "tham số thứ ba gsub không phải là một đối tượng có thể thay đổi"
+#~ msgid "too many arguments supplied for format string"
+#~ msgstr "quá nhiá»u đối số được cung cấp cho chuá»—i định dạng"
-#~ msgid "Unfinished \\ escape"
-#~ msgstr "« \\ escape » (thoát) chưa xong"
+#, fuzzy
+#~ msgid "attempt to use array parameter `%s' in a scalar context"
+#~ msgstr "cố gắng dùng mảng « %s » trong một ngữ cảnh vô hướng"
-#~ msgid "unfinished repeat count"
-#~ msgstr "việc đếm lại chưa xong"
+#~ msgid "can't open two way socket `%s' for input/output (%s)"
+#~ msgstr "không thể mở ổ cắm hai chiá»u « %s » để nhập/xuất (%s)"
-#~ msgid "malformed repeat count"
-#~ msgstr "việc đếm lại dạng sai"
+#~ msgid ""
+#~ "concatenation: side effects in one expression have changed the length of "
+#~ "another!"
+#~ msgstr ""
+#~ "concatenation: (nối chuỗi) hiệu ứng khác trong một biểu thức nào đó đã "
+#~ "thay đổi độ dài của một biểu thức khác !"
-#~ msgid "Unbalanced ["
-#~ msgstr "Chưa cân bằng « [ »"
+#~ msgid "illegal type (%s) in tree_eval"
+#~ msgstr "không cho phép kiểu (%s) trong « tree_eval » (ước lượng cây)"
-#~ msgid "Unbalanced ("
-#~ msgstr "Chưa cân bằng « ( »"
+#~ msgid "\t# -- main --\n"
+#~ msgstr ""
+#~ "\t# -- main --\n"
+#~ "(chính)\n"
-#~ msgid "No regexp syntax bits specified"
-#~ msgstr "Chưa ghi rõ bit cú pháp biểu thức chính quy"
+#~ msgid "invalid tree type %s in redirect()"
+#~ msgstr "kiểu cây không hợp lệ « %s » trong « redirect() »"
-#~ msgid "Unbalanced )"
-#~ msgstr "Chưa cân bằng « ) »"
+#, fuzzy
+#~ msgid "# treated internally as `delete'"
+#~ msgstr "# được xá»­ lý ná»™i bá»™ là « delete » (xoá bá»)"
-#~ msgid "field %d in FIELDWIDTHS, must be > 0"
-#~ msgstr "trÆ°á»ng %d trong « FIELDWIDTHS » phải là > 0"
+#~ msgid "# this is a dynamically loaded extension function"
+#~ msgstr "# đây là một chức năng mở rộng được tải động"
-#~ msgid "function %s called\n"
-#~ msgstr "chức năng « %s » được gá»i\n"
+#~ msgid "unexpected type %s in prec_level"
+#~ msgstr "gặp kiểu bất ngỠ« %s » trong « prec_level » (cấp nằm trước?)"
-#~ msgid "internal error: file `%s', line %d\n"
-#~ msgstr "lỗi nội bộ : tập tin « %s », dòng %d\n"
+#, fuzzy
+#~ msgid "Unknown node type %s in pp_var"
+#~ msgstr "không biết kiểu nút %d"
+
+#~ msgid "%s: illegal option -- %c\n"
+#~ msgstr "%s: không cho phép tùy chá»n « -- %c »\n"
diff --git a/po/zh_CN.gmo b/po/zh_CN.gmo
index c8edb72e..51bfc90e 100644
--- a/po/zh_CN.gmo
+++ b/po/zh_CN.gmo
Binary files differ
diff --git a/po/zh_CN.po b/po/zh_CN.po
index 880924ae..c16ca9b6 100644
--- a/po/zh_CN.po
+++ b/po/zh_CN.po
@@ -2,14 +2,14 @@
# gawk 软件包的简体中文翻译.
# Copyright (C) 2007 Free Software Foundation, Inc.
# This file is distributed under the same license as the gawk package.
-# LI Daobing <lidaobing@gmail.com>, 2007.
+# LI Daobing <lidaobing@gmail.com>, 2007, 2009.
#
msgid ""
msgstr ""
-"Project-Id-Version: gawk 3.1.5f\n"
+"Project-Id-Version: gawk 3.1.6c\n"
"Report-Msgid-Bugs-To: arnold@skeeve.com\n"
-"POT-Creation-Date: 2010-11-12 12:20+0200\n"
-"PO-Revision-Date: 2007-06-13 03:57+0800\n"
+"POT-Creation-Date: 2010-11-17 08:48+0200\n"
+"PO-Revision-Date: 2009-06-09 21:51+0800\n"
"Last-Translator: LI Daobing <lidaobing@gmail.com>\n"
"Language-Team: Chinese (simplified) <translation-team-zh-cn@lists."
"sourceforge.net>\n"
@@ -17,398 +17,475 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-#: array.c:112
+#: array.c:103
+#, c-format
+msgid "from %s"
+msgstr "从 %s"
+
+#: array.c:267
+#, fuzzy
+msgid "attempt to use a scalar value as array"
+msgstr "试图把标é‡â€œ%sâ€å½“数组使用"
+
+#: array.c:270
#, c-format
msgid "attempt to use function `%s' as an array"
msgstr "试图把函数“%sâ€å½“数组使用"
-#: array.c:115
+#: array.c:273
#, c-format
msgid "attempt to use scalar parameter `%s' as an array"
msgstr "试图把标é‡å‚数“%sâ€å½“数组使用"
-#: array.c:118
+#: array.c:276
#, c-format
msgid "attempt to use scalar `%s' as array"
msgstr "试图把标é‡â€œ%sâ€å½“数组使用"
-#: array.c:156
+#: array.c:321 array.c:648 eval.c:1075 eval.c:1079 eval.c:1581 eval.c:1649
+#: eval.c:1928
#, c-format
-msgid "from %s"
-msgstr "从 %s"
+msgid "attempt to use array `%s' in a scalar context"
+msgstr "试图在标é‡çŽ¯å¢ƒä¸­ä½¿ç”¨æ•°ç»„“%sâ€"
-#: array.c:513
+#: array.c:570
#, fuzzy, c-format
msgid "reference to uninitialized element `%s[\"%.*s\"]'"
msgstr "引用未åˆå§‹åŒ–的元素“%s[\"%s\"]â€"
-#: array.c:519
+#: array.c:576
#, c-format
msgid "subscript of array `%s' is null string"
msgstr "数组“%sâ€çš„下标是空字符串"
-#: array.c:623
+#: array.c:684
#, c-format
msgid "delete: index `%s' not in array `%s'"
msgstr "删除: 索引“%sâ€ä¸åœ¨æ•°ç»„“%sâ€ä¸­"
-#: array.c:792
+#: array.c:705
+#, fuzzy, c-format
+msgid "attempt to use scalar `%s[\"%.*s\"]' as an array"
+msgstr "试图把标é‡â€œ%sâ€å½“数组使用"
+
+#: array.c:868
#, c-format
msgid "%s: empty (null)\n"
msgstr "%s: 空(null)\n"
-#: array.c:797
+#: array.c:873
#, c-format
msgid "%s: empty (zero)\n"
msgstr "%s: 空(zero)\n"
-#: array.c:801
+#: array.c:877
#, c-format
msgid "%s: table_size = %d, array_size = %d\n"
msgstr "%s: è¡¨æ ¼å¤§å° = %d, æ•°ç»„å¤§å° = %d\n"
-#: array.c:830
+#: array.c:912
#, c-format
msgid "%s: is parameter\n"
msgstr "%s: 是å‚æ•°\n"
-#: array.c:835
+#: array.c:916
#, c-format
msgid "%s: array_ref to %s\n"
msgstr "%s: 数组引用到 %s\n"
-#: awkgram.y:224 awkgram.y:227
+#: array.c:921
+#, fuzzy
+msgid "adump: argument not an array"
+msgstr "match: 第三个å‚æ•°ä¸æ˜¯æ•°ç»„"
+
+#: array.c:1139
+#, fuzzy
+msgid "attempt to use array in a scalar context"
+msgstr "试图在标é‡çŽ¯å¢ƒä¸­ä½¿ç”¨æ•°ç»„“%sâ€"
+
+#: array.c:1236
+#, fuzzy
+msgid "asort: second argument not an array"
+msgstr "split: 第二个å‚æ•°ä¸æ˜¯æ•°ç»„"
+
+#: array.c:1237
+#, fuzzy
+msgid "asorti: second argument not an array"
+msgstr "split: 第二个å‚æ•°ä¸æ˜¯æ•°ç»„"
+
+#: array.c:1245
+#, fuzzy
+msgid "asort: first argument not an array"
+msgstr "match: 第三个å‚æ•°ä¸æ˜¯æ•°ç»„"
+
+#: array.c:1246
+#, fuzzy
+msgid "asorti: first argument not an array"
+msgstr "match: 第三个å‚æ•°ä¸æ˜¯æ•°ç»„"
+
+#: awkgram.y:246
#, c-format
msgid "%s blocks must have an action part"
msgstr "%s å—必须有一个行为部分"
-#: awkgram.y:230
+#: awkgram.y:249
msgid "each rule must have a pattern or an action part"
msgstr "æ¯ä¸ªè§„则必须有一个模å¼æˆ–行为部分"
-#: awkgram.y:266 awkgram.y:275
+#: awkgram.y:320 awkgram.y:330
msgid "old awk does not support multiple `BEGIN' or `END' rules"
msgstr "è€çš„ awk ä¸æ”¯æŒå¤šä¸ªâ€œBEGINâ€æˆ–“ENDâ€è§„则"
-#: awkgram.y:304
+#: awkgram.y:367
#, c-format
msgid "`%s' is a built-in function, it cannot be redefined"
msgstr "“%sâ€æ˜¯å†…置函数,ä¸èƒ½è¢«é‡å®šä¹‰"
-#: awkgram.y:350
+#: awkgram.y:427
msgid "regexp constant `//' looks like a C++ comment, but is not"
msgstr "正则表达å¼å¸¸é‡â€œ//â€çœ‹èµ·æ¥åƒ C++ 注释,但其实ä¸æ˜¯"
-#: awkgram.y:353
+#: awkgram.y:430
#, c-format
msgid "regexp constant `/%s/' looks like a C comment, but is not"
msgstr "正则表达å¼å¸¸é‡â€œ/%s/â€çœ‹èµ·æ¥åƒ C 注释,但其实ä¸æ˜¯"
-#: awkgram.y:380 awkgram.y:692
-msgid "statement may have no effect"
-msgstr "表达å¼å¯èƒ½æ— ä»»ä½•æ•ˆæžœ"
+#: awkgram.y:735
+#, fuzzy
+msgid "`break' is not allowed outside a loop or switch"
+msgstr "“breakâ€åœ¨å¾ªçŽ¯å¤–使用是ä¸å…许的"
-#: awkgram.y:477 awkgram.y:480 awkgram.y:504 awkgram.y:511 awkgram.y:518
-#, c-format
-msgid "`%s' used in %s action"
+#: awkgram.y:744
+#, fuzzy
+msgid "`continue' is not allowed outside a loop"
+msgstr "“continueâ€åœ¨å¾ªçŽ¯å¤–使用是ä¸å…许的"
+
+#: awkgram.y:753
+#, fuzzy, c-format
+msgid "`next' used in %s action"
msgstr "“%sâ€è¢«ç”¨äºŽ %s 行为"
-#: awkgram.y:495 awkgram.y:499
+#: awkgram.y:767 awkgram.y:771
msgid "`nextfile' is a gawk extension"
msgstr "“nextfileâ€æ˜¯ gawk 扩展"
-#: awkgram.y:528
+#: awkgram.y:775
+#, fuzzy, c-format
+msgid "`nextfile' used in %s action"
+msgstr "“%sâ€è¢«ç”¨äºŽ %s 行为"
+
+#: awkgram.y:799
msgid "`return' used outside function context"
msgstr "“returnâ€åœ¨å‡½æ•°å¤–使用"
-#: awkgram.y:570
+#: awkgram.y:859
msgid "plain `print' in BEGIN or END rule should probably be `print \"\"'"
msgstr "在 BEGIN 或 END 规则中,“printâ€ä¹Ÿè®¸åº”该写åšâ€œprint \"\"â€"
-#: awkgram.y:586 awkgram.y:594
+#: awkgram.y:927 awkgram.y:935
msgid "`delete array' is a gawk extension"
msgstr "“delete arrayâ€æ˜¯ gawk 扩展"
-#: awkgram.y:608 awkgram.y:616
+#: awkgram.y:955 awkgram.y:963
msgid "`delete(array)' is a non-portable tawk extension"
msgstr "“delete(array)â€æ˜¯ä¸å¯ç§»æ¤çš„ tawk 扩展"
-#: awkgram.y:660
+#: awkgram.y:1004
#, c-format
msgid "duplicate case values in switch body: %s"
msgstr "switch 中有é‡å¤çš„ case 值: %s"
-#: awkgram.y:670
-msgid "Duplicate `default' detected in switch body"
+#: awkgram.y:1014
+#, fuzzy
+msgid "duplicate `default' detected in switch body"
msgstr "switch 中有é‡å¤çš„“defaultâ€"
-#: awkgram.y:759
+#: awkgram.y:1151
msgid "multistage two-way pipelines don't work"
msgstr "多阶åŒå‘管é“无法工作"
-#: awkgram.y:850
+#: awkgram.y:1253
msgid "regular expression on right of assignment"
msgstr "正则表达å¼åœ¨èµ‹å€¼ç®—符的å³è¾¹"
-#: awkgram.y:860
+#: awkgram.y:1263
msgid "regular expression on left of `~' or `!~' operator"
msgstr "正则表达å¼åœ¨â€œ~â€æˆ–“!~â€ç®—符的左边"
-#: awkgram.y:866 awkgram.y:954
+#: awkgram.y:1278 awkgram.y:1423
msgid "old awk does not support the keyword `in' except after `for'"
msgstr "è€ awk åªæ”¯æŒå…³é”®è¯â€œinâ€åœ¨â€œforâ€çš„åŽé¢"
-#: awkgram.y:872
+#: awkgram.y:1287
msgid "regular expression on right of comparison"
msgstr "正则表达å¼åœ¨æ¯”较算符的å³è¾¹"
-#: awkgram.y:936
+#: awkgram.y:1399
#, c-format
-msgid "`getline var' invalid inside %s rule"
+msgid "`getline var' invalid inside `%s' rule"
msgstr ""
-#: awkgram.y:939
+#: awkgram.y:1401
#, c-format
-msgid "`getline' invalid inside %s rule"
+msgid "`getline' invalid inside `%s' rule"
msgstr ""
-#: awkgram.y:944
+#: awkgram.y:1407
msgid "non-redirected `getline' undefined inside END action"
msgstr "在 END 环境中,éžé‡å®šå‘的“getlineâ€æœªå®šä¹‰"
-#: awkgram.y:955
+#: awkgram.y:1424
msgid "old awk does not support multidimensional arrays"
msgstr "è€ awk ä¸æ”¯æŒå¤šç»´æ•°ç»„"
-#: awkgram.y:1001
+#: awkgram.y:1528
msgid "call of `length' without parentheses is not portable"
msgstr "ä¸å¸¦æ‹¬å·è°ƒç”¨â€œlengthâ€æ˜¯ä¸å¯ä»¥ç§»æ¤çš„"
-#: awkgram.y:1006
-msgid "call of `length' without parentheses is deprecated by POSIX"
-msgstr "POSIX 认为ä¸å¸¦æ‹¬å·è°ƒç”¨â€œlengthâ€æ˜¯å·²è¿‡æ—¶çš„"
-
-#: awkgram.y:1051
+#: awkgram.y:1591
#, fuzzy
msgid "indirect function calls are a gawk extension"
-msgstr "“extensionâ€æ˜¯ gawk 扩展"
+msgstr "“nextfileâ€æ˜¯ gawk 扩展"
-#: awkgram.y:1084
-msgid "use of non-array as array"
-msgstr "把éžæ•°ç»„åšæ•°ç»„使用"
+#: awkgram.y:1605
+#, fuzzy, c-format
+msgid "can not use special variable `%s' for indirect function call"
+msgstr "函数“%sâ€: 无法使用特殊å˜é‡â€œ%sâ€ä½œä¸ºå‡½æ•°å‚æ•°"
-#: awkgram.y:1087
+#: awkgram.y:1682
msgid "invalid subscript expression"
msgstr "无效的下标表达å¼"
-#: awkgram.y:1329
+#: awkgram.y:1722
+msgid "use of non-array as array"
+msgstr "把éžæ•°ç»„åšæ•°ç»„使用"
+
+#: awkgram.y:1993
msgid "unexpected newline or end of string"
msgstr "未预期的新行或字符串结æŸ"
-#: awkgram.y:1446
-msgid "empty program text on command line"
-msgstr "命令行中程åºä½“为空"
-
-#: awkgram.y:1502
+#: awkgram.y:2248 awkgram.y:2296 awkgram.y:2470
#, c-format
msgid "can't open source file `%s' for reading (%s)"
msgstr "无法以读模å¼æ‰“å¼€æºæ–‡ä»¶â€œ%sâ€(%s)"
-#: awkgram.y:1600
+#: awkgram.y:2249 awkgram.y:2297 builtin.c:122
+msgid "reason unknown"
+msgstr "未知原因"
+
+#: awkgram.y:2257
+#, fuzzy, c-format
+msgid "already included source file `%s'"
+msgstr "无法读å–æºæ–‡ä»¶â€œ%sâ€(%s)"
+
+#: awkgram.y:2281
+#, fuzzy
+msgid "@include is a gawk extension"
+msgstr "“nextfileâ€æ˜¯ gawk 扩展"
+
+#: awkgram.y:2288
+msgid "empty filename after @include"
+msgstr ""
+
+#: awkgram.y:2422
+msgid "empty program text on command line"
+msgstr "命令行中程åºä½“为空"
+
+#: awkgram.y:2537
#, c-format
msgid "can't read sourcefile `%s' (%s)"
msgstr "无法读å–æºæ–‡ä»¶â€œ%sâ€(%s)"
-#: awkgram.y:1608
+#: awkgram.y:2547
#, c-format
msgid "source file `%s' is empty"
msgstr "æºæ–‡ä»¶â€œ%sâ€ä¸ºç©º"
-#: awkgram.y:1800 awkgram.y:1922 awkgram.y:1940 awkgram.y:2315 awkgram.y:2407
+#: awkgram.y:2732
msgid "source file does not end in newline"
msgstr "æºæ–‡ä»¶ä¸ä»¥æ¢è¡Œç¬¦ç»“æŸ"
-#: awkgram.y:1862
+#: awkgram.y:2809
msgid "unterminated regexp ends with `\\' at end of file"
msgstr "未终止的正则表达å¼åœ¨æ–‡ä»¶ç»“æŸå¤„以“\\â€ç»“æŸ"
-#: awkgram.y:1886
+#: awkgram.y:2833
#, c-format
msgid "%s: %d: tawk regex modifier `/.../%c' doesn't work in gawk"
msgstr "%s: %d: tawk 正则表达å¼ä¿®é¥°ç¬¦â€œ/.../%câ€æ— æ³•åœ¨ gawk 中工作"
-#: awkgram.y:1890
+#: awkgram.y:2837
#, c-format
msgid "tawk regex modifier `/.../%c' doesn't work in gawk"
msgstr "tawk 正则表达å¼ä¿®é¥°ç¬¦â€œ/.../%câ€æ— æ³•åœ¨ gawk 中工作"
-#: awkgram.y:1897
+#: awkgram.y:2844
msgid "unterminated regexp"
msgstr "未终止的正则表达å¼"
-#: awkgram.y:1900
+#: awkgram.y:2848
msgid "unterminated regexp at end of file"
msgstr "未终止的正则表达å¼åœ¨æ–‡ä»¶ç»“æŸå¤„"
-#: awkgram.y:1969
+#: awkgram.y:2907
msgid "use of `\\ #...' line continuation is not portable"
msgstr "使用“\\ #...â€æ¥ç»­è¡Œæ˜¯ä¸å¯ç§»æ¤çš„"
-#: awkgram.y:1982
+#: awkgram.y:2923
msgid "backslash not last character on line"
msgstr "åæ–œæ ä¸æ˜¯è¡Œçš„最åŽä¸€ä¸ªå­—符"
-#: awkgram.y:2027
+#: awkgram.y:2984
msgid "POSIX does not allow operator `**='"
msgstr "POSIX ä¸å…许æ“作符“**=â€"
-#: awkgram.y:2029
+#: awkgram.y:2986
msgid "old awk does not support operator `**='"
msgstr "è€ awk ä¸æ”¯æŒæ“作符“**=â€"
-#: awkgram.y:2038
+#: awkgram.y:2995
msgid "POSIX does not allow operator `**'"
msgstr "POSIX ä¸å…许æ“作符“**â€"
-#: awkgram.y:2040
+#: awkgram.y:2997
msgid "old awk does not support operator `**'"
msgstr "è€ awk ä¸æ”¯æŒæ“作符“**â€"
-#: awkgram.y:2071
+#: awkgram.y:3032
msgid "operator `^=' is not supported in old awk"
msgstr "è€ awk ä¸æ”¯æŒæ“作符“^=â€"
-#: awkgram.y:2079
+#: awkgram.y:3040
msgid "operator `^' is not supported in old awk"
msgstr "è€ awk ä¸æ”¯æŒæ“作符“^â€"
-#: awkgram.y:2163 awkgram.y:2178
+#: awkgram.y:3133 awkgram.y:3149
msgid "unterminated string"
msgstr "未结æŸçš„字符串"
-#: awkgram.y:2368
+#: awkgram.y:3345
#, c-format
msgid "invalid char '%c' in expression"
msgstr "表达å¼ä¸­çš„无效字符“%câ€"
-#: awkgram.y:2416
+#: awkgram.y:3391
#, c-format
msgid "`%s' is a gawk extension"
msgstr "“%sâ€æ˜¯ gawk 扩展"
-#: awkgram.y:2419
+#: awkgram.y:3394
#, c-format
msgid "`%s' is a Bell Labs extension"
msgstr "“%sâ€æ˜¯è´å°”实验室扩展"
-#: awkgram.y:2422
+#: awkgram.y:3397
#, c-format
msgid "POSIX does not allow `%s'"
msgstr "POSIX ä¸å…许“%sâ€"
-#: awkgram.y:2426
+#: awkgram.y:3401
#, c-format
msgid "`%s' is not supported in old awk"
msgstr "è€ awk ä¸æ”¯æŒâ€œ%sâ€"
-#: awkgram.y:2452
+#: awkgram.y:3465
msgid "`goto' considered harmful!\n"
msgstr "“gotoâ€æœ‰å®³ï¼\n"
-#: awkgram.y:2514
+#: awkgram.y:3518
#, c-format
msgid "%d is invalid as number of arguments for %s"
msgstr "%d 是 %s 的无效å‚数个数"
-#: awkgram.y:2533 awkgram.y:2536
+#: awkgram.y:3544 awkgram.y:3547
msgid "match: third argument is a gawk extension"
msgstr "match: 第三个å‚数是 gawk 扩展"
-#: awkgram.y:2549
+#: awkgram.y:3575
#, c-format
msgid "%s: string literal as last arg of substitute has no effect"
msgstr "%s: 字符串作为 substitute 的最åŽä¸€ä¸ªå‚数无任何效果"
-#: awkgram.y:2552
+#: awkgram.y:3580
#, c-format
msgid "%s third parameter is not a changeable object"
msgstr "%s 第三个å‚æ•°ä¸æ˜¯ä¸€ä¸ªå¯å˜å¯¹è±¡"
-#: awkgram.y:2586 awkgram.y:2589
+#: awkgram.y:3665 awkgram.y:3668
msgid "close: second argument is a gawk extension"
msgstr "close: 第二个å‚数是 gawk 扩展"
-#: awkgram.y:2599
+#: awkgram.y:3680
msgid "use of dcgettext(_\"...\") is incorrect: remove leading underscore"
msgstr "使用 dcgettext(_\"...\") 是错误的: 去掉开始的下划线"
-#: awkgram.y:2614
+#: awkgram.y:3695
msgid "use of dcngettext(_\"...\") is incorrect: remove leading underscore"
msgstr "使用 dcngettext(_\"...\") 是错误的: 去掉开始的下划线"
-#: awkgram.y:2686
+#: awkgram.y:3787
#, c-format
msgid "function `%s': parameter #%d, `%s', duplicates parameter #%d"
msgstr "函数“%sâ€: 第 %d 个å‚æ•°, “%sâ€, 与第 %d 个å‚æ•°é‡å¤"
-#: awkgram.y:2719
+#: awkgram.y:3829
#, c-format
msgid "function `%s': parameter `%s' shadows global variable"
msgstr "函数“%sâ€: å‚数“%sâ€æŽ©ç›–了公共å˜é‡"
-#: awkgram.y:2831
+#: awkgram.y:3987
#, c-format
msgid "could not open `%s' for writing (%s)"
msgstr "无法以写模å¼æ‰“开“%sâ€ï¼ˆ%s)"
-#: awkgram.y:2832 profile.c:96
+#: awkgram.y:3988 profile.c:85
msgid "sending profile to standard error"
msgstr "å‘é€é…置到标准错误输出"
-#: awkgram.y:2864
+#: awkgram.y:3994
#, c-format
msgid "%s: close failed (%s)"
msgstr "%s: 关闭失败(%s)"
-#: awkgram.y:2985
+#: awkgram.y:4046
msgid "shadow_funcs() called twice!"
msgstr "shadow_funcs() 被调用两次ï¼"
-#: awkgram.y:3012
+#: awkgram.y:4052
msgid "there were shadowed variables."
msgstr "那里有被掩盖的å˜é‡ã€‚"
-#: awkgram.y:3085
+#: awkgram.y:4081
#, c-format
msgid "function `%s': can't use function name as parameter name"
msgstr "函数“%sâ€: 无法使用函数å作为å‚æ•°å"
-#: awkgram.y:3088
-#, fuzzy, c-format
+#: awkgram.y:4086
+#, c-format
msgid "function `%s': can't use special variable `%s' as a function parameter"
-msgstr "函数“%sâ€: 无法使用函数å作为å‚æ•°å"
+msgstr "函数“%sâ€: 无法使用特殊å˜é‡â€œ%sâ€ä½œä¸ºå‡½æ•°å‚æ•°"
-#: awkgram.y:3098
+#: awkgram.y:4102
#, c-format
msgid "function name `%s' previously defined"
msgstr "函数å“%sâ€å‰é¢å·²å®šä¹‰"
-#: awkgram.y:3249 awkgram.y:3255
+#: awkgram.y:4271 awkgram.y:4277
#, c-format
msgid "function `%s' called but never defined"
msgstr "函数“%sâ€è¢«è°ƒç”¨ä½†é‡æœªè¢«å®šä¹‰"
-#: awkgram.y:3258
+#: awkgram.y:4280
#, c-format
msgid "function `%s' defined but never called"
msgstr "函数“%sâ€è¢«å®šä¹‰ä½†é‡æœªè¢«è°ƒç”¨"
-#: awkgram.y:3285
+#: awkgram.y:4311
#, c-format
msgid "regexp constant for parameter #%d yields boolean value"
msgstr "第 %d 个å‚数的正则表达å¼å¸¸é‡äº§ç”Ÿå¸ƒå°”值"
-#: awkgram.y:3329
+#: awkgram.y:4420
#, c-format
msgid ""
"function `%s' called with space between name and `(',\n"
@@ -417,701 +494,567 @@ msgstr ""
"函数“%sâ€è¢«è°ƒç”¨æ—¶å字与“(â€é—´æœ‰ç©ºæ ¼ï¼Œ\n"
"或被用作å˜é‡æˆ–数组"
-#: awkgram.y:3750
-#, fuzzy
-msgid "division by zero attempted in `/'"
-msgstr "在“/=â€ä¸­è¯•å›¾é™¤0"
+#: awkgram.y:4673 eval.c:1845
+msgid "division by zero attempted"
+msgstr "试图除0"
-#: awkgram.y:3755 eval.c:1411
+#: awkgram.y:4682 eval.c:1877
#, c-format
msgid "division by zero attempted in `%%'"
msgstr "在“%%â€ä¸­è¯•å›¾é™¤0"
-#: builtin.c:122
+#: awkgram.y:5342
+msgid "statement may have no effect"
+msgstr "表达å¼å¯èƒ½æ— ä»»ä½•æ•ˆæžœ"
+
+#: builtin.c:120
#, c-format
msgid "%s to \"%s\" failed (%s)"
msgstr "%s 到 \"%s\" 失败 (%s)"
-#: builtin.c:123
+#: builtin.c:121
msgid "standard output"
msgstr "标准输出"
-#: builtin.c:124
-msgid "reason unknown"
-msgstr "未知原因"
-
-#: builtin.c:137
+#: builtin.c:135
msgid "exp: received non-numeric argument"
msgstr "exp: 收到éžæ•°å­—å‚æ•°"
-#: builtin.c:143
+#: builtin.c:141
#, c-format
msgid "exp: argument %g is out of range"
msgstr "exp: å‚æ•° %g 超出范围"
-#: builtin.c:201
+#: builtin.c:200
#, c-format
msgid "fflush: cannot flush: pipe `%s' opened for reading, not writing"
msgstr "fflush: 无法使用: 管é““%sâ€ä»¥åªè¯»æ–¹å¼æ‰“开,ä¸å¯å†™"
-#: builtin.c:204
+#: builtin.c:203
#, c-format
msgid "fflush: cannot flush: file `%s' opened for reading, not writing"
msgstr "fflush: 无法使用: 文件“%sâ€ä»¥åªè¯»æ–¹å¼æ‰“开,ä¸å¯å†™"
-#: builtin.c:216
+#: builtin.c:215
#, c-format
msgid "fflush: `%s' is not an open file, pipe or co-process"
msgstr "fflush: “%sâ€ä¸æ˜¯ä¸€ä¸ªå·²æ‰“开文件ã€ç®¡é“或åˆä½œè¿›ç¨‹"
-#: builtin.c:310
+#: builtin.c:322
msgid "index: received non-string first argument"
msgstr "index: 第一个å‚æ•°ä¸æ˜¯å­—符串"
-#: builtin.c:312
+#: builtin.c:324
msgid "index: received non-string second argument"
msgstr "index: 第二个å‚æ•°ä¸æ˜¯å­—符串"
-#: builtin.c:434
+#: builtin.c:446
msgid "int: received non-numeric argument"
msgstr "int: 收到éžæ•°å­—å‚æ•°"
-#: builtin.c:464
+#: builtin.c:469
+#, fuzzy
msgid "`length(array)' is a gawk extension"
msgstr "“length(array)â€æ˜¯ gawk 扩展"
-#: builtin.c:471
-#, fuzzy
-msgid "length: untyped parameter argument will be forced to scalar"
-msgstr "length: 无类型的å‚数会被强制转æ¢ä¸ºæ ‡é‡"
-
-#: builtin.c:480
-#, fuzzy
-msgid "length: untyped argument will be forced to scalar"
-msgstr "length: 无类型的å‚数会被强制转æ¢ä¸ºæ ‡é‡"
-
-#: builtin.c:484
+#: builtin.c:477
msgid "length: received non-string argument"
msgstr "length: 收到éžå­—符串å‚æ•°"
-#: builtin.c:515
+#: builtin.c:508
msgid "log: received non-numeric argument"
msgstr "log: 收到éžæ•°å­—å‚æ•°"
-#: builtin.c:518
+#: builtin.c:511
#, c-format
msgid "log: received negative argument %g"
msgstr "log: 收到负数å‚æ•° %g"
-#: builtin.c:726 builtin.c:729
-msgid "must use `count$' on all formats or none"
-msgstr "è¦ä¹ˆåœ¨æ‰€æœ‰æ ¼å¼ä¸Šä½¿ç”¨â€œcount$â€ï¼Œè¦ä¹ˆå®Œå…¨ä¸ä½¿ç”¨"
-
-#: builtin.c:790
-#, c-format
-msgid "field width is ignored for `%%%%' specifier"
-msgstr ""
-
-#: builtin.c:792
-#, c-format
-msgid "precision is ignored for `%%%%' specifier"
-msgstr ""
-
-#: builtin.c:794
-#, c-format
-msgid "field width and precision are ignored for `%%%%' specifier"
-msgstr ""
-
-#: builtin.c:845
-msgid "`$' is not permitted in awk formats"
-msgstr "awk æ ¼å¼ä¸­ä¸å…许 “$â€"
-
-#: builtin.c:851
-msgid "arg count with `$' must be > 0"
-msgstr "å«æœ‰â€œ$â€çš„å‚数个数必须大于0"
-
-#: builtin.c:853
-#, c-format
-msgid "arg count %ld greater than total number of supplied arguments"
-msgstr "å‚数个数 %ld 大于æ供的å‚数总个数"
-
-#: builtin.c:855
-msgid "`$' not permitted after period in format"
-msgstr "æ ¼å¼ä¸å…许在“.â€åŽä½¿ç”¨â€œ$â€"
-
-#: builtin.c:868
-msgid "no `$' supplied for positional field width or precision"
-msgstr "没有为格å¼å®½åº¦æˆ–精度æ供“$â€"
-
-#: builtin.c:938
-msgid "`l' is meaningless in awk formats; ignored"
-msgstr "“lâ€åœ¨ awk æ ¼å¼ä¸­æ— æ„义;忽略"
-
-#: builtin.c:942
-msgid "`l' is not permitted in POSIX awk formats"
-msgstr "“lâ€ä¸å…许在 POSIX awk æ ¼å¼ä¸­ä½¿ç”¨"
-
-#: builtin.c:953
-msgid "`L' is meaningless in awk formats; ignored"
-msgstr "“Lâ€åœ¨ awk æ ¼å¼ä¸­æ— æ„义;忽略"
-
-#: builtin.c:957
-msgid "`L' is not permitted in POSIX awk formats"
-msgstr "“Lâ€ä¸å…许在 POSIX awk æ ¼å¼ä¸­ä½¿ç”¨"
-
-#: builtin.c:968
-msgid "`h' is meaningless in awk formats; ignored"
-msgstr "“hâ€åœ¨ awk æ ¼å¼ä¸­æ— æ„义;忽略"
-
-#: builtin.c:972
-msgid "`h' is not permitted in POSIX awk formats"
-msgstr "“hâ€ä¸å…许在 POSIX awk æ ¼å¼ä¸­ä½¿ç”¨"
-
-#: builtin.c:1252
-#, c-format
-msgid "[s]printf: value %g is out of range for `%%%c' format"
-msgstr "[s]printf: 值 %g 对“%%%câ€æ ¼å¼æ¥è¯´è¶…出范围"
-
-#: builtin.c:1332
-#, c-format
-msgid "ignoring unknown format specifier character `%c': no argument converted"
-msgstr ""
-
-#: builtin.c:1338
-msgid "not enough arguments to satisfy format string"
-msgstr "相对格å¼æ¥è¯´å‚数个数ä¸è¶³"
-
-#: builtin.c:1340
-msgid "^ ran out for this one"
-msgstr "^ 跑出范围"
-
-#: builtin.c:1346
-msgid "[s]printf: format specifier does not have control letter"
-msgstr "[s]printf: 指定格å¼ä¸å«æŽ§åˆ¶å­—符"
-
-#: builtin.c:1349
-msgid "too many arguments supplied for format string"
-msgstr "相对格å¼æ¥è¯´å‚数个数过多"
+#: builtin.c:531 builtin.c:573 builtin.c:586 builtin.c:982 builtin.c:994
+#, fuzzy, c-format
+msgid "attempt to use array `%s' in scalar context"
+msgstr "试图在标é‡çŽ¯å¢ƒä¸­ä½¿ç”¨æ•°ç»„“%sâ€"
-#: builtin.c:1424 builtin.c:1427
+#: builtin.c:569 builtin.c:580
msgid "printf: no arguments"
msgstr "printf: 没有å‚æ•°"
-#: builtin.c:1451
+#: builtin.c:621
msgid "sqrt: received non-numeric argument"
msgstr "sqrt: 收到éžæ•°å­—å‚æ•°"
-#: builtin.c:1455
+#: builtin.c:625
#, c-format
msgid "sqrt: called with negative argument %g"
msgstr "sqrt: 收到负数å‚æ•° %g"
-#: builtin.c:1479
-#, c-format
-msgid "substr: start index %g is invalid, using 1"
-msgstr "substr: 开始åæ ‡ %g 无效,使用 1"
-
-#: builtin.c:1484
-#, c-format
-msgid "substr: non-integer start index %g will be truncated"
-msgstr "substr: éžæ•´æ•°çš„开始åæ ‡ %g 会被截断"
-
-#: builtin.c:1510
+#: builtin.c:649
#, c-format
msgid "substr: length %g is not >= 1"
msgstr "substr: 长度 %g å°äºŽ 1"
-#: builtin.c:1512
+#: builtin.c:651
#, c-format
msgid "substr: length %g is not >= 0"
msgstr "substr: 长度 %g å°äºŽ 0"
-#: builtin.c:1519
+#: builtin.c:658
#, c-format
msgid "substr: non-integer length %g will be truncated"
msgstr "substr: éžæ•´æ•°çš„长度 %g 会被截断"
-#: builtin.c:1524
+#: builtin.c:663
#, c-format
msgid "substr: length %g too big for string indexing, truncating to %g"
msgstr "substr: 长度 %g 作为字符串å标过大,截断至 %g"
-#: builtin.c:1536
+#: builtin.c:675
+#, c-format
+msgid "substr: start index %g is invalid, using 1"
+msgstr "substr: 开始åæ ‡ %g 无效,使用 1"
+
+#: builtin.c:680
+#, c-format
+msgid "substr: non-integer start index %g will be truncated"
+msgstr "substr: éžæ•´æ•°çš„开始åæ ‡ %g 会被截断"
+
+#: builtin.c:705
msgid "substr: source string is zero length"
msgstr "substr: æºå­—符串长度为0"
-#: builtin.c:1552
+#: builtin.c:721
#, c-format
msgid "substr: start index %g is past end of string"
msgstr "substr: 开始åæ ‡ %g 超出字符串尾部"
-#: builtin.c:1560
+#: builtin.c:729
#, c-format
msgid ""
"substr: length %g at start index %g exceeds length of first argument (%lu)"
msgstr "substr: 在开始åæ ‡ %2$g 下长度 %1$g 超出第一个å‚数的长度 (%3$lu)"
-#: builtin.c:1637
+#: builtin.c:806
+msgid "strftime: received non-numeric second argument"
+msgstr "strftime: 第二个å‚æ•°ä¸æ˜¯æ•°å­—"
+
+#: builtin.c:813
msgid "strftime: received non-string first argument"
msgstr "strftime: 第一个å‚æ•°ä¸æ˜¯å­—符串"
-#: builtin.c:1643
+#: builtin.c:819
msgid "strftime: received empty format string"
msgstr "strftime: 收到空格å¼å­—符串"
-#: builtin.c:1652
-msgid "strftime: received non-numeric second argument"
-msgstr "strftime: 第二个å‚æ•°ä¸æ˜¯æ•°å­—"
-
-#: builtin.c:1729
+#: builtin.c:885
msgid "mktime: received non-string argument"
msgstr "mktime: 收到éžå­—符串å‚æ•°"
-#: builtin.c:1746
+#: builtin.c:902
msgid "mktime: at least one of the values is out of the default range"
msgstr ""
-#: builtin.c:1781
+#: builtin.c:937
msgid "'system' function not allowed in sandbox mode"
msgstr ""
-#: builtin.c:1786
+#: builtin.c:942
msgid "system: received non-string argument"
msgstr "system: 收到éžå­—符串å‚æ•°"
-#: builtin.c:1907 eval.c:2285
+#: builtin.c:997 eval.c:1105 eval.c:1557 eval.c:1570
+#, c-format
+msgid "reference to uninitialized variable `%s'"
+msgstr "引用未åˆå§‹åŒ–çš„å˜é‡â€œ%sâ€"
+
+#: builtin.c:1064
#, c-format
msgid "reference to uninitialized field `$%d'"
msgstr "引用未åˆå§‹åŒ–的字段“$%dâ€"
-#: builtin.c:2012
+#: builtin.c:1098
msgid "tolower: received non-string argument"
msgstr "tolower: 收到éžå­—符串å‚æ•°"
-#: builtin.c:2042
+#: builtin.c:1151
msgid "toupper: received non-string argument"
msgstr "toupper: 收到éžå­—符串å‚æ•°"
-#: builtin.c:2075
+#: builtin.c:1199
msgid "atan2: received non-numeric first argument"
msgstr "atan2: 第一个å‚æ•°ä¸æ˜¯æ•°å­—"
-#: builtin.c:2077
+#: builtin.c:1201
msgid "atan2: received non-numeric second argument"
msgstr "atan2: 第二个å‚æ•°ä¸æ˜¯æ•°å­—"
-#: builtin.c:2096
+#: builtin.c:1220
msgid "sin: received non-numeric argument"
msgstr "sin: 收到éžæ•°å­—å‚æ•°"
-#: builtin.c:2112
+#: builtin.c:1236
msgid "cos: received non-numeric argument"
msgstr "cos: 收到éžæ•°å­—å‚æ•°"
-#: builtin.c:2165
+#: builtin.c:1289
msgid "srand: received non-numeric argument"
msgstr "srand: 收到éžæ•°å­—å‚æ•°"
-#: builtin.c:2200
+#: builtin.c:1320
msgid "match: third argument is not an array"
msgstr "match: 第三个å‚æ•°ä¸æ˜¯æ•°ç»„"
-#: builtin.c:2750
+#: builtin.c:1827
msgid "gensub: third argument of 0 treated as 1"
msgstr "gensub: 第三个å‚æ•° 0 被当作 1"
-#: builtin.c:2866
+#: builtin.c:1869
msgid "lshift: received non-numeric first argument"
msgstr "lshift: 第一个å‚æ•°ä¸æ˜¯æ•°å­—"
-#: builtin.c:2868
+#: builtin.c:1871
msgid "lshift: received non-numeric second argument"
msgstr "lshift: 第二个å‚æ•°ä¸æ˜¯æ•°å­—"
-#: builtin.c:2874
+#: builtin.c:1877
#, c-format
msgid "lshift(%lf, %lf): negative values will give strange results"
msgstr "lshift(%lf, %lf): 负值会得到奇怪的结果"
-#: builtin.c:2876
+#: builtin.c:1879
#, c-format
msgid "lshift(%lf, %lf): fractional values will be truncated"
msgstr "lshift(%lf, %lf): å°æ•°éƒ¨åˆ†ä¼šè¢«æˆªæ–­"
-#: builtin.c:2878
+#: builtin.c:1881
#, c-format
msgid "lshift(%lf, %lf): too large shift value will give strange results"
msgstr "lshift(%lf, %lf): 过大的移ä½ä¼šå¾—到奇怪的结果"
-#: builtin.c:2904
+#: builtin.c:1908
msgid "rshift: received non-numeric first argument"
msgstr "rshift: 第一个å‚æ•°ä¸æ˜¯æ•°å­—"
-#: builtin.c:2906
+#: builtin.c:1910
msgid "rshift: received non-numeric second argument"
msgstr "rshift: 第二个å‚æ•°ä¸æ˜¯æ•°å­—"
-#: builtin.c:2912
+#: builtin.c:1916
#, c-format
msgid "rshift(%lf, %lf): negative values will give strange results"
msgstr "rshift(%lf, %lf): 负值会得到奇怪的结果"
-#: builtin.c:2914
+#: builtin.c:1918
#, c-format
msgid "rshift(%lf, %lf): fractional values will be truncated"
msgstr "rshift(%lf, %lf): å°æ•°éƒ¨åˆ†ä¼šè¢«æˆªæ–­"
-#: builtin.c:2916
+#: builtin.c:1920
#, c-format
msgid "rshift(%lf, %lf): too large shift value will give strange results"
msgstr "rshift(%lf, %lf): 过大的移ä½ä¼šå¾—到奇怪的结果"
-#: builtin.c:2942
+#: builtin.c:1947
msgid "and: received non-numeric first argument"
msgstr "and: 第一个å‚æ•°ä¸æ˜¯æ•°å­—"
-#: builtin.c:2944
+#: builtin.c:1949
msgid "and: received non-numeric second argument"
msgstr "and: 第二个å‚æ•°ä¸æ˜¯æ•°å­—"
-#: builtin.c:2950
+#: builtin.c:1955
#, c-format
msgid "and(%lf, %lf): negative values will give strange results"
msgstr "and(%lf, %lf): 负值会得到奇怪的结果"
-#: builtin.c:2952
+#: builtin.c:1957
#, c-format
msgid "and(%lf, %lf): fractional values will be truncated"
msgstr "and(%lf, %lf): å°æ•°éƒ¨åˆ†ä¼šè¢«æˆªæ–­"
-#: builtin.c:2978
+#: builtin.c:1984
msgid "or: received non-numeric first argument"
msgstr "or: 第一个å‚æ•°ä¸æ˜¯æ•°å­—"
-#: builtin.c:2980
+#: builtin.c:1986
msgid "or: received non-numeric second argument"
msgstr "or: 第二个å‚æ•°ä¸æ˜¯æ•°å­—"
-#: builtin.c:2986
+#: builtin.c:1992
#, c-format
msgid "or(%lf, %lf): negative values will give strange results"
msgstr "or(%lf, %lf): 负值会得到奇怪的结果"
-#: builtin.c:2988
+#: builtin.c:1994
#, c-format
msgid "or(%lf, %lf): fractional values will be truncated"
msgstr "or(%lf, %lf): å°æ•°éƒ¨åˆ†ä¼šè¢«æˆªæ–­"
-#: builtin.c:3014
+#: builtin.c:2023
msgid "xor: received non-numeric first argument"
msgstr "xor: 第一个å‚æ•°ä¸æ˜¯æ•°å­—"
-#: builtin.c:3016
+#: builtin.c:2025
msgid "xor: received non-numeric second argument"
msgstr "xor: 第二个å‚æ•°ä¸æ˜¯æ•°å­—"
-#: builtin.c:3022
+#: builtin.c:2031
#, c-format
msgid "xor(%lf, %lf): negative values will give strange results"
msgstr "xor(%lf, %lf): 负值会得到奇怪的结果"
-#: builtin.c:3024
+#: builtin.c:2033
#, c-format
msgid "xor(%lf, %lf): fractional values will be truncated"
msgstr "xor(%lf, %lf): å°æ•°éƒ¨åˆ†ä¼šè¢«æˆªæ–­"
-#: builtin.c:3048
+#: builtin.c:2057 builtin.c:2063
msgid "compl: received non-numeric argument"
msgstr "compl: 收到éžæ•°å­—å‚æ•°"
-#: builtin.c:3054
+#: builtin.c:2065
#, c-format
msgid "compl(%lf): negative value will give strange results"
msgstr "compl(%lf): 负值会得到奇怪的结果"
-#: builtin.c:3056
+#: builtin.c:2067
#, c-format
msgid "compl(%lf): fractional value will be truncated"
msgstr "compl(%lf): å°æ•°éƒ¨åˆ†ä¼šè¢«æˆªæ–­"
-#: builtin.c:3229
+#: builtin.c:2237
#, c-format
msgid "dcgettext: `%s' is not a valid locale category"
msgstr "dcgettext: “%sâ€ä¸æ˜¯ä¸€ä¸ªåˆç†çš„本地化目录"
-#: eval.c:374
+#: eval.c:412
#, c-format
msgid "unknown nodetype %d"
msgstr "未知的结点类型 %d"
-#: eval.c:423
-msgid "buffer overflow in genflags2str"
-msgstr "genflags2str 时缓冲区溢出"
+#: eval.c:423 eval.c:437
+#, fuzzy, c-format
+msgid "unknown opcode %d"
+msgstr "未知的结点类型 %d"
-#: eval.c:455 eval.c:461 profile.c:787
+#: eval.c:434
#, c-format
-msgid "attempt to use array `%s' in a scalar context"
-msgstr "试图在标é‡çŽ¯å¢ƒä¸­ä½¿ç”¨æ•°ç»„“%sâ€"
+msgid "opcode %s not an operator or keyword"
+msgstr ""
-#: eval.c:803
-#, c-format
-msgid "for loop: array `%s' changed size from %ld to %ld during loop execution"
-msgstr "for loop: 数组“%sâ€åœ¨å¾ªçŽ¯æ‰§è¡Œæ—¶å¤§å°ä»Ž %ld 改å˜ä¸º %ld"
+#: eval.c:487
+msgid "buffer overflow in genflags2str"
+msgstr "genflags2str 时缓冲区溢出"
-#: eval.c:824
-msgid "`break' outside a loop is not portable"
-msgstr "“breakâ€åœ¨å¾ªçŽ¯å¤–使用是ä¸å¯ç§»æ¤çš„"
+#: eval.c:613
+#, c-format
+msgid ""
+"\n"
+"\t# Function Call Stack:\n"
+"\n"
+msgstr ""
+"\n"
+"\t# 函数调用栈:\n"
+"\n"
-#: eval.c:828
-msgid "`break' outside a loop is not allowed"
-msgstr "“breakâ€åœ¨å¾ªçŽ¯å¤–使用是ä¸å…许的"
+#: eval.c:640
+msgid "`IGNORECASE' is a gawk extension"
+msgstr "“IGNORECASEâ€æ˜¯ gawk 扩展"
-#: eval.c:845
-msgid "`continue' outside a loop is not portable"
-msgstr "“continueâ€åœ¨å¾ªçŽ¯å¤–使用是ä¸å¯ç§»æ¤çš„"
+#: eval.c:669
+msgid "`BINMODE' is a gawk extension"
+msgstr "“BINMODEâ€æ˜¯ gawk 扩展"
-#: eval.c:849
-msgid "`continue' outside a loop is not allowed"
-msgstr "“continueâ€åœ¨å¾ªçŽ¯å¤–使用是ä¸å…许的"
+#: eval.c:727
+#, c-format
+msgid "BINMODE value `%s' is invalid, treated as 3"
+msgstr "BINMODE 值 “%s†éžæ³•ï¼ŒæŒ‰ 3 处ç†"
-#: eval.c:883
-msgid "`next' cannot be called from a BEGIN rule"
-msgstr "在 BEGIN 规则中ä¸å…许调用“nextâ€"
+#: eval.c:817
+#, c-format
+msgid "bad `%sFMT' specification `%s'"
+msgstr "错误的“%sFMTâ€å®žçŽ°â€œ%sâ€"
-#: eval.c:885
-msgid "`next' cannot be called from an END rule"
-msgstr "在 END 规则中ä¸å…许调用“nextâ€"
+#: eval.c:895
+msgid "turning off `--lint' due to assignment to `LINT'"
+msgstr "由于对“LINTâ€èµ‹å€¼æ‰€ä»¥å…³é—­â€œ--lintâ€"
-#: eval.c:887
-#, fuzzy
-msgid "`next' cannot be called from a BEGINFILE rule"
-msgstr "在 BEGIN 规则中ä¸å…许调用“nextâ€"
+#: eval.c:1067 eval.c:1544
+#, c-format
+msgid "can't use function name `%s' as variable or array"
+msgstr "无法使用函数å“%sâ€ä½œä¸ºå˜é‡æˆ–数组"
-#: eval.c:889
-#, fuzzy
-msgid "`next' cannot be called from an ENDFILE rule"
-msgstr "在 END 规则中ä¸å…许调用“nextâ€"
+#: eval.c:1095
+msgid "assignment is not allowed to result of builtin function"
+msgstr "ä¸å…许对内置函数的结果赋值"
-#: eval.c:898
-msgid "`nextfile' cannot be called from a BEGIN rule"
-msgstr "在 BEGIN 规则中ä¸å…许调用“nextfileâ€"
+#: eval.c:1104 eval.c:1556 eval.c:1569
+#, c-format
+msgid "reference to uninitialized argument `%s'"
+msgstr "引用未åˆå§‹åŒ–çš„å‚数“%sâ€"
-#: eval.c:900
-msgid "`nextfile' cannot be called from an END rule"
-msgstr "在 END 规则中ä¸å…许调用“nextfileâ€"
+#: eval.c:1123
+msgid "attempt to field reference from non-numeric value"
+msgstr "试图从éžæ•°å€¼å¼•ç”¨å­—段编å·"
-#: eval.c:906
+#: eval.c:1125
#, fuzzy
-msgid "`nextfile' cannot be called from an ENDFILE rule"
-msgstr "在 END 规则中ä¸å…许调用“nextfileâ€"
+msgid "attempt to field reference from null string"
+msgstr "试图从空字符串引用"
-#: eval.c:963
-msgid "statement has no effect"
-msgstr "表达å¼æ— ä»»ä½•ä½œç”¨"
+#: eval.c:1131
+#, fuzzy, c-format
+msgid "attempt to access field %ld"
+msgstr "试图访问字段 %d"
-#: eval.c:1040 eval.c:2133
-#, c-format
-msgid "can't use function name `%s' as variable or array"
-msgstr "无法使用函数å“%sâ€ä½œä¸ºå˜é‡æˆ–数组"
+#: eval.c:1140
+#, fuzzy, c-format
+msgid "reference to uninitialized field `$%ld'"
+msgstr "引用未åˆå§‹åŒ–的字段“$%dâ€"
-#: eval.c:1047 eval.c:1053
+#: eval.c:1202
#, c-format
-msgid "reference to uninitialized argument `%s'"
-msgstr "引用未åˆå§‹åŒ–çš„å‚数“%sâ€"
+msgid "function `%s' called with more arguments than declared"
+msgstr "函数“%sâ€è¢«è°ƒç”¨æ—¶æ供了比声明时更多的å‚æ•°"
-#: eval.c:1062 eval.c:2142
+#: eval.c:1358
#, c-format
-msgid "reference to uninitialized variable `%s'"
-msgstr "引用未åˆå§‹åŒ–çš„å˜é‡â€œ%sâ€"
+msgid "unwind_stack: unexpected type `%s'"
+msgstr ""
-#: eval.c:1210
-msgid ""
-"concatenation: side effects in one expression have changed the length of "
-"another!"
-msgstr "concatenation: 一个表达å¼çš„é¢å¤–效应已改å˜å¦ä¸€ä¸ªçš„长度ï¼"
+#: eval.c:1636
+#, fuzzy, c-format
+msgid "attempt to use scalar `%s' as an array"
+msgstr "试图把标é‡â€œ%sâ€å½“数组使用"
-#: eval.c:1315
+#: eval.c:1680
msgid "assignment used in conditional context"
msgstr "在æ¡ä»¶è¡¨è¾¾å¼ä¸­èµ‹å€¼"
-#: eval.c:1396
-msgid "division by zero attempted"
-msgstr "试图除0"
-
-#: eval.c:1426 profile.c:663
-#, c-format
-msgid "illegal type (%s) in tree_eval"
-msgstr "tree_eval 中的éžæ³•ç±»åž‹ (%s)"
+#: eval.c:1684
+msgid "statement has no effect"
+msgstr "表达å¼æ— ä»»ä½•ä½œç”¨"
-#: eval.c:1589
+#: eval.c:2028
msgid "division by zero attempted in `/='"
msgstr "在“/=â€ä¸­è¯•å›¾é™¤0"
-#: eval.c:1611
+#: eval.c:2053
#, c-format
msgid "division by zero attempted in `%%='"
msgstr "在“%%=â€ä¸­è¯•å›¾é™¤0"
-#: eval.c:1891
-#, c-format
-msgid "function `%s' called with more arguments than declared"
-msgstr "函数“%sâ€è¢«è°ƒç”¨æ—¶æ供了比声明时更多的å‚æ•°"
-
-#: eval.c:1948
-#, c-format
-msgid "function `%s' not defined"
-msgstr "函数“%sâ€æœªå®šä¹‰"
-
-#: eval.c:1950
-#, c-format
-msgid "identifier `%s' is not a function"
-msgstr ""
-
-#: eval.c:1997
-#, c-format
-msgid ""
-"function parameter `%s' is not a scalar and cannot be used for indirect "
-"function call"
-msgstr ""
-
-#: eval.c:2014
-#, c-format
-msgid "indirect call of real function `%s' is silly"
-msgstr ""
+#: eval.c:2139
+msgid "`continue' outside a loop is not allowed"
+msgstr "“continueâ€åœ¨å¾ªçŽ¯å¤–使用是ä¸å…许的"
-#: eval.c:2034
-#, c-format
-msgid "function `%s' called indirectly through `%s' does not exist"
-msgstr ""
+#: eval.c:2145
+#, fuzzy
+msgid "`break' outside a loop is not allowed"
+msgstr "“breakâ€åœ¨å¾ªçŽ¯å¤–使用是ä¸å…许的"
-#: eval.c:2039
+#: eval.c:2229
#, c-format
-msgid "identifier `%s' cannot be used for indirect function call"
-msgstr ""
+msgid "for loop: array `%s' changed size from %ld to %ld during loop execution"
+msgstr "for loop: 数组“%sâ€åœ¨å¾ªçŽ¯æ‰§è¡Œæ—¶å¤§å°ä»Ž %ld 改å˜ä¸º %ld"
-#: eval.c:2105
+#: eval.c:2342
#, c-format
-msgid ""
-"\n"
-"\t# Function Call Stack:\n"
-"\n"
+msgid "function called indirectly through `%s' does not exist"
msgstr ""
-"\n"
-"\t# 函数调用栈:\n"
-"\n"
-
-#: eval.c:2108
-#, c-format
-msgid "\t# -- main --\n"
-msgstr "\t# -- main --\n"
-
-#: eval.c:2269
-msgid "attempt to field reference from non-numeric value"
-msgstr "试图从éžæ•°å€¼å¼•ç”¨å­—段编å·"
-#: eval.c:2271
-msgid "attempt to reference from null string"
-msgstr "试图从空字符串引用"
-
-#: eval.c:2277
+#: eval.c:2354
#, c-format
-msgid "attempt to access field %d"
-msgstr "试图访问字段 %d"
-
-#: eval.c:2298 eval.c:2305 profile.c:843
-msgid "assignment is not allowed to result of builtin function"
-msgstr "ä¸å…许对内置函数的结果赋值"
+msgid "function `%s' not defined"
+msgstr "函数“%sâ€æœªå®šä¹‰"
-#: eval.c:2369
-msgid "`IGNORECASE' is a gawk extension"
-msgstr "“IGNORECASEâ€æ˜¯ gawk 扩展"
+#: eval.c:2481
+#, fuzzy, c-format
+msgid "`nextfile' cannot be called from a `%s' rule"
+msgstr "在 END 规则中ä¸å…许调用“nextfileâ€"
-#: eval.c:2398
-msgid "`BINMODE' is a gawk extension"
-msgstr "“BINMODEâ€æ˜¯ gawk 扩展"
+#: eval.c:2540
+#, fuzzy, c-format
+msgid "`next' cannot be called from a `%s' rule"
+msgstr "在 END 规则中ä¸å…许调用“nextâ€"
-#: eval.c:2456
+#: eval.c:2602
#, c-format
-msgid "BINMODE value `%s' is invalid, treated as 3"
+msgid "Sorry, don't know how to interpret `%s'"
msgstr ""
-#: eval.c:2546
-#, c-format
-msgid "bad `%sFMT' specification `%s'"
-msgstr "错误的“%sFMTâ€å®žçŽ°â€œ%sâ€"
-
-#: eval.c:2624
-msgid "turning off `--lint' due to assignment to `LINT'"
-msgstr "由于对“LINTâ€èµ‹å€¼æ‰€ä»¥å…³é—­â€œ--lintâ€"
-
-#: ext.c:61
-msgid "extensions not allowed in sandbox mode"
+#: ext.c:62
+msgid "extensions are not allowed in sandbox mode"
msgstr ""
-#: ext.c:65 ext.c:70
+#: ext.c:68 ext.c:73
msgid "`extension' is a gawk extension"
msgstr "“extensionâ€æ˜¯ gawk 扩展"
-#: ext.c:80
-#, c-format
-msgid "extension: cannot open `%s' (%s)\n"
+#: ext.c:83
+#, fuzzy, c-format
+msgid "fatal: extension: cannot open `%s' (%s)\n"
msgstr "extension: 无法打开 “%sâ€(%s)\n"
-#: ext.c:88
-#, c-format
-msgid "extension: library `%s': cannot call function `%s' (%s)\n"
+#: ext.c:93
+#, fuzzy, c-format
+msgid "fatal: extension: library `%s': cannot call function `%s' (%s)\n"
msgstr "extension: 库“%sâ€: 无法调用函数“%sâ€(%s)\n"
-#: ext.c:108
+#: ext.c:123
msgid "extension: missing function name"
msgstr "extension: 缺少函数å"
-#: ext.c:113
+#: ext.c:128
#, c-format
msgid "extension: illegal character `%c' in function name `%s'"
msgstr "extension: 函数å“%2$sâ€ä¸­æœ‰éžæ³•å­—符“%1$câ€"
-#: ext.c:119
+#: ext.c:137
#, c-format
msgid "extension: can't redefine function `%s'"
msgstr "extension: 无法é‡å®šä¹‰å‡½æ•°â€œ%sâ€"
-#: ext.c:123
+#: ext.c:141
#, c-format
msgid "extension: function `%s' already defined"
msgstr "extension: 函数“%sâ€å·²ç»è¢«å®šä¹‰"
-#: ext.c:128
+#: ext.c:146
+#, c-format
+msgid "extension: function name `%s' previously defined"
+msgstr "extension: 函数å“%sâ€å‰é¢å·²è¢«å®šä¹‰"
+
+#: ext.c:148
#, c-format
msgid "extension: can't use gawk built-in `%s' as function name"
msgstr "extension: 无法使用 gawk 内置的 “%s†作为函数å"
-#: ext.c:130
+#: ext.c:152
#, c-format
-msgid "extension: function name `%s' previously defined"
-msgstr "extension: 函数å“%sâ€å‰é¢å·²è¢«å®šä¹‰"
+msgid "make_builtin: negative argument count for function `%s'"
+msgstr ""
-#: ext.c:207
-#, c-format
+#: ext.c:255
+#, fuzzy, c-format
msgid "function `%s' defined to take no more than %d argument(s)"
msgstr "函数“%sâ€è¢«å®šä¹‰ä¸ºæ”¯æŒä¸è¶…过 %d 个å‚æ•°"
-#: ext.c:210
+#: ext.c:258
#, c-format
msgid "function `%s': missing argument #%d"
msgstr "函数“%sâ€: 缺少第 %d 个å‚æ•°"
-#: ext.c:220
+#: ext.c:268
#, c-format
msgid "function `%s': argument #%d: attempt to use scalar as an array"
msgstr "函数“%sâ€: 第 %d 个å‚æ•°: 试图把标é‡å½“作数组使用"
-#: ext.c:224
+#: ext.c:272
#, c-format
msgid "function `%s': argument #%d: attempt to use array as a scalar"
msgstr "函数“%sâ€: 第 %d 个å‚æ•°: 试图把数组当标é‡ä½¿ç”¨"
-#: ext.c:249
+#: ext.c:285
msgid "Operation Not Supported"
msgstr "æ“作ä¸è¢«æ”¯æŒ"
@@ -1119,74 +1062,73 @@ msgstr "æ“作ä¸è¢«æ”¯æŒ"
msgid "NF set to negative value"
msgstr "NF 被设置为负值"
-#: field.c:913
-msgid "split: second argument is not an array"
-msgstr "split: 第二个å‚æ•°ä¸æ˜¯æ•°ç»„"
-
-#: field.c:922 field.c:932 field.c:937
+#: field.c:939 field.c:946 field.c:950
#, fuzzy
msgid "split: fourth argument is a gawk extension"
msgstr "match: 第三个å‚数是 gawk 扩展"
-#: field.c:928
+#: field.c:943
#, fuzzy
msgid "split: fourth argument is not an array"
msgstr "split: 第二个å‚æ•°ä¸æ˜¯æ•°ç»„"
-#: field.c:975
-#, fuzzy
-msgid "split: null string for third argument is a gawk extension"
+#: field.c:957
+msgid "split: second argument is not an array"
+msgstr "split: 第二个å‚æ•°ä¸æ˜¯æ•°ç»„"
+
+#: field.c:987
+msgid "split: null string for third arg is a gawk extension"
msgstr "split: 第三个å‚数为空是 gawk 扩展"
-#: field.c:1032
+#: field.c:1028
#, fuzzy
-msgid "patsplit: second argument is not an array"
+msgid "patsplit: fourth argument is not an array"
msgstr "split: 第二个å‚æ•°ä¸æ˜¯æ•°ç»„"
-#: field.c:1041
+#: field.c:1033
#, fuzzy
-msgid "patsplit: fourth argument is not an array"
+msgid "patsplit: second argument is not an array"
msgstr "split: 第二个å‚æ•°ä¸æ˜¯æ•°ç»„"
-#: field.c:1067
+#: field.c:1051
#, fuzzy
msgid "patsplit: third argument must be non-null"
msgstr "match: 第三个å‚æ•°ä¸æ˜¯æ•°ç»„"
-#: field.c:1111
+#: field.c:1084
msgid "`FIELDWIDTHS' is a gawk extension"
msgstr "“FIELDWIDTHSâ€æ˜¯ gawk 扩展"
-#: field.c:1141 field.c:1155
+#: field.c:1147
#, c-format
msgid "invalid FIELDWIDTHS value, near `%s'"
msgstr "“%sâ€é™„è¿‘ FIELDWIDTHS 值无效"
-#: field.c:1238
+#: field.c:1220
msgid "null string for `FS' is a gawk extension"
msgstr "把“FSâ€è®¾ä¸ºç©ºå­—符串是 gawk 扩展"
-#: field.c:1242
+#: field.c:1224
msgid "old awk does not support regexps as value of `FS'"
msgstr "è€ awk ä¸æ”¯æŒæŠŠâ€œFSâ€è®¾ç½®ä¸ºæ­£åˆ™è¡¨è¾¾å¼"
-#: field.c:1357
+#: field.c:1343
#, fuzzy
msgid "`FPAT' is a gawk extension"
msgstr "“%sâ€æ˜¯ gawk 扩展"
#: getopt.c:574 getopt.c:590
-#, fuzzy, c-format
+#, c-format
msgid "%s: option '%s' is ambiguous\n"
msgstr "%s: 选项“%sâ€æœ‰æ­§ä¹‰\n"
#: getopt.c:623 getopt.c:627
-#, fuzzy, c-format
+#, c-format
msgid "%s: option '--%s' doesn't allow an argument\n"
msgstr "%s: 选项“--%sâ€ä¸å…许有å‚æ•°\n"
#: getopt.c:636 getopt.c:641
-#, fuzzy, c-format
+#, c-format
msgid "%s: option '%c%s' doesn't allow an argument\n"
msgstr "%s: 选项“%c%sâ€ä¸å…许有å‚æ•°\n"
@@ -1196,32 +1138,32 @@ msgid "%s: option '--%s' requires an argument\n"
msgstr "%s: 选项“%sâ€éœ€è¦ä¸€ä¸ªå‚æ•°\n"
#: getopt.c:741 getopt.c:744
-#, fuzzy, c-format
+#, c-format
msgid "%s: unrecognized option '--%s'\n"
msgstr "%s: 无法识别选项“--%sâ€\n"
#: getopt.c:752 getopt.c:755
-#, fuzzy, c-format
+#, c-format
msgid "%s: unrecognized option '%c%s'\n"
msgstr "%s: 无法识别选项“%c%sâ€\n"
#: getopt.c:804 getopt.c:807
-#, fuzzy, c-format
+#, c-format
msgid "%s: invalid option -- '%c'\n"
-msgstr "%s: 无效选项 -- %c\n"
+msgstr "%s: 无效选项 -- “%câ€\n"
#: getopt.c:857 getopt.c:874 getopt.c:1082 getopt.c:1100
-#, fuzzy, c-format
+#, c-format
msgid "%s: option requires an argument -- '%c'\n"
-msgstr "%s: 选项需è¦ä¸€ä¸ªå‚æ•° -- %c\n"
+msgstr "%s: 选项需è¦ä¸€ä¸ªå‚æ•° -- “%câ€\n"
#: getopt.c:930 getopt.c:946
-#, fuzzy, c-format
+#, c-format
msgid "%s: option '-W %s' is ambiguous\n"
msgstr "%s: 选项“-W %sâ€æœ‰æ­§ä¹‰\n"
#: getopt.c:970 getopt.c:988
-#, fuzzy, c-format
+#, c-format
msgid "%s: option '-W %s' doesn't allow an argument\n"
msgstr "%s: 选项“-W %sâ€ä¸å…许å‚æ•°\n"
@@ -1230,492 +1172,490 @@ msgstr "%s: 选项“-W %sâ€ä¸å…许å‚æ•°\n"
msgid "%s: option '-W %s' requires an argument\n"
msgstr "%s: 选项“%sâ€éœ€è¦ä¸€ä¸ªå‚æ•°\n"
-#: io.c:379
+#: io.c:272
#, c-format
msgid "command line argument `%s' is a directory: skipped"
msgstr ""
-#: io.c:413
+#: io.c:275 io.c:372
#, c-format
msgid "cannot open file `%s' for reading (%s)"
msgstr "无法以读模å¼æ‰“开文件“%sâ€(%s)"
-#: io.c:459 io.c:2999
+#: io.c:419
#, c-format
msgid "error reading input file `%s': %s"
msgstr "读å–输入文件“%sâ€æ—¶å‡ºé”™: %s"
-#: io.c:506
+#: io.c:470
#, c-format
msgid "close of fd %d (`%s') failed (%s)"
msgstr "å…³é—­æ–‡ä»¶å· %d (“%sâ€)失败(%s)"
-#: io.c:617
-msgid "redirection not allowed in sandbox mode"
-msgstr ""
-
-#: io.c:648
-#, c-format
-msgid "invalid tree type %s in redirect()"
-msgstr "在 redirect() 中的无效的树类型 %s"
-
-#: io.c:654
+#: io.c:577
#, c-format
msgid "expression in `%s' redirection only has numeric value"
msgstr "“%sâ€é‡å®šå‘中的表达å¼åªæœ‰æ•°å­—值"
-#: io.c:660
+#: io.c:583
#, c-format
msgid "expression for `%s' redirection has null string value"
msgstr "“%sâ€é‡å®šå‘中的表达å¼æ˜¯ç©ºå­—符串"
-#: io.c:665
+#: io.c:589
#, c-format
msgid "filename `%s' for `%s' redirection may be result of logical expression"
msgstr "“%2$sâ€é‡å®šå‘中的文件å“%1$sâ€å¯èƒ½æ˜¯é€»è¾‘表达å¼çš„结果"
-#: io.c:707
+#: io.c:628
#, c-format
msgid "unnecessary mixing of `>' and `>>' for file `%.*s'"
msgstr "在文件“%.*sâ€ä¸­ä¸å¿…è¦çš„æ··åˆä½¿ç”¨â€œ>â€å’Œâ€œ>>â€"
-#: io.c:754
+#: io.c:681
#, c-format
msgid "can't open pipe `%s' for output (%s)"
msgstr "无法为输出打开管é““%sâ€(%s)"
-#: io.c:763
+#: io.c:691
#, c-format
msgid "can't open pipe `%s' for input (%s)"
msgstr "无法为输入打开管é““%sâ€(%s)"
-#: io.c:786
+#: io.c:712
#, c-format
msgid "can't open two way pipe `%s' for input/output (%s)"
msgstr "无法为输入/输出打开åŒå‘管é““%sâ€(%s)"
-#: io.c:864
+#: io.c:794
#, c-format
msgid "can't redirect from `%s' (%s)"
msgstr "无法自“%sâ€é‡å®šå‘(%s)"
-#: io.c:867
+#: io.c:797
#, c-format
msgid "can't redirect to `%s' (%s)"
msgstr "无法é‡å®šå‘到“%sâ€(%s)"
-#: io.c:920
+#: io.c:846
msgid ""
"reached system limit for open files: starting to multiplex file descriptors"
msgstr "打开的文件数达到系统é™åˆ¶: 开始å¤ç”¨æ–‡ä»¶æ述符"
-#: io.c:936
+#: io.c:862
#, c-format
msgid "close of `%s' failed (%s)."
msgstr "关闭“%sâ€å¤±è´¥(%s)。"
-#: io.c:944
+#: io.c:870
msgid "too many pipes or input files open"
msgstr "打开过多管é“或输入文件"
-#: io.c:967
+#: io.c:892
msgid "close: second argument must be `to' or `from'"
msgstr "close: 第二个å‚数必须是“toâ€æˆ–“fromâ€"
-#: io.c:981
+#: io.c:909
#, c-format
msgid "close: `%.*s' is not an open file, pipe or co-process"
msgstr "close: “%.*sâ€ä¸æ˜¯ä¸€ä¸ªå·²æ‰“开文件ã€ç®¡é“或åˆä½œè¿›ç¨‹"
-#: io.c:986
+#: io.c:914
msgid "close of redirection that was never opened"
msgstr "关闭一个从未被打开的é‡å®šå‘"
-#: io.c:1083
+#: io.c:1011
#, c-format
msgid "close: redirection `%s' not opened with `|&', second argument ignored"
msgstr "close: é‡å®šå‘“%sâ€ä¸æ˜¯ç”¨â€œ|&â€æ‰“开,第二个å‚数被忽略"
-#: io.c:1099
+#: io.c:1027
#, c-format
msgid "failure status (%d) on pipe close of `%s' (%s)"
msgstr "关闭管é““%2$sâ€æ—¶å¤±è´¥ï¼Œå¤±è´¥çŠ¶æ€ä¸º(%1$d)(%3$s)"
-#: io.c:1102
+#: io.c:1030
#, c-format
msgid "failure status (%d) on file close of `%s' (%s)"
msgstr "关闭文件“%2$sâ€æ—¶å¤±è´¥ï¼Œå¤±è´¥çŠ¶æ€ä¸º(%1$d)(%3$s)"
-#: io.c:1122
+#: io.c:1050
#, c-format
msgid "no explicit close of socket `%s' provided"
msgstr "未显å¼å…³é—­ç«¯å£â€œ%sâ€"
-#: io.c:1125
+#: io.c:1053
#, c-format
msgid "no explicit close of co-process `%s' provided"
msgstr "未显å¼å…³é—­åˆä½œè¿›ç¨‹â€œ%sâ€"
-#: io.c:1128
+#: io.c:1056
#, c-format
msgid "no explicit close of pipe `%s' provided"
msgstr "未显å¼å…³é—­ç®¡é““%sâ€"
-#: io.c:1131
+#: io.c:1059
#, c-format
msgid "no explicit close of file `%s' provided"
msgstr "未显å¼å…³é—­æ–‡ä»¶â€œ%sâ€"
-#: io.c:1159 io.c:1214 main.c:832 main.c:874
+#: io.c:1087 io.c:1142 main.c:823 main.c:865
#, c-format
msgid "error writing standard output (%s)"
msgstr "å‘标准输出写时å‘生错误 (%s)"
-#: io.c:1163 io.c:1219
+#: io.c:1091 io.c:1147
#, c-format
msgid "error writing standard error (%s)"
msgstr "å‘标准错误输出写时å‘生错误 (%s)"
-#: io.c:1171
+#: io.c:1099
#, c-format
msgid "pipe flush of `%s' failed (%s)."
msgstr "刷新管é““%sâ€æ—¶å‡ºé”™(%s)。"
-#: io.c:1174
+#: io.c:1102
#, c-format
msgid "co-process flush of pipe to `%s' failed (%s)."
msgstr "刷新åˆä½œè¿›ç¨‹ç®¡é““%sâ€æ—¶å‡ºé”™(%s)。"
-#: io.c:1177
+#: io.c:1105
#, c-format
msgid "file flush of `%s' failed (%s)."
msgstr "刷新文件“%sâ€æ—¶å‡ºé”™(%s)。"
-#: io.c:1292
+#: io.c:1219
#, c-format
msgid "local port %s invalid in `/inet'"
msgstr "æœ¬åœ°ç«¯å£ %s 在“/inetâ€ä¸­æ— æ•ˆ"
-#: io.c:1309
+#: io.c:1236
#, c-format
msgid "remote host and port information (%s, %s) invalid"
msgstr "远程主机和端å£ä¿¡æ¯ (%s, %s) 无效"
-#: io.c:1344
+#: io.c:1276
msgid "/inet/raw client not ready yet, sorry"
msgstr "/inet/raw 客户端未准备好,对ä¸èµ·"
-#: io.c:1347 io.c:1383
+#: io.c:1279 io.c:1320
msgid "only root may use `/inet/raw'."
msgstr "ä»… root 能使用 “/inet/rawâ€"
-#: io.c:1381
+#: io.c:1318
msgid "/inet/raw server not ready yet, sorry"
msgstr "/inet/raw æœåŠ¡å™¨æœªå‡†å¤‡å¥½ï¼Œå¯¹ä¸èµ·"
-#: io.c:1477
+#: io.c:1417
#, c-format
msgid "no (known) protocol supplied in special filename `%s'"
msgstr "未æ供特殊文件å的“%sâ€çš„访问åè®®"
-#: io.c:1491
+#: io.c:1431
#, c-format
msgid "special file name `%s' is incomplete"
msgstr "特殊文件å“%sâ€æ˜¯ä¸å®Œæ•´çš„"
-#: io.c:1506
+#: io.c:1447
msgid "must supply a remote hostname to `/inet'"
msgstr "å¿…é¡»æ供远程主机å给“/inetâ€"
-#: io.c:1524
+#: io.c:1465
msgid "must supply a remote port to `/inet'"
msgstr "å¿…é¡»æ供远程端å£ç»™â€œ/inetâ€"
-#: io.c:1570
+#: io.c:1511
msgid "TCP/IP communications are not supported"
msgstr "TCP/IP 通讯ä¸è¢«æ”¯æŒ"
-#: io.c:1758
+#: io.c:1698
#, c-format
msgid "could not open `%s', mode `%s'"
msgstr "无法以模å¼â€œ%2$sâ€æ‰“开“%1$sâ€"
-#: io.c:1809
+#: io.c:1749
#, c-format
msgid "close of master pty failed (%s)"
msgstr "关闭主 pty 失败(%s)"
-#: io.c:1811 io.c:1963 io.c:2114
+#: io.c:1751 io.c:1918 io.c:2075
#, c-format
msgid "close of stdout in child failed (%s)"
msgstr "在å­è¿›ç¨‹ä¸­å…³é—­æ ‡å‡†è¾“出失败(%s)"
-#: io.c:1814
+#: io.c:1754
#, c-format
msgid "moving slave pty to stdout in child failed (dup: %s)"
msgstr "在å­è¿›ç¨‹ä¸­å°†ä»Ž pty 改为标准输出失败(dup: %s)"
-#: io.c:1816 io.c:1968
+#: io.c:1756 io.c:1923
#, c-format
msgid "close of stdin in child failed (%s)"
msgstr "在å­è¿›ç¨‹ä¸­å…³é—­æ ‡å‡†è¾“入失败(%s)"
-#: io.c:1819
+#: io.c:1759
#, c-format
msgid "moving slave pty to stdin in child failed (dup: %s)"
msgstr "在å­è¿›ç¨‹ä¸­å°†ä»Ž pty 改为标准输入失败(dup: %s)"
-#: io.c:1821 io.c:1840
+#: io.c:1761 io.c:1782
#, c-format
msgid "close of slave pty failed (%s)"
msgstr "关闭从 pty 失败(%s)"
-#: io.c:1914 io.c:1966 io.c:2095 io.c:2117
+#: io.c:1860 io.c:1921 io.c:2053 io.c:2078
#, c-format
msgid "moving pipe to stdout in child failed (dup: %s)"
msgstr "在å­è¿›ç¨‹ä¸­å°†ç®¡é“改为标准输出失败(dup: %s)"
-#: io.c:1918 io.c:1971
+#: io.c:1867 io.c:1926
#, c-format
msgid "moving pipe to stdin in child failed (dup: %s)"
msgstr "在å­è¿›ç¨‹ä¸­å°†ç®¡é“改为标准输入失败(dup: %s)"
-#: io.c:1935 io.c:2108
+#: io.c:1887 io.c:2068
msgid "restoring stdout in parent process failed\n"
msgstr "在父进程中æ¢å¤æ ‡å‡†è¾“出失败\n"
-#: io.c:1940
+#: io.c:1895
msgid "restoring stdin in parent process failed\n"
msgstr "在父进程中æ¢å¤æ ‡å‡†è¾“入失败\n"
-#: io.c:1974 io.c:2119 io.c:2130
+#: io.c:1929 io.c:2080 io.c:2094
#, c-format
msgid "close of pipe failed (%s)"
msgstr "关闭管é“失败(%s)"
-#: io.c:2019
+#: io.c:1974
msgid "`|&' not supported"
msgstr "“|&â€ä¸è¢«æ”¯æŒ"
-#: io.c:2085
+#: io.c:2040
#, c-format
msgid "cannot open pipe `%s' (%s)"
msgstr "无法打开管é““%sâ€(%s)"
-#: io.c:2126
+#: io.c:2088
#, c-format
msgid "cannot create child process for `%s' (fork: %s)"
msgstr "无法为“%sâ€åˆ›å»ºå­è¿›ç¨‹(fork: %s)"
-#: io.c:2518
+#: io.c:2577
#, c-format
msgid "data file `%s' is empty"
msgstr "æ•°æ®æ–‡ä»¶â€œ%sâ€ä¸ºç©º"
-#: io.c:2560 io.c:2568
+#: io.c:2618 io.c:2626
msgid "could not allocate more input memory"
msgstr "无法分é…更多的输入内存"
-#: io.c:3125
+#: io.c:3173
msgid "multicharacter value of `RS' is a gawk extension"
msgstr "“RSâ€è®¾ç½®ä¸ºå¤šå­—符是 gawk 扩展"
-#: main.c:313
+#: main.c:311
msgid "out of memory"
-msgstr ""
+msgstr "内存ä¸è¶³"
-#: main.c:381
+#: main.c:388
msgid "`-m[fr]' option irrelevant in gawk"
msgstr "“-m[fr]â€é€‰é¡¹åœ¨ gawk 中ä¸ç›¸å…³"
-#: main.c:383
+#: main.c:390
msgid "-m option usage: `-m[fr] nnn'"
msgstr "-m 选项用法: “-m[fr] nnnâ€"
-#: main.c:419
+#: main.c:426
#, fuzzy
msgid "empty argument to `-e/--source' ignored"
msgstr "“--sourceâ€çš„空å‚数被忽略"
-#: main.c:485
+#: main.c:492
#, c-format
msgid "%s: option `-W %s' unrecognized, ignored\n"
msgstr "%s: 选项“-W %sâ€æ— æ³•è¯†åˆ«ï¼Œå¿½ç•¥\n"
-#: main.c:530
+#: main.c:545
#, c-format
msgid "%s: option requires an argument -- %c\n"
msgstr "%s: 选项需è¦ä¸€ä¸ªå‚æ•° -- %c\n"
-#: main.c:551
+#: main.c:566
msgid "environment variable `POSIXLY_CORRECT' set: turning on `--posix'"
msgstr "环境å˜é‡â€œPOSIXLY_CORRECTâ€è¢«è®¾ç½®: 打开“--posixâ€"
-#: main.c:557
+#: main.c:572
msgid "`--posix' overrides `--traditional'"
msgstr "“--posixâ€è¦†ç›–“--traditionalâ€"
-#: main.c:568
+#: main.c:583
msgid "`--posix'/`--traditional' overrides `--non-decimal-data'"
msgstr "“--posixâ€æˆ–“--traditionalâ€è¦†ç›–“--non-decimal-dataâ€"
-#: main.c:572
+#: main.c:587
#, c-format
msgid "running %s setuid root may be a security problem"
msgstr "以设置 root ID æ–¹å¼è¿è¡Œâ€œ%sâ€å¯èƒ½å­˜åœ¨å®‰å…¨æ¼æ´ž"
-#: main.c:577
+#: main.c:592
#, fuzzy
msgid "`--posix' overrides `--binary'"
msgstr "“--posixâ€è¦†ç›–“--traditionalâ€"
-#: main.c:622
+#: main.c:643
#, c-format
msgid "can't set binary mode on stdin (%s)"
msgstr "无法在标准输入上设置二进制模å¼(%s)"
-#: main.c:625
+#: main.c:646
#, c-format
msgid "can't set binary mode on stdout (%s)"
msgstr "无法在标准输出上设置二进制模å¼(%s)"
-#: main.c:627
+#: main.c:648
#, c-format
msgid "can't set binary mode on stderr (%s)"
msgstr "无法在标准错误输出上设置二进制模å¼(%s)"
-#: main.c:668
+#: main.c:687
msgid "no program text at all!"
msgstr "完全没有程åºæ­£æ–‡ï¼"
-#: main.c:773
+#: main.c:762
#, c-format
msgid "Usage: %s [POSIX or GNU style options] -f progfile [--] file ...\n"
msgstr "用法: %s [POSIX 或 GNU 风格选项] -f 脚本文件 [--] 文件 ...\n"
-#: main.c:775
+#: main.c:764
#, c-format
msgid "Usage: %s [POSIX or GNU style options] [--] %cprogram%c file ...\n"
msgstr "用法: %s [POSIX 或 GNU 风格选项] [--] %c程åº%c 文件 ...\n"
-#: main.c:780
+#: main.c:769
#, fuzzy
msgid "POSIX options:\t\tGNU long options: (standard)\n"
msgstr "POSIX 选项: \t\tGNU 长选项:\n"
-#: main.c:781
+#: main.c:770
msgid "\t-f progfile\t\t--file=progfile\n"
msgstr "\t-f 脚本文件\t\t--file=脚本文件\n"
-#: main.c:782
+#: main.c:771
msgid "\t-F fs\t\t\t--field-separator=fs\n"
msgstr "\t-F fs\t\t\t--field-separator=fs\n"
-#: main.c:783
+#: main.c:772
msgid "\t-v var=val\t\t--assign=var=val\n"
msgstr "\t-v var=val\t\t--assign=var=val\n"
-#: main.c:784
+#: main.c:773
#, fuzzy
-msgid "POSIX options:\t\tGNU long options: (extensions)\n"
+msgid "Short options:\t\tGNU long options: (extensions)\n"
msgstr "POSIX 选项: \t\tGNU 长选项:\n"
-#: main.c:785
+#: main.c:774
msgid "\t-m[fr] val\n"
msgstr "\t-m[fr] val\n"
-#: main.c:786
+#: main.c:775
msgid "\t-b\t\t\t--characters-as-bytes\n"
msgstr ""
-#: main.c:787
-msgid "\t-c\t\t\t--compat, --traditional\n"
-msgstr ""
+#: main.c:776
+#, fuzzy
+msgid "\t-c\t\t\t--traditional\n"
+msgstr "\t-W traditional\t\t--traditional\n"
-#: main.c:788
+#: main.c:777
#, fuzzy
-msgid "\t-C\t\t\t--copyleft, --copyright\n"
+msgid "\t-C\t\t\t--copyright\n"
msgstr "\t-W copyright\t\t--copyright\n"
-#: main.c:789
+#: main.c:778
#, fuzzy
msgid "\t-d [file]\t\t--dump-variables[=file]\n"
msgstr "\t-W dump-variables[=file]\t--dump-variables[=file]\n"
-#: main.c:790
+#: main.c:779
#, fuzzy
msgid "\t-e 'program-text'\t--source='program-text'\n"
msgstr "\t-W source=program-text\t--source=program-text\n"
-#: main.c:791
+#: main.c:780
#, fuzzy
msgid "\t-E file\t\t\t--exec=file\n"
msgstr "\t-W exec=file\t\t--exec=file\n"
-#: main.c:792
+#: main.c:781
#, fuzzy
msgid "\t-g\t\t\t--gen-pot\n"
msgstr "\t-W gen-po\t\t--gen-po\n"
-#: main.c:793
+#: main.c:782
#, fuzzy
-msgid "\t-h\t\t\t--help, --usage\n"
+msgid "\t-h\t\t\t--help\n"
msgstr "\t-W help\t\t\t--help\n"
-#: main.c:794
+#: main.c:783
#, fuzzy
-msgid "\t-l [fatal]\t\t--lint[=fatal]\n"
+msgid "\t-L [fatal]\t\t--lint[=fatal]\n"
msgstr "\t-W lint[=fatal]\t\t--lint[=fatal]\n"
-#: main.c:795
-#, fuzzy
-msgid "\t-L\t\t\t--lint-old\n"
-msgstr "\t-W lint-old\t\t--lint-old\n"
-
-#: main.c:796
+#: main.c:784
#, fuzzy
msgid "\t-n\t\t\t--non-decimal-data\n"
msgstr "\t-W non-decimal-data\t--non-decimal-data\n"
-#: main.c:797
+#: main.c:785
+#, fuzzy
msgid "\t-N\t\t\t--use-lc-numeric\n"
-msgstr ""
+msgstr "\t-W use-lc-numeric\t--use-lc-numeric\n"
-#: main.c:798
+#: main.c:786
msgid "\t-O\t\t\t--optimize\n"
-msgstr ""
+msgstr "\t-O\t\t\t--optimize\n"
-#: main.c:799
+#: main.c:787
#, fuzzy
msgid "\t-p [file]\t\t--profile[=file]\n"
msgstr "\t-W profile[=file]\t--profile[=file]\n"
-#: main.c:800
+#: main.c:788
#, fuzzy
msgid "\t-P\t\t\t--posix\n"
msgstr "\t-W posix\t\t--posix\n"
-#: main.c:801
+#: main.c:789
#, fuzzy
msgid "\t-r\t\t\t--re-interval\n"
msgstr "\t-W re-interval\t\t--re-interval\n"
-#: main.c:802
+#: main.c:791
#, fuzzy
+msgid "\t-R file\t\t\t--command=file\n"
+msgstr "\t-W exec=file\t\t--exec=file\n"
+
+#: main.c:792
msgid "\t-S\t\t\t--sandbox\n"
-msgstr "\t-W posix\t\t--posix\n"
+msgstr ""
-#: main.c:803
+#: main.c:793
+#, fuzzy
+msgid "\t-t\t\t\t--lint-old\n"
+msgstr "\t-W lint-old\t\t--lint-old\n"
+
+#: main.c:794
#, fuzzy
msgid "\t-V\t\t\t--version\n"
msgstr "\t-W version\t\t--version\n"
-#: main.c:805
+#: main.c:796
msgid "\t-W nostalgia\t\t--nostalgia\n"
msgstr "\t-W nostalgia\t\t--nostalgia\n"
-#: main.c:808
-msgid "\t-W parsedebug\t\t--parsedebug\n"
+#: main.c:799
+#, fuzzy
+msgid "\t-Y\t\t--parsedebug\n"
msgstr "\t-W parsedebug\t\t--parsedebug\n"
#. TRANSLATORS: --help output 5 (end)
@@ -1723,7 +1663,7 @@ msgstr "\t-W parsedebug\t\t--parsedebug\n"
#. for this application. Please add _another line_ with the
#. address for translation bugs.
#. no-wrap
-#: main.c:817
+#: main.c:808
msgid ""
"\n"
"To report bugs, see node `Bugs' in `gawk.info', which is\n"
@@ -1737,7 +1677,7 @@ msgstr ""
"翻译错误请å‘信至 translation-team-zh-cn@lists.sourceforge.net\n"
"\n"
-#: main.c:821
+#: main.c:812
msgid ""
"gawk is a pattern scanning and processing language.\n"
"By default it reads standard input and writes standard output.\n"
@@ -1746,7 +1686,7 @@ msgstr ""
"gawk 是一个模å¼æ‰«æåŠå¤„ç†è¯­è¨€ã€‚缺çœæƒ…况下它从标准输入读入并写至标准输出。\n"
"\n"
-#: main.c:825
+#: main.c:816
msgid ""
"Examples:\n"
"\tgawk '{ sum += $1 }; END { print sum }' file\n"
@@ -1756,7 +1696,7 @@ msgstr ""
"\tgawk '{ sum += $1 }; END { print sum }' file\n"
"\tgawk -F: '{ print $1 }' /etc/passwd\n"
-#: main.c:845
+#: main.c:836
#, c-format
msgid ""
"Copyright (C) 1989, 1991-%d Free Software Foundation.\n"
@@ -1773,7 +1713,7 @@ msgstr ""
"3版或以åŽç‰ˆæœ¬ä¸‹ä¿®æ”¹æˆ–é‡æ–°å‘布。\n"
"\n"
-#: main.c:853
+#: main.c:844
msgid ""
"This program is distributed in the hope that it will be useful,\n"
"but WITHOUT ANY WARRANTY; without even the implied warranty of\n"
@@ -1786,26 +1726,24 @@ msgstr ""
"共许å¯è¯(GPL)。\n"
"\n"
-#: main.c:864
-#, fuzzy
+#: main.c:855
msgid ""
"You should have received a copy of the GNU General Public License\n"
"along with this program. If not, see http://www.gnu.org/licenses/.\n"
msgstr ""
-"你应该收到程åºé™„带的一份 GNU 通用公共许å¯è¯(GPL)。如果没有收到,å¯å†™ä¿¡è‡³\n"
-"“the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n"
-"Boston, MA 02110-1301, USA.â€ç´¢å–。\n"
+"你应该收到程åºé™„带的一份 GNU 通用公共许å¯è¯(GPL)。如果没有收到,请å‚看 "
+"http://www.gnu.org/licenses/ 。\n"
-#: main.c:899
+#: main.c:890
msgid "-Ft does not set FS to tab in POSIX awk"
msgstr "在 POSIX awk 中 -Ft ä¸ä¼šå°† FS 设为制表符(tab)"
-#: main.c:1116
+#: main.c:1122
#, c-format
msgid "unknown value for field spec: %d\n"
msgstr ""
-#: main.c:1176
+#: main.c:1182
#, c-format
msgid ""
"%s: `%s' argument to `-v' not in `var=value' form\n"
@@ -1814,174 +1752,138 @@ msgstr ""
"%s: “-vâ€çš„å‚数“%sâ€ä¸æ˜¯â€œvar=valueâ€å½¢å¼\n"
"\n"
-#: main.c:1196
+#: main.c:1202
#, c-format
msgid "`%s' is not a legal variable name"
msgstr "“%sâ€ä¸æ˜¯ä¸€ä¸ªåˆæ³•çš„å˜é‡å"
-#: main.c:1199
+#: main.c:1205
#, c-format
msgid "`%s' is not a variable name, looking for file `%s=%s'"
msgstr "“%sâ€ä¸æ˜¯ä¸€ä¸ªå˜é‡å,查找文件“%s=%sâ€"
-#: main.c:1238
+#: main.c:1258
msgid "floating point exception"
msgstr "浮点数异常"
-#: main.c:1245
+#: main.c:1265
msgid "fatal error: internal error"
msgstr "致命错误: 内部错误"
-#: main.c:1260
-#, fuzzy
+#: main.c:1280
msgid "fatal error: internal error: segfault"
-msgstr "致命错误: 内部错误"
+msgstr "致命错误: 内部错误: 段错误"
-#: main.c:1272
-#, fuzzy
+#: main.c:1292
msgid "fatal error: internal error: stack overflow"
-msgstr "致命错误: 内部错误"
+msgstr "致命错误: 内部错误: 栈溢出"
-#: main.c:1322
+#: main.c:1342
#, c-format
msgid "no pre-opened fd %d"
msgstr "文件æ述符 %d 未被打开"
-#: main.c:1329
+#: main.c:1349
#, c-format
msgid "could not pre-open /dev/null for fd %d"
msgstr "无法为文件æ述符 %d 预打开 /dev/null"
-#: main.c:1352 main.c:1361
+#: main.c:1372 main.c:1381
#, c-format
msgid "could not find groups: %s"
msgstr "无法找到组: %s"
-#: msg.c:54
+#: msg.c:62
#, c-format
msgid "cmd. line:"
msgstr "命令行:"
-#: msg.c:120
+#: msg.c:97
msgid "warning: "
msgstr "警告: "
-#: msg.c:142
+#: msg.c:106
msgid "error: "
msgstr "错误: "
-#: msg.c:178
+#: msg.c:129
msgid "fatal: "
msgstr "致命错误: "
-#: node.c:63 node.c:78 node.c:105 node.c:121 node.c:151
-msgid "can't convert string to float"
-msgstr "无法将字符串转化为浮点数"
-
-#: node.c:465
+#: node.c:401
msgid "backslash at end of string"
msgstr "字符串尾部的åæ–œæ "
-#: node.c:609
+#: node.c:502
#, c-format
msgid "old awk does not support the `\\%c' escape sequence"
msgstr "è€ awk ä¸æ”¯æŒâ€œ\\%câ€è½¬ä¹‰åºåˆ—"
-#: node.c:660
+#: node.c:553
msgid "POSIX does not allow `\\x' escapes"
msgstr "POSIX ä¸å…许“\\xâ€è½¬ä¹‰ç¬¦"
-#: node.c:666
+#: node.c:559
msgid "no hex digits in `\\x' escape sequence"
msgstr "“\\xâ€è½¬ä¹‰åºåˆ—中没有å六进制数"
-#: node.c:688
+#: node.c:581
#, c-format
msgid ""
"hex escape \\x%.*s of %d characters probably not interpreted the way you "
"expect"
msgstr ""
-#: node.c:703
+#: node.c:596
#, c-format
msgid "escape sequence `\\%c' treated as plain `%c'"
msgstr "转义åºåˆ—“\\%câ€è¢«å½“作å•çº¯çš„“%câ€"
+#: node.c:737
+msgid ""
+"Invalid multibyte data detected. There may be a mismatch between your data "
+"and your locale."
+msgstr ""
+
#: posix/gawkmisc.c:172
#, c-format
msgid "%s %s `%s': could not set close-on-exec: (fcntl: %s)"
msgstr "%s %s “%sâ€: 无法设置 close-on-exec: (fcntl: %s)"
-#: profile.c:94
+#: profile.c:83
#, c-format
msgid "could not open `%s' for writing: %s"
msgstr "无法以写模å¼æ‰“开“%sâ€: %s"
-#: profile.c:457
-#, c-format
-msgid "internal error: %s with null vname"
-msgstr "内部错误: %s 带有空的 vname"
-
-#: profile.c:522
-msgid "# treated internally as `delete'"
-msgstr "# 内部处ç†ä¸ºâ€œdeleteâ€"
-
-#: profile.c:1076
-#, c-format
-msgid "# this is a dynamically loaded extension function"
-msgstr "# 这是一个动æ€åŠ è½½çš„扩展函数"
-
-#: profile.c:1109
-#, c-format
-msgid "\t# gawk profile, created %s\n"
-msgstr "\t# gawk é…ç½®, 创建 %s\n"
-
-#: profile.c:1112
-#, c-format
-msgid ""
-"\t# BEGIN block(s)\n"
-"\n"
-msgstr ""
-"\t# BEGIN å—\n"
-"\n"
-
-#: profile.c:1122
+#: profile.c:203
#, fuzzy, c-format
msgid ""
-"\t# BEGINFILE block(s)\n"
+"\t# %s block(s)\n"
"\n"
msgstr ""
-"\t# BEGIN å—\n"
+"\t# END å—\n"
"\n"
-#: profile.c:1132
-#, c-format
+#: profile.c:208
+#, fuzzy, c-format
msgid ""
-"\t# Rule(s)\n"
+"\t# %s(s)\n"
"\n"
msgstr ""
"\t# 规则\n"
"\n"
-#: profile.c:1138
-#, fuzzy, c-format
-msgid ""
-"\t# ENDFILE block(s)\n"
-"\n"
-msgstr ""
-"\t# END å—\n"
-"\n"
+#: profile.c:278
+#, c-format
+msgid "internal error: %s with null vname"
+msgstr "内部错误: %s 带有空的 vname"
-#: profile.c:1148
+#: profile.c:945
#, c-format
-msgid ""
-"\t# END block(s)\n"
-"\n"
-msgstr ""
-"\t# END å—\n"
-"\n"
+msgid "\t# gawk profile, created %s\n"
+msgstr "\t# gawk é…ç½®, 创建 %s\n"
-#: profile.c:1168
+#: profile.c:1328
#, c-format
msgid ""
"\n"
@@ -1990,17 +1892,12 @@ msgstr ""
"\n"
"\t# 函数列表,字典åº\n"
-#: profile.c:1431
+#: profile.c:1367
#, c-format
-msgid "unexpected type %s in prec_level"
-msgstr "在 prec_level 中未预期的类型 %s"
-
-#: profile.c:1557
-#, fuzzy, c-format
-msgid "Unknown node type %s in pp_var"
-msgstr "未知的结点类型 %d"
+msgid "redir2str: unknown redirection type %d"
+msgstr ""
-#: re.c:537
+#: re.c:559
#, c-format
msgid "regexp component `%.*s' should probably be `[%.*s]'"
msgstr ""
@@ -2073,18 +1970,40 @@ msgstr "正则表达å¼è¿‡å¤§"
msgid "Unmatched ) or \\)"
msgstr "未匹é…çš„ ) 或 \\)"
-#: regcomp.c:699
+#: regcomp.c:701
msgid "No previous regular expression"
msgstr "å‰é¢æ²¡æœ‰æ­£åˆ™è¡¨è¾¾å¼"
-#~ msgid "%s: illegal option -- %c\n"
-#~ msgstr "%s: éžæ³•é€‰é¡¹ -- %c\n"
+#~ msgid "call of `length' without parentheses is deprecated by POSIX"
+#~ msgstr "POSIX 认为ä¸å¸¦æ‹¬å·è°ƒç”¨â€œlengthâ€æ˜¯å·²è¿‡æ—¶çš„"
+
+#, fuzzy
+#~ msgid "reference to uninitialized field `$%s'"
+#~ msgstr "引用未åˆå§‹åŒ–的字段“$%dâ€"
+
+#~ msgid "can't convert string to float"
+#~ msgstr "无法将字符串转化为浮点数"
+
+#~ msgid "`continue' outside a loop is not portable"
+#~ msgstr "“continueâ€åœ¨å¾ªçŽ¯å¤–使用是ä¸å¯ç§»æ¤çš„"
+
+#~ msgid "`break' outside a loop is not portable"
+#~ msgstr "“breakâ€åœ¨å¾ªçŽ¯å¤–使用是ä¸å¯ç§»æ¤çš„"
+
+#~ msgid "`nextfile' cannot be called from a BEGIN rule"
+#~ msgstr "在 BEGIN 规则中ä¸å…许调用“nextfileâ€"
+
+#~ msgid "`next' cannot be called from a BEGIN rule"
+#~ msgstr "在 BEGIN 规则中ä¸å…许调用“nextâ€"
#~ msgid "file `%s' is a directory"
#~ msgstr "文件“%sâ€æ˜¯ä¸€ä¸ªç›®å½•"
-#~ msgid "can't open two way socket `%s' for input/output (%s)"
-#~ msgstr "无法为输入/输出打开åŒå‘端å£â€œ%sâ€(%s)"
+#~ msgid "use `PROCINFO[\"%s\"]' instead of `%s'"
+#~ msgstr "使用“PROCINFO[\"%s\"]â€è€Œä¸æ˜¯â€œ%sâ€"
+
+#~ msgid "use `PROCINFO[...]' instead of `/dev/user'"
+#~ msgstr "使用“PROCINFO[...]â€è€Œä¸æ˜¯â€œ/dev/userâ€"
#~ msgid "\t-W compat\t\t--compat\n"
#~ msgstr "\t-W compat\t\t--compat\n"
@@ -2092,30 +2011,113 @@ msgstr "å‰é¢æ²¡æœ‰æ­£åˆ™è¡¨è¾¾å¼"
#~ msgid "\t-W copyleft\t\t--copyleft\n"
#~ msgstr "\t-W copyleft\t\t--copyleft\n"
-#~ msgid "\t-W traditional\t\t--traditional\n"
-#~ msgstr "\t-W traditional\t\t--traditional\n"
-
#~ msgid "\t-W usage\t\t--usage\n"
#~ msgstr "\t-W usage\t\t--usage\n"
-#, fuzzy
-#~ msgid "seek: invalid arguments"
-#~ msgstr "printf: 没有å‚æ•°"
+#~ msgid ""
+#~ "\t# BEGIN block(s)\n"
+#~ "\n"
+#~ msgstr ""
+#~ "\t# BEGIN å—\n"
+#~ "\n"
-#, fuzzy
-#~ msgid "seek: `%.*s' is not an open file, pipe, or co-process"
-#~ msgstr "close: “%.*sâ€ä¸æ˜¯ä¸€ä¸ªå·²æ‰“开文件ã€ç®¡é“或åˆä½œè¿›ç¨‹"
+#~ msgid "must use `count$' on all formats or none"
+#~ msgstr "è¦ä¹ˆåœ¨æ‰€æœ‰æ ¼å¼ä¸Šä½¿ç”¨â€œcount$â€ï¼Œè¦ä¹ˆå®Œå…¨ä¸ä½¿ç”¨"
+
+#~ msgid "field width is ignored for `%%%%' specifier"
+#~ msgstr "“%%%%â€çš„字段宽度被忽略"
+
+#~ msgid "precision is ignored for `%%%%' specifier"
+#~ msgstr "“%%%%â€çš„精度被忽略"
+
+#~ msgid "field width and precision are ignored for `%%%%' specifier"
+#~ msgstr "“%%%%â€çš„字段宽度和精度被忽略"
+
+#~ msgid "`$' is not permitted in awk formats"
+#~ msgstr "awk æ ¼å¼ä¸­ä¸å…许 “$â€"
+
+#~ msgid "arg count with `$' must be > 0"
+#~ msgstr "å«æœ‰â€œ$â€çš„å‚数个数必须大于0"
+
+#~ msgid "arg count %ld greater than total number of supplied arguments"
+#~ msgstr "å‚数个数 %ld 大于æ供的å‚数总个数"
+
+#~ msgid "`$' not permitted after period in format"
+#~ msgstr "æ ¼å¼ä¸å…许在“.â€åŽä½¿ç”¨â€œ$â€"
+
+#~ msgid "no `$' supplied for positional field width or precision"
+#~ msgstr "没有为格å¼å®½åº¦æˆ–精度æ供“$â€"
+
+#~ msgid "`l' is meaningless in awk formats; ignored"
+#~ msgstr "“lâ€åœ¨ awk æ ¼å¼ä¸­æ— æ„义;忽略"
+
+#~ msgid "`l' is not permitted in POSIX awk formats"
+#~ msgstr "“lâ€ä¸å…许在 POSIX awk æ ¼å¼ä¸­ä½¿ç”¨"
+
+#~ msgid "`L' is meaningless in awk formats; ignored"
+#~ msgstr "“Lâ€åœ¨ awk æ ¼å¼ä¸­æ— æ„义;忽略"
+
+#~ msgid "`L' is not permitted in POSIX awk formats"
+#~ msgstr "“Lâ€ä¸å…许在 POSIX awk æ ¼å¼ä¸­ä½¿ç”¨"
+
+#~ msgid "`h' is meaningless in awk formats; ignored"
+#~ msgstr "“hâ€åœ¨ awk æ ¼å¼ä¸­æ— æ„义;忽略"
+
+#~ msgid "`h' is not permitted in POSIX awk formats"
+#~ msgstr "“hâ€ä¸å…许在 POSIX awk æ ¼å¼ä¸­ä½¿ç”¨"
+
+#~ msgid "[s]printf: value %g is out of range for `%%%c' format"
+#~ msgstr "[s]printf: 值 %g 对“%%%câ€æ ¼å¼æ¥è¯´è¶…出范围"
+
+#~ msgid ""
+#~ "ignoring unknown format specifier character `%c': no argument converted"
+#~ msgstr "忽略ä½ç½®çš„æ ¼å¼åŒ–字符“%câ€: æ— å‚数被转化"
+
+#~ msgid "not enough arguments to satisfy format string"
+#~ msgstr "相对格å¼æ¥è¯´å‚数个数ä¸è¶³"
+
+#~ msgid "^ ran out for this one"
+#~ msgstr "^ 跑出范围"
+
+#~ msgid "[s]printf: format specifier does not have control letter"
+#~ msgstr "[s]printf: 指定格å¼ä¸å«æŽ§åˆ¶å­—符"
+
+#~ msgid "too many arguments supplied for format string"
+#~ msgstr "相对格å¼æ¥è¯´å‚数个数过多"
#, fuzzy
-#~ msgid "seek: `%.*s' is not an input file, pipe, or co-process"
-#~ msgstr "close: “%.*sâ€ä¸æ˜¯ä¸€ä¸ªå·²æ‰“开文件ã€ç®¡é“或åˆä½œè¿›ç¨‹"
+#~ msgid "attempt to use array parameter `%s' in a scalar context"
+#~ msgstr "试图在标é‡çŽ¯å¢ƒä¸­ä½¿ç”¨æ•°ç»„“%sâ€"
+
+#~ msgid "can't open two way socket `%s' for input/output (%s)"
+#~ msgstr "无法为输入/输出打开åŒå‘端å£â€œ%sâ€(%s)"
+
+#~ msgid "length: untyped argument will be forced to scalar"
+#~ msgstr "length: 无类型的å‚数会被强制转æ¢ä¸ºæ ‡é‡"
+
+#~ msgid ""
+#~ "concatenation: side effects in one expression have changed the length of "
+#~ "another!"
+#~ msgstr "concatenation: 一个表达å¼çš„é¢å¤–效应已改å˜å¦ä¸€ä¸ªçš„长度ï¼"
+
+#~ msgid "illegal type (%s) in tree_eval"
+#~ msgstr "tree_eval 中的éžæ³•ç±»åž‹ (%s)"
+
+#~ msgid "\t# -- main --\n"
+#~ msgstr "\t# -- main --\n"
+
+#~ msgid "invalid tree type %s in redirect()"
+#~ msgstr "在 redirect() 中的无效的树类型 %s"
#, fuzzy
-#~ msgid "seek: `%.*s' is not a regular file"
-#~ msgstr "“%sâ€ä¸æ˜¯ä¸€ä¸ªåˆæ³•çš„å˜é‡å"
+#~ msgid "# treated internally as `delete'"
+#~ msgstr "# 内部处ç†ä¸ºâ€œdeleteâ€"
-#~ msgid "use `PROCINFO[\"%s\"]' instead of `%s'"
-#~ msgstr "使用“PROCINFO[\"%s\"]â€è€Œä¸æ˜¯â€œ%sâ€"
+#~ msgid "# this is a dynamically loaded extension function"
+#~ msgstr "# 这是一个动æ€åŠ è½½çš„扩展函数"
-#~ msgid "use `PROCINFO[...]' instead of `/dev/user'"
-#~ msgstr "使用“PROCINFO[...]â€è€Œä¸æ˜¯â€œ/dev/userâ€"
+#~ msgid "unexpected type %s in prec_level"
+#~ msgstr "在 prec_level 中未预期的类型 %s"
+
+#~ msgid "Unknown node type %s in pp_var"
+#~ msgstr "pp_var 中的未知的结点类型 %s"
diff --git a/posix/gawkmisc.c b/posix/gawkmisc.c
index 08551da5..7fb5f1ef 100644
--- a/posix/gawkmisc.c
+++ b/posix/gawkmisc.c
@@ -222,6 +222,14 @@ int fd;
/* no-op */
return;
}
+
+/* files_are_same --- return true if files are identical */
+
+int
+files_are_same(struct stat *f1, struct stat *f2)
+{
+ return (f1->st_dev == f2->st_dev && f1->st_ino == f2->st_ino);
+}
#ifdef __CYGWIN__
#include <stdio.h>
diff --git a/profile.c b/profile.c
index 26df9de9..f307786d 100644
--- a/profile.c
+++ b/profile.c
@@ -1,5 +1,5 @@
/*
- * profile.c - gawk parse tree pretty-printer with counts
+ * profile.c - gawk bytecode pretty-printer with counts
*/
/*
@@ -25,47 +25,37 @@
#include "awk.h"
-/* where to place redirections for getline, print, printf */
-enum redir_placement {
- BEFORE = 0,
- AFTER = 1
-};
-
-#undef tree_eval
-static void tree_eval P((NODE *tree));
-static void parenthesize P((NODETYPE parent_type, NODE *tree));
-static void parenthesize_expr P((NODETYPE parent_type, NODE *tree));
-static void eval_condition P((NODE *tree));
-static void pp_op_assign P((NODE *tree));
-static void pp_func_call P((NODE *tree));
-static void pp_match_op P((NODE *tree));
-static void pp_lhs P((NODE *ptr));
-static void pp_print_stmt P((const char *command, NODE *tree));
-static void pp_delete P((NODE *tree));
-static void pp_in_array P((NODE *array, NODE *subscript));
-static void pp_getline P((NODE *tree));
-static void pp_builtin P((NODE *tree));
-static void pp_list P((NODE *tree));
-static void pp_string P((const char *str, size_t len, int delim));
-static void pp_concat P((NODE *tree, int level));
-static void pp_var P((NODE *tree));
-static int is_scalar P((NODETYPE type));
-static int prec_level P((NODETYPE type));
+static void pprint(INSTRUCTION *startp, INSTRUCTION *endp, int in_for_header);
+static void pp_parenthesize(NODE *n);
+static void parenthesize(int type, NODE *left, NODE *right);
+static char *pp_list(int nargs, const char *paren, const char *delim);
+static char *pp_concat(const char *s1, const char *s2, const char *s3);
+static int is_binary(int type);
+static int prec_level(int type);
+static void pp_push(int type, char *s, int flag);
+static NODE *pp_pop(void);
+static void pp_free(NODE *n);
+const char *redir2str(int redirtype);
+
+#define pp_str hname
+#define pp_len hlength
+
+#define DONT_FREE 1
+#define CAN_FREE 2
+
#ifdef PROFILING
-static RETSIGTYPE dump_and_exit P((int signum)) ATTRIBUTE_NORETURN;
-static RETSIGTYPE just_dump P((int signum));
+static RETSIGTYPE dump_and_exit(int signum) ATTRIBUTE_NORETURN;
+static RETSIGTYPE just_dump(int signum);
#endif
/* pretty printing related functions and variables */
+static NODE *pp_stack = NULL;
static char **fparms; /* function parameter names */
static FILE *prof_fp; /* where to send the profile */
static long indent_level = 0;
-static int in_BEGIN_or_END = FALSE;
-
-static int in_expr = FALSE;
#define SPACEOVER 0
@@ -88,7 +78,6 @@ void
set_prof_file(const char *file)
{
assert(file != NULL);
-
prof_fp = fopen(file, "w");
if (prof_fp == NULL) {
warning(_("could not open `%s' for writing: %s"),
@@ -126,13 +115,13 @@ indent(long count)
int i;
if (count == 0)
- putc('\t', prof_fp);
+ fprintf(prof_fp, "\t");
else
fprintf(prof_fp, "%6ld ", count);
assert(indent_level >= 0);
for (i = 0; i < indent_level; i++)
- putc('\t', prof_fp);
+ fprintf(prof_fp, "\t");
}
/* indent_in --- increase the level, with error checking */
@@ -153,944 +142,791 @@ indent_out(void)
assert(indent_level >= 0);
}
+static void
+pp_push(int type, char *s, int flag)
+{
+ NODE *n;
+ getnode(n);
+ n->pp_str = s;
+ n->pp_len = strlen(s);
+ n->flags = flag;
+ n->type = type;
+ n->hnext = pp_stack;
+ pp_stack = n;
+}
+
+static NODE *
+pp_pop()
+{
+ NODE *n;
+ n = pp_stack;
+ pp_stack = n->hnext;
+ return n;
+}
+
+static void
+pp_free(NODE *n)
+{
+ if ((n->flags & CAN_FREE) != 0)
+ efree(n->pp_str);
+ freenode(n);
+}
+
/*
- * pprint:
- * Tree is a bunch of rules to run. Returns zero if it hit an exit()
- * statement
+ * pprint --- pretty print a program segment
*/
+
static void
-pprint(register NODE *volatile tree)
+pprint(INSTRUCTION *startp, INSTRUCTION *endp, int in_for_header)
{
- register NODE *volatile t = NULL; /* temporary */
- int volatile traverse = TRUE; /* True => loop thru tree (Node_rule_list) */
-
- /* avoid false source indications */
- source = NULL;
- sourceline = 0;
-
- if (tree == NULL)
- return;
- sourceline = tree->source_line;
- source = tree->source_file;
- switch (tree->type) {
- case Node_rule_node:
- traverse = FALSE; /* False => one for-loop iteration only */
- /* FALL THROUGH */
- case Node_rule_list:
- for (t = tree; t != NULL; t = t->rnode) {
- if (traverse)
- tree = t->lnode;
- sourceline = tree->source_line;
- source = tree->source_file;
-
- if (! in_BEGIN_or_END)
- indent(tree->exec_count);
-
- if (tree->lnode) {
- eval_condition(tree->lnode);
- if (tree->rnode)
- fprintf(prof_fp, "\t");
- }
-
- if (tree->rnode) {
- if (! in_BEGIN_or_END) {
- fprintf(prof_fp, "{");
+ INSTRUCTION *pc;
+ NODE *t1;
+ char *str;
+ NODE *t2;
+ INSTRUCTION *ip;
+ NODE *m;
+ char *tmp;
+ int rule;
+ static int rule_count[MAXRULE];
+
+ for (pc = startp; pc != endp; pc = pc->nexti) {
+ if (pc->source_line > 0)
+ sourceline = pc->source_line;
+
+ switch (pc->opcode) {
+ case Op_rule:
+ source = pc->source_file;
+ rule = pc->in_rule;
+
+ if (rule != Rule) {
+ if (! rule_count[rule]++)
+ fprintf(prof_fp, _("\t# %s block(s)\n\n"), ruletab[rule]);
+ fprintf(prof_fp, "\t%s {\n", ruletab[rule]);
+ ip = (pc + 1)->firsti;
+ } else {
+ if (! rule_count[rule]++)
+ fprintf(prof_fp, _("\t# %s(s)\n\n"), ruletab[rule]);
+ ip = pc->nexti;
+ indent(ip->exec_count);
+ if (ip != (pc + 1)->firsti) { /* non-empty pattern */
+ pprint(ip->nexti, (pc + 1)->firsti, FALSE);
+ t1 = pp_pop();
+ fprintf(prof_fp, "%s {", t1->pp_str);
+ pp_free(t1);
+ ip = (pc + 1)->firsti;
#ifdef PROFILING
- if (tree->lnode != NULL
- && tree->lnode->exec_count)
- fprintf(prof_fp, " # %ld",
- tree->lnode->exec_count);
+ if (ip->exec_count > 0)
+ fprintf(prof_fp, " # %ld", ip->exec_count);
#endif
fprintf(prof_fp, "\n");
+ } else {
+ fprintf(prof_fp, "{\n");
+ ip = (pc + 1)->firsti;
}
- indent_in();
- pprint(tree->rnode);
- indent_out();
- if (! in_BEGIN_or_END) {
- indent(SPACEOVER);
- fprintf(prof_fp, "}\n");
+ ip = ip->nexti;
+ }
+ indent_in();
+ pprint(ip, (pc + 1)->lasti, FALSE);
+ indent_out();
+ fprintf(prof_fp, "\t}\n\n");
+ pc = (pc + 1)->lasti;
+ break;
+
+ case Op_atexit:
+ break;
+
+ case Op_stop:
+ memset(rule_count, 0, MAXRULE * sizeof(int));
+ break;
+
+ case Op_push_i:
+ m = pc->memory;
+ if (m == Nnull_string) /* optional return or exit value; don't print 0 or "" */
+ pp_push(pc->opcode, m->stptr, DONT_FREE);
+ else if ((m->flags & NUMBER) != 0)
+ pp_push(pc->opcode, pp_number(m->numbr), CAN_FREE);
+ else {
+ str = pp_string(m->stptr, m->stlen, '"');
+ if ((m->flags & INTLSTR) != 0) {
+ char *tmp = str;
+ str = pp_concat("_", tmp, "");
+ efree(tmp);
}
+ pp_push(pc->opcode, str, CAN_FREE);
+ }
+ break;
+
+ case Op_store_var:
+ case Op_store_sub:
+ case Op_assign_concat:
+ case Op_push_lhs:
+ case Op_push_param:
+ case Op_push_array:
+ case Op_push:
+ m = pc->memory;
+ switch (m->type) {
+ case Node_param_list:
+ pp_push(pc->opcode, fparms[m->param_cnt], DONT_FREE);
+ break;
+
+ case Node_var:
+ case Node_var_new:
+ case Node_var_array:
+ if (m->vname != NULL)
+ pp_push(pc->opcode, m->vname, DONT_FREE);
+ else
+ fatal(_("internal error: %s with null vname"),
+ nodetype2str(m->type));
+ break;
+
+ default:
+ cant_happen();
}
- if (! traverse) /* case Node_rule_node */
- break; /* don't loop */
-
- if (t->rnode && ! in_BEGIN_or_END)
- fprintf(prof_fp, "\n");
- }
- break;
+ switch (pc->opcode) {
+ case Op_store_var:
+ t2 = pp_pop(); /* l.h.s. */
+ t1 = pp_pop(); /* r.h.s. */
+ fprintf(prof_fp, "%s%s%s", t2->pp_str, op2str(pc->opcode), t1->pp_str);
+ goto cleanup;
+
+ case Op_store_sub:
+ t1 = pp_pop(); /* array */
+ tmp = pp_list(pc->expr_count, op2str(Op_subscript), ", "); /*subscript*/
+ t2 = pp_pop(); /* r.h.s. */
+ fprintf(prof_fp, "%s%s%s%s", t1->pp_str, tmp,
+ op2str(pc->opcode), t2->pp_str);
+ efree(tmp);
+ goto cleanup;
+
+ case Op_assign_concat:
+ t2 = pp_pop(); /* l.h.s. */
+ t1 = pp_pop();
+ tmp = pp_concat(t2->pp_str, op2str(Op_concat), t1->pp_str);
+ fprintf(prof_fp, "%s%s%s", t2->pp_str, op2str(Op_assign), tmp);
+ efree(tmp);
+cleanup:
+ pp_free(t2);
+ pp_free(t1);
+ if (! in_for_header)
+ fprintf(prof_fp, "\n");
+ break;
- case Node_statement_list:
- for (t = tree; t != NULL; t = t->rnode) {
- pprint(t->lnode);
- }
- break;
-
- case Node_K_if:
- indent(tree->exec_count);
- fprintf(prof_fp, "if (");
- in_expr++;
- eval_condition(tree->lnode);
- in_expr--;
- fprintf(prof_fp, ") {");
-#ifdef PROFILING
- if (tree->rnode->exec_count)
- fprintf(prof_fp, " # %ld", tree->rnode->exec_count);
-#endif
- fprintf(prof_fp, "\n");
- indent_in();
- pprint(tree->rnode->lnode);
- indent_out();
- if (tree->rnode->rnode != NULL) {
- if (tree->exec_count - tree->rnode->exec_count > 0)
- indent(tree->exec_count - tree->rnode->exec_count);
+ default:
+ break;
+ }
+ break;
+
+ case Op_sub_array:
+ case Op_subscript_lhs:
+ case Op_subscript:
+ tmp = pp_list(pc->sub_count, op2str(pc->opcode), ", ");
+ t1 = pp_pop();
+ str = pp_concat(t1->pp_str, tmp, "");
+ efree(tmp);
+ pp_free(t1);
+ pp_push(pc->opcode, str, CAN_FREE);
+ break;
+
+ case Op_and:
+ case Op_or:
+ pprint(pc->nexti, pc->target_jmp, in_for_header);
+ t2 = pp_pop();
+ t1 = pp_pop();
+ parenthesize(pc->opcode, t1, t2);
+ str = pp_concat(t1->pp_str, op2str(pc->opcode), t2->pp_str);
+ pp_free(t1);
+ pp_free(t2);
+ pp_push(pc->opcode, str, CAN_FREE);
+ pc = pc->target_jmp;
+ break;
+
+ case Op_plus_i:
+ case Op_minus_i:
+ case Op_times_i:
+ case Op_exp_i:
+ case Op_quotient_i:
+ case Op_mod_i:
+ m = pc->memory;
+ t1 = pp_pop();
+ if (prec_level(pc->opcode) > prec_level(t1->type)
+ && is_binary(t1->type)) /* (a - b) * 1 */
+ pp_parenthesize(t1);
+ if ((m->flags & NUMBER) != 0)
+ tmp = pp_number(m->numbr);
else
- indent(0);
- fprintf(prof_fp, "} else {\n");
- indent_in();
- pprint(tree->rnode->rnode);
- indent_out();
+ tmp = pp_string(m->stptr, m->stlen, '"');
+ str = pp_concat(t1->pp_str, op2str(pc->opcode), tmp);
+ efree(tmp);
+ pp_free(t1);
+ pp_push(pc->opcode, str, CAN_FREE);
+ break;
+
+ case Op_plus:
+ case Op_minus:
+ case Op_times:
+ case Op_exp:
+ case Op_quotient:
+ case Op_mod:
+ case Op_equal:
+ case Op_notequal:
+ case Op_less:
+ case Op_greater:
+ case Op_leq:
+ case Op_geq:
+ t2 = pp_pop();
+ t1 = pp_pop();
+ parenthesize(pc->opcode, t1, t2);
+ str = pp_concat(t1->pp_str, op2str(pc->opcode), t2->pp_str);
+ pp_free(t1);
+ pp_free(t2);
+ pp_push(pc->opcode, str, CAN_FREE);
+ break;
+
+ case Op_preincrement:
+ case Op_predecrement:
+ case Op_postincrement:
+ case Op_postdecrement:
+ t1 = pp_pop();
+ if (pc->opcode == Op_preincrement || pc->opcode == Op_predecrement)
+ str = pp_concat(op2str(pc->opcode), t1->pp_str, "");
+ else
+ str = pp_concat(t1->pp_str, op2str(pc->opcode), "");
+ pp_free(t1);
+ pp_push(pc->opcode, str, CAN_FREE);
+ break;
+
+ case Op_field_spec:
+ case Op_field_spec_lhs:
+ case Op_unary_minus:
+ case Op_not:
+ t1 = pp_pop();
+ if (is_binary(t1->type))
+ pp_parenthesize(t1);
+
+ /* optypes table (eval.c) includes space after ! */
+ str = pp_concat(op2str(pc->opcode), t1->pp_str, "");
+ pp_free(t1);
+ pp_push(pc->opcode, str, CAN_FREE);
+ break;
+
+ case Op_assign:
+ case Op_assign_plus:
+ case Op_assign_minus:
+ case Op_assign_times:
+ case Op_assign_quotient:
+ case Op_assign_mod:
+ case Op_assign_exp:
+ t2 = pp_pop(); /* l.h.s. */
+ t1 = pp_pop();
+ str = pp_concat(t2->pp_str, op2str(pc->opcode), t1->pp_str);
+ pp_free(t2);
+ pp_free(t1);
+ pp_push(pc->opcode, str, CAN_FREE);
+ break;
+
+ case Op_store_field:
+ t1 = pp_pop(); /* field num */
+ if (is_binary(t1->type))
+ pp_parenthesize(t1);
+ t2 = pp_pop(); /* r.h.s. */
+ fprintf(prof_fp, "$%s%s%s", t1->pp_str, op2str(pc->opcode), t2->pp_str);
+ pp_free(t2);
+ pp_free(t1);
+ if (! in_for_header)
+ fprintf(prof_fp, "\n");
+ break;
+
+ case Op_concat:
+ str = pp_list(pc->expr_count, NULL,
+ (pc->concat_flag & CSUBSEP) ? ", " : op2str(Op_concat));
+ pp_push(Op_concat, str, CAN_FREE);
+ break;
+
+ case Op_K_delete:
+ {
+ char *array;
+ t1 = pp_pop();
+ array = t1->pp_str;
+ if (pc->expr_count > 0) {
+ char *sub;
+ sub = pp_list(pc->expr_count, NULL, ", ");
+ fprintf(prof_fp, "%s %s[%s]", op2str(Op_K_delete), array, sub);
+ efree(sub);
+ } else
+ fprintf(prof_fp, "%s %s", op2str(Op_K_delete), array);
+ if (! in_for_header)
+ fprintf(prof_fp, "\n");
+ pp_free(t1);
}
- indent(SPACEOVER);
- fprintf(prof_fp, "}\n");
- break;
-
- case Node_K_switch:
- indent(tree->exec_count);
- fprintf(prof_fp, "switch (");
- in_expr++;
- pprint(tree->lnode);
- in_expr--;
- fprintf(prof_fp, ") {\n");
- pprint(tree->rnode);
- indent(SPACEOVER);
- fprintf(prof_fp, "}\n");
- break;
-
- case Node_switch_body:
- pprint(tree->lnode);
- break;
-
- case Node_case_list:
- pprint(tree->lnode);
- pprint(tree->rnode);
- break;
-
- case Node_K_case:
- indent(tree->exec_count);
- fprintf(prof_fp, "case ");
- in_expr++;
- pprint(tree->lnode);
- in_expr--;
- fprintf(prof_fp, ":\n");
- indent_in();
- pprint(tree->rnode);
- indent_out();
- break;
-
- case Node_K_default:
- indent(tree->exec_count);
- fprintf(prof_fp, "default:\n");
- indent_in();
- pprint(tree->rnode);
- indent_out();
- break;
-
- case Node_K_while:
- indent(tree->exec_count);
- fprintf(prof_fp, "while (");
- in_expr++;
- eval_condition(tree->lnode);
- in_expr--;
- fprintf(prof_fp, ") {\n");
- indent_in();
- pprint(tree->rnode);
- indent_out();
- indent(SPACEOVER);
- fprintf(prof_fp, "}\n");
- break;
-
- case Node_K_do:
- indent(tree->exec_count);
- fprintf(prof_fp, "do {\n");
- indent_in();
- pprint(tree->rnode);
- indent_out();
- indent(SPACEOVER);
- fprintf(prof_fp, "} while (");
- in_expr++;
- eval_condition(tree->lnode);
- in_expr--;
- fprintf(prof_fp, ")\n");
- break;
-
- case Node_K_for:
- indent(tree->exec_count);
- fprintf(prof_fp, "for (");
- in_expr++;
- pprint(tree->forloop->init);
- fprintf(prof_fp, "; ");
- eval_condition(tree->forloop->cond);
- fprintf(prof_fp, "; ");
- pprint(tree->forloop->incr);
- fprintf(prof_fp, ") {\n");
- in_expr--;
- indent_in();
- pprint(tree->lnode);
- indent_out();
- indent(SPACEOVER);
- fprintf(prof_fp, "}\n");
- break;
-
- case Node_K_arrayfor:
-#define hakvar forloop->init
-#define arrvar forloop->incr
- indent(tree->exec_count);
- fprintf(prof_fp, "for (");
- in_expr++;
- pp_lhs(tree->hakvar);
- in_expr--;
- fprintf(prof_fp, " in ");
- t = tree->arrvar;
- if (t->type == Node_param_list)
- fprintf(prof_fp, "%s", fparms[t->param_cnt]);
- else
- fprintf(prof_fp, "%s", t->vname);
- fprintf(prof_fp, ") {\n");
- indent_in();
- pprint(tree->lnode);
- indent_out();
- indent(SPACEOVER);
- fprintf(prof_fp, "}\n");
- break;
-#undef hakvar
-#undef arrvar
-
- case Node_K_break:
- indent(tree->exec_count);
- fprintf(prof_fp, "break\n");
- break;
-
- case Node_K_continue:
- indent(tree->exec_count);
- fprintf(prof_fp, "continue\n");
- break;
-
- case Node_K_print:
- case Node_K_print_rec:
- pp_print_stmt("print", tree);
- break;
-
- case Node_K_printf:
- pp_print_stmt("printf", tree);
- break;
-
- case Node_K_delete:
- pp_delete(tree);
- break;
-
- case Node_K_next:
- indent(tree->exec_count);
- fprintf(prof_fp, "next\n");
- break;
-
- case Node_K_nextfile:
- indent(tree->exec_count);
- fprintf(prof_fp, "nextfile\n");
- break;
-
- case Node_K_exit:
- indent(tree->exec_count);
- fprintf(prof_fp, "exit");
- if (tree->lnode != NULL) {
- fprintf(prof_fp, " ");
- tree_eval(tree->lnode);
+ break;
+
+ case Op_K_delete_loop:
+ /* Efficency hack not in effect because of exec_count instruction */
+ cant_happen();
+ break;
+
+ case Op_in_array:
+ {
+ char *array, *sub;
+ t1 = pp_pop();
+ array = t1->pp_str;
+ if (pc->expr_count > 1) {
+ sub = pp_list(pc->expr_count, "()", ", ");
+ str = pp_concat(sub, op2str(Op_in_array), array);
+ efree(sub);
+ } else {
+ t2 = pp_pop();
+ sub = t2->pp_str;
+ str = pp_concat(sub, op2str(Op_in_array), array);
+ pp_free(t2);
+ }
+ pp_free(t1);
+ pp_push(Op_in_array, str, CAN_FREE);
}
- fprintf(prof_fp, "\n");
- break;
-
- case Node_K_return:
- indent(tree->exec_count);
- fprintf(prof_fp, "return");
- if (tree->lnode != NULL) {
- fprintf(prof_fp, " ");
- tree_eval(tree->lnode);
+ break;
+
+ case Op_var_update:
+ case Op_var_assign:
+ case Op_field_assign:
+ case Op_arrayfor_init:
+ case Op_arrayfor_incr:
+ case Op_arrayfor_final:
+ case Op_newfile:
+ case Op_get_record:
+ case Op_lint:
+ case Op_pop_loop:
+ case Op_jmp:
+ case Op_jmp_false:
+ case Op_jmp_true:
+ case Op_no_op:
+ case Op_and_final:
+ case Op_or_final:
+ case Op_cond_pair:
+ case Op_after_beginfile:
+ case Op_after_endfile:
+ break;
+
+ case Op_builtin:
+ {
+ static char *ext_func = "extension_function()";
+ const char *fname = getfname(pc->builtin);
+ if (fname != NULL) {
+ if (pc->expr_count > 0) {
+ tmp = pp_list(pc->expr_count, "()", ", ");
+ str = pp_concat(fname, tmp, "");
+ efree(tmp);
+ } else
+ str = pp_concat(fname, "()", "");
+ pp_push(Op_builtin, str, CAN_FREE);
+ } else
+ pp_push(Op_builtin, ext_func, DONT_FREE);
}
- fprintf(prof_fp, "\n");
- break;
-
- default:
- /*
- * Appears to be an expression statement.
- * Throw away the value.
- */
- if (in_expr)
- tree_eval(tree);
- else {
- indent(tree->exec_count);
- tree_eval(tree);
- fprintf(prof_fp, "\n");
+ break;
+
+ case Op_K_print:
+ case Op_K_printf:
+ case Op_K_print_rec:
+ if (pc->opcode == Op_K_print_rec)
+ tmp = pp_concat(" ", op2str(Op_field_spec), "0");
+ else if (pc->redir_type != 0)
+ tmp = pp_list(pc->expr_count, "()", ", ");
+ else {
+ tmp = pp_list(pc->expr_count, " ", ", ");
+ tmp[strlen(tmp) - 1] = '\0'; /* remove trailing space */
+ }
+
+ if (pc->redir_type != 0) {
+ t1 = pp_pop();
+ if (is_binary(t1->type))
+ pp_parenthesize(t1);
+ fprintf(prof_fp, "%s%s%s%s", op2str(pc->opcode),
+ tmp, redir2str(pc->redir_type), t1->pp_str);
+ pp_free(t1);
+ } else
+ fprintf(prof_fp, "%s%s", op2str(pc->opcode), tmp);
+ efree(tmp);
+ if (! in_for_header)
+ fprintf(prof_fp, "\n");
+ break;
+
+ case Op_push_re:
+ if (pc->memory->type != Node_regex)
+ break;
+ /* else
+ fall through */
+ case Op_match_rec:
+ {
+ NODE *re = pc->memory->re_exp;
+ str = pp_string(re->stptr, re->stlen, '/');
+ pp_push(pc->opcode, str, CAN_FREE);
}
- break;
- }
-}
-
-/* tree_eval --- evaluate a subtree */
-
-static void
-tree_eval(register NODE *tree)
-{
- if (tree == NULL)
- return;
-
- switch (tree->type) {
- case Node_param_list:
- fprintf(prof_fp, "%s", fparms[tree->param_cnt]);
- return;
-
- case Node_var_new:
- case Node_var:
- case Node_var_array:
- if (tree->vname != NULL)
- fprintf(prof_fp, "%s", tree->vname);
- else
- fatal(_("internal error: %s with null vname"),
- nodetype2str(tree->type));
- return;
-
- case Node_val:
- if ((tree->flags & NUMBER) != 0)
- fprintf(prof_fp, "%g", tree->numbr);
- else {
- if ((tree->flags & INTLSTR) != 0)
- fprintf(prof_fp, "_");
- pp_string(tree->stptr, tree->stlen, '"');
+ break;
+
+ case Op_nomatch:
+ case Op_match:
+ {
+ char *restr, *txt;
+ t1 = pp_pop();
+ if (is_binary(t1->type))
+ pp_parenthesize(t1);
+ txt = t1->pp_str;
+ m = pc->memory;
+ if (m->type == Node_dynregex) {
+ restr = txt;
+ t2 = pp_pop();
+ if (is_binary(t2->type))
+ pp_parenthesize(t2);
+ txt = t2->pp_str;
+ str = pp_concat(txt, op2str(pc->opcode), restr);
+ pp_free(t2);
+ } else {
+ NODE *re = m->re_exp;
+ restr = pp_string(re->stptr, re->stlen, '/');
+ str = pp_concat(txt, op2str(pc->opcode), restr);
+ efree(restr);
+ }
+ pp_free(t1);
+ pp_push(pc->opcode, str, CAN_FREE);
}
- return;
-
- case Node_and:
- parenthesize_expr(Node_and, tree->lnode);
- fprintf(prof_fp, " && ");
- parenthesize_expr(Node_and, tree->rnode);
- return;
-
- case Node_or:
- parenthesize_expr(Node_or, tree->lnode);
- fprintf(prof_fp, " || ");
- parenthesize_expr(Node_or, tree->rnode);
- return;
-
- case Node_not:
- fprintf(prof_fp, "! ");
- parenthesize(tree->type, tree->lnode);
- return;
-
- /* Builtins */
- case Node_builtin:
- pp_builtin(tree);
- return;
-
- case Node_in_array:
- in_expr++;
- pp_in_array(tree->lnode, tree->rnode);
- in_expr--;
- return;
-
- case Node_func_call:
- case Node_indirect_func_call:
- pp_func_call(tree);
- return;
-
- case Node_K_getline:
- pp_getline(tree);
- return;
-
- case Node_K_delete_loop:
- {
- char *aname;
- NODE *t;
-
- t = tree->lnode;
- if (t->type == Node_param_list)
- aname = fparms[t->param_cnt];
- else
- aname = t->vname;
-
- fprintf(prof_fp, "for (");
- pp_lhs(tree->rnode->lnode);
- fprintf(prof_fp, " in %s) { %s %s'\n", aname,
- _("# treated internally as `delete'"), aname);
- indent_in();
- indent(SPACEOVER);
- fprintf(prof_fp, "delete %s[", aname);
- pp_lhs(tree->rnode->lnode);
- fprintf(prof_fp, "]\n");
- indent_out();
- indent(SPACEOVER);
- fprintf(prof_fp, "}");
- }
- return;
-
- /* unary operations */
- case Node_CONVFMT:
- case Node_FIELDWIDTHS:
- case Node_FNR:
- case Node_FPAT:
- case Node_FS:
- case Node_IGNORECASE:
- case Node_LINT:
- case Node_NF:
- case Node_NR:
- case Node_OFMT:
- case Node_OFS:
- case Node_ORS:
- case Node_RS:
- case Node_TEXTDOMAIN:
- case Node_SUBSEP:
- pp_var(tree);
- return;
-
- case Node_field_spec:
- case Node_subscript:
- pp_lhs(tree);
- return;
-
- case Node_unary_minus:
- fprintf(prof_fp, " -");
- if (is_scalar(tree->subnode->type))
- tree_eval(tree->subnode);
- else {
- fprintf(prof_fp, "(");
- tree_eval(tree->subnode);
- fprintf(prof_fp, ")");
+ break;
+
+ case Op_K_getline:
+ case Op_K_getline_redir:
+ if (pc->into_var) {
+ t1 = pp_pop();
+ tmp = pp_concat(op2str(Op_K_getline), " ", t1->pp_str);
+ pp_free(t1);
+ } else
+ tmp = pp_concat(op2str(Op_K_getline), "", "");
+
+ if (pc->redir_type != 0) {
+ int before = (pc->redir_type == redirect_pipein
+ || pc->redir_type == redirect_twoway);
+
+ t2 = pp_pop();
+ if (is_binary(t2->type))
+ pp_parenthesize(t2);
+ if (before)
+ str = pp_concat(t2->pp_str, redir2str(pc->redir_type), tmp);
+ else
+ str = pp_concat(tmp, redir2str(pc->redir_type), t2->pp_str);
+ efree(tmp);
+ pp_free(t2);
+ } else
+ str = tmp;
+ pp_push(pc->opcode, str, CAN_FREE);
+ break;
+
+ case Op_indirect_func_call:
+ t1 = pp_pop(); /* indirect var */
+ pp_free(t1);
+ case Op_func_call:
+ {
+ char *fname = pc->func_name;
+ char *pre;
+ int pcount;
+
+ if (pc->opcode == Op_indirect_func_call)
+ pre = "@";
+ else
+ pre = "";
+ pcount = (pc + 1)->expr_count;
+ if (pcount > 0) {
+ tmp = pp_list(pcount, "()", ", ");
+ str = pp_concat(pre, fname, tmp);
+ efree(tmp);
+ } else
+ str = pp_concat(pre, fname, "()");
+ pp_push(pc->opcode, str, CAN_FREE);
}
- return;
-
- case Node_cond_exp:
- eval_condition(tree->lnode);
- fprintf(prof_fp, " ? ");
- tree_eval(tree->rnode->lnode);
- fprintf(prof_fp, " : ");
- tree_eval(tree->rnode->rnode);
- return;
-
- case Node_match:
- case Node_nomatch:
- case Node_regex:
- case Node_dynregex:
- pp_match_op(tree);
- return;
-
- /* assignments */
- case Node_assign:
- tree_eval(tree->lnode);
- fprintf(prof_fp, " = ");
- tree_eval(tree->rnode);
- return;
-
- case Node_assign_concat:
- tree_eval(tree->lnode);
- fprintf(prof_fp, " = ");
- tree_eval(tree->lnode);
- fprintf(prof_fp, " ");
- tree_eval(tree->rnode);
- return;
-
- case Node_concat:
- pp_concat(tree, 0);
- return;
-
- /* other assignment types are easier because they are numeric */
- case Node_preincrement:
- case Node_predecrement:
- case Node_postincrement:
- case Node_postdecrement:
- case Node_assign_exp:
- case Node_assign_times:
- case Node_assign_quotient:
- case Node_assign_mod:
- case Node_assign_plus:
- case Node_assign_minus:
- pp_op_assign(tree);
- return;
-
- default:
- break; /* handled below */
- }
-
- /* handle binary ops */
- in_expr++;
- parenthesize(tree->type, tree->lnode);
-
- switch (tree->type) {
- case Node_geq:
- fprintf(prof_fp, " >= ");
- break;
- case Node_leq:
- fprintf(prof_fp, " <= ");
- break;
- case Node_greater:
- fprintf(prof_fp, " > ");
- break;
- case Node_less:
- fprintf(prof_fp, " < ");
- break;
- case Node_notequal:
- fprintf(prof_fp, " != ");
- break;
- case Node_equal:
- fprintf(prof_fp, " == ");
- break;
- case Node_exp:
- fprintf(prof_fp, " ^ ");
- break;
- case Node_times:
- fprintf(prof_fp, " * ");
- break;
- case Node_quotient:
- fprintf(prof_fp, " / ");
- break;
- case Node_mod:
- fprintf(prof_fp, " %% ");
- break;
- case Node_plus:
- fprintf(prof_fp, " + ");
- break;
- case Node_minus:
- fprintf(prof_fp, " - ");
- break;
- default:
- fatal(_("illegal type (%s) in tree_eval"), nodetype2str(tree->type));
- }
- parenthesize(tree->type, tree->rnode);
- in_expr--;
-
- return;
-}
-
-/* eval_condition --- is TREE true or false */
-
-static void
-eval_condition(register NODE *tree)
-{
- if (tree == NULL) /* Null trees are the easiest kinds */
- return;
-
- if (tree->type == Node_line_range) {
- /* /.../, /.../ */
- eval_condition(tree->condpair->lnode);
- fprintf(prof_fp,", ");
- eval_condition(tree->condpair->rnode);
- return;
- }
-
- /*
- * Could just be J.random expression. in which case, null and 0 are
- * false, anything else is true
- */
-
- tree_eval(tree);
- return;
-}
-
-/* pp_op_assign --- do +=, -=, etc. */
-
-static void
-pp_op_assign(register NODE *tree)
-{
- const char *op = NULL;
- enum Order {
- NA = 0,
- PRE = 1,
- POST = 2
- } order = NA;
-
- switch(tree->type) {
- case Node_preincrement:
- op = "++";
- order = PRE;
- break;
-
- case Node_predecrement:
- op = "--";
- order = PRE;
- break;
-
- case Node_postincrement:
- op = "++";
- order = POST;
- break;
-
- case Node_postdecrement:
- op = "--";
- order = POST;
- break;
-
- default:
- break; /* handled below */
- }
-
- if (order == PRE) {
- fprintf(prof_fp, "%s", op);
- pp_lhs(tree->lnode);
- return;
- } else if (order == POST) {
- pp_lhs(tree->lnode);
- fprintf(prof_fp, "%s", op);
- return;
- }
-
- /* a binary op */
- pp_lhs(tree->lnode);
-
- switch(tree->type) {
- case Node_assign_exp:
- fprintf(prof_fp, " ^= ");
- break;
-
- case Node_assign_times:
- fprintf(prof_fp, " *= ");
- break;
-
- case Node_assign_quotient:
- fprintf(prof_fp, " /= ");
- break;
+ break;
+
+ case Op_K_continue:
+ case Op_K_break:
+ case Op_K_nextfile:
+ case Op_K_next:
+ fprintf(prof_fp, "%s\n", op2str(pc->opcode));
+ break;
+
+ case Op_K_return:
+ case Op_K_exit:
+ t1 = pp_pop();
+ if (is_binary(t1->type))
+ pp_parenthesize(t1);
+ if (pc->source_line > 0) /* don't print implicit 'return' at end of function */
+ fprintf(prof_fp, "%s %s\n", op2str(pc->opcode), t1->pp_str);
+ pp_free(t1);
+ break;
+
+ case Op_pop:
+ t1 = pp_pop();
+ fprintf(prof_fp, "%s", t1->pp_str);
+ if (! in_for_header)
+ fprintf(prof_fp, "\n");
+ pp_free(t1);
+ break;
+
+ case Op_line_range:
+ ip = pc + 1;
+ pprint(pc->nexti, ip->condpair_left, FALSE);
+ pprint(ip->condpair_left->nexti, ip->condpair_right, FALSE);
+ t2 = pp_pop();
+ t1 = pp_pop();
+ str = pp_concat(t1->pp_str, ", ", t2->pp_str);
+ pp_free(t1);
+ pp_free(t2);
+ pp_push(Op_line_range, str, CAN_FREE);
+ pc = ip->condpair_right;
+ break;
+
+ case Op_push_loop:
+ ip = pc + 1;
+ switch (ip->opcode) {
+ case Op_K_while:
+ indent(ip->while_body->exec_count);
+ fprintf(prof_fp, "%s (", op2str(ip->opcode));
+ pprint(pc->nexti, ip->while_body, FALSE);
+ t1 = pp_pop();
+ fprintf(prof_fp, "%s) {\n", t1->pp_str);
+ pp_free(t1);
+ indent_in();
+ pprint(ip->while_body->nexti, pc->target_break, FALSE);
+ indent_out();
+ indent(SPACEOVER);
+ fprintf(prof_fp, "}\n");
+ break;
- case Node_assign_mod:
- fprintf(prof_fp, " %%= ");
- break;
+ case Op_K_do:
+ indent(pc->nexti->exec_count);
+ fprintf(prof_fp, "%s {\n", op2str(ip->opcode));
+ indent_in();
+ pprint(pc->nexti->nexti, ip->doloop_cond, FALSE);
+ indent_out();
+ pprint(ip->doloop_cond, pc->target_break, FALSE);
+ indent(SPACEOVER);
+ t1 = pp_pop();
+ fprintf(prof_fp, "} %s (%s)\n", op2str(Op_K_while), t1->pp_str);
+ pp_free(t1);
+ break;
+
+ case Op_K_for:
+ indent(ip->forloop_body->exec_count);
+ fprintf(prof_fp, "%s (", op2str(ip->opcode));
+ pprint(pc->nexti, ip->forloop_cond, TRUE);
+ fprintf(prof_fp, "; ");
+
+ if (ip->forloop_cond->opcode == Op_no_op &&
+ ip->forloop_cond->nexti == ip->forloop_body)
+ fprintf(prof_fp, "; ");
+ else {
+ pprint(ip->forloop_cond, ip->forloop_body, TRUE);
+ t1 = pp_pop();
+ fprintf(prof_fp, "%s; ", t1->pp_str);
+ pp_free(t1);
+ }
- case Node_assign_plus:
- fprintf(prof_fp, " += ");
- break;
+ pprint(pc->target_continue, pc->target_break, TRUE);
+ fprintf(prof_fp, ") {\n");
+ indent_in();
+ pprint(ip->forloop_body->nexti, pc->target_continue, FALSE);
+ indent_out();
+ indent(SPACEOVER);
+ fprintf(prof_fp, "}\n");
+ break;
+
+ case Op_K_arrayfor:
+ {
+ char *array, *item;
+ t1 = pp_pop();
+ array = t1->pp_str;
+ m = ip->forloop_cond->array_var;
+ if (m->type == Node_param_list)
+ item = fparms[m->param_cnt];
+ else
+ item = m->vname;
+ indent(ip->forloop_body->exec_count);
+ fprintf(prof_fp, "%s (%s%s%s) {\n", op2str(Op_K_arrayfor),
+ item, op2str(Op_in_array), array);
+ indent_in();
+ pp_free(t1);
+ pprint(ip->forloop_body->nexti, pc->target_break, FALSE);
+ indent_out();
+ indent(SPACEOVER);
+ fprintf(prof_fp, "}\n");
+ }
+ break;
+
+ case Op_K_switch:
+ {
+ INSTRUCTION *curr;
+
+ fprintf(prof_fp, "%s (", op2str(ip->opcode));
+ pprint(pc->nexti, ip->switch_body, FALSE);
+ t1 = pp_pop();
+ fprintf(prof_fp, "%s) {\n", t1->pp_str);
+ pp_free(t1);
+
+ for (curr = ip->switch_body->case_val; curr != NULL; curr = curr->nexti) {
+ indent(curr->target_stmt->exec_count);
+ if (curr->opcode == Op_K_case) {
+ m = curr->memory;
+ if (m->type == Node_regex) {
+ m = m->re_exp;
+ tmp = pp_string(m->stptr, m->stlen, '/');
+ } else if ((m->flags & NUMBER) != 0)
+ tmp = pp_number(m->numbr);
+ else
+ tmp = pp_string(m->stptr, m->stlen, '"');
+ fprintf(prof_fp, "%s %s:\n", op2str(Op_K_case), tmp);
+ efree(tmp);
+ } else
+ fprintf(prof_fp, "%s:\n", op2str(Op_K_default));
+ indent_in();
+ pprint(curr->target_stmt->nexti, curr->nexti ?
+ curr->nexti->target_stmt : pc->target_break, FALSE);
+ indent_out();
+ }
+ indent(SPACEOVER);
+ fprintf(prof_fp, "}\n");
+ }
+ break;
- case Node_assign_minus:
- fprintf(prof_fp, " -= ");
- break;
+ default:
+ cant_happen();
+ }
- default:
- cant_happen();
- }
+ pc = pc->target_break;
+ break;
- tree_eval(tree->rnode);
-}
+ case Op_K_if:
+ fprintf(prof_fp, "%s (", op2str(pc->opcode));
+ pprint(pc->nexti, pc->branch_if, FALSE);
+ t1 = pp_pop();
+ fprintf(prof_fp, "%s) {", t1->pp_str);
+ pp_free(t1);
-/* pp_lhs --- print the lhs */
+ ip = pc->branch_if;
+ if (ip->exec_count > 0)
+ fprintf(prof_fp, " # %ld", ip->exec_count);
+ fprintf(prof_fp, "\n");
+ indent_in();
+ pprint(ip->nexti, pc->branch_else, FALSE);
+ indent_out();
+ pc = pc->branch_else;
+ if (pc->nexti->opcode == Op_no_op) {
+ indent(SPACEOVER);
+ fprintf(prof_fp, "}\n");
+ }
+ break;
-static void
-pp_lhs(register NODE *ptr)
-{
- register NODE *n;
-
- switch (ptr->type) {
- case Node_var_array:
- fatal(_("attempt to use array `%s' in a scalar context"),
- ptr->vname);
-
- case Node_var_new:
- case Node_var:
- fprintf(prof_fp, "%s", ptr->vname);
- break;
-
- case Node_BINMODE:
- case Node_CONVFMT:
- case Node_FIELDWIDTHS:
- case Node_FNR:
- case Node_FPAT:
- case Node_FS:
- case Node_IGNORECASE:
- case Node_LINT:
- case Node_NF:
- case Node_NR:
- case Node_OFMT:
- case Node_OFS:
- case Node_ORS:
- case Node_RS:
- case Node_SUBSEP:
- case Node_TEXTDOMAIN:
- pp_var(ptr);
- break;
-
- case Node_param_list:
- fprintf(prof_fp, "%s", fparms[ptr->param_cnt]);
- break;
-
- case Node_field_spec:
- fprintf(prof_fp, "$");
- if (is_scalar(ptr->lnode->type))
- tree_eval(ptr->lnode);
- else {
- fprintf(prof_fp, "(");
- tree_eval(ptr->lnode);
- fprintf(prof_fp, ")");
+ case Op_K_else:
+ fprintf(prof_fp, "} %s {\n", op2str(pc->opcode));
+ indent_in();
+ pprint(pc->nexti, pc->branch_end, FALSE);
+ indent_out();
+ indent(SPACEOVER);
+ fprintf(prof_fp, "}\n");
+ pc = pc->branch_end;
+ break;
+
+ case Op_cond_exp:
+ {
+ NODE *f, *t, *cond;
+ size_t len;
+
+ pprint(pc->nexti, pc->branch_if, FALSE);
+ ip = pc->branch_if;
+ pprint(ip->nexti, pc->branch_else, FALSE);
+ ip = pc->branch_else->nexti;
+
+ pc = ip->nexti;
+ assert(pc->opcode == Op_cond_exp);
+ pprint(pc->nexti, pc->branch_end, FALSE);
+
+ f = pp_pop();
+ t = pp_pop();
+ cond = pp_pop();
+
+ len = f->pp_len + t->pp_len + cond->pp_len + 12;
+ emalloc(str, char *, len, "pprint");
+ sprintf(str, "(%s ? %s : %s)", cond->pp_str, t->pp_str, f->pp_str);
+
+ pp_free(cond);
+ pp_free(t);
+ pp_free(f);
+ pp_push(Op_cond_exp, str, CAN_FREE);
+ pc = pc->branch_end;
}
- break;
+ break;
- case Node_subscript:
- n = ptr->lnode;
- if (n->type == Node_param_list) {
- fprintf(prof_fp, "%s[", fparms[n->param_cnt]);
- } else
- fprintf(prof_fp, "%s[", n->vname);
- if (ptr->rnode->type == Node_expression_list)
- pp_list(ptr->rnode);
- else
- tree_eval(ptr->rnode);
- fprintf(prof_fp, "]");
- break;
+ case Op_exec_count:
+ if (! in_for_header)
+ indent(pc->exec_count);
+ break;
- case Node_builtin:
- fatal(_("assignment is not allowed to result of builtin function"));
+ default:
+ cant_happen();
+ }
- default:
- cant_happen();
+ if (pc == endp)
+ break;
}
}
-/* match_op --- do ~ and !~ */
-
-static void
-pp_match_op(register NODE *tree)
-{
- register NODE *re;
- const char *op;
- const char *restr;
- size_t relen;
- NODE *text = NULL;
-
- if (tree->type == Node_dynregex) {
- tree_eval(tree->re_exp);
- return;
- }
-
- if (tree->type == Node_regex) {
- re = tree->re_exp;
- restr = re->stptr;
- relen = re->stlen;
- pp_string(restr, relen, '/');
- return;
- }
-
- /* at this point, have either ~ or !~ */
-
- text = tree->lnode;
- re = tree->rnode;
-
- if (tree->type == Node_nomatch)
- op = "!~";
- else if (tree->type == Node_match)
- op = "~";
- else
- op = "";
-
- tree_eval(text);
- fprintf(prof_fp, " %s ", op);
- tree_eval(re);
-}
-
-/* pp_redir --- print a redirection */
-
-static void
-pp_redir(register NODE *tree, enum redir_placement dir)
-{
- const char *op = "[BOGUS]"; /* should never be seen */
-
- if (tree == NULL)
- return;
-
- switch (tree->type) {
- case Node_redirect_output:
- op = ">";
- break;
- case Node_redirect_append:
- op = ">>";
- break;
- case Node_redirect_pipe:
- op = "|";
- break;
- case Node_redirect_pipein:
- op = "|";
- break;
- case Node_redirect_input:
- op = "<";
- break;
- case Node_redirect_twoway:
- op = "|&";
- break;
- default:
- cant_happen();
- }
-
- if (dir == BEFORE) {
- if (! is_scalar(tree->subnode->type)) {
- fprintf(prof_fp, "(");
- tree_eval(tree->subnode);
- fprintf(prof_fp, ")");
- } else
- tree_eval(tree->subnode);
- fprintf(prof_fp, " %s ", op);
- } else {
- fprintf(prof_fp, " %s ", op);
- if (! is_scalar(tree->subnode->type)) {
- fprintf(prof_fp, "(");
- tree_eval(tree->subnode);
- fprintf(prof_fp, ")");
- } else
- tree_eval(tree->subnode);
- }
-}
+/* pp_string_fp --- printy print a string to the fp */
-/* pp_list --- dump a list of arguments, without parens */
+/*
+ * This routine concentrates string pretty printing in one place,
+ * so that it can be called from multiple places within gawk.
+ */
-static void
-pp_list(register NODE *tree)
+void
+pp_string_fp(Func_print print_func, FILE *fp, const char *in_str,
+ size_t len, int delim, int breaklines)
{
- for (; tree != NULL; tree = tree->rnode) {
- if (tree->type != Node_expression_list) {
- fprintf(stderr, "pp_list: got %s\n",
- nodetype2str(tree->type));
- fflush(stderr);
- }
- assert(tree->type == Node_expression_list);
- tree_eval(tree->lnode);
- if (tree->rnode != NULL)
- fprintf(prof_fp, ", ");
- }
-}
-
-/* pp_print_stmt --- print a "print" or "printf" statement */
+ char *s = pp_string(in_str, len, delim);
+ int count;
+ size_t slen;
+ const char *str = (const char *) s;
+#define BREAKPOINT 70 /* arbitrary */
-static void
-pp_print_stmt(const char *command, register NODE *tree)
-{
- NODE *redir = tree->rnode;
-
- indent(tree->exec_count);
- fprintf(prof_fp, "%s", command);
- if (redir != NULL) {
- if (tree->lnode != NULL) {
- /* parenthesize if have a redirection and a list */
- fprintf(prof_fp, "(");
- pp_list(tree->lnode);
- fprintf(prof_fp, ")");
+ slen = strlen(str);
+ for (count = 0; slen > 0; slen--, str++) {
+ if (++count >= BREAKPOINT && breaklines) {
+ print_func(fp, "%c\n%c", delim, delim);
+ count = 0;
} else
- fprintf(prof_fp, " $0");
- pp_redir(redir, AFTER);
- } else {
- fprintf(prof_fp, " ");
- if (tree->lnode != NULL)
- pp_list(tree->lnode);
- else
- fprintf(prof_fp, "$0");
+ print_func(fp, "%c", *str);
}
- fprintf(prof_fp, "\n");
-}
-
-/* pp_delete --- print a "delete" statement */
-
-static void
-pp_delete(register NODE *tree)
-{
- NODE *array, *subscript;
-
- array = tree->lnode;
- subscript = tree->rnode;
- indent(tree->exec_count);
- if (array->type == Node_param_list)
- fprintf(prof_fp, "delete %s", fparms[array->param_cnt]);
- else
- fprintf(prof_fp, "delete %s", array->vname);
- if (subscript != NULL) {
- fprintf(prof_fp, "[");
- pp_list(subscript);
- fprintf(prof_fp, "]");
- }
- fprintf(prof_fp, "\n");
-}
-
-/* pp_in_array --- pretty print "foo in array" test */
-
-static void
-pp_in_array(NODE *array, NODE *subscript)
-{
- if (subscript->type == Node_expression_list) {
- fprintf(prof_fp, "(");
- pp_list(subscript);
- fprintf(prof_fp, ")");
- } else
- pprint(subscript);
-
- if (array->type == Node_param_list)
- fprintf(prof_fp, " in %s", fparms[array->param_cnt]);
- else
- fprintf(prof_fp, " in %s", array->vname);
+ efree(s);
}
-/* pp_getline --- print a getline statement */
+#ifdef PROFILING
+/* just_dump --- dump the profile and function stack and keep going */
-static void
-pp_getline(register NODE *tree)
+static RETSIGTYPE
+just_dump(int signum)
{
- NODE *redir = tree->rnode;
- int before, after;
-
- /*
- * command | getline
- * or
- * command |& getline
- * or
- * getline < file
- */
- if (redir != NULL) {
- before = (redir->type == Node_redirect_pipein
- || redir->type == Node_redirect_twoway);
- after = ! before;
- } else
- before = after = FALSE;
-
- if (before)
- pp_redir(redir, BEFORE);
-
- fprintf(prof_fp, "getline");
- if (tree->lnode != NULL) { /* optional var */
- fprintf(prof_fp, " ");
- pp_lhs(tree->lnode);
- }
+ extern INSTRUCTION *code_block;
- if (after)
- pp_redir(redir, AFTER);
+ dump_prog(code_block);
+ dump_funcs();
+ dump_fcall_stack(prof_fp);
+ fflush(prof_fp);
+ signal(signum, just_dump); /* for OLD Unix systems ... */
}
-/* pp_builtin --- print a builtin function */
+/* dump_and_exit --- dump the profile, the function stack, and exit */
-static void
-pp_builtin(register NODE *tree)
+static RETSIGTYPE
+dump_and_exit(int signum)
{
- const char *func = getfname(tree->builtin);
-
- if (func != NULL) {
- fprintf(prof_fp, "%s(", func);
- pp_list(tree->subnode);
- fprintf(prof_fp, ")");
- } else
- fprintf(prof_fp, _("# this is a dynamically loaded extension function"));
+ just_dump(signum);
+ exit(EXIT_FAILURE);
}
-/* pp_func_call --- print a function call */
-
-static void
-pp_func_call(NODE *tree)
-{
- NODE *name, *arglist;
-
- name = tree->rnode;
- arglist = tree->lnode;
- if (tree->type == Node_indirect_func_call)
- fprintf(prof_fp, "@");
- fprintf(prof_fp, "%s(", name->stptr);
- pp_list(arglist);
- fprintf(prof_fp, ")");
-}
+#endif
/* dump_prog --- dump the program */
@@ -1100,486 +936,436 @@ pp_func_call(NODE *tree)
*/
void
-dump_prog(NODE *begin, NODE *beginfile, NODE *prog, NODE *endfile, NODE *end)
+dump_prog(INSTRUCTION *code)
{
time_t now;
(void) time(& now);
/* \n on purpose, with \n in ctime() output */
fprintf(prof_fp, _("\t# gawk profile, created %s\n"), ctime(& now));
-
- if (begin != NULL) {
- fprintf(prof_fp, _("\t# BEGIN block(s)\n\n"));
- fprintf(prof_fp, "\tBEGIN {\n");
- in_BEGIN_or_END = TRUE;
- pprint(begin);
- in_BEGIN_or_END = FALSE;
- fprintf(prof_fp, "\t}\n");
- if (prog != NULL || end != NULL)
- fprintf(prof_fp, "\n");
- }
- if (beginfile != NULL) {
- fprintf(prof_fp, _("\t# BEGINFILE block(s)\n\n"));
- fprintf(prof_fp, "\tBEGINFILE {\n");
- in_BEGIN_or_END = TRUE;
- pprint(beginfile);
- in_BEGIN_or_END = FALSE;
- fprintf(prof_fp, "\t}\n");
- if (prog != NULL || endfile != NULL)
- fprintf(prof_fp, "\n");
- }
- if (prog != NULL) {
- fprintf(prof_fp, _("\t# Rule(s)\n\n"));
- pprint(prog);
- if (endfile != NULL || end != NULL)
- fprintf(prof_fp, "\n");
- }
- if (endfile != NULL) {
- fprintf(prof_fp, _("\t# ENDFILE block(s)\n\n"));
- fprintf(prof_fp, "\tENDFILE {\n");
- in_BEGIN_or_END = TRUE;
- pprint(endfile);
- in_BEGIN_or_END = FALSE;
- fprintf(prof_fp, "\t}\n");
- if (end != NULL)
- fprintf(prof_fp, "\n");
- }
- if (end != NULL) {
- fprintf(prof_fp, _("\t# END block(s)\n\n"));
- fprintf(prof_fp, "\tEND {\n");
- in_BEGIN_or_END = TRUE;
- pprint(end);
- in_BEGIN_or_END = FALSE;
- fprintf(prof_fp, "\t}\n");
- }
-}
-
-/* pp_func --- pretty print a function */
-
-void
-pp_func(const char *name, size_t namelen, NODE *f)
-{
- int j;
- char **pnames;
- static int first = TRUE;
-
- if (first) {
- first = FALSE;
- fprintf(prof_fp, _("\n\t# Functions, listed alphabetically\n"));
- }
-
- fprintf(prof_fp, "\n");
- indent(f->exec_count);
- fprintf(prof_fp, "function %.*s(", (int) namelen, name);
- pnames = f->parmlist;
- fparms = pnames;
- for (j = 0; j < f->lnode->param_cnt; j++) {
- fprintf(prof_fp, "%s", pnames[j]);
- if (j < f->lnode->param_cnt - 1)
- fprintf(prof_fp, ", ");
- }
- fprintf(prof_fp, ")\n\t{\n");
- indent_in();
- pprint(f->rnode); /* body */
- indent_out();
- fprintf(prof_fp, "\t}\n");
-}
-
-/*
- * pp_concat --- print string concatenations
- *
- * Multiple string concatenations grow downwards to the left.
- * This routine attempts to print multiple concatenations with
- * the minimal amount of parentheses.
- */
-
-static void
-pp_concat(NODE *tree, int level)
-{
- static int left_printed = FALSE;
-
- if (tree->lnode->type == Node_concat)
- pp_concat(tree->lnode, level + 1); /* recurse down one level */
- else if (tree->lnode == Nnull_string) {
- tree_eval(tree->rnode);
- return;
- } else {
- fprintf(prof_fp, "("); /* outermost left paren */
- left_printed = TRUE;
-
- if (is_scalar(tree->lnode->type))
- tree_eval(tree->lnode);
- else {
- fprintf(prof_fp, "(");
- tree_eval(tree->lnode);
- fprintf(prof_fp, ")");
- }
- }
-
- fprintf(prof_fp, " ");
-
- if (is_scalar(tree->rnode->type))
- tree_eval(tree->rnode);
- else {
- fprintf(prof_fp, "(");
- tree_eval(tree->rnode);
- fprintf(prof_fp, ")");
- }
-
- if (level == 0 && left_printed) {
- fprintf(prof_fp, ")"); /* outermost right paren */
- left_printed = FALSE;
- }
-}
-
-/* pp_string --- pretty print a string or regex constant */
-
-static void
-pp_string(const char *str, size_t len, int delim)
-{
- pp_string_fp(prof_fp, str, len, delim, FALSE);
-}
-
-/* pp_string_fp --- printy print a string to the fp */
-
-/*
- * This routine concentrates string pretty printing in one place,
- * so that it can be called from multiple places within gawk.
- */
-
-void
-pp_string_fp(FILE *fp, const char *in_str, size_t len, int delim, int breaklines)
-{
- static char escapes[] = "\b\f\n\r\t\v\\";
- static char printables[] = "bfnrtv\\";
- char *cp;
- int i;
- int count;
-#define BREAKPOINT 70 /* arbitrary */
- const unsigned char *str = (const unsigned char *) in_str;
-
- fprintf(fp, "%c", delim);
- for (count = 0; len > 0; len--, str++) {
- if (++count >= BREAKPOINT && breaklines) {
- fprintf(fp, "%c\n%c", delim, delim);
- count = 0;
- }
- if (*str == delim) {
- fprintf(fp, "\\%c", delim);
- count++;
- } else if (*str == BELL) {
- fprintf(fp, "\\a");
- count++;
- } else if ((cp = strchr(escapes, *str)) != NULL) {
- i = cp - escapes;
- putc('\\', fp);
- count++;
- putc(printables[i], fp);
- if (breaklines && *str == '\n' && delim == '"') {
- fprintf(fp, "\"\n\"");
- count = 0;
- }
- /* NB: Deliberate use of lower-case versions. */
- } else if (isascii(*str) && isprint(*str)) {
- putc(*str, fp);
- } else {
- char buf[10];
-
- /* print 'em as they came if for whiny users */
- if (whiny_users)
- sprintf(buf, "%c", *str & 0xff);
- else
- sprintf(buf, "\\%03o", *str & 0xff);
- count += strlen(buf) - 1;
- fprintf(fp, "%s", buf);
- }
- }
- fprintf(fp, "%c", delim);
-}
-
-/* is_scalar --- true or false if we'll get a scalar value */
-
-static int
-is_scalar(NODETYPE type)
-{
- switch (type) {
- case Node_var_new:
- case Node_var:
- case Node_var_array:
- case Node_val:
- case Node_BINMODE:
- case Node_CONVFMT:
- case Node_FIELDWIDTHS:
- case Node_FNR:
- case Node_FPAT:
- case Node_FS:
- case Node_IGNORECASE:
- case Node_LINT:
- case Node_NF:
- case Node_NR:
- case Node_OFMT:
- case Node_OFS:
- case Node_ORS:
- case Node_RS:
- case Node_SUBSEP:
- case Node_TEXTDOMAIN:
- case Node_subscript:
- case Node_func_call:
- return TRUE;
- default:
- return FALSE;
- }
+ pprint(code, NULL, FALSE);
}
/* prec_level --- return the precedence of an operator, for paren tests */
static int
-prec_level(NODETYPE type)
+prec_level(int type)
{
switch (type) {
- case Node_var_new:
- case Node_var:
- case Node_var_array:
- case Node_param_list:
- case Node_subscript:
- case Node_func_call:
- case Node_K_delete_loop:
- case Node_val:
- case Node_builtin:
- case Node_BINMODE:
- case Node_CONVFMT:
- case Node_FIELDWIDTHS:
- case Node_FNR:
- case Node_FS:
- case Node_IGNORECASE:
- case Node_LINT:
- case Node_NF:
- case Node_NR:
- case Node_OFMT:
- case Node_OFS:
- case Node_ORS:
- case Node_RS:
- case Node_SUBSEP:
- case Node_TEXTDOMAIN:
- case Node_regex:
+ case Op_push_lhs:
+ case Op_push_param:
+ case Op_push_array:
+ case Op_push:
+ case Op_push_i:
+ case Op_push_re:
+ case Op_match_rec:
+ case Op_subscript:
+ case Op_subscript_lhs:
+ case Op_func_call:
+ case Op_K_delete_loop:
+ case Op_builtin:
return 15;
- case Node_field_spec:
+ case Op_field_spec:
+ case Op_field_spec_lhs:
return 14;
- case Node_exp:
+ case Op_exp:
+ case Op_exp_i:
return 13;
- case Node_preincrement:
- case Node_predecrement:
- case Node_postincrement:
- case Node_postdecrement:
+ case Op_preincrement:
+ case Op_predecrement:
+ case Op_postincrement:
+ case Op_postdecrement:
return 12;
- case Node_unary_minus:
- case Node_not:
+ case Op_unary_minus:
+ case Op_not:
return 11;
- case Node_times:
- case Node_quotient:
- case Node_mod:
+ case Op_times:
+ case Op_times_i:
+ case Op_quotient:
+ case Op_quotient_i:
+ case Op_mod:
+ case Op_mod_i:
return 10;
- case Node_plus:
- case Node_minus:
+ case Op_plus:
+ case Op_plus_i:
+ case Op_minus:
+ case Op_minus_i:
return 9;
- case Node_concat:
+ case Op_concat:
+ case Op_assign_concat:
return 8;
- case Node_equal:
- case Node_notequal:
- case Node_greater:
- case Node_leq:
- case Node_geq:
- case Node_match:
- case Node_nomatch:
+ case Op_equal:
+ case Op_notequal:
+ case Op_greater:
+ case Op_leq:
+ case Op_geq:
+ case Op_match:
+ case Op_nomatch:
return 7;
- case Node_K_getline:
+ case Op_K_getline:
+ case Op_K_getline_redir:
return 6;
- case Node_less:
- case Node_in_array:
+ case Op_less:
+ return 5;
+
+ case Op_in_array:
return 5;
- case Node_and:
+ case Op_and:
return 4;
- case Node_or:
+ case Op_or:
return 3;
- case Node_cond_exp:
+ case Op_cond_exp:
return 2;
- case Node_assign:
- case Node_assign_times:
- case Node_assign_quotient:
- case Node_assign_mod:
- case Node_assign_plus:
- case Node_assign_minus:
- case Node_assign_exp:
- case Node_assign_concat:
+ case Op_assign:
+ case Op_assign_times:
+ case Op_assign_quotient:
+ case Op_assign_mod:
+ case Op_assign_plus:
+ case Op_assign_minus:
+ case Op_assign_exp:
return 1;
default:
- fatal(_("unexpected type %s in prec_level"), nodetype2str(type));
- return 0; /* keep the compiler happy */
+ return 0;
}
}
-/* parenthesize --- print a subtree in parentheses if need be */
-
-static void
-parenthesize(NODETYPE parent_type, NODE *tree)
+static int
+is_binary(int type)
{
- NODETYPE child_type;
-
- if (tree == NULL)
- return;
-
- child_type = tree->type;
-
- in_expr++;
- /* first the special cases, then the general ones */
- if (parent_type == Node_not && child_type == Node_in_array) {
- fprintf(prof_fp, "(");
- pp_in_array(tree->lnode, tree->rnode);
- fprintf(prof_fp, ")");
- /* other special cases here, as needed */
- } else if (prec_level(child_type) < prec_level(parent_type)) {
- fprintf(prof_fp, "(");
- tree_eval(tree);
- fprintf(prof_fp, ")");
- } else
- tree_eval(tree);
- in_expr--;
+ switch (type) {
+ case Op_geq:
+ case Op_leq:
+ case Op_greater:
+ case Op_less:
+ case Op_notequal:
+ case Op_equal:
+ case Op_exp:
+ case Op_times:
+ case Op_quotient:
+ case Op_mod:
+ case Op_plus:
+ case Op_minus:
+ case Op_exp_i:
+ case Op_times_i:
+ case Op_quotient_i:
+ case Op_mod_i:
+ case Op_plus_i:
+ case Op_minus_i:
+ case Op_concat:
+ case Op_assign_concat:
+ case Op_match:
+ case Op_nomatch:
+ case Op_assign:
+ case Op_assign_times:
+ case Op_assign_quotient:
+ case Op_assign_mod:
+ case Op_assign_plus:
+ case Op_assign_minus:
+ case Op_assign_exp:
+ case Op_cond_exp:
+ case Op_and:
+ case Op_or:
+ case Op_in_array:
+ case Op_K_getline_redir: /* sometimes */
+ case Op_K_getline:
+ return TRUE;
+
+ default:
+ return FALSE;
+ }
}
-/* parenthesize_expr --- print an expression subtree in parentheses if need be */
+/* parenthesize --- parenthesize an expression in stack */
static void
-parenthesize_expr(NODETYPE parent_type, NODE *tree)
+pp_parenthesize(NODE *sp)
{
- NODETYPE child_type;
-
- if (tree == NULL)
- return;
-
- child_type = tree->type;
+ char *p = sp->pp_str;
+ size_t len = sp->pp_len;
+
+ emalloc(p, char *, len + 3, "pp_parenthesize");
+ *p = '(';
+ memcpy(p + 1, sp->pp_str, len);
+ p[len + 1] = ')';
+ p[len + 2] = '\0';
+ if ((sp->flags & CAN_FREE) != 0)
+ efree(sp->pp_str);
+ sp->pp_str = p;
+ sp->pp_len += 2;
+ sp->flags |= CAN_FREE;
+}
- in_expr++;
- if (prec_level(child_type) < prec_level(parent_type)) {
- fprintf(prof_fp, "(");
- eval_condition(tree);
- fprintf(prof_fp, ")");
- } else
- eval_condition(tree);
- in_expr--;
+static void
+parenthesize(int type, NODE *left, NODE *right)
+{
+ int rprec = prec_level(right->type);
+ int lprec = prec_level(left->type);
+ int prec = prec_level(type);
+
+ if (prec > lprec) {
+ if (is_binary(left->type)) /* (a - b) * c */
+ pp_parenthesize(left);
+ if (prec >= rprec && is_binary(right->type)) /* (a - b) * (c - d) */
+ pp_parenthesize(right);
+ } else {
+ if (prec >= rprec && is_binary(right->type)) /* a - b - (c - d) */
+ pp_parenthesize(right);
+ }
}
-/* pp_var --- print builtin variables, do it in one place */
+/* pp_string --- pretty format a string or regex constant */
-static void
-pp_var(NODE *tree)
+char *
+pp_string(const char *in_str, size_t len, int delim)
{
- switch (tree->type) {
- case Node_BINMODE:
- fprintf(prof_fp, "BINMODE");
- return;
+ static char str_escapes[] = "\a\b\f\n\r\t\v\\";
+ static char str_printables[] = "abfnrtv\\";
+ static char re_escapes[] = "\a\b\f\n\r\t\v";
+ static char re_printables[] = "abfnrtv";
+ char *escapes;
+ char *printables;
+ char *cp;
+ int i;
+ const unsigned char *str = (const unsigned char *) in_str;
+ size_t ofre, osiz;
+ char *obuf, *obufout;
- case Node_CONVFMT:
- fprintf(prof_fp, "CONVFMT");
- return;
+ assert(delim == '"' || delim == '/');
- case Node_FIELDWIDTHS:
- fprintf(prof_fp, "FIELDWIDTHS");
- return;
+ if (delim == '/') {
+ escapes = re_escapes;
+ printables = re_printables;
+ } else {
+ escapes = str_escapes;
+ printables = str_printables;
+ }
- case Node_FNR:
- fprintf(prof_fp, "FNR");
- return;
+/* make space for something l big in the buffer */
+#define chksize(l) if ((l) > ofre) { \
+ long olen = obufout - obuf; \
+ erealloc(obuf, char *, osiz * 2, "pp_string"); \
+ obufout = obuf + olen; \
+ ofre += osiz; \
+ osiz *= 2; \
+} ofre -= (l)
+
+ osiz = len + 3 + 2; /* initial size; 3 for delim + terminating null */
+ emalloc(obuf, char *, osiz, "pp_string");
+ obufout = obuf;
+ ofre = osiz - 1;
+
+ *obufout++ = delim;
+ for (; len > 0; len--, str++) {
+ chksize(2); /* make space for 2 chars */
+ if (delim != '/' && *str == delim) {
+ *obufout++ = '\\';
+ *obufout++ = delim;
+ } else if ((cp = strchr(escapes, *str)) != NULL) {
+ i = cp - escapes;
+ *obufout++ = '\\';
+ *obufout++ = printables[i];
+ /* NB: Deliberate use of lower-case versions. */
+ } else if (isascii(*str) && isprint(*str)) {
+ *obufout++ = *str;
+ ofre += 1;
+ } else {
+ size_t len;
- case Node_FPAT:
- fprintf(prof_fp, "FPAT");
- return;
+ chksize(8); /* total available space is 10 */
- case Node_FS:
- fprintf(prof_fp, "FS");
- return;
+ /* print 'em as they came if for whiny users */
+ if (whiny_users)
+ sprintf(obufout, "%c", *str & 0xff);
+ else
+ sprintf(obufout, "\\%03o", *str & 0xff);
+ len = strlen(obufout);
+ ofre += (10 - len); /* adjust free space count */
+ obufout += len;
+ }
+ }
+ chksize(1);
+ *obufout++ = delim;
+ *obufout = '\0';
+ return obuf;
+#undef chksize
+}
- case Node_IGNORECASE:
- fprintf(prof_fp, "IGNORECASE");
- return;
+/* pp_number --- pretty format a number */
- case Node_LINT:
- fprintf(prof_fp, "LINT");
- return;
+char *
+pp_number(AWKNUM d)
+{
+#define PP_PRECISION 6
+ char *str;
- case Node_NF:
- fprintf(prof_fp, "NF");
- return;
+ emalloc(str, char *, PP_PRECISION + 10, "pp_number");
+ sprintf(str, "%0.*g", PP_PRECISION, d);
+ return str;
+#undef PP_PRECISION
+}
- case Node_NR:
- fprintf(prof_fp, "NR");
- return;
+/* pp_node --- pretty format a node */
- case Node_OFMT:
- fprintf(prof_fp, "OFMT");
- return;
+char *
+pp_node(NODE *n)
+{
+ if ((n->flags & NUMBER) != 0)
+ return pp_number(n->numbr);
+ return pp_string(n->stptr, n->stlen, '"');
+}
- case Node_OFS:
- fprintf(prof_fp, "OFS");
- return;
+static NODE **pp_args = NULL;
+static int npp_args;
- case Node_ORS:
- fprintf(prof_fp, "ORS");
- return;
+static char *
+pp_list(int nargs, const char *paren, const char *delim)
+{
+ NODE *r;
+ char *str, *s;
+ size_t len;
+ size_t delimlen;
+ int i;
- case Node_RS:
- fprintf(prof_fp, "RS");
- return;
+ if (pp_args == NULL) {
+ npp_args = nargs;
+ emalloc(pp_args, NODE **, (nargs + 2) * sizeof(NODE *), "pp_list");
+ } else if (nargs > npp_args) {
+ npp_args = nargs;
+ erealloc(pp_args, NODE **, (nargs + 2) * sizeof(NODE *), "pp_list");
+ }
- case Node_SUBSEP:
- fprintf(prof_fp, "SUBSEP");
- return;
+ delimlen = strlen(delim);
+ len = -delimlen;
+ for (i = 1; i <= nargs; i++) {
+ r = pp_args[i] = pp_pop();
+ len += r->pp_len + delimlen;
+ }
+ if (paren != NULL) {
+ assert(strlen(paren) == 2);
+ len += 2;
+ }
- case Node_TEXTDOMAIN:
- fprintf(prof_fp, "TEXTDOMAIN");
- return;
+ emalloc(str, char *, len + 1, "pp_list");
+ s = str;
+ if (paren != NULL)
+ *s++ = paren[0];
+ r = pp_args[nargs];
+ memcpy(s, r->pp_str, r->pp_len);
+ s += r->pp_len;
+ pp_free(r);
+ for (i = nargs - 1; i > 0; i--) {
+ if (delimlen > 0) {
+ memcpy(s, delim, delimlen);
+ s += delimlen;
+ }
+ r = pp_args[i];
+ memcpy(s, r->pp_str, r->pp_len);
+ s += r->pp_len;
+ pp_free(r);
+ }
+ if (paren != NULL)
+ *s++ = paren[1];
+ *s = '\0';
+ return str;
+}
- default:
- fatal(_("Unknown node type %s in pp_var"), nodetype2str(tree->type));
- break;
+static char *
+pp_concat(const char *s1, const char *s2, const char *s3)
+{
+ size_t len1, len2, len3, l;
+ char *str, *s;
+
+ len1 = strlen(s1);
+ len2 = strlen(s2);
+ len3 = strlen(s3);
+ l = len1 + len2 + len3 + 2;
+ emalloc(str, char *, l, "pp_concat");
+ s = str;
+ if (len1 > 0) {
+ memcpy(s, s1, len1);
+ s += len1;
}
+ if (len2 > 0) {
+ memcpy(s, s2, len2);
+ s += len2;
+ }
+ if (len3 > 0) {
+ memcpy(s, s3, len3);
+ s += len3;
+ }
+ *s = '\0';
+ return str;
}
-#ifdef PROFILING
-/* just_dump --- dump the profile and function stack and keep going */
+/* pp_func --- pretty print a function */
-static RETSIGTYPE
-just_dump(int signum)
+int
+pp_func(INSTRUCTION *pc, void *data ATTRIBUTE_UNUSED)
{
- extern NODE *begin_block, *expression_value, *end_block, *beginfile_block, *endfile_block;
+ int j;
+ char **pnames;
+ NODE *f;
+ static int first = TRUE;
+ int pcount;
- dump_prog(begin_block, beginfile_block, expression_value, endfile_block, end_block);
- dump_funcs();
- dump_fcall_stack(prof_fp);
- fflush(prof_fp);
- signal(signum, just_dump); /* for OLD Unix systems ... */
+ if (first) {
+ first = FALSE;
+ fprintf(prof_fp, _("\n\t# Functions, listed alphabetically\n"));
+ }
+
+ f = pc->func_body;
+ fprintf(prof_fp, "\n");
+ indent(pc->nexti->exec_count);
+ fprintf(prof_fp, "%s %s(", op2str(Op_K_function), f->lnode->param);
+ pnames = f->parmlist;
+ fparms = pnames;
+ pcount = f->lnode->param_cnt;
+ for (j = 0; j < pcount; j++) {
+ fprintf(prof_fp, "%s", pnames[j]);
+ if (j < pcount - 1)
+ fprintf(prof_fp, ", ");
+ }
+ fprintf(prof_fp, ")\n\t{\n");
+ indent_in();
+ pprint(pc->nexti->nexti, NULL, FALSE); /* function body */
+ indent_out();
+ fprintf(prof_fp, "\t}\n");
+ return 0;
}
-/* dump_and_exit --- dump the profile, the function stack, and exit */
+/* redir2str --- convert a redirection type into a printable value */
-static RETSIGTYPE
-dump_and_exit(int signum)
+const char *
+redir2str(int redirtype)
{
- just_dump(signum);
- exit(EXIT_FAILURE);
+ static const char *const redirtab[] = {
+ "",
+ " > ", /* redirect_output */
+ " >> ", /* redirect_append */
+ " | ", /* redirect_pipe */
+ " | ", /* redirect_pipein */
+ " < " /* redirect_input */
+ " |& " /* redirect_twoway */
+ };
+
+ if (redirtype < 0 || redirtype > redirect_twoway)
+ fatal(_("redir2str: unknown redirection type %d"), redirtype);
+ return redirtab[redirtype];
}
-#endif
+
+
diff --git a/protos.h b/protos.h
index 850fb449..26d520cc 100644
--- a/protos.h
+++ b/protos.h
@@ -23,105 +23,86 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
-#ifdef __STDC__
#define aptr_t void * /* arbitrary pointer type */
-#else
-#define aptr_t char *
-#endif
-extern aptr_t malloc P((MALLOC_ARG_T));
-extern aptr_t realloc P((aptr_t, MALLOC_ARG_T));
-extern aptr_t calloc P((MALLOC_ARG_T, MALLOC_ARG_T));
+extern aptr_t malloc(MALLOC_ARG_T);
+extern aptr_t realloc(aptr_t, MALLOC_ARG_T);
+extern aptr_t calloc(MALLOC_ARG_T, MALLOC_ARG_T);
-extern void free P((aptr_t));
-extern char *getenv P((const char *));
+extern void free(aptr_t);
+extern char *getenv(const char *);
#if ! defined(HAVE_STRING_H) && ! defined(HAVE_STRINGS_H)
-extern char *strcpy P((char *, const char *));
-extern char *strcat P((char *, const char *));
-extern char *strncpy P((char *, const char *, size_t));
-extern int strcmp P((const char *, const char *));
-extern int strncmp P((const char *, const char *, size_t));
-extern char *strchr P((const char *, int));
-extern char *strrchr P((const char *, int));
-extern char *strstr P((const char *s1, const char *s2));
-extern size_t strlen P((const char *));
-extern long strtol P((const char *, char **, int));
+extern char *strcpy(char *, const char *);
+extern char *strcat(char *, const char *);
+extern char *strncpy(char *, const char *, size_t);
+extern int strcmp(const char *, const char *);
+extern int strncmp(const char *, const char *, size_t);
+extern char *strchr(const char *, int);
+extern char *strrchr(const char *, int);
+extern char *strstr(const char *s1, const char *s2);
+extern size_t strlen(const char *);
+extern long strtol(const char *, char **, int);
-extern aptr_t memset P((aptr_t, int, size_t));
-extern aptr_t memcpy P((aptr_t, const aptr_t, size_t));
-extern aptr_t memmove P((aptr_t, const aptr_t, size_t));
-extern aptr_t memchr P((const aptr_t, int, size_t));
-extern int memcmp P((const aptr_t, const aptr_t, size_t));
+extern aptr_t memset(aptr_t, int, size_t);
+extern aptr_t memcpy(aptr_t, const aptr_t, size_t);
+extern aptr_t memmove(aptr_t, const aptr_t, size_t);
+extern aptr_t memchr(const aptr_t, int, size_t);
+extern int memcmp(const aptr_t, const aptr_t, size_t);
#endif /* ! defined(HAVE_STRING_H) && ! defined(HAVE_STRINGS_H) */
#ifndef VMS
-extern char *strerror P((int));
+extern char *strerror(int);
#else
-extern char *strerror P((int,...));
+extern char *strerror(int,...);
#endif
-#if ! defined(_MSC_VER) && ! defined(__GNU_LIBRARY__)
-extern size_t strftime P((char *, size_t, const char *, const struct tm *));
-#endif
-#ifdef __STDC__
-extern time_t time P((time_t *));
-#else
-extern long time();
+#if ! defined(__GNU_LIBRARY__)
+extern size_t strftime(char *, size_t, const char *, const struct tm *);
#endif
+extern time_t time(time_t *);
-extern FILE *fdopen P((int, const char *));
-extern int fprintf P((FILE *, const char *, ...));
-#if ! defined(MSDOS) && ! defined(__GNU_LIBRARY__)
-#ifdef __STDC__
-extern size_t fwrite P((const aptr_t, size_t, size_t, FILE *));
-#else
-extern int fwrite();
+extern FILE *fdopen(int, const char *);
+extern int fprintf(FILE *, const char *, ...);
+#if ! defined(__GNU_LIBRARY__)
+extern size_t fwrite(const aptr_t, size_t, size_t, FILE *);
#endif
-extern int fputs P((const char *, FILE *));
-extern int unlink P((const char *));
-#endif
-extern int fflush P((FILE *));
-extern int fclose P((FILE *));
-extern FILE *popen P((const char *, const char *));
-extern int pclose P((FILE *));
-extern void abort P(());
-extern int isatty P((int));
-extern void exit P((int));
-extern int system P((const char *));
-extern int sscanf P((const char *, const char *, ...));
+extern int fputs(const char *, FILE *);
+extern int unlink(const char *);
+extern int fflush(FILE *);
+extern int fclose(FILE *);
+extern FILE *popen(const char *, const char *);
+extern int pclose(FILE *);
+extern void abort();
+extern int isatty(int);
+extern void exit(int);
+extern int system(const char *);
+extern int sscanf(const char *, const char *, ...);
#ifndef toupper
-extern int toupper P((int));
+extern int toupper(int);
#endif
#ifndef tolower
-extern int tolower P((int));
+extern int tolower(int);
#endif
-extern double pow P((double x, double y));
-extern double atof P((const char *));
-extern double strtod P((const char *, char **));
-extern int fstat P((int, struct stat *));
-extern int stat P((const char *, struct stat *));
-extern off_t lseek P((int, off_t, int));
-extern int close P((int));
-extern int creat P((const char *, mode_t));
-extern int open P((const char *, int, ...));
-extern int pipe P((int *));
-extern int dup P((int));
-extern int dup2 P((int,int));
-extern int fork P(());
-extern int execl P((const char *, const char *, ...));
-#ifndef __STDC__
-extern int read P((int, void *, unsigned int));
-#endif
+extern double pow(double x, double y);
+extern double atof(const char *);
+extern double strtod(const char *, char **);
+extern int fstat(int, struct stat *);
+extern int stat(const char *, struct stat *);
+extern off_t lseek(int, off_t, int);
+extern int close(int);
+extern int creat(const char *, mode_t);
+extern int open(const char *, int, ...);
+extern int pipe(int *);
+extern int dup(int);
+extern int dup2(int,int);
+extern int fork();
+extern int execl(const char *, const char *, ...);
#ifndef HAVE_SYS_WAIT_H
-extern int wait P((int *));
-#endif
-extern void _exit P((int));
-
-#ifndef __STDC__
-extern long time P((long *));
+extern int wait(int *);
#endif
+extern void _exit(int);
-extern SPRINTF_RET sprintf P((char *, const char *, ...));
+extern SPRINTF_RET sprintf(char *, const char *, ...);
#undef aptr_t
diff --git a/re.c b/re.c
index 142c4bc5..860e1d13 100644
--- a/re.c
+++ b/re.c
@@ -31,15 +31,16 @@ static void check_bracket_exp(char *s, size_t len);
/* make_regexp --- generate compiled regular expressions */
Regexp *
-make_regexp(const char *s, size_t len, int ignorecase, int dfa)
+make_regexp(const char *s, size_t len, int ignorecase, int dfa, int canfatal)
{
Regexp *rp;
const char *rerr;
const char *src = s;
- char *temp;
+ static char *buf = NULL;
+ static size_t buflen;
const char *end = s + len;
- register char *dest;
- register int c, c2;
+ char *dest;
+ int c, c2;
static short first = TRUE;
static short no_dfa = FALSE;
int has_anchor = FALSE;
@@ -65,12 +66,18 @@ make_regexp(const char *s, size_t len, int ignorecase, int dfa)
/* Handle escaped characters first. */
/*
- * Build a copy of the string (in dest) with the
+ * Build a copy of the string (in buf) with the
* escaped characters translated, and generate the regex
- * from that.
+ * from that.
*/
- emalloc(dest, char *, len + 2, "make_regexp");
- temp = dest;
+ if (buf == NULL) {
+ emalloc(buf, char *, len + 2, "make_regexp");
+ buflen = len;
+ } else if (len > buflen) {
+ erealloc(buf, char *, len + 2, "make_regexp");
+ buflen = len;
+ }
+ dest = buf;
while (src < end) {
#ifdef MBS_SUPPORT
@@ -154,7 +161,7 @@ make_regexp(const char *s, size_t len, int ignorecase, int dfa)
*dest = '\0' ; /* Only necessary if we print dest ? */
emalloc(rp, Regexp *, sizeof(*rp), "make_regexp");
memset((char *) rp, 0, sizeof(*rp));
- rp->dfareg = dfaalloc();
+ rp->dfareg = NULL;
rp->pat.allocated = 0; /* regex will allocate the buffer */
emalloc(rp->pat.fastmap, char *, 256, "make_regexp");
@@ -189,28 +196,34 @@ make_regexp(const char *s, size_t len, int ignorecase, int dfa)
dfasyntax(syn | (ignorecase ? RE_ICASE : 0), ignorecase ? TRUE : FALSE, '\n');
re_set_syntax(syn);
- len = dest - temp;
- if ((rerr = re_compile_pattern(temp, len, &(rp->pat))) != NULL)
- fatal("%s: /%s/", rerr, temp); /* rerr already gettextized inside regex routines */
+ len = dest - buf;
+ if ((rerr = re_compile_pattern(buf, len, &(rp->pat))) != NULL) {
+ refree(rp);
+ if (! canfatal) {
+ error("%s: /%s/", rerr, buf); /* rerr already gettextized inside regex routines */
+ return NULL;
+ }
+ fatal("%s: /%s/", rerr, buf);
+ }
/* gack. this must be done *after* re_compile_pattern */
rp->pat.newline_anchor = FALSE; /* don't get \n in middle of string */
if (dfa && ! no_dfa) {
- dfacomp(temp, len, rp->dfareg, TRUE);
rp->dfa = TRUE;
+ rp->dfareg = dfaalloc();
+ dfacomp(buf, len, rp->dfareg, TRUE);
} else
rp->dfa = FALSE;
rp->has_anchor = has_anchor;
-
- free(temp);
+
return rp;
}
/* research --- do a regexp search. use dfa if possible */
int
-research(Regexp *rp, register char *str, int start,
- register size_t len, int flags)
+research(Regexp *rp, char *str, int start,
+ size_t len, int flags)
{
const char *ret = str;
int try_backref;
@@ -244,7 +257,7 @@ research(Regexp *rp, register char *str, int start,
if (rp->dfa && ! no_bol && ! need_start) {
char save;
int count = 0;
- /*
+ /*
* dfa likes to stick a '\n' right after the matched
* text. So we just save and restore the character.
*/
@@ -282,8 +295,9 @@ refree(Regexp *rp)
* version of regex, but it's a good idea to keep it
* here in case regex internals change in the future.)
*/
+ if (rp == NULL)
+ return;
rp->pat.translate = NULL;
-
regfree(& rp->pat);
if (rp->regs.start)
free(rp->regs.start);
@@ -293,9 +307,9 @@ refree(Regexp *rp)
dfafree(rp->dfareg);
free(rp->dfareg);
}
- free(rp);
+ efree(rp);
}
-
+
/* dfaerror --- print an error message for the dfa routines */
void
@@ -316,16 +330,13 @@ re_update(NODE *t)
assert(t->type == Node_regex);
return t->re_reg;
}
- t1 = force_string(tree_eval(t->re_exp));
+ t1 = t->re_exp;
if (t->re_text != NULL) {
- if (cmp_nodes(t->re_text, t1) == 0) {
- free_temp(t1);
+ if (cmp_nodes(t->re_text, t1) == 0)
return t->re_reg;
- }
unref(t->re_text);
}
t->re_text = dupnode(t1);
- free_temp(t1);
}
if (t->re_reg != NULL)
refree(t->re_reg);
@@ -334,13 +345,13 @@ re_update(NODE *t)
if (t->re_cnt > 10)
t->re_cnt = 0;
if (t->re_text == NULL || (t->re_flags & CASE) != IGNORECASE) {
- t1 = force_string(tree_eval(t->re_exp));
+ t1 = t->re_exp;
unref(t->re_text);
t->re_text = dupnode(t1);
- free_temp(t1);
}
t->re_reg = make_regexp(t->re_text->stptr, t->re_text->stlen,
- IGNORECASE, t->re_cnt);
+ IGNORECASE, t->re_cnt, TRUE);
+
t->re_flags &= ~CASE;
t->re_flags |= IGNORECASE;
return t->re_reg;
@@ -466,6 +477,17 @@ reflags2str(int flagval)
return genflags2str(flagval, values);
}
+/* dfawarn() is called by the dfa routines whenever a regex is compiled
+ must supply a dfawarn. */
+extern void
+dfawarn(const char *dfa_warning)
+{
+ /*
+ * This routine does nothing, since gawk does it's own
+ * (better) check for bad [[:foo:]] syntax.
+ */
+}
+
/* check_bracket_exp --- look for /[:space:]/ that should be /[[:space:]]/ */
static void
diff --git a/regcomp.c b/regcomp.c
index 5115d7a0..62eb884e 100644
--- a/regcomp.c
+++ b/regcomp.c
@@ -213,11 +213,13 @@ btowc (int c)
{
wchar_t wtmp[2];
char tmp[2];
+ mbstate_t mbs;
+ memset(& mbs, 0, sizeof(mbs));
tmp[0] = c;
tmp[1] = 0;
- mbtowc (wtmp, tmp, 1);
+ mbrtowc (wtmp, tmp, 1, & mbs);
return wtmp[0];
}
#endif
diff --git a/regex.h b/regex.h
index de933278..f09435c5 100644
--- a/regex.h
+++ b/regex.h
@@ -196,6 +196,7 @@ extern reg_syntax_t re_syntax_options;
| RE_NO_BK_PARENS | RE_NO_BK_REFS \
| RE_NO_BK_VBAR | RE_NO_EMPTY_RANGES \
| RE_DOT_NEWLINE | RE_CONTEXT_INDEP_ANCHORS \
+ | RE_CHAR_CLASSES \
| RE_UNMATCHED_RIGHT_PAREN_ORD | RE_NO_GNU_OPS)
#define RE_SYNTAX_GNU_AWK \
diff --git a/regex_internal.c b/regex_internal.c
index dad17a81..193854cf 100644
--- a/regex_internal.c
+++ b/regex_internal.c
@@ -692,10 +692,10 @@ re_string_reconstruct (re_string_t *pstr, int idx, int eflags)
}
else
{
+#ifdef RE_ENABLE_I18N
/* No, skip all characters until IDX. */
int prev_valid_len = pstr->valid_len;
-#ifdef RE_ENABLE_I18N
if (BE (pstr->offsets_needed, 0))
{
pstr->len = pstr->raw_len - idx + offset;
diff --git a/regexec.c b/regexec.c
index aee502d2..0c2b054b 100644
--- a/regexec.c
+++ b/regexec.c
@@ -3059,7 +3059,9 @@ check_arrival_add_next_nodes (re_match_context_t *mctx, int str_idx,
const re_dfa_t *const dfa = mctx->dfa;
int result;
int cur_idx;
+#ifdef RE_ENABLE_I18N
reg_errcode_t err = REG_NOERROR;
+#endif
re_node_set union_set;
re_node_set_init_empty (&union_set);
for (cur_idx = 0; cur_idx < cur_nodes->nelem; ++cur_idx)
diff --git a/replace.c b/replace.c
index 4444cbb3..ea99822d 100644
--- a/replace.c
+++ b/replace.c
@@ -31,21 +31,8 @@
#include "awk.h"
-#ifdef atarist
-/*
- * this will work with gcc compiler - for other compilers you may
- * have to replace path separators in this file into backslashes
- */
-#include "unsupported/atari/stack.c"
-#include "unsupported/atari/tmpnam.c"
-#endif /* atarist */
-
#ifndef HAVE_SYSTEM
-#ifdef atarist
-#include "unsupported/atari/system.c"
-#else
#include "missing_d/system.c"
-#endif
#endif /* HAVE_SYSTEM */
#ifndef HAVE_MEMCMP
@@ -91,13 +78,7 @@
#ifndef HAVE_TZSET
#include "missing_d/tzset.c"
#endif /* HAVE_TZSET */
-
-#if defined TANDEM
-#include "strdupc"
-#include "getidc"
-#include "strnchkc"
-#endif /* TANDEM */
-
+
#ifndef HAVE_MKTIME
/* mktime.c defines main() if DEBUG is set */
#undef DEBUG
@@ -115,3 +96,7 @@
#ifndef HAVE_USLEEP
#include "missing_d/usleep.c"
#endif
+
+#ifndef HAVE_SETENV
+#include "missing_d/setenv.c"
+#endif
diff --git a/test/ChangeLog b/test/ChangeLog
index e3196dc5..2ad540dc 100644
--- a/test/ChangeLog
+++ b/test/ChangeLog
@@ -1,3 +1,50 @@
+Fri Nov 12 11:58:40 2010 Arnold D. Robbins <arnold@skeeve.com>
+
+ * Makefile.am (dumpvars): New test.
+ * dumpvars.in, dumpvars.ok: New files.
+
+Thu Nov 11 16:29:06 2010 Arnold D. Robbins <arnold@skeeve.com>
+
+ * backgsub.ok: Updated to match change in code.
+ * posix2008sub.awk, posix2008.ok: New files, renamed from ...
+ * psx96sub.awk, psx96sub.ok: Removed.
+ * Makefile.am (posix2008sub): Renamed from `psx96sub'.
+
+Tue Nov 2 12:14:50 2010 Arnold D. Robbins <arnold@skeeve.com>
+
+ * badargs.ok: Updated.
+
+Mon Nov 1 21:44:48 2010 Arnold D. Robbins <arnold@skeeve.com>
+
+ New tests for arrays of arrays, courtesy of John Haque
+ <j.eh@mchsi.com>.
+
+ * Makefile.am (aadelete1, aadelete2, aarray1,
+ aasort, aasorti): New tests.
+ * aadelete1.awk, aadelete1.ok, aadelete2.awk, aadelete2.ok,
+ aarray1.awk, aarray1.ok, aasort.awk, aasort.ok,
+ aasorti.awk, aasorti.ok: New files.
+
+ Unrelated:
+ * badargs.ok: Updated.
+
+Tue Oct 26 20:49:41 2010 Arnold D. Robbins <arnold@skeeve.com>
+
+ * Makefile.am (switch2): Made into a test.
+ * switch2.ok: New file.
+
+Tue Oct 19 08:26:03 2010 Arnold D. Robbins <arnold@skeeve.com>
+
+ * Makefile.am (gsubtst6, mbstr1, mbprintf3, printfbad2):
+ Re-enable these tests that got lost during the merge. Thanks
+ to Scott Deifik for noticing.
+
+Fri Oct 15 14:20:22 2010 Arnold D. Robbins <arnold@skeeve.com>
+
+ * Makefile.am (beginfile1, range1): New tests.
+ * beginfile1.awk, beginfile1.in, beginfile1.ok: New files.
+ * range1.awk, range1.in, range1.ok: New files.
+
Sun Jun 27 22:01:38 2010 Arnold D. Robbins <arnold@skeeve.com>
* badargs.ok: Updated with new usage message.
diff --git a/test/Makefile.am b/test/Makefile.am
index 5bc02d1f..347e8d24 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -30,6 +30,16 @@ EXTRA_DIST = \
Gentests.vms \
Maketests \
README \
+ aadelete1.awk \
+ aadelete1.ok \
+ aadelete2.awk \
+ aadelete2.ok \
+ aarray1.awk \
+ aarray1.ok \
+ aasort.awk \
+ aasort.ok \
+ aasorti.awk \
+ aasorti.ok \
addcomma.awk \
addcomma.in \
addcomma.ok \
@@ -100,6 +110,8 @@ EXTRA_DIST = \
backw.in \
backw.ok \
badargs.ok \
+ beginfile1.awk \
+ beginfile1.ok \
binmode1.ok \
childin.awk \
childin.in \
@@ -153,6 +165,8 @@ EXTRA_DIST = \
double1.ok \
double2.awk \
double2.ok \
+ dumpvars.in \
+ dumpvars.ok \
dynlj.awk \
dynlj.ok \
eofsplit.awk \
@@ -494,6 +508,8 @@ EXTRA_DIST = \
posix.awk \
posix.in \
posix.ok \
+ posix2008sub.awk \
+ posix2008sub.ok \
poundbang.awk \
prdupval.awk \
prdupval.in \
@@ -521,10 +537,11 @@ EXTRA_DIST = \
prt1eval.ok \
prtoeval.awk \
prtoeval.ok \
- psx96sub.awk \
- psx96sub.ok \
rand.awk \
rand.ok \
+ range1.awk \
+ range1.in \
+ range1.ok \
rebt8b1.awk \
rebt8b1.ok \
rebt8b2.awk \
@@ -644,6 +661,7 @@ EXTRA_DIST = \
swaplns.in \
swaplns.ok \
switch2.awk \
+ switch2.ok \
synerr1.awk \
synerr1.ok \
synerr2.awk \
@@ -712,14 +730,15 @@ BASIC_TESTS = addcomma anchgsub argarray arrayparm arrayprm2 arrayprm3 \
fnarray fnarray2 fnaryscl fnasgnm fnmisc fordel forref forsimp \
fsbs fsrs fsspcoln fstabplus funsemnl funsmnam funstack getline \
getline2 getline3 getlnbuf getnr2tb getnr2tm gsubasgn gsubtest gsubtst2 \
- gsubtst3 gsubtst4 gsubtst5 hex hsprint inputred intest intprec iobug1 \
+ gsubtst3 gsubtst4 gsubtst5 gsubtst6 hex hsprint inputred intest intprec iobug1 \
leaddig leadnl litoct longsub longwrds manglprm math membug1 messages \
minusstr mmap8k mtchi18n nasty nasty2 negexp nested nfldstr nfneg \
nfset nlfldsep nlinstr nlstrina noeffect nofile nofmtch noloop1 \
noloop2 nonl noparms nors nulrsend numindex numsubstr octsub ofmt \
ofmtbig ofmtfidl ofmts onlynl opasnidx opasnslf paramdup paramres \
paramtyp parse1 parsefld parseme pcntplus prdupval prec printf0 \
- printf1 prmarscl prmreuse prt1eval prtoeval psx96sub rand rebt8b1 \
+ printf1 prmarscl prmreuse prt1eval prtoeval posix2008sub rand range1 \
+ rebt8b1 \
redfilnm regeq reindops reparse resplit rs rsnul1nl rsnulbig rsnulbig2 \
rstest1 rstest2 rstest3 rstest4 rstest5 rswhite scalar sclforin sclifin \
sortempty splitargv splitarr splitdef splitvar splitwht strcat1 strnum1 \
@@ -730,14 +749,17 @@ BASIC_TESTS = addcomma anchgsub argarray arrayparm arrayprm2 arrayprm3 \
UNIX_TESTS = fflush getlnhd localenl pid pipeio1 pipeio2 poundbang space strftlng
-GAWK_EXT_TESTS = argtest backw badargs binmode1 clos1way devfd devfd1 devfd2 \
+GAWK_EXT_TESTS = \
+ aadelete1 aadelete2 aarray1 aasort aasorti \
+ argtest backw badargs beginfile1 binmode1 clos1way \
+ devfd devfd1 devfd2 dumpvars \
fieldwdth fpat1 funlen fsfwfs fwtest fwtest2 gensub gensub2 getlndir \
gnuops2 gnuops3 gnureops \
icasefs icasers igncdym igncfs ignrcas2 ignrcase indirectcall lint \
- lintold manyfiles match1 match2 match3 nondec nondec2 patsplit \
- posix printfbad1 \
+ lintold manyfiles match1 match2 match3 mbstr1 nondec nondec2 patsplit \
+ posix printfbad1 printfbad2 \
procinfs rebuf regx8bit reint reint2 rsstart1 rsstart2 rsstart3 \
- rstest6 shadow splitarg4 strftime strtonum
+ rstest6 shadow splitarg4 strftime strtonum switch2
EXTRA_TESTS = regtest inftest
@@ -746,7 +768,7 @@ INET_TESTS = inetechu inetecht inetdayu inetdayt
MACHINE_TESTS = double1 double2 fmtspcl intformat
LOCALE_CHARSET_TESTS = asort asorti fmttest fnarydel fnparydl lc_num1 mbfw1 \
- mbprintf1 mbprintf2 rebt8b2 sort1 sprintfc whiny
+ mbprintf1 mbprintf2 mbprintf3 rebt8b2 sort1 sprintfc whiny
# List of the tests which should be run with --lint option:
NEED_LINT = defref fmtspcl noeffect nofmtch shadow uninit2 uninit3 uninit4 uninit5 uninitialized
@@ -758,7 +780,7 @@ NEED_LINT_OLD = lintold
FAIL_CODE1 = fnarray2 fnmisc gsubasgn mixed1 noparms paramdup synerr1 synerr2 unterm
# List of the files that appear in manual tests or are for reserve testing:
-GENTESTS_UNUSED = Makefile.in gtlnbufv.awk printfloat.awk switch2.awk
+GENTESTS_UNUSED = Makefile.in gtlnbufv.awk printfloat.awk
CMP = cmp
AWKPROG = ../gawk$(EXEEXT)
@@ -1274,6 +1296,16 @@ printfbad2: printfbad2.ok
@$(AWK) --lint -f $(srcdir)/$@.awk $(srcdir)/$@.in 2>&1 | sed 's;\$(srcdir)/;;g' >_$@ || echo EXIT CODE: $$? >>_$@
@-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@
+beginfile1::
+ @echo $@
+ @AWKPATH=$(srcdir) $(AWK) -f $@.awk $(srcdir)/$@.awk . ./no/such/file $(srcdir)/Makefile >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
+ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@
+
+dumpvars::
+ @echo $@
+ @AWKPATH=$(srcdir) $(AWK) --dump-variables 1 < $(srcdir)/$@.in >/dev/null 2>&1 || echo EXIT CODE: $$? >>_$@
+ @mv awkvars.out _$@
+ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@
# Targets generated for other tests:
include Maketests
diff --git a/test/Makefile.in b/test/Makefile.in
index d74773ec..f62add56 100644
--- a/test/Makefile.in
+++ b/test/Makefile.in
@@ -69,9 +69,9 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/arch.m4 \
$(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libsigsegv.m4 \
$(top_srcdir)/m4/longlong.m4 $(top_srcdir)/m4/nls.m4 \
$(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \
- $(top_srcdir)/m4/socket.m4 $(top_srcdir)/m4/stdint_h.m4 \
- $(top_srcdir)/m4/uintmax_t.m4 $(top_srcdir)/m4/ulonglong.m4 \
- $(top_srcdir)/configure.ac
+ $(top_srcdir)/m4/readline.m4 $(top_srcdir)/m4/socket.m4 \
+ $(top_srcdir)/m4/stdint_h.m4 $(top_srcdir)/m4/uintmax_t.m4 \
+ $(top_srcdir)/m4/ulonglong.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
@@ -122,6 +122,7 @@ LDFLAGS = @LDFLAGS@
LIBICONV = @LIBICONV@
LIBINTL = @LIBINTL@
LIBOBJS = @LIBOBJS@
+LIBREADLINE = @LIBREADLINE@
LIBS = @LIBS@
LIBSIGSEGV = @LIBSIGSEGV@
LIBSIGSEGV_PREFIX = @LIBSIGSEGV_PREFIX@
@@ -214,6 +215,16 @@ EXTRA_DIST = \
Gentests.vms \
Maketests \
README \
+ aadelete1.awk \
+ aadelete1.ok \
+ aadelete2.awk \
+ aadelete2.ok \
+ aarray1.awk \
+ aarray1.ok \
+ aasort.awk \
+ aasort.ok \
+ aasorti.awk \
+ aasorti.ok \
addcomma.awk \
addcomma.in \
addcomma.ok \
@@ -284,6 +295,8 @@ EXTRA_DIST = \
backw.in \
backw.ok \
badargs.ok \
+ beginfile1.awk \
+ beginfile1.ok \
binmode1.ok \
childin.awk \
childin.in \
@@ -337,6 +350,8 @@ EXTRA_DIST = \
double1.ok \
double2.awk \
double2.ok \
+ dumpvars.in \
+ dumpvars.ok \
dynlj.awk \
dynlj.ok \
eofsplit.awk \
@@ -678,6 +693,8 @@ EXTRA_DIST = \
posix.awk \
posix.in \
posix.ok \
+ posix2008sub.awk \
+ posix2008sub.ok \
poundbang.awk \
prdupval.awk \
prdupval.in \
@@ -705,10 +722,11 @@ EXTRA_DIST = \
prt1eval.ok \
prtoeval.awk \
prtoeval.ok \
- psx96sub.awk \
- psx96sub.ok \
rand.awk \
rand.ok \
+ range1.awk \
+ range1.in \
+ range1.ok \
rebt8b1.awk \
rebt8b1.ok \
rebt8b2.awk \
@@ -828,6 +846,7 @@ EXTRA_DIST = \
swaplns.in \
swaplns.ok \
switch2.awk \
+ switch2.ok \
synerr1.awk \
synerr1.ok \
synerr2.awk \
@@ -896,14 +915,15 @@ BASIC_TESTS = addcomma anchgsub argarray arrayparm arrayprm2 arrayprm3 \
fnarray fnarray2 fnaryscl fnasgnm fnmisc fordel forref forsimp \
fsbs fsrs fsspcoln fstabplus funsemnl funsmnam funstack getline \
getline2 getline3 getlnbuf getnr2tb getnr2tm gsubasgn gsubtest gsubtst2 \
- gsubtst3 gsubtst4 gsubtst5 hex hsprint inputred intest intprec iobug1 \
+ gsubtst3 gsubtst4 gsubtst5 gsubtst6 hex hsprint inputred intest intprec iobug1 \
leaddig leadnl litoct longsub longwrds manglprm math membug1 messages \
minusstr mmap8k mtchi18n nasty nasty2 negexp nested nfldstr nfneg \
nfset nlfldsep nlinstr nlstrina noeffect nofile nofmtch noloop1 \
noloop2 nonl noparms nors nulrsend numindex numsubstr octsub ofmt \
ofmtbig ofmtfidl ofmts onlynl opasnidx opasnslf paramdup paramres \
paramtyp parse1 parsefld parseme pcntplus prdupval prec printf0 \
- printf1 prmarscl prmreuse prt1eval prtoeval psx96sub rand rebt8b1 \
+ printf1 prmarscl prmreuse prt1eval prtoeval posix2008sub rand range1 \
+ rebt8b1 \
redfilnm regeq reindops reparse resplit rs rsnul1nl rsnulbig rsnulbig2 \
rstest1 rstest2 rstest3 rstest4 rstest5 rswhite scalar sclforin sclifin \
sortempty splitargv splitarr splitdef splitvar splitwht strcat1 strnum1 \
@@ -913,20 +933,23 @@ BASIC_TESTS = addcomma anchgsub argarray arrayparm arrayprm2 arrayprm3 \
zero2 zeroe0 zeroflag
UNIX_TESTS = fflush getlnhd localenl pid pipeio1 pipeio2 poundbang space strftlng
-GAWK_EXT_TESTS = argtest backw badargs binmode1 clos1way devfd devfd1 devfd2 \
+GAWK_EXT_TESTS = \
+ aadelete1 aadelete2 aarray1 aasort aasorti \
+ argtest backw badargs beginfile1 binmode1 clos1way \
+ devfd devfd1 devfd2 dumpvars \
fieldwdth fpat1 funlen fsfwfs fwtest fwtest2 gensub gensub2 getlndir \
gnuops2 gnuops3 gnureops \
icasefs icasers igncdym igncfs ignrcas2 ignrcase indirectcall lint \
- lintold manyfiles match1 match2 match3 nondec nondec2 patsplit \
- posix printfbad1 \
+ lintold manyfiles match1 match2 match3 mbstr1 nondec nondec2 patsplit \
+ posix printfbad1 printfbad2 \
procinfs rebuf regx8bit reint reint2 rsstart1 rsstart2 rsstart3 \
- rstest6 shadow splitarg4 strftime strtonum
+ rstest6 shadow splitarg4 strftime strtonum switch2
EXTRA_TESTS = regtest inftest
INET_TESTS = inetechu inetecht inetdayu inetdayt
MACHINE_TESTS = double1 double2 fmtspcl intformat
LOCALE_CHARSET_TESTS = asort asorti fmttest fnarydel fnparydl lc_num1 mbfw1 \
- mbprintf1 mbprintf2 rebt8b2 sort1 sprintfc whiny
+ mbprintf1 mbprintf2 mbprintf3 rebt8b2 sort1 sprintfc whiny
# List of the tests which should be run with --lint option:
@@ -939,7 +962,7 @@ NEED_LINT_OLD = lintold
FAIL_CODE1 = fnarray2 fnmisc gsubasgn mixed1 noparms paramdup synerr1 synerr2 unterm
# List of the files that appear in manual tests or are for reserve testing:
-GENTESTS_UNUSED = Makefile.in gtlnbufv.awk printfloat.awk switch2.awk
+GENTESTS_UNUSED = Makefile.in gtlnbufv.awk printfloat.awk
CMP = cmp
AWKPROG = ../gawk$(EXEEXT)
all: all-am
@@ -1620,6 +1643,17 @@ printfbad2: printfbad2.ok
@echo $@
@$(AWK) --lint -f $(srcdir)/$@.awk $(srcdir)/$@.in 2>&1 | sed 's;\$(srcdir)/;;g' >_$@ || echo EXIT CODE: $$? >>_$@
@-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@
+
+beginfile1::
+ @echo $@
+ @AWKPATH=$(srcdir) $(AWK) -f $@.awk $(srcdir)/$@.awk . ./no/such/file $(srcdir)/Makefile >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
+ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@
+
+dumpvars::
+ @echo $@
+ @AWKPATH=$(srcdir) $(AWK) --dump-variables 1 < $(srcdir)/$@.in >/dev/null 2>&1 || echo EXIT CODE: $$? >>_$@
+ @mv awkvars.out _$@
+ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@
Gt-dummy:
# file Maketests, generated from Makefile.am by the Gentests program
addcomma:
@@ -2227,8 +2261,8 @@ prtoeval:
@AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
@-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@
-psx96sub:
- @echo psx96sub
+posix2008sub:
+ @echo posix2008sub
@AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
@-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@
@@ -2237,6 +2271,11 @@ rand:
@AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
@-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@
+range1:
+ @echo range1
+ @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
+ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@
+
rebt8b1:
@echo rebt8b1
@AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
@@ -2452,6 +2491,31 @@ getlnhd:
@AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
@-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@
+aadelete1:
+ @echo aadelete1
+ @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
+ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@
+
+aadelete2:
+ @echo aadelete2
+ @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
+ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@
+
+aarray1:
+ @echo aarray1
+ @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
+ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@
+
+aasort:
+ @echo aasort
+ @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
+ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@
+
+aasorti:
+ @echo aasorti
+ @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
+ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@
+
backw:
@echo backw
@AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
@@ -2632,6 +2696,11 @@ strtonum:
@AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
@-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@
+switch2:
+ @echo switch2
+ @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
+ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@
+
double1:
@echo double1
@AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
diff --git a/test/Maketests b/test/Maketests
index e4c19747..dc69aaf2 100644
--- a/test/Maketests
+++ b/test/Maketests
@@ -605,8 +605,8 @@ prtoeval:
@AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
@-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@
-psx96sub:
- @echo psx96sub
+posix2008sub:
+ @echo posix2008sub
@AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
@-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@
@@ -615,6 +615,11 @@ rand:
@AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
@-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@
+range1:
+ @echo range1
+ @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
+ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@
+
rebt8b1:
@echo rebt8b1
@AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
@@ -830,6 +835,31 @@ getlnhd:
@AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
@-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@
+aadelete1:
+ @echo aadelete1
+ @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
+ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@
+
+aadelete2:
+ @echo aadelete2
+ @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
+ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@
+
+aarray1:
+ @echo aarray1
+ @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
+ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@
+
+aasort:
+ @echo aasort
+ @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
+ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@
+
+aasorti:
+ @echo aasorti
+ @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
+ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@
+
backw:
@echo backw
@AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
@@ -1010,6 +1040,11 @@ strtonum:
@AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
@-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@
+switch2:
+ @echo switch2
+ @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
+ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@
+
double1:
@echo double1
@AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
diff --git a/test/aadelete1.awk b/test/aadelete1.awk
new file mode 100644
index 00000000..2484a057
--- /dev/null
+++ b/test/aadelete1.awk
@@ -0,0 +1,19 @@
+BEGIN {
+ a[1][1] = 11
+ a[1][2] = 12
+ a[2] = 2
+ delete a[1][1]
+ f(a, a[1])
+ print a[1][1]
+ print length(a), length(a[1])
+ delete a
+ print length(a), length(a[1]), length(a)
+ a[1][1] = 11
+}
+
+function f(c, b) {
+ delete b
+ b[1] = 1
+ print c[1][1], b[1]
+ delete c[2]
+}
diff --git a/test/aadelete1.ok b/test/aadelete1.ok
new file mode 100644
index 00000000..d4b678b5
--- /dev/null
+++ b/test/aadelete1.ok
@@ -0,0 +1,6 @@
+1 1
+1
+1 1
+0 0 1
+gawk: aadelete1.awk:11: fatal: attempt to use scalar `a["1"]' as an array
+EXIT CODE: 2
diff --git a/test/aadelete2.awk b/test/aadelete2.awk
new file mode 100644
index 00000000..54bd49a7
--- /dev/null
+++ b/test/aadelete2.awk
@@ -0,0 +1,10 @@
+BEGIN {
+ a[1][1]=1;
+ b[1][1]=11;
+# delete b[a[1]][1];
+ f(b, a)
+}
+
+function f(arr, s) {
+ delete arr[s[1]][1]
+}
diff --git a/test/aadelete2.ok b/test/aadelete2.ok
new file mode 100644
index 00000000..65a21efb
--- /dev/null
+++ b/test/aadelete2.ok
@@ -0,0 +1,2 @@
+gawk: aadelete2.awk:9: fatal: attempt to use array `a["1"]' in a scalar context
+EXIT CODE: 2
diff --git a/test/aarray1.awk b/test/aarray1.awk
new file mode 100644
index 00000000..a3c4f936
--- /dev/null
+++ b/test/aarray1.awk
@@ -0,0 +1,28 @@
+BEGIN {
+ a[1][1] = 10;
+ a[1][2] = 20;
+ a[1][3] = 30;
+ a[2] = "hello world! we have multi-dimensional array"
+ a[3, "X"] = "Y"
+ print length(a), length(a[1])
+ delete a[2]
+ delete a[3, "X"]
+ a[2][1] = 100;
+ a[2][2] = 200;
+ a[2][3] = 300;
+ for (i in a) {
+ sum[i] = 0
+ for (j in a[i])
+ sum[i] += a[i][j]
+ }
+ print sum[1], sum[2]
+ f(a[1])
+ print a[1][1]
+}
+
+function f(x, i)
+{
+ for (i=1;i<=length(x);i++)
+ print x[i]
+ x[1] = 1001
+}
diff --git a/test/aarray1.ok b/test/aarray1.ok
new file mode 100644
index 00000000..a3354988
--- /dev/null
+++ b/test/aarray1.ok
@@ -0,0 +1,6 @@
+3 3
+60 600
+10
+20
+30
+1001
diff --git a/test/aasort.awk b/test/aasort.awk
new file mode 100644
index 00000000..a072a827
--- /dev/null
+++ b/test/aasort.awk
@@ -0,0 +1,34 @@
+function init(b, a, i)
+{
+ a[1] = "aardvark"
+ a[2] = "animal"
+ a[3] = "zebra"
+ a[4] = "zoo"
+ a[5] = "Iguana"
+ a[6] = "Alligator"
+ a[7] = "Nouns"
+ a[8] = "people"
+ for (i in a)
+ b[IGNORECASE][i] = a[i]
+}
+
+BEGIN {
+
+ for (IGNORECASE = 0; IGNORECASE < 2; IGNORECASE++) {
+ init(b)
+
+ n = asort(b[IGNORECASE])
+
+ for (i = 1; i <= n; i++)
+ printf("b[%d][%d] = \"%s\"\n", IGNORECASE, i, b[IGNORECASE][i])
+
+ print "============"
+ }
+
+ IGNORECASE = 1
+ init(b)
+ b[2][1] = ""
+ n = asort(b[1], b[2])
+ for (i = 1; i <= n; i++)
+ printf("b[2][%d] = \"%s\"\n", i, b[2][i])
+}
diff --git a/test/aasort.ok b/test/aasort.ok
new file mode 100644
index 00000000..ed5f6f2a
--- /dev/null
+++ b/test/aasort.ok
@@ -0,0 +1,26 @@
+b[0][1] = "Alligator"
+b[0][2] = "Iguana"
+b[0][3] = "Nouns"
+b[0][4] = "aardvark"
+b[0][5] = "animal"
+b[0][6] = "people"
+b[0][7] = "zebra"
+b[0][8] = "zoo"
+============
+b[1][1] = "aardvark"
+b[1][2] = "Alligator"
+b[1][3] = "animal"
+b[1][4] = "Iguana"
+b[1][5] = "Nouns"
+b[1][6] = "people"
+b[1][7] = "zebra"
+b[1][8] = "zoo"
+============
+b[2][1] = "aardvark"
+b[2][2] = "Alligator"
+b[2][3] = "animal"
+b[2][4] = "Iguana"
+b[2][5] = "Nouns"
+b[2][6] = "people"
+b[2][7] = "zebra"
+b[2][8] = "zoo"
diff --git a/test/aasorti.awk b/test/aasorti.awk
new file mode 100644
index 00000000..04164372
--- /dev/null
+++ b/test/aasorti.awk
@@ -0,0 +1,35 @@
+function init(b, a, i)
+{
+ delete a
+
+ a["aardvark"] = 1
+ a["animal"] = 2
+ a["zebra"] = 3
+ a["zoo"] = 4
+ a["Iguana"] = 5
+ a["Alligator"] = 6
+ a["Nouns"] = 7
+ a["people"] = 8
+ for (i in a)
+ b[IGNORECASE][i] = a[i]
+}
+
+BEGIN {
+
+ for (IGNORECASE = 0; IGNORECASE < 2; IGNORECASE++) {
+ init(b)
+
+ n = asorti(b[IGNORECASE])
+
+ for (i = 1; i <= n; i++)
+ printf("b[%d][%d] = \"%s\"\n", IGNORECASE, i, b[IGNORECASE][i])
+
+ print "============"
+
+ }
+
+ n = asorti(b)
+ for (i = 1; i <= n; i++)
+ printf("b[%d] = \"%s\"\n", i, b[i])
+
+}
diff --git a/test/aasorti.ok b/test/aasorti.ok
new file mode 100644
index 00000000..7a914241
--- /dev/null
+++ b/test/aasorti.ok
@@ -0,0 +1,20 @@
+b[0][1] = "Alligator"
+b[0][2] = "Iguana"
+b[0][3] = "Nouns"
+b[0][4] = "aardvark"
+b[0][5] = "animal"
+b[0][6] = "people"
+b[0][7] = "zebra"
+b[0][8] = "zoo"
+============
+b[1][1] = "aardvark"
+b[1][2] = "Alligator"
+b[1][3] = "animal"
+b[1][4] = "Iguana"
+b[1][5] = "Nouns"
+b[1][6] = "people"
+b[1][7] = "zebra"
+b[1][8] = "zoo"
+============
+b[1] = "0"
+b[2] = "1"
diff --git a/test/arrayparm.ok b/test/arrayparm.ok
index 4dd199f4..5fe09aa3 100644
--- a/test/arrayparm.ok
+++ b/test/arrayparm.ok
@@ -1,2 +1,2 @@
-gawk: arrayparm.awk:18: fatal: attempt to use array `i (from foo)' in a scalar context
+gawk: arrayparm.awk:13: fatal: attempt to use array `i (from foo)' in a scalar context
EXIT CODE: 2
diff --git a/test/aryprm3.ok b/test/aryprm3.ok
index 63c51312..a855deab 100644
--- a/test/aryprm3.ok
+++ b/test/aryprm3.ok
@@ -1,2 +1,2 @@
-gawk: aryprm3.awk:6: fatal: attempt to use array `a (from arr)' in a scalar context
+gawk: aryprm3.awk:4: fatal: attempt to use array `a (from arr)' in a scalar context
EXIT CODE: 2
diff --git a/test/backgsub.ok b/test/backgsub.ok
index e2e265fa..2d3f17f0 100644
--- a/test/backgsub.ok
+++ b/test/backgsub.ok
@@ -1 +1 @@
-\\x\\y\\z
+\x\y\z
diff --git a/test/badargs.ok b/test/badargs.ok
index aac60786..bbaf2a46 100644
--- a/test/badargs.ok
+++ b/test/badargs.ok
@@ -5,18 +5,17 @@ POSIX options: GNU long options: (standard)
-f progfile --file=progfile
-F fs --field-separator=fs
-v var=val --assign=var=val
-POSIX options: GNU long options: (extensions)
+Short options: GNU long options: (extensions)
-m[fr] val
-b --characters-as-bytes
- -c --compat, --traditional
- -C --copyleft, --copyright
+ -c --traditional
+ -C --copyright
-d [file] --dump-variables[=file]
-e 'program-text' --source='program-text'
-E file --exec=file
-g --gen-pot
- -h --help, --usage
- -l [fatal] --lint[=fatal]
- -L --lint-old
+ -h --help
+ -L [fatal] --lint[=fatal]
-n --non-decimal-data
-N --use-lc-numeric
-O --optimize
@@ -24,6 +23,7 @@ POSIX options: GNU long options: (extensions)
-P --posix
-r --re-interval
-S --sandbox
+ -t --lint-old
-V --version
To report bugs, see node `Bugs' in `gawk.info', which is
diff --git a/test/beginfile1.awk b/test/beginfile1.awk
new file mode 100644
index 00000000..0cd148be
--- /dev/null
+++ b/test/beginfile1.awk
@@ -0,0 +1,19 @@
+BEGINFILE {
+ print "In BEGINFILE:"
+ filename = FILENAME
+ gsub(/.*[/]/, "", filename)
+ printf "\tFILENAME = %s, FNR = %d, ERRNO = \"%s\"\n", filename, FNR, ERRNO
+
+ if (ERRNO != "")
+ nextfile
+}
+
+FNR == 1 { print "processing", filename }
+FNR > 1 { nextfile }
+
+ENDFILE {
+ print "In ENDFILE:"
+ filename = FILENAME
+ gsub(/.*[/]/, "", filename)
+ printf "\tFILENAME = %s, FNR = %d, ERRNO = \"%s\"\n", filename, FNR, ERRNO
+}
diff --git a/test/beginfile1.ok b/test/beginfile1.ok
new file mode 100644
index 00000000..1318c7d5
--- /dev/null
+++ b/test/beginfile1.ok
@@ -0,0 +1,14 @@
+In BEGINFILE:
+ FILENAME = beginfile1.awk, FNR = 0, ERRNO = ""
+processing beginfile1.awk
+In ENDFILE:
+ FILENAME = beginfile1.awk, FNR = 2, ERRNO = ""
+In BEGINFILE:
+ FILENAME = ., FNR = 0, ERRNO = "Is a directory"
+In BEGINFILE:
+ FILENAME = file, FNR = 0, ERRNO = "No such file or directory"
+In BEGINFILE:
+ FILENAME = Makefile, FNR = 0, ERRNO = ""
+processing Makefile
+In ENDFILE:
+ FILENAME = Makefile, FNR = 2, ERRNO = ""
diff --git a/test/concat4.awk b/test/concat4.awk
index e6cf24fb..91820d8b 100644
--- a/test/concat4.awk
+++ b/test/concat4.awk
@@ -1,7 +1,9 @@
{
a = $0
+ print a
print index(a,"b")
getline
a = a $0
+ print a
print index(a,"b")
}
diff --git a/test/concat4.ok b/test/concat4.ok
index 4f1d7cd3..38db1f81 100644
--- a/test/concat4.ok
+++ b/test/concat4.ok
@@ -1,2 +1,4 @@
+foo
0
+foobar
4
diff --git a/test/defref.ok b/test/defref.ok
index e0061a0d..962b3fd0 100644
--- a/test/defref.ok
+++ b/test/defref.ok
@@ -1,3 +1,3 @@
-gawk: defref.awk:2: warning: function `foo' called but never defined
+gawk: warning: function `foo' called but never defined
gawk: defref.awk:1: fatal: function `foo' not defined
EXIT CODE: 2
diff --git a/test/dumpvars.in b/test/dumpvars.in
new file mode 100644
index 00000000..b1e67221
--- /dev/null
+++ b/test/dumpvars.in
@@ -0,0 +1,3 @@
+A
+B
+C
diff --git a/test/dumpvars.ok b/test/dumpvars.ok
new file mode 100644
index 00000000..361c2507
--- /dev/null
+++ b/test/dumpvars.ok
@@ -0,0 +1,24 @@
+ARGC: 1
+ARGIND: 0
+ARGV: array, 1 elements
+BINMODE: 0
+CONVFMT: "%.6g"
+ERRNO: ""
+FIELDWIDTHS: ""
+FILENAME: "-"
+FNR: 3
+FPAT: " "
+FS: " "
+IGNORECASE: 0
+LINT: 0
+NF: 1
+NR: 3
+OFMT: "%.6g"
+OFS: " "
+ORS: "\n"
+RLENGTH: 0
+RS: "\n"
+RSTART: 0
+RT: "\n"
+SUBSEP: "\034"
+TEXTDOMAIN: "messages"
diff --git a/test/fmtspcl.tok b/test/fmtspcl.tok
index 6bfb077d..ba823b83 100644
--- a/test/fmtspcl.tok
+++ b/test/fmtspcl.tok
@@ -1,9 +1,9 @@
gawk: fmtspcl.awk:10: warning: sqrt: called with negative argument -1
-gawk: fmtspcl.awk:6: warning: [s]printf: value positive_nan is out of range for `%x' format
-gawk: fmtspcl.awk:6: warning: [s]printf: value positive_nan is out of range for `%d' format
-gawk: fmtspcl.awk:6: warning: [s]printf: value negative_nan is out of range for `%x' format
-gawk: fmtspcl.awk:6: warning: [s]printf: value negative_nan is out of range for `%d' format
-gawk: fmtspcl.awk:6: warning: [s]printf: value positive_infinity is out of range for `%x' format
-gawk: fmtspcl.awk:6: warning: [s]printf: value positive_infinity is out of range for `%d' format
-gawk: fmtspcl.awk:6: warning: [s]printf: value negative_infinity is out of range for `%x' format
-gawk: fmtspcl.awk:6: warning: [s]printf: value negative_infinity is out of range for `%d' format
+gawk: fmtspcl.awk:3: warning: [s]printf: value positive_nan is out of range for `%x' format
+gawk: fmtspcl.awk:3: warning: [s]printf: value positive_nan is out of range for `%d' format
+gawk: fmtspcl.awk:3: warning: [s]printf: value negative_nan is out of range for `%x' format
+gawk: fmtspcl.awk:3: warning: [s]printf: value negative_nan is out of range for `%d' format
+gawk: fmtspcl.awk:3: warning: [s]printf: value positive_infinity is out of range for `%x' format
+gawk: fmtspcl.awk:3: warning: [s]printf: value positive_infinity is out of range for `%d' format
+gawk: fmtspcl.awk:3: warning: [s]printf: value negative_infinity is out of range for `%x' format
+gawk: fmtspcl.awk:3: warning: [s]printf: value negative_infinity is out of range for `%d' format
diff --git a/test/fnarray.ok b/test/fnarray.ok
index c680c349..04260b0f 100644
--- a/test/fnarray.ok
+++ b/test/fnarray.ok
@@ -1,5 +1,5 @@
gawk: fnarray.awk:5: Num = foo[c]
gawk: fnarray.awk:5: ^ use of non-array as array
-gawk: fnarray.awk:5: fatal: function `foo' called with space between name and `(',
+gawk: fnarray.awk:5: error: function `foo' called with space between name and `(',
or used as a variable or an array
-EXIT CODE: 2
+EXIT CODE: 1
diff --git a/test/fsbs.awk b/test/fsbs.awk
index d2ec52ee..1c6f9d68 100644
--- a/test/fsbs.awk
+++ b/test/fsbs.awk
@@ -1,2 +1,2 @@
BEGIN { FS = "\\" }
-{ print $1, $2 }
+{ print $1, $2}
diff --git a/test/funsmnam.ok b/test/funsmnam.ok
index c0234f3a..f6465258 100644
--- a/test/funsmnam.ok
+++ b/test/funsmnam.ok
@@ -1,2 +1,2 @@
-gawk: funsmnam.awk:6: fatal: function `foo': can't use function name as parameter name
-EXIT CODE: 2
+gawk: funsmnam.awk:6: error: function `foo': can't use function name as parameter name
+EXIT CODE: 1
diff --git a/test/inftest.ok b/test/inftest.ok
index 83a93d01..9086ca72 100644
--- a/test/inftest.ok
+++ b/test/inftest.ok
@@ -1,105 +1,105 @@
100000 100
100000000 100000
-1e+11 100000000
-1e+14 1e+11
-1e+17 1e+14
-1e+20 1e+17
-1e+23 1e+20
-1e+26 1e+23
-1e+29 1e+26
-1e+32 1e+29
-1e+35 1e+32
-1e+38 1e+35
-1e+41 1e+38
-1e+44 1e+41
-1e+47 1e+44
-1e+50 1e+47
-1e+53 1e+50
-1e+56 1e+53
-1e+59 1e+56
-1e+62 1e+59
-1e+65 1e+62
-1e+68 1e+65
-1e+71 1e+68
-1e+74 1e+71
-1e+77 1e+74
-1e+80 1e+77
-1e+83 1e+80
-1e+86 1e+83
-1e+89 1e+86
-1e+92 1e+89
-1e+95 1e+92
-1e+98 1e+95
-1e+101 1e+98
-1e+104 1e+101
-1e+107 1e+104
-1e+110 1e+107
-1e+113 1e+110
-1e+116 1e+113
-1e+119 1e+116
-1e+122 1e+119
-1e+125 1e+122
-1e+128 1e+125
-1e+131 1e+128
-1e+134 1e+131
-1e+137 1e+134
-1e+140 1e+137
-1e+143 1e+140
-1e+146 1e+143
-1e+149 1e+146
-1e+152 1e+149
-1e+155 1e+152
-1e+158 1e+155
-1e+161 1e+158
-1e+164 1e+161
-1e+167 1e+164
-1e+170 1e+167
-1e+173 1e+170
-1e+176 1e+173
-1e+179 1e+176
-1e+182 1e+179
-1e+185 1e+182
-1e+188 1e+185
-1e+191 1e+188
-1e+194 1e+191
-1e+197 1e+194
-1e+200 1e+197
-1e+203 1e+200
-1e+206 1e+203
-1e+209 1e+206
-1e+212 1e+209
-1e+215 1e+212
-1e+218 1e+215
-1e+221 1e+218
-1e+224 1e+221
-1e+227 1e+224
-1e+230 1e+227
-1e+233 1e+230
-1e+236 1e+233
-1e+239 1e+236
-1e+242 1e+239
-1e+245 1e+242
-1e+248 1e+245
-1e+251 1e+248
-1e+254 1e+251
-1e+257 1e+254
-1e+260 1e+257
-1e+263 1e+260
-1e+266 1e+263
-1e+269 1e+266
-1e+272 1e+269
-1e+275 1e+272
-1e+278 1e+275
-1e+281 1e+278
-1e+284 1e+281
-1e+287 1e+284
-1e+290 1e+287
-1e+293 1e+290
-1e+296 1e+293
-1e+299 1e+296
-1e+302 1e+299
-1e+305 1e+302
-1e+308 1e+305
-Inf 1e+308
+100000000000 100000000
+100000000000000 100000000000
+100000000000000000 100000000000000
+100000000000000000000 100000000000000000
+99999999999999991611392 100000000000000000000
+99999999999999987584860160 99999999999999991611392
+99999999999999991433150857216 99999999999999987584860160
+99999999999999987351763694911488 99999999999999991433150857216
+99999999999999978416622034208423936 99999999999999987351763694911488
+99999999999999978859343891977453174784 99999999999999978416622034208423936
+99999999999999981277195531206711524196352 99999999999999978859343891977453174784
+99999999999999989014320776740338242315878400 99999999999999981277195531206711524196352
+99999999999999984102174700855949311516153479168 99999999999999989014320776740338242315878400
+99999999999999986860582406952576489172979654066176 99999999999999984102174700855949311516153479168
+99999999999999978054446934877508831185257879708893184 99999999999999986860582406952576489172979654066176
+99999999999999987412212025203316576428059584082518999040 99999999999999978054446934877508831185257879708893184
+99999999999999986018415450295152630082077192041996404916224 99999999999999987412212025203316576428059584082518999040
+99999999999999980666236602647803076113504806606389643480924160 99999999999999986018415450295152630082077192041996404916224
+99999999999999975825012428989187159563798798233702140870647611392 99999999999999980666236602647803076113504806606389643480924160
+99999999999999971335279399108653394842078992129280704487622839369728 99999999999999975825012428989187159563798798233702140870647611392
+99999999999999967408259575639813195298814735056613421464603838774247424 99999999999999971335279399108653394842078992129280704487622839369728
+99999999999999970056411870256069142542038397972347690757785041907511984128 99999999999999967408259575639813195298814735056613421464603838774247424
+99999999999999972567252564410741448076354167255414257198727219693125789286400 99999999999999970056411870256069142542038397972347690757785041907511984128
+99999999999999973698536947569070602057895480263592729374358127316211945338568704 99999999999999972567252564410741448076354167255414257198727219693125789286400
+99999999999999976120719655945885896110010116988012672708945321528841504187721187328 99999999999999973698536947569070602057895480263592729374358127316211945338568704
+99999999999999973856084135905232153357980849678363696123425190035433415775017926393856 99999999999999976120719655945885896110010116988012672708945321528841504187721187328
+99999999999999971205813538737655658983034598563985922382199344722004978592608624454926336 99999999999999973856084135905232153357980849678363696123425190035433415775017926393856
+99999999999999975389707388132869751436283080323216967861681212523470671424572109115849965568 99999999999999971205813538737655658983034598563985922382199344722004978592608624454926336
+99999999999999972379113067962648670423437470097331363676661611216816006398674924910108594929664 99999999999999975389707388132869751436283080323216967861681212523470671424572109115849965568
+99999999999999969414835583487354067580020253874920922632950003776417566988560774307532476147302400 99999999999999972379113067962648670423437470097331363676661611216816006398674924910108594929664
+99999999999999966622249050912868528133293762816112494334490172638967005189080435307857566164815183872 99999999999999969414835583487354067580020253874920922632950003776417566988560774307532476147302400
+99999999999999968362880378347121775677131631329985434686086700429684016230704354433915805708681998237696 99999999999999966622249050912868528133293762816112494334490172638967005189080435307857566164815183872
+99999999999999964288808425678149603140240254511229112583149913097811514958423455725153206182008585870901248 99999999999999968362880378347121775677131631329985434686086700429684016230704354433915805708681998237696
+99999999999999968982139315152805545902739120606436395645733092104128636424091051037647720836736356917448802304 99999999999999964288808425678149603140240254511229112583149913097811514958423455725153206182008585870901248
+99999999999999967380149038212122984106472840979272309693704700336639058963809845170982926501255944400227237101568 99999999999999968982139315152805545902739120606436395645733092104128636424091051037647720836736356917448802304
+99999999999999966559930016418493512466784505810164297686266163751684395304145867767250551801489973191409795717922816 99999999999999967380149038212122984106472840979272309693704700336639058963809845170982926501255944400227237101568
+99999999999999958580839372410066012355896381285081556877904079853245427222934695583742010722166605272033725937822466048 99999999999999966559930016418493512466784505810164297686266163751684395304145867767250551801489973191409795717922816
+99999999999999964744616902883383199809977537409440210268672488243000947267704701436097240209969526960208587421285248663552 99999999999999958580839372410066012355896381285081556877904079853245427222934695583742010722166605272033725937822466048
+99999999999999973698435499708622381138622312668787627138462205955970454339251530402644148459414217665561018763215928972804096 99999999999999964744616902883383199809977537409440210268672488243000947267704701436097240209969526960208587421285248663552
+99999999999999969038927015485337257005892808638742964825108028921863830855986242882741442632031065833582205967834822157445103616 99999999999999973698435499708622381138622312668787627138462205955970454339251530402644148459414217665561018763215928972804096
+99999999999999971501552402759992207773332814897718827642591733325954247602754580648099053350606729046973846898142049707859353010176 99999999999999969038927015485337257005892808638742964825108028921863830855986242882741442632031065833582205967834822157445103616
+99999999999999971974376477116725958320681296099442193303548604571539607618134101499047714608573256383945041956761037397538888893857792 99999999999999971501552402759992207773332814897718827642591733325954247602754580648099053350606729046973846898142049707859353010176
+99999999999999961968158199529955173403994504587771180275938657358298495399329094904038179293313627194069297996226940583414097499461255168 99999999999999971974376477116725958320681296099442193303548604571539607618134101499047714608573256383945041956761037397538888893857792
+99999999999999963620798121505576670783782774669698779846950364769001543610951083090052657384091991757042324095515152702392127562019650928640 99999999999999961968158199529955173403994504587771180275938657358298495399329094904038179293313627194069297996226940583414097499461255168
+99999999999999959051579265227378354828144165547185352553017196119889755915458610153359828358707969413334501536203103835841670045058198329622528 99999999999999963620798121505576670783782774669698779846950364769001543610951083090052657384091991757042324095515152702392127562019650928640
+99999999999999949000651624039424488856392748028506927595932797882554670922470130425357587563315085893427279408697133232798530309970250449591205888 99999999999999959051579265227378354828144165547185352553017196119889755915458610153359828358707969413334501536203103835841670045058198329622528
+99999999999999948113397321920763733791300209102720142496272933762293366867916664628678769065514886520635469455372468241633342802321107464319475384320 99999999999999949000651624039424488856392748028506927595932797882554670922470130425357587563315085893427279408697133232798530309970250449591205888
+99999999999999946478010192255648230055321641354709940200579872215827731234563716472240370810369559036705605349404445729917669188222207113866621719937024 99999999999999948113397321920763733791300209102720142496272933762293366867916664628678769065514886520635469455372468241633342802321107464319475384320
+99999999999999941174994859794900356607455139003828857556412504641155163420811223250296124735018310448815699341785471398594311548904172910798168237564493824 99999999999999946478010192255648230055321641354709940200579872215827731234563716472240370810369559036705605349404445729917669188222207113866621719937024
+99999999999999946510014354963832392659989467263634555857239408609611720064878292922562279944578696396604449694432883048689164539589319460636017298848184532992 99999999999999941174994859794900356607455139003828857556412504641155163420811223250296124735018310448815699341785471398594311548904172910798168237564493824
+99999999999999941339618318502970259434219055418702861961123734820753251454399578543040337524341888072347466495524305815225809869759600290050307580026961994448896 99999999999999946510014354963832392659989467263634555857239408609611720064878292922562279944578696396604449694432883048689164539589319460636017298848184532992
+99999999999999936244924684387270937819452376396255450979411565991520333252255420434433659770484396036007906295905408882388258279623991724679211271428480374583328768 99999999999999941339618318502970259434219055418702861961123734820753251454399578543040337524341888072347466495524305815225809869759600290050307580026961994448896
+99999999999999938393087270819114040015608114939367394621582908707281601350665380747521463661052072678153904384780012012657644738335288324478035879665769565830174998528 99999999999999936244924684387270937819452376396255450979411565991520333252255420434433659770484396036007906295905408882388258279623991724679211271428480374583328768
+99999999999999936402865781218259783047588779268187110073864544713098209344824228945072115447009943309125688250630284464918540788778765150873943899767450589406430224187392 99999999999999938393087270819114040015608114939367394621582908707281601350665380747521463661052072678153904384780012012657644738335288324478035879665769565830174998528
+99999999999999932755942024273873371963453979756196963399477041511967210604015516252752299267005165619015879149232552133229875362054559318652887774917983563976477694532517888 99999999999999936402865781218259783047588779268187110073864544713098209344824228945072115447009943309125688250630284464918540788778765150873943899767450589406430224187392
+99999999999999930449370010469988507729535311264848842396946780663816593047475793966409789645392732105835839886983821660858314734516991018179899807013191242951604188717858684928 99999999999999932755942024273873371963453979756196963399477041511967210604015516252752299267005165619015879149232552133229875362054559318652887774917983563976477694532517888
+99999999999999926062929060790372034489260266271016529998992090319447875774239110669868148490692058544771170935690235939685426866834118273051840402906249046168301887374323926171648 99999999999999930449370010469988507729535311264848842396946780663816593047475793966409789645392732105835839886983821660858314734516991018179899807013191242951604188717858684928
+99999999999999932742916262928110023686347842483162394048718371574133692602240984883924588271717248394482781662747380635887994975485943351991473842104185224408145227922919218275680256 99999999999999926062929060790372034489260266271016529998992090319447875774239110669868148490692058544771170935690235939685426866834118273051840402906249046168301887374323926171648
+99999999999999937578305619730709881245839649374381910536023685232697991459255307073630546336657965129832648296622676548394350483652119629822535399195325784877482862571061024201468018688 99999999999999932742916262928110023686347842483162394048718371574133692602240984883924588271717248394482781662747380635887994975485943351991473842104185224408145227922919218275680256
+99999999999999940476708761993653639767353567573372418760219182512524240452181745662269903053828283531977973233064610020242062507278752512846344394977566526684664367671371585724203629805568 99999999999999937578305619730709881245839649374381910536023685232697991459255307073630546336657965129832648296622676548394350483652119629822535399195325784877482862571061024201468018688
+99999999999999943939334382617117116614388861848433079252058069929489999249064530962831054545274423916407588090467239874609462471504703263765454875272083466230310539097875936556698439887355904 99999999999999940476708761993653639767353567573372418760219182512524240452181745662269903053828283531977973233064610020242062507278752512846344394977566526684664367671371585724203629805568
+99999999999999945838831865930559938199048223279323498721866831026796929789068801756281743363439163784437548240813825394719579023308653389983938338747932758781065010280415466156238449989365268480 99999999999999943939334382617117116614388861848433079252058069929489999249064530962831054545274423916407588090467239874609462471504703263765454875272083466230310539097875936556698439887355904
+99999999999999945320142419820435818384997240317928354845311051996492317289611635544950141936825645484474167122425851108694843196896054742184544454321460845295205656016170005273590724564176578019328 99999999999999945838831865930559938199048223279323498721866831026796929789068801756281743363439163784437548240813825394719579023308653389983938338747932758781065010280415466156238449989365268480
+99999999999999945984064910841394691746982498508514139007302449155282221288916808295454591762890948908427294953962458194806505054704181011367768626387344894557105629474404195203379813108418101808988160 99999999999999945320142419820435818384997240317928354845311051996492317289611635544950141936825645484474167122425851108694843196896054742184544454321460845295205656016170005273590724564176578019328
+99999999999999946663921541646856578069655402895673981989181639845883082984205305191971148384781819614555297853455943850984846797099702311011390178582810161001291202295636005691483839777721422169600163840 99999999999999945984064910841394691746982498508514139007302449155282221288916808295454591762890948908427294953962458194806505054704181011367768626387344894557105629474404195203379813108418101808988160
+99999999999999950423256767348738624679507494994913049741780812688629607814472577630949099881189578271160702686495122135388605295849976889520759913602854898331059745767919424966503865648301062435640300273664 99999999999999946663921541646856578069655402895673981989181639845883082984205305191971148384781819614555297853455943850984846797099702311011390178582810161001291202295636005691483839777721422169600163840
+99999999999999952561900806859142633417556685166924608285481675461392075273469070396234334510257103195807332991512965781627187908472355316406090251747591460011994739387707325709626369254675257786987577889259520 99999999999999950423256767348738624679507494994913049741780812688629607814472577630949099881189578271160702686495122135388605295849976889520759913602854898331059745767919424966503865648301062435640300273664
+99999999999999953583887505206514362393179124843789865061564861085069499723208194405671971965000837773131802726604159332043065252957502554000360109335689571620590875005483303878073176311374606605551396952498765824 99999999999999952561900806859142633417556685166924608285481675461392075273469070396234334510257103195807332991512965781627187908472355316406090251747591460011994739387707325709626369254675257786987577889259520
+99999999999999952387871071940561618997707835439092695988754367280903005281456350993484382532249312964925794716623151108470655652097170243947180298855446753006645226008223187712942284395877311531026424700205065568256 99999999999999953583887505206514362393179124843789865061564861085069499723208194405671971965000837773131802726604159332043065252957502554000360109335689571620590875005483303878073176311374606605551396952498765824
+99999999999999949479159106237764547059921659606869180803679246349170090799115867815044165031797604631368783236349339108742555502804842065897846999767496218137529407646886585199343955257387889909781692182626786546286592 99999999999999952387871071940561618997707835439092695988754367280903005281456350993484382532249312964925794716623151108470655652097170243947180298855446753006645226008223187712942284395877311531026424700205065568256
+99999999999999944462702596124645891625322848571590225772913900944379346496098343983932109923650153122211091016053956392579903624277946816512554707950971843053782716275082490927470794772649923189521302964942310388818509824 99999999999999949479159106237764547059921659606869180803679246349170090799115867815044165031797604631368783236349339108742555502804842065897846999767496218137529407646886585199343955257387889909781692182626786546286592
+99999999999999935312685921678317464112614617243241411796797910926041028887394380515983721406389201569507460406235178318299226597844889881633781567677631382901028751212911822975574150048487871891766353031885825877596727934976 99999999999999944462702596124645891625322848571590225772913900944379346496098343983932109923650153122211091016053956392579903624277946816512554707950971843053782716275082490927470794772649923189521302964942310388818509824
+99999999999999925121172612428343793833196719162992122293014542956141676109475130820315172455795108724278546368407554066019724438999593062658631582946511398090887633074892676187328287237126462895417822131010561164466052696899584 99999999999999935312685921678317464112614617243241411796797910926041028887394380515983721406389201569507460406235178318299226597844889881633781567677631382901028751212911822975574150048487871891766353031885825877596727934976
+99999999999999923774577821631960175979503309145679183912127553433409168077915219634719740955742418263179913081344910551912084411817969328125656926899457609130167051788011178598791027428244645758351900112623945543014980252539551744 99999999999999925121172612428343793833196719162992122293014542956141676109475130820315172455795108724278546368407554066019724438999593062658631582946511398090887633074892676187328287237126462895417822131010561164466052696899584
+99999999999999931186235550175255608646231837880969596760529543766528892283620970800236995932032426561066790693337700453560535121425626362995149433782441663569973131191006941326100105416330167280762734901823877923481682986297169281024 99999999999999923774577821631960175979503309145679183912127553433409168077915219634719740955742418263179913081344910551912084411817969328125656926899457609130167051788011178598791027428244645758351900112623945543014980252539551744
+99999999999999926244211122435874988985291364022870835895660198026268224087667591790522792799935051725787428951685205754489270499428632351279379918495257505223505226338851255072206945321576956278656608039592704406906303898336741140987904 99999999999999931186235550175255608646231837880969596760529543766528892283620970800236995932032426561066790693337700453560535121425626362995149433782441663569973131191006941326100105416330167280762734901823877923481682986297169281024
+99999999999999929678212096225067465275407716143698317730906554837786494102684339719558490519152427611330116881884882071101074945341972190277308907403380897537393781938977720492054992564559758894977208190720194118995253024599530065721556992 99999999999999926244211122435874988985291364022870835895660198026268224087667591790522792799935051725787428951685205754489270499428632351279379918495257505223505226338851255072206945321576956278656608039592704406906303898336741140987904
+99999999999999934027464697975758399456742447587676871566873309064753633557492919833469807883112792522366919110954619485992994007787162184258685917355227282413257687305369471221698329872724925324405572508442926352243067328514674943868432023552 99999999999999929678212096225067465275407716143698317730906554837786494102684339719558490519152427611330116881884882071101074945341972190277308907403380897537393781938977720492054992564559758894977208190720194118995253024599530065721556992
+99999999999999931658510089362616103392015444928828978413665885485809829939554629388445771191253529932525597045759188042988033837604250187536914609806987549374489262254739070824275575934660494247950974071555650923069789750211957733643751155302400 99999999999999934027464697975758399456742447587676871566873309064753633557492919833469807883112792522366919110954619485992994007787162184258685917355227282413257687305369471221698329872724925324405572508442926352243067328514674943868432023552
+99999999999999930008959616293112859796224738437420013453224492299319680604311838985766633961978088205967287665322305220594819971902484905979610812934997258464934032523484110419542163912507469600794108087982303296227853106888209685820101373122838528 99999999999999931658510089362616103392015444928828978413665885485809829939554629388445771191253529932525597045759188042988033837604250187536914609806987549374489262254739070824275575934660494247950974071555650923069789750211957733643751155302400
+99999999999999928518542247684432282053204429513417560406613915867290933910821882480757719383056277328324015189821686388126598502656654628054893970584775442678418248483950216783265386932491560272539433881647796263975373880920399684962968393459422986240 99999999999999930008959616293112859796224738437420013453224492299319680604311838985766633961978088205967287665322305220594819971902484905979610812934997258464934032523484110419542163912507469600794108087982303296227853106888209685820101373122838528
+99999999999999928518542247684432282053204429513417560406613915867290933910821882480757719383056277328324015189821686388126598502656654628054893970584775442678418248483950216783265386932491560272539433881647796263975373880920399684962968393459422986240000 99999999999999928518542247684432282053204429513417560406613915867290933910821882480757719383056277328324015189821686388126598502656654628054893970584775442678418248483950216783265386932491560272539433881647796263975373880920399684962968393459422986240
+99999999999999922996592795455802961330827165322375947146110930199429488582670882113664381815329718099637973843065789366637766292469752383803230100767176235502514017647481584860713016397448254045302728360926807035301219893389307418875317674924228479494914048 99999999999999928518542247684432282053204429513417560406613915867290933910821882480757719383056277328324015189821686388126598502656654628054893970584775442678418248483950216783265386932491560272539433881647796263975373880920399684962968393459422986240000
+99999999999999924596916259346967987109991595095477818460852927555247447077772756937033318891561415264781702052238819144940944834893730090816542497755823854789719470206880795923550835480811748076441516979762172970252823766002091894481097203918579189374244618240 99999999999999922996592795455802961330827165322375947146110930199429488582670882113664381815329718099637973843065789366637766292469752383803230100767176235502514017647481584860713016397448254045302728360926807035301219893389307418875317674924228479494914048
+99999999999999917714245105843845444238961215527321290310410545327345571182038613696688194314104132096931555770227452674414634559636686768493688540787048173759306259839416668984497943167082032947319814887875031157212965830669028421795760605619675656325219701751808 99999999999999924596916259346967987109991595095477818460852927555247447077772756937033318891561415264781702052238819144940944834893730090816542497755823854789719470206880795923550835480811748076441516979762172970252823766002091894481097203918579189374244618240
+99999999999999917154891513686131358215156841822734601038501577120887513966385299198425225459555222734718972453340179716809956645203098485790624854125458785078739344965108473271355866839363046574921352749613726933677028169892754057031491980488082226337743391078481920 99999999999999917714245105843845444238961215527321290310410545327345571182038613696688194314104132096931555770227452674414634559636686768493688540787048173759306259839416668984497943167082032947319814887875031157212965830669028421795760605619675656325219701751808
+99999999999999916696669050990531978944456298883937185186953750366157073495322103961448201373908756185194424200146125709940204497699102964600275082012284757871618928300075199343149877911695652938652532565950066513756388038184830097416603122780280888492002797374893195264 99999999999999917154891513686131358215156841822734601038501577120887513966385299198425225459555222734718972453340179716809956645203098485790624854125458785078739344965108473271355866839363046574921352749613726933677028169892754057031491980488082226337743391078481920
+99999999999999916462059150090385096757857620899272908270961263067735087974137748000115965042057765311837855494510770058422891398177057257750815998690339655941573274967578163091908411580729947396882896631914272378757020290750373030093780027633886603514983613398655768199168 99999999999999916696669050990531978944456298883937185186953750366157073495322103961448201373908756185194424200146125709940204497699102964600275082012284757871618928300075199343149877911695652938652532565950066513756388038184830097416603122780280888492002797374893195264
+99999999999999919104705073829639577707705129718531323452700639997160332884758333548562275084027326509326245394787416117113906151193380099703123113228729284081607514104824779425892288332727654619376075792893457515389898597852097436418059371362871829496127701706994146657435648 99999999999999916462059150090385096757857620899272908270961263067735087974137748000115965042057765311837855494510770058422891398177057257750815998690339655941573274967578163091908411580729947396882896631914272378757020290750373030093780027633886603514983613398655768199168
+99999999999999917628667205152005074893535757519847350463918209828579541545589890129502808820585418873201821072305623991241397547326808505070852666708377840873210208172166305720801657535975480694376249177888356289983316387049097913467480072465518626911750494564591328725835972608 99999999999999919104705073829639577707705129718531323452700639997160332884758333548562275084027326509326245394787416117113906151193380099703123113228729284081607514104824779425892288332727654619376075792893457515389898597852097436418059371362871829496127701706994146657435648
+99999999999999922666876463571664177832567214624688644932295571470668642649951510333225786999800463604506522759710141114219560248524706214749002457497844100357873012422307229300844343988889567691708990690439101806037783666590002951805457412701817558399758028277326280599029531279360 99999999999999917628667205152005074893535757519847350463918209828579541545589890129502808820585418873201821072305623991241397547326808505070852666708377840873210208172166305720801657535975480694376249177888356289983316387049097913467480072465518626911750494564591328725835972608
+99999999999999925375417760898072911572590525964251324838495241089455743403656317354747260068946471652055930386858809519532620516688696023471975785026261161456827735987182989817475292225976180861475072527586382595468665276071193500415954030812851863967710878401292590726058388421083136 99999999999999922666876463571664177832567214624688644932295571470668642649951510333225786999800463604506522759710141114219560248524706214749002457497844100357873012422307229300844343988889567691708990690439101806037783666590002951805457412701817558399758028277326280599029531279360
+99999999999999922998092370787579302987061493839926595503682273926908893827833126734714698563684604017178278892401463993497843047031616968501411767264176243829402332903954893729735214230453302102183242983667397856859617189120845681749826713430824039194924833949628446523134774381262143488 99999999999999925375417760898072911572590525964251324838495241089455743403656317354747260068946471652055930386858809519532620516688696023471975785026261161456827735987182989817475292225976180861475072527586382595468665276071193500415954030812851863967710878401292590726058388421083136
+99999999999999919617007371519321726332086870374220313783059387295731152208884588964001722200645503380907841211395461467581715090185993423654387386446988805425952870741141601516060436636820763422301529854538175117504526576569239895202445639820828910629184681840594996990087856635738954137600 99999999999999922998092370787579302987061493839926595503682273926908893827833126734714698563684604017178278892401463993497843047031616968501411767264176243829402332903954893729735214230453302102183242983667397856859617189120845681749826713430824039194924833949628446523134774381262143488
+99999999999999921555856753499711351089115518454394923972933375405513716362854438463239371366266645249770760995191543556043059505759547789211465047382796770104026930323785255803070101100113406402892899431306036605160309737430832717440175842671744517153922714665999138290318281147731771838693376 99999999999999919617007371519321726332086870374220313783059387295731152208884588964001722200645503380907841211395461467581715090185993423654387386446988805425952870741141601516060436636820763422301529854538175117504526576569239895202445639820828910629184681840594996990087856635738954137600
+99999999999999925526620287795549302591510189722592525641795303054348407750184690237678076857458743797202020712405919673211892868854187129872360096979331481764722604349039459782865893920936739227144024324526616931879353650875374817383047298110419679316586205892426819673190190548293062490532610048 99999999999999921555856753499711351089115518454394923972933375405513716362854438463239371366266645249770760995191543556043059505759547789211465047382796770104026930323785255803070101100113406402892899431306036605160309737430832717440175842671744517153922714665999138290318281147731771838693376
+99999999999999930899630601631288884967321950615787908928575328581457293010297853781604279487826109145954719575470858327758062813887390534835216941233385308743309664972926291225241001006485111871616403608610236482548322786324903784620029930384009841602978861449101533681556294240023997498278499319808 99999999999999925526620287795549302591510189722592525641795303054348407750184690237678076857458743797202020712405919673211892868854187129872360096979331481764722604349039459782865893920936739227144024324526616931879353650875374817383047298110419679316586205892426819673190190548293062490532610048
+99999999999999931494437365022402110086546949875748132981079409245215076632606597507980542351987858564022045373933398563677552329964579755017051039451347591859641897413884141538429337185469061448690967542329331230644001099265478667047129413135161876865818437588564766886374336421681562627784638845681664 99999999999999930899630601631288884967321950615787908928575328581457293010297853781604279487826109145954719575470858327758062813887390534835216941233385308743309664972926291225241001006485111871616403608610236482548322786324903784620029930384009841602978861449101533681556294240023997498278499319808
+99999999999999935453471182153651736480108544950043384274546570143186884422693595750740947975848462690678165888500066373957674548974351204547338797190104548281949236540899593223010902792786229833699265085163625873968835950197945084481903570326829823575278656372832047097643225182794316129777503529896771584 99999999999999931494437365022402110086546949875748132981079409245215076632606597507980542351987858564022045373933398563677552329964579755017051039451347591859641897413884141538429337185469061448690967542329331230644001099265478667047129413135161876865818437588564766886374336421681562627784638845681664
+99999999999999941222697076902451192049310918572154864313272869839431340328494218420806572909572715350322284890650139835338184957968282769155167357390336223856117715957990417585527301167018263517206741135275385698826195289895225377703777542160595791457125916730459689891664596620526624002220028805109925281792 99999999999999935453471182153651736480108544950043384274546570143186884422693595750740947975848462690678165888500066373957674548974351204547338797190104548281949236540899593223010902792786229833699265085163625873968835950197945084481903570326829823575278656372832047097643225182794316129777503529896771584
+Inf 99999999999999941222697076902451192049310918572154864313272869839431340328494218420806572909572715350322284890650139835338184957968282769155167357390336223856117715957990417585527301167018263517206741135275385698826195289895225377703777542160595791457125916730459689891664596620526624002220028805109925281792
Inf Inf
loop terminated
diff --git a/test/nofile.ok b/test/nofile.ok
index 2dee4572..eff8c043 100644
--- a/test/nofile.ok
+++ b/test/nofile.ok
@@ -1,2 +1,2 @@
-gawk: cmd. line:1: fatal: cannot open file `no/such/file' for reading (No such file or directory)
+gawk: fatal: cannot open file `no/such/file' for reading (No such file or directory)
EXIT CODE: 2
diff --git a/test/paramres.ok b/test/paramres.ok
index 6c3d00a3..fdd7483c 100644
--- a/test/paramres.ok
+++ b/test/paramres.ok
@@ -1,2 +1,2 @@
-gawk: paramres.awk:7: fatal: function `foo': can't use special variable `FS' as a function parameter
-EXIT CODE: 2
+gawk: paramres.awk:6: error: function `foo': can't use special variable `FS' as a function parameter
+EXIT CODE: 1
diff --git a/test/parseme.ok b/test/parseme.ok
index 5e6552a3..b13fcaca 100644
--- a/test/parseme.ok
+++ b/test/parseme.ok
@@ -1,4 +1,5 @@
gawk: parseme.awk:1: BEGIN { toupper(substr*line,1,12)) }
gawk: parseme.awk:1: ^ syntax error
-gawk: parseme.awk:1: fatal: 0 is invalid as number of arguments for toupper
-EXIT CODE: 2
+gawk: parseme.awk:1: BEGIN { toupper(substr*line,1,12)) }
+gawk: parseme.awk:1: ^ 2 is invalid as number of arguments for toupper
+EXIT CODE: 1
diff --git a/test/psx96sub.awk b/test/posix2008sub.awk
index 3c7c9b77..3c7c9b77 100644
--- a/test/psx96sub.awk
+++ b/test/posix2008sub.awk
diff --git a/test/psx96sub.ok b/test/posix2008sub.ok
index d6b89ee4..4d4406a4 100644
--- a/test/psx96sub.ok
+++ b/test/posix2008sub.ok
@@ -1,2 +1,2 @@
orig = "here is some text", repl = "<FOO&BAR \q \ \\ \& \\& \\\&>"
-result is "here is <FOOsomeBAR \q \ \\ & \some \&> text"
+result is "here is <FOOsomeBAR \q \ \ & \some \&> text"
diff --git a/test/range1.awk b/test/range1.awk
new file mode 100755
index 00000000..aca5db50
--- /dev/null
+++ b/test/range1.awk
@@ -0,0 +1 @@
+/foo/,/bar/ { print }
diff --git a/test/range1.in b/test/range1.in
new file mode 100644
index 00000000..c4960197
--- /dev/null
+++ b/test/range1.in
@@ -0,0 +1,2 @@
+foobar
+junk
diff --git a/test/range1.ok b/test/range1.ok
new file mode 100644
index 00000000..323fae03
--- /dev/null
+++ b/test/range1.ok
@@ -0,0 +1 @@
+foobar
diff --git a/test/reg/func2.good b/test/reg/func2.good
index a6515c97..55ea9acd 100644
--- a/test/reg/func2.good
+++ b/test/reg/func2.good
@@ -1,2 +1,2 @@
-gawk: reg/func2.awk:2: fatal: function `dummy' called with space between name and `(',
+gawk: reg/func2.awk:2: error: function `dummy' called with space between name and `(',
or used as a variable or an array
diff --git a/test/sclifin.ok b/test/sclifin.ok
index 5bc93016..a3ceeba0 100644
--- a/test/sclifin.ok
+++ b/test/sclifin.ok
@@ -1,2 +1,2 @@
-gawk: sclifin.awk:7: fatal: attempt to use scalar `j' as array
+gawk: sclifin.awk:3: fatal: attempt to use scalar `j' as array
EXIT CODE: 2
diff --git a/test/shadow.ok b/test/shadow.ok
index f543a883..552c63e6 100644
--- a/test/shadow.ok
+++ b/test/shadow.ok
@@ -1,7 +1,7 @@
-gawk: shadow.awk:22: warning: function `bar': parameter `A' shadows global variable
-gawk: shadow.awk:22: warning: function `bar': parameter `Z' shadows global variable
-gawk: shadow.awk:22: warning: function `baz': parameter `C' shadows global variable
-gawk: shadow.awk:22: warning: function `baz': parameter `D' shadows global variable
+gawk: shadow.awk:6: warning: function `bar': parameter `A' shadows global variable
+gawk: shadow.awk:6: warning: function `bar': parameter `Z' shadows global variable
+gawk: shadow.awk:11: warning: function `baz': parameter `C' shadows global variable
+gawk: shadow.awk:11: warning: function `baz': parameter `D' shadows global variable
foo
bar
baz
diff --git a/test/switch2.ok b/test/switch2.ok
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/test/switch2.ok
diff --git a/test/uninit3.ok b/test/uninit3.ok
index a98ddb04..97876723 100644
--- a/test/uninit3.ok
+++ b/test/uninit3.ok
@@ -1,3 +1,3 @@
-gawk: uninit3.awk:8: warning: function `f': parameter `x' shadows global variable
-gawk: uninit3.awk:2: warning: reference to uninitialized variable `x'
+gawk: uninit3.awk:1: warning: function `f': parameter `x' shadows global variable
+gawk: uninit3.awk:2: warning: reference to uninitialized argument `x'
diff --git a/test/uninit5.ok b/test/uninit5.ok
index 88663131..1d2a583c 100644
--- a/test/uninit5.ok
+++ b/test/uninit5.ok
@@ -1,10 +1,9 @@
-gawk: uninit5.awk:75: warning: `length(array)' is a gawk extension
-gawk: uninit5.awk:75: warning: length: untyped parameter argument will be forced to scalar
+gawk: uninit5.awk:75: warning: reference to uninitialized argument `a'
length: 0
-gawk: uninit5.awk:77: warning: length: untyped parameter argument will be forced to scalar
+gawk: uninit5.awk:77: warning: reference to uninitialized argument `a'
-gawk: uninit5.awk:97: warning: length: untyped parameter argument will be forced to scalar
+gawk: uninit5.awk:97: warning: reference to uninitialized argument `a'
length: 0
diff --git a/test/unterm.ok b/test/unterm.ok
index a8e7e598..760d3703 100644
--- a/test/unterm.ok
+++ b/test/unterm.ok
@@ -1,3 +1,5 @@
gawk: unterm.awk:1: BEGIN{x=".........................................................................................................................................................................................................................................................}
gawk: unterm.awk:1: ^ unterminated string
+gawk: unterm.awk:1: BEGIN{x=".........................................................................................................................................................................................................................................................}
+gawk: unterm.awk:1: ^ syntax error
EXIT CODE: 1
diff --git a/unsupported/atari/ChangeLog b/unsupported/atari/ChangeLog
index 7a2cf0e7..371f5ac5 100644
--- a/unsupported/atari/ChangeLog
+++ b/unsupported/atari/ChangeLog
@@ -1,7 +1,3 @@
-Thu May 6 20:55:14 2010 Arnold D. Robbins <arnold@skeeve.com>
-
- * Release 3.1.8: Release tar file made.
-
Tue Jul 21 22:28:56 2009 Arnold D. Robbins <arnold@skeeve.com>
* Release 3.1.7: Release tar file made.
diff --git a/unsupported/tandem/ChangeLog b/unsupported/tandem/ChangeLog
index 48cf2ca3..79abda72 100644
--- a/unsupported/tandem/ChangeLog
+++ b/unsupported/tandem/ChangeLog
@@ -1,7 +1,3 @@
-Thu May 6 20:55:14 2010 Arnold D. Robbins <arnold@skeeve.com>
-
- * Release 3.1.8: Release tar file made.
-
Tue Jul 21 22:28:56 2009 Arnold D. Robbins <arnold@skeeve.com>
* Release 3.1.7: Release tar file made.
diff --git a/version.c b/version.c
index f6072031..727de7e9 100644
--- a/version.c
+++ b/version.c
@@ -1,55 +1,3 @@
#include "config.h"
-const char *version_string = "@(#)GNU Awk 3.1.70";
-
-/* 1.02 fixed /= += *= etc to return the new Left Hand Side instead
- of the Right Hand Side */
-
-/* 1.03 Fixed split() to treat strings of space and tab as FS if
- the split char is ' '.
-
- Added -v option to print version number
-
- Fixed bug that caused rounding when printing large numbers */
-
-/* 2.00beta Incorporated the functionality of the "new" awk as described
- the book (reference not handy). Extensively tested, but no
- doubt still buggy. Badly needs tuning and cleanup, in
- particular in memory management which is currently almost
- non-existent. */
-
-/* 2.01 JF: Modified to compile under GCC, and fixed a few
- bugs while I was at it. I hope I didn't add any more.
- I modified parse.y to reduce the number of reduce/reduce
- conflicts. There are still a few left. */
-
-/* 2.02 Fixed JF's bugs; improved memory management, still needs
- lots of work. */
-
-/* 2.10 Major grammar rework and lots of bug fixes from David.
- Major changes for performance enhancements from David.
- A number of minor bug fixes and new features from Arnold.
- Changes for MSDOS from Conrad Kwok and Scott Garfinkle.
- The gawk.texinfo and info files included! */
-
-/* 2.11 Bug fix release to 2.10. Lots of changes for portability,
- speed, and configurability. */
-
-/* 2.12 Lots of changes for portability, speed, and configurability.
- Several bugs fixed. POSIX compliance. Removal of last set
- of hard-wired limits. Atari and VMS ports added. */
-
-/* 2.13 Public release of 2.12 */
-
-/* 2.14 Mostly bug fixes. */
-
-/* 2.15 Bug fixes plus intermixing of command-line source and files,
- GNU long options, ARGIND, ERRNO and Plan 9 style /dev/ files.
- `delete array'. OS/2 port added. */
-
-/* 3.0 RS as regexp, RT variable, FS = "", fflush builtin, posix
- regexps, IGNORECASE applies to all comparison, autoconf, source
- code cleanup. See the NEWS file. */
-
-/* 3.1 PROCINFO array, LINT variable, mktime builtin, BINMODE variable,
- |&, tcp/ip, i18n stuff. Automake. See NEWS. */
+const char *version_string = "@(#)GNU Awk 3.1.76";
diff --git a/version.in b/version.in
index 053cc175..e7a054d2 100644
--- a/version.in
+++ b/version.in
@@ -1,55 +1,3 @@
#include "config.h"
const char *version_string = "@(#)@PACKAGE_STRING@";
-
-/* 1.02 fixed /= += *= etc to return the new Left Hand Side instead
- of the Right Hand Side */
-
-/* 1.03 Fixed split() to treat strings of space and tab as FS if
- the split char is ' '.
-
- Added -v option to print version number
-
- Fixed bug that caused rounding when printing large numbers */
-
-/* 2.00beta Incorporated the functionality of the "new" awk as described
- the book (reference not handy). Extensively tested, but no
- doubt still buggy. Badly needs tuning and cleanup, in
- particular in memory management which is currently almost
- non-existent. */
-
-/* 2.01 JF: Modified to compile under GCC, and fixed a few
- bugs while I was at it. I hope I didn't add any more.
- I modified parse.y to reduce the number of reduce/reduce
- conflicts. There are still a few left. */
-
-/* 2.02 Fixed JF's bugs; improved memory management, still needs
- lots of work. */
-
-/* 2.10 Major grammar rework and lots of bug fixes from David.
- Major changes for performance enhancements from David.
- A number of minor bug fixes and new features from Arnold.
- Changes for MSDOS from Conrad Kwok and Scott Garfinkle.
- The gawk.texinfo and info files included! */
-
-/* 2.11 Bug fix release to 2.10. Lots of changes for portability,
- speed, and configurability. */
-
-/* 2.12 Lots of changes for portability, speed, and configurability.
- Several bugs fixed. POSIX compliance. Removal of last set
- of hard-wired limits. Atari and VMS ports added. */
-
-/* 2.13 Public release of 2.12 */
-
-/* 2.14 Mostly bug fixes. */
-
-/* 2.15 Bug fixes plus intermixing of command-line source and files,
- GNU long options, ARGIND, ERRNO and Plan 9 style /dev/ files.
- `delete array'. OS/2 port added. */
-
-/* 3.0 RS as regexp, RT variable, FS = "", fflush builtin, posix
- regexps, IGNORECASE applies to all comparison, autoconf, source
- code cleanup. See the NEWS file. */
-
-/* 3.1 PROCINFO array, LINT variable, mktime builtin, BINMODE variable,
- |&, tcp/ip, i18n stuff. Automake. See NEWS. */
diff --git a/vms/ChangeLog b/vms/ChangeLog
index fcb60064..2a9f92af 100644
--- a/vms/ChangeLog
+++ b/vms/ChangeLog
@@ -1,3 +1,53 @@
+Sat Nov 6 16:33:01 2010 Pat Rankin <rankin@pactechdata.com>
+
+ * redirect.h, vms.h: Drop use of P() macro in function prototypes.
+ * vms_misc.c, vms_popen.c: Likewise.
+
+Wed Aug 11 17:47:57 2010 Pat Rankin <rankin@pactechdata.com>
+
+ * redirect.h (vsnprintf): Move #define into !HAVE_SNPRINTF block.
+
+Tue Aug 10 12:57:40 2010 Pat Rankin <rankin@pactechdata.com>
+
+ * redirect.h: Declare vsnprintf and define it to use missing_d one.
+ * vms-conf.h: Add #undef template for HAVE_SETENV.
+
+Mon Aug 9 10:58:03 2010 Arnold Robbins <arnold@skeeve.com>
+
+ * redirect.h: Add decls of setenv, unsetenv, and snprintf to
+ avoid informational warnings from the compiler about undecleared
+ functions.
+
+Thu Aug 5 15:01:55 2010 Arnold Robbins <arnold@skeeve.com>
+
+ * vms-build.com: Correctly build dgawk.
+ * redirect.h (setenv, unsetenv): Define as macros to get the
+ replacement versions in missing_d/.
+
+Mon Mar 8 15:17:41 2010 Pat Rankin <rankin@pactechdata.com>
+
+ * vmstest.com (space): handle alternate error reason.
+ (fmtspcl): suppress this test.
+
+Wed Mar 3 16:29:10 2010 Pat Rankin <rankin@pactechdata.com>
+
+ * vms-conf.h: sync with configh.in; reformat a couple of comments.
+ (PACKAGE_URL): add #undef as placeholder.
+
+Wed Jan 6 19:05:05 2010 Pat Rankin <rankin@pactechdata.com>
+
+ * vms_fwrite.c (tty_fwrite): Check which_gawk, and stick to
+ ordinary fwrite() when it's exe_debugging because dgawk uses
+ other stdio calls besides fwrite for terminal output, and that
+ wouldn't interleave sanely with tty_fwrite()'s terminal output.
+
+Wed Jan 6 19:05:05 2010 Pat Rankin <rankin@pactechdata.com>
+
+ * awk.h (exe_mode): Define new enum: exe_gawking for regular gawk,
+ exe_debugging for dgawk, and exe_profiling for pgawk.
+ (which_gawk): Declare new variable.
+ * eval.c (which_gawk): Define it.
+
Thu May 6 20:55:14 2010 Arnold D. Robbins <arnold@skeeve.com>
* Release 3.1.8: Release tar file made.
diff --git a/vms/descrip.mms b/vms/descrip.mms
index a3abd14b..0357dd2b 100644
--- a/vms/descrip.mms
+++ b/vms/descrip.mms
@@ -16,6 +16,10 @@
# An alternate version which generates some profiling feedback for
# the awk programs it executes. Included with `make all'.
#
+# dgawk.exe :
+# An alternate version which supports debugging.
+# Included with `make all'.
+#
# awkgram.c :
# If you don't have bison but do have VMS POSIX or DEC/Shell,
# change the PARSER and PASERINIT macros to use yacc. If you don't
@@ -25,6 +29,9 @@
# target. If you use bison and it is already defined system-wide,
# comment out the PARSERINIT definition.
#
+# command.c :
+# Similar to awkgram.c; built from command.y with yacc or bison.
+#
# install.help :
# You can make the target 'install.help' to load the VMS help text
# into a help library. Modify the HELPLIB macro if you don't want
@@ -94,6 +101,7 @@ NOOP = continue
# object files
GAWKOBJ = eval.obj,profile.obj
PGAWKOBJ = eval_p.obj,profile_p.obj
+DGAWKOBJ = eval_d.obj,profile.obj,command.obj,debug.obj
AWKOBJ1 = array.obj,awkgram.obj,builtin.obj,dfa.obj,ext.obj,\
field.obj,floatcomp.obj,gawkmisc.obj,getopt.obj,getopt1.obj,io.obj
AWKOBJ2 = main.obj,msg.obj,node.obj,random.obj,re.obj,\
@@ -113,6 +121,8 @@ AWKSRC = array.c,builtin.c,dfa.c,eval.c,eval_p.c,ext.c,field.c,\
msg.c,node.c,profile.c,profile_p.c,random.c,re.c,regcomp.c,\
regex.c,regex_internal.c,regexec.c,replace.c,version.c
+DBGSRC = eval_d.c,debug.c,command.y,cmd.h
+
ALLSRC = $(AWKSRC),awkgram.y,awk.h,custom.h,dfa.h,getopt.h,\
gettext.h,mbsupport.h,protos.h,random.h
@@ -131,7 +141,7 @@ REL=3.1
PATCHLVL=8
# generic target
-all : gawk,pgawk
+all : gawk,pgawk,dgawk
$(NOOP)
# dummy target to allow building "gawk" in addition to explicit "gawk.exe"
@@ -139,14 +149,18 @@ gawk : gawk.exe
$(ECHO) " GAWK "
pgawk : pgawk.exe
$(ECHO) " PGAWK "
+dgawk : dgawk.exe
+ $(ECHO) " DGAWK "
# rules to build gawk
gawk.exe : $(GAWKOBJ) $(AWKOBJS) $(VMSOBJS) gawk.opt
$(LINK) $(LINKFLAGS) gawk.opt/options
-# rules to build pgawk
+# rules to build pgawk and dgawk
pgawk.exe : $(PGAWKOBJ) $(AWKOBJS) $(VMSOBJS) pgawk.opt
$(LINK) $(LINKFLAGS) pgawk.opt/options
+dgawk.exe : $(DGAWKOBJ) $(AWKOBJS) $(VMSOBJS) dgawk.opt
+ $(LINK) $(LINKFLAGS) dgawk.opt/options
gawk.opt : $(MAKEFILE) # create linker options file
open/write opt gawk.opt ! ~ 'cat <<close >gawk.opt'
@@ -176,6 +190,20 @@ pgawk.opt : $(MAKEFILE) # create linker options file
write opt "identification=""V$(REL).$(PATCHLVL)"""
close opt
+dgawk.opt : $(MAKEFILE) # create linker options file
+ open/write opt dgawk.opt
+ write opt "! DGAWK -- GNU awk w/ debugging"
+ @ write opt "$(DGAWKOBJ)"
+ @ write opt "$(AWKOBJ1)"
+ @ write opt "$(AWKOBJ2)"
+ @ write opt "$(VMSOBJS)"
+ @ write opt "psect_attr=environ,noshr !extern [noshare] char **"
+ @ write opt "stack=48 !preallocate more pages (default is 20)"
+ @ write opt "iosegment=128 !ditto (default is 32)"
+ write opt "$(LIBS)"
+ write opt "identification=""V$(REL).$(PATCHLVL)"""
+ close opt
+
vms_misc.obj : $(VMSDIR)vms_misc.c
vms_popen.obj : $(VMSDIR)vms_popen.c
vms_fwrite.obj : $(VMSDIR)vms_fwrite.c
@@ -190,22 +218,33 @@ $(AWKOBJS) : awk.h gettext.h mbsupport.h regex.h dfa.h \
config.h $(VMSDIR)redirect.h
$(GAWKOBJ) : awk.h config.h $(VMSDIR)redirect.h
$(PGAWKOBJ) : awk.h config.h $(VMSDIR)redirect.h
+$(DGAWKOBJ) : awk.h config.h $(VMSDIR)redirect.h
random.obj : random.h
builtin.obj : floatmagic.h random.h
awkgram.obj : awkgram.c awk.h
dfa.obj : dfa.c dfa.h
regex.obj : regex.c regcomp.c regex_internal.c regexec.c regex.h regex_internal.h
+command.obj,debug.obj : cmd.h
# bison or yacc required
awkgram.c : awkgram.y # foo.y :: yacc => y[_]tab.c, bison => foo_tab.c
@- if f$search("ytab.c") .nes."" then delete ytab.c;* !POSIX yacc
@- if f$search("y_tab.c") .nes."" then delete y_tab.c;* !DEC/Shell yacc
- @- if f$search("awk_tab.c").nes."" then delete awk_tab.c;* !bison
+ @- if f$search("awkgram_tab.c").nes."" then delete awkgram_tab.c;* !bison
+ - $(PARSERINIT)
+ $(PARSER) $(YFLAGS) $<
+ @- if f$search("ytab.c") .nes."" then rename/new_vers ytab.c $@
+ @- if f$search("y_tab.c") .nes."" then rename/new_vers y_tab.c $@
+ @- if f$search("awkgram_tab.c").nes."" then rename/new_vers awkgram_tab.c $@
+command.c : command.y
+ @- if f$search("ytab.c") .nes."" then delete ytab.c;*
+ @- if f$search("y_tab.c") .nes."" then delete y_tab.c;*
+ @- if f$search("command_tab.c").nes."" then delete command_tab.c;*
- $(PARSERINIT)
$(PARSER) $(YFLAGS) $<
@- if f$search("ytab.c") .nes."" then rename/new_vers ytab.c $@
@- if f$search("y_tab.c") .nes."" then rename/new_vers y_tab.c $@
- @- if f$search("awk_tab.c").nes."" then rename/new_vers awk_tab.c $@
+ @- if f$search("command_tab.c").nes."" then rename/new_vers command_tab.c $@
config.h : $(VMSDIR)vms-conf.h
copy $< $@
@@ -223,12 +262,13 @@ tidy :
- if f$search("[.*]*.*;-1").nes."" then purge [.*]
clean :
- - delete *.obj;*,gawk.opt;*,pgawk.opt;*
+ - delete *.obj;*,gawk.opt;*,pgawk.opt;*,dgawk.opt;*
spotless : clean tidy
- if f$search("config.h").nes."" then rename config.h config.h-old/New
- if f$search("gawk.exe").nes."" then delete gawk.exe;*
- if f$search("pgawk.exe").nes."" then delete pgawk.exe;*
+ - if f$search("dgawk.exe").nes."" then delete dgawk.exe;*
- if f$search("gawk.dvi").nes."" then delete gawk.dvi;*
- if f$search("[.doc]texindex.exe").nes."" then delete [.doc]texindex.exe;*
diff --git a/vms/gawkmisc.vms b/vms/gawkmisc.vms
index df5ded15..6f8fdaef 100644
--- a/vms/gawkmisc.vms
+++ b/vms/gawkmisc.vms
@@ -169,3 +169,14 @@ int fd;
/* no-op */
return;
}
+
+/* files_are_same --- deal with VMS struct stat */
+
+int
+files_are_same(struct stat *f1, struct stat *f2)
+{
+ return (strcmp(f1->st_dev, f2->st_dev) == 0
+ && f1->st_ino[0] == f2->st_ino[0]
+ && f1->st_ino[1] == f2->st_ino[1]
+ && f1->st_ino[2] == f2->st_ino[2]);
+}
diff --git a/vms/redirect.h b/vms/redirect.h
index f6df0f65..e6bd4a04 100644
--- a/vms/redirect.h
+++ b/vms/redirect.h
@@ -41,6 +41,8 @@
#define regexec gnu_regexec
#define regfree gnu_regfree
#define regerror gnu_regerror
+#define setenv gawk_setenv
+#define unsetenv gawk_unsetenv
#ifndef VMS_POSIX
#define strftime gnu_strftime /* always use missing/strftime.c */
#define strcasecmp gnu_strcasecmp
@@ -84,47 +86,51 @@ extern int gettimeofday(struct timeval *,void *);
#define pclose vms_pclose
#ifndef HAVE_SNPRINTF
#define snprintf gawk_snprintf /* avoid %CC-I-INTRINSICDECL diagnostic */
+#define vsnprintf gawk_vsnprintf
#else
#ifdef CRTL_VER_V732
/* when overriding the version of the C library that compiler thinks is
in use, we need to duplicate something being suppressed in <stdio.h> */
-int snprintf(char *,size_t,const char *,...);
+extern int snprintf(char *,size_t,const char *,...);
#endif
#endif
+extern int vsnprintf(char *restrict,size_t,const char *,va_list);
+extern int setenv(const char *,const char *,int);
+extern int unsetenv(const char *);
#define strerror vms_strerror
#define strdup vms_strdup
#define unlink vms_unlink
#if defined(VAXC) || (defined(__GNUC__) && !defined(__alpha))
#define fstat(fd,sb) VMS_fstat(fd,sb)
#endif
-extern void exit P((int));
-extern int open P((const char *,int,...));
-extern char *strerror P((int));
-extern char *strdup P((const char *str));
-extern int vms_devopen P((const char *,int));
+extern void exit(int);
+extern int open(const char *,int,...);
+extern char *strerror(int);
+extern char *strdup(const char *str);
+extern int vms_devopen(const char *,int);
# ifndef NO_TTY_FWRITE
#define fwrite tty_fwrite
#define fclose tty_fclose
-extern size_t fwrite P((const void *,size_t,size_t,FILE *));
-extern int fclose P((FILE *));
+extern size_t fwrite(const void *,size_t,size_t,FILE *);
+extern int fclose(FILE *);
# endif
-extern FILE *popen P((const char *,const char *));
-extern int pclose P((FILE *));
-extern void vms_arg_fixup P((int *,char ***));
+extern FILE *popen(const char *,const char *);
+extern int pclose(FILE *);
+extern void vms_arg_fixup(int *,char ***);
/* some things not in STDC_HEADERS */
-extern size_t gnu_strftime P((char *,size_t,const char *,const struct tm *));
-extern int unlink P((const char *));
-extern int getopt P((int,char **,char *));
-extern int isatty P((int));
+extern size_t gnu_strftime(char *,size_t,const char *,const struct tm *);
+extern int unlink(const char *);
+extern int getopt(int,char **,char *);
+extern int isatty(int);
#ifndef fileno
-extern int fileno P((FILE *));
+extern int fileno(FILE *);
#endif
-extern int close P((int));
-extern int dup P((int));
-extern int dup2 P((int, int));
-extern int read P((int, void *, int));
-extern int getpgrp P((void));
-extern void tzset P((void));
+extern int close(int);
+extern int dup(int);
+extern int dup2(int, int);
+extern int read(int, void *, int);
+extern int getpgrp(void);
+extern void tzset(void);
#endif /* not VMS_POSIX and not IN_CONFIG_H */
diff --git a/vms/vms-conf.h b/vms/vms-conf.h
index 079cc506..110c73f2 100644
--- a/vms/vms-conf.h
+++ b/vms/vms-conf.h
@@ -145,11 +145,14 @@
/* Define to 1 if you have the <libintl.h> header file. */
#undef HAVE_LIBINTL_H
+/* Define if you have the sigsegv library. */
+#undef HAVE_LIBSIGSEGV
+
/* Define to 1 if you have the `m' library (-lm). */
#undef HAVE_LIBM
-/* Define if you have the sigsegv library. */
-#undef HAVE_LIBSIGSEGV
+/* Define to 1 if you have a fully functional readline library. */
+#undef HAVE_LIBREADLINE
/* Define to 1 if you have the <limits.h> header file. */
#define HAVE_LIMITS_H 1
@@ -208,12 +211,12 @@
/* we have portals on /p on this system */
#undef HAVE_PORTALS
+/* we'll use the one in [.missing_d] */
+#undef HAVE_SETENV
+
/* Define to 1 if you have the `setlocale' function. */
#undef HAVE_SETLOCALE
-/* Define to 1 if you have the <signum.h> header file. */
-#undef HAVE_SIGNUM_H
-
/* Define to 1 if you have the `snprintf' function. */
#undef HAVE_SNPRINTF
diff --git a/vms/vms.h b/vms/vms.h
index 74fba00c..a9175a94 100644
--- a/vms/vms.h
+++ b/vms/vms.h
@@ -52,36 +52,36 @@ typedef struct _itm { U_Short len, code; void *buffer; U_Short *retlen; } Itm;
#define CondVal(sts) ((sts)&0x0FFFFFF8) /* strip severity & msg inhibit */
#define Descrip(strdsc,strbuf) Dsc strdsc = {sizeof strbuf - 1, (char *)strbuf}
-extern int shell$is_shell P((void));
-extern U_Long lib$find_file P((const Dsc *, Dsc *, void *, ...));
-extern U_Long lib$find_file_end P((void *));
+extern int shell$is_shell(void);
+extern U_Long lib$find_file(const Dsc *, Dsc *, void *, ...);
+extern U_Long lib$find_file_end(void *);
#ifndef NO_TTY_FWRITE
-extern U_Long lib$get_ef P((long *));
-extern U_Long sys$assign P((const Dsc *, short *, long, const Dsc *));
-extern U_Long sys$dassgn P((short));
-extern U_Long sys$qio P((U_Long, U_Long, U_Long, void *,
+extern U_Long lib$get_ef(long *);
+extern U_Long sys$assign(const Dsc *, short *, long, const Dsc *);
+extern U_Long sys$dassgn(short);
+extern U_Long sys$qio(U_Long, U_Long, U_Long, void *,
void (*)(U_Long), U_Long,
- const char *, int, int, U_Long, int, int));
-extern U_Long sys$synch P((long, void *));
+ const char *, int, int, U_Long, int, int);
+extern U_Long sys$synch(long, void *);
#endif /*!NO_TTY_FWRITE*/
-extern U_Long lib$spawn P((const Dsc *,const Dsc *,const Dsc *,
- const U_Long *,const Dsc *,U_Long *,U_Long *,...));
+extern U_Long lib$spawn(const Dsc *,const Dsc *,const Dsc *,
+ const U_Long *,const Dsc *,U_Long *,U_Long *,...);
/* system services for logical name manipulation */
-extern U_Long sys$trnlnm P((const U_Long *,const Dsc *,const Dsc *,
- const unsigned char *,Itm *));
-extern U_Long sys$crelnm P((const U_Long *,const Dsc *,const Dsc *,
- const unsigned char *,const Itm *));
-extern U_Long sys$crelog P((int,const Dsc *,const Dsc *,unsigned char));
-extern U_Long sys$dellnm P((const Dsc *,const Dsc *,const unsigned char *));
+extern U_Long sys$trnlnm(const U_Long *,const Dsc *,const Dsc *,
+ const unsigned char *,Itm *);
+extern U_Long sys$crelnm(const U_Long *,const Dsc *,const Dsc *,
+ const unsigned char *,const Itm *);
+extern U_Long sys$crelog(int,const Dsc *,const Dsc *,unsigned char);
+extern U_Long sys$dellnm(const Dsc *,const Dsc *,const unsigned char *);
-extern void v_add_arg P((int, const char *));
-extern void vms_exit P((int));
-extern char *vms_strerror P((int));
-extern char *vms_strdup P((const char *));
-extern int vms_devopen P((const char *,int));
-extern int vms_execute P((const char *, const char *, const char *));
-extern int vms_gawk P((void));
-extern U_Long Cli_Present P((const char *));
-extern U_Long Cli_Get_Value P((const char *, char *, int));
-extern U_Long Cli_Parse_Command P((const void *, const char *));
+extern void v_add_arg(int, const char *);
+extern void vms_exit(int);
+extern char *vms_strerror(int);
+extern char *vms_strdup(const char *);
+extern int vms_devopen(const char *,int);
+extern int vms_execute(const char *, const char *, const char *);
+extern int vms_gawk(void);
+extern U_Long Cli_Present(const char *);
+extern U_Long Cli_Get_Value(const char *, char *, int);
+extern U_Long Cli_Parse_Command(const void *, const char *);
diff --git a/vms/vms_fwrite.c b/vms/vms_fwrite.c
index 5e8669eb..f38bf634 100644
--- a/vms/vms_fwrite.c
+++ b/vms/vms_fwrite.c
@@ -1,6 +1,6 @@
/* vms_fwrite.c - augmentation for the fwrite() function.
- Copyright (C) 1991-1996 the Free Software Foundation, Inc.
+ Copyright (C) 1991-1996, 2010 the Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -50,6 +50,9 @@ static int prev_file_num;
* unless fflush() is always called first. Also, this routine
* will not detect that a freopen() call has finished with the
* original terminal; tty_fclose() should be used to close a file.
+ *
+ * When running gawk's debugging version we stick with normal
+ * fwrite because dgawk also uses other stdio calls for output.
*/
#ifdef fwrite
# undef fwrite
@@ -73,9 +76,11 @@ tty_fwrite( const void *buf, size_t size, size_t number, FILE *file )
chan = file_num < _NFILE ? channel[file_num] : -1;
if (chan == 0) { /* if not initialized, need to assign a channel */
- if (isatty(file_num) > 0) { /* isatty: 1=yes, 0=no, -1=problem */
+ if (isatty(file_num) > 0 /* isatty: 1=yes, 0=no, -1=problem */
+ && which_gawk != exe_debugging) {
Dsc device;
char devnam[255+1];
+
fgetname(file, devnam); /* get 'file's name */
device.len = strlen(device.adr = devnam); /* create descriptor */
if (vmswork(sys$assign(&device, &chan, 0, (Dsc *)0))) {
@@ -86,13 +91,16 @@ tty_fwrite( const void *buf, size_t size, size_t number, FILE *file )
/* store channel for later use; -1 => don't repeat failed init attempt */
channel[file_num] = (chan > 0 ? chan : -1);
}
- if (chan > 0) { /* chan > 0 iff 'file' is a terminal */
+
+ /* chan > 0 iff 'file' is a terminal and we're not running as dgawk */
+ if (chan > 0) {
struct _iosbw { U_Short status, count; U_Long rt_kludge; } iosb;
register U_Long sts = 1;
register char *pt = (char *)buf;
register int offset, pos, count = size * number;
U_Long cc_fmt, io_func = IO$_WRITEVBLK;
int extra = 0;
+
result = 0;
if (is_stderr(file_num)) /* if it's SYS$ERROR (stderr)... */
io_func |= IO$M_CANCTRLO; /* cancel ^O (resume tty output) */
@@ -160,6 +168,7 @@ tty_fwrite( const void *buf, size_t size, size_t number, FILE *file )
#endif /*NO_ALLOCA*/
register char *pt = (char *)buf;
register int pos, count = number;
+
if (pt[count] != '\0') { /*(out of bounds, but relatively safe)*/
pt = (char *)alloca(count + 1);
memcpy(pt, buf, count), pt[count] = '\0';
@@ -191,6 +200,7 @@ tty_fclose( FILE *file )
if (file && *file) { /* note: VAXCRTL stdio has extra level of indirection */
int file_num = fileno(file);
short chan = file_num < _NFILE ? channel[file_num] : -1;
+
if (chan > 0)
(void)sys$dassgn(chan); /* deassign the channel (ie, close) */
if (file_num < _NFILE)
diff --git a/vms/vms_misc.c b/vms/vms_misc.c
index a27b47ce..c6298c7a 100644
--- a/vms/vms_misc.c
+++ b/vms/vms_misc.c
@@ -1,6 +1,6 @@
/* vms_misc.c -- sustitute code for missing/different run-time library routines.
- Copyright (C) 1991-1993, 1996-1997, 2001, 2003, 2009 the Free Software Foundation, Inc.
+ Copyright (C) 1991-1993, 1996-1997, 2001, 2003, 2009, 2010 the Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -37,7 +37,7 @@
#ifdef strerror
# undef strerror
#endif
-extern char *strerror P((int,...));
+extern char *strerror(int,...);
/* vms_strerror() -- convert numeric error code into text string */
char *
@@ -88,8 +88,8 @@ unlink( const char *file_spec ) {
#ifdef open
# undef open
#endif
-extern int creat P((const char *,int,...));
-extern int open P((const char *,int,unsigned,...));
+extern int creat(const char *,int,...);
+extern int open(const char *,int,unsigned,...);
/* vms_open() - open a file, possibly creating it */
int
diff --git a/vms/vms_popen.c b/vms/vms_popen.c
index 599713fc..5a0f2993 100644
--- a/vms/vms_popen.c
+++ b/vms/vms_popen.c
@@ -1,6 +1,6 @@
/* [.vms]vms_popen.c -- substitute routines for missing pipe calls.
- Copyright (C) 1991-1993, 1996 the Free Software Foundation, Inc.
+ Copyright (C) 1991-1993, 1996, 2010 the Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -64,14 +64,14 @@ fork( void )
#include <lnmdef.h> /* logical name definitions */
#ifndef STDC_HEADERS
-extern int strcmp P((const char*, const char *));
+extern int strcmp(const char*, const char *);
#endif
-extern char *mktemp P((char *));
+extern char *mktemp(char *);
-static void push_logicals P((void));
-static void pop_logicals P((void));
-static Itm *save_translation P((const Dsc *));
-static void restore_translation P((const Dsc *, const Itm *));
+static void push_logicals(void);
+static void pop_logicals(void);
+static Itm *save_translation(const Dsc *);
+static void restore_translation(const Dsc *, const Itm *);
typedef enum { unopened = 0, reading, writing } pipemode;
typedef struct pipe_info {
diff --git a/vms/vmsbuild.com b/vms/vmsbuild.com
index c56f1a8d..a6674371 100644
--- a/vms/vmsbuild.com
+++ b/vms/vmsbuild.com
@@ -8,6 +8,7 @@ $! gawk 3.0.1 revised, Nov'96
$! gawk 3.1.0 revised, Mar'01
$! gawk 3.1.1 revised, Apr'02
$! gawk 3.1.6 revised, Mar'07
+$! gawk-bytecode revd, Jan'10
$!
$ REL = "3.1" !release version number
$ PATCHLVL = "8"
@@ -54,11 +55,19 @@ $config_ok:
$ if f$search("awkgram.c").nes."" then goto awkgram_ok
$ write sys$output " You must process `awkgram.y' with ""yacc"" or ""bison"""
$ if f$search("awkgram_tab.c").nes."" then - !bison was run manually
- write sys$output " or else rename `awkgram_tab.c' to `awkgramtab.c'."
+ write sys$output " or else rename `awkgram_tab.c' to `awkgram.c'."
$ if f$search("ytab.c").nes."" .or. f$search("y_tab.c").nes."" then - !yacc
- write sys$output " or else rename `ytab.c' or `y_tab.c' to `awkgramtab.c'."
+ write sys$output " or else rename `ytab.c' or `y_tab.c' to `awkgram.c'."
$ exit
$awkgram_ok:
+$ if f$search("command.c").nes."" then goto command_ok
+$ write sys$output " You must process `command.y' with ""yacc"" or ""bison"""
+$ if f$search("command_tab.c").nes."" then - !bison was run manually
+ write sys$output " or else rename `command_tab.c' to `command.c'."
+$ if f$search("ytab.c").nes."" .or. f$search("y_tab.c").nes."" then - !yacc
+ write sys$output " or else rename `ytab.c' or `y_tab.c' to `command.c'."
+$ exit
+$command_ok:
$ v = f$verify(1)
$ cc array.c
$ cc awkgram.c
@@ -81,8 +90,11 @@ $ cc replace.c
$ cc version.c
$ cc eval.c
$ cc eval_p.c
+$ cc eval_d.c
$ cc profile.c
$ cc profile_p.c
+$ cc command.c
+$ cc debug.c
$ cc [.vms]vms_misc.c
$ cc [.vms]vms_popen.c
$ cc [.vms]vms_fwrite.c
@@ -123,8 +135,25 @@ $ write Fopt libs
$ write Fopt "identification=""V''REL'.''PATCHLVL'"""
$ close Fopt
$!
+$ create dgawk.opt
+! DGAWK -- GNU awk w/ debugging
+array.obj,awkgram.obj,builtin.obj,dfa.obj,ext.obj,field.obj,floatcomp.obj
+gawkmisc.obj,getopt.obj,getopt1.obj,io.obj,main.obj,msg.obj,node.obj
+random.obj,re.obj,regex.obj,replace.obj,version.obj
+eval_d.obj,profile.obj,command.obj,debug.obj
+[]vms_misc.obj,vms_popen.obj,vms_fwrite.obj,vms_args.obj
+[]vms_gawk.obj,vms_cli.obj,gawk_cmd.obj
+psect_attr=environ,noshr !extern [noshare] char **
+stack=48 !preallocate more pages (default is 20)
+iosegment=128 !ditto (default is 32)
+$ open/append Fopt dgawk.opt
+$ write Fopt libs
+$ write Fopt "identification=""V''REL'.''PATCHLVL'"""
+$ close Fopt
+$!
$ v = f$verify(1)
$ link/exe=gawk.exe gawk.opt/options
$ link/exe=pgawk.exe pgawk.opt/options
+$ link/exe=dgawk.exe dgawk.opt/options
$! 'f$verify(v)'
$ exit
diff --git a/ylwrap b/ylwrap
index 102bd893..102bd893 100755..100644
--- a/ylwrap
+++ b/ylwrap