diff options
-rwxr-xr-x | ChangeLog | 5 | ||||
-rw-r--r-- | NEWS | 4 | ||||
-rwxr-xr-x | config.sub | 438 | ||||
-rw-r--r-- | doc/ChangeLog | 6 | ||||
-rw-r--r-- | doc/gawk.info | 1252 | ||||
-rw-r--r-- | doc/gawk.texi | 64 | ||||
-rw-r--r-- | doc/gawktexi.in | 64 | ||||
-rw-r--r-- | extension/build-aux/ChangeLog | 4 | ||||
-rwxr-xr-x | extension/build-aux/config.sub | 438 | ||||
-rw-r--r-- | missing_d/ChangeLog | 4 | ||||
-rw-r--r-- | missing_d/mktime.c.old | 425 |
11 files changed, 1101 insertions, 1603 deletions
@@ -1,3 +1,8 @@ +2018-08-24 Arnold D. Robbins <arnold@skeeve.com> + + * NEWS: Updated w.r.t. GNULIB regex routines. + * config.sub: Updated from GNULIB. + 2018-08-17 Arnold D. Robbins <arnold@skeeve.com> * config.sub: Updated from GNULIB. @@ -24,6 +24,10 @@ Changes from 4.2.1 to 4.2.2 contents of test/Makefile.am and making it possible to generate pc/Makefile.tst from test/Makefile.in. +3. The regex routines have been replaced with those from GNULIB, allowing + me to stop carrying forward decades of changes against the original + ones from GLIBC. + Changes from 4.2.0 to 4.2.1 --------------------------- @@ -692,6 +692,9 @@ case $basic_machine in mac | mpw | mac-mpw) basic_machine=m68k-apple ;; + microblaze | microblazeel) + basic_machine=$basic_machine-xilinx + ;; pmac | pmac-mpw) basic_machine=powerpc-apple ;; @@ -699,226 +702,13 @@ case $basic_machine in basic_machine=xps100-honeywell ;; - # Recognize the basic CPU types without company name. - # Some are omitted here because they have special meanings below. - 1750a | 580 \ - | a29k \ - | aarch64 | aarch64_be \ - | abacus \ - | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ - | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ - | am33_2.0 \ - | arc | arceb \ - | arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv6m | armv[78][arm] \ - | avr | avr32 \ - | asmjs \ - | ba \ - | be32 | be64 \ - | bfin \ - | c4x | c8051 | clipper | csky \ - | d10v | d30v | dlx | dsp16xx \ - | e2k | epiphany \ - | fido | fr30 | frv | ft32 \ - | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ - | hexagon \ - | i370 | i860 | i960 | ia16 | ia64 \ - | ip2k | iq2000 \ - | k1om \ - | le32 | le64 \ - | lm32 \ - | m32c | m32r | m32rle | m68000 | m68k | m88k \ - | m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip \ - | maxq | mb | microblaze | microblazeel | mcore | mep | metag \ - | mips | mipsbe | mipseb | mipsel | mipsle \ - | mips16 \ - | mips64 | mips64el \ - | mips64octeon | mips64octeonel \ - | mips64orion | mips64orionel \ - | mips64r5900 | mips64r5900el \ - | mips64vr | mips64vrel \ - | mips64vr4100 | mips64vr4100el \ - | mips64vr4300 | mips64vr4300el \ - | mips64vr5000 | mips64vr5000el \ - | mips64vr5900 | mips64vr5900el \ - | mipsisa32 | mipsisa32el \ - | mipsisa32r2 | mipsisa32r2el \ - | mipsisa32r6 | mipsisa32r6el \ - | mipsisa64 | mipsisa64el \ - | mipsisa64r2 | mipsisa64r2el \ - | mipsisa64r6 | mipsisa64r6el \ - | mipsisa64sb1 | mipsisa64sb1el \ - | mipsisa64sr71k | mipsisa64sr71kel \ - | mipsr5900 | mipsr5900el \ - | mipstx39 | mipstx39el \ - | mn10200 | mn10300 \ - | moxie \ - | mt \ - | msp430 \ - | nds32 | nds32le | nds32be \ - | nfp \ - | nios | nios2 | nios2eb | nios2el \ - | ns16k | ns32k \ - | open8 | or1k | or1knd | or32 \ - | pdp10 | pj | pjl \ - | powerpc | powerpc64 | powerpc64le | powerpcle \ - | pru \ - | pyramid \ - | riscv | riscv32 | riscv64 \ - | rl78 | rx \ - | score \ - | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[234]eb | sheb | shbe | shle | sh[1234]le | sh[23]ele \ - | sh64 | sh64le \ - | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ - | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ - | spu \ - | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \ - | ubicom32 \ - | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \ - | visium \ - | wasm32 \ - | x86 | xc16x | xstormy16 | xgate | xtensa \ - | z8k | z80) - basic_machine=$basic_machine-unknown - ;; - c54x) - basic_machine=tic54x-unknown - ;; - c55x) - basic_machine=tic55x-unknown - ;; - c6x) - basic_machine=tic6x-unknown - ;; - leon|leon[3-9]) - basic_machine=sparc-$basic_machine - ;; - m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65) - ;; - m9s12z | m68hcs12z | hcs12z | s12z) - basic_machine=s12z-unknown - ;; - m9s12z-* | m68hcs12z-* | hcs12z-* | s12z-*) - basic_machine=s12z-`echo "$basic_machine" | sed 's/^[^-]*-//'` - ;; - ms1) - basic_machine=mt-unknown - ;; - strongarm | thumb | xscale) - basic_machine=arm-unknown - ;; - xscaleeb) - basic_machine=armeb-unknown - ;; - - xscaleel) - basic_machine=armel-unknown - ;; - # We use `pc' rather than `unknown' # because (1) that's what they normally are, and # (2) the word "unknown" tends to confuse beginning users. i*86 | x86_64) basic_machine=$basic_machine-pc ;; - # Recognize the basic CPU types with company name. - 1750a-* | 580-* \ - | a29k-* \ - | aarch64-* | aarch64_be-* \ - | abacus-* \ - | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ - | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ - | alphapca5[67]-* | alpha64pca5[67]-* \ - | am33_2.0-* \ - | arc-* | arceb-* \ - | arm-* | arm[lb]e-* | arme[lb]-* | armv*-* \ - | avr-* | avr32-* \ - | asmjs-* \ - | ba-* \ - | be32-* | be64-* \ - | bfin-* | bs2000-* \ - | c[123]* | c30-* | [cjt]90-* | c4x-* \ - | c8051-* | clipper-* | craynv-* | csky-* | cydra-* \ - | d10v-* | d30v-* | dlx-* | dsp16xx-* \ - | e2k-* | elxsi-* | epiphany-* \ - | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | ft32-* | fx80-* \ - | h8300-* | h8500-* \ - | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ - | hexagon-* \ - | i370-* | i*86-* | i860-* | i960-* | ia16-* | ia64-* \ - | ip2k-* | iq2000-* \ - | k1om-* \ - | le32-* | le64-* \ - | lm32-* \ - | m32c-* | m32r-* | m32rle-* \ - | m5200-* | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* | v70-* | w65-* \ - | m6811-* | m68hc11-* | m6812-* | m68hc12-* | m68hcs12x-* | nvptx-* | picochip-* \ - | m88110-* | m88k-* | maxq-* | mb-* | mcore-* | mep-* | metag-* \ - | microblaze-* | microblazeel-* \ - | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ - | mips16-* \ - | mips64-* | mips64el-* \ - | mips64octeon-* | mips64octeonel-* \ - | mips64orion-* | mips64orionel-* \ - | mips64r5900-* | mips64r5900el-* \ - | mips64vr-* | mips64vrel-* \ - | mips64vr4100-* | mips64vr4100el-* \ - | mips64vr4300-* | mips64vr4300el-* \ - | mips64vr5000-* | mips64vr5000el-* \ - | mips64vr5900-* | mips64vr5900el-* \ - | mipsisa32-* | mipsisa32el-* \ - | mipsisa32r2-* | mipsisa32r2el-* \ - | mipsisa32r6-* | mipsisa32r6el-* \ - | mipsisa64-* | mipsisa64el-* \ - | mipsisa64r2-* | mipsisa64r2el-* \ - | mipsisa64r6-* | mipsisa64r6el-* \ - | mipsisa64sb1-* | mipsisa64sb1el-* \ - | mipsisa64sr71k-* | mipsisa64sr71kel-* \ - | mipsr5900-* | mipsr5900el-* \ - | mipstx39-* | mipstx39el-* \ - | mmix-* \ - | mn10200-* | mn10300-* \ - | moxie-* \ - | mt-* \ - | msp430-* \ - | nds32-* | nds32le-* | nds32be-* \ - | nfp-* \ - | nios-* | nios2-* | nios2eb-* | nios2el-* \ - | none-* | np1-* | ns16k-* | ns32k-* \ - | open8-* \ - | or1k*-* \ - | or32-* \ - | orion-* \ - | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ - | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \ - | pru-* \ - | pyramid-* \ - | riscv-* | riscv32-* | riscv64-* \ - | rl78-* | romp-* | rs6000-* | rx-* \ - | score-* \ - | sh-* | sh[1234]-* | sh[24]a-* | sh[24]ae[lb]-* | sh[23]e-* | she[lb]-* | sh[lb]e-* \ - | sh[1234]e[lb]-* | sh[12345][lb]e-* | sh[23]ele-* | sh64-* | sh64le-* \ - | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ - | sparclite-* \ - | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx*-* \ - | spu-* \ - | tahoe-* \ - | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ - | tron-* \ - | ubicom32-* \ - | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \ - | vax-* \ - | visium-* \ - | wasm32-* \ - | we32k-* \ - | x86-* | x86_64-* | xc16x-* | xgate-* | xps100-* \ - | xstormy16-* | xtensa*-* \ - | ymp-* \ - | z8k-* | z80-*) - ;; - # Recognize the basic CPU types without company name, with glob match. - xtensa*) - basic_machine=$basic_machine-unknown - ;; + # Recognize the various machine names and aliases which stand # for a CPU type and a company and sometimes even an OS. 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) @@ -964,6 +754,9 @@ case $basic_machine in cris | cris-* | etrax*) basic_machine=cris-axis ;; + crx-*) + os=${os:-elf} + ;; crx) basic_machine=crx-unknown os=${os:-elf} @@ -1079,9 +872,6 @@ case $basic_machine in basic_machine=m68k-`echo "$basic_machine" | sed 's/^[^-]*-//'` os=linux ;; - microblaze*) - basic_machine=microblaze-xilinx - ;; miniframe) basic_machine=m68000-convergent ;; @@ -1272,9 +1062,8 @@ case $basic_machine in vpp*|vx|vx-*) basic_machine=f301-fujitsu ;; - w65*) + w65) basic_machine=w65-wdc - os=none ;; w89k-*) basic_machine=hppa1.1-winbond @@ -1290,6 +1079,217 @@ case $basic_machine in basic_machine=none-none ;; + # Recognize the basic CPU types with company name. + 1750a-* | 580-* \ + | a29k-* \ + | aarch64-* | aarch64_be-* \ + | abacus-* \ + | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ + | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ + | alphapca5[67]-* | alpha64pca5[67]-* \ + | am33_2.0-* \ + | arc-* | arceb-* \ + | arm-* | arm[lb]e-* | arme[lb]-* | armv*-* \ + | avr-* | avr32-* \ + | asmjs-* \ + | ba-* \ + | be32-* | be64-* \ + | bfin-* | bs2000-* \ + | c[123]* | c30-* | [cjt]90-* | c4x-* \ + | c8051-* | clipper-* | craynv-* | csky-* | cydra-* \ + | d10v-* | d30v-* | dlx-* | dsp16xx-* \ + | e2k-* | elxsi-* | epiphany-* \ + | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | ft32-* | fx80-* \ + | h8300-* | h8500-* \ + | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ + | hexagon-* \ + | i370-* | i*86-* | i860-* | i960-* | ia16-* | ia64-* \ + | ip2k-* | iq2000-* \ + | k1om-* \ + | le32-* | le64-* \ + | lm32-* \ + | m32c-* | m32r-* | m32rle-* \ + | m5200-* | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* | v70-* | w65-* \ + | m6811-* | m68hc11-* | m6812-* | m68hc12-* | m68hcs12x-* | nvptx-* | picochip-* \ + | m88110-* | m88k-* | maxq-* | mb-* | mcore-* | mep-* | metag-* \ + | microblaze-* | microblazeel-* \ + | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ + | mips16-* \ + | mips64-* | mips64el-* \ + | mips64octeon-* | mips64octeonel-* \ + | mips64orion-* | mips64orionel-* \ + | mips64r5900-* | mips64r5900el-* \ + | mips64vr-* | mips64vrel-* \ + | mips64vr4100-* | mips64vr4100el-* \ + | mips64vr4300-* | mips64vr4300el-* \ + | mips64vr5000-* | mips64vr5000el-* \ + | mips64vr5900-* | mips64vr5900el-* \ + | mipsisa32-* | mipsisa32el-* \ + | mipsisa32r2-* | mipsisa32r2el-* \ + | mipsisa32r6-* | mipsisa32r6el-* \ + | mipsisa64-* | mipsisa64el-* \ + | mipsisa64r2-* | mipsisa64r2el-* \ + | mipsisa64r6-* | mipsisa64r6el-* \ + | mipsisa64sb1-* | mipsisa64sb1el-* \ + | mipsisa64sr71k-* | mipsisa64sr71kel-* \ + | mipsr5900-* | mipsr5900el-* \ + | mipstx39-* | mipstx39el-* \ + | mmix-* \ + | mn10200-* | mn10300-* \ + | moxie-* \ + | mt-* \ + | msp430-* \ + | nds32-* | nds32le-* | nds32be-* \ + | nfp-* \ + | nios-* | nios2-* | nios2eb-* | nios2el-* \ + | none-* | np1-* | ns16k-* | ns32k-* \ + | open8-* \ + | or1k*-* \ + | or32-* \ + | orion-* \ + | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ + | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \ + | pru-* \ + | pyramid-* \ + | riscv-* | riscv32-* | riscv64-* \ + | rl78-* | romp-* | rs6000-* | rx-* \ + | score-* \ + | sh-* | sh[1234]-* | sh[24]a-* | sh[24]ae[lb]-* | sh[23]e-* | she[lb]-* | sh[lb]e-* \ + | sh[1234]e[lb]-* | sh[12345][lb]e-* | sh[23]ele-* | sh64-* | sh64le-* \ + | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ + | sparclite-* \ + | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx*-* \ + | spu-* \ + | tahoe-* \ + | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ + | tron-* \ + | ubicom32-* \ + | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \ + | vax-* \ + | visium-* \ + | wasm32-* \ + | we32k-* \ + | x86-* | x86_64-* | xc16x-* | xgate-* | xps100-* \ + | xstormy16-* | xtensa*-* \ + | ymp-* \ + | z8k-* | z80-*) + ;; + + # Recognize the basic CPU types without company name. + # Some are omitted here because they have special meanings below. + 1750a | 580 \ + | a29k \ + | aarch64 | aarch64_be \ + | abacus \ + | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ + | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ + | am33_2.0 \ + | arc | arceb \ + | arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv6m | armv[78][arm] \ + | avr | avr32 \ + | asmjs \ + | ba \ + | be32 | be64 \ + | bfin \ + | c4x | c8051 | clipper | csky \ + | d10v | d30v | dlx | dsp16xx \ + | e2k | epiphany \ + | fido | fr30 | frv | ft32 \ + | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ + | hexagon \ + | i370 | i860 | i960 | ia16 | ia64 \ + | ip2k | iq2000 \ + | k1om \ + | le32 | le64 \ + | lm32 \ + | m32c | m32r | m32rle | m68000 | m68k | m88k \ + | m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip \ + | maxq | mb | mcore | mep | metag \ + | mips | mipsbe | mipseb | mipsel | mipsle \ + | mips16 \ + | mips64 | mips64el \ + | mips64octeon | mips64octeonel \ + | mips64orion | mips64orionel \ + | mips64r5900 | mips64r5900el \ + | mips64vr | mips64vrel \ + | mips64vr4100 | mips64vr4100el \ + | mips64vr4300 | mips64vr4300el \ + | mips64vr5000 | mips64vr5000el \ + | mips64vr5900 | mips64vr5900el \ + | mipsisa32 | mipsisa32el \ + | mipsisa32r2 | mipsisa32r2el \ + | mipsisa32r6 | mipsisa32r6el \ + | mipsisa64 | mipsisa64el \ + | mipsisa64r2 | mipsisa64r2el \ + | mipsisa64r6 | mipsisa64r6el \ + | mipsisa64sb1 | mipsisa64sb1el \ + | mipsisa64sr71k | mipsisa64sr71kel \ + | mipsr5900 | mipsr5900el \ + | mipstx39 | mipstx39el \ + | mn10200 | mn10300 \ + | moxie \ + | mt \ + | msp430 \ + | nds32 | nds32le | nds32be \ + | nfp \ + | nios | nios2 | nios2eb | nios2el \ + | ns16k | ns32k \ + | open8 | or1k | or1knd | or32 \ + | pdp10 | pj | pjl \ + | powerpc | powerpc64 | powerpc64le | powerpcle \ + | pru \ + | pyramid \ + | riscv | riscv32 | riscv64 \ + | rl78 | rx \ + | score \ + | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[234]eb | sheb | shbe | shle | sh[1234]le | sh[23]ele \ + | sh64 | sh64le \ + | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ + | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ + | spu \ + | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \ + | ubicom32 \ + | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \ + | visium \ + | wasm32 \ + | x86 | xc16x | xstormy16 | xgate | xtensa* \ + | z8k | z80) + basic_machine=$basic_machine-unknown + ;; + c54x) + basic_machine=tic54x-unknown + ;; + c55x) + basic_machine=tic55x-unknown + ;; + c6x) + basic_machine=tic6x-unknown + ;; + leon|leon[3-9]) + basic_machine=sparc-$basic_machine + ;; + m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70) + ;; + m9s12z | m68hcs12z | hcs12z | s12z) + basic_machine=s12z-unknown + ;; + m9s12z-* | m68hcs12z-* | hcs12z-* | s12z-*) + basic_machine=s12z-`echo "$basic_machine" | sed 's/^[^-]*-//'` + ;; + ms1) + basic_machine=mt-unknown + ;; + strongarm | thumb | xscale) + basic_machine=arm-unknown + ;; + xscaleeb) + basic_machine=armeb-unknown + ;; + + xscaleel) + basic_machine=armel-unknown + ;; + *) echo Invalid configuration \`"$1"\': machine \`"$basic_machine"\' not recognized 1>&2 exit 1 diff --git a/doc/ChangeLog b/doc/ChangeLog index bfb58005..6e499260 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -1,3 +1,9 @@ +2018-08-24 Arnold D. Robbins <arnold@skeeve.com> + + * gawktexi.in: A number of unrelated updates. Most notably, + removed the section on old extensions which has been irrelevant + since 4.2.0. Oops. + 2018-08-02 Arnold D. Robbins <arnold@skeeve.com> * gawktexi.in (Scalar Constants): Fix typos in example. diff --git a/doc/gawk.info b/doc/gawk.info index 2dcf8e64..a899da43 100644 --- a/doc/gawk.info +++ b/doc/gawk.info @@ -684,7 +684,6 @@ in (a) below. A copy of the license is included in the section entitled * Extension New Mechanism Goals:: Goals for the new mechanism. * Extension Other Design Decisions:: Some other design decisions. * Extension Future Growth:: Some room for future growth. -* Old Extension Mechanism:: Some compatibility for old extensions. * Notes summary:: Summary of implementation notes. * Basic High Level:: The high level view. * Basic Data Typing:: A very quick intro to data types. @@ -3868,10 +3867,9 @@ numerically between zero and 127, which is the defined range of the ASCII character set. Use a complemented character list ('[^\x00-\x7F]') to match any single-byte characters that are not in the ASCII range. - NOTE: As of this writing (May 2018), Brian Kernighan's 'awk' treats - '[:blank:]' like '[:space:]', incorrectly matching more characters - than it should. We have submitted a patch to him, and hope that - this will be fixed. + NOTE: Some older versions of Unix 'awk' treat '[:blank:]' like + '[:space:]', incorrectly matching more characters than they should. + Caveat Emptor. Two additional special sequences can appear in bracket expressions. These apply to non-ASCII character sets, which can have single symbols @@ -4754,7 +4752,8 @@ value of 'NF' and recomputes '$0'. (d.c.) Here is an example: -| a b c CAUTION: Some versions of 'awk' don't rebuild '$0' when 'NF' is - decremented. + decremented. Until August, 2018, this included BWK 'awk'; + fortunately his version now handles this correctly. Finally, there are times when it is convenient to force 'awk' to rebuild the entire record, using the current values of the fields and @@ -7707,6 +7706,9 @@ Other Versions::) elide the backslash and newline, as in C: > world" }' -| hello, world + In POSIX mode (*note Options::), 'gawk' does not allow escaped +newlines. Otherwise, it behaves as just described. + Brian Kernighan's 'awk' and Busybox 'awk' remove the backslash but leave the newline intact, as part of the string: @@ -7715,9 +7717,6 @@ leave the newline intact, as part of the string: -| hello, -| world - In POSIX mode (*note Options::), 'gawk' does not allow escaped -newlines. Otherwise, it behaves as just described. - ---------- Footnotes ---------- (1) The internal representation of all numbers, including integers, @@ -13481,6 +13480,9 @@ is all buffered and sent down the pipe to 'cat' in one shot. Table 9.5: Return values from 'system()' + As of August, 2018, BWK 'awk' now follows 'gawk''s behavior for the +return value of 'system()'. + Controlling Output Buffering with 'system()' The 'fflush()' function provides explicit control over output @@ -23015,14 +23017,16 @@ they are within some small range of each other (called a "delta", or Code to do this looks something like the following: delta = 0.00001 # for example - difference = abs(a) - abs(b) # subtract the two values + difference = abs(a - b) # subtract the two values if (difference < delta) # all ok else # not ok (We assume that you have a simple absolute value function named 'abs()' -defined elsewhere in your program.) +defined elsewhere in your program.) If you write a function to compare +values with a delta, you should be sure to use 'difference < abs(delta)' +in case someone passes in a negative delta value. File: gawk.info, Node: Errors accumulate, Prev: Comparing FP Values, Up: Inexactness of computations @@ -30048,7 +30052,6 @@ and maintainers of 'gawk'. Everything in it applies specifically to * Future Extensions:: New features that may be implemented one day. * Implementation Limitations:: Some limitations of the implementation. * Extension Design:: Design notes about the extension API. -* Old Extension Mechanism:: Some compatibility for old extensions. * Notes summary:: Summary of implementation notes. @@ -30552,7 +30555,7 @@ Size of a literal string 'MAX_INT' Size of a printf string 'MAX_INT' -File: gawk.info, Node: Extension Design, Next: Old Extension Mechanism, Prev: Implementation Limitations, Up: Notes +File: gawk.info, Node: Extension Design, Next: Notes summary, Prev: Implementation Limitations, Up: Notes C.5 Extension API Design ======================== @@ -30766,47 +30769,9 @@ The API can later be expanded, in two ways: respect to any of the above. -File: gawk.info, Node: Old Extension Mechanism, Next: Notes summary, Prev: Extension Design, Up: Notes - -C.6 Compatibility For Old Extensions -==================================== - -*note Dynamic Extensions::, describes the supported API and mechanisms -for writing extensions for 'gawk'. This API was introduced in version -4.1. However, for many years 'gawk' provided an extension mechanism -that required knowledge of 'gawk' internals and that was not as well -designed. - - In order to provide a transition period, 'gawk' version 4.1 continues -to support the original extension mechanism. This will be true for the -life of exactly one major release. This support will be withdrawn, and -removed from the source code, at the next major release. - - Briefly, original-style extensions should be compiled by including -the 'awk.h' header file in the extension source code. Additionally, you -must define the identifier 'GAWK' when building (use '-DGAWK' with -Unix-style compilers). Otherwise, the definitions in 'gawkapi.h' will -cause conflicts with those in 'awk.h' and your extension will not -compile. +File: gawk.info, Node: Notes summary, Prev: Extension Design, Up: Notes - Just as in previous versions, you load an old-style extension with -the 'extension()' built-in function (which is not otherwise documented). -This function in turn finds and loads the shared object file containing -the extension and calls its 'dl_load()' C routine. - - Because original-style and new-style extensions use different -initialization routines ('dl_load()' versus 'dlload()'), they may safely -be installed in the same directory (to be found by 'AWKLIBPATH') without -conflict. - - The 'gawk' development team strongly recommends that you convert any -old extensions that you may have to use the new API described in *note -Dynamic Extensions::. - - -File: gawk.info, Node: Notes summary, Prev: Old Extension Mechanism, Up: Notes - -C.7 Summary +C.6 Summary =========== * 'gawk''s extensions can be disabled with either the '--traditional' @@ -33620,13 +33585,13 @@ Index * bracket expressions, character classes: Bracket Expressions. (line 40) * bracket expressions, collating elements: Bracket Expressions. - (line 91) + (line 90) * bracket expressions, collating symbols: Bracket Expressions. - (line 98) + (line 97) * bracket expressions, complemented: Regexp Operators. (line 64) * bracket expressions, equivalence classes: Bracket Expressions. - (line 104) -* bracket expressions, non-ASCII: Bracket Expressions. (line 91) + (line 103) +* bracket expressions, non-ASCII: Bracket Expressions. (line 90) * bracket expressions, range expressions: Bracket Expressions. (line 6) * break debugger command: Breakpoint Control. (line 11) @@ -33673,11 +33638,11 @@ Index * Buening, Andreas: Acknowledgments. (line 60) * Buening, Andreas <1>: Contributors. (line 95) * Buening, Andreas <2>: Maintainers. (line 14) -* buffering, input/output: I/O Functions. (line 165) +* buffering, input/output: I/O Functions. (line 168) * buffering, input/output <1>: Two-way I/O. (line 53) * buffering, interactive vs. noninteractive: I/O Functions. (line 76) * buffers, flushing: I/O Functions. (line 32) -* buffers, flushing <1>: I/O Functions. (line 165) +* buffers, flushing <1>: I/O Functions. (line 168) * buffers, operators for: GNU Regexp Operators. (line 51) * bug reports, email address, bug-gawk@gnu.org: Bug address. (line 31) @@ -33744,8 +33709,8 @@ Index * Close, Diane: Manual History. (line 34) * Close, Diane <1>: Contributors. (line 21) * Collado, Manuel: Acknowledgments. (line 60) -* collating elements: Bracket Expressions. (line 91) -* collating symbols: Bracket Expressions. (line 98) +* collating elements: Bracket Expressions. (line 90) +* collating symbols: Bracket Expressions. (line 97) * Colombo, Antonio: Acknowledgments. (line 60) * Colombo, Antonio <1>: Contributors. (line 143) * columns, aligning: Print Examples. (line 69) @@ -34574,7 +34539,7 @@ Index * gawk, awk and <1>: This Manual. (line 14) * gawk, bitwise operations in: Bitwise Functions. (line 40) * gawk, break statement in: Break Statement. (line 51) -* gawk, character classes and: Bracket Expressions. (line 113) +* gawk, character classes and: Bracket Expressions. (line 112) * gawk, coding style in: Adding Code. (line 37) * gawk, command-line options, and regular expressions: GNU Regexp Operators. (line 73) @@ -34867,7 +34832,7 @@ Index * internationalization, localization <1>: Internationalization. (line 13) * internationalization, localization, character classes: Bracket Expressions. - (line 113) + (line 112) * internationalization, localization, gawk and: Internationalization. (line 13) * internationalization, localization, locale categories: Explaining gettext. @@ -35227,7 +35192,7 @@ Index * output redirection: Redirection. (line 6) * output wrapper: Output Wrappers. (line 6) * output, buffering: I/O Functions. (line 32) -* output, buffering <1>: I/O Functions. (line 165) +* output, buffering <1>: I/O Functions. (line 168) * output, duplicating into files: Tee Program. (line 6) * output, files, closing: Close Files And Pipes. (line 6) @@ -35336,7 +35301,7 @@ Index * POSIX awk, bracket expressions and, character classes: Bracket Expressions. (line 40) * POSIX awk, bracket expressions and, character classes <1>: Bracket Expressions. - (line 113) + (line 112) * POSIX awk, break statement and: Break Statement. (line 51) * POSIX awk, changes in awk versions: POSIX. (line 6) * POSIX awk, continue statement and: Continue Statement. (line 44) @@ -35725,7 +35690,7 @@ Index (line 14) * sidebar, Changing NR and FNR: Auto-set. (line 387) * sidebar, Controlling Output Buffering with system(): I/O Functions. - (line 163) + (line 166) * sidebar, Escape Sequences for Metacharacters: Escape Sequences. (line 138) * sidebar, FS and IGNORECASE: Field Splitting Summary. @@ -35746,7 +35711,7 @@ Index * sidebar, Syntactic Ambiguities Between /= and Regular Expressions: Assignment Ops. (line 147) * sidebar, Understanding #!: Executable Scripts. (line 31) -* sidebar, Understanding $0: Changing Fields. (line 134) +* sidebar, Understanding $0: Changing Fields. (line 135) * sidebar, Using close()'s Return Value: Close Files And Pipes. (line 130) * sidebar, Using \n in Bracket Expressions of Dynamic Regexps: Computed Regexps. @@ -36144,582 +36109,581 @@ Index Tag Table: Node: Top1200 -Node: Foreword343399 -Node: Foreword447841 -Node: Preface49373 -Ref: Preface-Footnote-152232 -Ref: Preface-Footnote-252339 -Ref: Preface-Footnote-352573 -Node: History52715 -Node: Names55067 -Ref: Names-Footnote-156161 -Node: This Manual56308 -Ref: This Manual-Footnote-162793 -Node: Conventions62893 -Node: Manual History65248 -Ref: Manual History-Footnote-168245 -Ref: Manual History-Footnote-268286 -Node: How To Contribute68360 -Node: Acknowledgments69286 -Node: Getting Started74194 -Node: Running gawk76633 -Node: One-shot77823 -Node: Read Terminal79086 -Node: Long81079 -Node: Executable Scripts82592 -Ref: Executable Scripts-Footnote-185387 -Node: Comments85490 -Node: Quoting87974 -Node: DOS Quoting93491 -Node: Sample Data Files95547 -Node: Very Simple98142 -Node: Two Rules103044 -Node: More Complex104929 -Node: Statements/Lines107795 -Ref: Statements/Lines-Footnote-1112254 -Node: Other Features112519 -Node: When113455 -Ref: When-Footnote-1115209 -Node: Intro Summary115274 -Node: Invoking Gawk116158 -Node: Command Line117672 -Node: Options118470 -Ref: Options-Footnote-1135032 -Ref: Options-Footnote-2135263 -Node: Other Arguments135288 -Node: Naming Standard Input138235 -Node: Environment Variables139328 -Node: AWKPATH Variable139886 -Ref: AWKPATH Variable-Footnote-1143298 -Ref: AWKPATH Variable-Footnote-2143332 -Node: AWKLIBPATH Variable143593 -Node: Other Environment Variables145251 -Node: Exit Status149072 -Node: Include Files149749 -Node: Loading Shared Libraries153274 -Node: Obsolete154702 -Node: Undocumented155394 -Node: Invoking Summary155691 -Node: Regexp157351 -Node: Regexp Usage158805 -Node: Escape Sequences160842 -Node: Regexp Operators167074 -Ref: Regexp Operators-Footnote-1174490 -Ref: Regexp Operators-Footnote-2174637 -Node: Bracket Expressions174735 -Ref: table-char-classes177211 -Node: Leftmost Longest180616 -Node: Computed Regexps181919 -Node: GNU Regexp Operators185346 -Node: Case-sensitivity189025 -Ref: Case-sensitivity-Footnote-1191912 -Ref: Case-sensitivity-Footnote-2192147 -Node: Regexp Summary192255 -Node: Reading Files193721 -Node: Records195990 -Node: awk split records197065 -Node: gawk split records202340 -Ref: gawk split records-Footnote-1206926 -Node: Fields206963 -Node: Nonconstant Fields209704 -Ref: Nonconstant Fields-Footnote-1211940 -Node: Changing Fields212144 -Node: Field Separators218072 -Node: Default Field Splitting220770 -Node: Regexp Field Splitting221888 -Node: Single Character Fields225241 -Node: Command Line Field Separator226301 -Node: Full Line Fields229519 -Ref: Full Line Fields-Footnote-1231041 -Ref: Full Line Fields-Footnote-2231087 -Node: Field Splitting Summary231188 -Node: Constant Size233262 -Node: Fixed width data233994 -Node: Skipping intervening237461 -Node: Allowing trailing data238259 -Node: Fields with fixed data239296 -Node: Splitting By Content240814 -Ref: Splitting By Content-Footnote-1244464 -Node: Testing field creation244627 -Node: Multiple Line246252 -Ref: Multiple Line-Footnote-1252136 -Node: Getline252315 -Node: Plain Getline254784 -Node: Getline/Variable257425 -Node: Getline/File258576 -Node: Getline/Variable/File259964 -Ref: Getline/Variable/File-Footnote-1261569 -Node: Getline/Pipe261657 -Node: Getline/Variable/Pipe264364 -Node: Getline/Coprocess265499 -Node: Getline/Variable/Coprocess266766 -Node: Getline Notes267508 -Node: Getline Summary270305 -Ref: table-getline-variants270729 -Node: Read Timeout271477 -Ref: Read Timeout-Footnote-1275383 -Node: Retrying Input275441 -Node: Command-line directories276640 -Node: Input Summary277546 -Node: Input Exercises280718 -Node: Printing281446 -Node: Print283280 -Node: Print Examples284737 -Node: Output Separators287517 -Node: OFMT289534 -Node: Printf290890 -Node: Basic Printf291675 -Node: Control Letters293249 -Node: Format Modifiers298376 -Node: Printf Examples304391 -Node: Redirection306877 -Node: Special FD313718 -Ref: Special FD-Footnote-1316886 -Node: Special Files316960 -Node: Other Inherited Files317577 -Node: Special Network318578 -Node: Special Caveats319438 -Node: Close Files And Pipes320387 -Ref: table-close-pipe-return-values327294 -Ref: Close Files And Pipes-Footnote-1328107 -Ref: Close Files And Pipes-Footnote-2328255 -Node: Nonfatal328407 -Node: Output Summary330745 -Node: Output Exercises331967 -Node: Expressions332646 -Node: Values333834 -Node: Constants334512 -Node: Scalar Constants335203 -Ref: Scalar Constants-Footnote-1337728 -Node: Nondecimal-numbers337978 -Node: Regexp Constants340979 -Node: Using Constant Regexps341505 -Node: Standard Regexp Constants342127 -Node: Strong Regexp Constants345315 -Node: Variables348273 -Node: Using Variables348930 -Node: Assignment Options350840 -Node: Conversion352713 -Node: Strings And Numbers353237 -Ref: Strings And Numbers-Footnote-1356300 -Node: Locale influences conversions356409 -Ref: table-locale-affects359167 -Node: All Operators359785 -Node: Arithmetic Ops360414 -Node: Concatenation362920 -Ref: Concatenation-Footnote-1365767 -Node: Assignment Ops365874 -Ref: table-assign-ops370865 -Node: Increment Ops372178 -Node: Truth Values and Conditions375638 -Node: Truth Values376712 -Node: Typing and Comparison377760 -Node: Variable Typing378580 -Ref: Variable Typing-Footnote-1385043 -Ref: Variable Typing-Footnote-2385115 -Node: Comparison Operators385192 -Ref: table-relational-ops385611 -Node: POSIX String Comparison389106 -Ref: POSIX String Comparison-Footnote-1390801 -Ref: POSIX String Comparison-Footnote-2390940 -Node: Boolean Ops391024 -Ref: Boolean Ops-Footnote-1395506 -Node: Conditional Exp395598 -Node: Function Calls397334 -Node: Precedence401211 -Node: Locales404870 -Node: Expressions Summary406502 -Node: Patterns and Actions409075 -Node: Pattern Overview410195 -Node: Regexp Patterns411872 -Node: Expression Patterns412414 -Node: Ranges416195 -Node: BEGIN/END419303 -Node: Using BEGIN/END420064 -Ref: Using BEGIN/END-Footnote-1422800 -Node: I/O And BEGIN/END422906 -Node: BEGINFILE/ENDFILE425220 -Node: Empty428133 -Node: Using Shell Variables428450 -Node: Action Overview430724 -Node: Statements433049 -Node: If Statement434897 -Node: While Statement436392 -Node: Do Statement438420 -Node: For Statement439568 -Node: Switch Statement442739 -Node: Break Statement445125 -Node: Continue Statement447217 -Node: Next Statement449044 -Node: Nextfile Statement451427 -Node: Exit Statement454079 -Node: Built-in Variables456482 -Node: User-modified457615 -Node: Auto-set465382 -Ref: Auto-set-Footnote-1481684 -Ref: Auto-set-Footnote-2481890 -Node: ARGC and ARGV481946 -Node: Pattern Action Summary486159 -Node: Arrays488589 -Node: Array Basics489918 -Node: Array Intro490762 -Ref: figure-array-elements492737 -Ref: Array Intro-Footnote-1495441 -Node: Reference to Elements495569 -Node: Assigning Elements498033 -Node: Array Example498524 -Node: Scanning an Array500283 -Node: Controlling Scanning503305 -Ref: Controlling Scanning-Footnote-1508704 -Node: Numeric Array Subscripts509020 -Node: Uninitialized Subscripts511204 -Node: Delete512823 -Ref: Delete-Footnote-1515575 -Node: Multidimensional515632 -Node: Multiscanning518727 -Node: Arrays of Arrays520318 -Node: Arrays Summary525085 -Node: Functions527178 -Node: Built-in528216 -Node: Calling Built-in529297 -Node: Numeric Functions531293 -Ref: Numeric Functions-Footnote-1535321 -Ref: Numeric Functions-Footnote-2535678 -Ref: Numeric Functions-Footnote-3535726 -Node: String Functions535998 -Ref: String Functions-Footnote-1559707 -Ref: String Functions-Footnote-2559835 -Ref: String Functions-Footnote-3560083 -Node: Gory Details560170 -Ref: table-sub-escapes561961 -Ref: table-sub-proposed563480 -Ref: table-posix-sub564843 -Ref: table-gensub-escapes566384 -Ref: Gory Details-Footnote-1567207 -Node: I/O Functions567361 -Ref: table-system-return-values573829 -Ref: I/O Functions-Footnote-1575809 -Ref: I/O Functions-Footnote-2575957 -Node: Time Functions576077 -Ref: Time Functions-Footnote-1586748 -Ref: Time Functions-Footnote-2586816 -Ref: Time Functions-Footnote-3586974 -Ref: Time Functions-Footnote-4587085 -Ref: Time Functions-Footnote-5587197 -Ref: Time Functions-Footnote-6587424 -Node: Bitwise Functions587690 -Ref: table-bitwise-ops588284 -Ref: Bitwise Functions-Footnote-1594347 -Ref: Bitwise Functions-Footnote-2594520 -Node: Type Functions594711 -Node: I18N Functions597462 -Node: User-defined599113 -Node: Definition Syntax599918 -Ref: Definition Syntax-Footnote-1605605 -Node: Function Example605676 -Ref: Function Example-Footnote-1608598 -Node: Function Caveats608620 -Node: Calling A Function609138 -Node: Variable Scope610096 -Node: Pass By Value/Reference613090 -Node: Return Statement616589 -Node: Dynamic Typing619568 -Node: Indirect Calls620498 -Ref: Indirect Calls-Footnote-1630750 -Node: Functions Summary630878 -Node: Library Functions633583 -Ref: Library Functions-Footnote-1637190 -Ref: Library Functions-Footnote-2637333 -Node: Library Names637504 -Ref: Library Names-Footnote-1640964 -Ref: Library Names-Footnote-2641187 -Node: General Functions641273 -Node: Strtonum Function642376 -Node: Assert Function645398 -Node: Round Function648724 -Node: Cliff Random Function650264 -Node: Ordinal Functions651280 -Ref: Ordinal Functions-Footnote-1654343 -Ref: Ordinal Functions-Footnote-2654595 -Node: Join Function654805 -Ref: Join Function-Footnote-1656575 -Node: Getlocaltime Function656775 -Node: Readfile Function660517 -Node: Shell Quoting662494 -Node: Data File Management663895 -Node: Filetrans Function664527 -Node: Rewind Function668623 -Node: File Checking670533 -Ref: File Checking-Footnote-1671867 -Node: Empty Files672068 -Node: Ignoring Assigns674047 -Node: Getopt Function675597 -Ref: Getopt Function-Footnote-1687066 -Node: Passwd Functions687266 -Ref: Passwd Functions-Footnote-1696105 -Node: Group Functions696193 -Ref: Group Functions-Footnote-1704091 -Node: Walking Arrays704298 -Node: Library Functions Summary707306 -Node: Library Exercises708712 -Node: Sample Programs709177 -Node: Running Examples709947 -Node: Clones710675 -Node: Cut Program711899 -Node: Egrep Program721828 -Ref: Egrep Program-Footnote-1729340 -Node: Id Program729450 -Node: Split Program733130 -Ref: Split Program-Footnote-1736588 -Node: Tee Program736717 -Node: Uniq Program739507 -Node: Wc Program746933 -Ref: Wc Program-Footnote-1751188 -Node: Miscellaneous Programs751282 -Node: Dupword Program752495 -Node: Alarm Program754525 -Node: Translate Program759380 -Ref: Translate Program-Footnote-1763945 -Node: Labels Program764215 -Ref: Labels Program-Footnote-1767566 -Node: Word Sorting767650 -Node: History Sorting771722 -Node: Extract Program773557 -Node: Simple Sed781611 -Node: Igawk Program784685 -Ref: Igawk Program-Footnote-1799016 -Ref: Igawk Program-Footnote-2799218 -Ref: Igawk Program-Footnote-3799340 -Node: Anagram Program799455 -Node: Signature Program802517 -Node: Programs Summary803764 -Node: Programs Exercises804978 -Ref: Programs Exercises-Footnote-1809107 -Node: Advanced Features809198 -Node: Nondecimal Data811188 -Node: Array Sorting812779 -Node: Controlling Array Traversal813479 -Ref: Controlling Array Traversal-Footnote-1821847 -Node: Array Sorting Functions821965 -Ref: Array Sorting Functions-Footnote-1827056 -Node: Two-way I/O827252 -Ref: Two-way I/O-Footnote-1834972 -Ref: Two-way I/O-Footnote-2835159 -Node: TCP/IP Networking835241 -Node: Profiling838359 -Ref: Profiling-Footnote-1847031 -Node: Advanced Features Summary847354 -Node: Internationalization849198 -Node: I18N and L10N850678 -Node: Explaining gettext851365 -Ref: Explaining gettext-Footnote-1857257 -Ref: Explaining gettext-Footnote-2857442 -Node: Programmer i18n857607 -Ref: Programmer i18n-Footnote-1862556 -Node: Translator i18n862605 -Node: String Extraction863399 -Ref: String Extraction-Footnote-1864531 -Node: Printf Ordering864617 -Ref: Printf Ordering-Footnote-1867403 -Node: I18N Portability867467 -Ref: I18N Portability-Footnote-1869923 -Node: I18N Example869986 -Ref: I18N Example-Footnote-1872792 -Node: Gawk I18N872865 -Node: I18N Summary873510 -Node: Debugger874851 -Node: Debugging875874 -Node: Debugging Concepts876315 -Node: Debugging Terms878124 -Node: Awk Debugging880699 -Node: Sample Debugging Session881605 -Node: Debugger Invocation882139 -Node: Finding The Bug883525 -Node: List of Debugger Commands890003 -Node: Breakpoint Control891336 -Node: Debugger Execution Control895030 -Node: Viewing And Changing Data898392 -Node: Execution Stack901766 -Node: Debugger Info903403 -Node: Miscellaneous Debugger Commands907474 -Node: Readline Support912536 -Node: Limitations913432 -Node: Debugging Summary915541 -Node: Arbitrary Precision Arithmetic916820 -Node: Computer Arithmetic918305 -Ref: table-numeric-ranges922071 -Ref: table-floating-point-ranges922564 -Ref: Computer Arithmetic-Footnote-1923222 -Node: Math Definitions923279 -Ref: table-ieee-formats926595 -Ref: Math Definitions-Footnote-1927198 -Node: MPFR features927303 -Node: FP Math Caution929021 -Ref: FP Math Caution-Footnote-1930093 -Node: Inexactness of computations930462 -Node: Inexact representation931422 -Node: Comparing FP Values932782 -Node: Errors accumulate933864 -Node: Getting Accuracy935297 -Node: Try To Round938007 -Node: Setting precision938906 -Ref: table-predefined-precision-strings939603 -Node: Setting the rounding mode941433 -Ref: table-gawk-rounding-modes941807 -Ref: Setting the rounding mode-Footnote-1945738 -Node: Arbitrary Precision Integers945917 -Ref: Arbitrary Precision Integers-Footnote-1949092 -Node: Checking for MPFR949241 -Node: POSIX Floating Point Problems950715 -Ref: POSIX Floating Point Problems-Footnote-1955000 -Node: Floating point summary955038 -Node: Dynamic Extensions957228 -Node: Extension Intro958781 -Node: Plugin License960047 -Node: Extension Mechanism Outline960844 -Ref: figure-load-extension961283 -Ref: figure-register-new-function962848 -Ref: figure-call-new-function963940 -Node: Extension API Description966002 -Node: Extension API Functions Introduction967644 -Node: General Data Types973184 -Ref: General Data Types-Footnote-1981545 -Node: Memory Allocation Functions981844 -Ref: Memory Allocation Functions-Footnote-1986054 -Node: Constructor Functions986153 -Node: Registration Functions989739 -Node: Extension Functions990424 -Node: Exit Callback Functions995639 -Node: Extension Version String996889 -Node: Input Parsers997552 -Node: Output Wrappers1010273 -Node: Two-way processors1014785 -Node: Printing Messages1017050 -Ref: Printing Messages-Footnote-11018221 -Node: Updating ERRNO1018374 -Node: Requesting Values1019113 -Ref: table-value-types-returned1019850 -Node: Accessing Parameters1020786 -Node: Symbol Table Access1022021 -Node: Symbol table by name1022533 -Node: Symbol table by cookie1024322 -Ref: Symbol table by cookie-Footnote-11028507 -Node: Cached values1028571 -Ref: Cached values-Footnote-11032107 -Node: Array Manipulation1032260 -Ref: Array Manipulation-Footnote-11033351 -Node: Array Data Types1033388 -Ref: Array Data Types-Footnote-11036046 -Node: Array Functions1036138 -Node: Flattening Arrays1040636 -Node: Creating Arrays1047612 -Node: Redirection API1052379 -Node: Extension API Variables1055212 -Node: Extension Versioning1055923 -Ref: gawk-api-version1056352 -Node: Extension GMP/MPFR Versioning1058083 -Node: Extension API Informational Variables1059711 -Node: Extension API Boilerplate1060784 -Node: Changes from API V11064758 -Node: Finding Extensions1066330 -Node: Extension Example1066889 -Node: Internal File Description1067687 -Node: Internal File Ops1071767 -Ref: Internal File Ops-Footnote-11083117 -Node: Using Internal File Ops1083257 -Ref: Using Internal File Ops-Footnote-11085640 -Node: Extension Samples1085914 -Node: Extension Sample File Functions1087443 -Node: Extension Sample Fnmatch1095092 -Node: Extension Sample Fork1096579 -Node: Extension Sample Inplace1097797 -Node: Extension Sample Ord1101014 -Node: Extension Sample Readdir1101850 -Ref: table-readdir-file-types1102739 -Node: Extension Sample Revout1103544 -Node: Extension Sample Rev2way1104133 -Node: Extension Sample Read write array1104873 -Node: Extension Sample Readfile1106815 -Node: Extension Sample Time1107910 -Node: Extension Sample API Tests1109258 -Node: gawkextlib1109750 -Node: Extension summary1112668 -Node: Extension Exercises1116370 -Node: Language History1117868 -Node: V7/SVR3.11119524 -Node: SVR41121676 -Node: POSIX1123110 -Node: BTL1124490 -Node: POSIX/GNU1125219 -Node: Feature History1130997 -Node: Common Extensions1146856 -Node: Ranges and Locales1148139 -Ref: Ranges and Locales-Footnote-11152755 -Ref: Ranges and Locales-Footnote-21152782 -Ref: Ranges and Locales-Footnote-31153017 -Node: Contributors1153238 -Node: History summary1159183 -Node: Installation1160563 -Node: Gawk Distribution1161507 -Node: Getting1161991 -Node: Extracting1162954 -Node: Distribution contents1164592 -Node: Unix Installation1171072 -Node: Quick Installation1171754 -Node: Shell Startup Files1174168 -Node: Additional Configuration Options1175257 -Node: Configuration Philosophy1177422 -Node: Non-Unix Installation1179791 -Node: PC Installation1180251 -Node: PC Binary Installation1181089 -Node: PC Compiling1181524 -Node: PC Using1182641 -Node: Cygwin1185856 -Node: MSYS1186955 -Node: VMS Installation1187456 -Node: VMS Compilation1188247 -Ref: VMS Compilation-Footnote-11189476 -Node: VMS Dynamic Extensions1189534 -Node: VMS Installation Details1191219 -Node: VMS Running1193472 -Node: VMS GNV1197751 -Node: VMS Old Gawk1198486 -Node: Bugs1198957 -Node: Bug address1199620 -Node: Usenet1202412 -Node: Maintainers1203189 -Node: Other Versions1204450 -Node: Installation summary1211212 -Node: Notes1212414 -Node: Compatibility Mode1213279 -Node: Additions1214061 -Node: Accessing The Source1214986 -Node: Adding Code1216423 -Node: New Ports1222642 -Node: Derived Files1227130 -Ref: Derived Files-Footnote-11232776 -Ref: Derived Files-Footnote-21232811 -Ref: Derived Files-Footnote-31233409 -Node: Future Extensions1233523 -Node: Implementation Limitations1234181 -Node: Extension Design1235364 -Node: Old Extension Problems1236518 -Ref: Old Extension Problems-Footnote-11238036 -Node: Extension New Mechanism Goals1238093 -Ref: Extension New Mechanism Goals-Footnote-11241457 -Node: Extension Other Design Decisions1241646 -Node: Extension Future Growth1243759 -Node: Old Extension Mechanism1244595 -Node: Notes summary1246358 -Node: Basic Concepts1247540 -Node: Basic High Level1248221 -Ref: figure-general-flow1248503 -Ref: figure-process-flow1249188 -Ref: Basic High Level-Footnote-11252489 -Node: Basic Data Typing1252674 -Node: Glossary1256002 -Node: Copying1287840 -Node: GNU Free Documentation License1325383 -Node: Index1350503 +Node: Foreword343320 +Node: Foreword447762 +Node: Preface49294 +Ref: Preface-Footnote-152153 +Ref: Preface-Footnote-252260 +Ref: Preface-Footnote-352494 +Node: History52636 +Node: Names54988 +Ref: Names-Footnote-156082 +Node: This Manual56229 +Ref: This Manual-Footnote-162714 +Node: Conventions62814 +Node: Manual History65169 +Ref: Manual History-Footnote-168166 +Ref: Manual History-Footnote-268207 +Node: How To Contribute68281 +Node: Acknowledgments69207 +Node: Getting Started74115 +Node: Running gawk76554 +Node: One-shot77744 +Node: Read Terminal79007 +Node: Long81000 +Node: Executable Scripts82513 +Ref: Executable Scripts-Footnote-185308 +Node: Comments85411 +Node: Quoting87895 +Node: DOS Quoting93412 +Node: Sample Data Files95468 +Node: Very Simple98063 +Node: Two Rules102965 +Node: More Complex104850 +Node: Statements/Lines107716 +Ref: Statements/Lines-Footnote-1112175 +Node: Other Features112440 +Node: When113376 +Ref: When-Footnote-1115130 +Node: Intro Summary115195 +Node: Invoking Gawk116079 +Node: Command Line117593 +Node: Options118391 +Ref: Options-Footnote-1134953 +Ref: Options-Footnote-2135184 +Node: Other Arguments135209 +Node: Naming Standard Input138156 +Node: Environment Variables139249 +Node: AWKPATH Variable139807 +Ref: AWKPATH Variable-Footnote-1143219 +Ref: AWKPATH Variable-Footnote-2143253 +Node: AWKLIBPATH Variable143514 +Node: Other Environment Variables145172 +Node: Exit Status148993 +Node: Include Files149670 +Node: Loading Shared Libraries153195 +Node: Obsolete154623 +Node: Undocumented155315 +Node: Invoking Summary155612 +Node: Regexp157272 +Node: Regexp Usage158726 +Node: Escape Sequences160763 +Node: Regexp Operators166995 +Ref: Regexp Operators-Footnote-1174411 +Ref: Regexp Operators-Footnote-2174558 +Node: Bracket Expressions174656 +Ref: table-char-classes177132 +Node: Leftmost Longest180458 +Node: Computed Regexps181761 +Node: GNU Regexp Operators185188 +Node: Case-sensitivity188867 +Ref: Case-sensitivity-Footnote-1191754 +Ref: Case-sensitivity-Footnote-2191989 +Node: Regexp Summary192097 +Node: Reading Files193563 +Node: Records195832 +Node: awk split records196907 +Node: gawk split records202182 +Ref: gawk split records-Footnote-1206768 +Node: Fields206805 +Node: Nonconstant Fields209546 +Ref: Nonconstant Fields-Footnote-1211782 +Node: Changing Fields211986 +Node: Field Separators218017 +Node: Default Field Splitting220715 +Node: Regexp Field Splitting221833 +Node: Single Character Fields225186 +Node: Command Line Field Separator226246 +Node: Full Line Fields229464 +Ref: Full Line Fields-Footnote-1230986 +Ref: Full Line Fields-Footnote-2231032 +Node: Field Splitting Summary231133 +Node: Constant Size233207 +Node: Fixed width data233939 +Node: Skipping intervening237406 +Node: Allowing trailing data238204 +Node: Fields with fixed data239241 +Node: Splitting By Content240759 +Ref: Splitting By Content-Footnote-1244409 +Node: Testing field creation244572 +Node: Multiple Line246197 +Ref: Multiple Line-Footnote-1252081 +Node: Getline252260 +Node: Plain Getline254729 +Node: Getline/Variable257370 +Node: Getline/File258521 +Node: Getline/Variable/File259909 +Ref: Getline/Variable/File-Footnote-1261514 +Node: Getline/Pipe261602 +Node: Getline/Variable/Pipe264309 +Node: Getline/Coprocess265444 +Node: Getline/Variable/Coprocess266711 +Node: Getline Notes267453 +Node: Getline Summary270250 +Ref: table-getline-variants270674 +Node: Read Timeout271422 +Ref: Read Timeout-Footnote-1275328 +Node: Retrying Input275386 +Node: Command-line directories276585 +Node: Input Summary277491 +Node: Input Exercises280663 +Node: Printing281391 +Node: Print283225 +Node: Print Examples284682 +Node: Output Separators287462 +Node: OFMT289479 +Node: Printf290835 +Node: Basic Printf291620 +Node: Control Letters293194 +Node: Format Modifiers298321 +Node: Printf Examples304336 +Node: Redirection306822 +Node: Special FD313663 +Ref: Special FD-Footnote-1316831 +Node: Special Files316905 +Node: Other Inherited Files317522 +Node: Special Network318523 +Node: Special Caveats319383 +Node: Close Files And Pipes320332 +Ref: table-close-pipe-return-values327239 +Ref: Close Files And Pipes-Footnote-1328052 +Ref: Close Files And Pipes-Footnote-2328200 +Node: Nonfatal328352 +Node: Output Summary330690 +Node: Output Exercises331912 +Node: Expressions332591 +Node: Values333779 +Node: Constants334457 +Node: Scalar Constants335148 +Ref: Scalar Constants-Footnote-1337673 +Node: Nondecimal-numbers337923 +Node: Regexp Constants340924 +Node: Using Constant Regexps341450 +Node: Standard Regexp Constants342072 +Node: Strong Regexp Constants345260 +Node: Variables348218 +Node: Using Variables348875 +Node: Assignment Options350785 +Node: Conversion352658 +Node: Strings And Numbers353182 +Ref: Strings And Numbers-Footnote-1356245 +Node: Locale influences conversions356354 +Ref: table-locale-affects359112 +Node: All Operators359730 +Node: Arithmetic Ops360359 +Node: Concatenation362865 +Ref: Concatenation-Footnote-1365712 +Node: Assignment Ops365819 +Ref: table-assign-ops370810 +Node: Increment Ops372123 +Node: Truth Values and Conditions375583 +Node: Truth Values376657 +Node: Typing and Comparison377705 +Node: Variable Typing378525 +Ref: Variable Typing-Footnote-1384988 +Ref: Variable Typing-Footnote-2385060 +Node: Comparison Operators385137 +Ref: table-relational-ops385556 +Node: POSIX String Comparison389051 +Ref: POSIX String Comparison-Footnote-1390746 +Ref: POSIX String Comparison-Footnote-2390885 +Node: Boolean Ops390969 +Ref: Boolean Ops-Footnote-1395451 +Node: Conditional Exp395543 +Node: Function Calls397279 +Node: Precedence401156 +Node: Locales404815 +Node: Expressions Summary406447 +Node: Patterns and Actions409020 +Node: Pattern Overview410140 +Node: Regexp Patterns411817 +Node: Expression Patterns412359 +Node: Ranges416140 +Node: BEGIN/END419248 +Node: Using BEGIN/END420009 +Ref: Using BEGIN/END-Footnote-1422745 +Node: I/O And BEGIN/END422851 +Node: BEGINFILE/ENDFILE425165 +Node: Empty428078 +Node: Using Shell Variables428395 +Node: Action Overview430669 +Node: Statements432994 +Node: If Statement434842 +Node: While Statement436337 +Node: Do Statement438365 +Node: For Statement439513 +Node: Switch Statement442684 +Node: Break Statement445070 +Node: Continue Statement447162 +Node: Next Statement448989 +Node: Nextfile Statement451372 +Node: Exit Statement454024 +Node: Built-in Variables456427 +Node: User-modified457560 +Node: Auto-set465327 +Ref: Auto-set-Footnote-1481629 +Ref: Auto-set-Footnote-2481835 +Node: ARGC and ARGV481891 +Node: Pattern Action Summary486104 +Node: Arrays488534 +Node: Array Basics489863 +Node: Array Intro490707 +Ref: figure-array-elements492682 +Ref: Array Intro-Footnote-1495386 +Node: Reference to Elements495514 +Node: Assigning Elements497978 +Node: Array Example498469 +Node: Scanning an Array500228 +Node: Controlling Scanning503250 +Ref: Controlling Scanning-Footnote-1508649 +Node: Numeric Array Subscripts508965 +Node: Uninitialized Subscripts511149 +Node: Delete512768 +Ref: Delete-Footnote-1515520 +Node: Multidimensional515577 +Node: Multiscanning518672 +Node: Arrays of Arrays520263 +Node: Arrays Summary525030 +Node: Functions527123 +Node: Built-in528161 +Node: Calling Built-in529242 +Node: Numeric Functions531238 +Ref: Numeric Functions-Footnote-1535266 +Ref: Numeric Functions-Footnote-2535623 +Ref: Numeric Functions-Footnote-3535671 +Node: String Functions535943 +Ref: String Functions-Footnote-1559652 +Ref: String Functions-Footnote-2559780 +Ref: String Functions-Footnote-3560028 +Node: Gory Details560115 +Ref: table-sub-escapes561906 +Ref: table-sub-proposed563425 +Ref: table-posix-sub564788 +Ref: table-gensub-escapes566329 +Ref: Gory Details-Footnote-1567152 +Node: I/O Functions567306 +Ref: table-system-return-values573774 +Ref: I/O Functions-Footnote-1575854 +Ref: I/O Functions-Footnote-2576002 +Node: Time Functions576122 +Ref: Time Functions-Footnote-1586793 +Ref: Time Functions-Footnote-2586861 +Ref: Time Functions-Footnote-3587019 +Ref: Time Functions-Footnote-4587130 +Ref: Time Functions-Footnote-5587242 +Ref: Time Functions-Footnote-6587469 +Node: Bitwise Functions587735 +Ref: table-bitwise-ops588329 +Ref: Bitwise Functions-Footnote-1594392 +Ref: Bitwise Functions-Footnote-2594565 +Node: Type Functions594756 +Node: I18N Functions597507 +Node: User-defined599158 +Node: Definition Syntax599963 +Ref: Definition Syntax-Footnote-1605650 +Node: Function Example605721 +Ref: Function Example-Footnote-1608643 +Node: Function Caveats608665 +Node: Calling A Function609183 +Node: Variable Scope610141 +Node: Pass By Value/Reference613135 +Node: Return Statement616634 +Node: Dynamic Typing619613 +Node: Indirect Calls620543 +Ref: Indirect Calls-Footnote-1630795 +Node: Functions Summary630923 +Node: Library Functions633628 +Ref: Library Functions-Footnote-1637235 +Ref: Library Functions-Footnote-2637378 +Node: Library Names637549 +Ref: Library Names-Footnote-1641009 +Ref: Library Names-Footnote-2641232 +Node: General Functions641318 +Node: Strtonum Function642421 +Node: Assert Function645443 +Node: Round Function648769 +Node: Cliff Random Function650309 +Node: Ordinal Functions651325 +Ref: Ordinal Functions-Footnote-1654388 +Ref: Ordinal Functions-Footnote-2654640 +Node: Join Function654850 +Ref: Join Function-Footnote-1656620 +Node: Getlocaltime Function656820 +Node: Readfile Function660562 +Node: Shell Quoting662539 +Node: Data File Management663940 +Node: Filetrans Function664572 +Node: Rewind Function668668 +Node: File Checking670578 +Ref: File Checking-Footnote-1671912 +Node: Empty Files672113 +Node: Ignoring Assigns674092 +Node: Getopt Function675642 +Ref: Getopt Function-Footnote-1687111 +Node: Passwd Functions687311 +Ref: Passwd Functions-Footnote-1696150 +Node: Group Functions696238 +Ref: Group Functions-Footnote-1704136 +Node: Walking Arrays704343 +Node: Library Functions Summary707351 +Node: Library Exercises708757 +Node: Sample Programs709222 +Node: Running Examples709992 +Node: Clones710720 +Node: Cut Program711944 +Node: Egrep Program721873 +Ref: Egrep Program-Footnote-1729385 +Node: Id Program729495 +Node: Split Program733175 +Ref: Split Program-Footnote-1736633 +Node: Tee Program736762 +Node: Uniq Program739552 +Node: Wc Program746978 +Ref: Wc Program-Footnote-1751233 +Node: Miscellaneous Programs751327 +Node: Dupword Program752540 +Node: Alarm Program754570 +Node: Translate Program759425 +Ref: Translate Program-Footnote-1763990 +Node: Labels Program764260 +Ref: Labels Program-Footnote-1767611 +Node: Word Sorting767695 +Node: History Sorting771767 +Node: Extract Program773602 +Node: Simple Sed781656 +Node: Igawk Program784730 +Ref: Igawk Program-Footnote-1799061 +Ref: Igawk Program-Footnote-2799263 +Ref: Igawk Program-Footnote-3799385 +Node: Anagram Program799500 +Node: Signature Program802562 +Node: Programs Summary803809 +Node: Programs Exercises805023 +Ref: Programs Exercises-Footnote-1809152 +Node: Advanced Features809243 +Node: Nondecimal Data811233 +Node: Array Sorting812824 +Node: Controlling Array Traversal813524 +Ref: Controlling Array Traversal-Footnote-1821892 +Node: Array Sorting Functions822010 +Ref: Array Sorting Functions-Footnote-1827101 +Node: Two-way I/O827297 +Ref: Two-way I/O-Footnote-1835017 +Ref: Two-way I/O-Footnote-2835204 +Node: TCP/IP Networking835286 +Node: Profiling838404 +Ref: Profiling-Footnote-1847076 +Node: Advanced Features Summary847399 +Node: Internationalization849243 +Node: I18N and L10N850723 +Node: Explaining gettext851410 +Ref: Explaining gettext-Footnote-1857302 +Ref: Explaining gettext-Footnote-2857487 +Node: Programmer i18n857652 +Ref: Programmer i18n-Footnote-1862601 +Node: Translator i18n862650 +Node: String Extraction863444 +Ref: String Extraction-Footnote-1864576 +Node: Printf Ordering864662 +Ref: Printf Ordering-Footnote-1867448 +Node: I18N Portability867512 +Ref: I18N Portability-Footnote-1869968 +Node: I18N Example870031 +Ref: I18N Example-Footnote-1872837 +Node: Gawk I18N872910 +Node: I18N Summary873555 +Node: Debugger874896 +Node: Debugging875919 +Node: Debugging Concepts876360 +Node: Debugging Terms878169 +Node: Awk Debugging880744 +Node: Sample Debugging Session881650 +Node: Debugger Invocation882184 +Node: Finding The Bug883570 +Node: List of Debugger Commands890048 +Node: Breakpoint Control891381 +Node: Debugger Execution Control895075 +Node: Viewing And Changing Data898437 +Node: Execution Stack901811 +Node: Debugger Info903448 +Node: Miscellaneous Debugger Commands907519 +Node: Readline Support912581 +Node: Limitations913477 +Node: Debugging Summary915586 +Node: Arbitrary Precision Arithmetic916865 +Node: Computer Arithmetic918350 +Ref: table-numeric-ranges922116 +Ref: table-floating-point-ranges922609 +Ref: Computer Arithmetic-Footnote-1923267 +Node: Math Definitions923324 +Ref: table-ieee-formats926640 +Ref: Math Definitions-Footnote-1927243 +Node: MPFR features927348 +Node: FP Math Caution929066 +Ref: FP Math Caution-Footnote-1930138 +Node: Inexactness of computations930507 +Node: Inexact representation931467 +Node: Comparing FP Values932827 +Node: Errors accumulate934068 +Node: Getting Accuracy935501 +Node: Try To Round938211 +Node: Setting precision939110 +Ref: table-predefined-precision-strings939807 +Node: Setting the rounding mode941637 +Ref: table-gawk-rounding-modes942011 +Ref: Setting the rounding mode-Footnote-1945942 +Node: Arbitrary Precision Integers946121 +Ref: Arbitrary Precision Integers-Footnote-1949296 +Node: Checking for MPFR949445 +Node: POSIX Floating Point Problems950919 +Ref: POSIX Floating Point Problems-Footnote-1955204 +Node: Floating point summary955242 +Node: Dynamic Extensions957432 +Node: Extension Intro958985 +Node: Plugin License960251 +Node: Extension Mechanism Outline961048 +Ref: figure-load-extension961487 +Ref: figure-register-new-function963052 +Ref: figure-call-new-function964144 +Node: Extension API Description966206 +Node: Extension API Functions Introduction967848 +Node: General Data Types973388 +Ref: General Data Types-Footnote-1981749 +Node: Memory Allocation Functions982048 +Ref: Memory Allocation Functions-Footnote-1986258 +Node: Constructor Functions986357 +Node: Registration Functions989943 +Node: Extension Functions990628 +Node: Exit Callback Functions995843 +Node: Extension Version String997093 +Node: Input Parsers997756 +Node: Output Wrappers1010477 +Node: Two-way processors1014989 +Node: Printing Messages1017254 +Ref: Printing Messages-Footnote-11018425 +Node: Updating ERRNO1018578 +Node: Requesting Values1019317 +Ref: table-value-types-returned1020054 +Node: Accessing Parameters1020990 +Node: Symbol Table Access1022225 +Node: Symbol table by name1022737 +Node: Symbol table by cookie1024526 +Ref: Symbol table by cookie-Footnote-11028711 +Node: Cached values1028775 +Ref: Cached values-Footnote-11032311 +Node: Array Manipulation1032464 +Ref: Array Manipulation-Footnote-11033555 +Node: Array Data Types1033592 +Ref: Array Data Types-Footnote-11036250 +Node: Array Functions1036342 +Node: Flattening Arrays1040840 +Node: Creating Arrays1047816 +Node: Redirection API1052583 +Node: Extension API Variables1055416 +Node: Extension Versioning1056127 +Ref: gawk-api-version1056556 +Node: Extension GMP/MPFR Versioning1058287 +Node: Extension API Informational Variables1059915 +Node: Extension API Boilerplate1060988 +Node: Changes from API V11064962 +Node: Finding Extensions1066534 +Node: Extension Example1067093 +Node: Internal File Description1067891 +Node: Internal File Ops1071971 +Ref: Internal File Ops-Footnote-11083321 +Node: Using Internal File Ops1083461 +Ref: Using Internal File Ops-Footnote-11085844 +Node: Extension Samples1086118 +Node: Extension Sample File Functions1087647 +Node: Extension Sample Fnmatch1095296 +Node: Extension Sample Fork1096783 +Node: Extension Sample Inplace1098001 +Node: Extension Sample Ord1101218 +Node: Extension Sample Readdir1102054 +Ref: table-readdir-file-types1102943 +Node: Extension Sample Revout1103748 +Node: Extension Sample Rev2way1104337 +Node: Extension Sample Read write array1105077 +Node: Extension Sample Readfile1107019 +Node: Extension Sample Time1108114 +Node: Extension Sample API Tests1109462 +Node: gawkextlib1109954 +Node: Extension summary1112872 +Node: Extension Exercises1116574 +Node: Language History1118072 +Node: V7/SVR3.11119728 +Node: SVR41121880 +Node: POSIX1123314 +Node: BTL1124694 +Node: POSIX/GNU1125423 +Node: Feature History1131201 +Node: Common Extensions1147060 +Node: Ranges and Locales1148343 +Ref: Ranges and Locales-Footnote-11152959 +Ref: Ranges and Locales-Footnote-21152986 +Ref: Ranges and Locales-Footnote-31153221 +Node: Contributors1153442 +Node: History summary1159387 +Node: Installation1160767 +Node: Gawk Distribution1161711 +Node: Getting1162195 +Node: Extracting1163158 +Node: Distribution contents1164796 +Node: Unix Installation1171276 +Node: Quick Installation1171958 +Node: Shell Startup Files1174372 +Node: Additional Configuration Options1175461 +Node: Configuration Philosophy1177626 +Node: Non-Unix Installation1179995 +Node: PC Installation1180455 +Node: PC Binary Installation1181293 +Node: PC Compiling1181728 +Node: PC Using1182845 +Node: Cygwin1186060 +Node: MSYS1187159 +Node: VMS Installation1187660 +Node: VMS Compilation1188451 +Ref: VMS Compilation-Footnote-11189680 +Node: VMS Dynamic Extensions1189738 +Node: VMS Installation Details1191423 +Node: VMS Running1193676 +Node: VMS GNV1197955 +Node: VMS Old Gawk1198690 +Node: Bugs1199161 +Node: Bug address1199824 +Node: Usenet1202616 +Node: Maintainers1203393 +Node: Other Versions1204654 +Node: Installation summary1211416 +Node: Notes1212618 +Node: Compatibility Mode1213412 +Node: Additions1214194 +Node: Accessing The Source1215119 +Node: Adding Code1216556 +Node: New Ports1222775 +Node: Derived Files1227263 +Ref: Derived Files-Footnote-11232909 +Ref: Derived Files-Footnote-21232944 +Ref: Derived Files-Footnote-31233542 +Node: Future Extensions1233656 +Node: Implementation Limitations1234314 +Node: Extension Design1235497 +Node: Old Extension Problems1236641 +Ref: Old Extension Problems-Footnote-11238159 +Node: Extension New Mechanism Goals1238216 +Ref: Extension New Mechanism Goals-Footnote-11241580 +Node: Extension Other Design Decisions1241769 +Node: Extension Future Growth1243882 +Node: Notes summary1244718 +Node: Basic Concepts1245893 +Node: Basic High Level1246574 +Ref: figure-general-flow1246856 +Ref: figure-process-flow1247541 +Ref: Basic High Level-Footnote-11250842 +Node: Basic Data Typing1251027 +Node: Glossary1254355 +Node: Copying1286193 +Node: GNU Free Documentation License1323736 +Node: Index1348856 End Tag Table diff --git a/doc/gawk.texi b/doc/gawk.texi index 1ad59242..17049b43 100644 --- a/doc/gawk.texi +++ b/doc/gawk.texi @@ -1056,7 +1056,6 @@ particular records in a file and perform operations upon them. * Extension New Mechanism Goals:: Goals for the new mechanism. * Extension Other Design Decisions:: Some other design decisions. * Extension Future Growth:: Some room for future growth. -* Old Extension Mechanism:: Some compatibility for old extensions. * Notes summary:: Summary of implementation notes. * Basic High Level:: The high level view. * Basic Data Typing:: A very quick intro to data types. @@ -5840,10 +5839,9 @@ range of the ASCII character set. Use a complemented character list in the ASCII range. @quotation NOTE -As of this writing (May 2018), Brian Kernighan's @command{awk} treats -@code{[:blank:]} like @code{[:space:]}, incorrectly matching -more characters than it should. We have submitted a patch to him, -and hope that this will be fixed. +Some older versions of Unix @command{awk} +treat @code{[:blank:]} like @code{[:space:]}, incorrectly matching +more characters than they should. Caveat Emptor. @end quotation @cindex bracket expressions, collating elements @@ -7123,6 +7121,8 @@ $ @kbd{echo a b c d e f | awk '@{ print "NF =", NF;} @quotation CAUTION Some versions of @command{awk} don't rebuild @code{$0} when @code{NF} is decremented. +Until August, 2018, this included BWK @command{awk}; fortunately +his version now handles this correctly. @end quotation Finally, there are times when it is convenient to force @@ -11073,6 +11073,9 @@ $ @kbd{gawk 'BEGIN @{ print "hello, \} @print{} hello, world @end example +In POSIX mode (@pxref{Options}), @command{gawk} does not +allow escaped newlines. Otherwise, it behaves as just described. + Brian Kernighan's @command{awk} and Busybox @command{awk} remove the backslash but leave the newline intact, as part of the string: @@ -11084,10 +11087,6 @@ $ @kbd{nawk 'BEGIN @{ print "hello, \} @print{} world @end example -In POSIX mode (@pxref{Options}), @command{gawk} does not -allow escaped newlines. Otherwise, it behaves as -just described. - @node Nondecimal-numbers @subsubsection Octal and Hexadecimal Numbers @cindex octal numbers @@ -19297,6 +19296,9 @@ The return values are summarized in @ref{table-system-return-values}. @end float @end table +As of August, 2018, BWK @command{awk} now follows @command{gawk}'s behavior +for the return value of @code{system()}. + @cindex sidebar, Controlling Output Buffering with @code{system()} @ifdocbook @docbook @@ -31996,7 +31998,7 @@ this looks something like the following: @example @group delta = 0.00001 # for example -difference = abs(a) - abs(b) # subtract the two values +difference = abs(a - b) # subtract the two values if (difference < delta) # all ok else @@ -32006,7 +32008,10 @@ else @noindent (We assume that you have a simple absolute value function named -@code{abs()} defined elsewhere in your program.) +@code{abs()} defined elsewhere in your program.) If you write a +function to compare values with a delta, you should be sure +to use @samp{difference < abs(delta)} in case someone passes +in a negative delta value. @node Errors accumulate @subsubsection Errors Accumulate @@ -40906,7 +40911,6 @@ maintainers of @command{gawk}. Everything in it applies specifically to * Future Extensions:: New features that may be implemented one day. * Implementation Limitations:: Some limitations of the implementation. * Extension Design:: Design notes about the extension API. -* Old Extension Mechanism:: Some compatibility for old extensions. * Notes summary:: Summary of implementation notes. @end menu @@ -41803,42 +41807,6 @@ conflicts. Of course, as of this writing, no decisions have been made with respect to any of the above. -@node Old Extension Mechanism -@appendixsec Compatibility For Old Extensions - -@ref{Dynamic Extensions}, describes the supported API and mechanisms -for writing extensions for @command{gawk}. This API was introduced -in @value{PVERSION} 4.1. However, for many years @command{gawk} -provided an extension mechanism that required knowledge of @command{gawk} -internals and that was not as well designed. - -In order to provide a transition period, @command{gawk} @value{PVERSION} 4.1 -continues to support the original extension mechanism. -This will be true for the life of exactly one major release. This support -will be withdrawn, and removed from the source code, at the next major -release. - -Briefly, original-style extensions should be compiled by including the -@file{awk.h} header file in the extension source code. Additionally, -you must define the identifier @samp{GAWK} when building (use -@samp{-DGAWK} with Unix-style compilers). Otherwise, the definitions -in @file{gawkapi.h} will cause conflicts with those in @file{awk.h} -and your extension will not compile. - -Just as in previous versions, you load an old-style extension with the -@code{extension()} built-in function (which is not otherwise documented). -This function in turn finds and loads the shared object file containing -the extension and calls its @code{dl_load()} C routine. - -Because original-style and new-style extensions use different initialization -routines (@code{dl_load()} versus @code{dlload()}), they may safely -be installed in the same directory (to be found by @env{AWKLIBPATH}) -without conflict. - -The @command{gawk} development team strongly recommends that you -convert any old extensions that you may have to use the new API -described in @ref{Dynamic Extensions}. - @node Notes summary @appendixsec Summary diff --git a/doc/gawktexi.in b/doc/gawktexi.in index b56a8364..1b206ba1 100644 --- a/doc/gawktexi.in +++ b/doc/gawktexi.in @@ -1051,7 +1051,6 @@ particular records in a file and perform operations upon them. * Extension New Mechanism Goals:: Goals for the new mechanism. * Extension Other Design Decisions:: Some other design decisions. * Extension Future Growth:: Some room for future growth. -* Old Extension Mechanism:: Some compatibility for old extensions. * Notes summary:: Summary of implementation notes. * Basic High Level:: The high level view. * Basic Data Typing:: A very quick intro to data types. @@ -5667,10 +5666,9 @@ range of the ASCII character set. Use a complemented character list in the ASCII range. @quotation NOTE -As of this writing (May 2018), Brian Kernighan's @command{awk} treats -@code{[:blank:]} like @code{[:space:]}, incorrectly matching -more characters than it should. We have submitted a patch to him, -and hope that this will be fixed. +Some older versions of Unix @command{awk} +treat @code{[:blank:]} like @code{[:space:]}, incorrectly matching +more characters than they should. Caveat Emptor. @end quotation @cindex bracket expressions, collating elements @@ -6849,6 +6847,8 @@ $ @kbd{echo a b c d e f | awk '@{ print "NF =", NF;} @quotation CAUTION Some versions of @command{awk} don't rebuild @code{$0} when @code{NF} is decremented. +Until August, 2018, this included BWK @command{awk}; fortunately +his version now handles this correctly. @end quotation Finally, there are times when it is convenient to force @@ -10559,6 +10559,9 @@ $ @kbd{gawk 'BEGIN @{ print "hello, \} @print{} hello, world @end example +In POSIX mode (@pxref{Options}), @command{gawk} does not +allow escaped newlines. Otherwise, it behaves as just described. + Brian Kernighan's @command{awk} and Busybox @command{awk} remove the backslash but leave the newline intact, as part of the string: @@ -10570,10 +10573,6 @@ $ @kbd{nawk 'BEGIN @{ print "hello, \} @print{} world @end example -In POSIX mode (@pxref{Options}), @command{gawk} does not -allow escaped newlines. Otherwise, it behaves as -just described. - @node Nondecimal-numbers @subsubsection Octal and Hexadecimal Numbers @cindex octal numbers @@ -18479,6 +18478,9 @@ The return values are summarized in @ref{table-system-return-values}. @end float @end table +As of August, 2018, BWK @command{awk} now follows @command{gawk}'s behavior +for the return value of @code{system()}. + @sidebar Controlling Output Buffering with @code{system()} @cindex buffers, flushing @cindex buffering, input/output @@ -31009,7 +31011,7 @@ this looks something like the following: @example @group delta = 0.00001 # for example -difference = abs(a) - abs(b) # subtract the two values +difference = abs(a - b) # subtract the two values if (difference < delta) # all ok else @@ -31019,7 +31021,10 @@ else @noindent (We assume that you have a simple absolute value function named -@code{abs()} defined elsewhere in your program.) +@code{abs()} defined elsewhere in your program.) If you write a +function to compare values with a delta, you should be sure +to use @samp{difference < abs(delta)} in case someone passes +in a negative delta value. @node Errors accumulate @subsubsection Errors Accumulate @@ -39880,7 +39885,6 @@ maintainers of @command{gawk}. Everything in it applies specifically to * Future Extensions:: New features that may be implemented one day. * Implementation Limitations:: Some limitations of the implementation. * Extension Design:: Design notes about the extension API. -* Old Extension Mechanism:: Some compatibility for old extensions. * Notes summary:: Summary of implementation notes. @end menu @@ -40777,42 +40781,6 @@ conflicts. Of course, as of this writing, no decisions have been made with respect to any of the above. -@node Old Extension Mechanism -@appendixsec Compatibility For Old Extensions - -@ref{Dynamic Extensions}, describes the supported API and mechanisms -for writing extensions for @command{gawk}. This API was introduced -in @value{PVERSION} 4.1. However, for many years @command{gawk} -provided an extension mechanism that required knowledge of @command{gawk} -internals and that was not as well designed. - -In order to provide a transition period, @command{gawk} @value{PVERSION} 4.1 -continues to support the original extension mechanism. -This will be true for the life of exactly one major release. This support -will be withdrawn, and removed from the source code, at the next major -release. - -Briefly, original-style extensions should be compiled by including the -@file{awk.h} header file in the extension source code. Additionally, -you must define the identifier @samp{GAWK} when building (use -@samp{-DGAWK} with Unix-style compilers). Otherwise, the definitions -in @file{gawkapi.h} will cause conflicts with those in @file{awk.h} -and your extension will not compile. - -Just as in previous versions, you load an old-style extension with the -@code{extension()} built-in function (which is not otherwise documented). -This function in turn finds and loads the shared object file containing -the extension and calls its @code{dl_load()} C routine. - -Because original-style and new-style extensions use different initialization -routines (@code{dl_load()} versus @code{dlload()}), they may safely -be installed in the same directory (to be found by @env{AWKLIBPATH}) -without conflict. - -The @command{gawk} development team strongly recommends that you -convert any old extensions that you may have to use the new API -described in @ref{Dynamic Extensions}. - @node Notes summary @appendixsec Summary diff --git a/extension/build-aux/ChangeLog b/extension/build-aux/ChangeLog index 1e8806d5..8f363680 100644 --- a/extension/build-aux/ChangeLog +++ b/extension/build-aux/ChangeLog @@ -1,3 +1,7 @@ +2018-08-24 Arnold D. Robbins <arnold@skeeve.com> + + * config.sub: Updated from GNULIB. + 2018-08-17 Arnold D. Robbins <arnold@skeeve.com> * config.sub: Updated from GNULIB. diff --git a/extension/build-aux/config.sub b/extension/build-aux/config.sub index 6e8fa655..562f38f1 100755 --- a/extension/build-aux/config.sub +++ b/extension/build-aux/config.sub @@ -692,6 +692,9 @@ case $basic_machine in mac | mpw | mac-mpw) basic_machine=m68k-apple ;; + microblaze | microblazeel) + basic_machine=$basic_machine-xilinx + ;; pmac | pmac-mpw) basic_machine=powerpc-apple ;; @@ -699,226 +702,13 @@ case $basic_machine in basic_machine=xps100-honeywell ;; - # Recognize the basic CPU types without company name. - # Some are omitted here because they have special meanings below. - 1750a | 580 \ - | a29k \ - | aarch64 | aarch64_be \ - | abacus \ - | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ - | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ - | am33_2.0 \ - | arc | arceb \ - | arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv6m | armv[78][arm] \ - | avr | avr32 \ - | asmjs \ - | ba \ - | be32 | be64 \ - | bfin \ - | c4x | c8051 | clipper | csky \ - | d10v | d30v | dlx | dsp16xx \ - | e2k | epiphany \ - | fido | fr30 | frv | ft32 \ - | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ - | hexagon \ - | i370 | i860 | i960 | ia16 | ia64 \ - | ip2k | iq2000 \ - | k1om \ - | le32 | le64 \ - | lm32 \ - | m32c | m32r | m32rle | m68000 | m68k | m88k \ - | m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip \ - | maxq | mb | microblaze | microblazeel | mcore | mep | metag \ - | mips | mipsbe | mipseb | mipsel | mipsle \ - | mips16 \ - | mips64 | mips64el \ - | mips64octeon | mips64octeonel \ - | mips64orion | mips64orionel \ - | mips64r5900 | mips64r5900el \ - | mips64vr | mips64vrel \ - | mips64vr4100 | mips64vr4100el \ - | mips64vr4300 | mips64vr4300el \ - | mips64vr5000 | mips64vr5000el \ - | mips64vr5900 | mips64vr5900el \ - | mipsisa32 | mipsisa32el \ - | mipsisa32r2 | mipsisa32r2el \ - | mipsisa32r6 | mipsisa32r6el \ - | mipsisa64 | mipsisa64el \ - | mipsisa64r2 | mipsisa64r2el \ - | mipsisa64r6 | mipsisa64r6el \ - | mipsisa64sb1 | mipsisa64sb1el \ - | mipsisa64sr71k | mipsisa64sr71kel \ - | mipsr5900 | mipsr5900el \ - | mipstx39 | mipstx39el \ - | mn10200 | mn10300 \ - | moxie \ - | mt \ - | msp430 \ - | nds32 | nds32le | nds32be \ - | nfp \ - | nios | nios2 | nios2eb | nios2el \ - | ns16k | ns32k \ - | open8 | or1k | or1knd | or32 \ - | pdp10 | pj | pjl \ - | powerpc | powerpc64 | powerpc64le | powerpcle \ - | pru \ - | pyramid \ - | riscv | riscv32 | riscv64 \ - | rl78 | rx \ - | score \ - | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[234]eb | sheb | shbe | shle | sh[1234]le | sh[23]ele \ - | sh64 | sh64le \ - | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ - | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ - | spu \ - | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \ - | ubicom32 \ - | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \ - | visium \ - | wasm32 \ - | x86 | xc16x | xstormy16 | xgate | xtensa \ - | z8k | z80) - basic_machine=$basic_machine-unknown - ;; - c54x) - basic_machine=tic54x-unknown - ;; - c55x) - basic_machine=tic55x-unknown - ;; - c6x) - basic_machine=tic6x-unknown - ;; - leon|leon[3-9]) - basic_machine=sparc-$basic_machine - ;; - m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65) - ;; - m9s12z | m68hcs12z | hcs12z | s12z) - basic_machine=s12z-unknown - ;; - m9s12z-* | m68hcs12z-* | hcs12z-* | s12z-*) - basic_machine=s12z-`echo "$basic_machine" | sed 's/^[^-]*-//'` - ;; - ms1) - basic_machine=mt-unknown - ;; - strongarm | thumb | xscale) - basic_machine=arm-unknown - ;; - xscaleeb) - basic_machine=armeb-unknown - ;; - - xscaleel) - basic_machine=armel-unknown - ;; - # We use `pc' rather than `unknown' # because (1) that's what they normally are, and # (2) the word "unknown" tends to confuse beginning users. i*86 | x86_64) basic_machine=$basic_machine-pc ;; - # Recognize the basic CPU types with company name. - 1750a-* | 580-* \ - | a29k-* \ - | aarch64-* | aarch64_be-* \ - | abacus-* \ - | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ - | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ - | alphapca5[67]-* | alpha64pca5[67]-* \ - | am33_2.0-* \ - | arc-* | arceb-* \ - | arm-* | arm[lb]e-* | arme[lb]-* | armv*-* \ - | avr-* | avr32-* \ - | asmjs-* \ - | ba-* \ - | be32-* | be64-* \ - | bfin-* | bs2000-* \ - | c[123]* | c30-* | [cjt]90-* | c4x-* \ - | c8051-* | clipper-* | craynv-* | csky-* | cydra-* \ - | d10v-* | d30v-* | dlx-* | dsp16xx-* \ - | e2k-* | elxsi-* | epiphany-* \ - | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | ft32-* | fx80-* \ - | h8300-* | h8500-* \ - | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ - | hexagon-* \ - | i370-* | i*86-* | i860-* | i960-* | ia16-* | ia64-* \ - | ip2k-* | iq2000-* \ - | k1om-* \ - | le32-* | le64-* \ - | lm32-* \ - | m32c-* | m32r-* | m32rle-* \ - | m5200-* | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* | v70-* | w65-* \ - | m6811-* | m68hc11-* | m6812-* | m68hc12-* | m68hcs12x-* | nvptx-* | picochip-* \ - | m88110-* | m88k-* | maxq-* | mb-* | mcore-* | mep-* | metag-* \ - | microblaze-* | microblazeel-* \ - | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ - | mips16-* \ - | mips64-* | mips64el-* \ - | mips64octeon-* | mips64octeonel-* \ - | mips64orion-* | mips64orionel-* \ - | mips64r5900-* | mips64r5900el-* \ - | mips64vr-* | mips64vrel-* \ - | mips64vr4100-* | mips64vr4100el-* \ - | mips64vr4300-* | mips64vr4300el-* \ - | mips64vr5000-* | mips64vr5000el-* \ - | mips64vr5900-* | mips64vr5900el-* \ - | mipsisa32-* | mipsisa32el-* \ - | mipsisa32r2-* | mipsisa32r2el-* \ - | mipsisa32r6-* | mipsisa32r6el-* \ - | mipsisa64-* | mipsisa64el-* \ - | mipsisa64r2-* | mipsisa64r2el-* \ - | mipsisa64r6-* | mipsisa64r6el-* \ - | mipsisa64sb1-* | mipsisa64sb1el-* \ - | mipsisa64sr71k-* | mipsisa64sr71kel-* \ - | mipsr5900-* | mipsr5900el-* \ - | mipstx39-* | mipstx39el-* \ - | mmix-* \ - | mn10200-* | mn10300-* \ - | moxie-* \ - | mt-* \ - | msp430-* \ - | nds32-* | nds32le-* | nds32be-* \ - | nfp-* \ - | nios-* | nios2-* | nios2eb-* | nios2el-* \ - | none-* | np1-* | ns16k-* | ns32k-* \ - | open8-* \ - | or1k*-* \ - | or32-* \ - | orion-* \ - | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ - | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \ - | pru-* \ - | pyramid-* \ - | riscv-* | riscv32-* | riscv64-* \ - | rl78-* | romp-* | rs6000-* | rx-* \ - | score-* \ - | sh-* | sh[1234]-* | sh[24]a-* | sh[24]ae[lb]-* | sh[23]e-* | she[lb]-* | sh[lb]e-* \ - | sh[1234]e[lb]-* | sh[12345][lb]e-* | sh[23]ele-* | sh64-* | sh64le-* \ - | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ - | sparclite-* \ - | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx*-* \ - | spu-* \ - | tahoe-* \ - | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ - | tron-* \ - | ubicom32-* \ - | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \ - | vax-* \ - | visium-* \ - | wasm32-* \ - | we32k-* \ - | x86-* | x86_64-* | xc16x-* | xgate-* | xps100-* \ - | xstormy16-* | xtensa*-* \ - | ymp-* \ - | z8k-* | z80-*) - ;; - # Recognize the basic CPU types without company name, with glob match. - xtensa*) - basic_machine=$basic_machine-unknown - ;; + # Recognize the various machine names and aliases which stand # for a CPU type and a company and sometimes even an OS. 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) @@ -964,6 +754,9 @@ case $basic_machine in cris | cris-* | etrax*) basic_machine=cris-axis ;; + crx-*) + os=${os:-elf} + ;; crx) basic_machine=crx-unknown os=${os:-elf} @@ -1079,9 +872,6 @@ case $basic_machine in basic_machine=m68k-`echo "$basic_machine" | sed 's/^[^-]*-//'` os=linux ;; - microblaze*) - basic_machine=microblaze-xilinx - ;; miniframe) basic_machine=m68000-convergent ;; @@ -1272,9 +1062,8 @@ case $basic_machine in vpp*|vx|vx-*) basic_machine=f301-fujitsu ;; - w65*) + w65) basic_machine=w65-wdc - os=none ;; w89k-*) basic_machine=hppa1.1-winbond @@ -1290,6 +1079,217 @@ case $basic_machine in basic_machine=none-none ;; + # Recognize the basic CPU types with company name. + 1750a-* | 580-* \ + | a29k-* \ + | aarch64-* | aarch64_be-* \ + | abacus-* \ + | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ + | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ + | alphapca5[67]-* | alpha64pca5[67]-* \ + | am33_2.0-* \ + | arc-* | arceb-* \ + | arm-* | arm[lb]e-* | arme[lb]-* | armv*-* \ + | avr-* | avr32-* \ + | asmjs-* \ + | ba-* \ + | be32-* | be64-* \ + | bfin-* | bs2000-* \ + | c[123]* | c30-* | [cjt]90-* | c4x-* \ + | c8051-* | clipper-* | craynv-* | csky-* | cydra-* \ + | d10v-* | d30v-* | dlx-* | dsp16xx-* \ + | e2k-* | elxsi-* | epiphany-* \ + | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | ft32-* | fx80-* \ + | h8300-* | h8500-* \ + | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ + | hexagon-* \ + | i370-* | i*86-* | i860-* | i960-* | ia16-* | ia64-* \ + | ip2k-* | iq2000-* \ + | k1om-* \ + | le32-* | le64-* \ + | lm32-* \ + | m32c-* | m32r-* | m32rle-* \ + | m5200-* | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* | v70-* | w65-* \ + | m6811-* | m68hc11-* | m6812-* | m68hc12-* | m68hcs12x-* | nvptx-* | picochip-* \ + | m88110-* | m88k-* | maxq-* | mb-* | mcore-* | mep-* | metag-* \ + | microblaze-* | microblazeel-* \ + | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ + | mips16-* \ + | mips64-* | mips64el-* \ + | mips64octeon-* | mips64octeonel-* \ + | mips64orion-* | mips64orionel-* \ + | mips64r5900-* | mips64r5900el-* \ + | mips64vr-* | mips64vrel-* \ + | mips64vr4100-* | mips64vr4100el-* \ + | mips64vr4300-* | mips64vr4300el-* \ + | mips64vr5000-* | mips64vr5000el-* \ + | mips64vr5900-* | mips64vr5900el-* \ + | mipsisa32-* | mipsisa32el-* \ + | mipsisa32r2-* | mipsisa32r2el-* \ + | mipsisa32r6-* | mipsisa32r6el-* \ + | mipsisa64-* | mipsisa64el-* \ + | mipsisa64r2-* | mipsisa64r2el-* \ + | mipsisa64r6-* | mipsisa64r6el-* \ + | mipsisa64sb1-* | mipsisa64sb1el-* \ + | mipsisa64sr71k-* | mipsisa64sr71kel-* \ + | mipsr5900-* | mipsr5900el-* \ + | mipstx39-* | mipstx39el-* \ + | mmix-* \ + | mn10200-* | mn10300-* \ + | moxie-* \ + | mt-* \ + | msp430-* \ + | nds32-* | nds32le-* | nds32be-* \ + | nfp-* \ + | nios-* | nios2-* | nios2eb-* | nios2el-* \ + | none-* | np1-* | ns16k-* | ns32k-* \ + | open8-* \ + | or1k*-* \ + | or32-* \ + | orion-* \ + | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ + | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \ + | pru-* \ + | pyramid-* \ + | riscv-* | riscv32-* | riscv64-* \ + | rl78-* | romp-* | rs6000-* | rx-* \ + | score-* \ + | sh-* | sh[1234]-* | sh[24]a-* | sh[24]ae[lb]-* | sh[23]e-* | she[lb]-* | sh[lb]e-* \ + | sh[1234]e[lb]-* | sh[12345][lb]e-* | sh[23]ele-* | sh64-* | sh64le-* \ + | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ + | sparclite-* \ + | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx*-* \ + | spu-* \ + | tahoe-* \ + | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ + | tron-* \ + | ubicom32-* \ + | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \ + | vax-* \ + | visium-* \ + | wasm32-* \ + | we32k-* \ + | x86-* | x86_64-* | xc16x-* | xgate-* | xps100-* \ + | xstormy16-* | xtensa*-* \ + | ymp-* \ + | z8k-* | z80-*) + ;; + + # Recognize the basic CPU types without company name. + # Some are omitted here because they have special meanings below. + 1750a | 580 \ + | a29k \ + | aarch64 | aarch64_be \ + | abacus \ + | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ + | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ + | am33_2.0 \ + | arc | arceb \ + | arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv6m | armv[78][arm] \ + | avr | avr32 \ + | asmjs \ + | ba \ + | be32 | be64 \ + | bfin \ + | c4x | c8051 | clipper | csky \ + | d10v | d30v | dlx | dsp16xx \ + | e2k | epiphany \ + | fido | fr30 | frv | ft32 \ + | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ + | hexagon \ + | i370 | i860 | i960 | ia16 | ia64 \ + | ip2k | iq2000 \ + | k1om \ + | le32 | le64 \ + | lm32 \ + | m32c | m32r | m32rle | m68000 | m68k | m88k \ + | m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip \ + | maxq | mb | mcore | mep | metag \ + | mips | mipsbe | mipseb | mipsel | mipsle \ + | mips16 \ + | mips64 | mips64el \ + | mips64octeon | mips64octeonel \ + | mips64orion | mips64orionel \ + | mips64r5900 | mips64r5900el \ + | mips64vr | mips64vrel \ + | mips64vr4100 | mips64vr4100el \ + | mips64vr4300 | mips64vr4300el \ + | mips64vr5000 | mips64vr5000el \ + | mips64vr5900 | mips64vr5900el \ + | mipsisa32 | mipsisa32el \ + | mipsisa32r2 | mipsisa32r2el \ + | mipsisa32r6 | mipsisa32r6el \ + | mipsisa64 | mipsisa64el \ + | mipsisa64r2 | mipsisa64r2el \ + | mipsisa64r6 | mipsisa64r6el \ + | mipsisa64sb1 | mipsisa64sb1el \ + | mipsisa64sr71k | mipsisa64sr71kel \ + | mipsr5900 | mipsr5900el \ + | mipstx39 | mipstx39el \ + | mn10200 | mn10300 \ + | moxie \ + | mt \ + | msp430 \ + | nds32 | nds32le | nds32be \ + | nfp \ + | nios | nios2 | nios2eb | nios2el \ + | ns16k | ns32k \ + | open8 | or1k | or1knd | or32 \ + | pdp10 | pj | pjl \ + | powerpc | powerpc64 | powerpc64le | powerpcle \ + | pru \ + | pyramid \ + | riscv | riscv32 | riscv64 \ + | rl78 | rx \ + | score \ + | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[234]eb | sheb | shbe | shle | sh[1234]le | sh[23]ele \ + | sh64 | sh64le \ + | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ + | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ + | spu \ + | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \ + | ubicom32 \ + | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \ + | visium \ + | wasm32 \ + | x86 | xc16x | xstormy16 | xgate | xtensa* \ + | z8k | z80) + basic_machine=$basic_machine-unknown + ;; + c54x) + basic_machine=tic54x-unknown + ;; + c55x) + basic_machine=tic55x-unknown + ;; + c6x) + basic_machine=tic6x-unknown + ;; + leon|leon[3-9]) + basic_machine=sparc-$basic_machine + ;; + m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70) + ;; + m9s12z | m68hcs12z | hcs12z | s12z) + basic_machine=s12z-unknown + ;; + m9s12z-* | m68hcs12z-* | hcs12z-* | s12z-*) + basic_machine=s12z-`echo "$basic_machine" | sed 's/^[^-]*-//'` + ;; + ms1) + basic_machine=mt-unknown + ;; + strongarm | thumb | xscale) + basic_machine=arm-unknown + ;; + xscaleeb) + basic_machine=armeb-unknown + ;; + + xscaleel) + basic_machine=armel-unknown + ;; + *) echo Invalid configuration \`"$1"\': machine \`"$basic_machine"\' not recognized 1>&2 exit 1 diff --git a/missing_d/ChangeLog b/missing_d/ChangeLog index 02f7398d..002b81f9 100644 --- a/missing_d/ChangeLog +++ b/missing_d/ChangeLog @@ -1,3 +1,7 @@ +2018-08-24 Arnold D. Robbins <arnold@skeeve.com> + + * mktime.c.old: Removed. + 2018-08-17 Arnold D. Robbins <arnold@skeeve.com> * mktime.c: Updated from GNULIB. diff --git a/missing_d/mktime.c.old b/missing_d/mktime.c.old deleted file mode 100644 index d394ef17..00000000 --- a/missing_d/mktime.c.old +++ /dev/null @@ -1,425 +0,0 @@ -/* Copyright (C) 1993, 1994, 1995, 1996, 1997 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Paul Eggert (eggert@twinsun.com). - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public License as - published by the Free Software Foundation; either version 3 of the - License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. */ - -/* Define this to have a standalone program to test this implementation of - mktime. */ -/* #define DEBUG 1 */ - -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif - -#ifdef _LIBC -# define HAVE_LIMITS_H 1 -# define HAVE_LOCALTIME_R 1 -# define STDC_HEADERS 1 -#endif - -/* Assume that leap seconds are possible, unless told otherwise. - If the host has a `zic' command with a `-L leapsecondfilename' option, - then it supports leap seconds; otherwise it probably doesn't. */ -#ifndef LEAP_SECONDS_POSSIBLE -#define LEAP_SECONDS_POSSIBLE 1 -#endif - -#ifndef VMS -#include <sys/types.h> /* Some systems define `time_t' here. */ -#else -#include <stddef.h> -#endif -#include <time.h> - -#if HAVE_LIMITS_H -#include <limits.h> -#endif - -#if DEBUG -#include <stdio.h> -#if STDC_HEADERS -#include <stdlib.h> -#endif -/* Make it work even if the system's libc has its own mktime routine. */ -#define mktime my_mktime -#endif /* DEBUG */ - -#ifndef __P -#if defined (__GNUC__) || (defined (__STDC__) && __STDC__) -#define __P(args) args -#else -#define __P(args) () -#endif /* GCC. */ -#endif /* Not __P. */ - -#ifndef CHAR_BIT -#define CHAR_BIT 8 -#endif - -#ifndef INT_MIN -#define INT_MIN (~0 << (sizeof (int) * CHAR_BIT - 1)) -#endif -#ifndef INT_MAX -#define INT_MAX (~0 - INT_MIN) -#endif - -#ifndef TIME_T_MIN -#define TIME_T_MIN (0 < (time_t) -1 ? (time_t) 0 \ - : ~ (time_t) 0 << (sizeof (time_t) * CHAR_BIT - 1)) -#endif -#ifndef TIME_T_MAX -#define TIME_T_MAX (~ (time_t) 0 - TIME_T_MIN) -#endif - -#define TM_YEAR_BASE 1900 -#define EPOCH_YEAR 1970 - -#ifndef __isleap -/* Nonzero if YEAR is a leap year (every 4 years, - except every 100th isn't, and every 400th is). */ -#define __isleap(year) \ - ((year) % 4 == 0 && ((year) % 100 != 0 || (year) % 400 == 0)) -#endif - -/* How many days come before each month (0-12). */ -const unsigned short int __mon_yday[2][13] = - { - /* Normal years. */ - { 0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334, 365 }, - /* Leap years. */ - { 0, 31, 60, 91, 121, 152, 182, 213, 244, 274, 305, 335, 366 } - }; - -static time_t ydhms_tm_diff __P ((int, int, int, int, int, const struct tm *)); -time_t __mktime_internal __P ((struct tm *, - struct tm *(*) (const time_t *, struct tm *), - time_t *)); - - -static struct tm *my_localtime_r __P ((const time_t *, struct tm *)); -static struct tm * -my_localtime_r (t, tp) - const time_t *t; - struct tm *tp; -{ - struct tm *l = localtime (t); - if (! l) - return 0; - *tp = *l; - return tp; -} - - -/* Yield the difference between (YEAR-YDAY HOUR:MIN:SEC) and (*TP), - measured in seconds, ignoring leap seconds. - YEAR uses the same numbering as TM->tm_year. - All values are in range, except possibly YEAR. - If overflow occurs, yield the low order bits of the correct answer. */ -static time_t -ydhms_tm_diff (year, yday, hour, min, sec, tp) - int year, yday, hour, min, sec; - const struct tm *tp; -{ - /* Compute intervening leap days correctly even if year is negative. - Take care to avoid int overflow. time_t overflow is OK, since - only the low order bits of the correct time_t answer are needed. - Don't convert to time_t until after all divisions are done, since - time_t might be unsigned. */ - int a4 = (year >> 2) + (TM_YEAR_BASE >> 2) - ! (year & 3); - int b4 = (tp->tm_year >> 2) + (TM_YEAR_BASE >> 2) - ! (tp->tm_year & 3); - int a100 = a4 / 25 - (a4 % 25 < 0); - int b100 = b4 / 25 - (b4 % 25 < 0); - int a400 = a100 >> 2; - int b400 = b100 >> 2; - int intervening_leap_days = (a4 - b4) - (a100 - b100) + (a400 - b400); - time_t years = year - (time_t) tp->tm_year; - time_t days = (365 * years + intervening_leap_days - + (yday - tp->tm_yday)); - return (60 * (60 * (24 * days + (hour - tp->tm_hour)) - + (min - tp->tm_min)) - + (sec - tp->tm_sec)); -} - - -static time_t localtime_offset; - -/* Convert *TP to a time_t value. */ -time_t -mktime (tp) - struct tm *tp; -{ -#ifdef _LIBC - /* POSIX.1 8.1.1 requires that whenever mktime() is called, the - time zone names contained in the external variable `tzname' shall - be set as if the tzset() function had been called. */ - __tzset (); -#endif - - return __mktime_internal (tp, my_localtime_r, &localtime_offset); -} - -/* Convert *TP to a time_t value, inverting - the monotonic and mostly-unit-linear conversion function CONVERT. - Use *OFFSET to keep track of a guess at the offset of the result, - compared to what the result would be for UTC without leap seconds. - If *OFFSET's guess is correct, only one CONVERT call is needed. */ -time_t -__mktime_internal (tp, convert, offset) - struct tm *tp; - struct tm *(*convert) __P ((const time_t *, struct tm *)); - time_t *offset; -{ - time_t t, dt, t0; - struct tm tm; - - /* The maximum number of probes (calls to CONVERT) should be enough - to handle any combinations of time zone rule changes, solar time, - and leap seconds. Posix.1 prohibits leap seconds, but some hosts - have them anyway. */ - int remaining_probes = 4; - - /* Time requested. Copy it in case CONVERT modifies *TP; this can - occur if TP is localtime's returned value and CONVERT is localtime. */ - int sec = tp->tm_sec; - int min = tp->tm_min; - int hour = tp->tm_hour; - int mday = tp->tm_mday; - int mon = tp->tm_mon; - int year_requested = tp->tm_year; - int isdst = tp->tm_isdst; - - /* Ensure that mon is in range, and set year accordingly. */ - int mon_remainder = mon % 12; - int negative_mon_remainder = mon_remainder < 0; - int mon_years = mon / 12 - negative_mon_remainder; - int year = year_requested + mon_years; - - /* The other values need not be in range: - the remaining code handles minor overflows correctly, - assuming int and time_t arithmetic wraps around. - Major overflows are caught at the end. */ - - /* Calculate day of year from year, month, and day of month. - The result need not be in range. */ - int yday = ((__mon_yday[__isleap (year + TM_YEAR_BASE)] - [mon_remainder + 12 * negative_mon_remainder]) - + mday - 1); - -#if LEAP_SECONDS_POSSIBLE - /* Handle out-of-range seconds specially, - since ydhms_tm_diff assumes every minute has 60 seconds. */ - int sec_requested = sec; - if (sec < 0) - sec = 0; - if (59 < sec) - sec = 59; -#endif - - /* Invert CONVERT by probing. First assume the same offset as last time. - Then repeatedly use the error to improve the guess. */ - - tm.tm_year = EPOCH_YEAR - TM_YEAR_BASE; - tm.tm_yday = tm.tm_hour = tm.tm_min = tm.tm_sec = 0; - t0 = ydhms_tm_diff (year, yday, hour, min, sec, &tm); - - for (t = t0 + *offset; - (dt = ydhms_tm_diff (year, yday, hour, min, sec, (*convert) (&t, &tm))); - t += dt) - if (--remaining_probes == 0) - return -1; - - /* Check whether tm.tm_isdst has the requested value, if any. */ - if (0 <= isdst && 0 <= tm.tm_isdst) - { - int dst_diff = (isdst != 0) - (tm.tm_isdst != 0); - if (dst_diff) - { - /* Move two hours in the direction indicated by the disagreement, - probe some more, and switch to a new time if found. - The largest known fallback due to daylight savings is two hours: - once, in Newfoundland, 1988-10-30 02:00 -> 00:00. */ - time_t ot = t - 2 * 60 * 60 * dst_diff; - while (--remaining_probes != 0) - { - struct tm otm; - if (! (dt = ydhms_tm_diff (year, yday, hour, min, sec, - (*convert) (&ot, &otm)))) - { - t = ot; - tm = otm; - break; - } - if ((ot += dt) == t) - break; /* Avoid a redundant probe. */ - } - } - } - - *offset = t - t0; - -#if LEAP_SECONDS_POSSIBLE - if (sec_requested != tm.tm_sec) - { - /* Adjust time to reflect the tm_sec requested, not the normalized value. - Also, repair any damage from a false match due to a leap second. */ - t += sec_requested - sec + (sec == 0 && tm.tm_sec == 60); - (*convert) (&t, &tm); - } -#endif - - if (TIME_T_MAX / INT_MAX / 366 / 24 / 60 / 60 < 3) - { - /* time_t isn't large enough to rule out overflows in ydhms_tm_diff, - so check for major overflows. A gross check suffices, - since if t has overflowed, it is off by a multiple of - TIME_T_MAX - TIME_T_MIN + 1. So ignore any component of - the difference that is bounded by a small value. */ - - double dyear = (double) year_requested + mon_years - tm.tm_year; - double dday = 366 * dyear + mday; - double dsec = 60 * (60 * (24 * dday + hour) + min) + sec_requested; - - if (TIME_T_MAX / 3 - TIME_T_MIN / 3 < (dsec < 0 ? - dsec : dsec)) - return -1; - } - - *tp = tm; - return t; -} - -#ifdef weak_alias -weak_alias (mktime, timelocal) -#endif - -#if DEBUG - -static int -not_equal_tm (a, b) - struct tm *a; - struct tm *b; -{ - return ((a->tm_sec ^ b->tm_sec) - | (a->tm_min ^ b->tm_min) - | (a->tm_hour ^ b->tm_hour) - | (a->tm_mday ^ b->tm_mday) - | (a->tm_mon ^ b->tm_mon) - | (a->tm_year ^ b->tm_year) - | (a->tm_mday ^ b->tm_mday) - | (a->tm_yday ^ b->tm_yday) - | (a->tm_isdst ^ b->tm_isdst)); -} - -static void -print_tm (tp) - struct tm *tp; -{ - printf ("%04d-%02d-%02d %02d:%02d:%02d yday %03d wday %d isdst %d", - tp->tm_year + TM_YEAR_BASE, tp->tm_mon + 1, tp->tm_mday, - tp->tm_hour, tp->tm_min, tp->tm_sec, - tp->tm_yday, tp->tm_wday, tp->tm_isdst); -} - -static int -check_result (tk, tmk, tl, tml) - time_t tk; - struct tm tmk; - time_t tl; - struct tm tml; -{ - if (tk != tl || not_equal_tm (&tmk, &tml)) - { - printf ("mktime ("); - print_tm (&tmk); - printf (")\nyields ("); - print_tm (&tml); - printf (") == %ld, should be %ld\n", (long) tl, (long) tk); - return 1; - } - - return 0; -} - -int -main (argc, argv) - int argc; - char **argv; -{ - int status = 0; - struct tm tm, tmk, tml; - time_t tk, tl; - char trailer; - - if ((argc == 3 || argc == 4) - && (sscanf (argv[1], "%d-%d-%d%c", - &tm.tm_year, &tm.tm_mon, &tm.tm_mday, &trailer) - == 3) - && (sscanf (argv[2], "%d:%d:%d%c", - &tm.tm_hour, &tm.tm_min, &tm.tm_sec, &trailer) - == 3)) - { - tm.tm_year -= TM_YEAR_BASE; - tm.tm_mon--; - tm.tm_isdst = argc == 3 ? -1 : atoi (argv[3]); - tmk = tm; - tl = mktime (&tmk); - tml = *localtime (&tl); - printf ("mktime returns %ld == ", (long) tl); - print_tm (&tmk); - printf ("\n"); - status = check_result (tl, tmk, tl, tml); - } - else if (argc == 4 || (argc == 5 && strcmp (argv[4], "-") == 0)) - { - time_t from = atol (argv[1]); - time_t by = atol (argv[2]); - time_t to = atol (argv[3]); - - if (argc == 4) - for (tl = from; tl <= to; tl += by) - { - tml = *localtime (&tl); - tmk = tml; - tk = mktime (&tmk); - status |= check_result (tk, tmk, tl, tml); - } - else - for (tl = from; tl <= to; tl += by) - { - /* Null benchmark. */ - tml = *localtime (&tl); - tmk = tml; - tk = tl; - status |= check_result (tk, tmk, tl, tml); - } - } - else - printf ("Usage:\ -\t%s YYYY-MM-DD HH:MM:SS [ISDST] # Test given time.\n\ -\t%s FROM BY TO # Test values FROM, FROM+BY, ..., TO.\n\ -\t%s FROM BY TO - # Do not test those values (for benchmark).\n", - argv[0], argv[0], argv[0]); - - return status; -} - -#endif /* DEBUG */ - -/* -Local Variables: -compile-command: "gcc -DDEBUG=1 -Wall -O -g mktime.c -o mktime" -End: -*/ |