From 92ec6835548d3612bd8f0e6a2b05adf4afb1c581 Mon Sep 17 00:00:00 2001 From: "Arnold D. Robbins" Date: Sun, 24 Jul 2016 21:44:27 +0300 Subject: Use dfa even in multibyte locales. --- ChangeLog | 7 +++++++ re.c | 12 ++++++------ 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index 54bd8682..ddf4469a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2016-07-24 Norihiro Tanaka + + * 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. + 2016-07-23 Andrew J. Schorr * builtin.c (do_print): Improve logic for formatting diff --git a/re.c b/re.c index 0a156ffc..5049bca6 100644 --- a/re.c +++ b/re.c @@ -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); -- cgit v1.2.3 From 5d474d04c237a090e19d363c84a003cb0d83cb29 Mon Sep 17 00:00:00 2001 From: "Arnold D. Robbins" Date: Sun, 24 Jul 2016 21:50:28 +0300 Subject: Fix a typo in test/ChangeLog. --- test/ChangeLog | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/ChangeLog b/test/ChangeLog index 8939b6f4..22a514b5 100644 --- a/test/ChangeLog +++ b/test/ChangeLog @@ -1,7 +1,7 @@ 2015-06-17 Arnold D. Robbins * Makefile.am (ofmtstrnum): New test. - * ofmtstrnu.awk, ofmtstrnum.ok: New files. + * ofmtstrnum.awk, ofmtstrnum.ok: New files. 2016-07-01 Arnold D. Robbins -- cgit v1.2.3 From b4f3bf53972f5bc25bbc5568255875cbd8b2791c Mon Sep 17 00:00:00 2001 From: "Arnold D. Robbins" Date: Sun, 24 Jul 2016 21:51:42 +0300 Subject: Typo fix in the doc. --- doc/ChangeLog | 4 ++ doc/gawk.info | 150 ++++++++++++++++++++++++++++---------------------------- doc/gawk.texi | 2 +- doc/gawktexi.in | 2 +- 4 files changed, 81 insertions(+), 77 deletions(-) diff --git a/doc/ChangeLog b/doc/ChangeLog index 709992f8..d4a89a3b 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -1,3 +1,7 @@ +2016-07-24 Arnold D. Robbins + + * gawktexi.in: Fix a typo. Thanks to Marco Curreli for reporting. + 2016-07-18 Arnold D. Robbins * gawktexi.in: Fix a typo. Thanks to Antonio Colombo for reporting. diff --git a/doc/gawk.info b/doc/gawk.info index f4759a08..872c3584 100644 --- a/doc/gawk.info +++ b/doc/gawk.info @@ -26230,7 +26230,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. @@ -35193,79 +35193,79 @@ Node: Extension Sample API Tests1052991 Node: gawkextlib1053483 Node: Extension summary1055907 Node: Extension Exercises1059599 -Node: Language History1061096 -Node: V7/SVR3.11062752 -Node: SVR41064904 -Node: POSIX1066338 -Node: BTL1067717 -Node: POSIX/GNU1068446 -Node: Feature History1073967 -Node: Common Extensions1087296 -Node: Ranges and Locales1088579 -Ref: Ranges and Locales-Footnote-11093195 -Ref: Ranges and Locales-Footnote-21093222 -Ref: Ranges and Locales-Footnote-31093457 -Node: Contributors1093678 -Node: History summary1099247 -Node: Installation1100627 -Node: Gawk Distribution1101571 -Node: Getting1102055 -Node: Extracting1103016 -Node: Distribution contents1104654 -Node: Unix Installation1110405 -Node: Quick Installation1111021 -Node: Additional Configuration Options1113448 -Node: Configuration Philosophy1115252 -Node: Non-Unix Installation1117621 -Node: PC Installation1118079 -Node: PC Binary Installation1119399 -Node: PC Compiling1121251 -Ref: PC Compiling-Footnote-11124275 -Node: PC Testing1124384 -Node: PC Using1125564 -Node: Cygwin1129678 -Node: MSYS1130448 -Node: VMS Installation1130949 -Node: VMS Compilation1131740 -Ref: VMS Compilation-Footnote-11132969 -Node: VMS Dynamic Extensions1133027 -Node: VMS Installation Details1134712 -Node: VMS Running1136965 -Node: VMS GNV1141244 -Node: VMS Old Gawk1141979 -Node: Bugs1142450 -Node: Other Versions1146647 -Node: Installation summary1153231 -Node: Notes1154289 -Node: Compatibility Mode1155154 -Node: Additions1155936 -Node: Accessing The Source1156861 -Node: Adding Code1158296 -Node: New Ports1164515 -Node: Derived Files1169003 -Ref: Derived Files-Footnote-11174488 -Ref: Derived Files-Footnote-21174523 -Ref: Derived Files-Footnote-31175121 -Node: Future Extensions1175235 -Node: Implementation Limitations1175893 -Node: Extension Design1177076 -Node: Old Extension Problems1178230 -Ref: Old Extension Problems-Footnote-11179748 -Node: Extension New Mechanism Goals1179805 -Ref: Extension New Mechanism Goals-Footnote-11183169 -Node: Extension Other Design Decisions1183358 -Node: Extension Future Growth1185471 -Node: Old Extension Mechanism1186307 -Node: Notes summary1188070 -Node: Basic Concepts1189252 -Node: Basic High Level1189933 -Ref: figure-general-flow1190215 -Ref: figure-process-flow1190900 -Ref: Basic High Level-Footnote-11194201 -Node: Basic Data Typing1194386 -Node: Glossary1197714 -Node: Copying1229660 -Node: GNU Free Documentation License1267199 -Node: Index1292317 +Node: Language History1061097 +Node: V7/SVR3.11062753 +Node: SVR41064905 +Node: POSIX1066339 +Node: BTL1067718 +Node: POSIX/GNU1068447 +Node: Feature History1073968 +Node: Common Extensions1087297 +Node: Ranges and Locales1088580 +Ref: Ranges and Locales-Footnote-11093196 +Ref: Ranges and Locales-Footnote-21093223 +Ref: Ranges and Locales-Footnote-31093458 +Node: Contributors1093679 +Node: History summary1099248 +Node: Installation1100628 +Node: Gawk Distribution1101572 +Node: Getting1102056 +Node: Extracting1103017 +Node: Distribution contents1104655 +Node: Unix Installation1110406 +Node: Quick Installation1111022 +Node: Additional Configuration Options1113449 +Node: Configuration Philosophy1115253 +Node: Non-Unix Installation1117622 +Node: PC Installation1118080 +Node: PC Binary Installation1119400 +Node: PC Compiling1121252 +Ref: PC Compiling-Footnote-11124276 +Node: PC Testing1124385 +Node: PC Using1125565 +Node: Cygwin1129679 +Node: MSYS1130449 +Node: VMS Installation1130950 +Node: VMS Compilation1131741 +Ref: VMS Compilation-Footnote-11132970 +Node: VMS Dynamic Extensions1133028 +Node: VMS Installation Details1134713 +Node: VMS Running1136966 +Node: VMS GNV1141245 +Node: VMS Old Gawk1141980 +Node: Bugs1142451 +Node: Other Versions1146648 +Node: Installation summary1153232 +Node: Notes1154290 +Node: Compatibility Mode1155155 +Node: Additions1155937 +Node: Accessing The Source1156862 +Node: Adding Code1158297 +Node: New Ports1164516 +Node: Derived Files1169004 +Ref: Derived Files-Footnote-11174489 +Ref: Derived Files-Footnote-21174524 +Ref: Derived Files-Footnote-31175122 +Node: Future Extensions1175236 +Node: Implementation Limitations1175894 +Node: Extension Design1177077 +Node: Old Extension Problems1178231 +Ref: Old Extension Problems-Footnote-11179749 +Node: Extension New Mechanism Goals1179806 +Ref: Extension New Mechanism Goals-Footnote-11183170 +Node: Extension Other Design Decisions1183359 +Node: Extension Future Growth1185472 +Node: Old Extension Mechanism1186308 +Node: Notes summary1188071 +Node: Basic Concepts1189253 +Node: Basic High Level1189934 +Ref: figure-general-flow1190216 +Ref: figure-process-flow1190901 +Ref: Basic High Level-Footnote-11194202 +Node: Basic Data Typing1194387 +Node: Glossary1197715 +Node: Copying1229661 +Node: GNU Free Documentation License1267200 +Node: Index1292318  End Tag Table diff --git a/doc/gawk.texi b/doc/gawk.texi index 42d103e5..41ac9964 100644 --- a/doc/gawk.texi +++ b/doc/gawk.texi @@ -35313,7 +35313,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. diff --git a/doc/gawktexi.in b/doc/gawktexi.in index 9714f1a4..8c40ab7f 100644 --- a/doc/gawktexi.in +++ b/doc/gawktexi.in @@ -34404,7 +34404,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. -- cgit v1.2.3 From 95bb49821598e92e05ebbbd6acea6fb9ffaa5b44 Mon Sep 17 00:00:00 2001 From: "Andrew J. Schorr" Date: Mon, 1 Aug 2016 13:31:13 -0400 Subject: Fix MPFR bug where precision was reduced to that of the function argument. --- ChangeLog | 11 +++++++++++ mpfr.c | 10 +++++++--- 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 54bd8682..28836da2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,14 @@ +2016-08-01 Andrew J. Schorr + + * 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-23 Andrew J. Schorr * builtin.c (do_print): Improve logic for formatting diff --git a/mpfr.c b/mpfr.c index 9b9e538e..0f602898 100644 --- a/mpfr.c +++ b/mpfr.c @@ -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; @@ -561,7 +563,7 @@ set_PREC() } if (prec > 0) - mpfr_set_default_prec(prec); + mpfr_set_default_prec(default_prec = prec); } @@ -705,6 +707,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 && (t1->flags & (NUMCUR|NUMBER)) == 0) @@ -713,7 +716,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); -- cgit v1.2.3 From 2bc479f6c232aba8139bc662bb706674a651556e Mon Sep 17 00:00:00 2001 From: "Arnold D. Robbins" Date: Mon, 1 Aug 2016 22:09:05 +0300 Subject: Improve ignoring case in single byte locales. --- ChangeLog | 6 ++++++ eval.c | 2 ++ 2 files changed, 8 insertions(+) diff --git a/ChangeLog b/ChangeLog index ddf4469a..5418b28b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -5,6 +5,12 @@ 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 Andrew J. Schorr * builtin.c (do_print): Improve logic for formatting diff --git a/eval.c b/eval.c index 48049ae3..36dab2fb 100644 --- a/eval.c +++ b/eval.c @@ -220,6 +220,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 -- cgit v1.2.3 From 1b70e3c2fe5d26e5f3cc3cb74e74e91ee038ea70 Mon Sep 17 00:00:00 2001 From: "Arnold D. Robbins" Date: Mon, 1 Aug 2016 22:12:30 +0300 Subject: Mark DJGPP port as unsupported. --- ChangeLog | 4 ++ NEWS | 4 +- README | 2 +- doc/ChangeLog | 4 ++ doc/gawk.info | 158 +++++++++++++++++++++++++++++--------------------------- doc/gawk.texi | 33 +++++++----- doc/gawktexi.in | 33 +++++++----- 7 files changed, 131 insertions(+), 107 deletions(-) diff --git a/ChangeLog b/ChangeLog index 4e7c4cd6..45f6e62a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2016-08-01 Arnold D. Robbins + + * README, NEWS: Mark DJGPP port as unsupported. + 2016-08-01 Andrew J. Schorr * mpfr.c (default_prec): Add new static variable to show current PREC diff --git a/NEWS b/NEWS index ca891f8b..c149dfd7 100644 --- a/NEWS +++ b/NEWS @@ -44,7 +44,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 --------------------------- diff --git a/README b/README index b8add239..57e6c32c 100644 --- a/README +++ b/README @@ -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 d4a89a3b..deb45a45 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -1,3 +1,7 @@ +2016-08-01 Arnold D. Robbins + + * gawktexi.in: Mark DJGPP port as unsupported. + 2016-07-24 Arnold D. Robbins * gawktexi.in: Fix a typo. Thanks to Marco Curreli for reporting. diff --git a/doc/gawk.info b/doc/gawk.info index 872c3584..da03f15d 100644 --- a/doc/gawk.info +++ b/doc/gawk.info @@ -27181,7 +27181,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. @@ -27832,8 +27832,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 @@ -27848,11 +27847,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 -.) 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. @@ -27961,7 +27958,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 @@ -28023,6 +28020,10 @@ or: With proper quoting, in the first example the setting of 'RS' can be moved into the 'BEGIN' rule. + ---------- Footnotes ---------- + + (1) Available from . +  File: gawk.info, Node: Cygwin, Next: MSYS, Prev: PC Using, Up: PC Installation @@ -28439,8 +28440,6 @@ this Info file. Unix and POSIX Arnold Robbins, systems -MS-DOS with DJGPP Scott Deifik, - MS-Windows with MinGW Eli Zaretskii, OS/2 Andreas Buening, @@ -28453,6 +28452,10 @@ z/OS (OS/390) Daniel Richard G. If your bug is also reproducible under Unix, send a copy of your report to the 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 @@ -28624,9 +28627,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 reports should be in English and should include the version of @@ -32401,9 +32404,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) @@ -35206,66 +35209,67 @@ Ref: Ranges and Locales-Footnote-11093196 Ref: Ranges and Locales-Footnote-21093223 Ref: Ranges and Locales-Footnote-31093458 Node: Contributors1093679 -Node: History summary1099248 -Node: Installation1100628 -Node: Gawk Distribution1101572 -Node: Getting1102056 -Node: Extracting1103017 -Node: Distribution contents1104655 -Node: Unix Installation1110406 -Node: Quick Installation1111022 -Node: Additional Configuration Options1113449 -Node: Configuration Philosophy1115253 -Node: Non-Unix Installation1117622 -Node: PC Installation1118080 -Node: PC Binary Installation1119400 -Node: PC Compiling1121252 -Ref: PC Compiling-Footnote-11124276 -Node: PC Testing1124385 -Node: PC Using1125565 -Node: Cygwin1129679 -Node: MSYS1130449 -Node: VMS Installation1130950 -Node: VMS Compilation1131741 -Ref: VMS Compilation-Footnote-11132970 -Node: VMS Dynamic Extensions1133028 -Node: VMS Installation Details1134713 -Node: VMS Running1136966 -Node: VMS GNV1141245 -Node: VMS Old Gawk1141980 -Node: Bugs1142451 -Node: Other Versions1146648 -Node: Installation summary1153232 -Node: Notes1154290 -Node: Compatibility Mode1155155 -Node: Additions1155937 -Node: Accessing The Source1156862 -Node: Adding Code1158297 -Node: New Ports1164516 -Node: Derived Files1169004 -Ref: Derived Files-Footnote-11174489 -Ref: Derived Files-Footnote-21174524 -Ref: Derived Files-Footnote-31175122 -Node: Future Extensions1175236 -Node: Implementation Limitations1175894 -Node: Extension Design1177077 -Node: Old Extension Problems1178231 -Ref: Old Extension Problems-Footnote-11179749 -Node: Extension New Mechanism Goals1179806 -Ref: Extension New Mechanism Goals-Footnote-11183170 -Node: Extension Other Design Decisions1183359 -Node: Extension Future Growth1185472 -Node: Old Extension Mechanism1186308 -Node: Notes summary1188071 -Node: Basic Concepts1189253 -Node: Basic High Level1189934 -Ref: figure-general-flow1190216 -Ref: figure-process-flow1190901 -Ref: Basic High Level-Footnote-11194202 -Node: Basic Data Typing1194387 -Node: Glossary1197715 -Node: Copying1229661 -Node: GNU Free Documentation License1267200 -Node: Index1292318 +Node: History summary1099239 +Node: Installation1100619 +Node: Gawk Distribution1101563 +Node: Getting1102047 +Node: Extracting1103008 +Node: Distribution contents1104646 +Node: Unix Installation1110397 +Node: Quick Installation1111013 +Node: Additional Configuration Options1113440 +Node: Configuration Philosophy1115244 +Node: Non-Unix Installation1117613 +Node: PC Installation1118071 +Node: PC Binary Installation1119391 +Node: PC Compiling1121243 +Ref: PC Compiling-Footnote-11124037 +Node: PC Testing1124146 +Node: PC Using1125326 +Ref: PC Using-Footnote-11129479 +Node: Cygwin1129552 +Node: MSYS1130322 +Node: VMS Installation1130823 +Node: VMS Compilation1131614 +Ref: VMS Compilation-Footnote-11132843 +Node: VMS Dynamic Extensions1132901 +Node: VMS Installation Details1134586 +Node: VMS Running1136839 +Node: VMS GNV1141118 +Node: VMS Old Gawk1141853 +Node: Bugs1142324 +Node: Other Versions1146639 +Node: Installation summary1153223 +Node: Notes1154274 +Node: Compatibility Mode1155139 +Node: Additions1155921 +Node: Accessing The Source1156846 +Node: Adding Code1158281 +Node: New Ports1164500 +Node: Derived Files1168988 +Ref: Derived Files-Footnote-11174473 +Ref: Derived Files-Footnote-21174508 +Ref: Derived Files-Footnote-31175106 +Node: Future Extensions1175220 +Node: Implementation Limitations1175878 +Node: Extension Design1177061 +Node: Old Extension Problems1178215 +Ref: Old Extension Problems-Footnote-11179733 +Node: Extension New Mechanism Goals1179790 +Ref: Extension New Mechanism Goals-Footnote-11183154 +Node: Extension Other Design Decisions1183343 +Node: Extension Future Growth1185456 +Node: Old Extension Mechanism1186292 +Node: Notes summary1188055 +Node: Basic Concepts1189237 +Node: Basic High Level1189918 +Ref: figure-general-flow1190200 +Ref: figure-process-flow1190885 +Ref: Basic High Level-Footnote-11194186 +Node: Basic Data Typing1194371 +Node: Glossary1197699 +Node: Copying1229645 +Node: GNU Free Documentation License1267184 +Node: Index1292302  End Tag Table diff --git a/doc/gawk.texi b/doc/gawk.texi index 41ac9964..99b77fa8 100644 --- a/doc/gawk.texi +++ b/doc/gawk.texi @@ -36842,14 +36842,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 @@ -37639,13 +37638,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 @@ -37663,10 +37662,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}. @@ -37815,13 +37812,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 @@ -38448,7 +38448,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} @@ -38465,6 +38465,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 @@ -38707,7 +38711,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 8c40ab7f..83ee9a19 100644 --- a/doc/gawktexi.in +++ b/doc/gawktexi.in @@ -35933,14 +35933,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 @@ -36730,13 +36729,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 @@ -36754,10 +36753,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}. @@ -36906,13 +36903,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 @@ -37539,7 +37539,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} @@ -37556,6 +37556,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 @@ -37798,7 +37802,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 -- cgit v1.2.3 From 8518cb47f8315ea04290278e47cd44036edeaf35 Mon Sep 17 00:00:00 2001 From: "Andrew J. Schorr" Date: Mon, 1 Aug 2016 15:15:41 -0400 Subject: Minor MPFR fix to avoid potential hysteresis effects resulting in higher-than-needed precision. --- ChangeLog | 5 +++++ mpfr.c | 12 ++++++++++-- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 28836da2..f370fdc9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2016-08-01 Andrew J. Schorr + + * 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 * mpfr.c (default_prec): Add new static variable to show current PREC diff --git a/mpfr.c b/mpfr.c index 0f602898..db2eb697 100644 --- a/mpfr.c +++ b/mpfr.c @@ -1218,9 +1218,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; -- cgit v1.2.3 From 5da25619741b53c6f51dd86617f10591486477ae Mon Sep 17 00:00:00 2001 From: "Arnold D. Robbins" Date: Mon, 1 Aug 2016 22:17:14 +0300 Subject: New test for sorted for. --- test/ChangeLog | 7 +++++++ test/Makefile.am | 5 ++++- test/Makefile.in | 10 +++++++++- test/Maketests | 5 +++++ test/sortfor2.awk | 11 +++++++++++ test/sortfor2.in | 2 ++ test/sortfor2.ok | 2 ++ 7 files changed, 40 insertions(+), 2 deletions(-) create mode 100644 test/sortfor2.awk create mode 100644 test/sortfor2.in create mode 100644 test/sortfor2.ok diff --git a/test/ChangeLog b/test/ChangeLog index 22a514b5..89b5d177 100644 --- a/test/ChangeLog +++ b/test/ChangeLog @@ -1,3 +1,10 @@ +2016-08-01 Arnold D. Robbins + + * Makefile.am (sortfor2): New test. + * sortfor2.awk, sortfor2.in, sortfor2.ok: New files. + Thanks Christian Schneider + for the report. + 2015-06-17 Arnold D. Robbins * Makefile.am (ofmtstrnum): New test. diff --git a/test/Makefile.am b/test/Makefile.am index 0bda377c..58b1057e 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -911,6 +911,9 @@ EXTRA_DIST = \ sortfor.awk \ sortfor.in \ sortfor.ok \ + sortfor2.awk \ + sortfor2.in \ + sortfor2.ok \ sortglos.awk \ sortglos.in \ sortglos.ok \ @@ -1123,7 +1126,7 @@ GAWK_EXT_TESTS = \ profile0 profile1 profile2 profile3 profile4 profile5 profile6 \ profile7 profile8 pty1 \ rebuf regnul1 regnul2 regx8bit reginttrad reint reint2 rsgetline rsglstdin rsstart1 \ - rsstart2 rsstart3 rstest6 shadow sortfor sortu split_after_fpat \ + rsstart2 rsstart3 rstest6 shadow sortfor sortfor2 sortu split_after_fpat \ splitarg4 strftime \ strtonum switch2 symtab1 symtab2 symtab3 symtab4 symtab5 symtab6 \ symtab7 symtab8 symtab9 symtab10 \ diff --git a/test/Makefile.in b/test/Makefile.in index ff1d8e07..b04ac7c2 100644 --- a/test/Makefile.in +++ b/test/Makefile.in @@ -1168,6 +1168,9 @@ EXTRA_DIST = \ sortfor.awk \ sortfor.in \ sortfor.ok \ + sortfor2.awk \ + sortfor2.in \ + sortfor2.ok \ sortglos.awk \ sortglos.in \ sortglos.ok \ @@ -1379,7 +1382,7 @@ GAWK_EXT_TESTS = \ profile0 profile1 profile2 profile3 profile4 profile5 profile6 \ profile7 profile8 pty1 \ rebuf regnul1 regnul2 regx8bit reginttrad reint reint2 rsgetline rsglstdin rsstart1 \ - rsstart2 rsstart3 rstest6 shadow sortfor sortu split_after_fpat \ + rsstart2 rsstart3 rstest6 shadow sortfor sortfor2 sortu split_after_fpat \ splitarg4 strftime \ strtonum switch2 symtab1 symtab2 symtab3 symtab4 symtab5 symtab6 \ symtab7 symtab8 symtab9 symtab10 \ @@ -3933,6 +3936,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 7d50a4b3..c48b76df 100644 --- a/test/Maketests +++ b/test/Maketests @@ -1317,6 +1317,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/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 -- cgit v1.2.3 From 385636c3da7f36ae020eeb7098485923168ccf4b Mon Sep 17 00:00:00 2001 From: "Arnold D. Robbins" Date: Mon, 1 Aug 2016 22:39:33 +0300 Subject: Add test case for single byte IGNORECASE fix. --- test/ChangeLog | 6 ++++++ test/Makefile.am | 10 +++++++++- test/Makefile.in | 10 +++++++++- test/ignrcas3.awk | 20 ++++++++++++++++++++ test/ignrcas3.ok | 18 ++++++++++++++++++ 5 files changed, 62 insertions(+), 2 deletions(-) create mode 100644 test/ignrcas3.awk create mode 100644 test/ignrcas3.ok diff --git a/test/ChangeLog b/test/ChangeLog index 89b5d177..a0f72bca 100644 --- a/test/ChangeLog +++ b/test/ChangeLog @@ -5,6 +5,12 @@ Thanks Christian Schneider for the report. + Unrelated: + + * Makefile.am (ignrcas3): New test. + * ignrcas3.awk, ignrcas3.ok: New files. + Based on test code from Norihiro Tanaka . + 2015-06-17 Arnold D. Robbins * Makefile.am (ofmtstrnum): New test. diff --git a/test/Makefile.am b/test/Makefile.am index 58b1057e..fbaf23ea 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -443,6 +443,8 @@ EXTRA_DIST = \ igncfs.ok \ ignrcas2.awk \ ignrcas2.ok \ + ignrcas3.awk \ + ignrcas3.ok \ ignrcase.awk \ ignrcase.in \ ignrcase.ok \ @@ -1115,7 +1117,7 @@ GAWK_EXT_TESTS = \ fieldwdth fpat1 fpat2 fpat3 fpat4 fpat5 fpatnull fsfwfs funlen \ functab1 functab2 functab3 fwtest fwtest2 fwtest3 \ genpot gensub gensub2 getlndir gnuops2 gnuops3 gnureops \ - icasefs icasers id igncdym igncfs ignrcas2 ignrcase \ + icasefs icasers id igncdym igncfs ignrcas2 ignrcas3 ignrcase \ incdupe incdupe2 incdupe3 incdupe4 incdupe5 incdupe6 incdupe7 \ include include2 indirectbuiltin indirectcall indirectcall2 \ lint lintold lintwarn \ @@ -2179,6 +2181,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 b04ac7c2..40da1e17 100644 --- a/test/Makefile.in +++ b/test/Makefile.in @@ -700,6 +700,8 @@ EXTRA_DIST = \ igncfs.ok \ ignrcas2.awk \ ignrcas2.ok \ + ignrcas3.awk \ + ignrcas3.ok \ ignrcase.awk \ ignrcase.in \ ignrcase.ok \ @@ -1371,7 +1373,7 @@ GAWK_EXT_TESTS = \ fieldwdth fpat1 fpat2 fpat3 fpat4 fpat5 fpatnull fsfwfs funlen \ functab1 functab2 functab3 fwtest fwtest2 fwtest3 \ genpot gensub gensub2 getlndir gnuops2 gnuops3 gnureops \ - icasefs icasers id igncdym igncfs ignrcas2 ignrcase \ + icasefs icasers id igncdym igncfs ignrcas2 ignrcas3 ignrcase \ incdupe incdupe2 incdupe3 incdupe4 incdupe5 incdupe6 incdupe7 \ include include2 indirectbuiltin indirectcall indirectcall2 \ lint lintold lintwarn \ @@ -2617,6 +2619,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: diff --git a/test/ignrcas3.awk b/test/ignrcas3.awk new file mode 100644 index 00000000..fd88744d --- /dev/null +++ b/test/ignrcas3.awk @@ -0,0 +1,20 @@ +BEGIN { + 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 new file mode 100644 index 00000000..0222feb5 --- /dev/null +++ b/test/ignrcas3.ok @@ -0,0 +1,18 @@ +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 -- cgit v1.2.3