diff options
-rw-r--r-- | ChangeLog | 33 | ||||
-rw-r--r-- | NEWS | 4 | ||||
-rw-r--r-- | README | 2 | ||||
-rw-r--r-- | doc/ChangeLog | 8 | ||||
-rw-r--r-- | doc/gawk.info | 188 | ||||
-rw-r--r-- | doc/gawk.texi | 35 | ||||
-rw-r--r-- | doc/gawktexi.in | 35 | ||||
-rw-r--r-- | eval.c | 2 | ||||
-rw-r--r-- | mpfr.c | 22 | ||||
-rw-r--r-- | re.c | 12 | ||||
-rw-r--r-- | test/ChangeLog | 18 | ||||
-rw-r--r-- | test/Makefile.am | 15 | ||||
-rw-r--r-- | test/Makefile.in | 22 | ||||
-rw-r--r-- | test/Maketests | 7 | ||||
-rw-r--r-- | test/ignrcas3.awk | 23 | ||||
-rw-r--r-- | test/ignrcas3.ok | 20 | ||||
-rw-r--r-- | test/ignrcas4.awk | 7 | ||||
-rw-r--r-- | test/ignrcas4.ok | 2 | ||||
-rw-r--r-- | test/sortfor2.awk | 11 | ||||
-rw-r--r-- | test/sortfor2.in | 2 | ||||
-rw-r--r-- | test/sortfor2.ok | 2 |
21 files changed, 321 insertions, 149 deletions
@@ -1,3 +1,36 @@ +2016-08-01 Arnold D. Robbins <arnold@skeeve.com> + + * README, NEWS: Mark DJGPP port as unsupported. + +2016-08-01 Andrew J. Schorr <aschorr@telemetry-investments.com> + + * mpfr.c (mpg_tofloat): Always set precision to avoid hysteresis effects + from previous calculations using the same temporary mpfr variables. + +2016-08-01 Andrew J. Schorr <aschorr@telemetry-investments.com> + + * mpfr.c (default_prec): Add new static variable to show current PREC + setting in effect. + (init_mpfr, set_PREC): Save mpfr_set_default_prec argument in + default_prec. + (do_mpfr_func): If the argument's precision exceeds the default + precision, boost the result's precision to match it. This fixes a + bug where we used to copy the argument's precision, regardless of + whether it was higher or lower than the PREC setting. + +2016-07-24 Norihiro Tanaka <noritnk@kcn.ne.jp> + + * re.c (research): Now that the dfa matcher correctly runs even + in multibyte locales, try it if even if need_start is true. + However, if start > 0, avoid dfa matcher, since it can't handle + the case where the search starts in the middle of a string. + + Unrelated: + + * eval.c (load_casetable): Reset casetable[i] to `i' if i + should not be mapped to upper case. Fixes inconsistencies between + dfa and regex in some single bytes locales; notably el_GR.iso88597. + 2016-07-23 Arnold D. Robbins <arnold@skeeve.com> Make result of close on a pipe match result of system. @@ -120,7 +120,9 @@ Changes from 4.1.3 to 4.1.4 13. A new environment variable GAWK_LOCALE_DIR may be set to locate the .mo file for gawk itself. -14. A number of bugs have been fixed. See the ChangeLog. +14. The DJGPP port is now officially deprecated. + +15. A number of bugs have been fixed. See the ChangeLog. Changes from 4.1.2 to 4.1.3 --------------------------- @@ -80,7 +80,7 @@ Arnold Robbins BUG REPORTS AND FIXES, non-Unix systems: -MS-DOS with DJGPP: +MS-DOS with DJGPP: (This port is deprecated.) Scott Deifik scottd.mail@sbcglobal.net diff --git a/doc/ChangeLog b/doc/ChangeLog index 1c01a45d..2cada32d 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -1,3 +1,11 @@ +2016-08-01 Arnold D. Robbins <arnold@skeeve.com> + + * gawktexi.in: Mark DJGPP port as unsupported. + +2016-07-24 Arnold D. Robbins <arnold@skeeve.com> + + * gawktexi.in: Fix a typo. Thanks to Marco Curreli for reporting. + 2016-07-23 Arnold D. Robbins <arnold@skeeve.com> * gawktexi.in: Document return value of close on a pipe now like diff --git a/doc/gawk.info b/doc/gawk.info index 650044e6..97c9d3c0 100644 --- a/doc/gawk.info +++ b/doc/gawk.info @@ -26742,7 +26742,7 @@ File: gawk.info, Node: Extension Exercises, Prev: Extension summary, Up: Dyna the input file is a terminal. (Hint: this function is usually expensive to call; try to call it just once.) The content of the prompt should come from a variable settable by 'awk'-level code. - You can write the prompt to stanard error. However, for best + You can write the prompt to standard error. However, for best results, open a new file descriptor (or file pointer) on '/dev/tty' and print the prompt there, in case standard error has been redirected. @@ -27732,7 +27732,7 @@ Info file, in approximate chronological order: * Fred Fish provided the port to Amiga systems and its documentation. (With Fred's sad passing, this is no longer supported.) - * Scott Deifik currently maintains the MS-DOS port using DJGPP. + * Scott Deifik maintained the MS-DOS port using DJGPP. * Eli Zaretskii currently maintains the MS-Windows port using MinGW. @@ -28424,8 +28424,7 @@ File: gawk.info, Node: PC Compiling, Next: PC Testing, Prev: PC Binary Instal B.3.1.2 Compiling 'gawk' for PC Operating Systems ................................................. -'gawk' can be compiled for MS-DOS, Windows32, and OS/2 using the GNU -development tools from DJ Delorie (DJGPP: MS-DOS only), MinGW +'gawk' can be compiled for MS-DOS, Windows32, and OS/2 using MinGW (Windows32) or Eberhard Mattes (EMX: MS-DOS, Windows32 and OS/2). The file 'README_d/README.pc' in the 'gawk' distribution contains additional notes, and 'pc/Makefile' contains important information on compilation @@ -28440,11 +28439,9 @@ be edited in order to work with your 'make' utility. The 'Makefile' supports a number of targets for building various MS-DOS and Windows32 versions. A list of targets is printed if the -'make' command is given without a target. As an example, to build -'gawk' using the DJGPP tools, enter 'make djgpp'. (The DJGPP tools -needed for the build may be found at -<ftp://ftp.delorie.com/pub/djgpp/current/v2gnu/>.) To build a native -MS-Windows binary of 'gawk' using the MinGW tools, type 'make mingw32'. +'make' command is given without a target. As an example, to build a +native MS-Windows binary of 'gawk' using the MinGW tools, type 'make +mingw32'. The 32 bit EMX version of 'gawk' works "out of the box" under OS/2. However, it is highly recommended to use GCC 2.95.3 for the compilation. @@ -28553,7 +28550,7 @@ is set to 'e:' the complete default search path is An 'sh'-like shell (as opposed to 'command.com' under MS-DOS or 'cmd.exe' under MS-Windows or OS/2) may be useful for 'awk' programming. -The DJGPP collection of tools includes an MS-DOS port of Bash, and +The DJGPP collection of tools(1) includes an MS-DOS port of Bash, and several shells are available for OS/2, including 'ksh'. Under MS-Windows, OS/2 and MS-DOS, 'gawk' (and many other text @@ -28615,6 +28612,10 @@ or: With proper quoting, in the first example the setting of 'RS' can be moved into the 'BEGIN' rule. + ---------- Footnotes ---------- + + (1) Available from <ftp://ftp.delorie.com/pub/djgpp/current/v2gnu/>. + File: gawk.info, Node: Cygwin, Next: MSYS, Prev: PC Using, Up: PC Installation @@ -29031,8 +29032,6 @@ this Info file. Unix and POSIX Arnold Robbins, <arnold@skeeve.com> systems -MS-DOS with DJGPP Scott Deifik, <scottd.mail@sbcglobal.net> - MS-Windows with MinGW Eli Zaretskii, <eliz@gnu.org> OS/2 Andreas Buening, <andreas.buening@nexgo.de> @@ -29045,6 +29044,10 @@ z/OS (OS/390) Daniel Richard G. <skunk@iSKUNK.ORG> If your bug is also reproducible under Unix, send a copy of your report to the <bug-gawk@gnu.org> email list as well. + The DJGPP port is no longer supported; it will remain in the code +base for a while in case a volunteer wishes to take it over. If this +does not happen, then eventually code for this port will be removed. + File: gawk.info, Node: Other Versions, Next: Installation summary, Prev: Bugs, Up: Installation @@ -29216,9 +29219,9 @@ B.6 Summary ./configure && make && make check * 'gawk' may be built on non-POSIX systems as well. The currently - supported systems are MS-Windows using DJGPP, MSYS, MinGW, and - Cygwin, OS/2 using EMX, and both Vax/VMS and OpenVMS. Instructions - for each system are included in this major node. + supported systems are MS-Windows using MSYS, MinGW, and Cygwin, + OS/2 using EMX, and both Vax/VMS and OpenVMS. Instructions for each + system are included in this major node. * Bug reports should be sent via email to <bug-gawk@gnu.org>. Bug reports should be in English and should include the version of @@ -32995,9 +32998,9 @@ Index * compiled programs: Basic High Level. (line 13) * compiled programs <1>: Glossary. (line 218) * compiling gawk for Cygwin: Cygwin. (line 6) -* compiling gawk for MS-DOS and MS-Windows: PC Compiling. (line 13) +* compiling gawk for MS-DOS and MS-Windows: PC Compiling. (line 12) * compiling gawk for VMS: VMS Compilation. (line 6) -* compiling gawk with EMX for OS/2: PC Compiling. (line 28) +* compiling gawk with EMX for OS/2: PC Compiling. (line 25) * compl: Bitwise Functions. (line 44) * complement, bitwise: Bitwise Functions. (line 25) * compound statements, control statements and: Statements. (line 10) @@ -35800,80 +35803,81 @@ Node: Extension Sample API Tests1074128 Node: gawkextlib1074620 Node: Extension summary1077067 Node: Extension Exercises1080769 -Node: Language History1082266 -Node: V7/SVR3.11083922 -Node: SVR41086074 -Node: POSIX1087508 -Node: BTL1088887 -Node: POSIX/GNU1089616 -Node: Feature History1095478 -Node: Common Extensions1109848 -Node: Ranges and Locales1111131 -Ref: Ranges and Locales-Footnote-11115747 -Ref: Ranges and Locales-Footnote-21115774 -Ref: Ranges and Locales-Footnote-31116009 -Node: Contributors1116230 -Node: History summary1121799 -Node: Installation1123179 -Node: Gawk Distribution1124123 -Node: Getting1124607 -Node: Extracting1125568 -Node: Distribution contents1127206 -Node: Unix Installation1133300 -Node: Quick Installation1133982 -Node: Shell Startup Files1136396 -Node: Additional Configuration Options1137474 -Node: Configuration Philosophy1139279 -Node: Non-Unix Installation1141648 -Node: PC Installation1142106 -Node: PC Binary Installation1143426 -Node: PC Compiling1145278 -Ref: PC Compiling-Footnote-11148302 -Node: PC Testing1148411 -Node: PC Using1149591 -Node: Cygwin1153705 -Node: MSYS1154475 -Node: VMS Installation1154976 -Node: VMS Compilation1155767 -Ref: VMS Compilation-Footnote-11156996 -Node: VMS Dynamic Extensions1157054 -Node: VMS Installation Details1158739 -Node: VMS Running1160992 -Node: VMS GNV1165271 -Node: VMS Old Gawk1166006 -Node: Bugs1166477 -Node: Other Versions1170674 -Node: Installation summary1177258 -Node: Notes1178316 -Node: Compatibility Mode1179181 -Node: Additions1179963 -Node: Accessing The Source1180888 -Node: Adding Code1182323 -Node: New Ports1188542 -Node: Derived Files1193030 -Ref: Derived Files-Footnote-11198515 -Ref: Derived Files-Footnote-21198550 -Ref: Derived Files-Footnote-31199148 -Node: Future Extensions1199262 -Node: Implementation Limitations1199920 -Node: Extension Design1201103 -Node: Old Extension Problems1202257 -Ref: Old Extension Problems-Footnote-11203775 -Node: Extension New Mechanism Goals1203832 -Ref: Extension New Mechanism Goals-Footnote-11207196 -Node: Extension Other Design Decisions1207385 -Node: Extension Future Growth1209498 -Node: Old Extension Mechanism1210334 -Node: Notes summary1212097 -Node: Basic Concepts1213279 -Node: Basic High Level1213960 -Ref: figure-general-flow1214242 -Ref: figure-process-flow1214927 -Ref: Basic High Level-Footnote-11218228 -Node: Basic Data Typing1218413 -Node: Glossary1221741 -Node: Copying1253687 -Node: GNU Free Documentation License1291226 -Node: Index1316344 +Node: Language History1082267 +Node: V7/SVR3.11083923 +Node: SVR41086075 +Node: POSIX1087509 +Node: BTL1088888 +Node: POSIX/GNU1089617 +Node: Feature History1095479 +Node: Common Extensions1109849 +Node: Ranges and Locales1111132 +Ref: Ranges and Locales-Footnote-11115748 +Ref: Ranges and Locales-Footnote-21115775 +Ref: Ranges and Locales-Footnote-31116010 +Node: Contributors1116231 +Node: History summary1121791 +Node: Installation1123171 +Node: Gawk Distribution1124115 +Node: Getting1124599 +Node: Extracting1125560 +Node: Distribution contents1127198 +Node: Unix Installation1133292 +Node: Quick Installation1133974 +Node: Shell Startup Files1136388 +Node: Additional Configuration Options1137466 +Node: Configuration Philosophy1139271 +Node: Non-Unix Installation1141640 +Node: PC Installation1142098 +Node: PC Binary Installation1143418 +Node: PC Compiling1145270 +Ref: PC Compiling-Footnote-11148064 +Node: PC Testing1148173 +Node: PC Using1149353 +Ref: PC Using-Footnote-11153506 +Node: Cygwin1153579 +Node: MSYS1154349 +Node: VMS Installation1154850 +Node: VMS Compilation1155641 +Ref: VMS Compilation-Footnote-11156870 +Node: VMS Dynamic Extensions1156928 +Node: VMS Installation Details1158613 +Node: VMS Running1160866 +Node: VMS GNV1165145 +Node: VMS Old Gawk1165880 +Node: Bugs1166351 +Node: Other Versions1170666 +Node: Installation summary1177250 +Node: Notes1178301 +Node: Compatibility Mode1179166 +Node: Additions1179948 +Node: Accessing The Source1180873 +Node: Adding Code1182308 +Node: New Ports1188527 +Node: Derived Files1193015 +Ref: Derived Files-Footnote-11198500 +Ref: Derived Files-Footnote-21198535 +Ref: Derived Files-Footnote-31199133 +Node: Future Extensions1199247 +Node: Implementation Limitations1199905 +Node: Extension Design1201088 +Node: Old Extension Problems1202242 +Ref: Old Extension Problems-Footnote-11203760 +Node: Extension New Mechanism Goals1203817 +Ref: Extension New Mechanism Goals-Footnote-11207181 +Node: Extension Other Design Decisions1207370 +Node: Extension Future Growth1209483 +Node: Old Extension Mechanism1210319 +Node: Notes summary1212082 +Node: Basic Concepts1213264 +Node: Basic High Level1213945 +Ref: figure-general-flow1214227 +Ref: figure-process-flow1214912 +Ref: Basic High Level-Footnote-11218213 +Node: Basic Data Typing1218398 +Node: Glossary1221726 +Node: Copying1253672 +Node: GNU Free Documentation License1291211 +Node: Index1316329 End Tag Table diff --git a/doc/gawk.texi b/doc/gawk.texi index d2ed10f2..df4a1942 100644 --- a/doc/gawk.texi +++ b/doc/gawk.texi @@ -35972,7 +35972,7 @@ function to tell if the input file is a terminal. (Hint: this function is usually expensive to call; try to call it just once.) The content of the prompt should come from a variable settable by @command{awk}-level code. -You can write the prompt to stanard error. However, +You can write the prompt to standard error. However, for best results, open a new file descriptor (or file pointer) on @file{/dev/tty} and print the prompt there, in case standard error has been redirected. @@ -37568,14 +37568,13 @@ provided the port to Amiga systems and its documentation. @item @cindex Deifik, Scott Scott Deifik -currently maintains the MS-DOS port using DJGPP. +maintained the MS-DOS port using DJGPP. @item @cindex Zaretskii, Eli Eli Zaretskii currently maintains the MS-Windows port using MinGW. - @item @cindex Grigera, Juan Juan Grigera @@ -38410,13 +38409,13 @@ or more detailed installation instructions. @appendixsubsubsec Compiling @command{gawk} for PC Operating Systems @ifclear FOR_PRINT -@command{gawk} can be compiled for MS-DOS, Windows32, and OS/2 using the GNU -development tools from DJ Delorie (DJGPP: MS-DOS only), MinGW (Windows32) or Eberhard +@command{gawk} can be compiled for MS-DOS, Windows32, and OS/2 using +MinGW (Windows32) or Eberhard Mattes (EMX: MS-DOS, Windows32 and OS/2). @end ifclear @ifset FOR_PRINT -@command{gawk} can be compiled for MS-DOS and Windows32 using the GNU -development tools from DJ Delorie (DJGPP: MS-DOS only) or MinGW (Windows32). +@command{gawk} can be compiled for Windows32 using +MinGW. @end ifset The file @file{README_d/README.pc} in the @command{gawk} distribution contains @@ -38434,10 +38433,8 @@ to be edited in order to work with your @command{make} utility. The @file{Makefile} supports a number of targets for building various MS-DOS and Windows32 versions. A list of targets is printed if the -@command{make} command is given without a target. As an example, to -build @command{gawk} using the DJGPP tools, enter @samp{make djgpp}. -(The DJGPP tools needed for the build may be found at -@uref{ftp://ftp.delorie.com/pub/djgpp/current/v2gnu/}.) To build a +@command{make} command is given without a target. As an example, +to build a native MS-Windows binary of @command{gawk} using the MinGW tools, type @samp{make mingw32}. @@ -38586,13 +38583,16 @@ E.g., if @env{UNIXROOT} is set to @file{e:} the complete default search path is An @command{sh}-like shell (as opposed to @command{command.com} under MS-DOS or @command{cmd.exe} under MS-Windows or OS/2) may be useful for @command{awk} programming. -The DJGPP collection of tools includes an MS-DOS port of Bash, +The DJGPP collection of tools@footnote{Available from +@uref{ftp://ftp.delorie.com/pub/djgpp/current/v2gnu/}.} +includes an MS-DOS port of Bash, and several shells are available for OS/2, including @command{ksh}. @end ifclear @ifset FOR_PRINT An @command{sh}-like shell (as opposed to @command{command.com} under MS-DOS or @command{cmd.exe} under MS-Windows) may be useful for @command{awk} programming. -The DJGPP collection of tools includes an MS-DOS port of Bash. +The DJGPP collection of tools@footnote{Available from +@uref{ftp://ftp.delorie.com/pub/djgpp/current/v2gnu/}.} includes an MS-DOS port of Bash. @end ifset @cindex common extensions, @code{BINMODE} variable @@ -39219,7 +39219,7 @@ The people maintaining the various @command{gawk} ports are: @multitable {MS-Windows with MinGW} {123456789012345678901234567890123456789001234567890} @item Unix and POSIX systems @tab Arnold Robbins, @EMAIL{arnold@@skeeve.com,arnold at skeeve dot com} -@item MS-DOS with DJGPP @tab Scott Deifik, @EMAIL{scottd.mail@@sbcglobal.net,scottd dot mail at sbcglobal dot net} +@c @item MS-DOS with DJGPP @tab Scott Deifik, @EMAIL{scottd.mail@@sbcglobal.net,scottd dot mail at sbcglobal dot net} @item MS-Windows with MinGW @tab Eli Zaretskii, @EMAIL{eliz@@gnu.org,eliz at gnu dot org} @@ -39236,6 +39236,10 @@ The people maintaining the various @command{gawk} ports are: If your bug is also reproducible under Unix, send a copy of your report to the @EMAIL{bug-gawk@@gnu.org,bug-gawk at gnu dot org} email list as well. +The DJGPP port is no longer supported; it will remain in the code base for a while in case +a volunteer wishes to take it over. If this does not happen, then eventually code for this +port will be removed. + @node Other Versions @appendixsec Other Freely Available @command{awk} Implementations @cindex @command{awk}, implementations @@ -39478,7 +39482,8 @@ cd gawk-@value{VERSION}.@value{PATCHLEVEL} @item @command{gawk} may be built on non-POSIX systems as well. The currently -supported systems are MS-Windows using DJGPP, MSYS, MinGW, and Cygwin, +supported systems are MS-Windows using +MSYS, MinGW, and Cygwin, @ifclear FOR_PRINT OS/2 using EMX, @end ifclear diff --git a/doc/gawktexi.in b/doc/gawktexi.in index cd59f968..2b0a5c26 100644 --- a/doc/gawktexi.in +++ b/doc/gawktexi.in @@ -35054,7 +35054,7 @@ function to tell if the input file is a terminal. (Hint: this function is usually expensive to call; try to call it just once.) The content of the prompt should come from a variable settable by @command{awk}-level code. -You can write the prompt to stanard error. However, +You can write the prompt to standard error. However, for best results, open a new file descriptor (or file pointer) on @file{/dev/tty} and print the prompt there, in case standard error has been redirected. @@ -36650,14 +36650,13 @@ provided the port to Amiga systems and its documentation. @item @cindex Deifik, Scott Scott Deifik -currently maintains the MS-DOS port using DJGPP. +maintained the MS-DOS port using DJGPP. @item @cindex Zaretskii, Eli Eli Zaretskii currently maintains the MS-Windows port using MinGW. - @item @cindex Grigera, Juan Juan Grigera @@ -37492,13 +37491,13 @@ or more detailed installation instructions. @appendixsubsubsec Compiling @command{gawk} for PC Operating Systems @ifclear FOR_PRINT -@command{gawk} can be compiled for MS-DOS, Windows32, and OS/2 using the GNU -development tools from DJ Delorie (DJGPP: MS-DOS only), MinGW (Windows32) or Eberhard +@command{gawk} can be compiled for MS-DOS, Windows32, and OS/2 using +MinGW (Windows32) or Eberhard Mattes (EMX: MS-DOS, Windows32 and OS/2). @end ifclear @ifset FOR_PRINT -@command{gawk} can be compiled for MS-DOS and Windows32 using the GNU -development tools from DJ Delorie (DJGPP: MS-DOS only) or MinGW (Windows32). +@command{gawk} can be compiled for Windows32 using +MinGW. @end ifset The file @file{README_d/README.pc} in the @command{gawk} distribution contains @@ -37516,10 +37515,8 @@ to be edited in order to work with your @command{make} utility. The @file{Makefile} supports a number of targets for building various MS-DOS and Windows32 versions. A list of targets is printed if the -@command{make} command is given without a target. As an example, to -build @command{gawk} using the DJGPP tools, enter @samp{make djgpp}. -(The DJGPP tools needed for the build may be found at -@uref{ftp://ftp.delorie.com/pub/djgpp/current/v2gnu/}.) To build a +@command{make} command is given without a target. As an example, +to build a native MS-Windows binary of @command{gawk} using the MinGW tools, type @samp{make mingw32}. @@ -37668,13 +37665,16 @@ E.g., if @env{UNIXROOT} is set to @file{e:} the complete default search path is An @command{sh}-like shell (as opposed to @command{command.com} under MS-DOS or @command{cmd.exe} under MS-Windows or OS/2) may be useful for @command{awk} programming. -The DJGPP collection of tools includes an MS-DOS port of Bash, +The DJGPP collection of tools@footnote{Available from +@uref{ftp://ftp.delorie.com/pub/djgpp/current/v2gnu/}.} +includes an MS-DOS port of Bash, and several shells are available for OS/2, including @command{ksh}. @end ifclear @ifset FOR_PRINT An @command{sh}-like shell (as opposed to @command{command.com} under MS-DOS or @command{cmd.exe} under MS-Windows) may be useful for @command{awk} programming. -The DJGPP collection of tools includes an MS-DOS port of Bash. +The DJGPP collection of tools@footnote{Available from +@uref{ftp://ftp.delorie.com/pub/djgpp/current/v2gnu/}.} includes an MS-DOS port of Bash. @end ifset @cindex common extensions, @code{BINMODE} variable @@ -38301,7 +38301,7 @@ The people maintaining the various @command{gawk} ports are: @multitable {MS-Windows with MinGW} {123456789012345678901234567890123456789001234567890} @item Unix and POSIX systems @tab Arnold Robbins, @EMAIL{arnold@@skeeve.com,arnold at skeeve dot com} -@item MS-DOS with DJGPP @tab Scott Deifik, @EMAIL{scottd.mail@@sbcglobal.net,scottd dot mail at sbcglobal dot net} +@c @item MS-DOS with DJGPP @tab Scott Deifik, @EMAIL{scottd.mail@@sbcglobal.net,scottd dot mail at sbcglobal dot net} @item MS-Windows with MinGW @tab Eli Zaretskii, @EMAIL{eliz@@gnu.org,eliz at gnu dot org} @@ -38318,6 +38318,10 @@ The people maintaining the various @command{gawk} ports are: If your bug is also reproducible under Unix, send a copy of your report to the @EMAIL{bug-gawk@@gnu.org,bug-gawk at gnu dot org} email list as well. +The DJGPP port is no longer supported; it will remain in the code base for a while in case +a volunteer wishes to take it over. If this does not happen, then eventually code for this +port will be removed. + @node Other Versions @appendixsec Other Freely Available @command{awk} Implementations @cindex @command{awk}, implementations @@ -38560,7 +38564,8 @@ cd gawk-@value{VERSION}.@value{PATCHLEVEL} @item @command{gawk} may be built on non-POSIX systems as well. The currently -supported systems are MS-Windows using DJGPP, MSYS, MinGW, and Cygwin, +supported systems are MS-Windows using +MSYS, MinGW, and Cygwin, @ifclear FOR_PRINT OS/2 using EMX, @end ifclear @@ -219,6 +219,8 @@ load_casetable(void) for (i = 0200; i <= 0377; i++) { if (isalpha(i) && islower(i) && i != toupper(i)) casetable[i] = toupper(i); + else + casetable[i] = i; } #endif #endif @@ -39,6 +39,8 @@ mpz_t MFNR; bool do_ieee_fmt; /* IEEE-754 floating-point emulation */ mpfr_rnd_t ROUND_MODE; +static mpfr_prec_t default_prec; + static mpfr_rnd_t get_rnd_mode(const char rmode); static NODE *mpg_force_number(NODE *n); static NODE *mpg_make_number(double); @@ -70,7 +72,7 @@ static inline mpfr_ptr mpg_tofloat(mpfr_ptr mf, mpz_ptr mz); void init_mpfr(mpfr_prec_t prec, const char *rmode) { - mpfr_set_default_prec(prec); + mpfr_set_default_prec(default_prec = prec); ROUND_MODE = get_rnd_mode(rmode[0]); mpfr_set_default_rounding_mode(ROUND_MODE); make_number = mpg_make_number; @@ -556,7 +558,7 @@ set_PREC() } if (prec > 0) - mpfr_set_default_prec(prec); + mpfr_set_default_prec(default_prec = prec); } @@ -700,6 +702,7 @@ do_mpfr_func(const char *name, NODE *t1, *res; mpfr_ptr p1; int tval; + mpfr_prec_t argprec; t1 = POP_SCALAR(); if (do_lint && (fixtype(t1)->flags & NUMBER) == 0) @@ -708,7 +711,8 @@ do_mpfr_func(const char *name, force_number(t1); p1 = MP_FLOAT(t1); res = mpg_float(); - mpfr_set_prec(res->mpg_numbr, mpfr_get_prec(p1)); /* needed at least for sqrt() */ + if ((argprec = mpfr_get_prec(p1)) > default_prec) + mpfr_set_prec(res->mpg_numbr, argprec); /* needed at least for sqrt() */ tval = mpfr_func(res->mpg_numbr, p1, ROUND_MODE); IEEE_FMT(res->mpg_numbr, tval); DEREF(t1); @@ -1295,9 +1299,17 @@ mpg_tofloat(mpfr_ptr mf, mpz_ptr mz) prec -= (size_t) mpz_scan1(mz, 0); /* least significant 1 bit index starting at 0 */ if (prec > MPFR_PREC_MAX) prec = MPFR_PREC_MAX; - if (prec > PRECISION_MIN) - mpfr_set_prec(mf, prec); + else if (prec < PRECISION_MIN) + prec = PRECISION_MIN; } + else + prec = PRECISION_MIN; + /* + * Always set the precision to avoid hysteresis, since do_mpfr_func + * may copy our precision. + */ + if (prec != mpfr_get_prec(mf)) + mpfr_set_prec(mf, prec); mpfr_set_z(mf, mz, ROUND_MODE); return mf; @@ -266,17 +266,17 @@ research(Regexp *rp, char *str, int start, rp->pat.not_bol = 1; /* - * Always do dfa search if can; if it fails, then even if - * need_start is true, we won't bother with the regex search. + * Always do dfa search if can; if it fails, we won't bother + * with the regex search. * * The dfa matcher doesn't have a no_bol flag, so don't bother * trying it in that case. * - * 7/2008: Skip the dfa matcher if need_start. The dfa matcher - * has bugs in certain multibyte cases and it's too difficult - * to try to special case things. + * 7/2016: The dfa matcher can't handle a case where searching + * starts in the middle of a string, so don't bother trying it + * in that case. */ - if (rp->dfa && ! no_bol && ! need_start) { + if (rp->dfa && ! no_bol && start == 0) { char save; size_t count = 0; struct dfa *superset = dfasuperset(rp->dfareg); diff --git a/test/ChangeLog b/test/ChangeLog index f159be72..36fece67 100644 --- a/test/ChangeLog +++ b/test/ChangeLog @@ -1,3 +1,19 @@ +2016-08-01 Arnold D. Robbins <arnold@skeeve.com> + + * Makefile.am (sortfor2): New test. + * sortfor2.awk, sortfor2.in, sortfor2.ok: New files. + Thanks Christian Schneider <software@chschneider.eu> + for the report. + + Unrelated: + + * Makefile.am (ignrcas3): New test. + * ignrcas3.awk, ignrcas3.ok: New files. + Based on test code from Norihiro Tanaka <noritnk@kcn.ne.jp>. + + * Makefile.am (ignrcas4): New test. + * ignrcas4.awk, ignrcas4.ok: Andrew Schorr's files, renamed. + 2016-07-23 Arnold D. Robbins <arnold@skeeve.com> * Makefile.am (status-close): New test. @@ -6,7 +22,7 @@ 2015-06-17 Arnold D. Robbins <arnold@skeeve.com> * Makefile.am (ofmtstrnum): New test. - * ofmtstrnu.awk, ofmtstrnum.ok: New files. + * ofmtstrnum.awk, ofmtstrnum.ok: New files. 2016-07-20 Arnold D. Robbins <arnold@skeeve.com> diff --git a/test/Makefile.am b/test/Makefile.am index 40636acd..327d25b9 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -467,6 +467,8 @@ EXTRA_DIST = \ ignrcas2.ok \ ignrcas3.awk \ ignrcas3.ok \ + ignrcas4.awk \ + ignrcas4.ok \ ignrcase.awk \ ignrcase.in \ ignrcase.ok \ @@ -970,6 +972,9 @@ EXTRA_DIST = \ sortfor.awk \ sortfor.in \ sortfor.ok \ + sortfor2.awk \ + sortfor2.in \ + sortfor2.ok \ sortglos.awk \ sortglos.in \ sortglos.ok \ @@ -1194,7 +1199,7 @@ GAWK_EXT_TESTS = \ fieldwdth forcenum fpat1 fpat2 fpat3 fpat4 fpat5 fpatnull fsfwfs funlen \ functab1 functab2 functab3 fwtest fwtest2 fwtest3 \ genpot gensub gensub2 getlndir gnuops2 gnuops3 gnureops gsubind \ - icasefs icasers id igncdym igncfs ignrcas2 ignrcas3 ignrcase \ + icasefs icasers id igncdym igncfs ignrcas2 ignrcas3 ignrcas4 ignrcase \ incdupe incdupe2 incdupe3 incdupe4 incdupe5 incdupe6 incdupe7 \ include include2 indirectbuiltin indirectcall indirectcall2 intarray \ lint lintexp lintindex lintint lintlength lintold lintset lintwarn \ @@ -1207,7 +1212,7 @@ GAWK_EXT_TESTS = \ profile8 profile9 profile10 pty1 \ rebuf regnul1 regnul2 regx8bit reginttrad reint reint2 rsgetline rsglstdin rsstart1 \ rsstart2 rsstart3 rstest6 shadow shadowbuiltin \ - sortfor sortu split_after_fpat \ + sortfor sortfor2 sortu split_after_fpat \ splitarg4 strftime \ strtonum strtonum1 switch2 symtab1 symtab2 symtab3 symtab4 symtab5 symtab6 \ symtab7 symtab8 symtab9 symtab10 \ @@ -2321,6 +2326,12 @@ symtab10: @AWKPATH="$(srcdir)" $(AWK) -D -f $@.awk < "$(srcdir)/$@.in" >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ +ignrcas3:: + @echo $@ + @GAWKLOCALE=el_GR.iso88597 \ + AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ + # Targets generated for other tests: include Maketests diff --git a/test/Makefile.in b/test/Makefile.in index beb2af2d..dc23e9b9 100644 --- a/test/Makefile.in +++ b/test/Makefile.in @@ -724,6 +724,8 @@ EXTRA_DIST = \ ignrcas2.ok \ ignrcas3.awk \ ignrcas3.ok \ + ignrcas4.awk \ + ignrcas4.ok \ ignrcase.awk \ ignrcase.in \ ignrcase.ok \ @@ -1227,6 +1229,9 @@ EXTRA_DIST = \ sortfor.awk \ sortfor.in \ sortfor.ok \ + sortfor2.awk \ + sortfor2.in \ + sortfor2.ok \ sortglos.awk \ sortglos.in \ sortglos.ok \ @@ -1450,7 +1455,7 @@ GAWK_EXT_TESTS = \ fieldwdth forcenum fpat1 fpat2 fpat3 fpat4 fpat5 fpatnull fsfwfs funlen \ functab1 functab2 functab3 fwtest fwtest2 fwtest3 \ genpot gensub gensub2 getlndir gnuops2 gnuops3 gnureops gsubind \ - icasefs icasers id igncdym igncfs ignrcas2 ignrcas3 ignrcase \ + icasefs icasers id igncdym igncfs ignrcas2 ignrcas3 ignrcas4 ignrcase \ incdupe incdupe2 incdupe3 incdupe4 incdupe5 incdupe6 incdupe7 \ include include2 indirectbuiltin indirectcall indirectcall2 intarray \ lint lintexp lintindex lintint lintlength lintold lintset lintwarn \ @@ -1463,7 +1468,7 @@ GAWK_EXT_TESTS = \ profile8 profile9 profile10 pty1 \ rebuf regnul1 regnul2 regx8bit reginttrad reint reint2 rsgetline rsglstdin rsstart1 \ rsstart2 rsstart3 rstest6 shadow shadowbuiltin \ - sortfor sortu split_after_fpat \ + sortfor sortfor2 sortu split_after_fpat \ splitarg4 strftime \ strtonum strtonum1 switch2 symtab1 symtab2 symtab3 symtab4 symtab5 symtab6 \ symtab7 symtab8 symtab9 symtab10 \ @@ -2758,6 +2763,12 @@ symtab10: @echo $@ @AWKPATH="$(srcdir)" $(AWK) -D -f $@.awk < "$(srcdir)/$@.in" >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ + +ignrcas3:: + @echo $@ + @GAWKLOCALE=el_GR.iso88597 \ + AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ Gt-dummy: # file Maketests, generated from Makefile.am by the Gentests program addcomma: @@ -3982,7 +3993,7 @@ igncfs: @AWKPATH="$(srcdir)" $(AWK) -f $@.awk < "$(srcdir)"/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ -ignrcas3: +ignrcas4: @echo $@ @AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ @@ -4162,6 +4173,11 @@ sortfor: @AWKPATH="$(srcdir)" $(AWK) -f $@.awk < "$(srcdir)"/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ +sortfor2: + @echo $@ + @AWKPATH="$(srcdir)" $(AWK) -f $@.awk < "$(srcdir)"/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ + sortu: @echo $@ @AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ diff --git a/test/Maketests b/test/Maketests index d9b4fe09..951590ac 100644 --- a/test/Maketests +++ b/test/Maketests @@ -1222,7 +1222,7 @@ igncfs: @AWKPATH="$(srcdir)" $(AWK) -f $@.awk < "$(srcdir)"/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ -ignrcas3: +ignrcas4: @echo $@ @AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ @@ -1402,6 +1402,11 @@ sortfor: @AWKPATH="$(srcdir)" $(AWK) -f $@.awk < "$(srcdir)"/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ +sortfor2: + @echo $@ + @AWKPATH="$(srcdir)" $(AWK) -f $@.awk < "$(srcdir)"/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ + sortu: @echo $@ @AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ diff --git a/test/ignrcas3.awk b/test/ignrcas3.awk index e74eea64..fd88744d 100644 --- a/test/ignrcas3.awk +++ b/test/ignrcas3.awk @@ -1,7 +1,20 @@ BEGIN { - x = "0" - print x+0 # trigger NUMCUR - IGNORECASE = x # should enable ignorecase, since x is a non-null string - y = "aBc" - print (y ~ /abc/) + dfapat[1] = data[1] = "b\323" + dfapat[2] = data[2] = "b\362" + dfapat[3] = data[3] = "b\363" + + regexpat[1] = "[a-c]\323" + regexpat[2] = "[a-c]\362" + regexpat[3] = "[a-c]\363" + + IGNORECASE = 1 + + for (i = 1; i <= 3; i++) { + for (j = 1; j <= 3; j++) { + printf("data[%d] ~ dfa[%d] = %s\n", i, j, + data[i] ~ dfapat[j] ? "ok" : "bad") + printf("data[%d] ~ regex[%d] = %s\n", i, j, + data[i] ~ regexpat[j] ? "ok" : "bad") + } + } } diff --git a/test/ignrcas3.ok b/test/ignrcas3.ok index 0d66ea1a..0222feb5 100644 --- a/test/ignrcas3.ok +++ b/test/ignrcas3.ok @@ -1,2 +1,18 @@ -0 -1 +data[1] ~ dfa[1] = ok +data[1] ~ regex[1] = ok +data[1] ~ dfa[2] = ok +data[1] ~ regex[2] = ok +data[1] ~ dfa[3] = ok +data[1] ~ regex[3] = ok +data[2] ~ dfa[1] = ok +data[2] ~ regex[1] = ok +data[2] ~ dfa[2] = ok +data[2] ~ regex[2] = ok +data[2] ~ dfa[3] = ok +data[2] ~ regex[3] = ok +data[3] ~ dfa[1] = ok +data[3] ~ regex[1] = ok +data[3] ~ dfa[2] = ok +data[3] ~ regex[2] = ok +data[3] ~ dfa[3] = ok +data[3] ~ regex[3] = ok diff --git a/test/ignrcas4.awk b/test/ignrcas4.awk new file mode 100644 index 00000000..e74eea64 --- /dev/null +++ b/test/ignrcas4.awk @@ -0,0 +1,7 @@ +BEGIN { + x = "0" + print x+0 # trigger NUMCUR + IGNORECASE = x # should enable ignorecase, since x is a non-null string + y = "aBc" + print (y ~ /abc/) +} diff --git a/test/ignrcas4.ok b/test/ignrcas4.ok new file mode 100644 index 00000000..0d66ea1a --- /dev/null +++ b/test/ignrcas4.ok @@ -0,0 +1,2 @@ +0 +1 diff --git a/test/sortfor2.awk b/test/sortfor2.awk new file mode 100644 index 00000000..1dfca04f --- /dev/null +++ b/test/sortfor2.awk @@ -0,0 +1,11 @@ +BEGIN { + PROCINFO["sorted_in"] = "@ind_num_asc" + } + { + A[$1] = 0 + } + END { + for (I in A) B[I] = A[I] + for (I in B) SCRATCH = A[I] + for (I in A) print I + } diff --git a/test/sortfor2.in b/test/sortfor2.in new file mode 100644 index 00000000..e75357a1 --- /dev/null +++ b/test/sortfor2.in @@ -0,0 +1,2 @@ +1.0 +2.0 diff --git a/test/sortfor2.ok b/test/sortfor2.ok new file mode 100644 index 00000000..e75357a1 --- /dev/null +++ b/test/sortfor2.ok @@ -0,0 +1,2 @@ +1.0 +2.0 |