From ac950a04867fce7784680ba76d654d910e88a8cd Mon Sep 17 00:00:00 2001 From: "Arnold D. Robbins" Date: Wed, 16 May 2012 20:31:47 +0300 Subject: Minor and hopefully last fix to jarebug test. --- test/ChangeLog | 4 ++++ test/Makefile.am | 2 +- test/Makefile.in | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/test/ChangeLog b/test/ChangeLog index 97065a2d..70dacf48 100644 --- a/test/ChangeLog +++ b/test/ChangeLog @@ -1,3 +1,7 @@ +2012-05-16 Arnold D. Robbins + + * Makefile.am (jarebug): Remove leading `-' from $(CMP) line. + 2012-05-14 Arnold D. Robbins * Makefile.am (jarebug): Move to charset tests. Adjust to check diff --git a/test/Makefile.am b/test/Makefile.am index 24255b7e..5102d405 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -1459,7 +1459,7 @@ jarebug:: @if locale -a | grep ja_JP.EUC-JP > /dev/null ; then \ GAWKLOCALE=ja_JP.EUC-JP ; export GAWKLOCALE ; \ $(AWK) -f $(srcdir)/$@.awk $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >> _$@ ; \ - -$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ ; \ + $(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ ; \ fi diff --git a/test/Makefile.in b/test/Makefile.in index 709009e8..4c368127 100644 --- a/test/Makefile.in +++ b/test/Makefile.in @@ -1837,7 +1837,7 @@ jarebug:: @if locale -a | grep ja_JP.EUC-JP > /dev/null ; then \ GAWKLOCALE=ja_JP.EUC-JP ; export GAWKLOCALE ; \ $(AWK) -f $(srcdir)/$@.awk $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >> _$@ ; \ - -$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ ; \ + $(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ ; \ fi Gt-dummy: # file Maketests, generated from Makefile.am by the Gentests program -- cgit v1.2.3 From f8ec28a30e98cad325d18478a3d054b8c30a3129 Mon Sep 17 00:00:00 2001 From: "Arnold D. Robbins" Date: Sun, 20 May 2012 21:03:52 +0300 Subject: Enhance jarebug for Mac OS X. --- test/ChangeLog | 5 +++++ test/Makefile.am | 7 ++----- test/Makefile.in | 7 ++----- test/jarebug.sh | 21 +++++++++++++++++++++ 4 files changed, 30 insertions(+), 10 deletions(-) create mode 100755 test/jarebug.sh diff --git a/test/ChangeLog b/test/ChangeLog index 70dacf48..06d9020f 100644 --- a/test/ChangeLog +++ b/test/ChangeLog @@ -1,3 +1,8 @@ +2012-05-20 Arnold D. Robbins + + * jarebug.sh: New file. Handles Mac OS X also. + * Makefile.am (jarebug): Use jarebug.sh to run the test. + 2012-05-16 Arnold D. Robbins * Makefile.am (jarebug): Remove leading `-' from $(CMP) line. diff --git a/test/Makefile.am b/test/Makefile.am index 5102d405..5ff35012 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -1456,11 +1456,8 @@ rri1:: jarebug:: @echo $@ - @if locale -a | grep ja_JP.EUC-JP > /dev/null ; then \ - GAWKLOCALE=ja_JP.EUC-JP ; export GAWKLOCALE ; \ - $(AWK) -f $(srcdir)/$@.awk $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >> _$@ ; \ - $(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ ; \ - fi + @$(srcdir)/$@.sh "$(AWKPROG)" "$(srcdir)/$@.awk" "$(srcdir)/$@.in" "_$@" + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ # Targets generated for other tests: diff --git a/test/Makefile.in b/test/Makefile.in index 4c368127..171428bb 100644 --- a/test/Makefile.in +++ b/test/Makefile.in @@ -1834,11 +1834,8 @@ rri1:: jarebug:: @echo $@ - @if locale -a | grep ja_JP.EUC-JP > /dev/null ; then \ - GAWKLOCALE=ja_JP.EUC-JP ; export GAWKLOCALE ; \ - $(AWK) -f $(srcdir)/$@.awk $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >> _$@ ; \ - $(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ ; \ - fi + @$(srcdir)/$@.sh "$(AWKPROG)" "$(srcdir)/$@.awk" "$(srcdir)/$@.in" "_$@" + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ Gt-dummy: # file Maketests, generated from Makefile.am by the Gentests program addcomma: diff --git a/test/jarebug.sh b/test/jarebug.sh new file mode 100755 index 00000000..dcc73e6c --- /dev/null +++ b/test/jarebug.sh @@ -0,0 +1,21 @@ +#! /bin/sh + +awk=$1 +prog=$2 +infile=$3 +out=$4 + +# GLIBC gives us ja_JP.EUC-JP but Mac OS X uses ja_JP.eucJP + +cp $infile $out # set up default + +for locale in ja_JP.EUC-JP ja_JP.eucJP +do + if locale -a | grep $locale > /dev/null + then + LANG=$locale + LC_ALL=$locale + export LANG LC_ALL + $awk -f $prog $infile >$out 2>&1 || echo EXIT CODE: $? >> $out + fi +done -- cgit v1.2.3 From 09a6e6fecf9691ea9a0ceb2aef26197f821868cd Mon Sep 17 00:00:00 2001 From: "Arnold D. Robbins" Date: Tue, 19 Jun 2012 21:24:19 +0300 Subject: Fix bug with --characters-as-bytes. --- ChangeLog | 5 +++++ main.c | 5 ++++- test/ChangeLog | 5 +++++ test/Makefile.am | 11 ++++++++++- test/Makefile.in | 12 +++++++++++- 5 files changed, 35 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 2a1373f7..d6afeb25 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2012-06-19 Arnold D. Robbins + + * main.c (main): Do setlocale to "C" if --characters-as-bytes. + Thanks to "SP" for the bug report. + 2012-05-09 Arnold D. Robbins * configure.ac: Added AC_HEADER_STDBOOL diff --git a/main.c b/main.c index 3680e3f4..2bb0b01f 100644 --- a/main.c +++ b/main.c @@ -559,9 +559,12 @@ out: #if MBS_SUPPORT if (do_binary) { if (do_posix) - warning(_("`--posix' overrides `--binary'")); + warning(_("`--posix' overrides `--characters-as-bytes'")); else gawk_mb_cur_max = 1; /* hands off my data! */ +#if defined(LC_ALL) + setlocale(LC_ALL, "C"); +#endif } #endif diff --git a/test/ChangeLog b/test/ChangeLog index 06d9020f..272e7cf2 100644 --- a/test/ChangeLog +++ b/test/ChangeLog @@ -1,3 +1,8 @@ +2012-06-19 Arnold D. Robbins + + * Makefile.am (charasbytes): New test. + * charasbytes.awk, charasbytes.in, charasbytes.ok: New files. + 2012-05-20 Arnold D. Robbins * jarebug.sh: New file. Handles Mac OS X also. diff --git a/test/Makefile.am b/test/Makefile.am index 5ff35012..43cc8f9c 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -119,6 +119,9 @@ EXTRA_DIST = \ beginfile2.ok \ beginfile2.sh \ binmode1.ok \ + charasbytes.awk \ + charasbytes.in \ + charasbytes.ok \ childin.awk \ childin.in \ childin.ok \ @@ -831,7 +834,7 @@ UNIX_TESTS = \ GAWK_EXT_TESTS = \ aadelete1 aadelete2 aarray1 aasort aasorti argtest arraysort \ - backw badargs beginfile1 beginfile2 binmode1 \ + backw badargs beginfile1 beginfile2 binmode1 charasbytes \ clos1way delsub devfd devfd1 devfd2 dumpvars exit \ fieldwdth fpat1 fpat2 fpat3 fpatnull fsfwfs funlen \ fwtest fwtest2 fwtest3 \ @@ -1459,6 +1462,12 @@ jarebug:: @$(srcdir)/$@.sh "$(AWKPROG)" "$(srcdir)/$@.awk" "$(srcdir)/$@.in" "_$@" @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ +charasbytes: + @echo $@ + @[ -z "$$GAWKLOCALE" ] && GAWKLOCALE=en_US.UTF-8; \ + AWKPATH=$(srcdir) $(AWK) -b -f $@.awk $(srcdir)/$@.in | \ + od -c -t x1 >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ # Targets generated for other tests: include Maketests diff --git a/test/Makefile.in b/test/Makefile.in index 171428bb..0e4cc757 100644 --- a/test/Makefile.in +++ b/test/Makefile.in @@ -324,6 +324,9 @@ EXTRA_DIST = \ beginfile2.ok \ beginfile2.sh \ binmode1.ok \ + charasbytes.awk \ + charasbytes.in \ + charasbytes.ok \ childin.awk \ childin.in \ childin.ok \ @@ -1036,7 +1039,7 @@ UNIX_TESTS = \ GAWK_EXT_TESTS = \ aadelete1 aadelete2 aarray1 aasort aasorti argtest arraysort \ - backw badargs beginfile1 beginfile2 binmode1 \ + backw badargs beginfile1 beginfile2 binmode1 charasbytes \ clos1way delsub devfd devfd1 devfd2 dumpvars exit \ fieldwdth fpat1 fpat2 fpat3 fpatnull fsfwfs funlen \ fwtest fwtest2 fwtest3 \ @@ -1836,6 +1839,13 @@ jarebug:: @echo $@ @$(srcdir)/$@.sh "$(AWKPROG)" "$(srcdir)/$@.awk" "$(srcdir)/$@.in" "_$@" @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +charasbytes: + @echo $@ + @[ -z "$$GAWKLOCALE" ] && GAWKLOCALE=en_US.UTF-8; \ + AWKPATH=$(srcdir) $(AWK) -b -f $@.awk $(srcdir)/$@.in | \ + od -c -t x1 >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ Gt-dummy: # file Maketests, generated from Makefile.am by the Gentests program addcomma: -- cgit v1.2.3 From 91cdc24dc028b758e409ac6e92759b52b2a079d6 Mon Sep 17 00:00:00 2001 From: "Arnold D. Robbins" Date: Tue, 19 Jun 2012 21:25:32 +0300 Subject: Add new test files for characters-as-bytes fix. --- test/charasbytes.awk | 1 + test/charasbytes.in | 1 + test/charasbytes.ok | 3 +++ 3 files changed, 5 insertions(+) create mode 100755 test/charasbytes.awk create mode 100644 test/charasbytes.in create mode 100644 test/charasbytes.ok diff --git a/test/charasbytes.awk b/test/charasbytes.awk new file mode 100755 index 00000000..feb195c8 --- /dev/null +++ b/test/charasbytes.awk @@ -0,0 +1 @@ +{ print gensub(/\xE2\x80./, "ZZZ", "g", $0) } diff --git a/test/charasbytes.in b/test/charasbytes.in new file mode 100644 index 00000000..4a8d4a1e --- /dev/null +++ b/test/charasbytes.in @@ -0,0 +1 @@ +– diff --git a/test/charasbytes.ok b/test/charasbytes.ok new file mode 100644 index 00000000..a1702e64 --- /dev/null +++ b/test/charasbytes.ok @@ -0,0 +1,3 @@ +0000000 Z Z Z \n + 5a 5a 5a 0a +0000004 -- cgit v1.2.3 From 0b9dc23236f49d3e23a14900b1f34bb027fc3ba0 Mon Sep 17 00:00:00 2001 From: "Arnold D. Robbins" Date: Tue, 19 Jun 2012 21:26:00 +0300 Subject: Redo it.po/it.gmo. --- po/it.gmo | Bin 47961 -> 46912 bytes po/it.po | 1014 ++++++++++++++++++++++++++++++++++--------------------------- 2 files changed, 569 insertions(+), 445 deletions(-) diff --git a/po/it.gmo b/po/it.gmo index 7d524adb..195280f2 100644 Binary files a/po/it.gmo and b/po/it.gmo differ diff --git a/po/it.po b/po/it.po index 6c74d5a5..f0224125 100644 --- a/po/it.po +++ b/po/it.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: gawk 3.1.81\n" "Report-Msgid-Bugs-To: arnold@skeeve.com\n" -"POT-Creation-Date: 2012-04-27 10:06+0300\n" +"POT-Creation-Date: 2012-03-28 22:03+0200\n" "PO-Revision-Date: 2012-05-08 16:11+0100\n" "Last-Translator: Antonio Colombo \n" "Language-Team: Italian \n" @@ -15,462 +15,513 @@ msgstr "" "Content-Type: text/plain; charset=ISO-8859-1\n" "Content-Transfer-Encoding: 8-bit\n" -#: array.c:266 +#: array.c:140 #, c-format msgid "from %s" msgstr "da %s" -#: array.c:366 +#: array.c:248 msgid "attempt to use a scalar value as array" msgstr "tentativo di usare valore scalare come vettore" -#: array.c:368 +#: array.c:251 +#, fuzzy, c-format +msgid "attempt to use function `%s' as an array" +msgstr "tentativo di usare scalare '%s' come vettore" + +#: array.c:254 #, c-format msgid "attempt to use scalar parameter `%s' as an array" msgstr "tentativo di usare il parametro scalare `%s' come un vettore" -#: array.c:371 +#: array.c:257 #, c-format msgid "attempt to use scalar `%s' as an array" msgstr "tentativo di usare scalare '%s' come vettore" -#: array.c:418 array.c:584 builtin.c:85 builtin.c:1560 builtin.c:1602 -#: builtin.c:1615 builtin.c:2041 builtin.c:2053 eval.c:1109 eval.c:1113 -#: eval.c:1508 +#: array.c:302 array.c:707 builtin.c:84 builtin.c:1385 builtin.c:1427 +#: builtin.c:1440 builtin.c:1859 builtin.c:1871 eval.c:1135 eval.c:1139 +#: eval.c:1495 eval.c:1812 #, c-format msgid "attempt to use array `%s' in a scalar context" msgstr "tentativo di usare vettore `%s' in un contesto scalare" -#: array.c:591 +#: array.c:513 +#, fuzzy, c-format +msgid "reference to uninitialized element `%s[\"%.*s\"]'" +msgstr "riferimento ad argomento non inizializzato `%s'" + +#: array.c:519 +#, c-format +msgid "subscript of array `%s' is null string" +msgstr "" + +#: array.c:723 #, c-format msgid "delete: index `%s' not in array `%s'" msgstr "delete: indice `%s' non presente nel vettore `%s'" -#: array.c:605 +#: array.c:734 eval.c:1865 #, c-format msgid "attempt to use scalar `%s[\"%.*s\"]' as an array" msgstr "tentativo di usare scalare`%s[\"%.*s\"]' come vettore" -#: array.c:784 -msgid "adump: first argument not an array" +#: array.c:910 +#, c-format +msgid "%s: empty (null)\n" +msgstr "" + +#: array.c:915 +#, c-format +msgid "%s: empty (zero)\n" +msgstr "" + +#: array.c:919 +#, c-format +msgid "%s: table_size = %d, array_size = %d\n" +msgstr "" + +#: array.c:954 +#, c-format +msgid "%s: is parameter\n" +msgstr "" + +#: array.c:958 +#, c-format +msgid "%s: array_ref to %s\n" +msgstr "" + +#: array.c:963 +#, fuzzy +msgid "adump: argument not an array" msgstr "adump: il primo argomento non è un vettore" -#: array.c:823 +#: array.c:1086 msgid "asort: second argument not an array" msgstr "asort: il secondo argomento non è un vettore" -#: array.c:824 +#: array.c:1087 msgid "asorti: second argument not an array" msgstr "asorti: il secondo argomento non è un vettore" -#: array.c:831 +#: array.c:1094 msgid "asort: first argument not an array" msgstr "asort: il primo argomento non è un vettore" -#: array.c:832 +#: array.c:1095 msgid "asorti: first argument not an array" msgstr "asorti: il primo argomento non è un vettore" -#: array.c:839 +#: array.c:1102 msgid "asort: cannot use a subarray of first arg for second arg" msgstr "" -"asort: non permesso un secondo argomento che sia un sottovettore del primo argomento" +"asort: non permesso un secondo argomento che sia un sottovettore del primo " +"argomento" -#: array.c:840 +#: array.c:1103 msgid "asorti: cannot use a subarray of first arg for second arg" msgstr "" -"asorti: non permesso un secondo argomento che sia un sottovettore del primo argomento" +"asorti: non permesso un secondo argomento che sia un sottovettore del primo " +"argomento" -#: array.c:845 +#: array.c:1108 msgid "asort: cannot use a subarray of second arg for first arg" msgstr "" -"asort: non permesso un primo argomento che sia un sottovettore del secondo argomento" +"asort: non permesso un primo argomento che sia un sottovettore del secondo " +"argomento" -#: array.c:846 +#: array.c:1109 msgid "asorti: cannot use a subarray of second arg for first arg" msgstr "" -"asorti: non permesso un primo argomento che sia un sottovettore del secondo argomento" +"asorti: non permesso un primo argomento che sia un sottovettore del secondo " +"argomento" -#: array.c:1314 +#: array.c:1655 +#, c-format msgid "`%s' is invalid as a function name" msgstr "`%s' non è un nome funzione valido" -#: array.c:1318 +#: array.c:1659 +#, c-format msgid "sort comparison function `%s' is not defined" msgstr "funzione di confronto del sort `%s' non definita" -#: awkgram.y:223 +#: awkgram.y:249 #, c-format msgid "%s blocks must have an action part" msgstr "blocchi %s richiedono una 'azione'" -#: awkgram.y:226 +#: awkgram.y:252 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:295 awkgram.y:306 +#: awkgram.y:323 awkgram.y:334 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:343 +#: awkgram.y:371 #, c-format msgid "`%s' is a built-in function, it cannot be redefined" msgstr "`%s' è una funzione interna, non si può ridefinire" -#: awkgram.y:389 +#: awkgram.y:432 msgid "regexp constant `//' looks like a C++ comment, but is not" msgstr "espressione regolare costante `//' sembra un commento C++, ma non lo è" -#: awkgram.y:393 +#: awkgram.y:436 #, 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:485 +#: awkgram.y:528 #, c-format msgid "duplicate case values in switch body: %s" msgstr "valori di 'case' doppi all'interno di uno 'switch': %s" -#: awkgram.y:506 +#: awkgram.y:549 msgid "duplicate `default' detected in switch body" msgstr "valori di default doppi all'interno di uno 'switch'" -#: awkgram.y:766 +#: awkgram.y:809 msgid "`break' is not allowed outside a loop or switch" msgstr "`break' non permesso fuori da un ciclo o da uno 'switch'" -#: awkgram.y:775 +#: awkgram.y:818 msgid "`continue' is not allowed outside a loop" msgstr "`continue' non permesso fuori da un un ciclo" -#: awkgram.y:785 +#: awkgram.y:828 #, c-format msgid "`next' used in %s action" msgstr "`next' usato in 'azione' %s" -#: awkgram.y:793 +#: awkgram.y:836 msgid "`nextfile' is a gawk extension" msgstr "`nextfile' è un'estensione gawk" -#: awkgram.y:798 +#: awkgram.y:841 #, c-format msgid "`nextfile' used in %s action" msgstr "`nextfile' usato in 'azione' %s" -#: awkgram.y:822 +#: awkgram.y:865 msgid "`return' used outside function context" msgstr "`return' usato fuori da una funzione" -#: awkgram.y:896 +#: awkgram.y:925 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:966 awkgram.y:970 awkgram.y:994 +#: awkgram.y:995 awkgram.y:999 awkgram.y:1023 msgid "`delete array' is a gawk extension" msgstr "`delete array' è un'estensione gawk" -#: awkgram.y:990 +#: awkgram.y:1019 msgid "`delete(array)' is a non-portable tawk extension" msgstr "`delete(array)' è un'estensione tawk non-portabile" -#: awkgram.y:1108 +#: awkgram.y:1135 msgid "multistage two-way pipelines don't work" msgstr "'pipeline' multistadio bidirezionali non funzionano" -#: awkgram.y:1211 +#: awkgram.y:1238 msgid "regular expression on right of assignment" msgstr "espressione regolare usata per assegnare un valore" -#: awkgram.y:1222 +#: awkgram.y:1249 msgid "regular expression on left of `~' or `!~' operator" msgstr "espressione regolare prima di operatore `~' o `!~'" -#: awkgram.y:1238 awkgram.y:1389 +#: awkgram.y:1265 awkgram.y:1419 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:1248 +#: awkgram.y:1275 msgid "regular expression on right of comparison" msgstr "espressione regolare a destra in un confronto" -#: awkgram.y:1364 +#: awkgram.y:1394 #, c-format msgid "`getline var' invalid inside `%s' rule" msgstr "`getline var' invalida all'interno della regola `%s'" -#: awkgram.y:1367 +#: awkgram.y:1397 eval.c:2504 #, c-format msgid "`getline' invalid inside `%s' rule" msgstr "`getline' invalida all'interno della regola `%s'" -#: awkgram.y:1372 +#: awkgram.y:1402 msgid "non-redirected `getline' undefined inside END action" msgstr "`getline' non re-diretta indefinita dentro 'azione' END" -#: awkgram.y:1391 +#: awkgram.y:1421 msgid "old awk does not support multidimensional arrays" msgstr "il vecchio awk non supporta vettori multidimensionali" -#: awkgram.y:1488 +#: awkgram.y:1517 msgid "call of `length' without parentheses is not portable" msgstr "chiamata a `length' senza parentesi non portabile" -#: awkgram.y:1554 +#: awkgram.y:1580 msgid "indirect function calls are a gawk extension" msgstr "chiamate a funzione indirette sono un'estensione gawk" -#: awkgram.y:1567 +#: awkgram.y:1593 #, c-format msgid "can not use special variable `%s' for indirect function call" msgstr "" "non posso usare la variabile speciale `%s' come parametro indiretto di " "funzione " -#: awkgram.y:1645 +#: awkgram.y:1671 msgid "invalid subscript expression" msgstr "espressione indice invalida" -#: awkgram.y:1966 awkgram.y:1986 msg.c:112 +#: awkgram.y:1711 +msgid "use of non-array as array" +msgstr "" + +#: awkgram.y:1975 awkgram.y:1995 msg.c:98 msgid "warning: " msgstr "attenzione: " -#: awkgram.y:1984 msg.c:144 +#: awkgram.y:1993 msg.c:130 msgid "fatal: " msgstr "fatale: " -#: awkgram.y:2034 +#: awkgram.y:2043 msgid "unexpected newline or end of string" msgstr "carattere 'a capo' o fine stringa inaspettati" -#: awkgram.y:2299 awkgram.y:2357 awkgram.y:2545 +#: awkgram.y:2300 awkgram.y:2358 awkgram.y:2542 #, 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:2300 awkgram.y:2358 builtin.c:124 +#: awkgram.y:2301 awkgram.y:2359 builtin.c:122 msgid "reason unknown" msgstr "ragione indeterminata" -#: awkgram.y:2316 +#: awkgram.y:2317 #, c-format msgid "already included source file `%s'" msgstr "file sorgente `%s' già incluso" -#: awkgram.y:2342 +#: awkgram.y:2343 msgid "@include is a gawk extension" msgstr "@include è un'estensione gawk" -#: awkgram.y:2348 +#: awkgram.y:2349 msgid "empty filename after @include" msgstr "nome-file mancante dopo @include" -#: awkgram.y:2497 +#: awkgram.y:2494 msgid "empty program text on command line" msgstr "programma nullo sulla linea comandi" -#: awkgram.y:2612 +#: awkgram.y:2609 #, c-format msgid "can't read sourcefile `%s' (%s)" msgstr "non riesco a leggere file sorgente `%s' (%s)" -#: awkgram.y:2623 +#: awkgram.y:2620 #, c-format msgid "source file `%s' is empty" msgstr "file sorgente `%s' vuoto" -#: awkgram.y:2800 +#: awkgram.y:2797 msgid "source file does not end in newline" msgstr "file sorgente non termina con carattere 'a capo'" -#: awkgram.y:2905 +#: awkgram.y:2900 msgid "unterminated regexp ends with `\\' at end of file" msgstr "espressione regolare non completata termina con `\\' a fine file" -#: awkgram.y:2929 +#: awkgram.y:2924 #, 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:2933 +#: awkgram.y:2928 #, 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:2940 +#: awkgram.y:2935 msgid "unterminated regexp" msgstr "espressione regolare non completata" -#: awkgram.y:2944 +#: awkgram.y:2939 msgid "unterminated regexp at end of file" msgstr "espressione regolare non completata a fine file" -#: awkgram.y:3003 +#: awkgram.y:2998 msgid "use of `\\ #...' line continuation is not portable" msgstr "uso di `\\ #...' continuazione linea non portabile" -#: awkgram.y:3019 +#: awkgram.y:3014 msgid "backslash not last character on line" msgstr "'\\' non è l'ultimo carattere della linea" -#: awkgram.y:3080 +#: awkgram.y:3075 msgid "POSIX does not allow operator `**='" msgstr "POSIX non permette l'operatore `**='" -#: awkgram.y:3082 +#: awkgram.y:3077 msgid "old awk does not support operator `**='" msgstr "il vecchio awk non supporta l'operatore `**='" -#: awkgram.y:3091 +#: awkgram.y:3086 msgid "POSIX does not allow operator `**'" msgstr "POSIX non permette l'operatore `**'" -#: awkgram.y:3093 +#: awkgram.y:3088 msgid "old awk does not support operator `**'" msgstr "il vecchio awk non supporta l'operatore `**'" -#: awkgram.y:3128 +#: awkgram.y:3123 msgid "operator `^=' is not supported in old awk" msgstr "l'operatore `^=' non è supportato nel vecchio awk" -#: awkgram.y:3136 +#: awkgram.y:3131 msgid "operator `^' is not supported in old awk" msgstr "l'operatore `^' non è supportato nel vecchio awk" -#: awkgram.y:3229 awkgram.y:3245 +#: awkgram.y:3224 awkgram.y:3240 msgid "unterminated string" msgstr "stringa non terminata" -#: awkgram.y:3466 +#: awkgram.y:3436 #, c-format msgid "invalid char '%c' in expression" msgstr "carattere '%c' non valido in un'espressione" -#: awkgram.y:3513 +#: awkgram.y:3483 #, c-format msgid "`%s' is a gawk extension" msgstr "`%s' è un'estensione gawk" -#: awkgram.y:3518 +#: awkgram.y:3488 #, c-format msgid "`%s' is a Bell Labs extension" msgstr "`%s' è un'estensione Bell Labs" -#: awkgram.y:3523 +#: awkgram.y:3493 #, c-format msgid "POSIX does not allow `%s'" msgstr "POSIX non permette `%s'" -#: awkgram.y:3531 +#: awkgram.y:3501 #, c-format msgid "`%s' is not supported in old awk" msgstr "`%s' non è supportato nel vecchio awk" -#: awkgram.y:3598 +#: awkgram.y:3568 msgid "`goto' considered harmful!\n" msgstr "`goto' considerato pericoloso!\n" -#: awkgram.y:3632 +#: awkgram.y:3619 #, c-format msgid "%d is invalid as number of arguments for %s" msgstr "%d non valido come numero di argomenti per %s" -#: awkgram.y:3667 +#: awkgram.y:3654 #, 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:3672 +#: awkgram.y:3659 #, c-format msgid "%s third parameter is not a changeable object" msgstr "il terzo parametro di '%s' non è un oggetto modificabile" -#: awkgram.y:3751 awkgram.y:3754 +#: awkgram.y:3732 awkgram.y:3735 msgid "match: third argument is a gawk extension" msgstr "match: il terzo argomento è un'estensione gawk" -#: awkgram.y:3808 awkgram.y:3811 +#: awkgram.y:3789 awkgram.y:3792 msgid "close: second argument is a gawk extension" msgstr "close: il secondo argomento è un'estensione gawk" -#: awkgram.y:3823 +#: awkgram.y:3804 msgid "use of dcgettext(_\"...\") is incorrect: remove leading underscore" msgstr "" "uso scorretto di dcgettext(_\"...\"): togliere il carattere '_' iniziale" -#: awkgram.y:3838 +#: awkgram.y:3819 msgid "use of dcngettext(_\"...\") is incorrect: remove leading underscore" msgstr "" "uso scorretto di dcngettext(_\"...\"): togliere il carattere '_' iniziale" -#: awkgram.y:3904 +#: awkgram.y:3911 +#, c-format +msgid "function `%s': parameter #%d, `%s', duplicates parameter #%d" +msgstr "funzione `%s': parametro #%d, `%s', duplica parametro #%d" + +#: awkgram.y:3953 #, c-format msgid "function `%s': parameter `%s' shadows global variable" msgstr "funzione `%s': parametro `%s' nasconde variabile globale" -#: awkgram.y:3961 +#: awkgram.y:4111 #, c-format msgid "could not open `%s' for writing (%s)" msgstr "non riesco ad aprire `%s' in scrittura (%s)" -#: awkgram.y:3962 +#: awkgram.y:4112 msgid "sending variable list to standard error" msgstr "mando lista variabili a 'standard error'" -#: awkgram.y:3970 +#: awkgram.y:4118 #, c-format msgid "%s: close failed (%s)" msgstr "%s: 'close' fallita (%s)" -#: awkgram.y:3995 +#: awkgram.y:4170 msgid "shadow_funcs() called twice!" msgstr "shadow_funcs() chiamata due volte!" -#: awkgram.y:4003 +#: awkgram.y:4176 msgid "there were shadowed variables." msgstr "c'erano variabili nascoste." -#: awkgram.y:4074 -#, c-format -msgid "function name `%s' previously defined" -msgstr "funzione di nome `%s' definita in precedenza" - -#: awkgram.y:4120 +#: awkgram.y:4206 #, 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:4123 +#: awkgram.y:4210 #, c-format msgid "function `%s': can't use special variable `%s' as a function parameter" msgstr "" "funzione `%s': non posso usare la variabile speciale `%s' come parametro di " "funzione" -#: awkgram.y:4131 +#: awkgram.y:4226 #, c-format -msgid "function `%s': parameter #%d, `%s', duplicates parameter #%d" -msgstr "funzione `%s': parametro #%d, `%s', duplica parametro #%d" +msgid "function name `%s' previously defined" +msgstr "funzione di nome `%s' definita in precedenza" -#: awkgram.y:4210 awkgram.y:4216 +#: awkgram.y:4394 awkgram.y:4400 #, c-format msgid "function `%s' called but never defined" msgstr "funzione `%s' chiamata ma mai definita" -#: awkgram.y:4219 +#: awkgram.y:4403 #, c-format msgid "function `%s' defined but never called directly" msgstr "funzione `%s' definita ma mai chiamata direttamente" -#: awkgram.y:4251 +#: awkgram.y:4435 #, 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:4297 +#: awkgram.y:4544 #, c-format msgid "" "function `%s' called with space between name and `(',\n" @@ -479,226 +530,229 @@ msgstr "" "funzione `%s' chiamata con spazio tra il nome e `(',\n" "o usata come variabile o vettore" -#: awkgram.y:4505 +#: awkgram.y:4791 eval.c:2056 msgid "division by zero attempted" msgstr "tentativo di dividere per zero" -#: awkgram.y:4514 +#: awkgram.y:4800 eval.c:2072 #, c-format msgid "division by zero attempted in `%%'" msgstr "tentativo di dividere per zero in `%%'" -#: builtin.c:122 +#: 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: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 fuori dai limiti ammessi" -#: builtin.c:202 +#: 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:205 +#: 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:217 +#: 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:335 +#: builtin.c:333 msgid "index: received non-string first argument" msgstr "index: il primo argomento non è una stringa" -#: builtin.c:337 +#: builtin.c:335 msgid "index: received non-string second argument" msgstr "index: il secondo argomento non è una stringa" -#: builtin.c:461 +#: builtin.c:457 msgid "int: received non-numeric argument" msgstr "int: argomento non numerico" -#: builtin.c:497 +#: builtin.c:493 msgid "length: received array argument" msgstr "length: l'argomento fornito è un vettore" -#: builtin.c:500 +#: builtin.c:496 msgid "`length(array)' is a gawk extension" msgstr "`length(array)' è un'estensione gawk" -#: builtin.c:508 +#: builtin.c:504 msgid "length: received non-string argument" msgstr "length: l'argomento non è una stringa" -#: builtin.c:539 +#: builtin.c:535 msgid "log: received non-numeric argument" msgstr "log: argomento non numerico" -#: builtin.c:542 +#: builtin.c:538 #, c-format msgid "log: received negative argument %g" msgstr "log: argomento negativo %g" -#: builtin.c:740 builtin.c:745 +#: builtin.c:694 builtin.c:699 msgid "fatal: must use `count$' on all formats or none" msgstr "fatale: `count$' va usato per ogni 'format' o per nessuno" -#: builtin.c:815 +#: builtin.c:762 #, c-format msgid "field width is ignored for `%%' specifier" msgstr "larghezza campo ignorata per la specifica `%%'" -#: builtin.c:817 +#: builtin.c:764 #, c-format msgid "precision is ignored for `%%' specifier" msgstr "precisione ignorata per la specifica `%%'" -#: builtin.c:819 +#: builtin.c:766 #, c-format msgid "field width and precision are ignored for `%%' specifier" msgstr "larghezza campo e precisone ignorate per la specifica `%%'" -#: builtin.c:870 +#: builtin.c:817 msgid "fatal: `$' is not permitted in awk formats" msgstr "fatale: operatore `$' non consentito nei 'format' awk" -#: builtin.c:879 +#: builtin.c:826 msgid "fatal: arg count with `$' must be > 0" msgstr "fatale: numero argomenti con `$' dev'essere > 0" -#: builtin.c:883 +#: builtin.c:830 #, c-format msgid "fatal: arg count %ld greater than total number of supplied arguments" msgstr "fatale: numero argomenti %ld > del numero totale argomenti specificati" -#: builtin.c:887 +#: builtin.c:834 msgid "fatal: `$' not permitted after period in format" msgstr "fatale: `$' non permesso dopo il punto in un 'format'" -#: builtin.c:903 +#: builtin.c:850 msgid "fatal: no `$' supplied for positional field width or precision" msgstr "fatale: manca `$' per i campi posizionali larghezza o precisione" -#: builtin.c:975 +#: builtin.c:921 msgid "`l' is meaningless in awk formats; ignored" msgstr "`l' non ha senso nei 'format' awk; ignorato" -#: builtin.c:979 +#: builtin.c:925 msgid "fatal: `l' is not permitted in POSIX awk formats" msgstr "fatale: `l' non permesso nei 'format' POSIX awk" -#: builtin.c:992 +#: builtin.c:938 msgid "`L' is meaningless in awk formats; ignored" msgstr "`L' non ha senso nei 'format' awk; ignorato" -#: builtin.c:996 +#: builtin.c:942 msgid "fatal: `L' is not permitted in POSIX awk formats" msgstr "`L' non ha senso nei 'format' awk; ignorato" -#: builtin.c:1009 +#: builtin.c:955 msgid "`h' is meaningless in awk formats; ignored" msgstr "`h' non ha senso nei 'format' awk; ignorato" -#: builtin.c:1013 +#: builtin.c:959 msgid "fatal: `h' is not permitted in POSIX awk formats" msgstr "fatale: `h' non permesso nei 'format' POSIX awk" -#: builtin.c:1408 +#: builtin.c:1272 #, c-format msgid "[s]printf: value %g is out of range for `%%%c' format" msgstr "[s]printf: valore %g fuori dai limiti ammessi per il 'format' `%%%c'" -#: builtin.c:1506 +#: builtin.c:1332 #, c-format msgid "ignoring unknown format specifier character `%c': no argument converted" -msgstr "carattere di 'format' sconosciuto `%c' ignorato: nessun argomento convertito" +msgstr "" +"carattere di 'format' sconosciuto `%c' ignorato: nessun argomento convertito" -#: builtin.c:1511 +#: builtin.c:1337 msgid "fatal: not enough arguments to satisfy format string" -msgstr "fatale: argomenti in numero minore di quelli richiesti dalla stringa di 'format'" +msgstr "" +"fatale: argomenti in numero minore di quelli richiesti dalla stringa di " +"'format'" -#: builtin.c:1513 +#: builtin.c:1339 msgid "^ ran out for this one" msgstr "^ esauriti a questo punto" -#: builtin.c:1520 +#: builtin.c:1346 msgid "[s]printf: format specifier does not have control letter" msgstr "[s]printf: specifica di 'format' senza un carattere di controllo" -#: builtin.c:1523 +#: builtin.c:1349 msgid "too many arguments supplied for format string" msgstr "troppi argomenti specificati per questa stringa di 'format'" -#: builtin.c:1598 builtin.c:1609 +#: builtin.c:1423 builtin.c:1434 msgid "printf: no arguments" msgstr "printf: mancano argomenti" -#: builtin.c:1650 +#: builtin.c:1475 msgid "sqrt: received non-numeric argument" msgstr "sqrt: argomento non numerico" -#: builtin.c:1654 +#: builtin.c:1479 #, c-format msgid "sqrt: called with negative argument %g" msgstr "sqrt: chiamata con argomento negativo %g" -#: builtin.c:1685 +#: builtin.c:1503 #, c-format msgid "substr: length %g is not >= 1" msgstr "substr: lunghezza %g non >= 1" -#: builtin.c:1687 +#: builtin.c:1505 #, c-format msgid "substr: length %g is not >= 0" msgstr "substr: lunghezza %g non >= 0" -#: builtin.c:1694 +#: builtin.c:1512 #, c-format msgid "substr: non-integer length %g will be truncated" msgstr "substr: lunghezza non intera %g: sarà troncata" -#: builtin.c:1699 +#: builtin.c:1517 #, 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:1711 +#: builtin.c:1529 #, c-format msgid "substr: start index %g is invalid, using 1" msgstr "substr: indice di partenza %g non valido, uso 1" -#: builtin.c:1716 +#: builtin.c:1534 #, c-format msgid "substr: non-integer start index %g will be truncated" msgstr "substr: indice di partenza non intero %g: sarà troncato" -#: builtin.c:1741 +#: builtin.c:1559 msgid "substr: source string is zero length" msgstr "substr: stringa di partenza lunga zero" -#: builtin.c:1757 +#: builtin.c:1575 #, 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:1765 +#: builtin.c:1583 #, c-format msgid "" "substr: length %g at start index %g exceeds length of first argument (%lu)" @@ -706,223 +760,228 @@ msgstr "" "substr: lunghezza %g all'indice di partenza %g supera la lunghezza del primo " "argomento (%lu)" -#: builtin.c:1839 +#: builtin.c:1657 msgid "strftime: format value in PROCINFO[\"strftime\"] has numeric type" msgstr "" "strftime: il valore del 'format' in PROCINFO[\"strftime\"] è di tipo numerico" -#: builtin.c:1862 +#: builtin.c:1680 msgid "strftime: received non-numeric second argument" msgstr "strftime: il secondo argomento non è numerico" -#: builtin.c:1866 +#: builtin.c:1683 msgid "strftime: second argument less than 0 or too big for time_t" msgstr "strftime: secondo argomento < 0 o troppo elevato per time_t" -#: builtin.c:1873 +#: builtin.c:1690 msgid "strftime: received non-string first argument" msgstr "strftime: il primo argomento non è una stringa" -#: builtin.c:1880 +#: builtin.c:1696 msgid "strftime: received empty format string" msgstr "strftime: 'format' è una stringa nulla" -#: builtin.c:1946 +#: builtin.c:1762 msgid "mktime: received non-string argument" msgstr "mktime: l'argomento non è una stringa" -#: builtin.c:1963 +#: builtin.c:1779 msgid "mktime: at least one of the values is out of the default range" msgstr "mktime: almeno un valore è fuori dall'intervallo di default" -#: builtin.c:1998 +#: builtin.c:1814 msgid "'system' function not allowed in sandbox mode" msgstr "la funzione 'system' non è permessa in modo 'sandbox'" -#: builtin.c:2003 +#: builtin.c:1819 msgid "system: received non-string argument" msgstr "system: l'argomento non è una stringa" -#: builtin.c:2121 +#: builtin.c:1874 eval.c:1159 eval.c:1790 eval.c:1803 +#, c-format +msgid "reference to uninitialized variable `%s'" +msgstr "riferimento a variabile non inizializzata `%s'" + +#: builtin.c:1941 #, c-format msgid "reference to uninitialized field `$%d'" msgstr "riferimento a variabile non inizializzata `$%d'" -#: builtin.c:2208 +#: builtin.c:2028 msgid "tolower: received non-string argument" msgstr "tolower: l'argomento non è una stringa" -#: builtin.c:2242 +#: builtin.c:2062 msgid "toupper: received non-string argument" msgstr "toupper: l'argomento non è una stringa" -#: builtin.c:2278 +#: builtin.c:2098 msgid "atan2: received non-numeric first argument" msgstr "atan2: il primo argomento non è numerico" -#: builtin.c:2280 +#: builtin.c:2100 msgid "atan2: received non-numeric second argument" msgstr "atan2: il secondo argomento non è numerico" -#: builtin.c:2299 +#: builtin.c:2119 msgid "sin: received non-numeric argument" msgstr "sin: l'argomento non è numerico" -#: builtin.c:2315 +#: builtin.c:2135 msgid "cos: received non-numeric argument" msgstr "cos: l'argomento non è numerico" -#: builtin.c:2368 +#: builtin.c:2188 msgid "srand: received non-numeric argument" msgstr "srand: l'argomento non è numerico" -#: builtin.c:2399 +#: builtin.c:2219 msgid "match: third argument is not an array" msgstr "match: il terzo argomento non è un vettore" -#: builtin.c:2664 +#: builtin.c:2483 msgid "gensub: third argument of 0 treated as 1" msgstr "gensub: il terzo argomento è 0, trattato come 1" -#: builtin.c:2957 +#: builtin.c:2776 msgid "lshift: received non-numeric first argument" msgstr "lshift: il primo argomento non è numerico" -#: builtin.c:2959 +#: builtin.c:2778 msgid "lshift: received non-numeric second argument" msgstr "lshift: il secondo argomento non è numerico" -#: builtin.c:2965 +#: builtin.c:2784 #, c-format msgid "lshift(%lf, %lf): negative values will give strange results" msgstr "lshift(%lf, %lf): valori negativi daranno risultati strani" -#: builtin.c:2967 +#: builtin.c:2786 #, c-format msgid "lshift(%lf, %lf): fractional values will be truncated" msgstr "lshift(%lf, %lf): valori con decimali verranno troncati" -#: builtin.c:2969 +#: builtin.c:2788 #, 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:2994 +#: builtin.c:2813 msgid "rshift: received non-numeric first argument" msgstr "rshift: il primo argomento non è numerico" -#: builtin.c:2996 +#: builtin.c:2815 msgid "rshift: received non-numeric second argument" msgstr "rshift: il secondo argomento non è numerico" -#: builtin.c:3002 +#: builtin.c:2821 #, c-format msgid "rshift(%lf, %lf): negative values will give strange results" msgstr "rshift(%lf, %lf): valori negativi daranno risultati strani" -#: builtin.c:3004 +#: builtin.c:2823 #, c-format msgid "rshift(%lf, %lf): fractional values will be truncated" msgstr "rshift(%lf, %lf): valori con decimali verranno troncati" -#: builtin.c:3006 +#: builtin.c:2825 #, 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:3031 +#: builtin.c:2850 msgid "and: received non-numeric first argument" msgstr "and: il primo argomento non è numerico" -#: builtin.c:3033 +#: builtin.c:2852 msgid "and: received non-numeric second argument" msgstr "and: il secondo argomento non è numerico" -#: builtin.c:3039 +#: builtin.c:2858 #, c-format msgid "and(%lf, %lf): negative values will give strange results" msgstr "and(%lf, %lf): valori negativi daranno risultati strani" -#: builtin.c:3041 +#: builtin.c:2860 #, c-format msgid "and(%lf, %lf): fractional values will be truncated" msgstr "and(%lf, %lf): valori con decimali verranno troncati" -#: builtin.c:3066 +#: builtin.c:2885 msgid "or: received non-numeric first argument" msgstr "or: il primo argomento non è numerico" -#: builtin.c:3068 +#: builtin.c:2887 msgid "or: received non-numeric second argument" msgstr "or: il secondo argomento non è numerico" -#: builtin.c:3074 +#: builtin.c:2893 #, c-format msgid "or(%lf, %lf): negative values will give strange results" msgstr "or(%lf, %lf): valori negativi daranno risultati strani" -#: builtin.c:3076 +#: builtin.c:2895 #, c-format msgid "or(%lf, %lf): fractional values will be truncated" msgstr "or(%lf, %lf): valori con decimali verranno troncati" -#: builtin.c:3102 +#: builtin.c:2923 msgid "xor: received non-numeric first argument" msgstr "xor: il primo argomento non è numerico" -#: builtin.c:3104 +#: builtin.c:2925 msgid "xor: received non-numeric second argument" msgstr "xor: il secondo argomento non è numerico" -#: builtin.c:3110 +#: builtin.c:2931 #, c-format msgid "xor(%lf, %lf): negative values will give strange results" msgstr "xor(%lf, %lf): valori negativi daranno risultati strani" -#: builtin.c:3112 +#: builtin.c:2933 #, c-format msgid "xor(%lf, %lf): fractional values will be truncated" msgstr "xor(%lf, %lf): valori con decimali verranno troncati" -#: builtin.c:3136 +#: builtin.c:2957 builtin.c:2963 msgid "compl: received non-numeric argument" msgstr "compl: l'argomento non è numerico" -#: builtin.c:3142 +#: builtin.c:2965 #, c-format msgid "compl(%lf): negative value will give strange results" msgstr "compl(%lf): valore negativo darà risultati strani" -#: builtin.c:3144 +#: builtin.c:2967 #, c-format msgid "compl(%lf): fractional value will be truncated" msgstr "compl(%lf): valore con decimali verrà troncato" -#: builtin.c:3313 +#: builtin.c:3136 #, c-format msgid "dcgettext: `%s' is not a valid locale category" msgstr "dcgettext: `%s' non è una categoria 'locale' valida" -#: eval.c:395 +#: eval.c:412 #, c-format msgid "unknown nodetype %d" msgstr "tipo nodo sconosciuto %d" -#: eval.c:406 eval.c:420 +#: eval.c:423 eval.c:437 #, c-format msgid "unknown opcode %d" msgstr "codice operativo sconosciuto %d" -#: eval.c:417 +#: eval.c:434 #, c-format msgid "opcode %s not an operator or keyword" msgstr "codice operativo %s non è un operatore o una parola chiave" -#: eval.c:472 +#: eval.c:488 msgid "buffer overflow in genflags2str" msgstr "superamento limiti buffer in 'genflags2str'" -#: eval.c:675 +#: eval.c:698 #, c-format msgid "" "\n" @@ -933,246 +992,307 @@ msgstr "" "\t# 'Stack' (Pila) Chiamate Funzione:\n" "\n" -#: eval.c:704 +#: eval.c:725 msgid "`IGNORECASE' is a gawk extension" msgstr "`IGNORECASE' è un'estensione gawk" -#: eval.c:736 +#: eval.c:754 msgid "`BINMODE' is a gawk extension" msgstr "`BINMODE' è un'estensione gawk" -#: eval.c:793 +#: eval.c:812 #, c-format msgid "BINMODE value `%s' is invalid, treated as 3" msgstr "valore di BINMODE `%s' non valido, considerato come 3" -#: eval.c:885 +#: eval.c:902 #, c-format msgid "bad `%sFMT' specification `%s'" msgstr "specificazione invalida `%sFMT' `%s'" -#: eval.c:969 +#: eval.c:980 msgid "turning off `--lint' due to assignment to `LINT'" msgstr "disabilito `--lint' a causa di assegnamento a `LINT'" -#: eval.c:1132 +#: eval.c:1127 eval.c:1777 +#, fuzzy, c-format +msgid "can't use function name `%s' as variable or array" +msgstr "non posso usare nome di funzione `%s' come nome di variabile" + +#: eval.c:1158 eval.c:1789 eval.c:1802 #, c-format msgid "reference to uninitialized argument `%s'" msgstr "riferimento ad argomento non inizializzato `%s'" -#: eval.c:1133 -#, c-format -msgid "reference to uninitialized variable `%s'" -msgstr "riferimento a variabile non inizializzata `%s'" - -#: eval.c:1151 +#: eval.c:1177 msgid "attempt to field reference from non-numeric value" msgstr "tentativo di riferimento a un campo da valore non numerico" -#: eval.c:1153 +#: eval.c:1179 msgid "attempt to field reference from null string" msgstr "tentativo di riferimento a un campo da una stringa nulla" -#: eval.c:1161 +#: eval.c:1185 #, c-format msgid "attempt to access field %ld" msgstr "tentativo di accedere al campo %ld" -#: eval.c:1170 +#: eval.c:1194 #, c-format msgid "reference to uninitialized field `$%ld'" msgstr "riferimento a campo non inizializzato `$%ld'" -#: eval.c:1257 +#: eval.c:1256 #, c-format msgid "function `%s' called with more arguments than declared" msgstr "funzione `%s' chiamata con più argomenti di quelli previsti" -#: eval.c:1452 +#: eval.c:1437 #, c-format msgid "unwind_stack: unexpected type `%s'" msgstr "unwind_stack: tipo non previsto `%s'" -#: eval.c:1546 +#: eval.c:1532 msgid "division by zero attempted in `/='" msgstr "divisione per zero tentata in `/='" -#: eval.c:1553 +#: eval.c:1539 #, c-format msgid "division by zero attempted in `%%='" msgstr "divisione per zero tentata in `%%='" -#: ext.c:70 +#: eval.c:1876 eval.c:2122 +#, fuzzy, c-format +msgid "attempt to use array `%s[\"%.*s\"]' in a scalar context" +msgstr "tentativo di usare vettore `%s' in un contesto scalare" + +#: eval.c:1907 +#, fuzzy +msgid "assignment used in conditional context" +msgstr "`return' usato fuori da una funzione" + +#: eval.c:1911 +msgid "statement has no effect" +msgstr "" + +#: eval.c:2343 +#, c-format +msgid "for loop: array `%s' changed size from %ld to %ld during loop execution" +msgstr "" + +#: eval.c:2458 +#, c-format +msgid "function called indirectly through `%s' does not exist" +msgstr "" + +#: eval.c:2470 +#, fuzzy, c-format +msgid "function `%s' not defined" +msgstr "funzione di nome `%s' definita in precedenza" + +#: eval.c:2511 +#, fuzzy, c-format +msgid "non-redirected `getline' invalid inside `%s' rule" +msgstr "`getline' invalida all'interno della regola `%s'" + +#: eval.c:2600 +#, c-format +msgid "error reading input file `%s': %s" +msgstr "" + +#: eval.c:2614 +#, c-format +msgid "`nextfile' cannot be called from a `%s' rule" +msgstr "" + +#: eval.c:2661 +msgid "`exit' cannot be called in the current context" +msgstr "" + +#: eval.c:2700 +#, c-format +msgid "`next' cannot be called from a `%s' rule" +msgstr "" + +#: eval.c:2766 +#, c-format +msgid "Sorry, don't know how to interpret `%s'" +msgstr "" + +#: ext.c:54 msgid "extensions are not allowed in sandbox mode" msgstr "le estensioni non sono permesse in modo 'sandbox'" -#: ext.c:73 +#: ext.c:60 ext.c:65 msgid "`extension' is a gawk extension" msgstr "`extension' è un'estensione gawk" -#: ext.c:80 -msgid "extension: cannot open library `%s' (%s)\n" +#: ext.c:75 +#, fuzzy, c-format +msgid "fatal: extension: cannot open `%s' (%s)\n" msgstr "estensione: non riesco ad aprire libreria `%s' (%s)\n" -#: ext.c:86 +#: ext.c:84 +#, fuzzy, c-format msgid "" -"extension: library `%s': does not define `plugin_is_GPL_compatible' (%s)\n" -msgstr "" -"estensione: libreria `%s': non definisce " +"fatal: extension: library `%s': does not define " "`plugin_is_GPL_compatible' (%s)\n" - -#: ext.c:90 -msgid "extension: library `%s': cannot call function `%s' (%s)\n" msgstr "" -"estensione: libreria `%s': non riesco a chiamare funzione `%s' (%s)\n" +"estensione: libreria `%s': non definisce `plugin_is_GPL_compatible' (%s)\n" -#: ext.c:118 +#: ext.c:93 +#, fuzzy, c-format +msgid "fatal: extension: library `%s': cannot call function `%s' (%s)\n" +msgstr "estensione: libreria `%s': non riesco a chiamare funzione `%s' (%s)\n" + +#: ext.c:127 msgid "extension: missing function name" msgstr "estensione: manca nome di funzione" -#: ext.c:123 +#: ext.c:132 #, c-format msgid "extension: illegal character `%c' in function name `%s'" msgstr "estensione: carattere non ammesso `%c' nel nome di funzione `%s'" -#: ext.c:131 +#: ext.c:141 #, c-format msgid "extension: can't redefine function `%s'" msgstr "estensione: non riesco a ridefinire funzione `%s'" -#: ext.c:135 +#: ext.c:145 #, c-format msgid "extension: function `%s' already defined" msgstr "estensione: funzione `%s' già definita" -#: ext.c:139 +#: ext.c:150 #, c-format msgid "extension: function name `%s' previously defined" msgstr "estensione: funzione di nome `%s' definita in precedenza" -#: ext.c:141 +#: ext.c:152 #, 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:144 +#: ext.c:156 #, c-format msgid "make_builtin: negative argument count for function `%s'" msgstr "make_builtin: contatore argomenti negativo per la funzione `%s'" -#: ext.c:206 +#: ext.c:259 #, c-format msgid "function `%s' defined to take no more than %d argument(s)" msgstr "funzione `%s' definita per avere al massimo %d argomenti(o)" -#: ext.c:209 +#: ext.c:262 #, c-format msgid "function `%s': missing argument #%d" msgstr "funzione `%s': manca argomento #%d" -#: ext.c:226 +#: ext.c:279 #, 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:230 +#: ext.c:283 #, 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:244 +#: ext.c:296 msgid "Operation Not Supported" msgstr "Operazione Non Supportata" -#: ext.c:256 -msgid "dynamic loading of library not supported" -msgstr "caricamento dinamico di libreria non supportato" - -#: field.c:339 +#: field.c:328 msgid "NF set to negative value" msgstr "NF impostato a un valore negativo" -#: field.c:962 field.c:969 field.c:973 +#: field.c:951 field.c:958 field.c:962 msgid "split: fourth argument is a gawk extension" msgstr "split: il quarto argomento è un'estensione gawk" -#: field.c:966 +#: field.c:955 msgid "split: fourth argument is not an array" msgstr "split: il quarto argomento non è un vettore" -#: field.c:980 +#: field.c:969 msgid "split: second argument is not an array" msgstr "split: il secondo argomento non è un vettore" -#: field.c:984 +#: field.c:973 msgid "split: cannot use the same array for second and fourth args" msgstr "" "split: non si può usare un unico vettore come secondo e quarto argomento" -#: field.c:989 +#: field.c:978 msgid "split: cannot use a subarray of second arg for fourth arg" msgstr "" -"split: non permesso un quarto argomento che sia un sottovettore del secondo argomento" +"split: non permesso un quarto argomento che sia un sottovettore del secondo " +"argomento" -#: field.c:992 +#: field.c:981 msgid "split: cannot use a subarray of fourth arg for second arg" msgstr "" -"split: non permesso un secondo argomento che sia un sottovettore del quarto argomento" +"split: non permesso un secondo argomento che sia un sottovettore del quarto " +"argomento" -#: field.c:1021 +#: field.c:1010 msgid "split: null string for third arg is a gawk extension" msgstr "split: la stringa nulla come terzo arg. è un'estensione gawk" -#: field.c:1061 +#: field.c:1050 msgid "patsplit: fourth argument is not an array" msgstr "patsplit: il secondo argomento non è un vettore" -#: field.c:1066 +#: field.c:1055 msgid "patsplit: second argument is not an array" msgstr "patsplit: il secondo argomento non è un vettore" -#: field.c:1072 +#: field.c:1061 msgid "patsplit: third argument must be non-null" msgstr "patsplit: il terzo argomento non può essere nullo" -#: field.c:1076 +#: field.c:1065 msgid "patsplit: cannot use the same array for second and fourth args" msgstr "" "patsplit: non si può usare un unico vettore come secondo e quarto argomento" -#: field.c:1081 +#: field.c:1070 msgid "patsplit: cannot use a subarray of second arg for fourth arg" msgstr "" -"patsplit: non permesso un quarto argomento che sia un sottovettore del secondo argomento" +"patsplit: non permesso un quarto argomento che sia un sottovettore del " +"secondo argomento" -#: field.c:1084 +#: field.c:1073 msgid "patsplit: cannot use a subarray of fourth arg for second arg" msgstr "" -"patsplit: non permesso un secondo argomento che sia un sottovettore del quarto argomento" +"patsplit: non permesso un secondo argomento che sia un sottovettore del " +"quarto argomento" -#: field.c:1122 +#: field.c:1110 msgid "`FIELDWIDTHS' is a gawk extension" msgstr "`FIELDWIDTHS' è un'estensione gawk" -#: field.c:1186 +#: field.c:1173 #, c-format msgid "invalid FIELDWIDTHS value, near `%s'" msgstr "valore di FIELDWIDTHS non valido, vicino a `%s'" -#: field.c:1259 +#: field.c:1246 msgid "null string for `FS' is a gawk extension" msgstr "la stringa nulla usata come `FS' è un'estensione gawk" -#: field.c:1263 +#: field.c:1250 msgid "old awk does not support regexps as value of `FS'" msgstr "il vecchio awk non supporta espressioni come valori di `FS'" -#: field.c:1382 +#: field.c:1369 msgid "`FPAT' is a gawk extension" msgstr "`FPAT' è un'estensione gawk" #: getopt.c:604 getopt.c:633 +#, c-format msgid "%s: option '%s' is ambiguous; possibilities:" msgstr "%s: opzione '%s' ambigua; possibilità:" @@ -1226,471 +1346,460 @@ msgstr "%s: l'opzione '-W %s' non ammette un argomento\n" msgid "%s: option '-W %s' requires an argument\n" msgstr "%s: l'opzione '-W %s' richiede un argomento\n" -#: io.c:326 +#: io.c:280 #, c-format msgid "command line argument `%s' is a directory: skipped" msgstr "l'argomento in linea comando `%s' è una directory: saltato" -#: io.c:329 io.c:438 +#: io.c:283 io.c:385 #, c-format msgid "cannot open file `%s' for reading (%s)" msgstr "non riesco ad aprire file `%s' in lettura (%s)" -#: io.c:568 +#: io.c:501 #, c-format msgid "close of fd %d (`%s') failed (%s)" msgstr "chiusura di fd %d (`%s') fallita (%s)" -#: io.c:645 +#: io.c:578 msgid "redirection not allowed in sandbox mode" msgstr "re-direzione non permessa in modo 'sandbox'" -#: io.c:679 +#: io.c:612 #, c-format msgid "expression in `%s' redirection only has numeric value" msgstr "espressione nella re-direzione `%s' ha solo un valore numerico" -#: io.c:685 +#: io.c:618 #, 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:690 +#: io.c:623 #, 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:733 +#: io.c:666 #, c-format msgid "unnecessary mixing of `>' and `>>' for file `%.*s'" msgstr "mistura non necessaria di `>' e `>>' per il file `%.*s'" -#: io.c:786 +#: io.c:719 #, c-format msgid "can't open pipe `%s' for output (%s)" msgstr "non posso aprire 'pipe' `%s' in scrittura (%s)" -#: io.c:796 +#: io.c:729 #, c-format msgid "can't open pipe `%s' for input (%s)" msgstr "non posso aprire 'pipe' `%s' in lettura (%s)" -#: io.c:819 +#: io.c:752 #, 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:900 +#: io.c:834 #, c-format msgid "can't redirect from `%s' (%s)" msgstr "non posso re-dirigere da `%s' (%s)" -#: io.c:903 +#: io.c:837 #, c-format msgid "can't redirect to `%s' (%s)" msgstr "non posso re-dirigere a `%s' (%s)" -#: io.c:954 +#: io.c:888 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:970 +#: io.c:904 #, c-format msgid "close of `%s' failed (%s)." msgstr "chiusura di `%s' fallita (%s)." -#: io.c:978 +#: io.c:912 msgid "too many pipes or input files open" msgstr "troppe 'pipe' o file di input aperti" -#: io.c:1000 +#: io.c:934 msgid "close: second argument must be `to' or `from'" msgstr "close: il secondo argomento deve essere `a' o `da'" -#: io.c:1017 +#: io.c:951 #, 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:1022 +#: io.c:956 msgid "close of redirection that was never opened" msgstr "chiusura di una re-direzione mai aperta" -#: io.c:1120 +#: io.c:1053 #, 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:1137 +#: io.c:1069 #, c-format msgid "failure status (%d) on pipe close of `%s' (%s)" msgstr "errore ritornato (%d) dalla chiusura della 'pipe' `%s' (%s)" -#: io.c:1140 +#: io.c:1072 #, c-format msgid "failure status (%d) on file close of `%s' (%s)" msgstr "errore ritornato (%d) dalla chiusura del file `%s' (%s)" -#: io.c:1160 +#: io.c:1092 #, c-format msgid "no explicit close of socket `%s' provided" msgstr "nessuna chiusura esplicita richiesta per 'socket' `%s'" -#: io.c:1163 +#: io.c:1095 #, c-format msgid "no explicit close of co-process `%s' provided" msgstr "nessuna chiusura esplicita richiesta per co-processo `%s'" -#: io.c:1166 +#: io.c:1098 #, c-format msgid "no explicit close of pipe `%s' provided" msgstr "nessuna chiusura esplicita richiesta per 'pipe' `%s'" -#: io.c:1169 +#: io.c:1101 #, c-format msgid "no explicit close of file `%s' provided" msgstr "nessuna chiusura esplicita richiesta per file `%s'" -#: io.c:1197 io.c:1252 main.c:825 main.c:862 +#: io.c:1129 io.c:1184 main.c:794 main.c:831 #, c-format msgid "error writing standard output (%s)" msgstr "errore scrivendo 'standard output' (%s)" -#: io.c:1201 io.c:1257 +#: io.c:1133 io.c:1189 #, c-format msgid "error writing standard error (%s)" msgstr "errore scrivendo 'standard error' (%s)" -#: io.c:1209 +#: io.c:1141 #, c-format msgid "pipe flush of `%s' failed (%s)." msgstr "scaricamento di 'pipe' `%s' fallita (%s)." -#: io.c:1212 +#: io.c:1144 #, 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:1215 +#: io.c:1147 #, c-format msgid "file flush of `%s' failed (%s)." msgstr "scaricamento di file `%s' fallita (%s)." -#: io.c:1329 +#: io.c:1262 #, c-format msgid "local port %s invalid in `/inet'" msgstr "porta locale %s invalida in `/inet'" -#: io.c:1347 +#: io.c:1279 #, c-format msgid "remote host and port information (%s, %s) invalid" msgstr "host remoto e informazione di porta (%s, %s) invalidi" -#: io.c:1499 +#: io.c:1431 #, c-format msgid "no (known) protocol supplied in special filename `%s'" msgstr "nessuno protocollo (noto) specificato nel filename speciale `%s'" -#: io.c:1513 +#: io.c:1445 #, c-format msgid "special file name `%s' is incomplete" msgstr "nome-file speciale `%s' incompleto" -#: io.c:1530 +#: io.c:1462 msgid "must supply a remote hostname to `/inet'" msgstr "va fornito nome di 'host' remoto a `/inet'" -#: io.c:1548 +#: io.c:1480 msgid "must supply a remote port to `/inet'" msgstr "va fornita porta remota a `/inet'" -#: io.c:1594 +#: io.c:1526 msgid "TCP/IP communications are not supported" msgstr "comunicazioni TCP/IP non supportate" -#: io.c:1764 +#: io.c:1693 #, c-format msgid "could not open `%s', mode `%s'" msgstr "non riesco ad aprire `%s', modo `%s'" -#: io.c:1814 +#: io.c:1747 #, c-format msgid "close of master pty failed (%s)" msgstr "fallita chiusura di 'pty' principale (%s)" -#: io.c:1816 io.c:1984 io.c:2145 +#: io.c:1749 io.c:1917 io.c:2074 #, c-format msgid "close of stdout in child failed (%s)" msgstr "fallita chiusura di 'stdout' nel processo-figlio (%s)" -#: io.c:1819 +#: io.c:1752 #, 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:1821 io.c:1989 +#: io.c:1754 io.c:1922 #, c-format msgid "close of stdin in child failed (%s)" msgstr "fallita chiusura di 'stdin' nel processo-figlio (%s)" -#: io.c:1824 +#: io.c:1757 #, 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:1826 io.c:1847 +#: io.c:1759 io.c:1780 #, c-format msgid "close of slave pty failed (%s)" msgstr "fallita chiusura di 'pty' secondaria (%s)" -#: io.c:1925 io.c:1987 io.c:2122 io.c:2148 +#: io.c:1858 io.c:1920 io.c:2052 io.c:2077 #, 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:1932 io.c:1992 +#: io.c:1865 io.c:1925 #, 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:1952 io.c:2138 +#: io.c:1885 io.c:2067 msgid "restoring stdout in parent process failed\n" msgstr "fallito ripristino di 'stdout' nel processo-padre\n" -#: io.c:1960 +#: io.c:1893 msgid "restoring stdin in parent process failed\n" msgstr "fallito ripristino di 'stdin' nel processo-padre\n" -#: io.c:1995 io.c:2150 io.c:2164 +#: io.c:1928 io.c:2079 io.c:2093 #, c-format msgid "close of pipe failed (%s)" msgstr "fallita chiusura di 'pipe' (%s)" -#: io.c:2040 +#: io.c:1973 msgid "`|&' not supported" msgstr "`|&' non supportato" -#: io.c:2107 +#: io.c:2039 #, c-format msgid "cannot open pipe `%s' (%s)" msgstr "non riesco ad aprire 'pipe' `%s' (%s)" -#: io.c:2158 +#: io.c:2087 #, c-format msgid "cannot create child process for `%s' (fork: %s)" msgstr "non riesco a creare processo-figlio per `%s' (fork: %s)" -#: io.c:2637 +#: io.c:2520 #, c-format msgid "data file `%s' is empty" msgstr "file dati `%s' vuoto" -#: io.c:2678 io.c:2686 +#: io.c:2561 io.c:2569 msgid "could not allocate more input memory" msgstr "non riesco ad allocare ulteriore memoria per l'input" -#: io.c:3236 +#: io.c:3127 msgid "multicharacter value of `RS' is a gawk extension" msgstr "valore multicarattere per `RS' è un'estensione gawk" -#: io.c:3326 +#: io.c:3232 msgid "IPv6 communication is not supported" msgstr "comunicazioni IPv6 non supportate" -#: main.c:355 +#: main.c:366 msgid "`-m[fr]' option irrelevant in gawk" msgstr "`-m[fr]' opzione irrilevante per gawk" -#: main.c:357 +#: main.c:368 msgid "-m option usage: `-m[fr] nnn'" msgstr "-m uso opzione: `-m[fr] nnn'" -#: main.c:386 +#: main.c:391 msgid "empty argument to `-e/--source' ignored" msgstr "argomento di `-e/--source' nullo, ignorato" -#: main.c:472 +#: main.c:462 #, c-format msgid "%s: option `-W %s' unrecognized, ignored\n" msgstr "%s: opzione `-W %s' non riconosciuta, ignorata\n" -#: main.c:518 +#: main.c:515 #, c-format msgid "%s: option requires an argument -- %c\n" msgstr "%s: l'opzione richiede un argomento -- %c\n" -#: main.c:539 +#: main.c:536 msgid "environment variable `POSIXLY_CORRECT' set: turning on `--posix'" msgstr "variable d'ambiente `POSIXLY_CORRECT' impostata: attivo `--posix'" -#: main.c:545 +#: main.c:542 msgid "`--posix' overrides `--traditional'" msgstr "`--posix' annulla `--traditional'" -#: main.c:556 +#: main.c:553 msgid "`--posix'/`--traditional' overrides `--non-decimal-data'" msgstr "`--posix'/`--traditional' annulla `--non-decimal-data'" -#: main.c:560 +#: main.c:557 #, 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:565 +#: main.c:562 msgid "`--posix' overrides `--binary'" msgstr "`--posix' annulla `--binary" -#: main.c:623 +#: main.c:613 #, c-format msgid "can't set binary mode on stdin (%s)" msgstr "non posso impostare modalità binaria su 'stdin'(%s)" -#: main.c:626 +#: main.c:616 #, c-format msgid "can't set binary mode on stdout (%s)" msgstr "non posso impostare modalità binaria su 'stdout'(%s)" -#: main.c:628 +#: main.c:618 #, c-format msgid "can't set binary mode on stderr (%s)" msgstr "non posso impostare modalità binaria su 'stderr'(%s)" -#: main.c:679 +#: main.c:657 msgid "no program text at all!" msgstr "manca del tutto il testo del programma!" -#: main.c:763 +#: main.c:734 #, c-format msgid "Usage: %s [POSIX or GNU style options] -f progfile [--] file ...\n" msgstr "Uso: %s [opzioni in stile POSIX o GNU] -f file-prog. [--] file ...\n" -#: main.c:765 +#: main.c:736 #, 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:770 +#: main.c:741 msgid "POSIX options:\t\tGNU long options: (standard)\n" msgstr "Opzioni POSIX:\t\topzioni lunghe GNU: (standard)\n" -#: main.c:771 +#: main.c:742 msgid "\t-f progfile\t\t--file=progfile\n" msgstr "\t-f fileprog\t\t--file=file-prog.\n" -#: main.c:772 +#: main.c:743 msgid "\t-F fs\t\t\t--field-separator=fs\n" msgstr "\t-F fs\t\t\t--field-separator=fs\n" -#: main.c:773 +#: main.c:744 msgid "\t-v var=val\t\t--assign=var=val\n" msgstr "\t-v var=valore\t\t--assign=var=valore\n" -#: main.c:774 +#: main.c:745 msgid "Short options:\t\tGNU long options: (extensions)\n" msgstr "Opzioni brevi:\t\topzioni lunghe GNU: (estensioni)\n" -#: main.c:775 +#: main.c:746 msgid "\t-b\t\t\t--characters-as-bytes\n" msgstr "\t-b\t\t\t--characters-as-bytes\n" -#: main.c:776 +#: main.c:747 msgid "\t-c\t\t\t--traditional\n" msgstr "\t-c\t\t\t--traditional\n" -#: main.c:777 +#: main.c:748 msgid "\t-C\t\t\t--copyright\n" msgstr "\t-C\t\t\t--copyright\n" -#: main.c:778 +#: main.c:749 msgid "\t-d[file]\t\t--dump-variables[=file]\n" msgstr "\t-d[file]\t\t--dump-variables[=file]\n" -#: main.c:779 -msgid "\t-D[file]\t\t--debug[=file]\n" -msgstr "\t-D[file]\t\t--debug[=file]\n" - -#: main.c:780 +#: main.c:750 msgid "\t-e 'program-text'\t--source='program-text'\n" msgstr "\t-e 'testo-del-programma'\t--source='testo-del-programma'\n" -#: main.c:781 +#: main.c:751 msgid "\t-E file\t\t\t--exec=file\n" msgstr "\t-E file\t\t\t--exec=file\n" -#: main.c:782 +#: main.c:752 msgid "\t-g\t\t\t--gen-pot\n" msgstr "\t-g\t\t\t--gen-pot\n" -#: main.c:783 +#: main.c:753 msgid "\t-h\t\t\t--help\n" msgstr "\t-h\t\t\t--help\n" -#: main.c:784 -msgid "\t-l library\t\t--load=library\n" -msgstr "\t-l libreria\t\t--load=libreria\n" - -#: main.c:785 +#: main.c:754 msgid "\t-L [fatal]\t\t--lint[=fatal]\n" msgstr "\t-L [fatal]\t\t--lint[=fatal]\n" -#: main.c:786 +#: main.c:755 msgid "\t-n\t\t\t--non-decimal-data\n" msgstr "\t-n\t\t\t--non-decimal-data\n" -#: main.c:787 -msgid "\t-M\t\t\t--bignum\n" -msgstr "\t-M\t\t\t--bignum\n" - -#: main.c:788 +#: main.c:756 msgid "\t-N\t\t\t--use-lc-numeric\n" msgstr "\t-N\t\t\t--use-lc-numeric\n" -#: main.c:789 -msgid "\t-o[file]\t\t--pretty-print[=file]\n" -msgstr "\t-o[file]\t\t--pretty-print[=file]\n" - -#: main.c:790 +#: main.c:757 msgid "\t-O\t\t\t--optimize\n" msgstr "\t-O\t\t\t--optimize\n" -#: main.c:791 +#: main.c:758 msgid "\t-p[file]\t\t--profile[=file]\n" msgstr "\t-p[file]\t\t--profile[=file]\n" -#: main.c:792 +#: main.c:759 msgid "\t-P\t\t\t--posix\n" msgstr "\t-P\t\t\t--posix\n" -#: main.c:793 +#: main.c:760 msgid "\t-r\t\t\t--re-interval\n" msgstr "\t-r\t\t\t--re-interval\n" -#: main.c:794 +#: main.c:762 +#, fuzzy +msgid "\t-R file\t\t\t--command=file\n" +msgstr "\t-E file\t\t\t--exec=file\n" + +#: main.c:763 msgid "\t-S\t\t\t--sandbox\n" msgstr "\t-S\t\t\t--sandbox\n" -#: main.c:795 +#: main.c:764 msgid "\t-t\t\t\t--lint-old\n" msgstr "\t-t\t\t\t--lint-old\n" -#: main.c:796 +#: main.c:765 msgid "\t-V\t\t\t--version\n" msgstr "\t-V\t\t\t--version\n" -#: main.c:798 +#: main.c:767 msgid "\t-W nostalgia\t\t--nostalgia\n" msgstr "\t-W nostalgia\t\t--nostalgia\n" -#: main.c:801 +#: main.c:770 msgid "\t-Y\t\t--parsedebug\n" msgstr "\t-Y\t\t--parsedebug\n" @@ -1699,7 +1808,7 @@ msgstr "\t-Y\t\t--parsedebug\n" #. for this application. Please add _another line_ with the #. address for translation bugs. #. no-wrap -#: main.c:810 +#: main.c:779 msgid "" "\n" "To report bugs, see node `Bugs' in `gawk.info', which is\n" @@ -1712,7 +1821,7 @@ msgstr "" "Problemi di traduzione, segnalare ad: azc100@gmail.com.\n" "\n" -#: main.c:814 +#: main.c:783 msgid "" "gawk is a pattern scanning and processing language.\n" "By default it reads standard input and writes standard output.\n" @@ -1722,7 +1831,7 @@ msgstr "" "Senza parametri, legge da 'standard input' e scrive su 'standard output'.\n" "\n" -#: main.c:818 +#: main.c:787 msgid "" "Examples:\n" "\tgawk '{ sum += $1 }; END { print sum }' file\n" @@ -1732,7 +1841,7 @@ msgstr "" "\tgawk '{ sum += $1 }; END { print sum }' file\n" "\tgawk -F: '{ print $1 }' /etc/passwd\n" -#: main.c:838 +#: main.c:807 #, c-format msgid "" "Copyright (C) 1989, 1991-%d Free Software Foundation.\n" @@ -1751,7 +1860,7 @@ msgstr "" "Licenza, o (a tua scelta) a una qualsiasi versione successiva.\n" "\n" -#: main.c:846 +#: main.c:815 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" @@ -1765,7 +1874,7 @@ msgstr "" "Vedi la 'GNU General Public License' per ulteriori dettagli.\n" "\n" -#: main.c:852 +#: main.c:821 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" @@ -1774,16 +1883,16 @@ msgstr "" "assieme a questo programma; se non è così, vedi http://www.gnu.org/" "licenses/.\n" -#: main.c:887 +#: main.c:856 msgid "-Ft does not set FS to tab in POSIX awk" msgstr "-Ft non imposta FS a 'tab' nell'awk POSIX" -#: main.c:1133 +#: main.c:1090 #, c-format msgid "unknown value for field spec: %d\n" msgstr "valore non noto per specifica campo: %d\n" -#: main.c:1214 +#: main.c:1171 #, c-format msgid "" "%s: `%s' argument to `-v' not in `var=value' form\n" @@ -1792,78 +1901,79 @@ msgstr "" "%s: `%s' argomento di `-v' non in forma `var=valore'\n" "\n" -#: main.c:1240 +#: main.c:1197 #, c-format msgid "`%s' is not a legal variable name" msgstr "`%s' non è un nome di variabile ammesso" -#: main.c:1243 +#: main.c:1200 #, 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:1247 +#: main.c:1204 +#, c-format msgid "cannot use gawk builtin `%s' as variable name" -msgstr "" -"nome funzione interna gawk `%s' non ammesso come nome variabile" +msgstr "nome funzione interna gawk `%s' non ammesso come nome variabile" -#: main.c:1252 +#: main.c:1209 +#, c-format msgid "cannot use function `%s' as variable name" msgstr "non posso usare nome di funzione `%s' come nome di variabile" -#: main.c:1305 +#: main.c:1262 msgid "floating point exception" msgstr "eccezione floating point" -#: main.c:1312 +#: main.c:1269 msgid "fatal error: internal error" msgstr "errore fatale: errore interno" -#: main.c:1327 +#: main.c:1284 msgid "fatal error: internal error: segfault" msgstr "errore fatale: errore interno: segfault" -#: main.c:1339 +#: main.c:1296 msgid "fatal error: internal error: stack overflow" msgstr "errore fatale: errore interno: stack overflow" -#: main.c:1393 +#: main.c:1346 #, c-format msgid "no pre-opened fd %d" msgstr "manca 'fd' pre-aperta %d" -#: main.c:1400 +#: main.c:1353 #, c-format msgid "could not pre-open /dev/null for fd %d" msgstr "non riesco a pre-aprire /dev/null per 'fd' %d" -#: msg.c:61 +#: msg.c:63 #, c-format msgid "cmd. line:" msgstr "linea com.:" -#: msg.c:121 +#: msg.c:107 msgid "error: " msgstr "errore: " -#: node.c:436 +#: node.c:406 msgid "backslash at end of string" msgstr "'\\' a fine stringa" -#: node.c:520 +#: node.c:517 #, 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:571 +#: node.c:568 msgid "POSIX does not allow `\\x' escapes" msgstr "POSIX non permette escape `\\x'" -#: node.c:577 +#: node.c:574 msgid "no hex digits in `\\x' escape sequence" msgstr "niente cifre esadecimali nella sequenza di escape `\\x'" -#: node.c:599 +#: node.c:596 #, c-format msgid "" "hex escape \\x%.*s of %d characters probably not interpreted the way you " @@ -1872,12 +1982,12 @@ msgstr "" "sequenza di escape esadec.\\x%.*s di %d caratteri probabilmente non " "interpretata nel modo previsto" -#: node.c:614 +#: node.c:611 #, c-format msgid "escape sequence `\\%c' treated as plain `%c'" msgstr "sequenza di escape `\\%c' considerata come semplice `%c'" -#: node.c:759 +#: node.c:750 msgid "" "Invalid multibyte data detected. There may be a mismatch between your data " "and your locale." @@ -1896,16 +2006,16 @@ msgid "%s %s `%s': could not set close-on-exec: (fcntl F_SETFD: %s)" msgstr "" "%s %s `%s': non riesco a impostare 'close-on-exec': (fcntl F_SETFD: %s)" -#: profile.c:69 +#: profile.c:83 #, c-format msgid "could not open `%s' for writing: %s" msgstr "non riesco ad aprire `%s' in scrittura: %s" -#: profile.c:71 +#: profile.c:85 msgid "sending profile to standard error" msgstr "mando profilo a 'standard error'" -#: profile.c:187 +#: profile.c:203 #, c-format msgid "" "\t# %s block(s)\n" @@ -1914,7 +2024,7 @@ msgstr "" "\t# blocco(hi) %s\n" "\n" -#: profile.c:192 +#: profile.c:208 #, c-format msgid "" "\t# Rule(s)\n" @@ -1923,21 +2033,17 @@ msgstr "" "\t# Regola(e)\n" "\n" -#: profile.c:266 +#: profile.c:279 #, c-format msgid "internal error: %s with null vname" msgstr "errore interno: %s con 'vname' nullo" -#: profile.c:528 -msgid "internal error: builtin with null fname" -msgstr "errore interno: funzione interna con 'fname' nullo" - -#: profile.c:943 +#: profile.c:952 #, c-format msgid "\t# gawk profile, created %s\n" msgstr "\t# profilo gawk, creato %s\n" -#: profile.c:1328 +#: profile.c:1331 #, c-format msgid "" "\n" @@ -1946,16 +2052,17 @@ msgstr "" "\n" "\t# Funzioni, in ordine alfabetico\n" -#: profile.c:1366 +#: profile.c:1370 #, c-format msgid "redir2str: unknown redirection type %d" msgstr "redir2str: tipo di re-direzione non noto %d" -#: re.c:571 +#: re.c:573 +#, c-format msgid "range of the form `[%c-%c]' is locale dependent" msgstr "intervallo della forma `[%c-%c]' dipende da 'locale'" -#: re.c:598 +#: re.c:600 #, c-format msgid "regexp component `%.*s' should probably be `[%.*s]'" msgstr "" @@ -2033,3 +2140,20 @@ msgstr ") o \\) non aperta" msgid "No previous regular expression" msgstr "Nessuna espressione regolare precedente" +#~ msgid "dynamic loading of library not supported" +#~ msgstr "caricamento dinamico di libreria non supportato" + +#~ msgid "\t-D[file]\t\t--debug[=file]\n" +#~ msgstr "\t-D[file]\t\t--debug[=file]\n" + +#~ msgid "\t-l library\t\t--load=library\n" +#~ msgstr "\t-l libreria\t\t--load=libreria\n" + +#~ msgid "\t-M\t\t\t--bignum\n" +#~ msgstr "\t-M\t\t\t--bignum\n" + +#~ msgid "\t-o[file]\t\t--pretty-print[=file]\n" +#~ msgstr "\t-o[file]\t\t--pretty-print[=file]\n" + +#~ msgid "internal error: builtin with null fname" +#~ msgstr "errore interno: funzione interna con 'fname' nullo" -- cgit v1.2.3 From c494c33d585d0b7498b8e368434f60f2c107497f Mon Sep 17 00:00:00 2001 From: "Arnold D. Robbins" Date: Fri, 29 Jun 2012 13:39:26 +0300 Subject: Minor doc update w.r.t. mawk. --- doc/ChangeLog | 4 ++++ doc/awkcard.in | 2 +- doc/gawk.info | 2 +- doc/gawk.texi | 2 +- 4 files changed, 7 insertions(+), 3 deletions(-) diff --git a/doc/ChangeLog b/doc/ChangeLog index 8a1b004d..56ec4ef1 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -1,3 +1,7 @@ +2012-06-29 Arnold D. Robbins + + * gawk.texi, awkcard.in: Latest mawk understands /dev/stdin. + 2012-04-27 Arnold D. Robbins * gawk.texi: Add that -b affects output. diff --git a/doc/awkcard.in b/doc/awkcard.in index 22b4716f..fa45fe34 100644 --- a/doc/awkcard.in +++ b/doc/awkcard.in @@ -1205,7 +1205,7 @@ The filenames are: expand; l lw(2i). \*(FC"\-"\fP standard input -\*(FC/dev/stdin\fP standard input \*(CR(not \*(MK)\*(CD +\*(FC/dev/stdin\fP standard input \*(FC/dev/stdout\fP standard output \*(FC/dev/stderr\fP standard error output .TE diff --git a/doc/gawk.info b/doc/gawk.info index 397daab6..5b063d78 100644 --- a/doc/gawk.info +++ b/doc/gawk.info @@ -20108,7 +20108,7 @@ Feature BWK Awk Mawk GNU Awk `\x' Escape sequence X X X `RS' as regexp X X `FS' as null string X X X -`/dev/stdin' special file X X +`/dev/stdin' special file X X X `/dev/stdout' special file X X X `/dev/stderr' special file X X X `**' and `**=' operators X X diff --git a/doc/gawk.texi b/doc/gawk.texi index b22f7ced..ba5ffa30 100644 --- a/doc/gawk.texi +++ b/doc/gawk.texi @@ -27001,7 +27001,7 @@ the three most widely-used freely available versions of @command{awk} @item @samp{\x} Escape sequence @tab X @tab X @tab X @item @code{RS} as regexp @tab @tab X @tab X @item @code{FS} as null string @tab X @tab X @tab X -@item @file{/dev/stdin} special file @tab X @tab @tab X +@item @file{/dev/stdin} special file @tab X @tab X @tab X @item @file{/dev/stdout} special file @tab X @tab X @tab X @item @file{/dev/stderr} special file @tab X @tab X @tab X @item @code{**} and @code{**=} operators @tab X @tab @tab X -- cgit v1.2.3 From 4fe1f4ac1aa0e4b99c9abb26794fc0d10ebb77c6 Mon Sep 17 00:00:00 2001 From: "Arnold D. Robbins" Date: Fri, 13 Jul 2012 12:11:04 +0300 Subject: Doc update and new test on getline with side effects. --- doc/ChangeLog | 5 + doc/gawk.info | 652 ++++++++++++++++++++++++++++-------------------------- doc/gawk.texi | 28 +++ test/ChangeLog | 5 + test/Makefile.am | 4 +- test/Makefile.in | 9 +- test/Maketests | 5 + test/getline5.awk | 35 +++ test/getline5.ok | 1 + 9 files changed, 426 insertions(+), 318 deletions(-) create mode 100644 test/getline5.awk create mode 100644 test/getline5.ok diff --git a/doc/ChangeLog b/doc/ChangeLog index 56ec4ef1..e56c35a5 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -1,3 +1,8 @@ +2012-07-13 Arnold D. Robbins + + * gawk.texi (Getline Notes): Discuss side effects in + argument expression. + 2012-06-29 Arnold D. Robbins * gawk.texi, awkcard.in: Latest mawk understands /dev/stdin. diff --git a/doc/gawk.info b/doc/gawk.info index 5b063d78..c2781488 100644 --- a/doc/gawk.info +++ b/doc/gawk.info @@ -5200,6 +5200,26 @@ in mind: cause `FILENAME' to be updated if they cause `awk' to start reading a new input file. + * If the variable being assigned is an expression with side effects, + different versions of `awk' behave differently upon encountering + end-of-file. Some versions don't evaluate the expression; many + versions (including `gawk') do. Here is an example, due to Duncan + Moore: + + BEGIN { + system("echo 1 > f") + while ((getline a[++c] < "f") > 0) { } + print c + } + + Here, the side effect is the `++c'. Is `c' incremented if end of + file is encountered, before the element in `a' is assigned? + + `gawk' treats `getline' like a function call, and evaluates the + expression `a[++c]' before attempting to read from `f'. Other + versions of `awk' only evaluate the expression once they know that + there is a string value to be assigned. Caveat Emptor. +  File: gawk.info, Node: Getline Summary, Prev: Getline Notes, Up: Getline @@ -27537,321 +27557,321 @@ Node: Getline/Variable/Pipe222455 Node: Getline/Coprocess223562 Node: Getline/Variable/Coprocess224805 Node: Getline Notes225519 -Node: Getline Summary227461 -Ref: table-getline-variants227804 -Node: Command line directories228660 -Node: Printing229285 -Node: Print230916 -Node: Print Examples232253 -Node: Output Separators235037 -Node: OFMT236797 -Node: Printf238155 -Node: Basic Printf239061 -Node: Control Letters240600 -Node: Format Modifiers244412 -Node: Printf Examples250421 -Node: Redirection253136 -Node: Special Files260120 -Node: Special FD260653 -Ref: Special FD-Footnote-1264278 -Node: Special Network264352 -Node: Special Caveats265202 -Node: Close Files And Pipes265998 -Ref: Close Files And Pipes-Footnote-1273021 -Ref: Close Files And Pipes-Footnote-2273169 -Node: Expressions273319 -Node: Values274451 -Node: Constants275127 -Node: Scalar Constants275807 -Ref: Scalar Constants-Footnote-1276666 -Node: Nondecimal-numbers276848 -Node: Regexp Constants279907 -Node: Using Constant Regexps280382 -Node: Variables283437 -Node: Using Variables284092 -Node: Assignment Options285816 -Node: Conversion287688 -Ref: table-locale-affects293064 -Ref: Conversion-Footnote-1293688 -Node: All Operators293797 -Node: Arithmetic Ops294427 -Node: Concatenation296932 -Ref: Concatenation-Footnote-1299725 -Node: Assignment Ops299845 -Ref: table-assign-ops304833 -Node: Increment Ops306241 -Node: Truth Values and Conditions309711 -Node: Truth Values310794 -Node: Typing and Comparison311843 -Node: Variable Typing312632 -Ref: Variable Typing-Footnote-1316529 -Node: Comparison Operators316651 -Ref: table-relational-ops317061 -Node: POSIX String Comparison320610 -Ref: POSIX String Comparison-Footnote-1321566 -Node: Boolean Ops321704 -Ref: Boolean Ops-Footnote-1325782 -Node: Conditional Exp325873 -Node: Function Calls327605 -Node: Precedence331199 -Node: Locales334868 -Node: Patterns and Actions335957 -Node: Pattern Overview337011 -Node: Regexp Patterns338680 -Node: Expression Patterns339223 -Node: Ranges342908 -Node: BEGIN/END345874 -Node: Using BEGIN/END346636 -Ref: Using BEGIN/END-Footnote-1349367 -Node: I/O And BEGIN/END349473 -Node: BEGINFILE/ENDFILE351755 -Node: Empty354648 -Node: Using Shell Variables354964 -Node: Action Overview357249 -Node: Statements359606 -Node: If Statement361460 -Node: While Statement362959 -Node: Do Statement365003 -Node: For Statement366159 -Node: Switch Statement369311 -Node: Break Statement371408 -Node: Continue Statement373398 -Node: Next Statement375191 -Node: Nextfile Statement377581 -Node: Exit Statement380126 -Node: Built-in Variables382542 -Node: User-modified383637 -Ref: User-modified-Footnote-1391663 -Node: Auto-set391725 -Ref: Auto-set-Footnote-1401016 -Node: ARGC and ARGV401221 -Node: Arrays405072 -Node: Array Basics406577 -Node: Array Intro407403 -Node: Reference to Elements411721 -Node: Assigning Elements413991 -Node: Array Example414482 -Node: Scanning an Array416214 -Node: Controlling Scanning418528 -Ref: Controlling Scanning-Footnote-1423461 -Node: Delete423777 -Ref: Delete-Footnote-1426212 -Node: Numeric Array Subscripts426269 -Node: Uninitialized Subscripts428452 -Node: Multi-dimensional430080 -Node: Multi-scanning433174 -Node: Arrays of Arrays434765 -Node: Functions439410 -Node: Built-in440232 -Node: Calling Built-in441310 -Node: Numeric Functions443298 -Ref: Numeric Functions-Footnote-1447130 -Ref: Numeric Functions-Footnote-2447487 -Ref: Numeric Functions-Footnote-3447535 -Node: String Functions447804 -Ref: String Functions-Footnote-1471301 -Ref: String Functions-Footnote-2471430 -Ref: String Functions-Footnote-3471678 -Node: Gory Details471765 -Ref: table-sub-escapes473444 -Ref: table-sub-posix-92474798 -Ref: table-sub-proposed476141 -Ref: table-posix-sub477491 -Ref: table-gensub-escapes479037 -Ref: Gory Details-Footnote-1480244 -Ref: Gory Details-Footnote-2480295 -Node: I/O Functions480446 -Ref: I/O Functions-Footnote-1487101 -Node: Time Functions487248 -Ref: Time Functions-Footnote-1498140 -Ref: Time Functions-Footnote-2498208 -Ref: Time Functions-Footnote-3498366 -Ref: Time Functions-Footnote-4498477 -Ref: Time Functions-Footnote-5498589 -Ref: Time Functions-Footnote-6498816 -Node: Bitwise Functions499082 -Ref: table-bitwise-ops499640 -Ref: Bitwise Functions-Footnote-1503800 -Node: Type Functions503984 -Node: I18N Functions504454 -Node: User-defined506081 -Node: Definition Syntax506885 -Ref: Definition Syntax-Footnote-1511795 -Node: Function Example511864 -Node: Function Caveats514458 -Node: Calling A Function514879 -Node: Variable Scope515994 -Node: Pass By Value/Reference517969 -Node: Return Statement521409 -Node: Dynamic Typing524390 -Node: Indirect Calls525125 -Node: Internationalization534810 -Node: I18N and L10N536236 -Node: Explaining gettext536922 -Ref: Explaining gettext-Footnote-1541988 -Ref: Explaining gettext-Footnote-2542172 -Node: Programmer i18n542337 -Node: Translator i18n546537 -Node: String Extraction547330 -Ref: String Extraction-Footnote-1548291 -Node: Printf Ordering548377 -Ref: Printf Ordering-Footnote-1551161 -Node: I18N Portability551225 -Ref: I18N Portability-Footnote-1553674 -Node: I18N Example553737 -Ref: I18N Example-Footnote-1556372 -Node: Gawk I18N556444 -Node: Advanced Features557061 -Node: Nondecimal Data558574 -Node: Array Sorting560157 -Node: Controlling Array Traversal560854 -Node: Array Sorting Functions569091 -Ref: Array Sorting Functions-Footnote-1572765 -Ref: Array Sorting Functions-Footnote-2572858 -Node: Two-way I/O573052 -Ref: Two-way I/O-Footnote-1578484 -Node: TCP/IP Networking578554 -Node: Profiling581398 -Node: Library Functions588872 -Ref: Library Functions-Footnote-1591879 -Node: Library Names592050 -Ref: Library Names-Footnote-1595521 -Ref: Library Names-Footnote-2595741 -Node: General Functions595827 -Node: Strtonum Function596780 -Node: Assert Function599710 -Node: Round Function603036 -Node: Cliff Random Function604579 -Node: Ordinal Functions605595 -Ref: Ordinal Functions-Footnote-1608665 -Ref: Ordinal Functions-Footnote-2608917 -Node: Join Function609126 -Ref: Join Function-Footnote-1610897 -Node: Gettimeofday Function611097 -Node: Data File Management614812 -Node: Filetrans Function615444 -Node: Rewind Function619583 -Node: File Checking620970 -Node: Empty Files622064 -Node: Ignoring Assigns624294 -Node: Getopt Function625847 -Ref: Getopt Function-Footnote-1637151 -Node: Passwd Functions637354 -Ref: Passwd Functions-Footnote-1646329 -Node: Group Functions646417 -Node: Walking Arrays654501 -Node: Sample Programs656070 -Node: Running Examples656735 -Node: Clones657463 -Node: Cut Program658687 -Node: Egrep Program668532 -Ref: Egrep Program-Footnote-1676305 -Node: Id Program676415 -Node: Split Program680031 -Ref: Split Program-Footnote-1683550 -Node: Tee Program683678 -Node: Uniq Program686481 -Node: Wc Program693910 -Ref: Wc Program-Footnote-1698176 -Ref: Wc Program-Footnote-2698376 -Node: Miscellaneous Programs698468 -Node: Dupword Program699656 -Node: Alarm Program701687 -Node: Translate Program706436 -Ref: Translate Program-Footnote-1710823 -Ref: Translate Program-Footnote-2711051 -Node: Labels Program711185 -Ref: Labels Program-Footnote-1714556 -Node: Word Sorting714640 -Node: History Sorting718524 -Node: Extract Program720363 -Ref: Extract Program-Footnote-1727846 -Node: Simple Sed727974 -Node: Igawk Program731036 -Ref: Igawk Program-Footnote-1746193 -Ref: Igawk Program-Footnote-2746394 -Node: Anagram Program746532 -Node: Signature Program749600 -Node: Debugger750700 -Node: Debugging751611 -Node: Debugging Concepts752024 -Node: Debugging Terms753880 -Node: Awk Debugging756503 -Node: Sample dgawk session757395 -Node: dgawk invocation757887 -Node: Finding The Bug759069 -Node: List of Debugger Commands765555 -Node: Breakpoint Control766866 -Node: Dgawk Execution Control770502 -Node: Viewing And Changing Data773853 -Node: Dgawk Stack777190 -Node: Dgawk Info778650 -Node: Miscellaneous Dgawk Commands782598 -Node: Readline Support788026 -Node: Dgawk Limitations788864 -Node: Language History791053 -Node: V7/SVR3.1792565 -Node: SVR4794886 -Node: POSIX796328 -Node: BTL797336 -Node: POSIX/GNU798070 -Node: Common Extensions803221 -Node: Ranges and Locales804328 -Ref: Ranges and Locales-Footnote-1808932 -Node: Contributors809153 -Node: Installation813415 -Node: Gawk Distribution814309 -Node: Getting814793 -Node: Extracting815619 -Node: Distribution contents817311 -Node: Unix Installation822533 -Node: Quick Installation823150 -Node: Additional Configuration Options825112 -Node: Configuration Philosophy826589 -Node: Non-Unix Installation828931 -Node: PC Installation829389 -Node: PC Binary Installation830688 -Node: PC Compiling832536 -Node: PC Testing835480 -Node: PC Using836656 -Node: Cygwin840841 -Node: MSYS841841 -Node: VMS Installation842355 -Node: VMS Compilation842958 -Ref: VMS Compilation-Footnote-1843965 -Node: VMS Installation Details844023 -Node: VMS Running845658 -Node: VMS Old Gawk847265 -Node: Bugs847739 -Node: Other Versions851591 -Node: Notes856872 -Node: Compatibility Mode857564 -Node: Additions858347 -Node: Accessing The Source859159 -Node: Adding Code860584 -Node: New Ports866551 -Node: Dynamic Extensions870664 -Node: Internals872040 -Node: Plugin License881143 -Node: Sample Library881777 -Node: Internal File Description882463 -Node: Internal File Ops886178 -Ref: Internal File Ops-Footnote-1890959 -Node: Using Internal File Ops891099 -Node: Future Extensions893476 -Node: Basic Concepts895980 -Node: Basic High Level896737 -Ref: Basic High Level-Footnote-1900772 -Node: Basic Data Typing900957 -Node: Floating Point Issues905482 -Node: String Conversion Precision906565 -Ref: String Conversion Precision-Footnote-1908265 -Node: Unexpected Results908374 -Node: POSIX Floating Point Problems910200 -Ref: POSIX Floating Point Problems-Footnote-1913905 -Node: Glossary913943 -Node: Copying938919 -Node: GNU Free Documentation License976476 -Node: Index1001613 +Node: Getline Summary228306 +Ref: table-getline-variants228649 +Node: Command line directories229505 +Node: Printing230130 +Node: Print231761 +Node: Print Examples233098 +Node: Output Separators235882 +Node: OFMT237642 +Node: Printf239000 +Node: Basic Printf239906 +Node: Control Letters241445 +Node: Format Modifiers245257 +Node: Printf Examples251266 +Node: Redirection253981 +Node: Special Files260965 +Node: Special FD261498 +Ref: Special FD-Footnote-1265123 +Node: Special Network265197 +Node: Special Caveats266047 +Node: Close Files And Pipes266843 +Ref: Close Files And Pipes-Footnote-1273866 +Ref: Close Files And Pipes-Footnote-2274014 +Node: Expressions274164 +Node: Values275296 +Node: Constants275972 +Node: Scalar Constants276652 +Ref: Scalar Constants-Footnote-1277511 +Node: Nondecimal-numbers277693 +Node: Regexp Constants280752 +Node: Using Constant Regexps281227 +Node: Variables284282 +Node: Using Variables284937 +Node: Assignment Options286661 +Node: Conversion288533 +Ref: table-locale-affects293909 +Ref: Conversion-Footnote-1294533 +Node: All Operators294642 +Node: Arithmetic Ops295272 +Node: Concatenation297777 +Ref: Concatenation-Footnote-1300570 +Node: Assignment Ops300690 +Ref: table-assign-ops305678 +Node: Increment Ops307086 +Node: Truth Values and Conditions310556 +Node: Truth Values311639 +Node: Typing and Comparison312688 +Node: Variable Typing313477 +Ref: Variable Typing-Footnote-1317374 +Node: Comparison Operators317496 +Ref: table-relational-ops317906 +Node: POSIX String Comparison321455 +Ref: POSIX String Comparison-Footnote-1322411 +Node: Boolean Ops322549 +Ref: Boolean Ops-Footnote-1326627 +Node: Conditional Exp326718 +Node: Function Calls328450 +Node: Precedence332044 +Node: Locales335713 +Node: Patterns and Actions336802 +Node: Pattern Overview337856 +Node: Regexp Patterns339525 +Node: Expression Patterns340068 +Node: Ranges343753 +Node: BEGIN/END346719 +Node: Using BEGIN/END347481 +Ref: Using BEGIN/END-Footnote-1350212 +Node: I/O And BEGIN/END350318 +Node: BEGINFILE/ENDFILE352600 +Node: Empty355493 +Node: Using Shell Variables355809 +Node: Action Overview358094 +Node: Statements360451 +Node: If Statement362305 +Node: While Statement363804 +Node: Do Statement365848 +Node: For Statement367004 +Node: Switch Statement370156 +Node: Break Statement372253 +Node: Continue Statement374243 +Node: Next Statement376036 +Node: Nextfile Statement378426 +Node: Exit Statement380971 +Node: Built-in Variables383387 +Node: User-modified384482 +Ref: User-modified-Footnote-1392508 +Node: Auto-set392570 +Ref: Auto-set-Footnote-1401861 +Node: ARGC and ARGV402066 +Node: Arrays405917 +Node: Array Basics407422 +Node: Array Intro408248 +Node: Reference to Elements412566 +Node: Assigning Elements414836 +Node: Array Example415327 +Node: Scanning an Array417059 +Node: Controlling Scanning419373 +Ref: Controlling Scanning-Footnote-1424306 +Node: Delete424622 +Ref: Delete-Footnote-1427057 +Node: Numeric Array Subscripts427114 +Node: Uninitialized Subscripts429297 +Node: Multi-dimensional430925 +Node: Multi-scanning434019 +Node: Arrays of Arrays435610 +Node: Functions440255 +Node: Built-in441077 +Node: Calling Built-in442155 +Node: Numeric Functions444143 +Ref: Numeric Functions-Footnote-1447975 +Ref: Numeric Functions-Footnote-2448332 +Ref: Numeric Functions-Footnote-3448380 +Node: String Functions448649 +Ref: String Functions-Footnote-1472146 +Ref: String Functions-Footnote-2472275 +Ref: String Functions-Footnote-3472523 +Node: Gory Details472610 +Ref: table-sub-escapes474289 +Ref: table-sub-posix-92475643 +Ref: table-sub-proposed476986 +Ref: table-posix-sub478336 +Ref: table-gensub-escapes479882 +Ref: Gory Details-Footnote-1481089 +Ref: Gory Details-Footnote-2481140 +Node: I/O Functions481291 +Ref: I/O Functions-Footnote-1487946 +Node: Time Functions488093 +Ref: Time Functions-Footnote-1498985 +Ref: Time Functions-Footnote-2499053 +Ref: Time Functions-Footnote-3499211 +Ref: Time Functions-Footnote-4499322 +Ref: Time Functions-Footnote-5499434 +Ref: Time Functions-Footnote-6499661 +Node: Bitwise Functions499927 +Ref: table-bitwise-ops500485 +Ref: Bitwise Functions-Footnote-1504645 +Node: Type Functions504829 +Node: I18N Functions505299 +Node: User-defined506926 +Node: Definition Syntax507730 +Ref: Definition Syntax-Footnote-1512640 +Node: Function Example512709 +Node: Function Caveats515303 +Node: Calling A Function515724 +Node: Variable Scope516839 +Node: Pass By Value/Reference518814 +Node: Return Statement522254 +Node: Dynamic Typing525235 +Node: Indirect Calls525970 +Node: Internationalization535655 +Node: I18N and L10N537081 +Node: Explaining gettext537767 +Ref: Explaining gettext-Footnote-1542833 +Ref: Explaining gettext-Footnote-2543017 +Node: Programmer i18n543182 +Node: Translator i18n547382 +Node: String Extraction548175 +Ref: String Extraction-Footnote-1549136 +Node: Printf Ordering549222 +Ref: Printf Ordering-Footnote-1552006 +Node: I18N Portability552070 +Ref: I18N Portability-Footnote-1554519 +Node: I18N Example554582 +Ref: I18N Example-Footnote-1557217 +Node: Gawk I18N557289 +Node: Advanced Features557906 +Node: Nondecimal Data559419 +Node: Array Sorting561002 +Node: Controlling Array Traversal561699 +Node: Array Sorting Functions569936 +Ref: Array Sorting Functions-Footnote-1573610 +Ref: Array Sorting Functions-Footnote-2573703 +Node: Two-way I/O573897 +Ref: Two-way I/O-Footnote-1579329 +Node: TCP/IP Networking579399 +Node: Profiling582243 +Node: Library Functions589717 +Ref: Library Functions-Footnote-1592724 +Node: Library Names592895 +Ref: Library Names-Footnote-1596366 +Ref: Library Names-Footnote-2596586 +Node: General Functions596672 +Node: Strtonum Function597625 +Node: Assert Function600555 +Node: Round Function603881 +Node: Cliff Random Function605424 +Node: Ordinal Functions606440 +Ref: Ordinal Functions-Footnote-1609510 +Ref: Ordinal Functions-Footnote-2609762 +Node: Join Function609971 +Ref: Join Function-Footnote-1611742 +Node: Gettimeofday Function611942 +Node: Data File Management615657 +Node: Filetrans Function616289 +Node: Rewind Function620428 +Node: File Checking621815 +Node: Empty Files622909 +Node: Ignoring Assigns625139 +Node: Getopt Function626692 +Ref: Getopt Function-Footnote-1637996 +Node: Passwd Functions638199 +Ref: Passwd Functions-Footnote-1647174 +Node: Group Functions647262 +Node: Walking Arrays655346 +Node: Sample Programs656915 +Node: Running Examples657580 +Node: Clones658308 +Node: Cut Program659532 +Node: Egrep Program669377 +Ref: Egrep Program-Footnote-1677150 +Node: Id Program677260 +Node: Split Program680876 +Ref: Split Program-Footnote-1684395 +Node: Tee Program684523 +Node: Uniq Program687326 +Node: Wc Program694755 +Ref: Wc Program-Footnote-1699021 +Ref: Wc Program-Footnote-2699221 +Node: Miscellaneous Programs699313 +Node: Dupword Program700501 +Node: Alarm Program702532 +Node: Translate Program707281 +Ref: Translate Program-Footnote-1711668 +Ref: Translate Program-Footnote-2711896 +Node: Labels Program712030 +Ref: Labels Program-Footnote-1715401 +Node: Word Sorting715485 +Node: History Sorting719369 +Node: Extract Program721208 +Ref: Extract Program-Footnote-1728691 +Node: Simple Sed728819 +Node: Igawk Program731881 +Ref: Igawk Program-Footnote-1747038 +Ref: Igawk Program-Footnote-2747239 +Node: Anagram Program747377 +Node: Signature Program750445 +Node: Debugger751545 +Node: Debugging752456 +Node: Debugging Concepts752869 +Node: Debugging Terms754725 +Node: Awk Debugging757348 +Node: Sample dgawk session758240 +Node: dgawk invocation758732 +Node: Finding The Bug759914 +Node: List of Debugger Commands766400 +Node: Breakpoint Control767711 +Node: Dgawk Execution Control771347 +Node: Viewing And Changing Data774698 +Node: Dgawk Stack778035 +Node: Dgawk Info779495 +Node: Miscellaneous Dgawk Commands783443 +Node: Readline Support788871 +Node: Dgawk Limitations789709 +Node: Language History791898 +Node: V7/SVR3.1793410 +Node: SVR4795731 +Node: POSIX797173 +Node: BTL798181 +Node: POSIX/GNU798915 +Node: Common Extensions804066 +Node: Ranges and Locales805173 +Ref: Ranges and Locales-Footnote-1809777 +Node: Contributors809998 +Node: Installation814260 +Node: Gawk Distribution815154 +Node: Getting815638 +Node: Extracting816464 +Node: Distribution contents818156 +Node: Unix Installation823378 +Node: Quick Installation823995 +Node: Additional Configuration Options825957 +Node: Configuration Philosophy827434 +Node: Non-Unix Installation829776 +Node: PC Installation830234 +Node: PC Binary Installation831533 +Node: PC Compiling833381 +Node: PC Testing836325 +Node: PC Using837501 +Node: Cygwin841686 +Node: MSYS842686 +Node: VMS Installation843200 +Node: VMS Compilation843803 +Ref: VMS Compilation-Footnote-1844810 +Node: VMS Installation Details844868 +Node: VMS Running846503 +Node: VMS Old Gawk848110 +Node: Bugs848584 +Node: Other Versions852436 +Node: Notes857717 +Node: Compatibility Mode858409 +Node: Additions859192 +Node: Accessing The Source860004 +Node: Adding Code861429 +Node: New Ports867396 +Node: Dynamic Extensions871509 +Node: Internals872885 +Node: Plugin License881988 +Node: Sample Library882622 +Node: Internal File Description883308 +Node: Internal File Ops887023 +Ref: Internal File Ops-Footnote-1891804 +Node: Using Internal File Ops891944 +Node: Future Extensions894321 +Node: Basic Concepts896825 +Node: Basic High Level897582 +Ref: Basic High Level-Footnote-1901617 +Node: Basic Data Typing901802 +Node: Floating Point Issues906327 +Node: String Conversion Precision907410 +Ref: String Conversion Precision-Footnote-1909110 +Node: Unexpected Results909219 +Node: POSIX Floating Point Problems911045 +Ref: POSIX Floating Point Problems-Footnote-1914750 +Node: Glossary914788 +Node: Copying939764 +Node: GNU Free Documentation License977321 +Node: Index1002458  End Tag Table diff --git a/doc/gawk.texi b/doc/gawk.texi index ba5ffa30..fb17b716 100644 --- a/doc/gawk.texi +++ b/doc/gawk.texi @@ -7171,6 +7171,34 @@ trying to accomplish. 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. + +@item +If the variable being assigned is an expression with side effects, +different versions of @command{awk} behave differently upon encountering +end-of-file. Some versions don't evaluate the expression; many versions +(including @command{gawk}) do. Here is an example, due to Duncan Moore: + +@ignore +Date: Sun, 01 Apr 2012 11:49:33 +0100 +From: Duncan Moore +@end ignore + +@example +BEGIN @{ + system("echo 1 > f") + while ((getline a[++c] < "f") > 0) @{ @} + print c +@} +@end example + +@noindent +Here, the side effect is the @samp{++c}. Is @code{c} incremented if +end of file is encountered, before the element in @code{a} is assigned? + +@command{gawk} treats @code{getline} like a function call, and evaluates +the expression @samp{a[++c]} before attempting to read from @file{f}. +Other versions of @command{awk} only evaluate the expression once they +know that there is a string value to be assigned. Caveat Emptor. @end itemize @node Getline Summary diff --git a/test/ChangeLog b/test/ChangeLog index 272e7cf2..bb26c185 100644 --- a/test/ChangeLog +++ b/test/ChangeLog @@ -1,3 +1,8 @@ +2012-07-13 Arnold D. Robbins + + * Makefile.am (getline5): New test. + * getline5.awk, getline5.ok: New files. + 2012-06-19 Arnold D. Robbins * Makefile.am (charasbytes): New test. diff --git a/test/Makefile.am b/test/Makefile.am index 43cc8f9c..967a20c4 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -298,6 +298,8 @@ EXTRA_DIST = \ getline4.awk \ getline4.in \ getline4.ok \ + getline5.awk \ + getline5.ok \ getlnbuf.awk \ getlnbuf.in \ getlnbuf.ok \ @@ -804,7 +806,7 @@ BASIC_TESTS = \ 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 getline4 getlnbuf getnr2tb getnr2tm \ + getline getline2 getline3 getline4 getline5 getlnbuf getnr2tb getnr2tm \ gsubasgn gsubtest gsubtst2 gsubtst3 gsubtst4 gsubtst5 gsubtst6 \ gsubtst7 gsubtst8 \ hex hsprint \ diff --git a/test/Makefile.in b/test/Makefile.in index 0e4cc757..be567702 100644 --- a/test/Makefile.in +++ b/test/Makefile.in @@ -503,6 +503,8 @@ EXTRA_DIST = \ getline4.awk \ getline4.in \ getline4.ok \ + getline5.awk \ + getline5.ok \ getlnbuf.awk \ getlnbuf.in \ getlnbuf.ok \ @@ -1009,7 +1011,7 @@ BASIC_TESTS = \ 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 getline4 getlnbuf getnr2tb getnr2tm \ + getline getline2 getline3 getline4 getline5 getlnbuf getnr2tb getnr2tm \ gsubasgn gsubtest gsubtst2 gsubtst3 gsubtst4 gsubtst5 gsubtst6 \ gsubtst7 gsubtst8 \ hex hsprint \ @@ -2168,6 +2170,11 @@ getline4: @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ +getline5: + @echo getline5 + @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + getnr2tb: @echo getnr2tb @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ diff --git a/test/Maketests b/test/Maketests index 34a0aaa6..1b58d5b4 100644 --- a/test/Maketests +++ b/test/Maketests @@ -320,6 +320,11 @@ getline4: @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ +getline5: + @echo getline5 + @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + getnr2tb: @echo getnr2tb @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ diff --git a/test/getline5.awk b/test/getline5.awk new file mode 100644 index 00000000..4757bcfe --- /dev/null +++ b/test/getline5.awk @@ -0,0 +1,35 @@ +# Message-ID: <4F7832BD.9030709@gmx.com> +# Date: Sun, 01 Apr 2012 11:49:33 +0100 +# From: Duncan Moore +# To: "bug-gawk@gnu.org" +# Subject: [bug-gawk] getline difference from gawk versions >=4.0.0 +# +# Hi +# +# b.awk: +# +# BEGIN { +# system("echo 1 > f") +# while ((getline a[++c] < "f") > 0) {} +# print c +# } +# +# gawk -f b.awk +# +# Prior to gawk 4.0.0 this outputs: +# +# 1 +# +# For 4.0.0 and 4.0.1 it outputs: +# +# 2 +# +# Regards +# Duncan Moore + +BEGIN { + system("echo 1 > f") + while ((getline a[++c] < "f") > 0) {} + print c + system("rm -f f") +} diff --git a/test/getline5.ok b/test/getline5.ok new file mode 100644 index 00000000..0cfbf088 --- /dev/null +++ b/test/getline5.ok @@ -0,0 +1 @@ +2 -- cgit v1.2.3 From 7bfc288d27bacb715ff63dbf71be53304917685a Mon Sep 17 00:00:00 2001 From: "Arnold D. Robbins" Date: Fri, 20 Jul 2012 12:26:59 +0300 Subject: Fix doc on ranges and locales. --- doc/ChangeLog | 5 +++ doc/gawk.info | 136 +++++++++++++++++++++++++++++++--------------------------- doc/gawk.texi | 26 ++++++++--- 3 files changed, 98 insertions(+), 69 deletions(-) diff --git a/doc/ChangeLog b/doc/ChangeLog index e56c35a5..75b39158 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -1,3 +1,8 @@ +2012-07-20 Arnold D. Robbins + + * gawk.texi (Ranges and Locales): Clarified ranges and + locales. + 2012-07-13 Arnold D. Robbins * gawk.texi (Getline Notes): Discuss side effects in diff --git a/doc/gawk.info b/doc/gawk.info index c2781488..c485e4cb 100644 --- a/doc/gawk.info +++ b/doc/gawk.info @@ -20163,7 +20163,7 @@ additional, non-alphabetic characters as well.) as working in this fashion, and in particular, would teach that the "correct" way to match lowercase letters was with `[a-z]', and that `[A-Z]' was the "correct" way to match uppercase letters. And indeed, -this was true. +this was true.(1) The 1993 POSIX standard introduced the idea of locales (*note Locales::). Since many locales include other letters besides the plain @@ -20181,13 +20181,14 @@ outside those locales, the ordering was defined to be based on In many locales, `A' and `a' are both less than `B'. In other words, these locales sort characters in dictionary order, and `[a-dx-z]' is typically not equivalent to `[abcdxyz]'; instead it might -be equivalent to `[aBbCcdXxYyz]', for example. +be equivalent to `[aBbCcDdXxYyZz]', for example. (And to make things +worse, on other systems, it might be equivalent to `[aAbBcCdDxXyYz]'.) This point needs to be emphasized: Much literature teaches that you should use `[a-z]' to match a lowercase character. But on systems with non-ASCII locales, this also matched all of the uppercase characters -except `Z'! This was a continuous cause of confusion, even well into -the twenty-first century. +except `A' or `Z'! This was a continuous cause of confusion, even well +into the twenty-first century. To demonstrate these issues, the following example uses the `sub()' function, which does text replacement (*note String Functions::). Here, @@ -20218,12 +20219,12 @@ like "why does `[A-Z]' match lowercase letters?!?" nicely standards-compliant, and that the issue was in the user's locale. During the development of version 4.0, he modified `gawk' to always treat ranges in the original, pre-POSIX fashion, unless -`--posix' was used (*note Options::). +`--posix' was used (*note Options::).(2) Fortunately, shortly before the final release of `gawk' 4.0, the maintainer learned that the 2008 standard had changed the definition of ranges, such that outside the `"C"' and `"POSIX"' locales, the meaning -of range expressions was _undefined_.(1) +of range expressions was _undefined_.(3) By using this lovely technical term, the standard gives license to implementors to implement ranges in whatever way they choose. The @@ -20233,7 +20234,14 @@ in all cases, `gawk' remains POSIX compliant. ---------- Footnotes ---------- - (1) See the standard + (1) And Life was good. + + (2) And thus was born the Campain for Rational Range Interpretation +(or RRI). A number of GNU tools, such as `grep' and `sed', have either +implemented this change, or will soon. Thanks to Karl Berry for +coining the phrase "Rational Range Interpretation." + + (3) See the standard (http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap09.html#tag_09_03_05) and its rationale (http://pubs.opengroup.org/onlinepubs/9699919799/xrat/V4_xbd_chap09.html#tag_21_09_03_05). @@ -27817,61 +27825,63 @@ Node: BTL798181 Node: POSIX/GNU798915 Node: Common Extensions804066 Node: Ranges and Locales805173 -Ref: Ranges and Locales-Footnote-1809777 -Node: Contributors809998 -Node: Installation814260 -Node: Gawk Distribution815154 -Node: Getting815638 -Node: Extracting816464 -Node: Distribution contents818156 -Node: Unix Installation823378 -Node: Quick Installation823995 -Node: Additional Configuration Options825957 -Node: Configuration Philosophy827434 -Node: Non-Unix Installation829776 -Node: PC Installation830234 -Node: PC Binary Installation831533 -Node: PC Compiling833381 -Node: PC Testing836325 -Node: PC Using837501 -Node: Cygwin841686 -Node: MSYS842686 -Node: VMS Installation843200 -Node: VMS Compilation843803 -Ref: VMS Compilation-Footnote-1844810 -Node: VMS Installation Details844868 -Node: VMS Running846503 -Node: VMS Old Gawk848110 -Node: Bugs848584 -Node: Other Versions852436 -Node: Notes857717 -Node: Compatibility Mode858409 -Node: Additions859192 -Node: Accessing The Source860004 -Node: Adding Code861429 -Node: New Ports867396 -Node: Dynamic Extensions871509 -Node: Internals872885 -Node: Plugin License881988 -Node: Sample Library882622 -Node: Internal File Description883308 -Node: Internal File Ops887023 -Ref: Internal File Ops-Footnote-1891804 -Node: Using Internal File Ops891944 -Node: Future Extensions894321 -Node: Basic Concepts896825 -Node: Basic High Level897582 -Ref: Basic High Level-Footnote-1901617 -Node: Basic Data Typing901802 -Node: Floating Point Issues906327 -Node: String Conversion Precision907410 -Ref: String Conversion Precision-Footnote-1909110 -Node: Unexpected Results909219 -Node: POSIX Floating Point Problems911045 -Ref: POSIX Floating Point Problems-Footnote-1914750 -Node: Glossary914788 -Node: Copying939764 -Node: GNU Free Documentation License977321 -Node: Index1002458 +Ref: Ranges and Locales-Footnote-1809884 +Ref: Ranges and Locales-Footnote-2809911 +Ref: Ranges and Locales-Footnote-3810171 +Node: Contributors810392 +Node: Installation814654 +Node: Gawk Distribution815548 +Node: Getting816032 +Node: Extracting816858 +Node: Distribution contents818550 +Node: Unix Installation823772 +Node: Quick Installation824389 +Node: Additional Configuration Options826351 +Node: Configuration Philosophy827828 +Node: Non-Unix Installation830170 +Node: PC Installation830628 +Node: PC Binary Installation831927 +Node: PC Compiling833775 +Node: PC Testing836719 +Node: PC Using837895 +Node: Cygwin842080 +Node: MSYS843080 +Node: VMS Installation843594 +Node: VMS Compilation844197 +Ref: VMS Compilation-Footnote-1845204 +Node: VMS Installation Details845262 +Node: VMS Running846897 +Node: VMS Old Gawk848504 +Node: Bugs848978 +Node: Other Versions852830 +Node: Notes858111 +Node: Compatibility Mode858803 +Node: Additions859586 +Node: Accessing The Source860398 +Node: Adding Code861823 +Node: New Ports867790 +Node: Dynamic Extensions871903 +Node: Internals873279 +Node: Plugin License882382 +Node: Sample Library883016 +Node: Internal File Description883702 +Node: Internal File Ops887417 +Ref: Internal File Ops-Footnote-1892198 +Node: Using Internal File Ops892338 +Node: Future Extensions894715 +Node: Basic Concepts897219 +Node: Basic High Level897976 +Ref: Basic High Level-Footnote-1902011 +Node: Basic Data Typing902196 +Node: Floating Point Issues906721 +Node: String Conversion Precision907804 +Ref: String Conversion Precision-Footnote-1909504 +Node: Unexpected Results909613 +Node: POSIX Floating Point Problems911439 +Ref: POSIX Floating Point Problems-Footnote-1915144 +Node: Glossary915182 +Node: Copying940158 +Node: GNU Free Documentation License977715 +Node: Index1002852  End Tag Table diff --git a/doc/gawk.texi b/doc/gawk.texi index fb17b716..bf30d012 100644 --- a/doc/gawk.texi +++ b/doc/gawk.texi @@ -66,6 +66,15 @@ @set DARKCORNER (d.c.) @set COMMONEXT (c.e.) @end ifdocbook +@ifxml +@set DOCUMENT book +@set CHAPTER chapter +@set APPENDIX appendix +@set SECTION section +@set SUBSECTION subsection +@set DARKCORNER (d.c.) +@set COMMONEXT (c.e.) +@end ifxml @ifplaintext @set DOCUMENT book @set CHAPTER chapter @@ -27062,7 +27071,7 @@ Almost all introductory Unix literature explained range expressions as working in this fashion, and in particular, would teach that the ``correct'' way to match lowercase letters was with @samp{[a-z]}, and that @samp{[A-Z]} was the ``correct'' way to match uppercase letters. -And indeed, this was true. +And indeed, this was true.@footnote{And Life was good.} The 1993 POSIX standard introduced the idea of locales (@pxref{Locales}). Since many locales include other letters besides the plain twenty-six @@ -27080,12 +27089,14 @@ But outside those locales, the ordering was defined to be based on In many locales, @samp{A} and @samp{a} are both less than @samp{B}. In other words, these locales sort characters in dictionary order, and @samp{[a-dx-z]} is typically not equivalent to @samp{[abcdxyz]}; -instead it might be equivalent to @samp{[aBbCcdXxYyz]}, for example. +instead it might be equivalent to @samp{[aBbCcDdXxYyZz]}, for example. +(And to make things worse, on other systems, it might be equivalent to +@samp{[aAbBcCdDxXyYz]}.) This point needs to be emphasized: Much literature teaches that you should use @samp{[a-z]} to match a lowercase character. But on systems with non-ASCII locales, this also matched all of the uppercase characters -except @samp{Z}! This was a continuous cause of confusion, even well +except @samp{A} or @samp{Z}! This was a continuous cause of confusion, even well into the twenty-first century. To demonstrate these issues, the following example uses the @code{sub()} @@ -27121,13 +27132,16 @@ the @command{gawk} maintainer grew weary of trying to explain that @command{gawk} was being nicely standards-compliant, and that the issue was in the user's locale. During the development of version 4.0, he modified @command{gawk} to always treat ranges in the original, -pre-POSIX fashion, unless @option{--posix} was used (@pxref{Options}). +pre-POSIX fashion, unless @option{--posix} was used (@pxref{Options}).@footnote{And +thus was born the Campain for Rational Range Interpretation (or RRI). A number +of GNU tools, such as @command{grep} and @command{sed}, have either +implemented this change, or will soon. Thanks to Karl Berry for coining the phrase +``Rational Range Interpretation.''} Fortunately, shortly before the final release of @command{gawk} 4.0, the maintainer learned that the 2008 standard had changed the definition of ranges, such that outside the @code{"C"} and @code{"POSIX"} -locales, the meaning of range expressions was -@emph{undefined}.@footnote{See +locales, the meaning of range expressions was @emph{undefined}.@footnote{See @uref{http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap09.html#tag_09_03_05, the standard} and @uref{http://pubs.opengroup.org/onlinepubs/9699919799/xrat/V4_xbd_chap09.html#tag_21_09_03_05, its rationale}.} -- cgit v1.2.3 From 9bf467bbe0bf6868919b2a672f70b945f320c7a8 Mon Sep 17 00:00:00 2001 From: "Arnold D. Robbins" Date: Sun, 5 Aug 2012 12:58:33 +0300 Subject: New test for OFS from Nelson Beebe. --- test/ChangeLog | 7 +++++++ test/Makefile.am | 5 ++++- test/Makefile.in | 10 +++++++++- test/Maketests | 5 +++++ test/ofs1.awk | 23 +++++++++++++++++++++++ test/ofs1.in | 4 ++++ test/ofs1.ok | 7 +++++++ 7 files changed, 59 insertions(+), 2 deletions(-) create mode 100755 test/ofs1.awk create mode 100644 test/ofs1.in create mode 100644 test/ofs1.ok diff --git a/test/ChangeLog b/test/ChangeLog index bb26c185..219396cf 100644 --- a/test/ChangeLog +++ b/test/ChangeLog @@ -1,3 +1,10 @@ +2012-08-05 Arnold D. Robbins + + New test from Nelson Beebe. + + * Makefile.am (ofs1): New test. + * ofs1.awk, ofs1.in, ofs1.ok: New files. + 2012-07-13 Arnold D. Robbins * Makefile.am (getline5): New test. diff --git a/test/Makefile.am b/test/Makefile.am index 967a20c4..9c96c386 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -522,6 +522,9 @@ EXTRA_DIST = \ ofmts.awk \ ofmts.in \ ofmts.ok \ + ofs1.awk \ + ofs1.in \ + ofs1.ok \ onlynl.awk \ onlynl.in \ onlynl.ok \ @@ -816,7 +819,7 @@ BASIC_TESTS = \ nasty nasty2 negexp negrange nested nfldstr nfneg nfset nlfldsep \ nlinstr nlstrina noeffect nofile nofmtch noloop1 noloop2 nonl \ noparms nors nulrsend numindex numsubstr \ - octsub ofmt ofmta ofmtbig ofmtfidl ofmts onlynl opasnidx opasnslf \ + octsub ofmt ofmta ofmtbig ofmtfidl ofmts ofs1 onlynl opasnidx opasnslf \ paramdup paramres paramtyp parse1 parsefld parseme pcntplus \ posix2008sub prdupval prec printf0 printf1 prmarscl prmreuse \ prt1eval prtoeval \ diff --git a/test/Makefile.in b/test/Makefile.in index be567702..56c07305 100644 --- a/test/Makefile.in +++ b/test/Makefile.in @@ -727,6 +727,9 @@ EXTRA_DIST = \ ofmts.awk \ ofmts.in \ ofmts.ok \ + ofs1.awk \ + ofs1.in \ + ofs1.ok \ onlynl.awk \ onlynl.in \ onlynl.ok \ @@ -1021,7 +1024,7 @@ BASIC_TESTS = \ nasty nasty2 negexp negrange nested nfldstr nfneg nfset nlfldsep \ nlinstr nlstrina noeffect nofile nofmtch noloop1 noloop2 nonl \ noparms nors nulrsend numindex numsubstr \ - octsub ofmt ofmta ofmtbig ofmtfidl ofmts onlynl opasnidx opasnslf \ + octsub ofmt ofmta ofmtbig ofmtfidl ofmts ofs1 onlynl opasnidx opasnslf \ paramdup paramres paramtyp parse1 parsefld parseme pcntplus \ posix2008sub prdupval prec printf0 printf1 prmarscl prmreuse \ prt1eval prtoeval \ @@ -2410,6 +2413,11 @@ ofmts: @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ +ofs1: + @echo ofs1 + @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + onlynl: @echo onlynl @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ diff --git a/test/Maketests b/test/Maketests index 1b58d5b4..12d7e35c 100644 --- a/test/Maketests +++ b/test/Maketests @@ -560,6 +560,11 @@ ofmts: @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ +ofs1: + @echo ofs1 + @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + onlynl: @echo onlynl @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ diff --git a/test/ofs1.awk b/test/ofs1.awk new file mode 100755 index 00000000..83b3c2a5 --- /dev/null +++ b/test/ofs1.awk @@ -0,0 +1,23 @@ +# Translate this shell script into gawk: +# +#! /bin/sh - +# +# awktest() +# { +# echo a:b:c | $AWK -F":" '{$2="x"; OFS=FS; print}' +# echo a:b:c | $AWK -F":" '{$2="x"; print; OFS=FS; print}' +# echo a:b:c | $AWK -F":" '{$2="x"; print $1; OFS=FS; print}' +# echo a:b:c | $AWK -F":" '{$2="x"; print; $2=$2; OFS=FS; print}' +# } +# +# AWK=./gawk +# awktest > foo.gawk + +BEGIN { FS = ":" } + +# Have to reset OFS at end since not running separate invocations + +FNR == 1 { $2 = "x"; OFS = FS; print ; OFS = " "} +FNR == 2 { $2 = "x"; print; OFS = FS; print ; OFS = " "} +FNR == 3 { $2 = "x"; print $1; OFS = FS; print ; OFS = " "} +FNR == 4 { $2 = "x"; print; $2 = $2; OFS = FS; print } diff --git a/test/ofs1.in b/test/ofs1.in new file mode 100644 index 00000000..0582b9b1 --- /dev/null +++ b/test/ofs1.in @@ -0,0 +1,4 @@ +a:b:c +a:b:c +a:b:c +a:b:c diff --git a/test/ofs1.ok b/test/ofs1.ok new file mode 100644 index 00000000..a3a8ca7b --- /dev/null +++ b/test/ofs1.ok @@ -0,0 +1,7 @@ +a:x:c +a x c +a x c +a +a:x:c +a x c +a:x:c -- cgit v1.2.3 From c6454cc02a0c79c3da5316aa580e545c8e7085f0 Mon Sep 17 00:00:00 2001 From: "Arnold D. Robbins" Date: Sun, 5 Aug 2012 16:19:34 +0300 Subject: Document Eli Zaretskii's site. --- doc/ChangeLog | 5 ++++ doc/gawk.info | 88 +++++++++++++++++++++++++++++++---------------------------- doc/gawk.texi | 4 +++ 3 files changed, 55 insertions(+), 42 deletions(-) diff --git a/doc/ChangeLog b/doc/ChangeLog index 75b39158..5d28ede1 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -1,3 +1,8 @@ +2012-08-05 Arnold D. Robbins + + * gawk.texi (PC Binary Installation): Document Eli Zaretskii's + site. + 2012-07-20 Arnold D. Robbins * gawk.texi (Ranges and Locales): Clarified ranges and diff --git a/doc/gawk.info b/doc/gawk.info index c485e4cb..d8e27f4a 100644 --- a/doc/gawk.info +++ b/doc/gawk.info @@ -20845,6 +20845,10 @@ not overwrite it!_ Instead enter the following commands at your prompt The binary distribution may contain a separate file containing additional or more detailed installation instructions. + As of April, 2012, up to date `gawk' binaries for MS Windows are +available from Eli Zaretskii's ports project +(http://sourceforge.net/projects/ezwinports/files/). +  File: gawk.info, Node: PC Compiling, Next: PC Testing, Prev: PC Binary Installation, Up: PC Installation @@ -27841,47 +27845,47 @@ Node: Configuration Philosophy827828 Node: Non-Unix Installation830170 Node: PC Installation830628 Node: PC Binary Installation831927 -Node: PC Compiling833775 -Node: PC Testing836719 -Node: PC Using837895 -Node: Cygwin842080 -Node: MSYS843080 -Node: VMS Installation843594 -Node: VMS Compilation844197 -Ref: VMS Compilation-Footnote-1845204 -Node: VMS Installation Details845262 -Node: VMS Running846897 -Node: VMS Old Gawk848504 -Node: Bugs848978 -Node: Other Versions852830 -Node: Notes858111 -Node: Compatibility Mode858803 -Node: Additions859586 -Node: Accessing The Source860398 -Node: Adding Code861823 -Node: New Ports867790 -Node: Dynamic Extensions871903 -Node: Internals873279 -Node: Plugin License882382 -Node: Sample Library883016 -Node: Internal File Description883702 -Node: Internal File Ops887417 -Ref: Internal File Ops-Footnote-1892198 -Node: Using Internal File Ops892338 -Node: Future Extensions894715 -Node: Basic Concepts897219 -Node: Basic High Level897976 -Ref: Basic High Level-Footnote-1902011 -Node: Basic Data Typing902196 -Node: Floating Point Issues906721 -Node: String Conversion Precision907804 -Ref: String Conversion Precision-Footnote-1909504 -Node: Unexpected Results909613 -Node: POSIX Floating Point Problems911439 -Ref: POSIX Floating Point Problems-Footnote-1915144 -Node: Glossary915182 -Node: Copying940158 -Node: GNU Free Documentation License977715 -Node: Index1002852 +Node: PC Compiling833942 +Node: PC Testing836886 +Node: PC Using838062 +Node: Cygwin842247 +Node: MSYS843247 +Node: VMS Installation843761 +Node: VMS Compilation844364 +Ref: VMS Compilation-Footnote-1845371 +Node: VMS Installation Details845429 +Node: VMS Running847064 +Node: VMS Old Gawk848671 +Node: Bugs849145 +Node: Other Versions852997 +Node: Notes858278 +Node: Compatibility Mode858970 +Node: Additions859753 +Node: Accessing The Source860565 +Node: Adding Code861990 +Node: New Ports867957 +Node: Dynamic Extensions872070 +Node: Internals873446 +Node: Plugin License882549 +Node: Sample Library883183 +Node: Internal File Description883869 +Node: Internal File Ops887584 +Ref: Internal File Ops-Footnote-1892365 +Node: Using Internal File Ops892505 +Node: Future Extensions894882 +Node: Basic Concepts897386 +Node: Basic High Level898143 +Ref: Basic High Level-Footnote-1902178 +Node: Basic Data Typing902363 +Node: Floating Point Issues906888 +Node: String Conversion Precision907971 +Ref: String Conversion Precision-Footnote-1909671 +Node: Unexpected Results909780 +Node: POSIX Floating Point Problems911606 +Ref: POSIX Floating Point Problems-Footnote-1915311 +Node: Glossary915349 +Node: Copying940325 +Node: GNU Free Documentation License977882 +Node: Index1003019  End Tag Table diff --git a/doc/gawk.texi b/doc/gawk.texi index bf30d012..91ef044c 100644 --- a/doc/gawk.texi +++ b/doc/gawk.texi @@ -27913,6 +27913,10 @@ install-info --info-dir=x:/usr/info x:/usr/info/gawkinet.info The binary distribution may contain a separate file containing additional or more detailed installation instructions. +As of April, 2012, up to date @command{gawk} binaries for MS Windows +are available from @uref{http://sourceforge.net/projects/ezwinports/files/, +Eli Zaretskii's ports project}. + @node PC Compiling @appendixsubsubsec Compiling @command{gawk} for PC Operating Systems -- cgit v1.2.3 From f60abc38c224e5a56aef64564d37f5f6ef7e87a9 Mon Sep 17 00:00:00 2001 From: "Arnold D. Robbins" Date: Sun, 5 Aug 2012 17:33:52 +0300 Subject: Fix doc on RS = "a" case. --- doc/ChangeLog | 2 + doc/gawk.info | 743 +++++++++++++++++++++++++++++----------------------------- doc/gawk.texi | 12 +- 3 files changed, 385 insertions(+), 372 deletions(-) diff --git a/doc/ChangeLog b/doc/ChangeLog index 5d28ede1..88743adc 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -2,6 +2,8 @@ * gawk.texi (PC Binary Installation): Document Eli Zaretskii's site. + (Records): Update case of RS = "a". It only prints 1 if in + POSIX mode. Thanks to Jeroen Schot who first reported it. 2012-07-20 Arnold D. Robbins diff --git a/doc/gawk.info b/doc/gawk.info index d8e27f4a..91c9d516 100644 --- a/doc/gawk.info +++ b/doc/gawk.info @@ -3707,14 +3707,19 @@ using the variable-assignment feature (*note Other Arguments::): This sets `RS' to `/' before processing `BBS-list'. Using an unusual character such as `/' for the record separator -produces correct behavior in the vast majority of cases. However, the -following (extreme) pipeline prints a surprising `1': +produces correct behavior in the vast majority of cases. - $ echo | awk 'BEGIN { RS = "a" } ; { print NF }' + There is one unusual case, that occurs when `gawk' is being fully +POSIX-compliant (*note Options::). Then, the following (extreme) +pipeline prints a surprising `1': + + $ echo | gawk --posix 'BEGIN { RS = "a" } ; { print NF }' -| 1 There is one field, consisting of a newline. The value of the built-in variable `NF' is the number of fields in the current record. +(In the normal case, `gawk' treats the newline as whitespace, printing +`0' as the result. Most other versions of `awk' also act this way.) Reaching the end of an input file terminates the current input record, even if the last character in the file is not the character in @@ -24960,7 +24965,7 @@ Index (line 131) * advanced features, constants, values of: Nondecimal-numbers. (line 67) -* advanced features, data files as single record: Records. (line 175) +* advanced features, data files as single record: Records. (line 180) * advanced features, fixed-width data: Constant Size. (line 9) * advanced features, FNR/NR variables: Auto-set. (line 207) * advanced features, gawk: Advanced Features. (line 6) @@ -25374,7 +25379,7 @@ Index * common extensions, length() applied to an array: String Functions. (line 196) * common extensions, nextfile statement: Nextfile Statement. (line 6) -* common extensions, RS as a regexp: Records. (line 115) +* common extensions, RS as a regexp: Records. (line 120) * common extensions, single character fields: Single Character Fields. (line 6) * comp.lang.awk newsgroup: Bugs. (line 38) @@ -25470,7 +25475,7 @@ Index * 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, input files: Records. (line 103) * dark corner, invoking awk: Command Line. (line 16) * dark corner, length() function: String Functions. (line 182) * dark corner, multiline records: Multiple Line. (line 35) @@ -25483,7 +25488,7 @@ Index * dark corner, regexp constants, as arguments to user-defined functions: Using Constant Regexps. (line 43) * dark corner, split() function: String Functions. (line 361) -* dark corner, strings, storing: Records. (line 191) +* dark corner, strings, storing: Records. (line 196) * dark corner, value of ARGV[0]: Auto-set. (line 35) * data, fixed-width: Constant Size. (line 9) * data-driven languages: Basic High Level. (line 83) @@ -25659,19 +25664,19 @@ Index * differences in awk and gawk, print/printf statements: Format Modifiers. (line 13) * 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, record separators: Records. (line 117) * differences in awk and gawk, regexp constants: Using Constant Regexps. (line 43) * differences in awk and gawk, regular expressions: Case-sensitivity. (line 26) -* differences in awk and gawk, RS/RT variables: Records. (line 167) +* differences in awk and gawk, RS/RT variables: Records. (line 172) * differences in awk and gawk, RT variable: Auto-set. (line 196) * differences in awk and gawk, single-character fields: Single Character Fields. (line 6) * differences in awk and gawk, split() function: String Functions. (line 349) * differences in awk and gawk, strings: Scalar Constants. (line 20) -* differences in awk and gawk, strings, storing: Records. (line 187) +* differences in awk and gawk, strings, storing: Records. (line 192) * differences in awk and gawk, strtonum() function (gawk): String Functions. (line 404) * differences in awk and gawk, TEXTDOMAIN variable: User-modified. @@ -25823,7 +25828,7 @@ Index * extensions, common, length() applied to an array: String Functions. (line 196) * extensions, common, nextfile statement: Nextfile Statement. (line 6) -* extensions, common, RS as a regexp: Records. (line 115) +* extensions, common, RS as a regexp: Records. (line 120) * extensions, common, single character fields: Single Character Fields. (line 6) * extensions, in gawk, not in POSIX awk: POSIX/GNU. (line 6) @@ -25895,7 +25900,7 @@ Index * 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, as single records: Records. (line 196) +* files, as single records: Records. (line 201) * files, awk programs in: Long. (line 6) * files, awkprof.out: Profiling. (line 10) * files, awkvars.out: Options. (line 93) @@ -26123,7 +26128,7 @@ Index * gawk, RT variable in <2>: Getline/Variable/File. (line 10) * gawk, RT variable in <3>: Multiple Line. (line 129) -* gawk, RT variable in: Records. (line 112) +* gawk, RT variable in: Records. (line 117) * gawk, See Also awk: Preface. (line 36) * gawk, source code, obtaining: Getting. (line 6) * gawk, splitting fields and: Constant Size. (line 87) @@ -26569,7 +26574,7 @@ Index * null strings <2>: Truth Values. (line 6) * null strings <3>: Regexp Field Splitting. (line 43) -* null strings: Records. (line 102) +* null strings: Records. (line 107) * null strings, array elements and: Delete. (line 27) * null strings, as array subscripts: Uninitialized Subscripts. (line 43) @@ -26738,7 +26743,7 @@ Index (line 113) * portability, close() function and: Close Files And Pipes. (line 81) -* portability, data files as single record: Records. (line 175) +* portability, data files as single record: Records. (line 180) * portability, deleting array elements: Delete. (line 52) * portability, example programs: Library Functions. (line 31) * portability, fflush() function and: I/O Functions. (line 29) @@ -26919,15 +26924,15 @@ Index * record separators <1>: User-modified. (line 134) * record separators: Records. (line 14) * record separators, changing: Records. (line 81) -* record separators, regular expressions as: Records. (line 112) +* record separators, regular expressions as: Records. (line 117) * record separators, with multiline records: Multiple Line. (line 10) * records <1>: Basic High Level. (line 71) * records: Reading Files. (line 14) * records, multiline: Multiple Line. (line 6) * records, printing: Print. (line 22) * records, splitting input into: Records. (line 6) -* records, terminating: Records. (line 112) -* records, treating files as: Records. (line 196) +* records, terminating: Records. (line 117) +* records, treating files as: Records. (line 201) * recursive functions: Definition Syntax. (line 73) * redirection of input: Getline/File. (line 6) * redirection of output: Redirection. (line 6) @@ -26953,7 +26958,7 @@ Index (line 6) * regular expressions, as patterns <1>: Regexp Patterns. (line 6) * regular expressions, as patterns: Regexp Usage. (line 6) -* regular expressions, as record separators: Records. (line 112) +* regular expressions, as record separators: Records. (line 117) * regular expressions, case sensitivity <1>: User-modified. (line 82) * regular expressions, case sensitivity: Case-sensitivity. (line 6) * regular expressions, computed: Computed Regexps. (line 6) @@ -27029,7 +27034,7 @@ Index * RT variable <2>: Getline/Variable/File. (line 10) * RT variable <3>: Multiple Line. (line 129) -* RT variable: Records. (line 112) +* RT variable: Records. (line 117) * Rubin, Paul <1>: Contributors. (line 16) * Rubin, Paul: History. (line 30) * rule, definition of: Getting Started. (line 21) @@ -27070,7 +27075,7 @@ Index * separators, field, POSIX and: Fields. (line 6) * separators, for records <1>: User-modified. (line 134) * separators, for records: Records. (line 14) -* separators, for records, regular expressions as: Records. (line 112) +* separators, for records, regular expressions as: Records. (line 117) * separators, for statements in actions: Action Overview. (line 19) * separators, subscript: User-modified. (line 147) * set debugger command: Viewing And Changing Data. @@ -27187,7 +27192,7 @@ Index * strings, converting <1>: Bitwise Functions. (line 107) * strings, converting: Conversion. (line 6) * strings, converting, numbers to: User-modified. (line 28) -* strings, empty, See null strings: Records. (line 102) +* strings, empty, See null strings: Records. (line 107) * strings, extracting: String Extraction. (line 6) * strings, for localization: Programmer i18n. (line 14) * strings, length of: Scalar Constants. (line 20) @@ -27230,7 +27235,7 @@ Index * TCP/IP, support for: Special Network. (line 6) * tee utility: Tee Program. (line 6) * tee.awk program: Tee Program. (line 26) -* terminating records: Records. (line 112) +* terminating records: Records. (line 117) * testbits.awk program: Bitwise Functions. (line 68) * Texinfo <1>: Adding Code. (line 99) * Texinfo <2>: Distribution contents. @@ -27541,351 +27546,351 @@ Node: Leftmost Longest155607 Node: Computed Regexps156808 Node: Reading Files160218 Node: Records162159 -Ref: Records-Footnote-1170833 -Node: Fields170870 -Ref: Fields-Footnote-1173903 -Node: Nonconstant Fields173989 -Node: Changing Fields176191 -Node: Field Separators182172 -Node: Default Field Splitting184801 -Node: Regexp Field Splitting185918 -Node: Single Character Fields189260 -Node: Command Line Field Separator190319 -Node: Field Splitting Summary193760 -Ref: Field Splitting Summary-Footnote-1196952 -Node: Constant Size197053 -Node: Splitting By Content201637 -Ref: Splitting By Content-Footnote-1205363 -Node: Multiple Line205403 -Ref: Multiple Line-Footnote-1211250 -Node: Getline211429 -Node: Plain Getline213657 -Node: Getline/Variable215746 -Node: Getline/File216887 -Node: Getline/Variable/File218209 -Ref: Getline/Variable/File-Footnote-1219808 -Node: Getline/Pipe219895 -Node: Getline/Variable/Pipe222455 -Node: Getline/Coprocess223562 -Node: Getline/Variable/Coprocess224805 -Node: Getline Notes225519 -Node: Getline Summary228306 -Ref: table-getline-variants228649 -Node: Command line directories229505 -Node: Printing230130 -Node: Print231761 -Node: Print Examples233098 -Node: Output Separators235882 -Node: OFMT237642 -Node: Printf239000 -Node: Basic Printf239906 -Node: Control Letters241445 -Node: Format Modifiers245257 -Node: Printf Examples251266 -Node: Redirection253981 -Node: Special Files260965 -Node: Special FD261498 -Ref: Special FD-Footnote-1265123 -Node: Special Network265197 -Node: Special Caveats266047 -Node: Close Files And Pipes266843 -Ref: Close Files And Pipes-Footnote-1273866 -Ref: Close Files And Pipes-Footnote-2274014 -Node: Expressions274164 -Node: Values275296 -Node: Constants275972 -Node: Scalar Constants276652 -Ref: Scalar Constants-Footnote-1277511 -Node: Nondecimal-numbers277693 -Node: Regexp Constants280752 -Node: Using Constant Regexps281227 -Node: Variables284282 -Node: Using Variables284937 -Node: Assignment Options286661 -Node: Conversion288533 -Ref: table-locale-affects293909 -Ref: Conversion-Footnote-1294533 -Node: All Operators294642 -Node: Arithmetic Ops295272 -Node: Concatenation297777 -Ref: Concatenation-Footnote-1300570 -Node: Assignment Ops300690 -Ref: table-assign-ops305678 -Node: Increment Ops307086 -Node: Truth Values and Conditions310556 -Node: Truth Values311639 -Node: Typing and Comparison312688 -Node: Variable Typing313477 -Ref: Variable Typing-Footnote-1317374 -Node: Comparison Operators317496 -Ref: table-relational-ops317906 -Node: POSIX String Comparison321455 -Ref: POSIX String Comparison-Footnote-1322411 -Node: Boolean Ops322549 -Ref: Boolean Ops-Footnote-1326627 -Node: Conditional Exp326718 -Node: Function Calls328450 -Node: Precedence332044 -Node: Locales335713 -Node: Patterns and Actions336802 -Node: Pattern Overview337856 -Node: Regexp Patterns339525 -Node: Expression Patterns340068 -Node: Ranges343753 -Node: BEGIN/END346719 -Node: Using BEGIN/END347481 -Ref: Using BEGIN/END-Footnote-1350212 -Node: I/O And BEGIN/END350318 -Node: BEGINFILE/ENDFILE352600 -Node: Empty355493 -Node: Using Shell Variables355809 -Node: Action Overview358094 -Node: Statements360451 -Node: If Statement362305 -Node: While Statement363804 -Node: Do Statement365848 -Node: For Statement367004 -Node: Switch Statement370156 -Node: Break Statement372253 -Node: Continue Statement374243 -Node: Next Statement376036 -Node: Nextfile Statement378426 -Node: Exit Statement380971 -Node: Built-in Variables383387 -Node: User-modified384482 -Ref: User-modified-Footnote-1392508 -Node: Auto-set392570 -Ref: Auto-set-Footnote-1401861 -Node: ARGC and ARGV402066 -Node: Arrays405917 -Node: Array Basics407422 -Node: Array Intro408248 -Node: Reference to Elements412566 -Node: Assigning Elements414836 -Node: Array Example415327 -Node: Scanning an Array417059 -Node: Controlling Scanning419373 -Ref: Controlling Scanning-Footnote-1424306 -Node: Delete424622 -Ref: Delete-Footnote-1427057 -Node: Numeric Array Subscripts427114 -Node: Uninitialized Subscripts429297 -Node: Multi-dimensional430925 -Node: Multi-scanning434019 -Node: Arrays of Arrays435610 -Node: Functions440255 -Node: Built-in441077 -Node: Calling Built-in442155 -Node: Numeric Functions444143 -Ref: Numeric Functions-Footnote-1447975 -Ref: Numeric Functions-Footnote-2448332 -Ref: Numeric Functions-Footnote-3448380 -Node: String Functions448649 -Ref: String Functions-Footnote-1472146 -Ref: String Functions-Footnote-2472275 -Ref: String Functions-Footnote-3472523 -Node: Gory Details472610 -Ref: table-sub-escapes474289 -Ref: table-sub-posix-92475643 -Ref: table-sub-proposed476986 -Ref: table-posix-sub478336 -Ref: table-gensub-escapes479882 -Ref: Gory Details-Footnote-1481089 -Ref: Gory Details-Footnote-2481140 -Node: I/O Functions481291 -Ref: I/O Functions-Footnote-1487946 -Node: Time Functions488093 -Ref: Time Functions-Footnote-1498985 -Ref: Time Functions-Footnote-2499053 -Ref: Time Functions-Footnote-3499211 -Ref: Time Functions-Footnote-4499322 -Ref: Time Functions-Footnote-5499434 -Ref: Time Functions-Footnote-6499661 -Node: Bitwise Functions499927 -Ref: table-bitwise-ops500485 -Ref: Bitwise Functions-Footnote-1504645 -Node: Type Functions504829 -Node: I18N Functions505299 -Node: User-defined506926 -Node: Definition Syntax507730 -Ref: Definition Syntax-Footnote-1512640 -Node: Function Example512709 -Node: Function Caveats515303 -Node: Calling A Function515724 -Node: Variable Scope516839 -Node: Pass By Value/Reference518814 -Node: Return Statement522254 -Node: Dynamic Typing525235 -Node: Indirect Calls525970 -Node: Internationalization535655 -Node: I18N and L10N537081 -Node: Explaining gettext537767 -Ref: Explaining gettext-Footnote-1542833 -Ref: Explaining gettext-Footnote-2543017 -Node: Programmer i18n543182 -Node: Translator i18n547382 -Node: String Extraction548175 -Ref: String Extraction-Footnote-1549136 -Node: Printf Ordering549222 -Ref: Printf Ordering-Footnote-1552006 -Node: I18N Portability552070 -Ref: I18N Portability-Footnote-1554519 -Node: I18N Example554582 -Ref: I18N Example-Footnote-1557217 -Node: Gawk I18N557289 -Node: Advanced Features557906 -Node: Nondecimal Data559419 -Node: Array Sorting561002 -Node: Controlling Array Traversal561699 -Node: Array Sorting Functions569936 -Ref: Array Sorting Functions-Footnote-1573610 -Ref: Array Sorting Functions-Footnote-2573703 -Node: Two-way I/O573897 -Ref: Two-way I/O-Footnote-1579329 -Node: TCP/IP Networking579399 -Node: Profiling582243 -Node: Library Functions589717 -Ref: Library Functions-Footnote-1592724 -Node: Library Names592895 -Ref: Library Names-Footnote-1596366 -Ref: Library Names-Footnote-2596586 -Node: General Functions596672 -Node: Strtonum Function597625 -Node: Assert Function600555 -Node: Round Function603881 -Node: Cliff Random Function605424 -Node: Ordinal Functions606440 -Ref: Ordinal Functions-Footnote-1609510 -Ref: Ordinal Functions-Footnote-2609762 -Node: Join Function609971 -Ref: Join Function-Footnote-1611742 -Node: Gettimeofday Function611942 -Node: Data File Management615657 -Node: Filetrans Function616289 -Node: Rewind Function620428 -Node: File Checking621815 -Node: Empty Files622909 -Node: Ignoring Assigns625139 -Node: Getopt Function626692 -Ref: Getopt Function-Footnote-1637996 -Node: Passwd Functions638199 -Ref: Passwd Functions-Footnote-1647174 -Node: Group Functions647262 -Node: Walking Arrays655346 -Node: Sample Programs656915 -Node: Running Examples657580 -Node: Clones658308 -Node: Cut Program659532 -Node: Egrep Program669377 -Ref: Egrep Program-Footnote-1677150 -Node: Id Program677260 -Node: Split Program680876 -Ref: Split Program-Footnote-1684395 -Node: Tee Program684523 -Node: Uniq Program687326 -Node: Wc Program694755 -Ref: Wc Program-Footnote-1699021 -Ref: Wc Program-Footnote-2699221 -Node: Miscellaneous Programs699313 -Node: Dupword Program700501 -Node: Alarm Program702532 -Node: Translate Program707281 -Ref: Translate Program-Footnote-1711668 -Ref: Translate Program-Footnote-2711896 -Node: Labels Program712030 -Ref: Labels Program-Footnote-1715401 -Node: Word Sorting715485 -Node: History Sorting719369 -Node: Extract Program721208 -Ref: Extract Program-Footnote-1728691 -Node: Simple Sed728819 -Node: Igawk Program731881 -Ref: Igawk Program-Footnote-1747038 -Ref: Igawk Program-Footnote-2747239 -Node: Anagram Program747377 -Node: Signature Program750445 -Node: Debugger751545 -Node: Debugging752456 -Node: Debugging Concepts752869 -Node: Debugging Terms754725 -Node: Awk Debugging757348 -Node: Sample dgawk session758240 -Node: dgawk invocation758732 -Node: Finding The Bug759914 -Node: List of Debugger Commands766400 -Node: Breakpoint Control767711 -Node: Dgawk Execution Control771347 -Node: Viewing And Changing Data774698 -Node: Dgawk Stack778035 -Node: Dgawk Info779495 -Node: Miscellaneous Dgawk Commands783443 -Node: Readline Support788871 -Node: Dgawk Limitations789709 -Node: Language History791898 -Node: V7/SVR3.1793410 -Node: SVR4795731 -Node: POSIX797173 -Node: BTL798181 -Node: POSIX/GNU798915 -Node: Common Extensions804066 -Node: Ranges and Locales805173 -Ref: Ranges and Locales-Footnote-1809884 -Ref: Ranges and Locales-Footnote-2809911 -Ref: Ranges and Locales-Footnote-3810171 -Node: Contributors810392 -Node: Installation814654 -Node: Gawk Distribution815548 -Node: Getting816032 -Node: Extracting816858 -Node: Distribution contents818550 -Node: Unix Installation823772 -Node: Quick Installation824389 -Node: Additional Configuration Options826351 -Node: Configuration Philosophy827828 -Node: Non-Unix Installation830170 -Node: PC Installation830628 -Node: PC Binary Installation831927 -Node: PC Compiling833942 -Node: PC Testing836886 -Node: PC Using838062 -Node: Cygwin842247 -Node: MSYS843247 -Node: VMS Installation843761 -Node: VMS Compilation844364 -Ref: VMS Compilation-Footnote-1845371 -Node: VMS Installation Details845429 -Node: VMS Running847064 -Node: VMS Old Gawk848671 -Node: Bugs849145 -Node: Other Versions852997 -Node: Notes858278 -Node: Compatibility Mode858970 -Node: Additions859753 -Node: Accessing The Source860565 -Node: Adding Code861990 -Node: New Ports867957 -Node: Dynamic Extensions872070 -Node: Internals873446 -Node: Plugin License882549 -Node: Sample Library883183 -Node: Internal File Description883869 -Node: Internal File Ops887584 -Ref: Internal File Ops-Footnote-1892365 -Node: Using Internal File Ops892505 -Node: Future Extensions894882 -Node: Basic Concepts897386 -Node: Basic High Level898143 -Ref: Basic High Level-Footnote-1902178 -Node: Basic Data Typing902363 -Node: Floating Point Issues906888 -Node: String Conversion Precision907971 -Ref: String Conversion Precision-Footnote-1909671 -Node: Unexpected Results909780 -Node: POSIX Floating Point Problems911606 -Ref: POSIX Floating Point Problems-Footnote-1915311 -Node: Glossary915349 -Node: Copying940325 -Node: GNU Free Documentation License977882 -Node: Index1003019 +Ref: Records-Footnote-1171083 +Node: Fields171120 +Ref: Fields-Footnote-1174153 +Node: Nonconstant Fields174239 +Node: Changing Fields176441 +Node: Field Separators182422 +Node: Default Field Splitting185051 +Node: Regexp Field Splitting186168 +Node: Single Character Fields189510 +Node: Command Line Field Separator190569 +Node: Field Splitting Summary194010 +Ref: Field Splitting Summary-Footnote-1197202 +Node: Constant Size197303 +Node: Splitting By Content201887 +Ref: Splitting By Content-Footnote-1205613 +Node: Multiple Line205653 +Ref: Multiple Line-Footnote-1211500 +Node: Getline211679 +Node: Plain Getline213907 +Node: Getline/Variable215996 +Node: Getline/File217137 +Node: Getline/Variable/File218459 +Ref: Getline/Variable/File-Footnote-1220058 +Node: Getline/Pipe220145 +Node: Getline/Variable/Pipe222705 +Node: Getline/Coprocess223812 +Node: Getline/Variable/Coprocess225055 +Node: Getline Notes225769 +Node: Getline Summary228556 +Ref: table-getline-variants228899 +Node: Command line directories229755 +Node: Printing230380 +Node: Print232011 +Node: Print Examples233348 +Node: Output Separators236132 +Node: OFMT237892 +Node: Printf239250 +Node: Basic Printf240156 +Node: Control Letters241695 +Node: Format Modifiers245507 +Node: Printf Examples251516 +Node: Redirection254231 +Node: Special Files261215 +Node: Special FD261748 +Ref: Special FD-Footnote-1265373 +Node: Special Network265447 +Node: Special Caveats266297 +Node: Close Files And Pipes267093 +Ref: Close Files And Pipes-Footnote-1274116 +Ref: Close Files And Pipes-Footnote-2274264 +Node: Expressions274414 +Node: Values275546 +Node: Constants276222 +Node: Scalar Constants276902 +Ref: Scalar Constants-Footnote-1277761 +Node: Nondecimal-numbers277943 +Node: Regexp Constants281002 +Node: Using Constant Regexps281477 +Node: Variables284532 +Node: Using Variables285187 +Node: Assignment Options286911 +Node: Conversion288783 +Ref: table-locale-affects294159 +Ref: Conversion-Footnote-1294783 +Node: All Operators294892 +Node: Arithmetic Ops295522 +Node: Concatenation298027 +Ref: Concatenation-Footnote-1300820 +Node: Assignment Ops300940 +Ref: table-assign-ops305928 +Node: Increment Ops307336 +Node: Truth Values and Conditions310806 +Node: Truth Values311889 +Node: Typing and Comparison312938 +Node: Variable Typing313727 +Ref: Variable Typing-Footnote-1317624 +Node: Comparison Operators317746 +Ref: table-relational-ops318156 +Node: POSIX String Comparison321705 +Ref: POSIX String Comparison-Footnote-1322661 +Node: Boolean Ops322799 +Ref: Boolean Ops-Footnote-1326877 +Node: Conditional Exp326968 +Node: Function Calls328700 +Node: Precedence332294 +Node: Locales335963 +Node: Patterns and Actions337052 +Node: Pattern Overview338106 +Node: Regexp Patterns339775 +Node: Expression Patterns340318 +Node: Ranges344003 +Node: BEGIN/END346969 +Node: Using BEGIN/END347731 +Ref: Using BEGIN/END-Footnote-1350462 +Node: I/O And BEGIN/END350568 +Node: BEGINFILE/ENDFILE352850 +Node: Empty355743 +Node: Using Shell Variables356059 +Node: Action Overview358344 +Node: Statements360701 +Node: If Statement362555 +Node: While Statement364054 +Node: Do Statement366098 +Node: For Statement367254 +Node: Switch Statement370406 +Node: Break Statement372503 +Node: Continue Statement374493 +Node: Next Statement376286 +Node: Nextfile Statement378676 +Node: Exit Statement381221 +Node: Built-in Variables383637 +Node: User-modified384732 +Ref: User-modified-Footnote-1392758 +Node: Auto-set392820 +Ref: Auto-set-Footnote-1402111 +Node: ARGC and ARGV402316 +Node: Arrays406167 +Node: Array Basics407672 +Node: Array Intro408498 +Node: Reference to Elements412816 +Node: Assigning Elements415086 +Node: Array Example415577 +Node: Scanning an Array417309 +Node: Controlling Scanning419623 +Ref: Controlling Scanning-Footnote-1424556 +Node: Delete424872 +Ref: Delete-Footnote-1427307 +Node: Numeric Array Subscripts427364 +Node: Uninitialized Subscripts429547 +Node: Multi-dimensional431175 +Node: Multi-scanning434269 +Node: Arrays of Arrays435860 +Node: Functions440505 +Node: Built-in441327 +Node: Calling Built-in442405 +Node: Numeric Functions444393 +Ref: Numeric Functions-Footnote-1448225 +Ref: Numeric Functions-Footnote-2448582 +Ref: Numeric Functions-Footnote-3448630 +Node: String Functions448899 +Ref: String Functions-Footnote-1472396 +Ref: String Functions-Footnote-2472525 +Ref: String Functions-Footnote-3472773 +Node: Gory Details472860 +Ref: table-sub-escapes474539 +Ref: table-sub-posix-92475893 +Ref: table-sub-proposed477236 +Ref: table-posix-sub478586 +Ref: table-gensub-escapes480132 +Ref: Gory Details-Footnote-1481339 +Ref: Gory Details-Footnote-2481390 +Node: I/O Functions481541 +Ref: I/O Functions-Footnote-1488196 +Node: Time Functions488343 +Ref: Time Functions-Footnote-1499235 +Ref: Time Functions-Footnote-2499303 +Ref: Time Functions-Footnote-3499461 +Ref: Time Functions-Footnote-4499572 +Ref: Time Functions-Footnote-5499684 +Ref: Time Functions-Footnote-6499911 +Node: Bitwise Functions500177 +Ref: table-bitwise-ops500735 +Ref: Bitwise Functions-Footnote-1504895 +Node: Type Functions505079 +Node: I18N Functions505549 +Node: User-defined507176 +Node: Definition Syntax507980 +Ref: Definition Syntax-Footnote-1512890 +Node: Function Example512959 +Node: Function Caveats515553 +Node: Calling A Function515974 +Node: Variable Scope517089 +Node: Pass By Value/Reference519064 +Node: Return Statement522504 +Node: Dynamic Typing525485 +Node: Indirect Calls526220 +Node: Internationalization535905 +Node: I18N and L10N537331 +Node: Explaining gettext538017 +Ref: Explaining gettext-Footnote-1543083 +Ref: Explaining gettext-Footnote-2543267 +Node: Programmer i18n543432 +Node: Translator i18n547632 +Node: String Extraction548425 +Ref: String Extraction-Footnote-1549386 +Node: Printf Ordering549472 +Ref: Printf Ordering-Footnote-1552256 +Node: I18N Portability552320 +Ref: I18N Portability-Footnote-1554769 +Node: I18N Example554832 +Ref: I18N Example-Footnote-1557467 +Node: Gawk I18N557539 +Node: Advanced Features558156 +Node: Nondecimal Data559669 +Node: Array Sorting561252 +Node: Controlling Array Traversal561949 +Node: Array Sorting Functions570186 +Ref: Array Sorting Functions-Footnote-1573860 +Ref: Array Sorting Functions-Footnote-2573953 +Node: Two-way I/O574147 +Ref: Two-way I/O-Footnote-1579579 +Node: TCP/IP Networking579649 +Node: Profiling582493 +Node: Library Functions589967 +Ref: Library Functions-Footnote-1592974 +Node: Library Names593145 +Ref: Library Names-Footnote-1596616 +Ref: Library Names-Footnote-2596836 +Node: General Functions596922 +Node: Strtonum Function597875 +Node: Assert Function600805 +Node: Round Function604131 +Node: Cliff Random Function605674 +Node: Ordinal Functions606690 +Ref: Ordinal Functions-Footnote-1609760 +Ref: Ordinal Functions-Footnote-2610012 +Node: Join Function610221 +Ref: Join Function-Footnote-1611992 +Node: Gettimeofday Function612192 +Node: Data File Management615907 +Node: Filetrans Function616539 +Node: Rewind Function620678 +Node: File Checking622065 +Node: Empty Files623159 +Node: Ignoring Assigns625389 +Node: Getopt Function626942 +Ref: Getopt Function-Footnote-1638246 +Node: Passwd Functions638449 +Ref: Passwd Functions-Footnote-1647424 +Node: Group Functions647512 +Node: Walking Arrays655596 +Node: Sample Programs657165 +Node: Running Examples657830 +Node: Clones658558 +Node: Cut Program659782 +Node: Egrep Program669627 +Ref: Egrep Program-Footnote-1677400 +Node: Id Program677510 +Node: Split Program681126 +Ref: Split Program-Footnote-1684645 +Node: Tee Program684773 +Node: Uniq Program687576 +Node: Wc Program695005 +Ref: Wc Program-Footnote-1699271 +Ref: Wc Program-Footnote-2699471 +Node: Miscellaneous Programs699563 +Node: Dupword Program700751 +Node: Alarm Program702782 +Node: Translate Program707531 +Ref: Translate Program-Footnote-1711918 +Ref: Translate Program-Footnote-2712146 +Node: Labels Program712280 +Ref: Labels Program-Footnote-1715651 +Node: Word Sorting715735 +Node: History Sorting719619 +Node: Extract Program721458 +Ref: Extract Program-Footnote-1728941 +Node: Simple Sed729069 +Node: Igawk Program732131 +Ref: Igawk Program-Footnote-1747288 +Ref: Igawk Program-Footnote-2747489 +Node: Anagram Program747627 +Node: Signature Program750695 +Node: Debugger751795 +Node: Debugging752706 +Node: Debugging Concepts753119 +Node: Debugging Terms754975 +Node: Awk Debugging757598 +Node: Sample dgawk session758490 +Node: dgawk invocation758982 +Node: Finding The Bug760164 +Node: List of Debugger Commands766650 +Node: Breakpoint Control767961 +Node: Dgawk Execution Control771597 +Node: Viewing And Changing Data774948 +Node: Dgawk Stack778285 +Node: Dgawk Info779745 +Node: Miscellaneous Dgawk Commands783693 +Node: Readline Support789121 +Node: Dgawk Limitations789959 +Node: Language History792148 +Node: V7/SVR3.1793660 +Node: SVR4795981 +Node: POSIX797423 +Node: BTL798431 +Node: POSIX/GNU799165 +Node: Common Extensions804316 +Node: Ranges and Locales805423 +Ref: Ranges and Locales-Footnote-1810134 +Ref: Ranges and Locales-Footnote-2810161 +Ref: Ranges and Locales-Footnote-3810421 +Node: Contributors810642 +Node: Installation814904 +Node: Gawk Distribution815798 +Node: Getting816282 +Node: Extracting817108 +Node: Distribution contents818800 +Node: Unix Installation824022 +Node: Quick Installation824639 +Node: Additional Configuration Options826601 +Node: Configuration Philosophy828078 +Node: Non-Unix Installation830420 +Node: PC Installation830878 +Node: PC Binary Installation832177 +Node: PC Compiling834192 +Node: PC Testing837136 +Node: PC Using838312 +Node: Cygwin842497 +Node: MSYS843497 +Node: VMS Installation844011 +Node: VMS Compilation844614 +Ref: VMS Compilation-Footnote-1845621 +Node: VMS Installation Details845679 +Node: VMS Running847314 +Node: VMS Old Gawk848921 +Node: Bugs849395 +Node: Other Versions853247 +Node: Notes858528 +Node: Compatibility Mode859220 +Node: Additions860003 +Node: Accessing The Source860815 +Node: Adding Code862240 +Node: New Ports868207 +Node: Dynamic Extensions872320 +Node: Internals873696 +Node: Plugin License882799 +Node: Sample Library883433 +Node: Internal File Description884119 +Node: Internal File Ops887834 +Ref: Internal File Ops-Footnote-1892615 +Node: Using Internal File Ops892755 +Node: Future Extensions895132 +Node: Basic Concepts897636 +Node: Basic High Level898393 +Ref: Basic High Level-Footnote-1902428 +Node: Basic Data Typing902613 +Node: Floating Point Issues907138 +Node: String Conversion Precision908221 +Ref: String Conversion Precision-Footnote-1909921 +Node: Unexpected Results910030 +Node: POSIX Floating Point Problems911856 +Ref: POSIX Floating Point Problems-Footnote-1915561 +Node: Glossary915599 +Node: Copying940575 +Node: GNU Free Documentation License978132 +Node: Index1003269  End Tag Table diff --git a/doc/gawk.texi b/doc/gawk.texi index 91ef044c..b2044649 100644 --- a/doc/gawk.texi +++ b/doc/gawk.texi @@ -5256,16 +5256,22 @@ awk '@{ print $0 @}' RS="/" BBS-list This sets @code{RS} to @samp{/} before processing @file{BBS-list}. Using an unusual character such as @samp{/} for the record separator -produces correct behavior in the vast majority of cases. However, -the following (extreme) pipeline prints a surprising @samp{1}: +produces correct behavior in the vast majority of cases. + +There is one unusual case, that occurs when @command{gawk} is +being fully POSIX-compliant (@pxref{Options}). +Then, the following (extreme) pipeline prints a surprising @samp{1}: @example -$ echo | awk 'BEGIN @{ RS = "a" @} ; @{ print NF @}' +$ echo | gawk --posix 'BEGIN @{ RS = "a" @} ; @{ print NF @}' @print{} 1 @end example There is one field, consisting of a newline. The value of the built-in variable @code{NF} is the number of fields in the current record. +(In the normal case, @command{gawk} treats the newline as whitespace, +printing @samp{0} as the result. Most other versions of @command{awk} +also act this way.) @cindex dark corner, input files Reaching the end of an input file terminates the current input record, -- cgit v1.2.3 From 84d6acb5c16aa9aed908fde7cb0bc53c2ecbeede Mon Sep 17 00:00:00 2001 From: "Arnold D. Robbins" Date: Sun, 12 Aug 2012 12:48:18 +0300 Subject: Sync w/GNU grep. --- ChangeLog | 4 ++++ dfa.c | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index d6afeb25..7c0d6381 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2012-08-12 Arnold D. Robbins + + * dfa.c: Sync w/GNU grep. + 2012-06-19 Arnold D. Robbins * main.c (main): Do setlocale to "C" if --characters-as-bytes. diff --git a/dfa.c b/dfa.c index 64b7ddc9..fa05181c 100644 --- a/dfa.c +++ b/dfa.c @@ -1673,7 +1673,7 @@ add_utf8_anychar (void) static const charclass utf8_classes[5] = { {0, 0, 0, 0, ~0, ~0, 0, 0}, /* 80-bf: non-lead bytes */ {~0, ~0, ~0, ~0, 0, 0, 0, 0}, /* 00-7f: 1-byte sequence */ - {0, 0, 0, 0, 0, 0, 0xfffffffcU, 0}, /* c2-df: 2-byte sequence */ + {0, 0, 0, 0, 0, 0, ~3, 0}, /* c2-df: 2-byte sequence */ {0, 0, 0, 0, 0, 0, 0, 0xffff}, /* e0-ef: 3-byte sequence */ {0, 0, 0, 0, 0, 0, 0, 0xff0000} /* f0-f7: 4-byte sequence */ }; -- cgit v1.2.3 From 4f196c2431034aa4865fcd4e3bcc45a6e764266f Mon Sep 17 00:00:00 2001 From: "Arnold D. Robbins" Date: Sun, 12 Aug 2012 21:02:48 +0300 Subject: Fix doc on ranges and locales again. Add test. --- doc/ChangeLog | 5 +++ doc/gawk.info | 119 +++++++++++++++++++++++++-------------------------- doc/gawk.texi | 4 +- test/ChangeLog | 5 +++ test/Makefile.am | 5 ++- test/Makefile.in | 10 ++++- test/Maketests | 5 +++ test/regexprange.awk | 14 ++++++ test/regexprange.ok | 52 ++++++++++++++++++++++ 9 files changed, 154 insertions(+), 65 deletions(-) create mode 100644 test/regexprange.awk create mode 100644 test/regexprange.ok diff --git a/doc/ChangeLog b/doc/ChangeLog index 88743adc..f279986c 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -1,3 +1,8 @@ +2012-08-12 Arnold D. Robbins + + * gawk.texi (Ranges and Locales): Clarified ranges and + locales. Again. + 2012-08-05 Arnold D. Robbins * gawk.texi (PC Binary Installation): Document Eli Zaretskii's diff --git a/doc/gawk.info b/doc/gawk.info index 91c9d516..275188ef 100644 --- a/doc/gawk.info +++ b/doc/gawk.info @@ -20186,8 +20186,7 @@ outside those locales, the ordering was defined to be based on In many locales, `A' and `a' are both less than `B'. In other words, these locales sort characters in dictionary order, and `[a-dx-z]' is typically not equivalent to `[abcdxyz]'; instead it might -be equivalent to `[aBbCcDdXxYyZz]', for example. (And to make things -worse, on other systems, it might be equivalent to `[aAbBcCdDxXyYz]'.) +be equivalent to `[ABCXYabcdxyz]', for example. This point needs to be emphasized: Much literature teaches that you should use `[a-z]' to match a lowercase character. But on systems with @@ -27834,63 +27833,63 @@ Node: BTL798431 Node: POSIX/GNU799165 Node: Common Extensions804316 Node: Ranges and Locales805423 -Ref: Ranges and Locales-Footnote-1810134 -Ref: Ranges and Locales-Footnote-2810161 -Ref: Ranges and Locales-Footnote-3810421 -Node: Contributors810642 -Node: Installation814904 -Node: Gawk Distribution815798 -Node: Getting816282 -Node: Extracting817108 -Node: Distribution contents818800 -Node: Unix Installation824022 -Node: Quick Installation824639 -Node: Additional Configuration Options826601 -Node: Configuration Philosophy828078 -Node: Non-Unix Installation830420 -Node: PC Installation830878 -Node: PC Binary Installation832177 -Node: PC Compiling834192 -Node: PC Testing837136 -Node: PC Using838312 -Node: Cygwin842497 -Node: MSYS843497 -Node: VMS Installation844011 -Node: VMS Compilation844614 -Ref: VMS Compilation-Footnote-1845621 -Node: VMS Installation Details845679 -Node: VMS Running847314 -Node: VMS Old Gawk848921 -Node: Bugs849395 -Node: Other Versions853247 -Node: Notes858528 -Node: Compatibility Mode859220 -Node: Additions860003 -Node: Accessing The Source860815 -Node: Adding Code862240 -Node: New Ports868207 -Node: Dynamic Extensions872320 -Node: Internals873696 -Node: Plugin License882799 -Node: Sample Library883433 -Node: Internal File Description884119 -Node: Internal File Ops887834 -Ref: Internal File Ops-Footnote-1892615 -Node: Using Internal File Ops892755 -Node: Future Extensions895132 -Node: Basic Concepts897636 -Node: Basic High Level898393 -Ref: Basic High Level-Footnote-1902428 -Node: Basic Data Typing902613 -Node: Floating Point Issues907138 -Node: String Conversion Precision908221 -Ref: String Conversion Precision-Footnote-1909921 -Node: Unexpected Results910030 -Node: POSIX Floating Point Problems911856 -Ref: POSIX Floating Point Problems-Footnote-1915561 -Node: Glossary915599 -Node: Copying940575 -Node: GNU Free Documentation License978132 -Node: Index1003269 +Ref: Ranges and Locales-Footnote-1810041 +Ref: Ranges and Locales-Footnote-2810068 +Ref: Ranges and Locales-Footnote-3810328 +Node: Contributors810549 +Node: Installation814811 +Node: Gawk Distribution815705 +Node: Getting816189 +Node: Extracting817015 +Node: Distribution contents818707 +Node: Unix Installation823929 +Node: Quick Installation824546 +Node: Additional Configuration Options826508 +Node: Configuration Philosophy827985 +Node: Non-Unix Installation830327 +Node: PC Installation830785 +Node: PC Binary Installation832084 +Node: PC Compiling834099 +Node: PC Testing837043 +Node: PC Using838219 +Node: Cygwin842404 +Node: MSYS843404 +Node: VMS Installation843918 +Node: VMS Compilation844521 +Ref: VMS Compilation-Footnote-1845528 +Node: VMS Installation Details845586 +Node: VMS Running847221 +Node: VMS Old Gawk848828 +Node: Bugs849302 +Node: Other Versions853154 +Node: Notes858435 +Node: Compatibility Mode859127 +Node: Additions859910 +Node: Accessing The Source860722 +Node: Adding Code862147 +Node: New Ports868114 +Node: Dynamic Extensions872227 +Node: Internals873603 +Node: Plugin License882706 +Node: Sample Library883340 +Node: Internal File Description884026 +Node: Internal File Ops887741 +Ref: Internal File Ops-Footnote-1892522 +Node: Using Internal File Ops892662 +Node: Future Extensions895039 +Node: Basic Concepts897543 +Node: Basic High Level898300 +Ref: Basic High Level-Footnote-1902335 +Node: Basic Data Typing902520 +Node: Floating Point Issues907045 +Node: String Conversion Precision908128 +Ref: String Conversion Precision-Footnote-1909828 +Node: Unexpected Results909937 +Node: POSIX Floating Point Problems911763 +Ref: POSIX Floating Point Problems-Footnote-1915468 +Node: Glossary915506 +Node: Copying940482 +Node: GNU Free Documentation License978039 +Node: Index1003176  End Tag Table diff --git a/doc/gawk.texi b/doc/gawk.texi index b2044649..1ff75230 100644 --- a/doc/gawk.texi +++ b/doc/gawk.texi @@ -27095,9 +27095,7 @@ But outside those locales, the ordering was defined to be based on In many locales, @samp{A} and @samp{a} are both less than @samp{B}. In other words, these locales sort characters in dictionary order, and @samp{[a-dx-z]} is typically not equivalent to @samp{[abcdxyz]}; -instead it might be equivalent to @samp{[aBbCcDdXxYyZz]}, for example. -(And to make things worse, on other systems, it might be equivalent to -@samp{[aAbBcCdDxXyYz]}.) +instead it might be equivalent to @samp{[ABCXYabcdxyz]}, for example. This point needs to be emphasized: Much literature teaches that you should use @samp{[a-z]} to match a lowercase character. But on systems with diff --git a/test/ChangeLog b/test/ChangeLog index 219396cf..75eb5ec9 100644 --- a/test/ChangeLog +++ b/test/ChangeLog @@ -1,3 +1,8 @@ +2012-08-12 Arnold D. Robbins + + * Makefile.am (regexprange): New test. + * regexprange.awk, regexprange.ok: New files. + 2012-08-05 Arnold D. Robbins New test from Nelson Beebe. diff --git a/test/Makefile.am b/test/Makefile.am index 9c96c386..592cf144 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -615,6 +615,8 @@ EXTRA_DIST = \ regeq.awk \ regeq.in \ regeq.ok \ + regexprange.awk \ + regexprange.ok \ regrange.awk \ regrange.ok \ regtest.sh \ @@ -823,7 +825,8 @@ BASIC_TESTS = \ paramdup paramres paramtyp parse1 parsefld parseme pcntplus \ posix2008sub prdupval prec printf0 printf1 prmarscl prmreuse \ prt1eval prtoeval \ - rand range1 rebt8b1 redfilnm regeq regrange reindops reparse \ + rand range1 rebt8b1 redfilnm regeq regexprange regrange \ + reindops reparse \ resplit rri1 rs rsnul1nl rsnulbig rsnulbig2 rstest1 rstest2 \ rstest3 rstest4 rstest5 rswhite \ scalar sclforin sclifin sortempty splitargv splitarr splitdef \ diff --git a/test/Makefile.in b/test/Makefile.in index 56c07305..d76d7387 100644 --- a/test/Makefile.in +++ b/test/Makefile.in @@ -820,6 +820,8 @@ EXTRA_DIST = \ regeq.awk \ regeq.in \ regeq.ok \ + regexprange.awk \ + regexprange.ok \ regrange.awk \ regrange.ok \ regtest.sh \ @@ -1028,7 +1030,8 @@ BASIC_TESTS = \ paramdup paramres paramtyp parse1 parsefld parseme pcntplus \ posix2008sub prdupval prec printf0 printf1 prmarscl prmreuse \ prt1eval prtoeval \ - rand range1 rebt8b1 redfilnm regeq regrange reindops reparse \ + rand range1 rebt8b1 redfilnm regeq regexprange regrange \ + reindops reparse \ resplit rri1 rs rsnul1nl rsnulbig rsnulbig2 rstest1 rstest2 \ rstest3 rstest4 rstest5 rswhite \ scalar sclforin sclifin sortempty splitargv splitarr splitdef \ @@ -2523,6 +2526,11 @@ regeq: @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ +regexprange: + @echo regexprange + @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + regrange: @echo regrange @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ diff --git a/test/Maketests b/test/Maketests index 12d7e35c..df52108d 100644 --- a/test/Maketests +++ b/test/Maketests @@ -670,6 +670,11 @@ regeq: @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ +regexprange: + @echo regexprange + @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + regrange: @echo regrange @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ diff --git a/test/regexprange.awk b/test/regexprange.awk new file mode 100644 index 00000000..861e5ee5 --- /dev/null +++ b/test/regexprange.awk @@ -0,0 +1,14 @@ +BEGIN { + range = "[a-dx-z]" + + split("ABCDEFGHIJKLMNOPQRSTUVWXYZ", upper, "") + split("abcdefghijklmnopqrstuvwxyz", lower, "") + + for (i = 1; i in upper; i++) + printf("%s ~ %s ---> %s\n", + upper[i], range, (upper[i] ~ range) ? "true" : "false") + + for (i = 1; i in lower; i++) + printf("%s ~ %s ---> %s\n", + lower[i], range, (lower[i] ~ range) ? "true" : "false") +} diff --git a/test/regexprange.ok b/test/regexprange.ok new file mode 100644 index 00000000..dbf5d35a --- /dev/null +++ b/test/regexprange.ok @@ -0,0 +1,52 @@ +A ~ [a-dx-z] ---> false +B ~ [a-dx-z] ---> false +C ~ [a-dx-z] ---> false +D ~ [a-dx-z] ---> false +E ~ [a-dx-z] ---> false +F ~ [a-dx-z] ---> false +G ~ [a-dx-z] ---> false +H ~ [a-dx-z] ---> false +I ~ [a-dx-z] ---> false +J ~ [a-dx-z] ---> false +K ~ [a-dx-z] ---> false +L ~ [a-dx-z] ---> false +M ~ [a-dx-z] ---> false +N ~ [a-dx-z] ---> false +O ~ [a-dx-z] ---> false +P ~ [a-dx-z] ---> false +Q ~ [a-dx-z] ---> false +R ~ [a-dx-z] ---> false +S ~ [a-dx-z] ---> false +T ~ [a-dx-z] ---> false +U ~ [a-dx-z] ---> false +V ~ [a-dx-z] ---> false +W ~ [a-dx-z] ---> false +X ~ [a-dx-z] ---> false +Y ~ [a-dx-z] ---> false +Z ~ [a-dx-z] ---> false +a ~ [a-dx-z] ---> true +b ~ [a-dx-z] ---> true +c ~ [a-dx-z] ---> true +d ~ [a-dx-z] ---> true +e ~ [a-dx-z] ---> false +f ~ [a-dx-z] ---> false +g ~ [a-dx-z] ---> false +h ~ [a-dx-z] ---> false +i ~ [a-dx-z] ---> false +j ~ [a-dx-z] ---> false +k ~ [a-dx-z] ---> false +l ~ [a-dx-z] ---> false +m ~ [a-dx-z] ---> false +n ~ [a-dx-z] ---> false +o ~ [a-dx-z] ---> false +p ~ [a-dx-z] ---> false +q ~ [a-dx-z] ---> false +r ~ [a-dx-z] ---> false +s ~ [a-dx-z] ---> false +t ~ [a-dx-z] ---> false +u ~ [a-dx-z] ---> false +v ~ [a-dx-z] ---> false +w ~ [a-dx-z] ---> false +x ~ [a-dx-z] ---> true +y ~ [a-dx-z] ---> true +z ~ [a-dx-z] ---> true -- cgit v1.2.3 From a58fa491cdaf57a9f67cff35c58398ef0c87f52e Mon Sep 17 00:00:00 2001 From: "Arnold D. Robbins" Date: Sun, 12 Aug 2012 21:18:48 +0300 Subject: Small update to FUTURES. --- FUTURES | 3 +++ 1 file changed, 3 insertions(+) diff --git a/FUTURES b/FUTURES index 6b570567..89c3ce64 100644 --- a/FUTURES +++ b/FUTURES @@ -53,6 +53,9 @@ For 4.2 ??? Gnulib + Consider really implementing BWK awk SYMTAB for seeing what + global variables are defined. + Probably never: =============== Do an optimization pass over parse tree? -- cgit v1.2.3