diff options
author | Arnold D. Robbins <arnold@skeeve.com> | 2018-11-24 20:25:48 +0200 |
---|---|---|
committer | Arnold D. Robbins <arnold@skeeve.com> | 2018-11-24 20:25:48 +0200 |
commit | d5724bb61af6f7c3d3b491612cbd0bcc05f5d056 (patch) | |
tree | 86d6678a12c6a6d37a5c5f46417d4da461c704d4 | |
parent | 5f60e83a43df739f1dd02c4f7601148f3c9006ab (diff) | |
parent | ac2ff45364ab20c1a2bc82f779738f33f90808dd (diff) | |
download | egawk-d5724bb61af6f7c3d3b491612cbd0bcc05f5d056.tar.gz egawk-d5724bb61af6f7c3d3b491612cbd0bcc05f5d056.tar.bz2 egawk-d5724bb61af6f7c3d3b491612cbd0bcc05f5d056.zip |
Merge branch 'master' into feature/fix-comments
-rwxr-xr-x | ChangeLog | 6 | ||||
-rw-r--r-- | doc/ChangeLog | 5 | ||||
-rw-r--r-- | doc/gawk.info | 853 | ||||
-rw-r--r-- | doc/gawk.texi | 16 | ||||
-rw-r--r-- | doc/gawktexi.in | 16 | ||||
-rw-r--r-- | main.c | 75 | ||||
-rw-r--r-- | po/ChangeLog | 4 | ||||
-rw-r--r-- | po/it.po | 153 | ||||
-rw-r--r-- | test/ChangeLog | 11 | ||||
-rw-r--r-- | test/Makefile.am | 15 | ||||
-rw-r--r-- | test/Makefile.in | 18 | ||||
-rw-r--r-- | test/Maketests | 5 | ||||
-rw-r--r-- | test/spacere.awk | 2 | ||||
-rw-r--r-- | test/typedregex4.awk | 7 | ||||
-rw-r--r-- | test/typedregex4.ok | 2 |
15 files changed, 647 insertions, 541 deletions
@@ -1,3 +1,9 @@ +2018-11-24 Arnold D. Robbins <arnold@skeeve.com> + + * main.c (arg_assign): Allow assigning strongly typed regexp + constants to variables on the command line and with -v. + Thanks to Peng Yu <pengyu.ut@gmail.com> for the report. + 2018-11-17 Arnold D. Robbins <arnold@skeeve.com> * awkgram.c, command.c: Updated to Bison 3.2.1. diff --git a/doc/ChangeLog b/doc/ChangeLog index c5b59fed..2875d9a8 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -1,3 +1,8 @@ +2018-11-24 Arnold D. Robbins <arnold@skeeve.com> + + * gawktexi.in (Assignment Options): Add description of assigning + strongly typed regexp constants to variables. + 2018-11-02 Arnold D. Robbins <arnold@skeeve.com> * gawktexi.in): Small typo fixes. Thanks to Antonio diff --git a/doc/gawk.info b/doc/gawk.info index 01f7376f..e059a12e 100644 --- a/doc/gawk.info +++ b/doc/gawk.info @@ -8077,6 +8077,19 @@ the 'awk' program in the 'ARGV' array (*note ARGC and ARGV::). 'awk' processes the values of command-line assignments for escape sequences (*note Escape Sequences::). (d.c.) + Normally, variables assigned on the command line (with or without the +'-v' option) are treated as strings. When such variables are used as +numbers, 'awk''s normal automatic conversion of strings to numbers takes +place, and everything "just works." + + However, 'gawk' supports variables whose types are "regexp". You can +assign variables of this type using the following syntax: + + gawk -v 're1=foo|bar/' '...' /path/to/file1 're2=baz|quux/' /path/to/file2 + +Strongly typed regexps are an advanced feature (*note Strong Regexp +Constants::). We mention them here only for completeness. + File: gawk.info, Node: Conversion, Prev: Variables, Up: Values @@ -36261,425 +36274,425 @@ Node: Strong Regexp Constants345295 Node: Variables348253 Node: Using Variables348910 Node: Assignment Options350820 -Node: Conversion352693 -Node: Strings And Numbers353217 -Ref: Strings And Numbers-Footnote-1356280 -Node: Locale influences conversions356389 -Ref: table-locale-affects359147 -Node: All Operators359765 -Node: Arithmetic Ops360394 -Node: Concatenation362900 -Ref: Concatenation-Footnote-1365747 -Node: Assignment Ops365854 -Ref: table-assign-ops370845 -Node: Increment Ops372158 -Node: Truth Values and Conditions375618 -Node: Truth Values376692 -Node: Typing and Comparison377740 -Node: Variable Typing378560 -Ref: Variable Typing-Footnote-1385023 -Ref: Variable Typing-Footnote-2385095 -Node: Comparison Operators385172 -Ref: table-relational-ops385591 -Node: POSIX String Comparison389086 -Ref: POSIX String Comparison-Footnote-1390781 -Ref: POSIX String Comparison-Footnote-2390920 -Node: Boolean Ops391004 -Ref: Boolean Ops-Footnote-1395486 -Node: Conditional Exp395578 -Node: Function Calls397314 -Node: Precedence401191 -Node: Locales404850 -Node: Expressions Summary406482 -Node: Patterns and Actions409055 -Node: Pattern Overview410175 -Node: Regexp Patterns411852 -Node: Expression Patterns412394 -Node: Ranges416175 -Node: BEGIN/END419283 -Node: Using BEGIN/END420044 -Ref: Using BEGIN/END-Footnote-1422780 -Node: I/O And BEGIN/END422886 -Node: BEGINFILE/ENDFILE425200 -Node: Empty428113 -Node: Using Shell Variables428430 -Node: Action Overview430704 -Node: Statements433029 -Node: If Statement434877 -Node: While Statement436372 -Node: Do Statement438400 -Node: For Statement439548 -Node: Switch Statement442719 -Node: Break Statement445105 -Node: Continue Statement447197 -Node: Next Statement449024 -Node: Nextfile Statement451407 -Node: Exit Statement454059 -Node: Built-in Variables456462 -Node: User-modified457595 -Node: Auto-set465362 -Ref: Auto-set-Footnote-1481664 -Ref: Auto-set-Footnote-2481870 -Node: ARGC and ARGV481926 -Node: Pattern Action Summary486139 -Node: Arrays488569 -Node: Array Basics489898 -Node: Array Intro490742 -Ref: figure-array-elements492717 -Ref: Array Intro-Footnote-1495421 -Node: Reference to Elements495549 -Node: Assigning Elements498013 -Node: Array Example498504 -Node: Scanning an Array500263 -Node: Controlling Scanning503285 -Ref: Controlling Scanning-Footnote-1508684 -Node: Numeric Array Subscripts509000 -Node: Uninitialized Subscripts511184 -Node: Delete512803 -Ref: Delete-Footnote-1515555 -Node: Multidimensional515612 -Node: Multiscanning518707 -Node: Arrays of Arrays520298 -Node: Arrays Summary525066 -Node: Functions527159 -Node: Built-in528197 -Node: Calling Built-in529278 -Node: Numeric Functions531274 -Ref: Numeric Functions-Footnote-1535302 -Ref: Numeric Functions-Footnote-2535659 -Ref: Numeric Functions-Footnote-3535707 -Node: String Functions535979 -Ref: String Functions-Footnote-1559688 -Ref: String Functions-Footnote-2559816 -Ref: String Functions-Footnote-3560064 -Node: Gory Details560151 -Ref: table-sub-escapes561942 -Ref: table-sub-proposed563461 -Ref: table-posix-sub564824 -Ref: table-gensub-escapes566365 -Ref: Gory Details-Footnote-1567188 -Node: I/O Functions567342 -Ref: table-system-return-values573810 -Ref: I/O Functions-Footnote-1575890 -Ref: I/O Functions-Footnote-2576038 -Node: Time Functions576158 -Ref: Time Functions-Footnote-1586829 -Ref: Time Functions-Footnote-2586897 -Ref: Time Functions-Footnote-3587055 -Ref: Time Functions-Footnote-4587166 -Ref: Time Functions-Footnote-5587278 -Ref: Time Functions-Footnote-6587505 -Node: Bitwise Functions587771 -Ref: table-bitwise-ops588365 -Ref: Bitwise Functions-Footnote-1594428 -Ref: Bitwise Functions-Footnote-2594601 -Node: Type Functions594792 -Node: I18N Functions597543 -Node: User-defined599194 -Node: Definition Syntax599999 -Ref: Definition Syntax-Footnote-1605686 -Node: Function Example605757 -Ref: Function Example-Footnote-1608679 -Node: Function Caveats608701 -Node: Calling A Function609219 -Node: Variable Scope610177 -Node: Pass By Value/Reference613171 -Node: Return Statement616670 -Node: Dynamic Typing619649 -Node: Indirect Calls620579 -Ref: Indirect Calls-Footnote-1630831 -Node: Functions Summary630959 -Node: Library Functions633664 -Ref: Library Functions-Footnote-1637271 -Ref: Library Functions-Footnote-2637414 -Node: Library Names637585 -Ref: Library Names-Footnote-1641045 -Ref: Library Names-Footnote-2641268 -Node: General Functions641354 -Node: Strtonum Function642457 -Node: Assert Function645479 -Node: Round Function648805 -Node: Cliff Random Function650345 -Node: Ordinal Functions651361 -Ref: Ordinal Functions-Footnote-1654424 -Ref: Ordinal Functions-Footnote-2654676 -Node: Join Function654886 -Ref: Join Function-Footnote-1656656 -Node: Getlocaltime Function656856 -Node: Readfile Function660598 -Node: Shell Quoting662575 -Node: Data File Management663976 -Node: Filetrans Function664608 -Node: Rewind Function668704 -Node: File Checking670614 -Ref: File Checking-Footnote-1671948 -Node: Empty Files672149 -Node: Ignoring Assigns674128 -Node: Getopt Function675678 -Ref: Getopt Function-Footnote-1687147 -Node: Passwd Functions687347 -Ref: Passwd Functions-Footnote-1696186 -Node: Group Functions696274 -Ref: Group Functions-Footnote-1704172 -Node: Walking Arrays704379 -Node: Library Functions Summary707387 -Node: Library Exercises708793 -Node: Sample Programs709258 -Node: Running Examples710028 -Node: Clones710756 -Node: Cut Program711980 -Node: Egrep Program721909 -Ref: Egrep Program-Footnote-1729421 -Node: Id Program729531 -Node: Split Program733211 -Ref: Split Program-Footnote-1736669 -Node: Tee Program736798 -Node: Uniq Program739588 -Node: Wc Program747014 -Ref: Wc Program-Footnote-1751269 -Node: Miscellaneous Programs751363 -Node: Dupword Program752576 -Node: Alarm Program754606 -Node: Translate Program759461 -Ref: Translate Program-Footnote-1764026 -Node: Labels Program764296 -Ref: Labels Program-Footnote-1767647 -Node: Word Sorting767731 -Node: History Sorting771803 -Node: Extract Program773638 -Node: Simple Sed781692 -Node: Igawk Program784766 -Ref: Igawk Program-Footnote-1799097 -Ref: Igawk Program-Footnote-2799299 -Ref: Igawk Program-Footnote-3799421 -Node: Anagram Program799536 -Node: Signature Program802598 -Node: Programs Summary803845 -Node: Programs Exercises805059 -Ref: Programs Exercises-Footnote-1809188 -Node: Advanced Features809279 -Node: Nondecimal Data811269 -Node: Array Sorting812860 -Node: Controlling Array Traversal813560 -Ref: Controlling Array Traversal-Footnote-1821928 -Node: Array Sorting Functions822046 -Ref: Array Sorting Functions-Footnote-1827137 -Node: Two-way I/O827333 -Ref: Two-way I/O-Footnote-1835053 -Ref: Two-way I/O-Footnote-2835240 -Node: TCP/IP Networking835322 -Node: Profiling838440 -Node: Advanced Features Summary847445 -Node: Internationalization849289 -Node: I18N and L10N850769 -Node: Explaining gettext851456 -Ref: Explaining gettext-Footnote-1857348 -Ref: Explaining gettext-Footnote-2857533 -Node: Programmer i18n857698 -Ref: Programmer i18n-Footnote-1862647 -Node: Translator i18n862696 -Node: String Extraction863490 -Ref: String Extraction-Footnote-1864622 -Node: Printf Ordering864708 -Ref: Printf Ordering-Footnote-1867494 -Node: I18N Portability867558 -Ref: I18N Portability-Footnote-1870014 -Node: I18N Example870077 -Ref: I18N Example-Footnote-1872883 -Node: Gawk I18N872956 -Node: I18N Summary873601 -Node: Debugger874942 -Node: Debugging875965 -Node: Debugging Concepts876406 -Node: Debugging Terms878215 -Node: Awk Debugging880790 -Node: Sample Debugging Session881696 -Node: Debugger Invocation882230 -Node: Finding The Bug883616 -Node: List of Debugger Commands890094 -Node: Breakpoint Control891427 -Node: Debugger Execution Control895121 -Node: Viewing And Changing Data898483 -Node: Execution Stack901857 -Node: Debugger Info903494 -Node: Miscellaneous Debugger Commands907565 -Node: Readline Support912627 -Node: Limitations913523 -Node: Debugging Summary915632 -Node: Arbitrary Precision Arithmetic916911 -Node: Computer Arithmetic918396 -Ref: table-numeric-ranges922162 -Ref: table-floating-point-ranges922655 -Ref: Computer Arithmetic-Footnote-1923313 -Node: Math Definitions923370 -Ref: table-ieee-formats926686 -Ref: Math Definitions-Footnote-1927289 -Node: MPFR features927394 -Node: FP Math Caution929112 -Ref: FP Math Caution-Footnote-1930184 -Node: Inexactness of computations930553 -Node: Inexact representation931513 -Node: Comparing FP Values932873 -Node: Errors accumulate934114 -Node: Getting Accuracy935547 -Node: Try To Round938257 -Node: Setting precision939156 -Ref: table-predefined-precision-strings939853 -Node: Setting the rounding mode941683 -Ref: table-gawk-rounding-modes942057 -Ref: Setting the rounding mode-Footnote-1945988 -Node: Arbitrary Precision Integers946167 -Ref: Arbitrary Precision Integers-Footnote-1949342 -Node: Checking for MPFR949491 -Node: POSIX Floating Point Problems950965 -Ref: POSIX Floating Point Problems-Footnote-1955250 -Node: Floating point summary955288 -Node: Dynamic Extensions957478 -Node: Extension Intro959031 -Node: Plugin License960297 -Node: Extension Mechanism Outline961094 -Ref: figure-load-extension961533 -Ref: figure-register-new-function963098 -Ref: figure-call-new-function964190 -Node: Extension API Description966252 -Node: Extension API Functions Introduction967894 -Node: General Data Types973434 -Ref: General Data Types-Footnote-1981795 -Node: Memory Allocation Functions982094 -Ref: Memory Allocation Functions-Footnote-1986304 -Node: Constructor Functions986403 -Node: Registration Functions989989 -Node: Extension Functions990674 -Node: Exit Callback Functions995889 -Node: Extension Version String997139 -Node: Input Parsers997802 -Node: Output Wrappers1010523 -Node: Two-way processors1015035 -Node: Printing Messages1017300 -Ref: Printing Messages-Footnote-11018471 -Node: Updating ERRNO1018624 -Node: Requesting Values1019363 -Ref: table-value-types-returned1020100 -Node: Accessing Parameters1021036 -Node: Symbol Table Access1022271 -Node: Symbol table by name1022783 -Node: Symbol table by cookie1024572 -Ref: Symbol table by cookie-Footnote-11028757 -Node: Cached values1028821 -Ref: Cached values-Footnote-11032357 -Node: Array Manipulation1032510 -Ref: Array Manipulation-Footnote-11033601 -Node: Array Data Types1033638 -Ref: Array Data Types-Footnote-11036296 -Node: Array Functions1036388 -Node: Flattening Arrays1040886 -Node: Creating Arrays1047862 -Node: Redirection API1052629 -Node: Extension API Variables1055462 -Node: Extension Versioning1056173 -Ref: gawk-api-version1056602 -Node: Extension GMP/MPFR Versioning1058333 -Node: Extension API Informational Variables1059961 -Node: Extension API Boilerplate1061034 -Node: Changes from API V11065008 -Node: Finding Extensions1066580 -Node: Extension Example1067139 -Node: Internal File Description1067937 -Node: Internal File Ops1072017 -Ref: Internal File Ops-Footnote-11083367 -Node: Using Internal File Ops1083507 -Ref: Using Internal File Ops-Footnote-11085890 -Node: Extension Samples1086164 -Node: Extension Sample File Functions1087693 -Node: Extension Sample Fnmatch1095342 -Node: Extension Sample Fork1096829 -Node: Extension Sample Inplace1098047 -Node: Extension Sample Ord1101264 -Node: Extension Sample Readdir1102100 -Ref: table-readdir-file-types1102989 -Node: Extension Sample Revout1103794 -Node: Extension Sample Rev2way1104383 -Node: Extension Sample Read write array1105123 -Node: Extension Sample Readfile1107065 -Node: Extension Sample Time1108160 -Node: Extension Sample API Tests1109508 -Node: gawkextlib1110000 -Node: Extension summary1112918 -Node: Extension Exercises1116620 -Node: Language History1118118 -Node: V7/SVR3.11119774 -Node: SVR41121926 -Node: POSIX1123360 -Node: BTL1124740 -Node: POSIX/GNU1125469 -Node: Feature History1131247 -Node: Common Extensions1147106 -Node: Ranges and Locales1148389 -Ref: Ranges and Locales-Footnote-11153005 -Ref: Ranges and Locales-Footnote-21153032 -Ref: Ranges and Locales-Footnote-31153267 -Node: Contributors1153488 -Node: History summary1159433 -Node: Installation1160813 -Node: Gawk Distribution1161757 -Node: Getting1162241 -Node: Extracting1163204 -Node: Distribution contents1164842 -Node: Unix Installation1171322 -Node: Quick Installation1172004 -Node: Shell Startup Files1174418 -Node: Additional Configuration Options1175507 -Node: Configuration Philosophy1177672 -Node: Non-Unix Installation1180041 -Node: PC Installation1180501 -Node: PC Binary Installation1181339 -Node: PC Compiling1181774 -Node: PC Using1182891 -Node: Cygwin1186106 -Node: MSYS1187205 -Node: VMS Installation1187706 -Node: VMS Compilation1188497 -Ref: VMS Compilation-Footnote-11189726 -Node: VMS Dynamic Extensions1189784 -Node: VMS Installation Details1191469 -Node: VMS Running1193722 -Node: VMS GNV1198001 -Node: VMS Old Gawk1198736 -Node: Bugs1199207 -Node: Bug address1199870 -Node: Usenet1202852 -Node: Maintainers1203856 -Node: Other Versions1205117 -Node: Installation summary1211675 -Node: Notes1212877 -Node: Compatibility Mode1213671 -Node: Additions1214453 -Node: Accessing The Source1215378 -Node: Adding Code1216815 -Node: New Ports1223034 -Node: Derived Files1227522 -Ref: Derived Files-Footnote-11233168 -Ref: Derived Files-Footnote-21233203 -Ref: Derived Files-Footnote-31233801 -Node: Future Extensions1233915 -Node: Implementation Limitations1234573 -Node: Extension Design1235756 -Node: Old Extension Problems1236900 -Ref: Old Extension Problems-Footnote-11238418 -Node: Extension New Mechanism Goals1238475 -Ref: Extension New Mechanism Goals-Footnote-11241839 -Node: Extension Other Design Decisions1242028 -Node: Extension Future Growth1244141 -Node: Notes summary1244977 -Node: Basic Concepts1246152 -Node: Basic High Level1246833 -Ref: figure-general-flow1247115 -Ref: figure-process-flow1247800 -Ref: Basic High Level-Footnote-11251101 -Node: Basic Data Typing1251286 -Node: Glossary1254614 -Node: Copying1286452 -Node: GNU Free Documentation License1323995 -Node: Index1349115 +Node: Conversion353287 +Node: Strings And Numbers353811 +Ref: Strings And Numbers-Footnote-1356874 +Node: Locale influences conversions356983 +Ref: table-locale-affects359741 +Node: All Operators360359 +Node: Arithmetic Ops360988 +Node: Concatenation363494 +Ref: Concatenation-Footnote-1366341 +Node: Assignment Ops366448 +Ref: table-assign-ops371439 +Node: Increment Ops372752 +Node: Truth Values and Conditions376212 +Node: Truth Values377286 +Node: Typing and Comparison378334 +Node: Variable Typing379154 +Ref: Variable Typing-Footnote-1385617 +Ref: Variable Typing-Footnote-2385689 +Node: Comparison Operators385766 +Ref: table-relational-ops386185 +Node: POSIX String Comparison389680 +Ref: POSIX String Comparison-Footnote-1391375 +Ref: POSIX String Comparison-Footnote-2391514 +Node: Boolean Ops391598 +Ref: Boolean Ops-Footnote-1396080 +Node: Conditional Exp396172 +Node: Function Calls397908 +Node: Precedence401785 +Node: Locales405444 +Node: Expressions Summary407076 +Node: Patterns and Actions409649 +Node: Pattern Overview410769 +Node: Regexp Patterns412446 +Node: Expression Patterns412988 +Node: Ranges416769 +Node: BEGIN/END419877 +Node: Using BEGIN/END420638 +Ref: Using BEGIN/END-Footnote-1423374 +Node: I/O And BEGIN/END423480 +Node: BEGINFILE/ENDFILE425794 +Node: Empty428707 +Node: Using Shell Variables429024 +Node: Action Overview431298 +Node: Statements433623 +Node: If Statement435471 +Node: While Statement436966 +Node: Do Statement438994 +Node: For Statement440142 +Node: Switch Statement443313 +Node: Break Statement445699 +Node: Continue Statement447791 +Node: Next Statement449618 +Node: Nextfile Statement452001 +Node: Exit Statement454653 +Node: Built-in Variables457056 +Node: User-modified458189 +Node: Auto-set465956 +Ref: Auto-set-Footnote-1482258 +Ref: Auto-set-Footnote-2482464 +Node: ARGC and ARGV482520 +Node: Pattern Action Summary486733 +Node: Arrays489163 +Node: Array Basics490492 +Node: Array Intro491336 +Ref: figure-array-elements493311 +Ref: Array Intro-Footnote-1496015 +Node: Reference to Elements496143 +Node: Assigning Elements498607 +Node: Array Example499098 +Node: Scanning an Array500857 +Node: Controlling Scanning503879 +Ref: Controlling Scanning-Footnote-1509278 +Node: Numeric Array Subscripts509594 +Node: Uninitialized Subscripts511778 +Node: Delete513397 +Ref: Delete-Footnote-1516149 +Node: Multidimensional516206 +Node: Multiscanning519301 +Node: Arrays of Arrays520892 +Node: Arrays Summary525660 +Node: Functions527753 +Node: Built-in528791 +Node: Calling Built-in529872 +Node: Numeric Functions531868 +Ref: Numeric Functions-Footnote-1535896 +Ref: Numeric Functions-Footnote-2536253 +Ref: Numeric Functions-Footnote-3536301 +Node: String Functions536573 +Ref: String Functions-Footnote-1560282 +Ref: String Functions-Footnote-2560410 +Ref: String Functions-Footnote-3560658 +Node: Gory Details560745 +Ref: table-sub-escapes562536 +Ref: table-sub-proposed564055 +Ref: table-posix-sub565418 +Ref: table-gensub-escapes566959 +Ref: Gory Details-Footnote-1567782 +Node: I/O Functions567936 +Ref: table-system-return-values574404 +Ref: I/O Functions-Footnote-1576484 +Ref: I/O Functions-Footnote-2576632 +Node: Time Functions576752 +Ref: Time Functions-Footnote-1587423 +Ref: Time Functions-Footnote-2587491 +Ref: Time Functions-Footnote-3587649 +Ref: Time Functions-Footnote-4587760 +Ref: Time Functions-Footnote-5587872 +Ref: Time Functions-Footnote-6588099 +Node: Bitwise Functions588365 +Ref: table-bitwise-ops588959 +Ref: Bitwise Functions-Footnote-1595022 +Ref: Bitwise Functions-Footnote-2595195 +Node: Type Functions595386 +Node: I18N Functions598137 +Node: User-defined599788 +Node: Definition Syntax600593 +Ref: Definition Syntax-Footnote-1606280 +Node: Function Example606351 +Ref: Function Example-Footnote-1609273 +Node: Function Caveats609295 +Node: Calling A Function609813 +Node: Variable Scope610771 +Node: Pass By Value/Reference613765 +Node: Return Statement617264 +Node: Dynamic Typing620243 +Node: Indirect Calls621173 +Ref: Indirect Calls-Footnote-1631425 +Node: Functions Summary631553 +Node: Library Functions634258 +Ref: Library Functions-Footnote-1637865 +Ref: Library Functions-Footnote-2638008 +Node: Library Names638179 +Ref: Library Names-Footnote-1641639 +Ref: Library Names-Footnote-2641862 +Node: General Functions641948 +Node: Strtonum Function643051 +Node: Assert Function646073 +Node: Round Function649399 +Node: Cliff Random Function650939 +Node: Ordinal Functions651955 +Ref: Ordinal Functions-Footnote-1655018 +Ref: Ordinal Functions-Footnote-2655270 +Node: Join Function655480 +Ref: Join Function-Footnote-1657250 +Node: Getlocaltime Function657450 +Node: Readfile Function661192 +Node: Shell Quoting663169 +Node: Data File Management664570 +Node: Filetrans Function665202 +Node: Rewind Function669298 +Node: File Checking671208 +Ref: File Checking-Footnote-1672542 +Node: Empty Files672743 +Node: Ignoring Assigns674722 +Node: Getopt Function676272 +Ref: Getopt Function-Footnote-1687741 +Node: Passwd Functions687941 +Ref: Passwd Functions-Footnote-1696780 +Node: Group Functions696868 +Ref: Group Functions-Footnote-1704766 +Node: Walking Arrays704973 +Node: Library Functions Summary707981 +Node: Library Exercises709387 +Node: Sample Programs709852 +Node: Running Examples710622 +Node: Clones711350 +Node: Cut Program712574 +Node: Egrep Program722503 +Ref: Egrep Program-Footnote-1730015 +Node: Id Program730125 +Node: Split Program733805 +Ref: Split Program-Footnote-1737263 +Node: Tee Program737392 +Node: Uniq Program740182 +Node: Wc Program747608 +Ref: Wc Program-Footnote-1751863 +Node: Miscellaneous Programs751957 +Node: Dupword Program753170 +Node: Alarm Program755200 +Node: Translate Program760055 +Ref: Translate Program-Footnote-1764620 +Node: Labels Program764890 +Ref: Labels Program-Footnote-1768241 +Node: Word Sorting768325 +Node: History Sorting772397 +Node: Extract Program774232 +Node: Simple Sed782286 +Node: Igawk Program785360 +Ref: Igawk Program-Footnote-1799691 +Ref: Igawk Program-Footnote-2799893 +Ref: Igawk Program-Footnote-3800015 +Node: Anagram Program800130 +Node: Signature Program803192 +Node: Programs Summary804439 +Node: Programs Exercises805653 +Ref: Programs Exercises-Footnote-1809782 +Node: Advanced Features809873 +Node: Nondecimal Data811863 +Node: Array Sorting813454 +Node: Controlling Array Traversal814154 +Ref: Controlling Array Traversal-Footnote-1822522 +Node: Array Sorting Functions822640 +Ref: Array Sorting Functions-Footnote-1827731 +Node: Two-way I/O827927 +Ref: Two-way I/O-Footnote-1835647 +Ref: Two-way I/O-Footnote-2835834 +Node: TCP/IP Networking835916 +Node: Profiling839034 +Node: Advanced Features Summary848039 +Node: Internationalization849883 +Node: I18N and L10N851363 +Node: Explaining gettext852050 +Ref: Explaining gettext-Footnote-1857942 +Ref: Explaining gettext-Footnote-2858127 +Node: Programmer i18n858292 +Ref: Programmer i18n-Footnote-1863241 +Node: Translator i18n863290 +Node: String Extraction864084 +Ref: String Extraction-Footnote-1865216 +Node: Printf Ordering865302 +Ref: Printf Ordering-Footnote-1868088 +Node: I18N Portability868152 +Ref: I18N Portability-Footnote-1870608 +Node: I18N Example870671 +Ref: I18N Example-Footnote-1873477 +Node: Gawk I18N873550 +Node: I18N Summary874195 +Node: Debugger875536 +Node: Debugging876559 +Node: Debugging Concepts877000 +Node: Debugging Terms878809 +Node: Awk Debugging881384 +Node: Sample Debugging Session882290 +Node: Debugger Invocation882824 +Node: Finding The Bug884210 +Node: List of Debugger Commands890688 +Node: Breakpoint Control892021 +Node: Debugger Execution Control895715 +Node: Viewing And Changing Data899077 +Node: Execution Stack902451 +Node: Debugger Info904088 +Node: Miscellaneous Debugger Commands908159 +Node: Readline Support913221 +Node: Limitations914117 +Node: Debugging Summary916226 +Node: Arbitrary Precision Arithmetic917505 +Node: Computer Arithmetic918990 +Ref: table-numeric-ranges922756 +Ref: table-floating-point-ranges923249 +Ref: Computer Arithmetic-Footnote-1923907 +Node: Math Definitions923964 +Ref: table-ieee-formats927280 +Ref: Math Definitions-Footnote-1927883 +Node: MPFR features927988 +Node: FP Math Caution929706 +Ref: FP Math Caution-Footnote-1930778 +Node: Inexactness of computations931147 +Node: Inexact representation932107 +Node: Comparing FP Values933467 +Node: Errors accumulate934708 +Node: Getting Accuracy936141 +Node: Try To Round938851 +Node: Setting precision939750 +Ref: table-predefined-precision-strings940447 +Node: Setting the rounding mode942277 +Ref: table-gawk-rounding-modes942651 +Ref: Setting the rounding mode-Footnote-1946582 +Node: Arbitrary Precision Integers946761 +Ref: Arbitrary Precision Integers-Footnote-1949936 +Node: Checking for MPFR950085 +Node: POSIX Floating Point Problems951559 +Ref: POSIX Floating Point Problems-Footnote-1955844 +Node: Floating point summary955882 +Node: Dynamic Extensions958072 +Node: Extension Intro959625 +Node: Plugin License960891 +Node: Extension Mechanism Outline961688 +Ref: figure-load-extension962127 +Ref: figure-register-new-function963692 +Ref: figure-call-new-function964784 +Node: Extension API Description966846 +Node: Extension API Functions Introduction968488 +Node: General Data Types974028 +Ref: General Data Types-Footnote-1982389 +Node: Memory Allocation Functions982688 +Ref: Memory Allocation Functions-Footnote-1986898 +Node: Constructor Functions986997 +Node: Registration Functions990583 +Node: Extension Functions991268 +Node: Exit Callback Functions996483 +Node: Extension Version String997733 +Node: Input Parsers998396 +Node: Output Wrappers1011117 +Node: Two-way processors1015629 +Node: Printing Messages1017894 +Ref: Printing Messages-Footnote-11019065 +Node: Updating ERRNO1019218 +Node: Requesting Values1019957 +Ref: table-value-types-returned1020694 +Node: Accessing Parameters1021630 +Node: Symbol Table Access1022865 +Node: Symbol table by name1023377 +Node: Symbol table by cookie1025166 +Ref: Symbol table by cookie-Footnote-11029351 +Node: Cached values1029415 +Ref: Cached values-Footnote-11032951 +Node: Array Manipulation1033104 +Ref: Array Manipulation-Footnote-11034195 +Node: Array Data Types1034232 +Ref: Array Data Types-Footnote-11036890 +Node: Array Functions1036982 +Node: Flattening Arrays1041480 +Node: Creating Arrays1048456 +Node: Redirection API1053223 +Node: Extension API Variables1056056 +Node: Extension Versioning1056767 +Ref: gawk-api-version1057196 +Node: Extension GMP/MPFR Versioning1058927 +Node: Extension API Informational Variables1060555 +Node: Extension API Boilerplate1061628 +Node: Changes from API V11065602 +Node: Finding Extensions1067174 +Node: Extension Example1067733 +Node: Internal File Description1068531 +Node: Internal File Ops1072611 +Ref: Internal File Ops-Footnote-11083961 +Node: Using Internal File Ops1084101 +Ref: Using Internal File Ops-Footnote-11086484 +Node: Extension Samples1086758 +Node: Extension Sample File Functions1088287 +Node: Extension Sample Fnmatch1095936 +Node: Extension Sample Fork1097423 +Node: Extension Sample Inplace1098641 +Node: Extension Sample Ord1101858 +Node: Extension Sample Readdir1102694 +Ref: table-readdir-file-types1103583 +Node: Extension Sample Revout1104388 +Node: Extension Sample Rev2way1104977 +Node: Extension Sample Read write array1105717 +Node: Extension Sample Readfile1107659 +Node: Extension Sample Time1108754 +Node: Extension Sample API Tests1110102 +Node: gawkextlib1110594 +Node: Extension summary1113512 +Node: Extension Exercises1117214 +Node: Language History1118712 +Node: V7/SVR3.11120368 +Node: SVR41122520 +Node: POSIX1123954 +Node: BTL1125334 +Node: POSIX/GNU1126063 +Node: Feature History1131841 +Node: Common Extensions1147700 +Node: Ranges and Locales1148983 +Ref: Ranges and Locales-Footnote-11153599 +Ref: Ranges and Locales-Footnote-21153626 +Ref: Ranges and Locales-Footnote-31153861 +Node: Contributors1154082 +Node: History summary1160027 +Node: Installation1161407 +Node: Gawk Distribution1162351 +Node: Getting1162835 +Node: Extracting1163798 +Node: Distribution contents1165436 +Node: Unix Installation1171916 +Node: Quick Installation1172598 +Node: Shell Startup Files1175012 +Node: Additional Configuration Options1176101 +Node: Configuration Philosophy1178266 +Node: Non-Unix Installation1180635 +Node: PC Installation1181095 +Node: PC Binary Installation1181933 +Node: PC Compiling1182368 +Node: PC Using1183485 +Node: Cygwin1186700 +Node: MSYS1187799 +Node: VMS Installation1188300 +Node: VMS Compilation1189091 +Ref: VMS Compilation-Footnote-11190320 +Node: VMS Dynamic Extensions1190378 +Node: VMS Installation Details1192063 +Node: VMS Running1194316 +Node: VMS GNV1198595 +Node: VMS Old Gawk1199330 +Node: Bugs1199801 +Node: Bug address1200464 +Node: Usenet1203446 +Node: Maintainers1204450 +Node: Other Versions1205711 +Node: Installation summary1212269 +Node: Notes1213471 +Node: Compatibility Mode1214265 +Node: Additions1215047 +Node: Accessing The Source1215972 +Node: Adding Code1217409 +Node: New Ports1223628 +Node: Derived Files1228116 +Ref: Derived Files-Footnote-11233762 +Ref: Derived Files-Footnote-21233797 +Ref: Derived Files-Footnote-31234395 +Node: Future Extensions1234509 +Node: Implementation Limitations1235167 +Node: Extension Design1236350 +Node: Old Extension Problems1237494 +Ref: Old Extension Problems-Footnote-11239012 +Node: Extension New Mechanism Goals1239069 +Ref: Extension New Mechanism Goals-Footnote-11242433 +Node: Extension Other Design Decisions1242622 +Node: Extension Future Growth1244735 +Node: Notes summary1245571 +Node: Basic Concepts1246746 +Node: Basic High Level1247427 +Ref: figure-general-flow1247709 +Ref: figure-process-flow1248394 +Ref: Basic High Level-Footnote-11251695 +Node: Basic Data Typing1251880 +Node: Glossary1255208 +Node: Copying1287046 +Node: GNU Free Documentation License1324589 +Node: Index1349709 End Tag Table diff --git a/doc/gawk.texi b/doc/gawk.texi index 68a03042..22358d1e 100644 --- a/doc/gawk.texi +++ b/doc/gawk.texi @@ -11566,6 +11566,22 @@ sequences (@pxref{Escape Sequences}). @value{DARKCORNER} +Normally, variables assigned on the command line (with or without the +@option{-v} option) are treated as strings. When such variables are +used as numbers, @command{awk}'s normal automatic conversion of strings +to numbers takes place, and everything ``just works.'' + +However, @command{gawk} supports variables whose types are ``regexp''. +You can assign variables of this type using the following syntax: + +@example +gawk -v 're1=@/foo|bar/' '@dots{}' /path/to/file1 're2=@/baz|quux/' /path/to/file2 +@end example + +@noindent +Strongly typed regexps are an advanced feature (@pxref{Strong Regexp Constants}). +We mention them here only for completeness. + @node Conversion @subsection Conversion of Strings and Numbers diff --git a/doc/gawktexi.in b/doc/gawktexi.in index df86a60b..3484cde2 100644 --- a/doc/gawktexi.in +++ b/doc/gawktexi.in @@ -11023,6 +11023,22 @@ sequences (@pxref{Escape Sequences}). @value{DARKCORNER} +Normally, variables assigned on the command line (with or without the +@option{-v} option) are treated as strings. When such variables are +used as numbers, @command{awk}'s normal automatic conversion of strings +to numbers takes place, and everything ``just works.'' + +However, @command{gawk} supports variables whose types are ``regexp''. +You can assign variables of this type using the following syntax: + +@example +gawk -v 're1=@/foo|bar/' '@dots{}' /path/to/file1 're2=@/baz|quux/' /path/to/file2 +@end example + +@noindent +Strongly typed regexps are an advanced feature (@pxref{Strong Regexp Constants}). +We mention them here only for completeness. + @node Conversion @subsection Conversion of Strings and Numbers @@ -1155,15 +1155,34 @@ arg_assign(char *arg, bool initing) if (do_lint) lintwarn(_("`%s' is not a variable name, looking for file `%s=%s'"), arg, arg, cp); - } else { - if (check_special(arg) >= 0) - fatal(_("cannot use gawk builtin `%s' as variable name"), arg); - if (! initing) { - var = lookup(arg); - if (var != NULL && var->type == Node_func) - fatal(_("cannot use function `%s' as variable name"), arg); - } + goto done; + } + + // Assigning a string or typed regex + + if (check_special(arg) >= 0) + fatal(_("cannot use gawk builtin `%s' as variable name"), arg); + + if (! initing) { + var = lookup(arg); + if (var != NULL && var->type == Node_func) + fatal(_("cannot use function `%s' as variable name"), arg); + } + + cp2 = cp + strlen(cp) - 1; // end char + if (! do_traditional + && cp[0] == '@' && cp[1] == '/' && *cp2 == '/') { + // typed regex + size_t len = strlen(cp) - 3; + + ezalloc(cp2, char *, len + 1, "arg_assign"); + memcpy(cp2, cp + 2, len); + + it = make_typed_regex(cp2, len); + // fall through to variable setup + } else { + // string assignment // POSIX disallows any newlines inside strings // The scanner handles that for program files. @@ -1190,28 +1209,30 @@ arg_assign(char *arg, bool initing) if (do_posix) setlocale(LC_NUMERIC, locale); #endif /* LC_NUMERIC */ + } - /* - * since we are restoring the original text of ARGV later, - * need to copy the variable name part if we don't want - * name like v=abc instead of just v in var->vname - */ + /* + * since we are restoring the original text of ARGV later, + * need to copy the variable name part if we don't want + * name like v=abc instead of just v in var->vname + */ - cp2 = estrdup(arg, cp - arg); /* var name */ - - var = variable(0, cp2, Node_var); - if (var == NULL) /* error */ - final_exit(EXIT_FATAL); - if (var->type == Node_var && var->var_update) - var->var_update(); - lhs = get_lhs(var, false); - unref(*lhs); - *lhs = it; - /* check for set_FOO() routine */ - if (var->type == Node_var && var->var_assign) - var->var_assign(); - } + cp2 = estrdup(arg, cp - arg); /* var name */ + + var = variable(0, cp2, Node_var); + if (var == NULL) /* error */ + final_exit(EXIT_FATAL); + + if (var->type == Node_var && var->var_update) + var->var_update(); + lhs = get_lhs(var, false); + unref(*lhs); + *lhs = it; + /* check for set_FOO() routine */ + if (var->type == Node_var && var->var_assign) + var->var_assign(); +done: if (! initing) *--cp = '='; /* restore original text of ARGV */ FNR = save_FNR; diff --git a/po/ChangeLog b/po/ChangeLog index f1738074..28c9f461 100644 --- a/po/ChangeLog +++ b/po/ChangeLog @@ -1,3 +1,7 @@ +2018-11-24 Arnold D. Robbins <arnold@skeeve.com> + + * it.po: Updated. + 2018-09-16 gettextize <bug-gnu-gettext@gnu.org> * Makefile.in.in: Upgrade to gettext-0.19.8.1. @@ -1,13 +1,13 @@ # Italian messages for GNU Awk -# Copyright (C) 2002-2017 Free Software Foundation, Inc. +# Copyright (C) 2002-2018 Free Software Foundation, Inc. # Antonio Colombo <azc100@gmail.com>. # msgid "" msgstr "" "Project-Id-Version: GNU Awk 4.2.1, API: 2.0\n" "Report-Msgid-Bugs-To: bug-gawk@gnu.org\n" -"POT-Creation-Date: 2018-11-17 21:53+0200\n" -"PO-Revision-Date: 2018-01-30 20:00+0100\n" +"POT-Creation-Date: 2018-11-19 10:14+0100\n" +"PO-Revision-Date: 2018-11-19 11:32+0100\n" "Last-Translator: Antonio Colombo <azc100@gmail.com>\n" "Language-Team: Italian <it@li.org>\n" "Language: it\n" @@ -185,7 +185,7 @@ msgstr "`pipeline' multistadio bidirezionali non funzionano" #: awkgram.y:1300 msgid "concatenation as I/O `>' redirection target is ambiguous" -msgstr "" +msgstr "concatenazione in I/O `>' destinazione della ridirezione ambigua" #: awkgram.y:1460 msgid "regular expression on right of assignment" @@ -218,7 +218,7 @@ msgstr "il vecchio awk non supporta vettori multidimensionali" #: awkgram.y:1759 msgid "call of `length' without parentheses is not portable" -msgstr "chiamata a `length' senza parentesi non portabile" +msgstr "chiamata a `length' senza parentesi non-portabile" #: awkgram.y:1833 msgid "indirect function calls are a gawk extension" @@ -347,11 +347,11 @@ msgstr "espressione regolare non completata a fine file" #: awkgram.y:3608 msgid "use of `\\ #...' line continuation is not portable" -msgstr "uso di `\\ #...' continuazione riga non portabile" +msgstr "uso di `\\ #...' continuazione riga non-portabile" #: awkgram.y:3628 msgid "backslash not last character on line" -msgstr "'\\' non è l'ultimo carattere della riga" +msgstr "la barra inversa non è l'ultimo carattere della riga" #: awkgram.y:3666 awkgram.y:3668 msgid "multidimensional arrays are a gawk extension" @@ -359,7 +359,7 @@ msgstr "i vettori multidimensionali sono un'estensione gawk" #: awkgram.y:3693 msgid "POSIX does not allow operator `**='" -msgstr "POSIX non permette l'operatore `**='" +msgstr "POSIX non consente l'operatore `**='" #: awkgram.y:3695 msgid "old awk does not support operator `**='" @@ -367,7 +367,7 @@ msgstr "il vecchio awk non supporta l'operatore `**='" #: awkgram.y:3704 msgid "POSIX does not allow operator `**'" -msgstr "POSIX non permette l'operatore `**'" +msgstr "POSIX non consente l'operatore `**'" #: awkgram.y:3706 msgid "old awk does not support operator `**'" @@ -386,14 +386,14 @@ msgid "unterminated string" msgstr "stringa non terminata" #: awkgram.y:3856 main.c:1172 -#, fuzzy msgid "POSIX does not allow physical newlines in string values" -msgstr "POSIX non permette escape `\\x'" +msgstr "" +"POSIX non consente dei caratteri di ritorno a capo nei valori assegnati a " +"una stringa" #: awkgram.y:3858 node.c:453 -#, fuzzy msgid "backslash string continuation is not portable" -msgstr "uso di `\\ #...' continuazione riga non portabile" +msgstr "uso di barra inversa per continuazione stringa non-portabile" #: awkgram.y:4089 #, c-format @@ -408,7 +408,7 @@ msgstr "`%s' è un'estensione gawk" #: awkgram.y:4168 #, c-format msgid "POSIX does not allow `%s'" -msgstr "POSIX non permette `%s'" +msgstr "POSIX non consente `%s'" #: awkgram.y:4176 #, c-format @@ -416,9 +416,8 @@ msgid "`%s' is not supported in old awk" msgstr "`%s' non è supportato nel vecchio awk" #: awkgram.y:4266 -#, fuzzy msgid "`goto' considered harmful!" -msgstr "`goto' considerato pericoloso!\n" +msgstr "`goto' considerato pericoloso!" #: awkgram.y:4335 #, c-format @@ -507,24 +506,24 @@ msgstr "" msgid "function `%s': parameter #%d, `%s', duplicates parameter #%d" msgstr "funzione `%s': parametro #%d, `%s', duplica parametro #%d" -#: awkgram.y:4929 awkgram.y:4935 +#: awkgram.y:4932 #, c-format msgid "function `%s' called but never defined" msgstr "funzione `%s' chiamata ma mai definita" -#: awkgram.y:4939 +#: awkgram.y:4936 #, c-format msgid "function `%s' defined but never called directly" msgstr "funzione `%s' definita ma mai chiamata direttamente" -#: awkgram.y:4971 +#: awkgram.y:4968 #, 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:4986 +#: awkgram.y:4983 #, c-format msgid "" "function `%s' called with space between name and `(',\n" @@ -533,23 +532,23 @@ msgstr "" "funzione `%s' chiamata con spazio tra il nome e `(',\n" "o usata come variabile o vettore" -#: awkgram.y:5201 +#: awkgram.y:5198 msgid "division by zero attempted" msgstr "tentativo di dividere per zero" -#: awkgram.y:5210 +#: awkgram.y:5207 #, c-format msgid "division by zero attempted in `%%'" msgstr "tentativo di dividere per zero in `%%'" -#: awkgram.y:5536 +#: awkgram.y:5533 msgid "" "cannot assign a value to the result of a field post-increment expression" msgstr "" "impossibile assegnare un valore al risultato di un'espressione di post-" "incremento di un campo" -#: awkgram.y:5539 +#: awkgram.y:5536 #, c-format msgid "invalid target of assignment (opcode %s)" msgstr "destinazione di assegnazione non valida (codice operativo %s)" @@ -720,14 +719,14 @@ msgid "[s]printf: value %g is out of range for `%%%c' format" msgstr "[s]printf: valore %g fuori intervallo per il formato `%%%c'" #: builtin.c:1504 -#, fuzzy, c-format +#, c-format msgid "[s]printf: value %s is out of range for `%%%c' format" -msgstr "[s]printf: valore %g fuori intervallo per il formato `%%%c'" +msgstr "[s]printf: valore %s fuori intervallo per il formato `%%%c'" #: builtin.c:1529 #, c-format msgid "%%%c format is POSIX standard but not portable to other awks" -msgstr "" +msgstr "il formato %%%c è nello standard POSIX ma non-portabile ad altri awk" #: builtin.c:1629 #, c-format @@ -2077,26 +2076,24 @@ msgid "load_ext: received NULL lib_name" msgstr "load_ext: il nome libreria ricevuto è NULL" #: ext.c:60 -#, fuzzy, c-format +#, c-format msgid "load_ext: cannot open library `%s' (%s)" -msgstr "load_ext: non riesco ad aprire libreria `%s' (%s)\n" +msgstr "load_ext: non riesco ad aprire libreria `%s' (%s)" #: ext.c:66 -#, fuzzy, c-format +#, c-format msgid "load_ext: library `%s': does not define `plugin_is_GPL_compatible' (%s)" -msgstr "" -"load_ext: libreria `%s': non definisce `plugin_is_GPL_compatible' (%s)\n" +msgstr "load_ext: libreria `%s': non definisce `plugin_is_GPL_compatible' (%s)" #: ext.c:72 -#, fuzzy, c-format +#, c-format msgid "load_ext: library `%s': cannot call function `%s' (%s)" -msgstr "load_ext: libreria `%s': non riesco a chiamare funzione `%s' (%s)\n" +msgstr "load_ext: libreria `%s': non riesco a chiamare funzione `%s' (%s)" #: ext.c:76 -#, fuzzy, c-format +#, c-format msgid "load_ext: library `%s' initialization routine `%s' failed" -msgstr "" -"load_ext: libreria `%s' routine di inizializzazione `%s' non riuscita\n" +msgstr "load_ext: libreria `%s' routine di inizializzazione `%s' non riuscita" #: ext.c:110 msgid "make_builtin: missing function name" @@ -2151,65 +2148,65 @@ msgstr "stat: non riesco a leggere il link simbolico `%s'" msgid "stat: bad parameters" msgstr "stat: parametri errati" -#: extension/filefuncs.c:584 +#: extension/filefuncs.c:585 #, c-format msgid "fts init: could not create variable %s" msgstr "ftp init: non riesco a creare variabile %s" -#: extension/filefuncs.c:605 +#: extension/filefuncs.c:606 msgid "fts is not supported on this system" msgstr "fts non disponibile su questo sistema" -#: extension/filefuncs.c:624 +#: extension/filefuncs.c:625 msgid "fill_stat_element: could not create array" msgstr "fill_stat_element: non riesco a creare vettore" -#: extension/filefuncs.c:633 +#: extension/filefuncs.c:634 msgid "fill_stat_element: could not set element" msgstr "fill_stat_element: non riesco a impostare elemento" -#: extension/filefuncs.c:648 +#: extension/filefuncs.c:649 msgid "fill_path_element: could not set element" msgstr "fill_path_element: non riesco a impostare elemento" -#: extension/filefuncs.c:664 +#: extension/filefuncs.c:665 msgid "fill_error_element: could not set element" msgstr "fill_error_element: non riesco a impostare elemento" -#: extension/filefuncs.c:711 extension/filefuncs.c:758 +#: extension/filefuncs.c:717 extension/filefuncs.c:764 msgid "fts-process: could not create array" msgstr "fts-process: non riesco a creare vettore" -#: extension/filefuncs.c:721 extension/filefuncs.c:768 -#: extension/filefuncs.c:786 +#: extension/filefuncs.c:727 extension/filefuncs.c:774 +#: extension/filefuncs.c:792 msgid "fts-process: could not set element" msgstr "fts-process: non riesco a impostare elemento" -#: extension/filefuncs.c:835 +#: extension/filefuncs.c:841 msgid "fts: called with incorrect number of arguments, expecting 3" msgstr "fts: chiamata con numero di argomenti errato, 3 previsti" -#: extension/filefuncs.c:838 +#: extension/filefuncs.c:844 msgid "fts: bad first parameter" msgstr "fts: primo parametro errato" -#: extension/filefuncs.c:844 +#: extension/filefuncs.c:850 msgid "fts: bad second parameter" msgstr "fts: secondo parametro errato" -#: extension/filefuncs.c:850 +#: extension/filefuncs.c:856 msgid "fts: bad third parameter" msgstr "fts: terzo parametro errato" -#: extension/filefuncs.c:857 +#: extension/filefuncs.c:863 msgid "fts: could not flatten array\n" msgstr "fts: non sono riuscito a appiattire un vettore\n" -#: extension/filefuncs.c:875 +#: extension/filefuncs.c:881 msgid "fts: ignoring sneaky FTS_NOSTAT flag. nyah, nyah, nyah." msgstr "fts: ignoro flag infido FTS_NOSTAT. nooo, nooo, nooo." -#: extension/filefuncs.c:891 +#: extension/filefuncs.c:897 msgid "fts: clear_array() failed\n" msgstr "fts: clear_array() non riuscita\n" @@ -2438,11 +2435,11 @@ msgstr "NF impostato a un valore negativo" #: field.c:403 msgid "decrementing NF is not portable to many awk versions" -msgstr "" +msgstr "diminuire NF è non-portabile a molte versioni awk" #: field.c:847 msgid "accessing fields from an END rule may not be portable" -msgstr "" +msgstr "utilizzare campi da una regola END può essere non-portabile" #: field.c:981 field.c:988 msgid "split: fourth argument is a gawk extension" @@ -2474,9 +2471,8 @@ msgstr "" "quarto argomento" #: field.c:1041 -#, fuzzy msgid "split: null string for third arg is a non-standard extension" -msgstr "split: la stringa nulla come terzo arg. è un'estensione gawk" +msgstr "split: la stringa nulla come terzo arg. è un'estensione non-standard" #: field.c:1078 msgid "patsplit: fourth argument is not an array" @@ -2584,16 +2580,16 @@ msgid "remove_element: received null subscript" msgstr "remove_element: ricevuto indice nullo" #: gawkapi.c:1207 -#, fuzzy, c-format +#, c-format msgid "api_flatten_array_typed: could not convert index %d to %s" msgstr "" -"api_flatten_array_typed: non sono riuscito a convertire l'indice %d a %s\n" +"api_flatten_array_typed: non sono riuscito a convertire l'indice %d a %s" #: gawkapi.c:1212 -#, fuzzy, c-format +#, c-format msgid "api_flatten_array_typed: could not convert value %d to %s" msgstr "" -"api_flatten_array_typed: non sono riuscito a convertire il valore %d a %s\n" +"api_flatten_array_typed: non sono riuscito a convertire il valore %d a %s" #: gawkapi.c:1308 gawkapi.c:1324 msgid "api_get_mpfr: MPFR not supported" @@ -2868,14 +2864,12 @@ msgstr "" "passaggio di `pipe' a `stdin' nel processo-figlio non riuscito (dup: %s)" #: io.c:2386 io.c:2655 -#, fuzzy msgid "restoring stdout in parent process failed" -msgstr "ripristino di `stdout' nel processo-padre non riuscito\n" +msgstr "ripristino di `stdout' nel processo-padre non riuscito" #: io.c:2394 -#, fuzzy msgid "restoring stdin in parent process failed" -msgstr "ripristino di `stdin' nel processo-padre non riuscito\n" +msgstr "ripristino di `stdin' nel processo-padre non riuscito" #: io.c:2429 io.c:2667 io.c:2682 #, c-format @@ -3144,13 +3138,12 @@ msgid "\t-W nostalgia\t\t--nostalgia\n" msgstr "\t-W nostalgia\t\t--nostalgia\n" #: main.c:615 -#, fuzzy msgid "\t-Y\t\t\t--parsedebug\n" -msgstr "\t-Y\t\t--parsedebug\n" +msgstr "\t-Y\t\t\t--parsedebug\n" #: main.c:618 msgid "\t-Z locale-name\t\t--locale=locale-name\n" -msgstr "" +msgstr "\t-Z locale-name\t\t--locale=locale-name\n" #. TRANSLATORS: --help output 5 (end) #. TRANSLATORS: the placeholder indicates the bug-reporting address @@ -3377,15 +3370,15 @@ msgstr "non sono riuscito a creare una `typed regex'" #: node.c:555 #, c-format msgid "old awk does not support the `\\%c' escape sequence" -msgstr "il vecchio awk non supporta la sequenza di escape '\\%c'" +msgstr "il vecchio awk non supporta la sequenza di protezione '\\%c'" #: node.c:606 msgid "POSIX does not allow `\\x' escapes" -msgstr "POSIX non permette escape `\\x'" +msgstr "POSIX non consente escape `\\x'" #: node.c:612 msgid "no hex digits in `\\x' escape sequence" -msgstr "niente cifre esadecimali nella sequenza di escape `\\x'" +msgstr "niente cifre esadecimali nella sequenza di protezione `\\x'" #: node.c:633 #, c-format @@ -3399,7 +3392,7 @@ msgstr "" #: node.c:648 #, c-format msgid "escape sequence `\\%c' treated as plain `%c'" -msgstr "sequenza di escape `\\%c' considerata come semplice `%c'" +msgstr "sequenza di protezione `\\%c' considerata come semplice `%c'" #: node.c:784 msgid "" @@ -3489,20 +3482,24 @@ msgid "" "behavior of matching a regexp containing NUL characters is not defined by " "POSIX" msgstr "" +"la regola per la corrispondenza di un'espressione regolare che contiene dei " +"caratteri NUL non è definita in POSIX" #: re.c:125 msgid "invalid NUL byte in dynamic regexp" -msgstr "" +msgstr "byte NUL non valido un'espressione regolare dinamica" #: re.c:172 -#, fuzzy, c-format +#, c-format msgid "regexp escape sequence `\\%c' treated as plain `%c'" -msgstr "sequenza di escape `\\%c' considerata come semplice `%c'" +msgstr "la sequenza di protezione `\\%c' considerata come semplice `%c'" #: re.c:191 #, c-format msgid "regexp escape sequence `\\%c' is not a known regexp operator" msgstr "" +"la sequenza di protezione `\\%c' non è un operatore noto per un'espressione " +"regolare" #: re.c:650 #, c-format @@ -3683,9 +3680,3 @@ msgstr "" #: symbol.c:817 msgid "can not pop main context" msgstr "non posso salire più in alto nello stack" - -#~ msgid "backslash at end of string" -#~ msgstr "'\\' a fine stringa" - -#~ msgid "`isarray' is deprecated. Use `typeof' instead" -#~ msgstr "`isarray' è una funzione deprecata. Usare `typeof' al suo posto" diff --git a/test/ChangeLog b/test/ChangeLog index f5d33346..918d695b 100644 --- a/test/ChangeLog +++ b/test/ChangeLog @@ -1,3 +1,14 @@ +2018-11-24 Arnold D. Robbins <arnold@skeeve.com> + + * spacere.awk: Move setting of LC_ALL=C out to ... + * Makefile.am (spacere): ... here. Added test. + Per request from Eli Zaretskii to help porting to MinGW. + + Unrelated: + + * Makefile.am (EXTRA_DIST): New test: typedregex4. + * typedregex4.awk, typedregex4.ok: New files. + 2018-11-11 Arnold D. Robbins <arnold@skeeve.com> * profile10.ok: Updated after code change. diff --git a/test/Makefile.am b/test/Makefile.am index 171a7620..aa7e6fce 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -1176,6 +1176,8 @@ EXTRA_DIST = \ typedregex2.ok \ typedregex3.awk \ typedregex3.ok \ + typedregex4.awk \ + typedregex4.ok \ typeof1.awk \ typeof1.ok \ typeof2.awk \ @@ -1311,7 +1313,8 @@ GAWK_EXT_TESTS = \ shadow shadowbuiltin sortfor sortfor2 sortu sourcesplit split_after_fpat \ splitarg4 strftime strftfld strtonum strtonum1 switch2 symtab1 symtab2 \ symtab3 symtab4 symtab5 symtab6 symtab7 symtab8 symtab9 symtab10 \ - typedregex1 typedregex2 typedregex3 typeof1 typeof2 typeof3 typeof4 \ + typedregex1 typedregex2 typedregex3 typedregex4 \ + typeof1 typeof2 typeof3 typeof4 \ typeof5 timeout \ watchpoint1 @@ -2215,6 +2218,16 @@ longwrds: @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ +spacere: + @echo $@ + @LC_ALL=C AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ + +typedregex4: + @echo $@ + @$(AWK) -v x=@/foo/ -f "$(srcdir)"/$@.awk y=@/bar/ /dev/null >_$@ 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 74e8b3d2..ccab8144 100644 --- a/test/Makefile.in +++ b/test/Makefile.in @@ -1569,7 +1569,8 @@ GAWK_EXT_TESTS = \ shadow shadowbuiltin sortfor sortfor2 sortu sourcesplit split_after_fpat \ splitarg4 strftime strftfld strtonum strtonum1 switch2 symtab1 symtab2 \ symtab3 symtab4 symtab5 symtab6 symtab7 symtab8 symtab9 symtab10 \ - typedregex1 typedregex2 typedregex3 typeof1 typeof2 typeof3 typeof4 \ + typedregex1 typedregex2 typedregex3 typedregex4 \ + typeof1 typeof2 typeof3 typeof4 \ typeof5 timeout \ watchpoint1 @@ -2658,6 +2659,16 @@ longwrds: @echo $@ @AWKPATH="$(srcdir)" $(AWK) -f $@.awk -v SORT="$(SORT)" < "$(srcdir)"/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ + +spacere: + @echo $@ + @LC_ALL=C AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ + +typedregex4: + @echo $@ + @$(AWK) -v x=@/foo/ -f "$(srcdir)"/$@.awk y=@/bar/ /dev/null >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ Gt-dummy: # file Maketests, generated from Makefile.am by the Gentests program addcomma: @@ -3661,11 +3672,6 @@ sortglos: @AWKPATH="$(srcdir)" $(AWK) -f $@.awk < "$(srcdir)"/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ -spacere: - @echo $@ - @AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ - @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ - splitargv: @echo $@ @AWKPATH="$(srcdir)" $(AWK) -f $@.awk < "$(srcdir)"/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ diff --git a/test/Maketests b/test/Maketests index fd6a2713..65f0197c 100644 --- a/test/Maketests +++ b/test/Maketests @@ -1001,11 +1001,6 @@ sortglos: @AWKPATH="$(srcdir)" $(AWK) -f $@.awk < "$(srcdir)"/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ -spacere: - @echo $@ - @AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ - @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ - splitargv: @echo $@ @AWKPATH="$(srcdir)" $(AWK) -f $@.awk < "$(srcdir)"/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ diff --git a/test/spacere.awk b/test/spacere.awk index 6aa87d2e..ba959309 100644 --- a/test/spacere.awk +++ b/test/spacere.awk @@ -8,7 +8,7 @@ BEGIN { c["\t"] = "\\t" c["\v"] = "\\v" - sort = "LC_ALL=C sort" + sort = "sort" for (i in c) printf("%s %s [[:space:]]\n", c[i], diff --git a/test/typedregex4.awk b/test/typedregex4.awk new file mode 100644 index 00000000..8e866c34 --- /dev/null +++ b/test/typedregex4.awk @@ -0,0 +1,7 @@ +BEGIN { + print "typeof(x) =", typeof(x) +} + +END { + print "typeof(y) =", typeof(y) +} diff --git a/test/typedregex4.ok b/test/typedregex4.ok new file mode 100644 index 00000000..6656b61f --- /dev/null +++ b/test/typedregex4.ok @@ -0,0 +1,2 @@ +typeof(x) = regexp +typeof(y) = regexp |