diff options
author | Arnold D. Robbins <arnold@skeeve.com> | 2014-08-26 21:35:37 +0300 |
---|---|---|
committer | Arnold D. Robbins <arnold@skeeve.com> | 2014-08-26 21:35:37 +0300 |
commit | 3a2e4e1b409d87ade30d3ad2976695235347f13b (patch) | |
tree | a556b87c9bbfbb2fb8522493ed2d9ed92c99691f | |
parent | 12e05615041147de61658bda8f5e7d5a4acd87c3 (diff) | |
parent | a5847cb0a97b093cd0f23b65c72370af836c9748 (diff) | |
download | egawk-3a2e4e1b409d87ade30d3ad2976695235347f13b.tar.gz egawk-3a2e4e1b409d87ade30d3ad2976695235347f13b.tar.bz2 egawk-3a2e4e1b409d87ade30d3ad2976695235347f13b.zip |
Merge branch 'gawk-4.1-stable'
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | doc/ChangeLog | 6 | ||||
-rw-r--r-- | doc/gawk.info | 1108 | ||||
-rw-r--r-- | doc/gawk.texi | 44 | ||||
-rw-r--r-- | doc/gawktexi.in | 44 | ||||
-rw-r--r-- | regcomp.c | 13 | ||||
-rw-r--r-- | regex_internal.c | 9 |
7 files changed, 598 insertions, 630 deletions
@@ -1,5 +1,9 @@ 2014-08-26 Arnold D. Robbins <arnold@skeeve.com> + * regcomp.c, regex_internal.c: Sync with GBLIC. Why not. + + Unrelated: + Remove support for MirBSD. It uglified the code too much for no discernable gain. diff --git a/doc/ChangeLog b/doc/ChangeLog index ddd2280e..b6a13dc7 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -1,5 +1,11 @@ 2014-08-26 Arnold D. Robbins <arnold@skeeve.com> + * gawktexi.in: Use a different mechanism to exclude + exercises. Remove use of LC_ALL in an example; doesn't seem + to be needed anymore. + + Unrelated: + * gawktexi.in: Document that MirBSD is no longer supported. 2014-08-25 Arnold D. Robbins <arnold@skeeve.com> diff --git a/doc/gawk.info b/doc/gawk.info index ef7847df..514965f4 100644 --- a/doc/gawk.info +++ b/doc/gawk.info @@ -219,7 +219,6 @@ entitled "GNU Free Documentation License". * Command-line directories:: What happens if you put a directory on the command line. * Input Summary:: Input summary. - * Input Exercises:: Exercises. * Print:: The `print' statement. * Print Examples:: Simple examples of `print' @@ -245,7 +244,6 @@ entitled "GNU Free Documentation License". * Close Files And Pipes:: Closing Input and Output Files and Pipes. * Output Summary:: Output summary. - * Output Exercises:: Exercises. * Values:: Constants, Variables, and Regular Expressions. @@ -433,7 +431,6 @@ entitled "GNU Free Documentation License". information. * Walking Arrays:: A function to walk arrays of arrays. * Library Functions Summary:: Summary of library functions. - * Library Exercises:: Exercises. * Running Examples:: How to run these examples. * Clones:: Clones of common utilities. @@ -465,7 +462,6 @@ entitled "GNU Free Documentation License". * Signature Program:: People do amazing things with too much time on their hands. * Programs Summary:: Summary of programs. - * Programs Exercises:: Exercises. * Nondecimal Data:: Allowing nondecimal input data. * Array Sorting:: Facilities for controlling array @@ -588,7 +584,6 @@ entitled "GNU Free Documentation License". and `sleep()'. * gawkextlib:: The `gawkextlib' project. * Extension summary:: Extension summary. - * Extension Exercises:: Exercises. * V7/SVR3.1:: The major changes between V7 and System V Release 3.1. @@ -2047,8 +2042,8 @@ summarize, select, and rearrange the output of another utility. It uses features that haven't been covered yet, so don't worry if you don't understand all the details: - LC_ALL=C ls -l | awk '$6 == "Nov" { sum += $5 } - END { print sum }' + ls -l | awk '$6 == "Nov" { sum += $5 } + END { print sum }' This command prints the total number of bytes in all the files in the current directory that were last modified in November (of any year). @@ -4079,7 +4074,6 @@ have to be named on the `awk' command line (*note Getline::). * Command-line directories:: What happens if you put a directory on the command line. * Input Summary:: Input summary. - * Input Exercises:: Exercises. @@ -6020,7 +6014,6 @@ function. descriptors. * Close Files And Pipes:: Closing Input and Output Files and Pipes. * Output Summary:: Output summary. - * Output Exercises:: Exercises. @@ -14268,7 +14261,6 @@ for different implementations of `awk' is pretty straightforward. * Group Functions:: Functions for getting group information. * Walking Arrays:: A function to walk arrays of arrays. * Library Functions Summary:: Summary of library functions. - * Library Exercises:: Exercises. ---------- Footnotes ---------- @@ -16111,7 +16103,6 @@ Library Functions::. * Clones:: Clones of common utilities. * Miscellaneous Programs:: Some interesting `awk' programs. * Programs Summary:: Summary of programs. - * Programs Exercises:: Exercises. @@ -22337,7 +22328,6 @@ sample extensions are automatically built and installed when `gawk' is. `gawk'. * gawkextlib:: The `gawkextlib' project. * Extension summary:: Extension summary. - * Extension Exercises:: Exercises. @@ -34029,552 +34019,552 @@ Index Tag Table: Node: Top1204 -Node: Foreword41863 -Node: Preface46208 -Ref: Preface-Footnote-149231 -Ref: Preface-Footnote-249338 -Node: History49570 -Node: Names51944 -Ref: Names-Footnote-153038 -Node: This Manual53184 -Ref: This Manual-Footnote-158963 -Node: Conventions59063 -Node: Manual History61408 -Ref: Manual History-Footnote-164484 -Ref: Manual History-Footnote-264525 -Node: How To Contribute64599 -Node: Acknowledgments65838 -Node: Getting Started70586 -Node: Running gawk73020 -Node: One-shot74210 -Node: Read Terminal75435 -Ref: Read Terminal-Footnote-177398 -Node: Long77569 -Node: Executable Scripts78963 -Ref: Executable Scripts-Footnote-181764 -Node: Comments81866 -Node: Quoting84339 -Node: DOS Quoting89652 -Node: Sample Data Files90327 -Node: Very Simple92934 -Node: Two Rules97693 -Node: More Complex99587 -Ref: More Complex-Footnote-1102519 -Node: Statements/Lines102604 -Ref: Statements/Lines-Footnote-1107060 -Node: Other Features107325 -Node: When108253 -Ref: When-Footnote-1110009 -Node: Intro Summary110074 -Node: Invoking Gawk110957 -Node: Command Line112472 -Node: Options113263 -Ref: Options-Footnote-1128910 -Node: Other Arguments128935 -Node: Naming Standard Input131597 -Node: Environment Variables132690 -Node: AWKPATH Variable133248 -Ref: AWKPATH Variable-Footnote-1136114 -Ref: AWKPATH Variable-Footnote-2136159 -Node: AWKLIBPATH Variable136419 -Node: Other Environment Variables137178 -Node: Exit Status140630 -Node: Include Files141305 -Node: Loading Shared Libraries144883 -Node: Obsolete146267 -Node: Undocumented146964 -Node: Invoking Summary147231 -Node: Regexp148831 -Node: Regexp Usage150290 -Node: Escape Sequences152323 -Node: Regexp Operators158223 -Ref: Regexp Operators-Footnote-1165654 -Ref: Regexp Operators-Footnote-2165801 -Node: Bracket Expressions165899 -Ref: table-char-classes167921 -Node: GNU Regexp Operators170861 -Node: Case-sensitivity174570 -Ref: Case-sensitivity-Footnote-1177462 -Ref: Case-sensitivity-Footnote-2177697 -Node: Leftmost Longest177805 -Node: Computed Regexps179006 -Node: Regexp Summary182378 -Node: Reading Files183847 -Node: Records185940 -Node: awk split records186662 -Node: gawk split records191520 -Ref: gawk split records-Footnote-1196041 -Node: Fields196078 -Ref: Fields-Footnote-1199042 -Node: Nonconstant Fields199128 -Ref: Nonconstant Fields-Footnote-1201358 -Node: Changing Fields201560 -Node: Field Separators207514 -Node: Default Field Splitting210216 -Node: Regexp Field Splitting211333 -Node: Single Character Fields214660 -Node: Command Line Field Separator215719 -Node: Full Line Fields219145 -Ref: Full Line Fields-Footnote-1219653 -Node: Field Splitting Summary219699 -Ref: Field Splitting Summary-Footnote-1222831 -Node: Constant Size222932 -Node: Splitting By Content227538 -Ref: Splitting By Content-Footnote-1231611 -Node: Multiple Line231651 -Ref: Multiple Line-Footnote-1237507 -Node: Getline237686 -Node: Plain Getline239897 -Node: Getline/Variable241992 -Node: Getline/File243139 -Node: Getline/Variable/File244523 -Ref: Getline/Variable/File-Footnote-1246122 -Node: Getline/Pipe246209 -Node: Getline/Variable/Pipe248895 -Node: Getline/Coprocess250002 -Node: Getline/Variable/Coprocess251254 -Node: Getline Notes251991 -Node: Getline Summary254795 -Ref: table-getline-variants255203 -Node: Read Timeout256115 -Ref: Read Timeout-Footnote-1259942 -Node: Command-line directories260000 -Node: Input Summary260904 -Node: Input Exercises264041 -Node: Printing264774 -Node: Print266497 -Node: Print Examples267990 -Node: Output Separators270769 -Node: OFMT272785 -Node: Printf274143 -Node: Basic Printf275049 -Node: Control Letters276588 -Node: Format Modifiers280579 -Node: Printf Examples286606 -Node: Redirection289070 -Node: Special Files296042 -Node: Special FD296575 -Ref: Special FD-Footnote-1300172 -Node: Special Network300246 -Node: Special Caveats301096 -Node: Close Files And Pipes301892 -Ref: Close Files And Pipes-Footnote-1309053 -Ref: Close Files And Pipes-Footnote-2309201 -Node: Output Summary309351 -Node: Output Exercises310348 -Node: Expressions311028 -Node: Values312213 -Node: Constants312889 -Node: Scalar Constants313569 -Ref: Scalar Constants-Footnote-1314428 -Node: Nondecimal-numbers314678 -Node: Regexp Constants317678 -Node: Using Constant Regexps318153 -Node: Variables321225 -Node: Using Variables321880 -Node: Assignment Options323604 -Node: Conversion325479 -Node: Strings And Numbers326003 -Ref: Strings And Numbers-Footnote-1329065 -Node: Locale influences conversions329174 -Ref: table-locale-affects331891 -Node: All Operators332479 -Node: Arithmetic Ops333109 -Node: Concatenation335614 -Ref: Concatenation-Footnote-1338433 -Node: Assignment Ops338539 -Ref: table-assign-ops343522 -Node: Increment Ops344825 -Node: Truth Values and Conditions348263 -Node: Truth Values349346 -Node: Typing and Comparison350395 -Node: Variable Typing351188 -Node: Comparison Operators354840 -Ref: table-relational-ops355250 -Node: POSIX String Comparison358800 -Ref: POSIX String Comparison-Footnote-1359884 -Node: Boolean Ops360022 -Ref: Boolean Ops-Footnote-1364097 -Node: Conditional Exp364188 -Node: Function Calls365915 -Node: Precedence369795 -Node: Locales373464 -Node: Expressions Summary375095 -Node: Patterns and Actions377636 -Node: Pattern Overview378752 -Node: Regexp Patterns380429 -Node: Expression Patterns380972 -Node: Ranges384752 -Node: BEGIN/END387858 -Node: Using BEGIN/END388620 -Ref: Using BEGIN/END-Footnote-1391356 -Node: I/O And BEGIN/END391462 -Node: BEGINFILE/ENDFILE393733 -Node: Empty396664 -Node: Using Shell Variables396981 -Node: Action Overview399264 -Node: Statements401591 -Node: If Statement403439 -Node: While Statement404937 -Node: Do Statement406981 -Node: For Statement408137 -Node: Switch Statement411289 -Node: Break Statement413677 -Node: Continue Statement415718 -Node: Next Statement417543 -Node: Nextfile Statement419933 -Node: Exit Statement422569 -Node: Built-in Variables424973 -Node: User-modified426100 -Ref: User-modified-Footnote-1433789 -Node: Auto-set433851 -Ref: Auto-set-Footnote-1446770 -Ref: Auto-set-Footnote-2446975 -Node: ARGC and ARGV447031 -Node: Pattern Action Summary450935 -Node: Arrays453158 -Node: Array Basics454707 -Node: Array Intro455533 -Ref: figure-array-elements457506 -Ref: Array Intro-Footnote-1460030 -Node: Reference to Elements460158 -Node: Assigning Elements462608 -Node: Array Example463099 -Node: Scanning an Array464831 -Node: Controlling Scanning467832 -Ref: Controlling Scanning-Footnote-1473005 -Node: Delete473321 -Ref: Delete-Footnote-1476072 -Node: Numeric Array Subscripts476129 -Node: Uninitialized Subscripts478312 -Node: Multidimensional479937 -Node: Multiscanning483050 -Node: Arrays of Arrays484639 -Node: Arrays Summary489302 -Node: Functions491407 -Node: Built-in492280 -Node: Calling Built-in493358 -Node: Numeric Functions495346 -Ref: Numeric Functions-Footnote-1500182 -Ref: Numeric Functions-Footnote-2500539 -Ref: Numeric Functions-Footnote-3500587 -Node: String Functions500856 -Ref: String Functions-Footnote-1523853 -Ref: String Functions-Footnote-2523982 -Ref: String Functions-Footnote-3524230 -Node: Gory Details524317 -Ref: table-sub-escapes526090 -Ref: table-sub-proposed527610 -Ref: table-posix-sub528974 -Ref: table-gensub-escapes530514 -Ref: Gory Details-Footnote-1531690 -Node: I/O Functions531841 -Ref: I/O Functions-Footnote-1538951 -Node: Time Functions539098 -Ref: Time Functions-Footnote-1549562 -Ref: Time Functions-Footnote-2549630 -Ref: Time Functions-Footnote-3549788 -Ref: Time Functions-Footnote-4549899 -Ref: Time Functions-Footnote-5550011 -Ref: Time Functions-Footnote-6550238 -Node: Bitwise Functions550504 -Ref: table-bitwise-ops551066 -Ref: Bitwise Functions-Footnote-1555311 -Node: Type Functions555495 -Node: I18N Functions556637 -Node: User-defined558282 -Node: Definition Syntax559086 -Ref: Definition Syntax-Footnote-1564399 -Node: Function Example564468 -Ref: Function Example-Footnote-1567108 -Node: Function Caveats567130 -Node: Calling A Function567648 -Node: Variable Scope568603 -Node: Pass By Value/Reference571591 -Node: Return Statement575101 -Node: Dynamic Typing578085 -Node: Indirect Calls579014 -Node: Functions Summary588727 -Node: Library Functions591266 -Ref: Library Functions-Footnote-1594885 -Ref: Library Functions-Footnote-2595028 -Node: Library Names595199 -Ref: Library Names-Footnote-1598672 -Ref: Library Names-Footnote-2598892 -Node: General Functions598978 -Node: Strtonum Function600006 -Node: Assert Function602786 -Node: Round Function606112 -Node: Cliff Random Function607653 -Node: Ordinal Functions608669 -Ref: Ordinal Functions-Footnote-1611734 -Ref: Ordinal Functions-Footnote-2611986 -Node: Join Function612197 -Ref: Join Function-Footnote-1613968 -Node: Getlocaltime Function614168 -Node: Readfile Function617904 -Node: Data File Management619743 -Node: Filetrans Function620375 -Node: Rewind Function624444 -Node: File Checking626002 -Ref: File Checking-Footnote-1627134 -Node: Empty Files627335 -Node: Ignoring Assigns629314 -Node: Getopt Function630868 -Ref: Getopt Function-Footnote-1642171 -Node: Passwd Functions642374 -Ref: Passwd Functions-Footnote-1651353 -Node: Group Functions651441 -Ref: Group Functions-Footnote-1659372 -Node: Walking Arrays659585 -Node: Library Functions Summary661188 -Node: Library Exercises662576 -Node: Sample Programs663856 -Node: Running Examples664627 -Node: Clones665355 -Node: Cut Program666579 -Node: Egrep Program676437 -Ref: Egrep Program-Footnote-1684024 -Node: Id Program684134 -Node: Split Program687788 -Ref: Split Program-Footnote-1691326 -Node: Tee Program691454 -Node: Uniq Program694241 -Node: Wc Program701662 -Ref: Wc Program-Footnote-1705927 -Node: Miscellaneous Programs706019 -Node: Dupword Program707232 -Node: Alarm Program709263 -Node: Translate Program714067 -Ref: Translate Program-Footnote-1718458 -Ref: Translate Program-Footnote-2718728 -Node: Labels Program718862 -Ref: Labels Program-Footnote-1722223 -Node: Word Sorting722307 -Node: History Sorting726350 -Node: Extract Program728186 -Node: Simple Sed735722 -Node: Igawk Program738784 -Ref: Igawk Program-Footnote-1753088 -Ref: Igawk Program-Footnote-2753289 -Node: Anagram Program753427 -Node: Signature Program756495 -Node: Programs Summary757742 -Node: Programs Exercises758957 -Node: Advanced Features762608 -Node: Nondecimal Data764556 -Node: Array Sorting766133 -Node: Controlling Array Traversal766830 -Node: Array Sorting Functions775110 -Ref: Array Sorting Functions-Footnote-1779017 -Node: Two-way I/O779211 -Ref: Two-way I/O-Footnote-1784155 -Ref: Two-way I/O-Footnote-2784334 -Node: TCP/IP Networking784416 -Node: Profiling787261 -Node: Advanced Features Summary794812 -Node: Internationalization796676 -Node: I18N and L10N798156 -Node: Explaining gettext798842 -Ref: Explaining gettext-Footnote-1803868 -Ref: Explaining gettext-Footnote-2804052 -Node: Programmer i18n804217 -Ref: Programmer i18n-Footnote-1809011 -Node: Translator i18n809060 -Node: String Extraction809854 -Ref: String Extraction-Footnote-1810987 -Node: Printf Ordering811073 -Ref: Printf Ordering-Footnote-1813855 -Node: I18N Portability813919 -Ref: I18N Portability-Footnote-1816368 -Node: I18N Example816431 -Ref: I18N Example-Footnote-1819137 -Node: Gawk I18N819209 -Node: I18N Summary819847 -Node: Debugger821186 -Node: Debugging822208 -Node: Debugging Concepts822649 -Node: Debugging Terms824505 -Node: Awk Debugging827102 -Node: Sample Debugging Session827994 -Node: Debugger Invocation828514 -Node: Finding The Bug829847 -Node: List of Debugger Commands836329 -Node: Breakpoint Control837661 -Node: Debugger Execution Control841325 -Node: Viewing And Changing Data844685 -Node: Execution Stack848043 -Node: Debugger Info849556 -Node: Miscellaneous Debugger Commands853550 -Node: Readline Support858734 -Node: Limitations859626 -Node: Debugging Summary861900 -Node: Arbitrary Precision Arithmetic863068 -Node: Computer Arithmetic864555 -Ref: Computer Arithmetic-Footnote-1868942 -Node: Math Definitions868999 -Ref: table-ieee-formats872288 -Ref: Math Definitions-Footnote-1872828 -Node: MPFR features872931 -Node: FP Math Caution874548 -Ref: FP Math Caution-Footnote-1875598 -Node: Inexactness of computations875967 -Node: Inexact representation876915 -Node: Comparing FP Values878270 -Node: Errors accumulate879234 -Node: Getting Accuracy880667 -Node: Try To Round883326 -Node: Setting precision884225 -Ref: table-predefined-precision-strings884907 -Node: Setting the rounding mode886700 -Ref: table-gawk-rounding-modes887064 -Ref: Setting the rounding mode-Footnote-1890518 -Node: Arbitrary Precision Integers890697 -Ref: Arbitrary Precision Integers-Footnote-1894470 -Node: POSIX Floating Point Problems894619 -Ref: POSIX Floating Point Problems-Footnote-1898495 -Node: Floating point summary898533 -Node: Dynamic Extensions900737 -Node: Extension Intro902290 -Node: Plugin License903555 -Node: Extension Mechanism Outline904240 -Ref: figure-load-extension904664 -Ref: figure-load-new-function906149 -Ref: figure-call-new-function907151 -Node: Extension API Description909135 -Node: Extension API Functions Introduction910585 -Node: General Data Types915452 -Ref: General Data Types-Footnote-1921145 -Node: Requesting Values921444 -Ref: table-value-types-returned922181 -Node: Memory Allocation Functions923139 -Ref: Memory Allocation Functions-Footnote-1925886 -Node: Constructor Functions925982 -Node: Registration Functions927740 -Node: Extension Functions928425 -Node: Exit Callback Functions930727 -Node: Extension Version String931975 -Node: Input Parsers932625 -Node: Output Wrappers942439 -Node: Two-way processors946955 -Node: Printing Messages949159 -Ref: Printing Messages-Footnote-1950236 -Node: Updating `ERRNO'950388 -Node: Accessing Parameters951127 -Node: Symbol Table Access952357 -Node: Symbol table by name952871 -Node: Symbol table by cookie954847 -Ref: Symbol table by cookie-Footnote-1958980 -Node: Cached values959043 -Ref: Cached values-Footnote-1962547 -Node: Array Manipulation962638 -Ref: Array Manipulation-Footnote-1963736 -Node: Array Data Types963775 -Ref: Array Data Types-Footnote-1966478 -Node: Array Functions966570 -Node: Flattening Arrays970444 -Node: Creating Arrays977296 -Node: Extension API Variables982027 -Node: Extension Versioning982663 -Node: Extension API Informational Variables984564 -Node: Extension API Boilerplate985650 -Node: Finding Extensions989454 -Node: Extension Example990014 -Node: Internal File Description990744 -Node: Internal File Ops994835 -Ref: Internal File Ops-Footnote-11006267 -Node: Using Internal File Ops1006407 -Ref: Using Internal File Ops-Footnote-11008754 -Node: Extension Samples1009022 -Node: Extension Sample File Functions1010546 -Node: Extension Sample Fnmatch1018114 -Node: Extension Sample Fork1019596 -Node: Extension Sample Inplace1020809 -Node: Extension Sample Ord1022484 -Node: Extension Sample Readdir1023320 -Ref: table-readdir-file-types1024176 -Node: Extension Sample Revout1024975 -Node: Extension Sample Rev2way1025566 -Node: Extension Sample Read write array1026307 -Node: Extension Sample Readfile1028186 -Node: Extension Sample API Tests1029286 -Node: Extension Sample Time1029811 -Node: gawkextlib1031126 -Node: Extension summary1033939 -Node: Extension Exercises1037632 -Node: Language History1038354 -Node: V7/SVR3.11039997 -Node: SVR41042317 -Node: POSIX1043759 -Node: BTL1045145 -Node: POSIX/GNU1045879 -Node: Feature History1051655 -Node: Common Extensions1064746 -Node: Ranges and Locales1066058 -Ref: Ranges and Locales-Footnote-11070675 -Ref: Ranges and Locales-Footnote-21070702 -Ref: Ranges and Locales-Footnote-31070936 -Node: Contributors1071157 -Node: History summary1076582 -Node: Installation1077951 -Node: Gawk Distribution1078902 -Node: Getting1079386 -Node: Extracting1080210 -Node: Distribution contents1081852 -Node: Unix Installation1087622 -Node: Quick Installation1088239 -Node: Additional Configuration Options1090681 -Node: Configuration Philosophy1092419 -Node: Non-Unix Installation1094770 -Node: PC Installation1095228 -Node: PC Binary Installation1096539 -Node: PC Compiling1098387 -Ref: PC Compiling-Footnote-11101386 -Node: PC Testing1101491 -Node: PC Using1102667 -Node: Cygwin1106819 -Node: MSYS1107628 -Node: VMS Installation1108142 -Node: VMS Compilation1108938 -Ref: VMS Compilation-Footnote-11110160 -Node: VMS Dynamic Extensions1110218 -Node: VMS Installation Details1111591 -Node: VMS Running1113843 -Node: VMS GNV1116677 -Node: VMS Old Gawk1117400 -Node: Bugs1117870 -Node: Other Versions1121874 -Node: Installation summary1128101 -Node: Notes1129157 -Node: Compatibility Mode1130022 -Node: Additions1130804 -Node: Accessing The Source1131729 -Node: Adding Code1133165 -Node: New Ports1139343 -Node: Derived Files1143824 -Ref: Derived Files-Footnote-11148905 -Ref: Derived Files-Footnote-21148939 -Ref: Derived Files-Footnote-31149535 -Node: Future Extensions1149649 -Node: Implementation Limitations1150255 -Node: Extension Design1151503 -Node: Old Extension Problems1152657 -Ref: Old Extension Problems-Footnote-11154174 -Node: Extension New Mechanism Goals1154231 -Ref: Extension New Mechanism Goals-Footnote-11157591 -Node: Extension Other Design Decisions1157780 -Node: Extension Future Growth1159886 -Node: Old Extension Mechanism1160722 -Node: Notes summary1162484 -Node: Basic Concepts1163670 -Node: Basic High Level1164351 -Ref: figure-general-flow1164623 -Ref: figure-process-flow1165222 -Ref: Basic High Level-Footnote-11168451 -Node: Basic Data Typing1168636 -Node: Glossary1171964 -Node: Copying1197116 -Node: GNU Free Documentation License1234672 -Node: Index1259808 +Node: Foreword41858 +Node: Preface46203 +Ref: Preface-Footnote-149226 +Ref: Preface-Footnote-249333 +Node: History49565 +Node: Names51939 +Ref: Names-Footnote-153033 +Node: This Manual53179 +Ref: This Manual-Footnote-158958 +Node: Conventions59058 +Node: Manual History61403 +Ref: Manual History-Footnote-164479 +Ref: Manual History-Footnote-264520 +Node: How To Contribute64594 +Node: Acknowledgments65833 +Node: Getting Started70581 +Node: Running gawk73015 +Node: One-shot74205 +Node: Read Terminal75430 +Ref: Read Terminal-Footnote-177393 +Node: Long77564 +Node: Executable Scripts78958 +Ref: Executable Scripts-Footnote-181759 +Node: Comments81861 +Node: Quoting84334 +Node: DOS Quoting89647 +Node: Sample Data Files90322 +Node: Very Simple92929 +Node: Two Rules97688 +Node: More Complex99582 +Ref: More Complex-Footnote-1102496 +Node: Statements/Lines102581 +Ref: Statements/Lines-Footnote-1107037 +Node: Other Features107302 +Node: When108230 +Ref: When-Footnote-1109986 +Node: Intro Summary110051 +Node: Invoking Gawk110934 +Node: Command Line112449 +Node: Options113240 +Ref: Options-Footnote-1128887 +Node: Other Arguments128912 +Node: Naming Standard Input131574 +Node: Environment Variables132667 +Node: AWKPATH Variable133225 +Ref: AWKPATH Variable-Footnote-1136091 +Ref: AWKPATH Variable-Footnote-2136136 +Node: AWKLIBPATH Variable136396 +Node: Other Environment Variables137155 +Node: Exit Status140607 +Node: Include Files141282 +Node: Loading Shared Libraries144860 +Node: Obsolete146244 +Node: Undocumented146941 +Node: Invoking Summary147208 +Node: Regexp148808 +Node: Regexp Usage150267 +Node: Escape Sequences152300 +Node: Regexp Operators158200 +Ref: Regexp Operators-Footnote-1165631 +Ref: Regexp Operators-Footnote-2165778 +Node: Bracket Expressions165876 +Ref: table-char-classes167898 +Node: GNU Regexp Operators170838 +Node: Case-sensitivity174547 +Ref: Case-sensitivity-Footnote-1177439 +Ref: Case-sensitivity-Footnote-2177674 +Node: Leftmost Longest177782 +Node: Computed Regexps178983 +Node: Regexp Summary182355 +Node: Reading Files183824 +Node: Records185916 +Node: awk split records186638 +Node: gawk split records191496 +Ref: gawk split records-Footnote-1196017 +Node: Fields196054 +Ref: Fields-Footnote-1199018 +Node: Nonconstant Fields199104 +Ref: Nonconstant Fields-Footnote-1201334 +Node: Changing Fields201536 +Node: Field Separators207490 +Node: Default Field Splitting210192 +Node: Regexp Field Splitting211309 +Node: Single Character Fields214636 +Node: Command Line Field Separator215695 +Node: Full Line Fields219121 +Ref: Full Line Fields-Footnote-1219629 +Node: Field Splitting Summary219675 +Ref: Field Splitting Summary-Footnote-1222807 +Node: Constant Size222908 +Node: Splitting By Content227514 +Ref: Splitting By Content-Footnote-1231587 +Node: Multiple Line231627 +Ref: Multiple Line-Footnote-1237483 +Node: Getline237662 +Node: Plain Getline239873 +Node: Getline/Variable241968 +Node: Getline/File243115 +Node: Getline/Variable/File244499 +Ref: Getline/Variable/File-Footnote-1246098 +Node: Getline/Pipe246185 +Node: Getline/Variable/Pipe248871 +Node: Getline/Coprocess249978 +Node: Getline/Variable/Coprocess251230 +Node: Getline Notes251967 +Node: Getline Summary254771 +Ref: table-getline-variants255179 +Node: Read Timeout256091 +Ref: Read Timeout-Footnote-1259918 +Node: Command-line directories259976 +Node: Input Summary260880 +Node: Input Exercises264017 +Node: Printing264750 +Node: Print266472 +Node: Print Examples267965 +Node: Output Separators270744 +Node: OFMT272760 +Node: Printf274118 +Node: Basic Printf275024 +Node: Control Letters276563 +Node: Format Modifiers280554 +Node: Printf Examples286581 +Node: Redirection289045 +Node: Special Files296017 +Node: Special FD296550 +Ref: Special FD-Footnote-1300147 +Node: Special Network300221 +Node: Special Caveats301071 +Node: Close Files And Pipes301867 +Ref: Close Files And Pipes-Footnote-1309028 +Ref: Close Files And Pipes-Footnote-2309176 +Node: Output Summary309326 +Node: Output Exercises310323 +Node: Expressions311003 +Node: Values312188 +Node: Constants312864 +Node: Scalar Constants313544 +Ref: Scalar Constants-Footnote-1314403 +Node: Nondecimal-numbers314653 +Node: Regexp Constants317653 +Node: Using Constant Regexps318128 +Node: Variables321200 +Node: Using Variables321855 +Node: Assignment Options323579 +Node: Conversion325454 +Node: Strings And Numbers325978 +Ref: Strings And Numbers-Footnote-1329040 +Node: Locale influences conversions329149 +Ref: table-locale-affects331866 +Node: All Operators332454 +Node: Arithmetic Ops333084 +Node: Concatenation335589 +Ref: Concatenation-Footnote-1338408 +Node: Assignment Ops338514 +Ref: table-assign-ops343497 +Node: Increment Ops344800 +Node: Truth Values and Conditions348238 +Node: Truth Values349321 +Node: Typing and Comparison350370 +Node: Variable Typing351163 +Node: Comparison Operators354815 +Ref: table-relational-ops355225 +Node: POSIX String Comparison358775 +Ref: POSIX String Comparison-Footnote-1359859 +Node: Boolean Ops359997 +Ref: Boolean Ops-Footnote-1364072 +Node: Conditional Exp364163 +Node: Function Calls365890 +Node: Precedence369770 +Node: Locales373439 +Node: Expressions Summary375070 +Node: Patterns and Actions377611 +Node: Pattern Overview378727 +Node: Regexp Patterns380404 +Node: Expression Patterns380947 +Node: Ranges384727 +Node: BEGIN/END387833 +Node: Using BEGIN/END388595 +Ref: Using BEGIN/END-Footnote-1391331 +Node: I/O And BEGIN/END391437 +Node: BEGINFILE/ENDFILE393708 +Node: Empty396639 +Node: Using Shell Variables396956 +Node: Action Overview399239 +Node: Statements401566 +Node: If Statement403414 +Node: While Statement404912 +Node: Do Statement406956 +Node: For Statement408112 +Node: Switch Statement411264 +Node: Break Statement413652 +Node: Continue Statement415693 +Node: Next Statement417518 +Node: Nextfile Statement419908 +Node: Exit Statement422544 +Node: Built-in Variables424948 +Node: User-modified426075 +Ref: User-modified-Footnote-1433764 +Node: Auto-set433826 +Ref: Auto-set-Footnote-1446745 +Ref: Auto-set-Footnote-2446950 +Node: ARGC and ARGV447006 +Node: Pattern Action Summary450910 +Node: Arrays453133 +Node: Array Basics454682 +Node: Array Intro455508 +Ref: figure-array-elements457481 +Ref: Array Intro-Footnote-1460005 +Node: Reference to Elements460133 +Node: Assigning Elements462583 +Node: Array Example463074 +Node: Scanning an Array464806 +Node: Controlling Scanning467807 +Ref: Controlling Scanning-Footnote-1472980 +Node: Delete473296 +Ref: Delete-Footnote-1476047 +Node: Numeric Array Subscripts476104 +Node: Uninitialized Subscripts478287 +Node: Multidimensional479912 +Node: Multiscanning483025 +Node: Arrays of Arrays484614 +Node: Arrays Summary489277 +Node: Functions491382 +Node: Built-in492255 +Node: Calling Built-in493333 +Node: Numeric Functions495321 +Ref: Numeric Functions-Footnote-1500157 +Ref: Numeric Functions-Footnote-2500514 +Ref: Numeric Functions-Footnote-3500562 +Node: String Functions500831 +Ref: String Functions-Footnote-1523828 +Ref: String Functions-Footnote-2523957 +Ref: String Functions-Footnote-3524205 +Node: Gory Details524292 +Ref: table-sub-escapes526065 +Ref: table-sub-proposed527585 +Ref: table-posix-sub528949 +Ref: table-gensub-escapes530489 +Ref: Gory Details-Footnote-1531665 +Node: I/O Functions531816 +Ref: I/O Functions-Footnote-1538926 +Node: Time Functions539073 +Ref: Time Functions-Footnote-1549537 +Ref: Time Functions-Footnote-2549605 +Ref: Time Functions-Footnote-3549763 +Ref: Time Functions-Footnote-4549874 +Ref: Time Functions-Footnote-5549986 +Ref: Time Functions-Footnote-6550213 +Node: Bitwise Functions550479 +Ref: table-bitwise-ops551041 +Ref: Bitwise Functions-Footnote-1555286 +Node: Type Functions555470 +Node: I18N Functions556612 +Node: User-defined558257 +Node: Definition Syntax559061 +Ref: Definition Syntax-Footnote-1564374 +Node: Function Example564443 +Ref: Function Example-Footnote-1567083 +Node: Function Caveats567105 +Node: Calling A Function567623 +Node: Variable Scope568578 +Node: Pass By Value/Reference571566 +Node: Return Statement575076 +Node: Dynamic Typing578060 +Node: Indirect Calls578989 +Node: Functions Summary588702 +Node: Library Functions591241 +Ref: Library Functions-Footnote-1594859 +Ref: Library Functions-Footnote-2595002 +Node: Library Names595173 +Ref: Library Names-Footnote-1598646 +Ref: Library Names-Footnote-2598866 +Node: General Functions598952 +Node: Strtonum Function599980 +Node: Assert Function602760 +Node: Round Function606086 +Node: Cliff Random Function607627 +Node: Ordinal Functions608643 +Ref: Ordinal Functions-Footnote-1611708 +Ref: Ordinal Functions-Footnote-2611960 +Node: Join Function612171 +Ref: Join Function-Footnote-1613942 +Node: Getlocaltime Function614142 +Node: Readfile Function617878 +Node: Data File Management619717 +Node: Filetrans Function620349 +Node: Rewind Function624418 +Node: File Checking625976 +Ref: File Checking-Footnote-1627108 +Node: Empty Files627309 +Node: Ignoring Assigns629288 +Node: Getopt Function630842 +Ref: Getopt Function-Footnote-1642145 +Node: Passwd Functions642348 +Ref: Passwd Functions-Footnote-1651327 +Node: Group Functions651415 +Ref: Group Functions-Footnote-1659346 +Node: Walking Arrays659559 +Node: Library Functions Summary661162 +Node: Library Exercises662550 +Node: Sample Programs663830 +Node: Running Examples664600 +Node: Clones665328 +Node: Cut Program666552 +Node: Egrep Program676410 +Ref: Egrep Program-Footnote-1683997 +Node: Id Program684107 +Node: Split Program687761 +Ref: Split Program-Footnote-1691299 +Node: Tee Program691427 +Node: Uniq Program694214 +Node: Wc Program701635 +Ref: Wc Program-Footnote-1705900 +Node: Miscellaneous Programs705992 +Node: Dupword Program707205 +Node: Alarm Program709236 +Node: Translate Program714040 +Ref: Translate Program-Footnote-1718431 +Ref: Translate Program-Footnote-2718701 +Node: Labels Program718835 +Ref: Labels Program-Footnote-1722196 +Node: Word Sorting722280 +Node: History Sorting726323 +Node: Extract Program728159 +Node: Simple Sed735695 +Node: Igawk Program738757 +Ref: Igawk Program-Footnote-1753061 +Ref: Igawk Program-Footnote-2753262 +Node: Anagram Program753400 +Node: Signature Program756468 +Node: Programs Summary757715 +Node: Programs Exercises758930 +Node: Advanced Features762581 +Node: Nondecimal Data764529 +Node: Array Sorting766106 +Node: Controlling Array Traversal766803 +Node: Array Sorting Functions775083 +Ref: Array Sorting Functions-Footnote-1778990 +Node: Two-way I/O779184 +Ref: Two-way I/O-Footnote-1784128 +Ref: Two-way I/O-Footnote-2784307 +Node: TCP/IP Networking784389 +Node: Profiling787234 +Node: Advanced Features Summary794785 +Node: Internationalization796649 +Node: I18N and L10N798129 +Node: Explaining gettext798815 +Ref: Explaining gettext-Footnote-1803841 +Ref: Explaining gettext-Footnote-2804025 +Node: Programmer i18n804190 +Ref: Programmer i18n-Footnote-1808984 +Node: Translator i18n809033 +Node: String Extraction809827 +Ref: String Extraction-Footnote-1810960 +Node: Printf Ordering811046 +Ref: Printf Ordering-Footnote-1813828 +Node: I18N Portability813892 +Ref: I18N Portability-Footnote-1816341 +Node: I18N Example816404 +Ref: I18N Example-Footnote-1819110 +Node: Gawk I18N819182 +Node: I18N Summary819820 +Node: Debugger821159 +Node: Debugging822181 +Node: Debugging Concepts822622 +Node: Debugging Terms824478 +Node: Awk Debugging827075 +Node: Sample Debugging Session827967 +Node: Debugger Invocation828487 +Node: Finding The Bug829820 +Node: List of Debugger Commands836302 +Node: Breakpoint Control837634 +Node: Debugger Execution Control841298 +Node: Viewing And Changing Data844658 +Node: Execution Stack848016 +Node: Debugger Info849529 +Node: Miscellaneous Debugger Commands853523 +Node: Readline Support858707 +Node: Limitations859599 +Node: Debugging Summary861873 +Node: Arbitrary Precision Arithmetic863041 +Node: Computer Arithmetic864528 +Ref: Computer Arithmetic-Footnote-1868915 +Node: Math Definitions868972 +Ref: table-ieee-formats872261 +Ref: Math Definitions-Footnote-1872801 +Node: MPFR features872904 +Node: FP Math Caution874521 +Ref: FP Math Caution-Footnote-1875571 +Node: Inexactness of computations875940 +Node: Inexact representation876888 +Node: Comparing FP Values878243 +Node: Errors accumulate879207 +Node: Getting Accuracy880640 +Node: Try To Round883299 +Node: Setting precision884198 +Ref: table-predefined-precision-strings884880 +Node: Setting the rounding mode886673 +Ref: table-gawk-rounding-modes887037 +Ref: Setting the rounding mode-Footnote-1890491 +Node: Arbitrary Precision Integers890670 +Ref: Arbitrary Precision Integers-Footnote-1894443 +Node: POSIX Floating Point Problems894592 +Ref: POSIX Floating Point Problems-Footnote-1898468 +Node: Floating point summary898506 +Node: Dynamic Extensions900710 +Node: Extension Intro902262 +Node: Plugin License903527 +Node: Extension Mechanism Outline904212 +Ref: figure-load-extension904636 +Ref: figure-load-new-function906121 +Ref: figure-call-new-function907123 +Node: Extension API Description909107 +Node: Extension API Functions Introduction910557 +Node: General Data Types915424 +Ref: General Data Types-Footnote-1921117 +Node: Requesting Values921416 +Ref: table-value-types-returned922153 +Node: Memory Allocation Functions923111 +Ref: Memory Allocation Functions-Footnote-1925858 +Node: Constructor Functions925954 +Node: Registration Functions927712 +Node: Extension Functions928397 +Node: Exit Callback Functions930699 +Node: Extension Version String931947 +Node: Input Parsers932597 +Node: Output Wrappers942411 +Node: Two-way processors946927 +Node: Printing Messages949131 +Ref: Printing Messages-Footnote-1950208 +Node: Updating `ERRNO'950360 +Node: Accessing Parameters951099 +Node: Symbol Table Access952329 +Node: Symbol table by name952843 +Node: Symbol table by cookie954819 +Ref: Symbol table by cookie-Footnote-1958952 +Node: Cached values959015 +Ref: Cached values-Footnote-1962519 +Node: Array Manipulation962610 +Ref: Array Manipulation-Footnote-1963708 +Node: Array Data Types963747 +Ref: Array Data Types-Footnote-1966450 +Node: Array Functions966542 +Node: Flattening Arrays970416 +Node: Creating Arrays977268 +Node: Extension API Variables981999 +Node: Extension Versioning982635 +Node: Extension API Informational Variables984536 +Node: Extension API Boilerplate985622 +Node: Finding Extensions989426 +Node: Extension Example989986 +Node: Internal File Description990716 +Node: Internal File Ops994807 +Ref: Internal File Ops-Footnote-11006239 +Node: Using Internal File Ops1006379 +Ref: Using Internal File Ops-Footnote-11008726 +Node: Extension Samples1008994 +Node: Extension Sample File Functions1010518 +Node: Extension Sample Fnmatch1018086 +Node: Extension Sample Fork1019568 +Node: Extension Sample Inplace1020781 +Node: Extension Sample Ord1022456 +Node: Extension Sample Readdir1023292 +Ref: table-readdir-file-types1024148 +Node: Extension Sample Revout1024947 +Node: Extension Sample Rev2way1025538 +Node: Extension Sample Read write array1026279 +Node: Extension Sample Readfile1028158 +Node: Extension Sample API Tests1029258 +Node: Extension Sample Time1029783 +Node: gawkextlib1031098 +Node: Extension summary1033911 +Node: Extension Exercises1037604 +Node: Language History1038326 +Node: V7/SVR3.11039969 +Node: SVR41042289 +Node: POSIX1043731 +Node: BTL1045117 +Node: POSIX/GNU1045851 +Node: Feature History1051627 +Node: Common Extensions1064718 +Node: Ranges and Locales1066030 +Ref: Ranges and Locales-Footnote-11070647 +Ref: Ranges and Locales-Footnote-21070674 +Ref: Ranges and Locales-Footnote-31070908 +Node: Contributors1071129 +Node: History summary1076554 +Node: Installation1077923 +Node: Gawk Distribution1078874 +Node: Getting1079358 +Node: Extracting1080182 +Node: Distribution contents1081824 +Node: Unix Installation1087594 +Node: Quick Installation1088211 +Node: Additional Configuration Options1090653 +Node: Configuration Philosophy1092391 +Node: Non-Unix Installation1094742 +Node: PC Installation1095200 +Node: PC Binary Installation1096511 +Node: PC Compiling1098359 +Ref: PC Compiling-Footnote-11101358 +Node: PC Testing1101463 +Node: PC Using1102639 +Node: Cygwin1106791 +Node: MSYS1107600 +Node: VMS Installation1108114 +Node: VMS Compilation1108910 +Ref: VMS Compilation-Footnote-11110132 +Node: VMS Dynamic Extensions1110190 +Node: VMS Installation Details1111563 +Node: VMS Running1113815 +Node: VMS GNV1116649 +Node: VMS Old Gawk1117372 +Node: Bugs1117842 +Node: Other Versions1121846 +Node: Installation summary1128073 +Node: Notes1129129 +Node: Compatibility Mode1129994 +Node: Additions1130776 +Node: Accessing The Source1131701 +Node: Adding Code1133137 +Node: New Ports1139315 +Node: Derived Files1143796 +Ref: Derived Files-Footnote-11148877 +Ref: Derived Files-Footnote-21148911 +Ref: Derived Files-Footnote-31149507 +Node: Future Extensions1149621 +Node: Implementation Limitations1150227 +Node: Extension Design1151475 +Node: Old Extension Problems1152629 +Ref: Old Extension Problems-Footnote-11154146 +Node: Extension New Mechanism Goals1154203 +Ref: Extension New Mechanism Goals-Footnote-11157563 +Node: Extension Other Design Decisions1157752 +Node: Extension Future Growth1159858 +Node: Old Extension Mechanism1160694 +Node: Notes summary1162456 +Node: Basic Concepts1163642 +Node: Basic High Level1164323 +Ref: figure-general-flow1164595 +Ref: figure-process-flow1165194 +Ref: Basic High Level-Footnote-11168423 +Node: Basic Data Typing1168608 +Node: Glossary1171936 +Node: Copying1197088 +Node: GNU Free Documentation License1234644 +Node: Index1259780 End Tag Table diff --git a/doc/gawk.texi b/doc/gawk.texi index 40e5c428..b418d4cf 100644 --- a/doc/gawk.texi +++ b/doc/gawk.texi @@ -575,9 +575,7 @@ particular records in a file and perform operations upon them. * Command-line directories:: What happens if you put a directory on the command line. * Input Summary:: Input summary. -@ifclear FOR_PRINT * Input Exercises:: Exercises. -@end ifclear * Print:: The @code{print} statement. * Print Examples:: Simple examples of @code{print} statements. @@ -602,9 +600,7 @@ particular records in a file and perform operations upon them. * Close Files And Pipes:: Closing Input and Output Files and Pipes. * Output Summary:: Output summary. -@ifclear FOR_PRINT * Output Exercises:: Exercises. -@end ifclear * Values:: Constants, Variables, and Regular Expressions. * Constants:: String, numeric and regexp constants. @@ -791,9 +787,7 @@ particular records in a file and perform operations upon them. information. * Walking Arrays:: A function to walk arrays of arrays. * Library Functions Summary:: Summary of library functions. -@ifclear FOR_PRINT * Library Exercises:: Exercises. -@end ifclear * Running Examples:: How to run these examples. * Clones:: Clones of common utilities. * Cut Program:: The @command{cut} utility. @@ -824,9 +818,7 @@ particular records in a file and perform operations upon them. * Signature Program:: People do amazing things with too much time on their hands. * Programs Summary:: Summary of programs. -@ifclear FOR_PRINT * Programs Exercises:: Exercises. -@end ifclear * Nondecimal Data:: Allowing nondecimal input data. * Array Sorting:: Facilities for controlling array traversal and sorting arrays. @@ -948,9 +940,7 @@ particular records in a file and perform operations upon them. and @code{sleep()}. * gawkextlib:: The @code{gawkextlib} project. * Extension summary:: Extension summary. -@ifclear FOR_PRINT * Extension Exercises:: Exercises. -@end ifclear * V7/SVR3.1:: The major changes between V7 and System V Release 3.1. * SVR4:: Minor changes between System V @@ -3195,8 +3185,8 @@ features that haven't been covered yet, so don't worry if you don't understand all the details: @example -LC_ALL=C ls -l | awk '$6 == "Nov" @{ sum += $5 @} - END @{ print sum @}' +ls -l | awk '$6 == "Nov" @{ sum += $5 @} + END @{ print sum @}' @end example @cindex @command{ls} utility @@ -6128,9 +6118,7 @@ used with it do not have to be named on the @command{awk} command line * Command-line directories:: What happens if you put a directory on the command line. * Input Summary:: Input summary. -@ifclear FOR_PRINT * Input Exercises:: Exercises. -@end ifclear @end menu @node Records @@ -8676,7 +8664,7 @@ Directories on the command line are fatal for standard @command{awk}; @end itemize -@ifclear FOR_PRINT +@c EXCLUDE START @node Input Exercises @section Exercises @@ -8696,7 +8684,7 @@ starts later on the same line. Write a program that does handle multiple comments on the line. @end enumerate -@end ifclear +@c EXCLUDE END @node Printing @chapter Printing Output @@ -8738,9 +8726,7 @@ and discusses the @code{close()} built-in function. descriptors. * Close Files And Pipes:: Closing Input and Output Files and Pipes. * Output Summary:: Output summary. -@ifclear FOR_PRINT * Output Exercises:: Exercises. -@end ifclear @end menu @node Print @@ -10251,7 +10237,7 @@ communications. @end itemize -@ifclear FOR_PRINT +@c EXCLUDE START @node Output Exercises @section Exercises @@ -10281,7 +10267,7 @@ BEGIN @{ print "Serious error detected!" > /dev/stderr @} @end example @end enumerate -@end ifclear +@c EXCLUDE END @c ENDOFRANGE prnt @@ -20321,9 +20307,7 @@ comparisons use only lowercase letters. * Group Functions:: Functions for getting group information. * Walking Arrays:: A function to walk arrays of arrays. * Library Functions Summary:: Summary of library functions. -@ifclear FOR_PRINT * Library Exercises:: Exercises. -@end ifclear @end menu @node Library Names @@ -22740,7 +22724,7 @@ A simple function to traverse an array of arrays to any depth. @end itemize -@ifclear FOR_PRINT +@c EXCLUDE START @node Library Exercises @section Exercises @@ -22807,7 +22791,7 @@ Test your new version by printing the array; you should end up with output identical to that of the original version. @end enumerate -@end ifclear +@c EXCLUDE END @c ENDOFRANGE flib @c ENDOFRANGE fudlib @@ -22852,9 +22836,7 @@ Many of these programs use library functions presented in * Clones:: Clones of common utilities. * Miscellaneous Programs:: Some interesting @command{awk} programs. * Programs Summary:: Summary of programs. -@ifclear FOR_PRINT * Programs Exercises:: Exercises. -@end ifclear @end menu @node Running Examples @@ -26290,7 +26272,7 @@ mailing labels, and finding anagrams. @end itemize -@ifclear FOR_PRINT +@c EXCLUDE START @node Programs Exercises @section Exercises @@ -26420,7 +26402,7 @@ Modify @file{anagram.awk} (@pxref{Anagram Program}), to avoid the use of the external @command{sort} utility. @end enumerate -@end ifclear +@c EXCLUDE END @ifnotinfo @part @value{PART3}Moving Beyond Standard @command{awk} With @command{gawk} @@ -30862,9 +30844,7 @@ When @option{--sandbox} is specified, extensions are disabled @code{gawk}. * gawkextlib:: The @code{gawkextlib} project. * Extension summary:: Extension summary. -@ifclear FOR_PRINT * Extension Exercises:: Exercises. -@end ifclear @end menu @node Extension Intro @@ -34801,7 +34781,7 @@ should be the place to do so. @end itemize -@ifclear FOR_PRINT +@c EXCLUDE START @node Extension Exercises @section Exercises @@ -34824,7 +34804,7 @@ Write a wrapper script that provides an interface similar to @ref{Extension Sample Inplace}. @end enumerate -@end ifclear +@c EXCLUDE END @ifnotinfo @part @value{PART4}Appendices diff --git a/doc/gawktexi.in b/doc/gawktexi.in index 4bf430a7..da427d9b 100644 --- a/doc/gawktexi.in +++ b/doc/gawktexi.in @@ -570,9 +570,7 @@ particular records in a file and perform operations upon them. * Command-line directories:: What happens if you put a directory on the command line. * Input Summary:: Input summary. -@ifclear FOR_PRINT * Input Exercises:: Exercises. -@end ifclear * Print:: The @code{print} statement. * Print Examples:: Simple examples of @code{print} statements. @@ -597,9 +595,7 @@ particular records in a file and perform operations upon them. * Close Files And Pipes:: Closing Input and Output Files and Pipes. * Output Summary:: Output summary. -@ifclear FOR_PRINT * Output Exercises:: Exercises. -@end ifclear * Values:: Constants, Variables, and Regular Expressions. * Constants:: String, numeric and regexp constants. @@ -786,9 +782,7 @@ particular records in a file and perform operations upon them. information. * Walking Arrays:: A function to walk arrays of arrays. * Library Functions Summary:: Summary of library functions. -@ifclear FOR_PRINT * Library Exercises:: Exercises. -@end ifclear * Running Examples:: How to run these examples. * Clones:: Clones of common utilities. * Cut Program:: The @command{cut} utility. @@ -819,9 +813,7 @@ particular records in a file and perform operations upon them. * Signature Program:: People do amazing things with too much time on their hands. * Programs Summary:: Summary of programs. -@ifclear FOR_PRINT * Programs Exercises:: Exercises. -@end ifclear * Nondecimal Data:: Allowing nondecimal input data. * Array Sorting:: Facilities for controlling array traversal and sorting arrays. @@ -943,9 +935,7 @@ particular records in a file and perform operations upon them. and @code{sleep()}. * gawkextlib:: The @code{gawkextlib} project. * Extension summary:: Extension summary. -@ifclear FOR_PRINT * Extension Exercises:: Exercises. -@end ifclear * V7/SVR3.1:: The major changes between V7 and System V Release 3.1. * SVR4:: Minor changes between System V @@ -3106,8 +3096,8 @@ features that haven't been covered yet, so don't worry if you don't understand all the details: @example -LC_ALL=C ls -l | awk '$6 == "Nov" @{ sum += $5 @} - END @{ print sum @}' +ls -l | awk '$6 == "Nov" @{ sum += $5 @} + END @{ print sum @}' @end example @cindex @command{ls} utility @@ -5912,9 +5902,7 @@ used with it do not have to be named on the @command{awk} command line * Command-line directories:: What happens if you put a directory on the command line. * Input Summary:: Input summary. -@ifclear FOR_PRINT * Input Exercises:: Exercises. -@end ifclear @end menu @node Records @@ -8278,7 +8266,7 @@ Directories on the command line are fatal for standard @command{awk}; @end itemize -@ifclear FOR_PRINT +@c EXCLUDE START @node Input Exercises @section Exercises @@ -8298,7 +8286,7 @@ starts later on the same line. Write a program that does handle multiple comments on the line. @end enumerate -@end ifclear +@c EXCLUDE END @node Printing @chapter Printing Output @@ -8340,9 +8328,7 @@ and discusses the @code{close()} built-in function. descriptors. * Close Files And Pipes:: Closing Input and Output Files and Pipes. * Output Summary:: Output summary. -@ifclear FOR_PRINT * Output Exercises:: Exercises. -@end ifclear @end menu @node Print @@ -9753,7 +9739,7 @@ communications. @end itemize -@ifclear FOR_PRINT +@c EXCLUDE START @node Output Exercises @section Exercises @@ -9783,7 +9769,7 @@ BEGIN @{ print "Serious error detected!" > /dev/stderr @} @end example @end enumerate -@end ifclear +@c EXCLUDE END @c ENDOFRANGE prnt @@ -19448,9 +19434,7 @@ comparisons use only lowercase letters. * Group Functions:: Functions for getting group information. * Walking Arrays:: A function to walk arrays of arrays. * Library Functions Summary:: Summary of library functions. -@ifclear FOR_PRINT * Library Exercises:: Exercises. -@end ifclear @end menu @node Library Names @@ -21838,7 +21822,7 @@ A simple function to traverse an array of arrays to any depth. @end itemize -@ifclear FOR_PRINT +@c EXCLUDE START @node Library Exercises @section Exercises @@ -21905,7 +21889,7 @@ Test your new version by printing the array; you should end up with output identical to that of the original version. @end enumerate -@end ifclear +@c EXCLUDE END @c ENDOFRANGE flib @c ENDOFRANGE fudlib @@ -21950,9 +21934,7 @@ Many of these programs use library functions presented in * Clones:: Clones of common utilities. * Miscellaneous Programs:: Some interesting @command{awk} programs. * Programs Summary:: Summary of programs. -@ifclear FOR_PRINT * Programs Exercises:: Exercises. -@end ifclear @end menu @node Running Examples @@ -25388,7 +25370,7 @@ mailing labels, and finding anagrams. @end itemize -@ifclear FOR_PRINT +@c EXCLUDE START @node Programs Exercises @section Exercises @@ -25518,7 +25500,7 @@ Modify @file{anagram.awk} (@pxref{Anagram Program}), to avoid the use of the external @command{sort} utility. @end enumerate -@end ifclear +@c EXCLUDE END @ifnotinfo @part @value{PART3}Moving Beyond Standard @command{awk} With @command{gawk} @@ -29960,9 +29942,7 @@ When @option{--sandbox} is specified, extensions are disabled @code{gawk}. * gawkextlib:: The @code{gawkextlib} project. * Extension summary:: Extension summary. -@ifclear FOR_PRINT * Extension Exercises:: Exercises. -@end ifclear @end menu @node Extension Intro @@ -33899,7 +33879,7 @@ should be the place to do so. @end itemize -@ifclear FOR_PRINT +@c EXCLUDE START @node Extension Exercises @section Exercises @@ -33922,7 +33902,7 @@ Write a wrapper script that provides an interface similar to @ref{Extension Sample Inplace}. @end enumerate -@end ifclear +@c EXCLUDE END @ifnotinfo @part @value{PART4}Appendices @@ -2203,7 +2203,11 @@ parse_reg_exp (re_string_t *regexp, regex_t *preg, re_token_t *token, { branch = parse_branch (regexp, preg, token, syntax, nest, err); if (BE (*err != REG_NOERROR && branch == NULL, 0)) - return NULL; + { + if (tree != NULL) + postorder (tree, free_tree, NULL); + return NULL; + } } else branch = NULL; @@ -2464,8 +2468,7 @@ parse_expression (re_string_t *regexp, regex_t *preg, re_token_t *token, while (token->type == OP_DUP_ASTERISK || token->type == OP_DUP_PLUS || token->type == OP_DUP_QUESTION || token->type == OP_OPEN_DUP_NUM) { - bin_tree_t *dup_tree = parse_dup_op (tree, regexp, dfa, token, - syntax, err); + bin_tree_t *dup_tree = parse_dup_op (tree, regexp, dfa, token, syntax, err); if (BE (*err != REG_NOERROR && dup_tree == NULL, 0)) { if (tree != NULL) @@ -2628,6 +2631,8 @@ parse_dup_op (bin_tree_t *elem, re_string_t *regexp, re_dfa_t *dfa, /* Duplicate ELEM before it is marked optional. */ elem = duplicate_tree (elem, dfa); + if (BE (elem == NULL, 0)) + goto parse_dup_op_espace; old_tree = tree; } else @@ -3124,8 +3129,8 @@ parse_bracket_exp (re_string_t *regexp, re_dfa_t *dfa, re_token_t *token, if (BE (sbcset == NULL, 0)) #endif /* RE_ENABLE_I18N */ { -#ifdef RE_ENABLE_I18N re_free (sbcset); +#ifdef RE_ENABLE_I18N re_free (mbcset); #endif *err = REG_ESPACE; diff --git a/regex_internal.c b/regex_internal.c index 056cff3d..9e427081 100644 --- a/regex_internal.c +++ b/regex_internal.c @@ -545,7 +545,10 @@ build_upper_buffer (re_string_t *pstr) int ch = pstr->raw_mbs[pstr->raw_mbs_idx + char_idx]; if (BE (pstr->trans != NULL, 0)) ch = pstr->trans[ch]; - pstr->mbs[char_idx] = toupper (ch); + if (islower (ch)) + pstr->mbs[char_idx] = toupper (ch); + else + pstr->mbs[char_idx] = ch; } pstr->valid_len = char_idx; pstr->valid_raw_len = char_idx; @@ -683,7 +686,7 @@ re_string_reconstruct (re_string_t *pstr, int idx, int eflags) pstr->valid_len - offset); pstr->valid_len -= offset; pstr->valid_raw_len -= offset; -#if DEBUG +#if defined DEBUG && DEBUG assert (pstr->valid_len > 0); #endif } @@ -940,7 +943,7 @@ re_string_context_at (const re_string_t *input, int idx, int eflags) int wc_idx = idx; while(input->wcs[wc_idx] == WEOF) { -#ifdef DEBUG +#if defined DEBUG && DEBUG /* It must not happen. */ assert (wc_idx >= 0); #endif |