From 6bbdfdc24df4a4ff46dee47aeb27bd9fd22acd14 Mon Sep 17 00:00:00 2001 From: "Arnold D. Robbins" Date: Tue, 28 Jun 2022 19:41:35 +0300 Subject: Squashed commit of the following: commit 4ddea41a560d667de9112d86ecf9ceb9b147977c Merge: 1819da3a 488500a4 Author: Arnold D. Robbins Date: Mon Jun 27 10:23:41 2022 +0300 Merge branch 'master' into feature/mdim-restart commit 1819da3a18ee15808c69c5bb5fc8071a3fc9a0e5 Merge: a98ff0cb 2ae439f3 Author: Arnold D. Robbins Date: Fri Jun 24 14:17:16 2022 +0300 Merge branch 'master' into feature/mdim-restart commit a98ff0cb4e62673c2014b8cc5ec6282b0e93d0a6 Merge: e0227307 d43b469f Author: Arnold D. Robbins Date: Wed Jun 22 10:19:43 2022 +0300 Merge branch 'master' into feature/mdim-restart commit e022730782a5943307c2dce308c7d982d0284759 Merge: a05476e0 03f79dcb Author: Arnold D. Robbins Date: Mon Jun 20 08:40:14 2022 +0300 Merge branch 'master' into feature/mdim-restart commit a05476e0c2460bab15059d70365c172cb6af8b27 Merge: 548904f8 f2e71851 Author: Arnold D. Robbins Date: Fri Jun 17 14:37:07 2022 +0300 Merge branch 'master' into feature/mdim-restart commit 548904f85e19fd4466644ce7c537d82558ea3588 Merge: bca382b2 ae879ed7 Author: Arnold D. Robbins Date: Fri Jun 17 14:15:58 2022 +0300 Merge branch 'master' into feature/mdim-restart commit bca382b2a6e70f3e8aebd7c113e9af8f868ea0e4 Merge: ddc1358d 6b97a4f7 Author: Arnold D. Robbins Date: Wed Jun 15 18:09:38 2022 +0300 Merge branch 'master' into feature/mdim-restart commit ddc1358d52f5465c02806b676cdabbb1fa046d38 Merge: a5d1b520 174bc50a Author: Arnold D. Robbins Date: Wed Jun 8 22:39:42 2022 +0300 Merge branch 'master' into feature/mdim-restart commit a5d1b520410051e912c88fda25e75532e43d9ae4 Merge: ed132168 07d04b91 Author: Arnold D. Robbins Date: Tue Jun 7 22:42:13 2022 +0300 Merge branch 'master' into feature/mdim-restart commit ed13216805ba590fec6a7aa0ae774f3cb149461a Merge: 2627f6bc 03148f2c Author: Arnold D. Robbins Date: Fri Jun 3 12:19:58 2022 +0300 Merge branch 'master' into feature/mdim-restart commit 2627f6bc294a64e0486f6e7a62c4980786e65756 Author: Arnold D. Robbins Date: Fri Jun 3 11:30:31 2022 +0300 Some more small fixes. commit a7211881a2bf1600e6ffb990e77d95e94e64b088 Author: Arnold D. Robbins Date: Fri Jun 3 11:16:36 2022 +0300 Additional fixes for reference count > 1. commit c8da61eb496e9f814ba03681993455ec1d7a0e16 Merge: ec7a63b0 45a9aeb1 Author: Arnold D. Robbins Date: Thu Jun 2 22:07:59 2022 +0300 Merge branch 'master' into feature/mdim-restart commit ec7a63b098ada34b48bf15895c1ba85eae1ece23 Author: Arnold D. Robbins Date: Thu Jun 2 21:42:55 2022 +0300 And, once again, add the new test files. commit f162319580b6a32dfdc6d40880bf329f281f02c5 Author: Arnold D. Robbins Date: Thu Jun 2 19:52:31 2022 +0300 Add a new test. commit 086487f537084f793b9ed698467ed5ced2bac0c9 Author: Arnold D. Robbins Date: Thu Jun 2 19:48:12 2022 +0300 Fix memory corruption problem. commit 9e3bdae69574f3339dc327ba735a6e7209e67bc3 Merge: fea48661 0f12de29 Author: Arnold D. Robbins Date: Wed Jun 1 18:30:10 2022 +0300 Merge branch 'master' into feature/mdim-restart commit fea486613e037bce9c0d881a82d335a2797d7863 Merge: 5338ae04 826e12f5 Author: Arnold D. Robbins Date: Tue May 24 17:02:52 2022 -0400 Merge branch 'master' into feature/mdim-restart commit 5338ae04accb66fa213efc827adaeb9bff73d136 Merge: 4ac52d68 93d37eb5 Author: Arnold D. Robbins Date: Mon May 23 16:40:52 2022 -0400 Merge branch 'master' into feature/mdim-restart commit 4ac52d685c3b6917c088b390b632195fcf68219c Author: Arnold D. Robbins Date: Sun May 22 11:13:14 2022 -0400 Fix memory leak converting Node_elem_new to array. commit 3c95d116d1adf70e8656d4fdfcecb47ed2a2aca8 Merge: 371554a7 4ecda23c Author: Arnold D. Robbins Date: Sun May 22 10:27:24 2022 -0400 Merge branch 'master' into feature/mdim-restart commit 371554a7c41ef7ebfe53d851515ed4465ed00c58 Merge: 5e76c449 86291c81 Author: Arnold D. Robbins Date: Thu May 19 12:52:43 2022 -0400 Merge branch 'master' into feature/mdim-restart commit 5e76c449eb80a6b58984e877d95296856c945fa5 Merge: 8a9e6074 bb5192be Author: Arnold D. Robbins Date: Tue May 17 17:47:17 2022 +0300 Merge branch 'master' into feature/mdim-restart commit 8a9e6074ed86cd699d4b7c70fde85954374bbb1f Merge: 58b844d9 fee5df67 Author: Arnold D. Robbins Date: Wed May 11 23:20:03 2022 +0300 Merge branch 'master' into feature/mdim-restart commit 58b844d9d888d06be5929d9bb2b4e72500e5187a Merge: 224cfcbb c4e2e18f Author: Arnold D. Robbins Date: Wed May 11 23:17:53 2022 +0300 Merge branch 'master' into feature/mdim-restart commit 224cfcbb33688065ef8037a0aabd64b28953f846 Merge: b671cb7f d5742964 Author: Arnold D. Robbins Date: Tue May 10 21:34:17 2022 +0300 Merge branch 'master' into feature/mdim-restart commit b671cb7fa5708a6c023261f2161addbd8be9ca2f Merge: 5fbcb09c 455c99c0 Author: Arnold D. Robbins Date: Thu May 5 16:15:15 2022 +0300 Merge branch 'master' into feature/mdim-restart commit 5fbcb09c975355efd20b5f7ffd352071c99d7bc6 Merge: 0fa7a8eb 57745697 Author: Arnold D. Robbins Date: Tue May 3 22:57:39 2022 +0300 Merge branch 'master' into feature/mdim-restart commit 0fa7a8eb003a9899f15124444a23878b25ee2c5d Merge: 0ead15b9 d2b7dbb1 Author: Arnold D. Robbins Date: Tue May 3 22:55:49 2022 +0300 Merge branch 'master' into feature/mdim-restart commit 0ead15b9d6170db2dd9b9e003ce231cf138c60ce Merge: 2c14c31f 0b77c57f Author: Arnold D. Robbins Date: Fri Apr 29 11:41:56 2022 +0300 Merge branch 'master' into feature/mdim-restart commit 2c14c31fc8b7ad36fdfe8d5387e24e664c7e6d39 Merge: 161546b4 d2e790ba Author: Arnold D. Robbins Date: Fri Apr 29 11:03:55 2022 +0300 Merge branch 'master' into feature/mdim-restart commit 161546b45836571ec07746b052a89f394cbb64ec Merge: 459cf2a5 20c0d1e7 Author: Arnold D. Robbins Date: Thu Apr 28 23:28:03 2022 +0300 Merge branch 'master' into feature/mdim-restart commit 459cf2a53e1945b53b3f0be1ab80a2e4d67cea88 Merge: 300cf5f5 27f1be8a Author: Arnold D. Robbins Date: Thu Apr 21 17:36:18 2022 +0300 Merge branch 'master' into feature/mdim-restart commit 300cf5f522c928476cfbd13cbb670222a8d97a70 Merge: e319f5fe 618431c8 Author: Arnold D. Robbins Date: Thu Apr 21 12:15:38 2022 +0300 Merge branch 'master' into feature/mdim-restart commit e319f5feba1df6c0f018344efc6757d086cee710 Merge: 6a92817e c9e804f4 Author: Arnold D. Robbins Date: Wed Apr 20 17:22:28 2022 +0300 Merge branch 'master' into feature/mdim-restart commit 6a92817ef034fd0915fdd88879bed1c470457111 Author: Arnold D. Robbins Date: Wed Apr 20 16:39:51 2022 +0300 Small whitespace cleanups. commit 6abf94e452643df122935f585e209f52f6814782 Merge: 9c9b241a b55d466c Author: Arnold D. Robbins Date: Mon Apr 18 16:24:24 2022 +0300 Merge branch 'master' into feature/mdim-restart commit 9c9b241a2cf538c05ce162f73fb45e06f73e509f Merge: 5ec85050 b6fd48c9 Author: Arnold D. Robbins Date: Fri Apr 8 13:16:43 2022 +0300 Merge branch 'master' into feature/mdim-restart commit 5ec85050cac30dfb239ba6350b32ff447fe67f11 Author: Arnold D. Robbins Date: Wed Apr 6 20:22:36 2022 +0300 More cleanups. commit ff3f9433a6ab9d0f4e5ca21e3cf8b7dc69741d39 Merge: 0e6a31ca 62ec80d7 Author: Arnold D. Robbins Date: Wed Apr 6 20:09:30 2022 +0300 Merge branch 'master' into feature/mdim-restart commit 0e6a31caf3c0ee5d9a329a1cd8ae4ae17c950990 Merge: 4fc1469f 4bbfe95a Author: Arnold D. Robbins Date: Wed Apr 6 08:15:45 2022 +0300 Merge branch 'master' into feature/mdim-restart commit 4fc1469f68f15b2f56c31340cbd852dda2c43cf6 Merge: 3ef91f55 32b09ecf Author: Arnold D. Robbins Date: Fri Apr 1 16:08:22 2022 +0300 Merge branch 'master' into feature/mdim-restart commit 3ef91f5586feb1fa9e20cb3c2f1359a465ec8db9 Merge: 56242fa8 8b41863c Author: Arnold D. Robbins Date: Fri Apr 1 14:20:09 2022 +0300 Merge branch 'feature/mdim-restart' of ssh://git.sv.gnu.org/srv/git/gawk into feature/mdim-restart commit 56242fa8c66f43ae23b9f47b1e225a6692515f1b Author: Arnold D. Robbins Date: Fri Apr 1 14:18:53 2022 +0300 Additional cleanups. commit 8b41863cd58085a86acf31e131e60233e9b3a4f2 Merge: 89a85232 dd566361 Author: Arnold D. Robbins Date: Wed Mar 30 10:22:55 2022 +0300 Merge branch 'master' into feature/mdim-restart commit 89a85232c6d8203f33052cf305e79cb5b2ab952a Author: Arnold D. Robbins Date: Mon Mar 28 19:37:29 2022 +0300 Final fixes and update ChangeLog. commit 278b252a84ff2af01cb9d572c4b9c1e5b01c2b59 Author: Arnold D. Robbins Date: Sun Mar 27 08:21:53 2022 +0300 And the rest of the mdim test files. commit 349910e7752b6c10ed6f475b83f49bf3577c96d3 Author: Arnold D. Robbins Date: Sun Mar 27 08:19:54 2022 +0300 Fix mdim1.ok. commit f464540b8d76f9829acd88fb46d1efa587d69b83 Author: Arnold D. Robbins Date: Sun Mar 27 08:18:24 2022 +0300 Add mdim1, mdim2 tests. commit 6eff0cb4ab369aa32d919f281cdbfced06a05fcf Merge: b79756a0 c2f6af30 Author: Arnold D. Robbins Date: Sun Mar 27 08:11:03 2022 +0300 Merge branch 'master' into feature/mdim-restart commit b79756a0f070815264378f5614ef83d5c807f918 Author: Arnold D. Robbins Date: Sat Mar 26 22:17:36 2022 +0300 Remove wrong comment. commit 32cf648f9ee4f30e95e3a4503ed56f9b2ca9c8ab Author: Arnold D. Robbins Date: Sat Mar 26 22:13:19 2022 +0300 Continue fixing. commit 0368d0007ddeba8c0f6b32bef47c0b7d3b49784b Author: Arnold D. Robbins Date: Sat Mar 26 21:55:07 2022 +0300 Next fix. commit b67edcd6079e5c600f9b36c00994555ed54edc00 Author: Arnold D. Robbins Date: Sat Mar 26 21:19:06 2022 +0300 Continue making progress. commit 0a5688347945717c3bce4993ac507f692a85ebe2 Merge: 1f4dbe80 0cdb4a0e Author: Arnold D. Robbins Date: Fri Mar 25 14:03:26 2022 +0300 Merge branch 'master' into feature/mdim-restart commit 1f4dbe804b2d5936d10567f44bc6b1bca448e6e1 Author: Arnold D. Robbins Date: Wed Mar 23 21:27:31 2022 +0200 Continuing progress. commit 8e4e61cf09db4c3e93cc9fd92b5f4a0429240d36 Author: Arnold D. Robbins Date: Wed Mar 23 20:59:02 2022 +0200 Small code cleanup. commit 2b918ad7a76155acbfd19ccf695fe50cd6a1baa7 Author: Arnold D. Robbins Date: Wed Mar 23 20:57:05 2022 +0200 Stage 2 working. commit 7d30f731653bd0358af43a65384491d526006a8b Author: Arnold D. Robbins Date: Wed Mar 23 20:50:27 2022 +0200 First stage working. --- ChangeLog | 99 ++++++++++ NEWS | 3 + array.c | 31 +++- awk.h | 13 +- builtin.c | 3 +- cint_array.c | 2 +- debug.c | 13 +- eval.c | 31 ++++ ext.c | 2 +- gawkapi.c | 12 +- int_array.c | 2 +- interpret.h | 31 +++- mpfr.c | 9 + node.c | 9 + pc/ChangeLog | 8 + pc/Makefile.tst | 16 ++ str_array.c | 2 +- symbol.c | 2 + test/ChangeLog | 14 ++ test/Makefile.am | 7 + test/Makefile.in | 22 +++ test/Maketests | 15 ++ test/aadelete1.awk | 2 +- test/aadelete1.ok | 2 - test/mdim1.awk | 15 ++ test/mdim1.ok | 9 + test/mdim2.awk | 9 + test/mdim2.ok | 1 + test/mdim3.awk | 29 +++ test/mdim3.ok | 520 +++++++++++++++++++++++++++++++++++++++++++++++++++++ test/typeof3.awk | 2 +- test/typeof3.ok | 4 +- 32 files changed, 915 insertions(+), 24 deletions(-) create mode 100644 test/mdim1.awk create mode 100644 test/mdim1.ok create mode 100644 test/mdim2.awk create mode 100644 test/mdim2.ok create mode 100644 test/mdim3.awk create mode 100644 test/mdim3.ok diff --git a/ChangeLog b/ChangeLog index 31d95383..28bb59ef 100644 --- a/ChangeLog +++ b/ChangeLog @@ -64,17 +64,46 @@ an array. (api_impl): Add hook for api_destroy_array. +2022-06-03 Arnold D. Robbins + + * awk.h (elem_new_to_scalar): Add declaration. + * eval.c (elem_new_to_scalar): No longer static. Make it handle + things when valref is > 1. Returns a NODE * instead of being void. + (cmp_scalars): Change usage of elem_new_to_scalar(). + * interpret.h (r_interpret): Op_push*: Make Node_elem_new into + a separate case, using elem_new_to_scalar(). + * array.c (force_array): For Node_elem_new, clear symbol->stptr. + * eval.r (r_get_lhs): Use efree() intstead of free() in Node_elem_new + case. + 2022-06-02 Arnold D. Robbins * builtin.c (do_sub): Fix memory corruption when substituting into a value that is a typed regex. Thanks to valgrind. +2022-06-02 Arnold D. Robbins + + Fix a nasty memory corruption problem. Thanks to + Andrew Schorr for the report. + + * eval.c (r_get_lhs): Handle Node_elem_new separately + to free the string value. This was not the problem. + * interpret.h (r_interpret): For Op_assign, when turning + Node_elem_new into the null string, DEREF the old value + and dupnode the new one. THIS was the problem. + 2022-05-24 Adam Van Scyoc * awkgram.y (make_assignable): Handle Op_field_assign. Avoids a core dump upon a certain kind of syntax error; see test/getlnfa.awk. +2022-05-22 Arnold D. Robbins + + * array.c (force_array): When converting Node_elem_new to an array, + release the string storage. Thanks to valgrind, by way of Andrew + Schorr, for the report. + 2022-05-11 Arnold D. Robbins * profile.c (pp_list): Typo fix in a comment. @@ -111,16 +140,86 @@ merged. * profile.c (pprint): Improve code for Op_K_switch, Op_K_case. +2022-04-20 Arnold D. Robbins + + * mpfr.c (mpg_force_number): Small whitespace fix. + * node.c (r_force_number): Ditto. + 2022-04-18 Arnold D. Robbins * gawkbug.in: Small changes. +2022-04-06 Arnold D. Robbins + + Further cleanups. + + * array.c (new_array_element): Set s->stfmt to STFMT_UNUSED. + * awk.h (force_string_fmt): No need to set s->stfmt anymore. + * builtin.c (do_typeof): Collapse Node_var_new and Node_elem_new + cases. + * symbol.c (print_vars): Node_elem_new can't be in a top level + variable. Remove check and add a call to cant_happen if some + other node type is received. + * NEWS: Updated. + 2022-04-01 Arnold D. Robbins Small fix from the persistent-gawk guys. * profile.c (pprint): Use estrdup instead of strdup. +2022-03-31 Arnold D. Robbins + + * array.c (new_array_element): Make a full null string instead of + an empty node; it can be more easily converted to scalar that way. + * awk.h (force_string_fmt): Change the node type, remove NUMBER flag, + set STFMT_UNUSED. + * cint_array.c (lear_clear): Remove check for not equal Node_elem_new. + * int_array.c (int_clear): Ditto. + * str_array.c (str_clear): Ditto. + * eval.c (elem_new_to_scalar): Now only needs to change the node type. + * interpret.h (r_interpret): Treat Node_elem_new like Node_val, and + UPREF it when pushed. Remove test before DEREFing when popping. + * mpfr.c (mpg_force_number): Simplify converting Node_elem_new to + Node_val. Fix the string value. + * node.c (r_force_number): Ditto. + +2022-03-28 Arnold D. Robbins + + Allow unreferenced array elements to turn into subarrays. + + * awk.h (Node_elem_new): New node type. + (new_array_element): Add declaration. + (POP_ARRAY): Handle Node_elem_new. + (force_string_fmt): Ditto. Make sure valref has the right value. + * array.c (force_array): Handle Node_elem_new. + (do_sort_up_value_type): Ditto. + (new_array_element): New function, creates Node_elem_new node. + * builtin.c (do_length): Handle Node_elem_new. + (do_typeof): Ditto. + * cint_array.c (leaf_lookup): Use new_array_element() when creating + a new element. + (left_clear): Don't unref Node_elem_new. + * debug.c (print_symbol, do_set_var,watchpont_triggered, + initialize_watch_item, print_memory, do_print_f): Handle Node_elem_new. + * eval.c (nodetypes): Add Node_elem_new. + (r_get_lhs, setup_frame): Handle Node_elem_new. + (elem_new_to_scalar): New function. + (cmp_scalars): Use elem_new_to_scalar. + * ext.c (get_actual_argument): Handle Node_elem_new. + * gawkapi.c (api_get_argument, api_set_argument, node_to_awk_value, + api_sym_update): Handle Node_elem_new. + * int_array.c (int_clear): Don't unref Node_elem_new. + (int_insert): Use new_array_element() when creating a new element. + * interpret.h (r_interpret): Handle Node_elem_new as appropriate. + * mpfr.c (mpg_force_number): Handle Node_elem_new.Make sure valref has + the right value. + * node.c (r_force_number): Ditto. + * str_array.c (str_lookup): Use new_array_element() when creating a + new element. + (str_clear): Don't unref Node_elem_new. + * symbol.c (print_vars): Handle Node_elem_new. + 2022-03-27 Arnold D. Robbins Allow nested indirect function calls. Thanks to diff --git a/NEWS b/NEWS index 1f7f66e6..3e8f5673 100644 --- a/NEWS +++ b/NEWS @@ -49,6 +49,9 @@ allowing gawk to preserve the contents of its variables and arrays between runs. THIS IS AN EXPERIMENTAL FEATURE! For more information, see the manual. +10. Some subtle issues with untyped array elements being passed to +functions have been fixed. + Changes from 5.1.1 to 5.1.2 --------------------------- diff --git a/array.c b/array.c index cbed1254..4361b51c 100644 --- a/array.c +++ b/array.c @@ -315,7 +315,7 @@ array_vname(const NODE *symbol) /* * force_array --- proceed to the actual Node_var_array, - * change Node_var_new to an array. + * change Node_var_new or Node_elem_new to an array. * If canfatal and type isn't good, die fatally, * otherwise return the final actual value. */ @@ -334,6 +334,11 @@ force_array(NODE *symbol, bool canfatal) } switch (symbol->type) { + case Node_elem_new: + efree(symbol->stptr); + symbol->stptr = NULL; + symbol->stlen = 0; + /* fall through */ case Node_var_new: symbol->xarray = NULL; /* make sure union is as it should be */ null_array(symbol); @@ -1166,6 +1171,7 @@ do_sort_up_value_type(const void *p1, const void *p2) Node_func, Node_ext_func, Node_var_new, + Node_elem_new, Node_var, Node_var_array, Node_val, @@ -1429,3 +1435,26 @@ assoc_list(NODE *symbol, const char *sort_str, sort_context_t sort_ctxt) return list; } + +/* new_array_element --- return a new empty element node */ + +NODE * +new_array_element(void) +{ + NODE *n = make_number(0.0); + char *sp; + + emalloc(sp, char *, 2, "new_array_element"); + sp[0] = sp[1] = '\0'; + + n->stptr = sp; + n->stlen = 0; + n->stfmt = STFMT_UNUSED; + + n->flags |= (MALLOC|STRING|STRCUR); + + n->type = Node_elem_new; + n->valref = 1; + + return n; +} diff --git a/awk.h b/awk.h index f89b0866..6ff88677 100644 --- a/awk.h +++ b/awk.h @@ -258,6 +258,7 @@ typedef enum nodevals { Node_var, /* scalar variable, lnode is value */ Node_var_array, /* array is ptr to elements, table_size num of eles */ Node_var_new, /* newly created variable, may become an array */ + Node_elem_new, /* newly created array element, may become a subarray */ Node_param_list, /* lnode is a variable, rnode is more list */ Node_func, /* lnode is param. list, rnode is body */ Node_ext_func, /* extension function, code_ptr is builtin code */ @@ -1445,6 +1446,7 @@ extern NODE *do_asorti(int nargs); extern unsigned long (*hash)(const char *s, size_t len, unsigned long hsize, size_t *code); extern void init_env_array(NODE *env_node); extern void init_argv_array(NODE *argv_node, NODE *shadow_node); +extern NODE *new_array_element(void); /* awkgram.c */ extern NODE *variable(int location, char *name, NODETYPE type); extern int parse_program(INSTRUCTION **pcode, bool from_eval); @@ -1559,6 +1561,7 @@ extern STACK_ITEM *grow_stack(void); extern void dump_fcall_stack(FILE *fp); extern int register_exec_hook(Func_pre_exec preh, Func_post_exec posth); extern NODE **r_get_field(NODE *n, Func_ptr *assign, bool reference); +extern NODE *elem_new_to_scalar(NODE *n); /* ext.c */ extern NODE *do_ext(int nargs); void load_ext(const char *lib_name); /* temporary */ @@ -1849,7 +1852,8 @@ POP_ARRAY(bool check_for_untyped) NODE *t = POP(); static bool warned = false; - if (do_lint && ! warned && check_for_untyped && t->type == Node_var_new) { + if (do_lint && ! warned && check_for_untyped + && (t->type == Node_var_new || t->type == Node_elem_new)) { warned = true; lintwarn(_("behavior of `for' loop on untyped variable is not defined by POSIX")); } @@ -1942,6 +1946,13 @@ dupnode(NODE *n) static inline NODE * force_string_fmt(NODE *s, const char *fmtstr, int fmtidx) { + if (s->type == Node_elem_new) { + s->type = Node_val; + s->flags &= ~NUMBER; + + return s; + } + if ((s->flags & STRCUR) != 0 && (s->stfmt == STFMT_UNUSED || (s->stfmt == fmtidx #ifdef HAVE_MPFR diff --git a/builtin.c b/builtin.c index 3a38a478..75825742 100644 --- a/builtin.c +++ b/builtin.c @@ -591,7 +591,7 @@ do_length(int nargs) size = assoc_length(tmp); return make_number(size); - } else if (tmp->type == Node_var_new) { + } else if (tmp->type == Node_var_new || tmp->type == Node_elem_new) { // this can happen from an indirect call DEREF(tmp); tmp = dupnode(Nnull_string); @@ -4342,6 +4342,7 @@ do_typeof(int nargs) } break; case Node_var_new: + case Node_elem_new: res = "untyped"; deref = false; break; diff --git a/cint_array.c b/cint_array.c index 91947766..3e0393c9 100644 --- a/cint_array.c +++ b/cint_array.c @@ -1068,7 +1068,7 @@ leaf_lookup(NODE *symbol, NODE *array, long k, long size, long base) lhs = array->nodes + (k - base); /* leaf element */ if (*lhs == NULL) { array->table_size++; /* one more element in leaf array */ - *lhs = dupnode(Nnull_string); + *lhs = new_array_element(); } return lhs; } diff --git a/debug.c b/debug.c index 2849a4c1..f602a199 100644 --- a/debug.c +++ b/debug.c @@ -967,6 +967,9 @@ print_symbol(NODE *r, bool isparam) case Node_var_new: fprintf(out_fp, "untyped variable\n"); break; + case Node_elem_new: + fprintf(out_fp, "untyped element\n"); + break; case Node_var: if (! isparam && r->var_update) r->var_update(); @@ -1241,6 +1244,7 @@ do_set_var(CMDARG *arg, int cmd ATTRIBUTE_UNUSED) switch (r->type) { case Node_var_new: + case Node_elem_new: r->type = Node_var; r->var_value = dupnode(Nnull_string); /* fall through */ @@ -1730,6 +1734,7 @@ watchpoint_triggered(struct list_item *w) t2 = symbol; break; case Node_var_new: + case Node_elem_new: break; default: cant_happen("unexpected symbol type %s", nodetype2str(symbol->type)); @@ -1806,7 +1811,7 @@ initialize_watch_item(struct list_item *w) r = *get_field(field_num, NULL); w->cur_value = dupnode(r); } else { - if (symbol->type == Node_var_new) + if (symbol->type == Node_var_new || symbol->type == Node_elem_new) w->cur_value = (NODE *) 0; else if (symbol->type == Node_var) { r = symbol->var_value; @@ -3753,6 +3758,10 @@ print_memory(NODE *m, NODE *func, Func_print print_func, FILE *fp) print_func(fp, "%s", m->vname); break; + case Node_elem_new: + print_func(fp, "element - %p", m); + break; + default: print_func(fp, "?"); /* can't happen */ } @@ -5109,7 +5118,7 @@ do_print_f(CMDARG *arg, int cmd ATTRIBUTE_UNUSED) r = find_symbol(name, NULL); if (r == NULL) goto done; - if (r->type == Node_var_new) + if (r->type == Node_var_new || r->type == Node_elem_new) tmp[i] = Nnull_string; else if (r->type != Node_var) { d_error(_("`%s' is not a scalar variable"), name); diff --git a/eval.c b/eval.c index c6f8bcb9..e292cab6 100644 --- a/eval.c +++ b/eval.c @@ -238,6 +238,7 @@ static const char *const nodetypes[] = { "Node_var", "Node_var_array", "Node_var_new", + "Node_elem_new", "Node_param_list", "Node_func", "Node_ext_func", @@ -1167,6 +1168,14 @@ r_get_lhs(NODE *n, bool reference) n->var_value = dupnode(Nnull_string); break; + case Node_elem_new: + efree(n->stptr); + n->stptr = NULL; + n->stlen = 0; + n->type = Node_var; + n->var_value = dupnode(Nnull_string); + break; + case Node_var: break; @@ -1313,6 +1322,7 @@ setup_frame(INSTRUCTION *pc) switch (m->type) { case Node_var_new: case Node_var_array: + case Node_elem_new: r->type = Node_array_ref; r->orig_array = r->prev_array = m; break; @@ -1534,6 +1544,10 @@ cmp_scalars(scalar_cmp_t comparison_type) t2 = POP_SCALAR(); t1 = TOP(); + + t1 = elem_new_to_scalar(t1); + t2 = elem_new_to_scalar(t2); + if (t1->type == Node_var_array) { DEREF(t2); fatal(_("attempt to use array `%s' in a scalar context"), array_vname(t1)); @@ -1872,3 +1886,20 @@ init_interpret() interpret = r_interpret; } +/* elem_new_to_scalar --- convert Node_elem_new to untyped scalar */ + +NODE * +elem_new_to_scalar(NODE *n) +{ + if (n->type != Node_elem_new) + return n; + + if (n->valref > 1) { + unref(n); + return dupnode(Nnull_string); + } + + n->type = Node_val; + + return n; +} diff --git a/ext.c b/ext.c index 30e52aae..3d643c01 100644 --- a/ext.c +++ b/ext.c @@ -200,7 +200,7 @@ get_actual_argument(NODE *t, int i, bool want_array) pc = TOP()->code_ptr; /* Op_ext_builtin instruction */ fname = (pc + 1)->func_name; - if (t->type == Node_var_new) { + if (t->type == Node_var_new || t->type == Node_elem_new) { if (want_array) return force_array(t, false); else { diff --git a/gawkapi.c b/gawkapi.c index 01157d52..93cd9b15 100644 --- a/gawkapi.c +++ b/gawkapi.c @@ -69,7 +69,7 @@ api_get_argument(awk_ext_id_t id, size_t count, return awk_false; /* if type is undefined */ - if (arg->type == Node_var_new) { + if (arg->type == Node_var_new || arg->type == Node_elem_new) { if (wanted == AWK_UNDEFINED) return awk_true; else if (wanted == AWK_ARRAY) { @@ -124,7 +124,7 @@ api_set_argument(awk_ext_id_t id, return awk_false; if ( (arg = get_argument(count)) == NULL - || arg->type != Node_var_new) + || (arg->type != Node_var_new && arg->type != Node_elem_new)) return awk_false; arg = get_array_argument(arg, count); @@ -564,6 +564,7 @@ node_to_awk_value(NODE *node, awk_value_t *val, awk_valtype_t wanted) switch (node->type) { case Node_var_new: /* undefined variable */ + case Node_elem_new: /* undefined element */ val->val_type = AWK_UNDEFINED; if (wanted == AWK_UNDEFINED) { ret = awk_true; @@ -896,10 +897,13 @@ api_sym_update(awk_ext_id_t id, efree((void *) full_name); - if ((node->type == Node_var && value->val_type != AWK_ARRAY) || node->type == Node_var_new) { + if ((node->type == Node_var && value->val_type != AWK_ARRAY) + || node->type == Node_var_new + || node->type == Node_elem_new) { unref(node->var_value); node->var_value = awk_value_to_node(value); - if (node->type == Node_var_new && value->val_type != AWK_UNDEFINED) + if ((node->type == Node_var_new || node->type == Node_elem_new) + && value->val_type != AWK_UNDEFINED) node->type = Node_var; return awk_true; diff --git a/int_array.c b/int_array.c index 382aa799..8752413e 100644 --- a/int_array.c +++ b/int_array.c @@ -792,7 +792,7 @@ int_insert(NODE *symbol, long k, uint32_t hash1) } b->ainum[i] = k; - b->aivalue[i] = dupnode(Nnull_string); + b->aivalue[i] = new_array_element(); b->aicount++; return & b->aivalue[i]; } diff --git a/interpret.h b/interpret.h index bed2dfe8..29fc7fce 100644 --- a/interpret.h +++ b/interpret.h @@ -224,6 +224,20 @@ uninitialized_scalar: save_symbol->vname); if (op != Op_push_arg_untyped) m = dupnode(Nnull_string); + UPREF(m); + PUSH(m); + break; + + case Node_elem_new: + if (op != Op_push_arg_untyped) { + /* convert untyped to scalar */ + m = elem_new_to_scalar(m); + } + if (do_lint) + lintwarn(isparam ? + _("reference to uninitialized argument `%s'") : + _("reference to uninitialized variable `%s'"), + save_symbol->vname); PUSH(m); break; @@ -320,7 +334,7 @@ uninitialized_scalar: } } - if (r->type == Node_val) + if (r->type == Node_val || r->type == Node_elem_new) UPREF(r); PUSH(r); break; @@ -353,6 +367,11 @@ uninitialized_scalar: t2 = force_string(t2); r->vname = estrdup(t2->stptr, t2->stlen); /* the subscript in parent array */ assoc_set(t1, t2, r); + } else if (r->type == Node_elem_new) { + r = force_array(r, false); + r->parent_array = t1; + t2 = force_string(t2); + r->vname = estrdup(t2->stptr, t2->stlen); /* the subscript in parent array */ } else if (r->type != Node_var_array) { t2 = force_string(t2); fatal(_("attempt to use scalar `%s[\"%.*s\"]' as an array"), @@ -389,7 +408,7 @@ uninitialized_scalar: * be stored in SYMTAB: * 1. Variables that don"t yet have a value (Node_var_new) * 2. Variables that have a value (Node_var) - * 3. Values that awk code stuck into SYMTAB not related to variables (Node_value) + * 3. Values that awk code stuck into SYMTAB not related to variables (Node_val) * For 1, since we are giving it a value, we have to change the type to Node_var. * For 1 and 2, we have to step through the Node_var to get to the value. * For 3, we fatal out. This avoids confusion on things like @@ -713,7 +732,7 @@ mod: * SYMTAB is a little more messy. Three possibilities for SYMTAB: * 1. Variables that don"t yet have a value (Node_var_new) * 2. Variables that have a value (Node_var) - * 3. Values that awk code stuck into SYMTAB not related to variables (Node_value) + * 3. Values that awk code stuck into SYMTAB not related to variables (Node_val) * For 1, since we are giving it a value, we have to change the type to Node_var. * For 1 and 2, we have to step through the Node_var to get to the value. * For 3, we fatal out. This avoids confusion on things like @@ -844,6 +863,10 @@ mod: lhs = POP_ADDRESS(); r = TOP_SCALAR(); unref(*lhs); + if (r->type == Node_elem_new) { + DEREF(r); + r = dupnode(Nnull_string); + } UPREF(r); UNFIELD(*lhs, r); REPLACE(r); @@ -1074,7 +1097,7 @@ arrayfor: (void) POP_CODE(); while (arg_count-- > 0) { t1 = POP(); - if (t1->type == Node_val) + if (t1->type == Node_val || t1->type == Node_elem_new) DEREF(t1); } free_api_string_copies(); diff --git a/mpfr.c b/mpfr.c index 7f61b692..a8834c39 100644 --- a/mpfr.c +++ b/mpfr.c @@ -349,6 +349,15 @@ mpg_force_number(NODE *n) { char *cp, *cpend; + if (n->type == Node_elem_new) { + n->type = Node_val; + n->flags &= ~STRING; + n->stptr[0] = '0'; // STRCUR is still set + n->stlen = 1; + + return n; + } + if ((n->flags & NUMCUR) != 0) return n; n->flags |= NUMCUR; diff --git a/node.c b/node.c index cbf5c56e..904e3d08 100644 --- a/node.c +++ b/node.c @@ -61,6 +61,15 @@ r_force_number(NODE *n) char save; char *ptr; + if (n->type == Node_elem_new) { + n->type = Node_val; + n->flags &= ~STRING; + n->stptr[0] = '0'; // STRCUR is still set + n->stlen = 1; + + return n; + } + if ((n->flags & NUMCUR) != 0) return n; diff --git a/pc/ChangeLog b/pc/ChangeLog index e012e4b3..15287b22 100644 --- a/pc/ChangeLog +++ b/pc/ChangeLog @@ -1,3 +1,7 @@ +2022-06-02 Arnold D. Robbins + + * Makefile.tst: Regenerated. + 2022-05-24 Adam Van Scyoc * Makefile.tst: Regenerated. @@ -18,6 +22,10 @@ * Makefile.tst: Regenerated. +2022-03-28 Arnold D. Robbins + + * Makefile.tst: Regenerated. + 2022-03-27 Arnold D. Robbins * Makefile.tst: Regenerated. diff --git a/pc/Makefile.tst b/pc/Makefile.tst index e07a22ed..54d86dca 100644 --- a/pc/Makefile.tst +++ b/pc/Makefile.tst @@ -202,6 +202,7 @@ GAWK_EXT_TESTS = \ indirectcall3 indirectbuiltin2 \ inf-nan-torture intarray iolint isarrayunset lint lintexp \ lintindex lintint lintlength lintold lintplus lintset lintwarn \ + mdim1 mdim2 mdim3 \ manyfiles match1 match2 match3 mbstr1 mbstr2 mixed1 mktime \ modifiers muldimposix nastyparm negtime next nondec nondec2 \ nonfatal1 nonfatal2 nonfatal3 nsawk1a nsawk1b nsawk1c nsawk2a \ @@ -3007,6 +3008,21 @@ lintwarn: @-AWKPATH="$(srcdir)" $(AWK) -f $@.awk --lint >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ +mdim1: + @echo $@ + @-AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ + +mdim2: + @echo $@ + @-AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ + +mdim3: + @echo $@ + @-AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ + match1: @echo $@ @-AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ diff --git a/str_array.c b/str_array.c index 08704312..101ad0b9 100644 --- a/str_array.c +++ b/str_array.c @@ -217,7 +217,7 @@ str_lookup(NODE *symbol, NODE *subs) b->ahname = subs; b->ahname_str = subs->stptr; b->ahname_len = subs->stlen; - b->ahvalue = dupnode(Nnull_string); + b->ahvalue = new_array_element(); b->ahcode = code1; return & (b->ahvalue); } diff --git a/symbol.c b/symbol.c index 5ac5656d..d8a8b49f 100644 --- a/symbol.c +++ b/symbol.c @@ -497,6 +497,8 @@ print_vars(NODE **table, int (*print_func)(FILE *, const char *, ...), FILE *fp) print_func(fp, "untyped variable\n"); else if (r->type == Node_var) valinfo(r->var_value, print_func, fp); + else + cant_happen("unexpected node type: %s", nodetype2str(r->type)); } } diff --git a/test/ChangeLog b/test/ChangeLog index 3f263224..7bd6b3c8 100644 --- a/test/ChangeLog +++ b/test/ChangeLog @@ -1,3 +1,8 @@ +2022-06-02 Arnold D. Robbins + + * Makefile.am (EXTRA_DIST): mdim3: new test. + * mdim3.awk, mdim3.ok: New files. + 2022-05-24 Adam Van Scyoc * Makefile.am (EXTRA_DIST): getlnfa, new test. @@ -28,10 +33,19 @@ * profile5.ok, profile10.ok, profile11.ok: Updated after code changes. * profile17.awk, profile17.ok: New files. +2022-03-31 Arnold D. Robbins + + * aadelete1.awk, aadelete1.ok: Changed to sync with code changes. + 2022-03-30 Arnold D. Robbins * delarprm2.awk, delarprm2.ok: Changes to make test more helpful. +2022-03-27 Arnold D. Robbins + + * Makefile.am (EXTRA_DIST): mdim1, mdim2: new tests. + * mdim1.awk, mdim1.ok, mdim2.awk, mdim2.ok: New files. + 2022-03-27 Arnold D. Robbins * Makefile.am (EXTRA_DIST): indirectcall3, new test. diff --git a/test/Makefile.am b/test/Makefile.am index fd73e646..fe4872f9 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -678,6 +678,12 @@ EXTRA_DIST = \ manglprm.ok \ manyfiles.awk \ manyfiles.ok \ + mdim1.awk \ + mdim1.ok \ + mdim2.awk \ + mdim2.ok \ + mdim3.awk \ + mdim3.ok \ modifiers.sh \ modifiers.ok \ muldimposix.awk \ @@ -1476,6 +1482,7 @@ GAWK_EXT_TESTS = \ indirectcall3 indirectbuiltin2 \ inf-nan-torture intarray iolint isarrayunset lint lintexp \ lintindex lintint lintlength lintold lintplus lintset lintwarn \ + mdim1 mdim2 mdim3 \ manyfiles match1 match2 match3 mbstr1 mbstr2 mixed1 mktime \ modifiers muldimposix nastyparm negtime next nondec nondec2 \ nonfatal1 nonfatal2 nonfatal3 nsawk1a nsawk1b nsawk1c nsawk2a \ diff --git a/test/Makefile.in b/test/Makefile.in index 2673a17b..f838d388 100644 --- a/test/Makefile.in +++ b/test/Makefile.in @@ -945,6 +945,12 @@ EXTRA_DIST = \ manglprm.ok \ manyfiles.awk \ manyfiles.ok \ + mdim1.awk \ + mdim1.ok \ + mdim2.awk \ + mdim2.ok \ + mdim3.awk \ + mdim3.ok \ modifiers.sh \ modifiers.ok \ muldimposix.awk \ @@ -1743,6 +1749,7 @@ GAWK_EXT_TESTS = \ indirectcall3 indirectbuiltin2 \ inf-nan-torture intarray iolint isarrayunset lint lintexp \ lintindex lintint lintlength lintold lintplus lintset lintwarn \ + mdim1 mdim2 mdim3 \ manyfiles match1 match2 match3 mbstr1 mbstr2 mixed1 mktime \ modifiers muldimposix nastyparm negtime next nondec nondec2 \ nonfatal1 nonfatal2 nonfatal3 nsawk1a nsawk1b nsawk1c nsawk2a \ @@ -4711,6 +4718,21 @@ lintwarn: @-AWKPATH="$(srcdir)" $(AWK) -f $@.awk --lint >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ +mdim1: + @echo $@ + @-AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ + +mdim2: + @echo $@ + @-AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ + +mdim3: + @echo $@ + @-AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ + match1: @echo $@ @-AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ diff --git a/test/Maketests b/test/Maketests index 899b4ec7..3015eb34 100644 --- a/test/Maketests +++ b/test/Maketests @@ -1728,6 +1728,21 @@ lintwarn: @-AWKPATH="$(srcdir)" $(AWK) -f $@.awk --lint >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ +mdim1: + @echo $@ + @-AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ + +mdim2: + @echo $@ + @-AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ + +mdim3: + @echo $@ + @-AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ + match1: @echo $@ @-AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ diff --git a/test/aadelete1.awk b/test/aadelete1.awk index 2484a057..158d2aa3 100644 --- a/test/aadelete1.awk +++ b/test/aadelete1.awk @@ -8,7 +8,7 @@ BEGIN { print length(a), length(a[1]) delete a print length(a), length(a[1]), length(a) - a[1][1] = 11 + a[1][1] = 11 # this used to fatal, now it no longer does. } function f(c, b) { diff --git a/test/aadelete1.ok b/test/aadelete1.ok index d4b678b5..c3e29d26 100644 --- a/test/aadelete1.ok +++ b/test/aadelete1.ok @@ -2,5 +2,3 @@ 1 1 1 0 0 1 -gawk: aadelete1.awk:11: fatal: attempt to use scalar `a["1"]' as an array -EXIT CODE: 2 diff --git a/test/mdim1.awk b/test/mdim1.awk new file mode 100644 index 00000000..c1f398d6 --- /dev/null +++ b/test/mdim1.awk @@ -0,0 +1,15 @@ +BEGIN { + print "typeof(x[0]) is", typeof(x[0]) + x[1] = x[0] + print "typeof(x[1]) is", typeof(x[1]) + x[0][1] = "xx" + print "typeof(x[0]) is", typeof(x[0]) + print "typeof(x[0][1]) is", typeof(x[0][1]) + print "typeof(y) is", typeof(y) + z = y + print "typeof(y) is", typeof(y) + print "typeof(z) is", typeof(z) + + x[1][0] = "xx" # this will fatal + print x[1][0] +} diff --git a/test/mdim1.ok b/test/mdim1.ok new file mode 100644 index 00000000..1247fab1 --- /dev/null +++ b/test/mdim1.ok @@ -0,0 +1,9 @@ +typeof(x[0]) is untyped +typeof(x[1]) is unassigned +typeof(x[0]) is array +typeof(x[0][1]) is string +typeof(y) is untyped +typeof(y) is unassigned +typeof(z) is unassigned +gawk: mdim1.awk:13: fatal: attempt to use scalar `x["1"]' as an array +EXIT CODE: 2 diff --git a/test/mdim2.awk b/test/mdim2.awk new file mode 100644 index 00000000..7bc0c127 --- /dev/null +++ b/test/mdim2.awk @@ -0,0 +1,9 @@ +BEGIN { + p(a[0]) + print a[0][0] +} + +function p(f) +{ + f[0] = 1 +} diff --git a/test/mdim2.ok b/test/mdim2.ok new file mode 100644 index 00000000..d00491fd --- /dev/null +++ b/test/mdim2.ok @@ -0,0 +1 @@ +1 diff --git a/test/mdim3.awk b/test/mdim3.awk new file mode 100644 index 00000000..3cd56b61 --- /dev/null +++ b/test/mdim3.awk @@ -0,0 +1,29 @@ +BEGIN { + inp[0] = "blah" + inp[1] = "blah" + inp[2] = "" + inp[3] = "Summary Statistics" + inp[4] = "temperature,0" + inp[5] = "rain,1" + + for (i = 1; i <= 40; i++) { + print "i =", i + mode = 0 + nr = 0 + delete val + for (j = 0; j < 6; j++) { + x = inp[j] + print "\tj =", j +# if (i == 27 && j == 3) +# stopme() + nf = split(x,f,",") + print "\tnf =", nf + if (++nr > 1) { + if (!nf) + mode = 1 + else if (mode == 1) + val[f[1]] = f[2] + } + } + } +} diff --git a/test/mdim3.ok b/test/mdim3.ok new file mode 100644 index 00000000..a8f05990 --- /dev/null +++ b/test/mdim3.ok @@ -0,0 +1,520 @@ +i = 1 + j = 0 + nf = 1 + j = 1 + nf = 1 + j = 2 + nf = 0 + j = 3 + nf = 1 + j = 4 + nf = 2 + j = 5 + nf = 2 +i = 2 + j = 0 + nf = 1 + j = 1 + nf = 1 + j = 2 + nf = 0 + j = 3 + nf = 1 + j = 4 + nf = 2 + j = 5 + nf = 2 +i = 3 + j = 0 + nf = 1 + j = 1 + nf = 1 + j = 2 + nf = 0 + j = 3 + nf = 1 + j = 4 + nf = 2 + j = 5 + nf = 2 +i = 4 + j = 0 + nf = 1 + j = 1 + nf = 1 + j = 2 + nf = 0 + j = 3 + nf = 1 + j = 4 + nf = 2 + j = 5 + nf = 2 +i = 5 + j = 0 + nf = 1 + j = 1 + nf = 1 + j = 2 + nf = 0 + j = 3 + nf = 1 + j = 4 + nf = 2 + j = 5 + nf = 2 +i = 6 + j = 0 + nf = 1 + j = 1 + nf = 1 + j = 2 + nf = 0 + j = 3 + nf = 1 + j = 4 + nf = 2 + j = 5 + nf = 2 +i = 7 + j = 0 + nf = 1 + j = 1 + nf = 1 + j = 2 + nf = 0 + j = 3 + nf = 1 + j = 4 + nf = 2 + j = 5 + nf = 2 +i = 8 + j = 0 + nf = 1 + j = 1 + nf = 1 + j = 2 + nf = 0 + j = 3 + nf = 1 + j = 4 + nf = 2 + j = 5 + nf = 2 +i = 9 + j = 0 + nf = 1 + j = 1 + nf = 1 + j = 2 + nf = 0 + j = 3 + nf = 1 + j = 4 + nf = 2 + j = 5 + nf = 2 +i = 10 + j = 0 + nf = 1 + j = 1 + nf = 1 + j = 2 + nf = 0 + j = 3 + nf = 1 + j = 4 + nf = 2 + j = 5 + nf = 2 +i = 11 + j = 0 + nf = 1 + j = 1 + nf = 1 + j = 2 + nf = 0 + j = 3 + nf = 1 + j = 4 + nf = 2 + j = 5 + nf = 2 +i = 12 + j = 0 + nf = 1 + j = 1 + nf = 1 + j = 2 + nf = 0 + j = 3 + nf = 1 + j = 4 + nf = 2 + j = 5 + nf = 2 +i = 13 + j = 0 + nf = 1 + j = 1 + nf = 1 + j = 2 + nf = 0 + j = 3 + nf = 1 + j = 4 + nf = 2 + j = 5 + nf = 2 +i = 14 + j = 0 + nf = 1 + j = 1 + nf = 1 + j = 2 + nf = 0 + j = 3 + nf = 1 + j = 4 + nf = 2 + j = 5 + nf = 2 +i = 15 + j = 0 + nf = 1 + j = 1 + nf = 1 + j = 2 + nf = 0 + j = 3 + nf = 1 + j = 4 + nf = 2 + j = 5 + nf = 2 +i = 16 + j = 0 + nf = 1 + j = 1 + nf = 1 + j = 2 + nf = 0 + j = 3 + nf = 1 + j = 4 + nf = 2 + j = 5 + nf = 2 +i = 17 + j = 0 + nf = 1 + j = 1 + nf = 1 + j = 2 + nf = 0 + j = 3 + nf = 1 + j = 4 + nf = 2 + j = 5 + nf = 2 +i = 18 + j = 0 + nf = 1 + j = 1 + nf = 1 + j = 2 + nf = 0 + j = 3 + nf = 1 + j = 4 + nf = 2 + j = 5 + nf = 2 +i = 19 + j = 0 + nf = 1 + j = 1 + nf = 1 + j = 2 + nf = 0 + j = 3 + nf = 1 + j = 4 + nf = 2 + j = 5 + nf = 2 +i = 20 + j = 0 + nf = 1 + j = 1 + nf = 1 + j = 2 + nf = 0 + j = 3 + nf = 1 + j = 4 + nf = 2 + j = 5 + nf = 2 +i = 21 + j = 0 + nf = 1 + j = 1 + nf = 1 + j = 2 + nf = 0 + j = 3 + nf = 1 + j = 4 + nf = 2 + j = 5 + nf = 2 +i = 22 + j = 0 + nf = 1 + j = 1 + nf = 1 + j = 2 + nf = 0 + j = 3 + nf = 1 + j = 4 + nf = 2 + j = 5 + nf = 2 +i = 23 + j = 0 + nf = 1 + j = 1 + nf = 1 + j = 2 + nf = 0 + j = 3 + nf = 1 + j = 4 + nf = 2 + j = 5 + nf = 2 +i = 24 + j = 0 + nf = 1 + j = 1 + nf = 1 + j = 2 + nf = 0 + j = 3 + nf = 1 + j = 4 + nf = 2 + j = 5 + nf = 2 +i = 25 + j = 0 + nf = 1 + j = 1 + nf = 1 + j = 2 + nf = 0 + j = 3 + nf = 1 + j = 4 + nf = 2 + j = 5 + nf = 2 +i = 26 + j = 0 + nf = 1 + j = 1 + nf = 1 + j = 2 + nf = 0 + j = 3 + nf = 1 + j = 4 + nf = 2 + j = 5 + nf = 2 +i = 27 + j = 0 + nf = 1 + j = 1 + nf = 1 + j = 2 + nf = 0 + j = 3 + nf = 1 + j = 4 + nf = 2 + j = 5 + nf = 2 +i = 28 + j = 0 + nf = 1 + j = 1 + nf = 1 + j = 2 + nf = 0 + j = 3 + nf = 1 + j = 4 + nf = 2 + j = 5 + nf = 2 +i = 29 + j = 0 + nf = 1 + j = 1 + nf = 1 + j = 2 + nf = 0 + j = 3 + nf = 1 + j = 4 + nf = 2 + j = 5 + nf = 2 +i = 30 + j = 0 + nf = 1 + j = 1 + nf = 1 + j = 2 + nf = 0 + j = 3 + nf = 1 + j = 4 + nf = 2 + j = 5 + nf = 2 +i = 31 + j = 0 + nf = 1 + j = 1 + nf = 1 + j = 2 + nf = 0 + j = 3 + nf = 1 + j = 4 + nf = 2 + j = 5 + nf = 2 +i = 32 + j = 0 + nf = 1 + j = 1 + nf = 1 + j = 2 + nf = 0 + j = 3 + nf = 1 + j = 4 + nf = 2 + j = 5 + nf = 2 +i = 33 + j = 0 + nf = 1 + j = 1 + nf = 1 + j = 2 + nf = 0 + j = 3 + nf = 1 + j = 4 + nf = 2 + j = 5 + nf = 2 +i = 34 + j = 0 + nf = 1 + j = 1 + nf = 1 + j = 2 + nf = 0 + j = 3 + nf = 1 + j = 4 + nf = 2 + j = 5 + nf = 2 +i = 35 + j = 0 + nf = 1 + j = 1 + nf = 1 + j = 2 + nf = 0 + j = 3 + nf = 1 + j = 4 + nf = 2 + j = 5 + nf = 2 +i = 36 + j = 0 + nf = 1 + j = 1 + nf = 1 + j = 2 + nf = 0 + j = 3 + nf = 1 + j = 4 + nf = 2 + j = 5 + nf = 2 +i = 37 + j = 0 + nf = 1 + j = 1 + nf = 1 + j = 2 + nf = 0 + j = 3 + nf = 1 + j = 4 + nf = 2 + j = 5 + nf = 2 +i = 38 + j = 0 + nf = 1 + j = 1 + nf = 1 + j = 2 + nf = 0 + j = 3 + nf = 1 + j = 4 + nf = 2 + j = 5 + nf = 2 +i = 39 + j = 0 + nf = 1 + j = 1 + nf = 1 + j = 2 + nf = 0 + j = 3 + nf = 1 + j = 4 + nf = 2 + j = 5 + nf = 2 +i = 40 + j = 0 + nf = 1 + j = 1 + nf = 1 + j = 2 + nf = 0 + j = 3 + nf = 1 + j = 4 + nf = 2 + j = 5 + nf = 2 diff --git a/test/typeof3.awk b/test/typeof3.awk index d148f373..2f864f45 100644 --- a/test/typeof3.awk +++ b/test/typeof3.awk @@ -15,5 +15,5 @@ BEGIN { BEGIN { print typeof(x) print typeof(a[1]) - a[1][2] # fatals on this + a[1][2] # this used to fatal, it no longer does } diff --git a/test/typeof3.ok b/test/typeof3.ok index a6cd6c4a..f9026b08 100644 --- a/test/typeof3.ok +++ b/test/typeof3.ok @@ -4,6 +4,4 @@ regexp number 4 number -unassigned -gawk: typeof3.awk:18: fatal: attempt to use scalar `a["1"]' as an array -EXIT CODE: 2 +untyped -- cgit v1.2.1 From 19a1e70b81d91acc396ba5e34e5e681759cf7d54 Mon Sep 17 00:00:00 2001 From: "Arnold D. Robbins" Date: Wed, 29 Jun 2022 06:12:14 +0300 Subject: Revert "Squashed commit of the following:" This reverts commit 6bbdfdc24df4a4ff46dee47aeb27bd9fd22acd14. --- ChangeLog | 99 ---------- NEWS | 3 - array.c | 31 +--- awk.h | 13 +- builtin.c | 3 +- cint_array.c | 2 +- debug.c | 13 +- eval.c | 31 ---- ext.c | 2 +- gawkapi.c | 12 +- int_array.c | 2 +- interpret.h | 31 +--- mpfr.c | 9 - node.c | 9 - pc/ChangeLog | 8 - pc/Makefile.tst | 16 -- str_array.c | 2 +- symbol.c | 2 - test/ChangeLog | 14 -- test/Makefile.am | 7 - test/Makefile.in | 22 --- test/Maketests | 15 -- test/aadelete1.awk | 2 +- test/aadelete1.ok | 2 + test/mdim1.awk | 15 -- test/mdim1.ok | 9 - test/mdim2.awk | 9 - test/mdim2.ok | 1 - test/mdim3.awk | 29 --- test/mdim3.ok | 520 ----------------------------------------------------- test/typeof3.awk | 2 +- test/typeof3.ok | 4 +- 32 files changed, 24 insertions(+), 915 deletions(-) delete mode 100644 test/mdim1.awk delete mode 100644 test/mdim1.ok delete mode 100644 test/mdim2.awk delete mode 100644 test/mdim2.ok delete mode 100644 test/mdim3.awk delete mode 100644 test/mdim3.ok diff --git a/ChangeLog b/ChangeLog index 28bb59ef..31d95383 100644 --- a/ChangeLog +++ b/ChangeLog @@ -64,46 +64,17 @@ an array. (api_impl): Add hook for api_destroy_array. -2022-06-03 Arnold D. Robbins - - * awk.h (elem_new_to_scalar): Add declaration. - * eval.c (elem_new_to_scalar): No longer static. Make it handle - things when valref is > 1. Returns a NODE * instead of being void. - (cmp_scalars): Change usage of elem_new_to_scalar(). - * interpret.h (r_interpret): Op_push*: Make Node_elem_new into - a separate case, using elem_new_to_scalar(). - * array.c (force_array): For Node_elem_new, clear symbol->stptr. - * eval.r (r_get_lhs): Use efree() intstead of free() in Node_elem_new - case. - 2022-06-02 Arnold D. Robbins * builtin.c (do_sub): Fix memory corruption when substituting into a value that is a typed regex. Thanks to valgrind. -2022-06-02 Arnold D. Robbins - - Fix a nasty memory corruption problem. Thanks to - Andrew Schorr for the report. - - * eval.c (r_get_lhs): Handle Node_elem_new separately - to free the string value. This was not the problem. - * interpret.h (r_interpret): For Op_assign, when turning - Node_elem_new into the null string, DEREF the old value - and dupnode the new one. THIS was the problem. - 2022-05-24 Adam Van Scyoc * awkgram.y (make_assignable): Handle Op_field_assign. Avoids a core dump upon a certain kind of syntax error; see test/getlnfa.awk. -2022-05-22 Arnold D. Robbins - - * array.c (force_array): When converting Node_elem_new to an array, - release the string storage. Thanks to valgrind, by way of Andrew - Schorr, for the report. - 2022-05-11 Arnold D. Robbins * profile.c (pp_list): Typo fix in a comment. @@ -140,86 +111,16 @@ merged. * profile.c (pprint): Improve code for Op_K_switch, Op_K_case. -2022-04-20 Arnold D. Robbins - - * mpfr.c (mpg_force_number): Small whitespace fix. - * node.c (r_force_number): Ditto. - 2022-04-18 Arnold D. Robbins * gawkbug.in: Small changes. -2022-04-06 Arnold D. Robbins - - Further cleanups. - - * array.c (new_array_element): Set s->stfmt to STFMT_UNUSED. - * awk.h (force_string_fmt): No need to set s->stfmt anymore. - * builtin.c (do_typeof): Collapse Node_var_new and Node_elem_new - cases. - * symbol.c (print_vars): Node_elem_new can't be in a top level - variable. Remove check and add a call to cant_happen if some - other node type is received. - * NEWS: Updated. - 2022-04-01 Arnold D. Robbins Small fix from the persistent-gawk guys. * profile.c (pprint): Use estrdup instead of strdup. -2022-03-31 Arnold D. Robbins - - * array.c (new_array_element): Make a full null string instead of - an empty node; it can be more easily converted to scalar that way. - * awk.h (force_string_fmt): Change the node type, remove NUMBER flag, - set STFMT_UNUSED. - * cint_array.c (lear_clear): Remove check for not equal Node_elem_new. - * int_array.c (int_clear): Ditto. - * str_array.c (str_clear): Ditto. - * eval.c (elem_new_to_scalar): Now only needs to change the node type. - * interpret.h (r_interpret): Treat Node_elem_new like Node_val, and - UPREF it when pushed. Remove test before DEREFing when popping. - * mpfr.c (mpg_force_number): Simplify converting Node_elem_new to - Node_val. Fix the string value. - * node.c (r_force_number): Ditto. - -2022-03-28 Arnold D. Robbins - - Allow unreferenced array elements to turn into subarrays. - - * awk.h (Node_elem_new): New node type. - (new_array_element): Add declaration. - (POP_ARRAY): Handle Node_elem_new. - (force_string_fmt): Ditto. Make sure valref has the right value. - * array.c (force_array): Handle Node_elem_new. - (do_sort_up_value_type): Ditto. - (new_array_element): New function, creates Node_elem_new node. - * builtin.c (do_length): Handle Node_elem_new. - (do_typeof): Ditto. - * cint_array.c (leaf_lookup): Use new_array_element() when creating - a new element. - (left_clear): Don't unref Node_elem_new. - * debug.c (print_symbol, do_set_var,watchpont_triggered, - initialize_watch_item, print_memory, do_print_f): Handle Node_elem_new. - * eval.c (nodetypes): Add Node_elem_new. - (r_get_lhs, setup_frame): Handle Node_elem_new. - (elem_new_to_scalar): New function. - (cmp_scalars): Use elem_new_to_scalar. - * ext.c (get_actual_argument): Handle Node_elem_new. - * gawkapi.c (api_get_argument, api_set_argument, node_to_awk_value, - api_sym_update): Handle Node_elem_new. - * int_array.c (int_clear): Don't unref Node_elem_new. - (int_insert): Use new_array_element() when creating a new element. - * interpret.h (r_interpret): Handle Node_elem_new as appropriate. - * mpfr.c (mpg_force_number): Handle Node_elem_new.Make sure valref has - the right value. - * node.c (r_force_number): Ditto. - * str_array.c (str_lookup): Use new_array_element() when creating a - new element. - (str_clear): Don't unref Node_elem_new. - * symbol.c (print_vars): Handle Node_elem_new. - 2022-03-27 Arnold D. Robbins Allow nested indirect function calls. Thanks to diff --git a/NEWS b/NEWS index 3e8f5673..1f7f66e6 100644 --- a/NEWS +++ b/NEWS @@ -49,9 +49,6 @@ allowing gawk to preserve the contents of its variables and arrays between runs. THIS IS AN EXPERIMENTAL FEATURE! For more information, see the manual. -10. Some subtle issues with untyped array elements being passed to -functions have been fixed. - Changes from 5.1.1 to 5.1.2 --------------------------- diff --git a/array.c b/array.c index 4361b51c..cbed1254 100644 --- a/array.c +++ b/array.c @@ -315,7 +315,7 @@ array_vname(const NODE *symbol) /* * force_array --- proceed to the actual Node_var_array, - * change Node_var_new or Node_elem_new to an array. + * change Node_var_new to an array. * If canfatal and type isn't good, die fatally, * otherwise return the final actual value. */ @@ -334,11 +334,6 @@ force_array(NODE *symbol, bool canfatal) } switch (symbol->type) { - case Node_elem_new: - efree(symbol->stptr); - symbol->stptr = NULL; - symbol->stlen = 0; - /* fall through */ case Node_var_new: symbol->xarray = NULL; /* make sure union is as it should be */ null_array(symbol); @@ -1171,7 +1166,6 @@ do_sort_up_value_type(const void *p1, const void *p2) Node_func, Node_ext_func, Node_var_new, - Node_elem_new, Node_var, Node_var_array, Node_val, @@ -1435,26 +1429,3 @@ assoc_list(NODE *symbol, const char *sort_str, sort_context_t sort_ctxt) return list; } - -/* new_array_element --- return a new empty element node */ - -NODE * -new_array_element(void) -{ - NODE *n = make_number(0.0); - char *sp; - - emalloc(sp, char *, 2, "new_array_element"); - sp[0] = sp[1] = '\0'; - - n->stptr = sp; - n->stlen = 0; - n->stfmt = STFMT_UNUSED; - - n->flags |= (MALLOC|STRING|STRCUR); - - n->type = Node_elem_new; - n->valref = 1; - - return n; -} diff --git a/awk.h b/awk.h index 6ff88677..f89b0866 100644 --- a/awk.h +++ b/awk.h @@ -258,7 +258,6 @@ typedef enum nodevals { Node_var, /* scalar variable, lnode is value */ Node_var_array, /* array is ptr to elements, table_size num of eles */ Node_var_new, /* newly created variable, may become an array */ - Node_elem_new, /* newly created array element, may become a subarray */ Node_param_list, /* lnode is a variable, rnode is more list */ Node_func, /* lnode is param. list, rnode is body */ Node_ext_func, /* extension function, code_ptr is builtin code */ @@ -1446,7 +1445,6 @@ extern NODE *do_asorti(int nargs); extern unsigned long (*hash)(const char *s, size_t len, unsigned long hsize, size_t *code); extern void init_env_array(NODE *env_node); extern void init_argv_array(NODE *argv_node, NODE *shadow_node); -extern NODE *new_array_element(void); /* awkgram.c */ extern NODE *variable(int location, char *name, NODETYPE type); extern int parse_program(INSTRUCTION **pcode, bool from_eval); @@ -1561,7 +1559,6 @@ extern STACK_ITEM *grow_stack(void); extern void dump_fcall_stack(FILE *fp); extern int register_exec_hook(Func_pre_exec preh, Func_post_exec posth); extern NODE **r_get_field(NODE *n, Func_ptr *assign, bool reference); -extern NODE *elem_new_to_scalar(NODE *n); /* ext.c */ extern NODE *do_ext(int nargs); void load_ext(const char *lib_name); /* temporary */ @@ -1852,8 +1849,7 @@ POP_ARRAY(bool check_for_untyped) NODE *t = POP(); static bool warned = false; - if (do_lint && ! warned && check_for_untyped - && (t->type == Node_var_new || t->type == Node_elem_new)) { + if (do_lint && ! warned && check_for_untyped && t->type == Node_var_new) { warned = true; lintwarn(_("behavior of `for' loop on untyped variable is not defined by POSIX")); } @@ -1946,13 +1942,6 @@ dupnode(NODE *n) static inline NODE * force_string_fmt(NODE *s, const char *fmtstr, int fmtidx) { - if (s->type == Node_elem_new) { - s->type = Node_val; - s->flags &= ~NUMBER; - - return s; - } - if ((s->flags & STRCUR) != 0 && (s->stfmt == STFMT_UNUSED || (s->stfmt == fmtidx #ifdef HAVE_MPFR diff --git a/builtin.c b/builtin.c index 75825742..3a38a478 100644 --- a/builtin.c +++ b/builtin.c @@ -591,7 +591,7 @@ do_length(int nargs) size = assoc_length(tmp); return make_number(size); - } else if (tmp->type == Node_var_new || tmp->type == Node_elem_new) { + } else if (tmp->type == Node_var_new) { // this can happen from an indirect call DEREF(tmp); tmp = dupnode(Nnull_string); @@ -4342,7 +4342,6 @@ do_typeof(int nargs) } break; case Node_var_new: - case Node_elem_new: res = "untyped"; deref = false; break; diff --git a/cint_array.c b/cint_array.c index 3e0393c9..91947766 100644 --- a/cint_array.c +++ b/cint_array.c @@ -1068,7 +1068,7 @@ leaf_lookup(NODE *symbol, NODE *array, long k, long size, long base) lhs = array->nodes + (k - base); /* leaf element */ if (*lhs == NULL) { array->table_size++; /* one more element in leaf array */ - *lhs = new_array_element(); + *lhs = dupnode(Nnull_string); } return lhs; } diff --git a/debug.c b/debug.c index f602a199..2849a4c1 100644 --- a/debug.c +++ b/debug.c @@ -967,9 +967,6 @@ print_symbol(NODE *r, bool isparam) case Node_var_new: fprintf(out_fp, "untyped variable\n"); break; - case Node_elem_new: - fprintf(out_fp, "untyped element\n"); - break; case Node_var: if (! isparam && r->var_update) r->var_update(); @@ -1244,7 +1241,6 @@ do_set_var(CMDARG *arg, int cmd ATTRIBUTE_UNUSED) switch (r->type) { case Node_var_new: - case Node_elem_new: r->type = Node_var; r->var_value = dupnode(Nnull_string); /* fall through */ @@ -1734,7 +1730,6 @@ watchpoint_triggered(struct list_item *w) t2 = symbol; break; case Node_var_new: - case Node_elem_new: break; default: cant_happen("unexpected symbol type %s", nodetype2str(symbol->type)); @@ -1811,7 +1806,7 @@ initialize_watch_item(struct list_item *w) r = *get_field(field_num, NULL); w->cur_value = dupnode(r); } else { - if (symbol->type == Node_var_new || symbol->type == Node_elem_new) + if (symbol->type == Node_var_new) w->cur_value = (NODE *) 0; else if (symbol->type == Node_var) { r = symbol->var_value; @@ -3758,10 +3753,6 @@ print_memory(NODE *m, NODE *func, Func_print print_func, FILE *fp) print_func(fp, "%s", m->vname); break; - case Node_elem_new: - print_func(fp, "element - %p", m); - break; - default: print_func(fp, "?"); /* can't happen */ } @@ -5118,7 +5109,7 @@ do_print_f(CMDARG *arg, int cmd ATTRIBUTE_UNUSED) r = find_symbol(name, NULL); if (r == NULL) goto done; - if (r->type == Node_var_new || r->type == Node_elem_new) + if (r->type == Node_var_new) tmp[i] = Nnull_string; else if (r->type != Node_var) { d_error(_("`%s' is not a scalar variable"), name); diff --git a/eval.c b/eval.c index e292cab6..c6f8bcb9 100644 --- a/eval.c +++ b/eval.c @@ -238,7 +238,6 @@ static const char *const nodetypes[] = { "Node_var", "Node_var_array", "Node_var_new", - "Node_elem_new", "Node_param_list", "Node_func", "Node_ext_func", @@ -1168,14 +1167,6 @@ r_get_lhs(NODE *n, bool reference) n->var_value = dupnode(Nnull_string); break; - case Node_elem_new: - efree(n->stptr); - n->stptr = NULL; - n->stlen = 0; - n->type = Node_var; - n->var_value = dupnode(Nnull_string); - break; - case Node_var: break; @@ -1322,7 +1313,6 @@ setup_frame(INSTRUCTION *pc) switch (m->type) { case Node_var_new: case Node_var_array: - case Node_elem_new: r->type = Node_array_ref; r->orig_array = r->prev_array = m; break; @@ -1544,10 +1534,6 @@ cmp_scalars(scalar_cmp_t comparison_type) t2 = POP_SCALAR(); t1 = TOP(); - - t1 = elem_new_to_scalar(t1); - t2 = elem_new_to_scalar(t2); - if (t1->type == Node_var_array) { DEREF(t2); fatal(_("attempt to use array `%s' in a scalar context"), array_vname(t1)); @@ -1886,20 +1872,3 @@ init_interpret() interpret = r_interpret; } -/* elem_new_to_scalar --- convert Node_elem_new to untyped scalar */ - -NODE * -elem_new_to_scalar(NODE *n) -{ - if (n->type != Node_elem_new) - return n; - - if (n->valref > 1) { - unref(n); - return dupnode(Nnull_string); - } - - n->type = Node_val; - - return n; -} diff --git a/ext.c b/ext.c index 3d643c01..30e52aae 100644 --- a/ext.c +++ b/ext.c @@ -200,7 +200,7 @@ get_actual_argument(NODE *t, int i, bool want_array) pc = TOP()->code_ptr; /* Op_ext_builtin instruction */ fname = (pc + 1)->func_name; - if (t->type == Node_var_new || t->type == Node_elem_new) { + if (t->type == Node_var_new) { if (want_array) return force_array(t, false); else { diff --git a/gawkapi.c b/gawkapi.c index 93cd9b15..01157d52 100644 --- a/gawkapi.c +++ b/gawkapi.c @@ -69,7 +69,7 @@ api_get_argument(awk_ext_id_t id, size_t count, return awk_false; /* if type is undefined */ - if (arg->type == Node_var_new || arg->type == Node_elem_new) { + if (arg->type == Node_var_new) { if (wanted == AWK_UNDEFINED) return awk_true; else if (wanted == AWK_ARRAY) { @@ -124,7 +124,7 @@ api_set_argument(awk_ext_id_t id, return awk_false; if ( (arg = get_argument(count)) == NULL - || (arg->type != Node_var_new && arg->type != Node_elem_new)) + || arg->type != Node_var_new) return awk_false; arg = get_array_argument(arg, count); @@ -564,7 +564,6 @@ node_to_awk_value(NODE *node, awk_value_t *val, awk_valtype_t wanted) switch (node->type) { case Node_var_new: /* undefined variable */ - case Node_elem_new: /* undefined element */ val->val_type = AWK_UNDEFINED; if (wanted == AWK_UNDEFINED) { ret = awk_true; @@ -897,13 +896,10 @@ api_sym_update(awk_ext_id_t id, efree((void *) full_name); - if ((node->type == Node_var && value->val_type != AWK_ARRAY) - || node->type == Node_var_new - || node->type == Node_elem_new) { + if ((node->type == Node_var && value->val_type != AWK_ARRAY) || node->type == Node_var_new) { unref(node->var_value); node->var_value = awk_value_to_node(value); - if ((node->type == Node_var_new || node->type == Node_elem_new) - && value->val_type != AWK_UNDEFINED) + if (node->type == Node_var_new && value->val_type != AWK_UNDEFINED) node->type = Node_var; return awk_true; diff --git a/int_array.c b/int_array.c index 8752413e..382aa799 100644 --- a/int_array.c +++ b/int_array.c @@ -792,7 +792,7 @@ int_insert(NODE *symbol, long k, uint32_t hash1) } b->ainum[i] = k; - b->aivalue[i] = new_array_element(); + b->aivalue[i] = dupnode(Nnull_string); b->aicount++; return & b->aivalue[i]; } diff --git a/interpret.h b/interpret.h index 29fc7fce..bed2dfe8 100644 --- a/interpret.h +++ b/interpret.h @@ -224,20 +224,6 @@ uninitialized_scalar: save_symbol->vname); if (op != Op_push_arg_untyped) m = dupnode(Nnull_string); - UPREF(m); - PUSH(m); - break; - - case Node_elem_new: - if (op != Op_push_arg_untyped) { - /* convert untyped to scalar */ - m = elem_new_to_scalar(m); - } - if (do_lint) - lintwarn(isparam ? - _("reference to uninitialized argument `%s'") : - _("reference to uninitialized variable `%s'"), - save_symbol->vname); PUSH(m); break; @@ -334,7 +320,7 @@ uninitialized_scalar: } } - if (r->type == Node_val || r->type == Node_elem_new) + if (r->type == Node_val) UPREF(r); PUSH(r); break; @@ -367,11 +353,6 @@ uninitialized_scalar: t2 = force_string(t2); r->vname = estrdup(t2->stptr, t2->stlen); /* the subscript in parent array */ assoc_set(t1, t2, r); - } else if (r->type == Node_elem_new) { - r = force_array(r, false); - r->parent_array = t1; - t2 = force_string(t2); - r->vname = estrdup(t2->stptr, t2->stlen); /* the subscript in parent array */ } else if (r->type != Node_var_array) { t2 = force_string(t2); fatal(_("attempt to use scalar `%s[\"%.*s\"]' as an array"), @@ -408,7 +389,7 @@ uninitialized_scalar: * be stored in SYMTAB: * 1. Variables that don"t yet have a value (Node_var_new) * 2. Variables that have a value (Node_var) - * 3. Values that awk code stuck into SYMTAB not related to variables (Node_val) + * 3. Values that awk code stuck into SYMTAB not related to variables (Node_value) * For 1, since we are giving it a value, we have to change the type to Node_var. * For 1 and 2, we have to step through the Node_var to get to the value. * For 3, we fatal out. This avoids confusion on things like @@ -732,7 +713,7 @@ mod: * SYMTAB is a little more messy. Three possibilities for SYMTAB: * 1. Variables that don"t yet have a value (Node_var_new) * 2. Variables that have a value (Node_var) - * 3. Values that awk code stuck into SYMTAB not related to variables (Node_val) + * 3. Values that awk code stuck into SYMTAB not related to variables (Node_value) * For 1, since we are giving it a value, we have to change the type to Node_var. * For 1 and 2, we have to step through the Node_var to get to the value. * For 3, we fatal out. This avoids confusion on things like @@ -863,10 +844,6 @@ mod: lhs = POP_ADDRESS(); r = TOP_SCALAR(); unref(*lhs); - if (r->type == Node_elem_new) { - DEREF(r); - r = dupnode(Nnull_string); - } UPREF(r); UNFIELD(*lhs, r); REPLACE(r); @@ -1097,7 +1074,7 @@ arrayfor: (void) POP_CODE(); while (arg_count-- > 0) { t1 = POP(); - if (t1->type == Node_val || t1->type == Node_elem_new) + if (t1->type == Node_val) DEREF(t1); } free_api_string_copies(); diff --git a/mpfr.c b/mpfr.c index a8834c39..7f61b692 100644 --- a/mpfr.c +++ b/mpfr.c @@ -349,15 +349,6 @@ mpg_force_number(NODE *n) { char *cp, *cpend; - if (n->type == Node_elem_new) { - n->type = Node_val; - n->flags &= ~STRING; - n->stptr[0] = '0'; // STRCUR is still set - n->stlen = 1; - - return n; - } - if ((n->flags & NUMCUR) != 0) return n; n->flags |= NUMCUR; diff --git a/node.c b/node.c index 904e3d08..cbf5c56e 100644 --- a/node.c +++ b/node.c @@ -61,15 +61,6 @@ r_force_number(NODE *n) char save; char *ptr; - if (n->type == Node_elem_new) { - n->type = Node_val; - n->flags &= ~STRING; - n->stptr[0] = '0'; // STRCUR is still set - n->stlen = 1; - - return n; - } - if ((n->flags & NUMCUR) != 0) return n; diff --git a/pc/ChangeLog b/pc/ChangeLog index 15287b22..e012e4b3 100644 --- a/pc/ChangeLog +++ b/pc/ChangeLog @@ -1,7 +1,3 @@ -2022-06-02 Arnold D. Robbins - - * Makefile.tst: Regenerated. - 2022-05-24 Adam Van Scyoc * Makefile.tst: Regenerated. @@ -22,10 +18,6 @@ * Makefile.tst: Regenerated. -2022-03-28 Arnold D. Robbins - - * Makefile.tst: Regenerated. - 2022-03-27 Arnold D. Robbins * Makefile.tst: Regenerated. diff --git a/pc/Makefile.tst b/pc/Makefile.tst index 54d86dca..e07a22ed 100644 --- a/pc/Makefile.tst +++ b/pc/Makefile.tst @@ -202,7 +202,6 @@ GAWK_EXT_TESTS = \ indirectcall3 indirectbuiltin2 \ inf-nan-torture intarray iolint isarrayunset lint lintexp \ lintindex lintint lintlength lintold lintplus lintset lintwarn \ - mdim1 mdim2 mdim3 \ manyfiles match1 match2 match3 mbstr1 mbstr2 mixed1 mktime \ modifiers muldimposix nastyparm negtime next nondec nondec2 \ nonfatal1 nonfatal2 nonfatal3 nsawk1a nsawk1b nsawk1c nsawk2a \ @@ -3008,21 +3007,6 @@ lintwarn: @-AWKPATH="$(srcdir)" $(AWK) -f $@.awk --lint >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ -mdim1: - @echo $@ - @-AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ - @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ - -mdim2: - @echo $@ - @-AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ - @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ - -mdim3: - @echo $@ - @-AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ - @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ - match1: @echo $@ @-AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ diff --git a/str_array.c b/str_array.c index 101ad0b9..08704312 100644 --- a/str_array.c +++ b/str_array.c @@ -217,7 +217,7 @@ str_lookup(NODE *symbol, NODE *subs) b->ahname = subs; b->ahname_str = subs->stptr; b->ahname_len = subs->stlen; - b->ahvalue = new_array_element(); + b->ahvalue = dupnode(Nnull_string); b->ahcode = code1; return & (b->ahvalue); } diff --git a/symbol.c b/symbol.c index d8a8b49f..5ac5656d 100644 --- a/symbol.c +++ b/symbol.c @@ -497,8 +497,6 @@ print_vars(NODE **table, int (*print_func)(FILE *, const char *, ...), FILE *fp) print_func(fp, "untyped variable\n"); else if (r->type == Node_var) valinfo(r->var_value, print_func, fp); - else - cant_happen("unexpected node type: %s", nodetype2str(r->type)); } } diff --git a/test/ChangeLog b/test/ChangeLog index 7bd6b3c8..3f263224 100644 --- a/test/ChangeLog +++ b/test/ChangeLog @@ -1,8 +1,3 @@ -2022-06-02 Arnold D. Robbins - - * Makefile.am (EXTRA_DIST): mdim3: new test. - * mdim3.awk, mdim3.ok: New files. - 2022-05-24 Adam Van Scyoc * Makefile.am (EXTRA_DIST): getlnfa, new test. @@ -33,19 +28,10 @@ * profile5.ok, profile10.ok, profile11.ok: Updated after code changes. * profile17.awk, profile17.ok: New files. -2022-03-31 Arnold D. Robbins - - * aadelete1.awk, aadelete1.ok: Changed to sync with code changes. - 2022-03-30 Arnold D. Robbins * delarprm2.awk, delarprm2.ok: Changes to make test more helpful. -2022-03-27 Arnold D. Robbins - - * Makefile.am (EXTRA_DIST): mdim1, mdim2: new tests. - * mdim1.awk, mdim1.ok, mdim2.awk, mdim2.ok: New files. - 2022-03-27 Arnold D. Robbins * Makefile.am (EXTRA_DIST): indirectcall3, new test. diff --git a/test/Makefile.am b/test/Makefile.am index fe4872f9..fd73e646 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -678,12 +678,6 @@ EXTRA_DIST = \ manglprm.ok \ manyfiles.awk \ manyfiles.ok \ - mdim1.awk \ - mdim1.ok \ - mdim2.awk \ - mdim2.ok \ - mdim3.awk \ - mdim3.ok \ modifiers.sh \ modifiers.ok \ muldimposix.awk \ @@ -1482,7 +1476,6 @@ GAWK_EXT_TESTS = \ indirectcall3 indirectbuiltin2 \ inf-nan-torture intarray iolint isarrayunset lint lintexp \ lintindex lintint lintlength lintold lintplus lintset lintwarn \ - mdim1 mdim2 mdim3 \ manyfiles match1 match2 match3 mbstr1 mbstr2 mixed1 mktime \ modifiers muldimposix nastyparm negtime next nondec nondec2 \ nonfatal1 nonfatal2 nonfatal3 nsawk1a nsawk1b nsawk1c nsawk2a \ diff --git a/test/Makefile.in b/test/Makefile.in index f838d388..2673a17b 100644 --- a/test/Makefile.in +++ b/test/Makefile.in @@ -945,12 +945,6 @@ EXTRA_DIST = \ manglprm.ok \ manyfiles.awk \ manyfiles.ok \ - mdim1.awk \ - mdim1.ok \ - mdim2.awk \ - mdim2.ok \ - mdim3.awk \ - mdim3.ok \ modifiers.sh \ modifiers.ok \ muldimposix.awk \ @@ -1749,7 +1743,6 @@ GAWK_EXT_TESTS = \ indirectcall3 indirectbuiltin2 \ inf-nan-torture intarray iolint isarrayunset lint lintexp \ lintindex lintint lintlength lintold lintplus lintset lintwarn \ - mdim1 mdim2 mdim3 \ manyfiles match1 match2 match3 mbstr1 mbstr2 mixed1 mktime \ modifiers muldimposix nastyparm negtime next nondec nondec2 \ nonfatal1 nonfatal2 nonfatal3 nsawk1a nsawk1b nsawk1c nsawk2a \ @@ -4718,21 +4711,6 @@ lintwarn: @-AWKPATH="$(srcdir)" $(AWK) -f $@.awk --lint >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ -mdim1: - @echo $@ - @-AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ - @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ - -mdim2: - @echo $@ - @-AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ - @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ - -mdim3: - @echo $@ - @-AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ - @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ - match1: @echo $@ @-AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ diff --git a/test/Maketests b/test/Maketests index 3015eb34..899b4ec7 100644 --- a/test/Maketests +++ b/test/Maketests @@ -1728,21 +1728,6 @@ lintwarn: @-AWKPATH="$(srcdir)" $(AWK) -f $@.awk --lint >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ -mdim1: - @echo $@ - @-AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ - @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ - -mdim2: - @echo $@ - @-AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ - @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ - -mdim3: - @echo $@ - @-AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ - @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ - match1: @echo $@ @-AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ diff --git a/test/aadelete1.awk b/test/aadelete1.awk index 158d2aa3..2484a057 100644 --- a/test/aadelete1.awk +++ b/test/aadelete1.awk @@ -8,7 +8,7 @@ BEGIN { print length(a), length(a[1]) delete a print length(a), length(a[1]), length(a) - a[1][1] = 11 # this used to fatal, now it no longer does. + a[1][1] = 11 } function f(c, b) { diff --git a/test/aadelete1.ok b/test/aadelete1.ok index c3e29d26..d4b678b5 100644 --- a/test/aadelete1.ok +++ b/test/aadelete1.ok @@ -2,3 +2,5 @@ 1 1 1 0 0 1 +gawk: aadelete1.awk:11: fatal: attempt to use scalar `a["1"]' as an array +EXIT CODE: 2 diff --git a/test/mdim1.awk b/test/mdim1.awk deleted file mode 100644 index c1f398d6..00000000 --- a/test/mdim1.awk +++ /dev/null @@ -1,15 +0,0 @@ -BEGIN { - print "typeof(x[0]) is", typeof(x[0]) - x[1] = x[0] - print "typeof(x[1]) is", typeof(x[1]) - x[0][1] = "xx" - print "typeof(x[0]) is", typeof(x[0]) - print "typeof(x[0][1]) is", typeof(x[0][1]) - print "typeof(y) is", typeof(y) - z = y - print "typeof(y) is", typeof(y) - print "typeof(z) is", typeof(z) - - x[1][0] = "xx" # this will fatal - print x[1][0] -} diff --git a/test/mdim1.ok b/test/mdim1.ok deleted file mode 100644 index 1247fab1..00000000 --- a/test/mdim1.ok +++ /dev/null @@ -1,9 +0,0 @@ -typeof(x[0]) is untyped -typeof(x[1]) is unassigned -typeof(x[0]) is array -typeof(x[0][1]) is string -typeof(y) is untyped -typeof(y) is unassigned -typeof(z) is unassigned -gawk: mdim1.awk:13: fatal: attempt to use scalar `x["1"]' as an array -EXIT CODE: 2 diff --git a/test/mdim2.awk b/test/mdim2.awk deleted file mode 100644 index 7bc0c127..00000000 --- a/test/mdim2.awk +++ /dev/null @@ -1,9 +0,0 @@ -BEGIN { - p(a[0]) - print a[0][0] -} - -function p(f) -{ - f[0] = 1 -} diff --git a/test/mdim2.ok b/test/mdim2.ok deleted file mode 100644 index d00491fd..00000000 --- a/test/mdim2.ok +++ /dev/null @@ -1 +0,0 @@ -1 diff --git a/test/mdim3.awk b/test/mdim3.awk deleted file mode 100644 index 3cd56b61..00000000 --- a/test/mdim3.awk +++ /dev/null @@ -1,29 +0,0 @@ -BEGIN { - inp[0] = "blah" - inp[1] = "blah" - inp[2] = "" - inp[3] = "Summary Statistics" - inp[4] = "temperature,0" - inp[5] = "rain,1" - - for (i = 1; i <= 40; i++) { - print "i =", i - mode = 0 - nr = 0 - delete val - for (j = 0; j < 6; j++) { - x = inp[j] - print "\tj =", j -# if (i == 27 && j == 3) -# stopme() - nf = split(x,f,",") - print "\tnf =", nf - if (++nr > 1) { - if (!nf) - mode = 1 - else if (mode == 1) - val[f[1]] = f[2] - } - } - } -} diff --git a/test/mdim3.ok b/test/mdim3.ok deleted file mode 100644 index a8f05990..00000000 --- a/test/mdim3.ok +++ /dev/null @@ -1,520 +0,0 @@ -i = 1 - j = 0 - nf = 1 - j = 1 - nf = 1 - j = 2 - nf = 0 - j = 3 - nf = 1 - j = 4 - nf = 2 - j = 5 - nf = 2 -i = 2 - j = 0 - nf = 1 - j = 1 - nf = 1 - j = 2 - nf = 0 - j = 3 - nf = 1 - j = 4 - nf = 2 - j = 5 - nf = 2 -i = 3 - j = 0 - nf = 1 - j = 1 - nf = 1 - j = 2 - nf = 0 - j = 3 - nf = 1 - j = 4 - nf = 2 - j = 5 - nf = 2 -i = 4 - j = 0 - nf = 1 - j = 1 - nf = 1 - j = 2 - nf = 0 - j = 3 - nf = 1 - j = 4 - nf = 2 - j = 5 - nf = 2 -i = 5 - j = 0 - nf = 1 - j = 1 - nf = 1 - j = 2 - nf = 0 - j = 3 - nf = 1 - j = 4 - nf = 2 - j = 5 - nf = 2 -i = 6 - j = 0 - nf = 1 - j = 1 - nf = 1 - j = 2 - nf = 0 - j = 3 - nf = 1 - j = 4 - nf = 2 - j = 5 - nf = 2 -i = 7 - j = 0 - nf = 1 - j = 1 - nf = 1 - j = 2 - nf = 0 - j = 3 - nf = 1 - j = 4 - nf = 2 - j = 5 - nf = 2 -i = 8 - j = 0 - nf = 1 - j = 1 - nf = 1 - j = 2 - nf = 0 - j = 3 - nf = 1 - j = 4 - nf = 2 - j = 5 - nf = 2 -i = 9 - j = 0 - nf = 1 - j = 1 - nf = 1 - j = 2 - nf = 0 - j = 3 - nf = 1 - j = 4 - nf = 2 - j = 5 - nf = 2 -i = 10 - j = 0 - nf = 1 - j = 1 - nf = 1 - j = 2 - nf = 0 - j = 3 - nf = 1 - j = 4 - nf = 2 - j = 5 - nf = 2 -i = 11 - j = 0 - nf = 1 - j = 1 - nf = 1 - j = 2 - nf = 0 - j = 3 - nf = 1 - j = 4 - nf = 2 - j = 5 - nf = 2 -i = 12 - j = 0 - nf = 1 - j = 1 - nf = 1 - j = 2 - nf = 0 - j = 3 - nf = 1 - j = 4 - nf = 2 - j = 5 - nf = 2 -i = 13 - j = 0 - nf = 1 - j = 1 - nf = 1 - j = 2 - nf = 0 - j = 3 - nf = 1 - j = 4 - nf = 2 - j = 5 - nf = 2 -i = 14 - j = 0 - nf = 1 - j = 1 - nf = 1 - j = 2 - nf = 0 - j = 3 - nf = 1 - j = 4 - nf = 2 - j = 5 - nf = 2 -i = 15 - j = 0 - nf = 1 - j = 1 - nf = 1 - j = 2 - nf = 0 - j = 3 - nf = 1 - j = 4 - nf = 2 - j = 5 - nf = 2 -i = 16 - j = 0 - nf = 1 - j = 1 - nf = 1 - j = 2 - nf = 0 - j = 3 - nf = 1 - j = 4 - nf = 2 - j = 5 - nf = 2 -i = 17 - j = 0 - nf = 1 - j = 1 - nf = 1 - j = 2 - nf = 0 - j = 3 - nf = 1 - j = 4 - nf = 2 - j = 5 - nf = 2 -i = 18 - j = 0 - nf = 1 - j = 1 - nf = 1 - j = 2 - nf = 0 - j = 3 - nf = 1 - j = 4 - nf = 2 - j = 5 - nf = 2 -i = 19 - j = 0 - nf = 1 - j = 1 - nf = 1 - j = 2 - nf = 0 - j = 3 - nf = 1 - j = 4 - nf = 2 - j = 5 - nf = 2 -i = 20 - j = 0 - nf = 1 - j = 1 - nf = 1 - j = 2 - nf = 0 - j = 3 - nf = 1 - j = 4 - nf = 2 - j = 5 - nf = 2 -i = 21 - j = 0 - nf = 1 - j = 1 - nf = 1 - j = 2 - nf = 0 - j = 3 - nf = 1 - j = 4 - nf = 2 - j = 5 - nf = 2 -i = 22 - j = 0 - nf = 1 - j = 1 - nf = 1 - j = 2 - nf = 0 - j = 3 - nf = 1 - j = 4 - nf = 2 - j = 5 - nf = 2 -i = 23 - j = 0 - nf = 1 - j = 1 - nf = 1 - j = 2 - nf = 0 - j = 3 - nf = 1 - j = 4 - nf = 2 - j = 5 - nf = 2 -i = 24 - j = 0 - nf = 1 - j = 1 - nf = 1 - j = 2 - nf = 0 - j = 3 - nf = 1 - j = 4 - nf = 2 - j = 5 - nf = 2 -i = 25 - j = 0 - nf = 1 - j = 1 - nf = 1 - j = 2 - nf = 0 - j = 3 - nf = 1 - j = 4 - nf = 2 - j = 5 - nf = 2 -i = 26 - j = 0 - nf = 1 - j = 1 - nf = 1 - j = 2 - nf = 0 - j = 3 - nf = 1 - j = 4 - nf = 2 - j = 5 - nf = 2 -i = 27 - j = 0 - nf = 1 - j = 1 - nf = 1 - j = 2 - nf = 0 - j = 3 - nf = 1 - j = 4 - nf = 2 - j = 5 - nf = 2 -i = 28 - j = 0 - nf = 1 - j = 1 - nf = 1 - j = 2 - nf = 0 - j = 3 - nf = 1 - j = 4 - nf = 2 - j = 5 - nf = 2 -i = 29 - j = 0 - nf = 1 - j = 1 - nf = 1 - j = 2 - nf = 0 - j = 3 - nf = 1 - j = 4 - nf = 2 - j = 5 - nf = 2 -i = 30 - j = 0 - nf = 1 - j = 1 - nf = 1 - j = 2 - nf = 0 - j = 3 - nf = 1 - j = 4 - nf = 2 - j = 5 - nf = 2 -i = 31 - j = 0 - nf = 1 - j = 1 - nf = 1 - j = 2 - nf = 0 - j = 3 - nf = 1 - j = 4 - nf = 2 - j = 5 - nf = 2 -i = 32 - j = 0 - nf = 1 - j = 1 - nf = 1 - j = 2 - nf = 0 - j = 3 - nf = 1 - j = 4 - nf = 2 - j = 5 - nf = 2 -i = 33 - j = 0 - nf = 1 - j = 1 - nf = 1 - j = 2 - nf = 0 - j = 3 - nf = 1 - j = 4 - nf = 2 - j = 5 - nf = 2 -i = 34 - j = 0 - nf = 1 - j = 1 - nf = 1 - j = 2 - nf = 0 - j = 3 - nf = 1 - j = 4 - nf = 2 - j = 5 - nf = 2 -i = 35 - j = 0 - nf = 1 - j = 1 - nf = 1 - j = 2 - nf = 0 - j = 3 - nf = 1 - j = 4 - nf = 2 - j = 5 - nf = 2 -i = 36 - j = 0 - nf = 1 - j = 1 - nf = 1 - j = 2 - nf = 0 - j = 3 - nf = 1 - j = 4 - nf = 2 - j = 5 - nf = 2 -i = 37 - j = 0 - nf = 1 - j = 1 - nf = 1 - j = 2 - nf = 0 - j = 3 - nf = 1 - j = 4 - nf = 2 - j = 5 - nf = 2 -i = 38 - j = 0 - nf = 1 - j = 1 - nf = 1 - j = 2 - nf = 0 - j = 3 - nf = 1 - j = 4 - nf = 2 - j = 5 - nf = 2 -i = 39 - j = 0 - nf = 1 - j = 1 - nf = 1 - j = 2 - nf = 0 - j = 3 - nf = 1 - j = 4 - nf = 2 - j = 5 - nf = 2 -i = 40 - j = 0 - nf = 1 - j = 1 - nf = 1 - j = 2 - nf = 0 - j = 3 - nf = 1 - j = 4 - nf = 2 - j = 5 - nf = 2 diff --git a/test/typeof3.awk b/test/typeof3.awk index 2f864f45..d148f373 100644 --- a/test/typeof3.awk +++ b/test/typeof3.awk @@ -15,5 +15,5 @@ BEGIN { BEGIN { print typeof(x) print typeof(a[1]) - a[1][2] # this used to fatal, it no longer does + a[1][2] # fatals on this } diff --git a/test/typeof3.ok b/test/typeof3.ok index f9026b08..a6cd6c4a 100644 --- a/test/typeof3.ok +++ b/test/typeof3.ok @@ -4,4 +4,6 @@ regexp number 4 number -untyped +unassigned +gawk: typeof3.awk:18: fatal: attempt to use scalar `a["1"]' as an array +EXIT CODE: 2 -- cgit v1.2.1 From 950a15ac48ead53f4485aea4f5566fcfe5db8a4a Mon Sep 17 00:00:00 2001 From: "Arnold D. Robbins" Date: Wed, 29 Jun 2022 08:02:10 +0300 Subject: PMA only works on 64-bit systems. Enforce this and document it. --- configh.in | 3 + configure | 35 +++- doc/ChangeLog | 5 + doc/gawk.info | 488 ++++++++++++++++++++++++++++---------------------------- doc/gawk.texi | 2 +- doc/gawktexi.in | 2 +- m4/ChangeLog | 5 + m4/pma.m4 | 3 +- 8 files changed, 295 insertions(+), 248 deletions(-) diff --git a/configh.in b/configh.in index 283dcba2..2cfb984a 100644 --- a/configh.in +++ b/configh.in @@ -389,6 +389,9 @@ /* The size of `unsigned long', as computed by sizeof. */ #undef SIZEOF_UNSIGNED_LONG +/* The size of `void *', as computed by sizeof. */ +#undef SIZEOF_VOID_P + /* Define to 1 if all of the C90 standard headers exist (not just the ones required in a freestanding environment). This macro is provided for backward compatibility; new code need not use it. */ diff --git a/configure b/configure index f9e8affe..11a42ed6 100755 --- a/configure +++ b/configure @@ -12536,8 +12536,41 @@ printf "%s\n" "#define HAVE_MBRTOWC 1" >>confdefs.h +# The cast to long int works around a bug in the HP C Compiler +# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects +# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. +# This bug is HP SR number 8606223364. +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5 +printf %s "checking size of void *... " >&6; } +if test ${ac_cv_sizeof_void_p+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (void *))" "ac_cv_sizeof_void_p" "$ac_includes_default" +then : + +else $as_nop + if test "$ac_cv_type_void_p" = yes; then + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error 77 "cannot compute sizeof (void *) +See \`config.log' for more details" "$LINENO" 5; } + else + ac_cv_sizeof_void_p=0 + fi +fi + +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5 +printf "%s\n" "$ac_cv_sizeof_void_p" >&6; } + + + +printf "%s\n" "#define SIZEOF_VOID_P $ac_cv_sizeof_void_p" >>confdefs.h + + use_persistent_malloc=no -if test "$SKIP_PERSIST_MALLOC" = no +if test "$SKIP_PERSIST_MALLOC" = no && test $ac_cv_sizeof_void_p -eq 8 then ac_fn_c_check_func "$LINENO" "mmap" "ac_cv_func_mmap" if test "x$ac_cv_func_mmap" = xyes diff --git a/doc/ChangeLog b/doc/ChangeLog index 926763b1..61eef4f3 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -1,3 +1,8 @@ +2022-06-29 Arnold D. Robbins + + * gawktexi.in (Persistent Memory): Note that only 64-bit + systems are supported. + 2022-06-24 Arnold D. Robbins * awkcard.in (Environment Variables): Shorten text and add diff --git a/doc/gawk.info b/doc/gawk.info index aa5c0189..31f85ac8 100644 --- a/doc/gawk.info +++ b/doc/gawk.info @@ -22132,12 +22132,12 @@ arrays in a persistent heap, which resides in a file in the filesystem. When persistent memory is not in use (the normal case), 'gawk''s data resides in ephemeral system memory. - Persistent memory is enabled on systems supporting the 'mmap()' and -'munmap()' system calls. 'gawk' must be compiled as a non-PIE (Position -Independent Executable) binary, since the persistent store ends up -holding pointers to functions held within the 'gawk' executable. This -also means that to use the persistent memory, you must use the same -'gawk' executable from run to run. + Persistent memory is enabled on 64-bit systems supporting the +'mmap()' and 'munmap()' system calls. 'gawk' must be compiled as a +non-PIE (Position Independent Executable) binary, since the persistent +store ends up holding pointers to functions held within the 'gawk' +executable. This also means that to use the persistent memory, you must +use the same 'gawk' executable from run to run. As of this writing, persistent memory has only been tested on GNU/Linux and Mac OS systems. On others, your mileage may vary, and/or @@ -39367,244 +39367,244 @@ Ref: Two-way I/O-Footnote-2884071 Node: TCP/IP Networking884153 Node: Profiling887229 Node: Persistent Memory896535 -Ref: Persistent Memory-Footnote-1902697 -Node: Extension Philosophy902824 -Node: Advanced Features Summary904311 -Node: Internationalization906483 -Node: I18N and L10N908157 -Node: Explaining gettext908844 -Ref: Explaining gettext-Footnote-1914736 -Ref: Explaining gettext-Footnote-2914921 -Node: Programmer i18n915086 -Ref: Programmer i18n-Footnote-1920035 -Node: Translator i18n920084 -Node: String Extraction920878 -Ref: String Extraction-Footnote-1922010 -Node: Printf Ordering922096 -Ref: Printf Ordering-Footnote-1924882 -Node: I18N Portability924946 -Ref: I18N Portability-Footnote-1927402 -Node: I18N Example927465 -Ref: I18N Example-Footnote-1930740 -Ref: I18N Example-Footnote-2930813 -Node: Gawk I18N930922 -Node: I18N Summary931544 -Node: Debugger932885 -Node: Debugging933885 -Node: Debugging Concepts934326 -Node: Debugging Terms936135 -Node: Awk Debugging938710 -Ref: Awk Debugging-Footnote-1939655 -Node: Sample Debugging Session939787 -Node: Debugger Invocation940321 -Node: Finding The Bug941707 -Node: List of Debugger Commands948181 -Node: Breakpoint Control949514 -Node: Debugger Execution Control953208 -Node: Viewing And Changing Data956570 -Node: Execution Stack960111 -Node: Debugger Info961748 -Node: Miscellaneous Debugger Commands965819 -Node: Readline Support970881 -Node: Limitations971777 -Node: Debugging Summary974331 -Node: Namespaces975610 -Node: Global Namespace976721 -Node: Qualified Names978119 -Node: Default Namespace979118 -Node: Changing The Namespace979859 -Node: Naming Rules981473 -Node: Internal Name Management983321 -Node: Namespace Example984363 -Node: Namespace And Features986925 -Node: Namespace Summary988360 -Node: Arbitrary Precision Arithmetic989837 -Node: Computer Arithmetic991324 -Ref: table-numeric-ranges995090 -Ref: table-floating-point-ranges995584 -Ref: Computer Arithmetic-Footnote-1996243 -Node: Math Definitions996300 -Ref: table-ieee-formats999276 -Node: MPFR features999844 -Node: MPFR On Parole1000289 -Ref: MPFR On Parole-Footnote-11001118 -Node: MPFR Intro1001273 -Node: FP Math Caution1002912 -Ref: FP Math Caution-Footnote-11003984 -Node: Inexactness of computations1004353 -Node: Inexact representation1005384 -Node: Comparing FP Values1006744 -Node: Errors accumulate1007985 -Node: Strange values1009441 -Ref: Strange values-Footnote-11012029 -Node: Getting Accuracy1012134 -Node: Try To Round1014844 -Node: Setting precision1015743 -Ref: table-predefined-precision-strings1016440 -Node: Setting the rounding mode1018271 -Ref: table-gawk-rounding-modes1018645 -Ref: Setting the rounding mode-Footnote-11022577 -Node: Arbitrary Precision Integers1022756 -Ref: Arbitrary Precision Integers-Footnote-11025931 -Node: Checking for MPFR1026080 -Node: POSIX Floating Point Problems1027554 -Ref: POSIX Floating Point Problems-Footnote-11032207 -Node: Floating point summary1032245 -Node: Dynamic Extensions1034435 -Node: Extension Intro1035988 -Node: Plugin License1037254 -Node: Extension Mechanism Outline1038051 -Ref: figure-load-extension1038490 -Ref: figure-register-new-function1040056 -Ref: figure-call-new-function1041149 -Node: Extension API Description1043212 -Node: Extension API Functions Introduction1044925 -Ref: table-api-std-headers1046761 -Node: General Data Types1051011 -Ref: General Data Types-Footnote-11059717 -Node: Memory Allocation Functions1060016 -Ref: Memory Allocation Functions-Footnote-11064517 -Node: Constructor Functions1064616 -Node: API Ownership of MPFR and GMP Values1068269 -Node: Registration Functions1069802 -Node: Extension Functions1070502 -Node: Exit Callback Functions1075824 -Node: Extension Version String1077074 -Node: Input Parsers1077737 -Node: Output Wrappers1090458 -Node: Two-way processors1094970 -Node: Printing Messages1097235 -Ref: Printing Messages-Footnote-11098406 -Node: Updating ERRNO1098559 -Node: Requesting Values1099298 -Ref: table-value-types-returned1100035 -Node: Accessing Parameters1101144 -Node: Symbol Table Access1102381 -Node: Symbol table by name1102893 -Ref: Symbol table by name-Footnote-11105918 -Node: Symbol table by cookie1106046 -Ref: Symbol table by cookie-Footnote-11110231 -Node: Cached values1110295 -Ref: Cached values-Footnote-11113831 -Node: Array Manipulation1113984 -Ref: Array Manipulation-Footnote-11115075 -Node: Array Data Types1115112 -Ref: Array Data Types-Footnote-11117770 -Node: Array Functions1117862 -Node: Flattening Arrays1122647 -Node: Creating Arrays1129623 -Node: Redirection API1134390 -Node: Extension API Variables1137223 -Node: Extension Versioning1137934 -Ref: gawk-api-version1138363 -Node: Extension GMP/MPFR Versioning1140095 -Node: Extension API Informational Variables1141723 -Node: Extension API Boilerplate1142796 -Node: Changes from API V11146770 -Node: Finding Extensions1148342 -Node: Extension Example1148901 -Node: Internal File Description1149699 -Node: Internal File Ops1153779 -Ref: Internal File Ops-Footnote-11165129 -Node: Using Internal File Ops1165269 -Ref: Using Internal File Ops-Footnote-11167652 -Node: Extension Samples1167926 -Node: Extension Sample File Functions1169455 -Node: Extension Sample Fnmatch1177104 -Node: Extension Sample Fork1178591 -Node: Extension Sample Inplace1179809 -Node: Extension Sample Ord1183435 -Node: Extension Sample Readdir1184271 -Ref: table-readdir-file-types1185160 -Node: Extension Sample Revout1186228 -Node: Extension Sample Rev2way1186817 -Node: Extension Sample Read write array1187557 -Node: Extension Sample Readfile1190722 -Node: Extension Sample Time1191817 -Node: Extension Sample API Tests1193569 -Node: gawkextlib1194061 -Node: Extension summary1196979 -Node: Extension Exercises1200681 -Node: Language History1201923 -Node: V7/SVR3.11203579 -Node: SVR41205731 -Node: POSIX1207165 -Node: BTL1208546 -Node: POSIX/GNU1209275 -Node: Feature History1215053 -Node: Common Extensions1232228 -Node: Ranges and Locales1233511 -Ref: Ranges and Locales-Footnote-11238127 -Ref: Ranges and Locales-Footnote-21238154 -Ref: Ranges and Locales-Footnote-31238389 -Node: Contributors1238612 -Node: History summary1244609 -Node: Installation1245989 -Node: Gawk Distribution1246933 -Node: Getting1247417 -Node: Extracting1248380 -Node: Distribution contents1250018 -Node: Unix Installation1257079 -Node: Quick Installation1257883 -Node: Compiling with MPFR1260303 -Node: Shell Startup Files1260993 -Node: Additional Configuration Options1262082 -Node: Configuration Philosophy1264397 -Node: Compiling from Git1266793 -Node: Building the Documentation1267348 -Node: Non-Unix Installation1268732 -Node: PC Installation1269192 -Node: PC Binary Installation1270030 -Node: PC Compiling1270903 -Node: PC Using1272020 -Node: Cygwin1275573 -Node: MSYS1276797 -Node: VMS Installation1277399 -Node: VMS Compilation1278118 -Ref: VMS Compilation-Footnote-11279347 -Node: VMS Dynamic Extensions1279405 -Node: VMS Installation Details1281090 -Node: VMS Running1283352 -Node: VMS GNV1287631 -Node: Bugs1288345 -Node: Bug definition1289257 -Node: Bug address1292193 -Node: Usenet1295381 -Node: Performance bugs1296570 -Node: Asking for help1299491 -Node: Maintainers1301458 -Node: Other Versions1302652 -Node: Installation summary1310922 -Node: Notes1312286 -Node: Compatibility Mode1313080 -Node: Additions1313862 -Node: Accessing The Source1314787 -Node: Adding Code1316224 -Node: New Ports1323039 -Node: Derived Files1327414 -Ref: Derived Files-Footnote-11333074 -Ref: Derived Files-Footnote-21333109 -Ref: Derived Files-Footnote-31333707 -Node: Future Extensions1333821 -Node: Implementation Limitations1334479 -Node: Extension Design1335689 -Node: Old Extension Problems1336833 -Ref: Old Extension Problems-Footnote-11338351 -Node: Extension New Mechanism Goals1338408 -Ref: Extension New Mechanism Goals-Footnote-11341772 -Node: Extension Other Design Decisions1341961 -Node: Extension Future Growth1344074 -Node: Notes summary1344680 -Node: Basic Concepts1345838 -Node: Basic High Level1346519 -Ref: figure-general-flow1346801 -Ref: figure-process-flow1347487 -Ref: Basic High Level-Footnote-11350789 -Node: Basic Data Typing1350974 -Node: Glossary1354302 -Node: Copying1386189 -Node: GNU Free Documentation License1423732 -Node: Index1448852 +Ref: Persistent Memory-Footnote-1902704 +Node: Extension Philosophy902831 +Node: Advanced Features Summary904318 +Node: Internationalization906490 +Node: I18N and L10N908164 +Node: Explaining gettext908851 +Ref: Explaining gettext-Footnote-1914743 +Ref: Explaining gettext-Footnote-2914928 +Node: Programmer i18n915093 +Ref: Programmer i18n-Footnote-1920042 +Node: Translator i18n920091 +Node: String Extraction920885 +Ref: String Extraction-Footnote-1922017 +Node: Printf Ordering922103 +Ref: Printf Ordering-Footnote-1924889 +Node: I18N Portability924953 +Ref: I18N Portability-Footnote-1927409 +Node: I18N Example927472 +Ref: I18N Example-Footnote-1930747 +Ref: I18N Example-Footnote-2930820 +Node: Gawk I18N930929 +Node: I18N Summary931551 +Node: Debugger932892 +Node: Debugging933892 +Node: Debugging Concepts934333 +Node: Debugging Terms936142 +Node: Awk Debugging938717 +Ref: Awk Debugging-Footnote-1939662 +Node: Sample Debugging Session939794 +Node: Debugger Invocation940328 +Node: Finding The Bug941714 +Node: List of Debugger Commands948188 +Node: Breakpoint Control949521 +Node: Debugger Execution Control953215 +Node: Viewing And Changing Data956577 +Node: Execution Stack960118 +Node: Debugger Info961755 +Node: Miscellaneous Debugger Commands965826 +Node: Readline Support970888 +Node: Limitations971784 +Node: Debugging Summary974338 +Node: Namespaces975617 +Node: Global Namespace976728 +Node: Qualified Names978126 +Node: Default Namespace979125 +Node: Changing The Namespace979866 +Node: Naming Rules981480 +Node: Internal Name Management983328 +Node: Namespace Example984370 +Node: Namespace And Features986932 +Node: Namespace Summary988367 +Node: Arbitrary Precision Arithmetic989844 +Node: Computer Arithmetic991331 +Ref: table-numeric-ranges995097 +Ref: table-floating-point-ranges995591 +Ref: Computer Arithmetic-Footnote-1996250 +Node: Math Definitions996307 +Ref: table-ieee-formats999283 +Node: MPFR features999851 +Node: MPFR On Parole1000296 +Ref: MPFR On Parole-Footnote-11001125 +Node: MPFR Intro1001280 +Node: FP Math Caution1002919 +Ref: FP Math Caution-Footnote-11003991 +Node: Inexactness of computations1004360 +Node: Inexact representation1005391 +Node: Comparing FP Values1006751 +Node: Errors accumulate1007992 +Node: Strange values1009448 +Ref: Strange values-Footnote-11012036 +Node: Getting Accuracy1012141 +Node: Try To Round1014851 +Node: Setting precision1015750 +Ref: table-predefined-precision-strings1016447 +Node: Setting the rounding mode1018278 +Ref: table-gawk-rounding-modes1018652 +Ref: Setting the rounding mode-Footnote-11022584 +Node: Arbitrary Precision Integers1022763 +Ref: Arbitrary Precision Integers-Footnote-11025938 +Node: Checking for MPFR1026087 +Node: POSIX Floating Point Problems1027561 +Ref: POSIX Floating Point Problems-Footnote-11032214 +Node: Floating point summary1032252 +Node: Dynamic Extensions1034442 +Node: Extension Intro1035995 +Node: Plugin License1037261 +Node: Extension Mechanism Outline1038058 +Ref: figure-load-extension1038497 +Ref: figure-register-new-function1040063 +Ref: figure-call-new-function1041156 +Node: Extension API Description1043219 +Node: Extension API Functions Introduction1044932 +Ref: table-api-std-headers1046768 +Node: General Data Types1051018 +Ref: General Data Types-Footnote-11059724 +Node: Memory Allocation Functions1060023 +Ref: Memory Allocation Functions-Footnote-11064524 +Node: Constructor Functions1064623 +Node: API Ownership of MPFR and GMP Values1068276 +Node: Registration Functions1069809 +Node: Extension Functions1070509 +Node: Exit Callback Functions1075831 +Node: Extension Version String1077081 +Node: Input Parsers1077744 +Node: Output Wrappers1090465 +Node: Two-way processors1094977 +Node: Printing Messages1097242 +Ref: Printing Messages-Footnote-11098413 +Node: Updating ERRNO1098566 +Node: Requesting Values1099305 +Ref: table-value-types-returned1100042 +Node: Accessing Parameters1101151 +Node: Symbol Table Access1102388 +Node: Symbol table by name1102900 +Ref: Symbol table by name-Footnote-11105925 +Node: Symbol table by cookie1106053 +Ref: Symbol table by cookie-Footnote-11110238 +Node: Cached values1110302 +Ref: Cached values-Footnote-11113838 +Node: Array Manipulation1113991 +Ref: Array Manipulation-Footnote-11115082 +Node: Array Data Types1115119 +Ref: Array Data Types-Footnote-11117777 +Node: Array Functions1117869 +Node: Flattening Arrays1122654 +Node: Creating Arrays1129630 +Node: Redirection API1134397 +Node: Extension API Variables1137230 +Node: Extension Versioning1137941 +Ref: gawk-api-version1138370 +Node: Extension GMP/MPFR Versioning1140102 +Node: Extension API Informational Variables1141730 +Node: Extension API Boilerplate1142803 +Node: Changes from API V11146777 +Node: Finding Extensions1148349 +Node: Extension Example1148908 +Node: Internal File Description1149706 +Node: Internal File Ops1153786 +Ref: Internal File Ops-Footnote-11165136 +Node: Using Internal File Ops1165276 +Ref: Using Internal File Ops-Footnote-11167659 +Node: Extension Samples1167933 +Node: Extension Sample File Functions1169462 +Node: Extension Sample Fnmatch1177111 +Node: Extension Sample Fork1178598 +Node: Extension Sample Inplace1179816 +Node: Extension Sample Ord1183442 +Node: Extension Sample Readdir1184278 +Ref: table-readdir-file-types1185167 +Node: Extension Sample Revout1186235 +Node: Extension Sample Rev2way1186824 +Node: Extension Sample Read write array1187564 +Node: Extension Sample Readfile1190729 +Node: Extension Sample Time1191824 +Node: Extension Sample API Tests1193576 +Node: gawkextlib1194068 +Node: Extension summary1196986 +Node: Extension Exercises1200688 +Node: Language History1201930 +Node: V7/SVR3.11203586 +Node: SVR41205738 +Node: POSIX1207172 +Node: BTL1208553 +Node: POSIX/GNU1209282 +Node: Feature History1215060 +Node: Common Extensions1232235 +Node: Ranges and Locales1233518 +Ref: Ranges and Locales-Footnote-11238134 +Ref: Ranges and Locales-Footnote-21238161 +Ref: Ranges and Locales-Footnote-31238396 +Node: Contributors1238619 +Node: History summary1244616 +Node: Installation1245996 +Node: Gawk Distribution1246940 +Node: Getting1247424 +Node: Extracting1248387 +Node: Distribution contents1250025 +Node: Unix Installation1257086 +Node: Quick Installation1257890 +Node: Compiling with MPFR1260310 +Node: Shell Startup Files1261000 +Node: Additional Configuration Options1262089 +Node: Configuration Philosophy1264404 +Node: Compiling from Git1266800 +Node: Building the Documentation1267355 +Node: Non-Unix Installation1268739 +Node: PC Installation1269199 +Node: PC Binary Installation1270037 +Node: PC Compiling1270910 +Node: PC Using1272027 +Node: Cygwin1275580 +Node: MSYS1276804 +Node: VMS Installation1277406 +Node: VMS Compilation1278125 +Ref: VMS Compilation-Footnote-11279354 +Node: VMS Dynamic Extensions1279412 +Node: VMS Installation Details1281097 +Node: VMS Running1283359 +Node: VMS GNV1287638 +Node: Bugs1288352 +Node: Bug definition1289264 +Node: Bug address1292200 +Node: Usenet1295388 +Node: Performance bugs1296577 +Node: Asking for help1299498 +Node: Maintainers1301465 +Node: Other Versions1302659 +Node: Installation summary1310929 +Node: Notes1312293 +Node: Compatibility Mode1313087 +Node: Additions1313869 +Node: Accessing The Source1314794 +Node: Adding Code1316231 +Node: New Ports1323046 +Node: Derived Files1327421 +Ref: Derived Files-Footnote-11333081 +Ref: Derived Files-Footnote-21333116 +Ref: Derived Files-Footnote-31333714 +Node: Future Extensions1333828 +Node: Implementation Limitations1334486 +Node: Extension Design1335696 +Node: Old Extension Problems1336840 +Ref: Old Extension Problems-Footnote-11338358 +Node: Extension New Mechanism Goals1338415 +Ref: Extension New Mechanism Goals-Footnote-11341779 +Node: Extension Other Design Decisions1341968 +Node: Extension Future Growth1344081 +Node: Notes summary1344687 +Node: Basic Concepts1345845 +Node: Basic High Level1346526 +Ref: figure-general-flow1346808 +Ref: figure-process-flow1347494 +Ref: Basic High Level-Footnote-11350796 +Node: Basic Data Typing1350981 +Node: Glossary1354309 +Node: Copying1386196 +Node: GNU Free Documentation License1423739 +Node: Index1448859  End Tag Table diff --git a/doc/gawk.texi b/doc/gawk.texi index cc4bab53..acbda21e 100644 --- a/doc/gawk.texi +++ b/doc/gawk.texi @@ -30978,7 +30978,7 @@ which resides in a file in the filesystem. When persistent memory is not in use (the normal case), @command{gawk}'s data resides in ephemeral system memory. -Persistent memory is enabled on systems supporting the @code{mmap()} +Persistent memory is enabled on 64-bit systems supporting the @code{mmap()} and @code{munmap()} system calls. @command{gawk} must be compiled as a non-PIE (Position Independent Executable) binary, since the persistent store ends up holding pointers to functions held within the @command{gawk} diff --git a/doc/gawktexi.in b/doc/gawktexi.in index 1728eb44..9e39f158 100644 --- a/doc/gawktexi.in +++ b/doc/gawktexi.in @@ -29860,7 +29860,7 @@ which resides in a file in the filesystem. When persistent memory is not in use (the normal case), @command{gawk}'s data resides in ephemeral system memory. -Persistent memory is enabled on systems supporting the @code{mmap()} +Persistent memory is enabled on 64-bit systems supporting the @code{mmap()} and @code{munmap()} system calls. @command{gawk} must be compiled as a non-PIE (Position Independent Executable) binary, since the persistent store ends up holding pointers to functions held within the @command{gawk} diff --git a/m4/ChangeLog b/m4/ChangeLog index aaac3b88..138cbaff 100644 --- a/m4/ChangeLog +++ b/m4/ChangeLog @@ -1,3 +1,8 @@ +2022-06-29 Arnold D. Robbins + + * pma.m4: Check sizeof(void *) is 8. PMA only works on + 64-bit systems. + 2022-06-15 Arnold D. Robbins * pma.m4: Add case for Cygwin. diff --git a/m4/pma.m4 b/m4/pma.m4 index f6f6e969..53dc3584 100644 --- a/m4/pma.m4 +++ b/m4/pma.m4 @@ -7,8 +7,9 @@ dnl Decide whether or not to use the persistent memory allocator AC_DEFUN([GAWK_USE_PERSISTENT_MALLOC], [ +AC_CHECK_SIZEOF([void *]) use_persistent_malloc=no -if test "$SKIP_PERSIST_MALLOC" = no +if test "$SKIP_PERSIST_MALLOC" = no && test $ac_cv_sizeof_void_p -eq 8 then AC_CHECK_FUNC([mmap]) AC_CHECK_FUNC([munmap]) -- cgit v1.2.1 From 2ba29b6b3ae3356d6e5417fbefa5a31c68074455 Mon Sep 17 00:00:00 2001 From: Antonio Giovanni Colombo Date: Wed, 29 Jun 2022 09:05:32 +0200 Subject: persistent memory only for 64-bit systems --- doc/it/ChangeLog | 4 ++++ doc/it/gawktexi.in | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/doc/it/ChangeLog b/doc/it/ChangeLog index dc5caff4..3b9220f7 100644 --- a/doc/it/ChangeLog +++ b/doc/it/ChangeLog @@ -1,3 +1,7 @@ +2022-06-29 Antonio Giovanni Colombo + + * gawktexi.in: Updated. + 2022-06-27 Antonio Giovanni Colombo * gawk.1: Updated. diff --git a/doc/it/gawktexi.in b/doc/it/gawktexi.in index 956d006a..1ec4909d 100755 --- a/doc/it/gawktexi.in +++ b/doc/it/gawktexi.in @@ -32645,7 +32645,7 @@ risiedono nella memoria del computer (e vanno persi alla fine dell'esecuzione di @command{gawk}). La funzionalit@`a della memoria persistente @`e disponibile solo nei -sistemi che prevedono le chiamate a sistema @code{mmap()} e +sistemi a 64-bit che prevedono le chiamate a sistema @code{mmap()} e @code{munmap()}. L'eseguibile di @command{gawk} dev'essere stato compilato in modalit@`a non-PIE (Position Independent Executable == programma che funziona a prescindere da dove si trova nel computer), -- cgit v1.2.1 From 5b4a247460e5fa6dae2a1b7ae34a925c1ad4a758 Mon Sep 17 00:00:00 2001 From: "Arnold D. Robbins" Date: Fri, 1 Jul 2022 11:50:05 +0300 Subject: Update copyright year in a bunch of files. --- Makefile.am | 2 +- Makefile.in | 2 +- array.c | 2 +- awk.h | 2 +- awkgram.y | 2 +- builtin.c | 2 +- cint_array.c | 2 +- configure | 20 ++++++++++---------- configure.ac | 4 ++-- custom.h | 2 +- debug.c | 2 +- eval.c | 2 +- ext.c | 2 +- extension/ChangeLog | 7 ++++++- extension/Makefile.am | 2 +- extension/Makefile.in | 2 +- extension/configure | 20 ++++++++++---------- extension/configure.ac | 2 +- extension/intdiv.c | 2 +- extension/readfile.c | 2 +- extension/rwarray.c | 3 ++- extension/testext.c | 2 +- field.c | 2 +- gawkapi.c | 2 +- gawkapi.h | 2 +- int_array.c | 2 +- interpret.h | 2 +- io.c | 2 +- main.c | 4 ++-- mpfr.c | 2 +- node.c | 2 +- profile.c | 2 +- re.c | 2 +- str_array.c | 2 +- support/ChangeLog | 4 ++++ support/Makefile.am | 3 ++- support/Makefile.in | 3 ++- symbol.c | 2 +- test/ChangeLog | 4 ++++ test/Makefile.am | 2 +- test/Makefile.in | 2 +- 41 files changed, 75 insertions(+), 59 deletions(-) diff --git a/Makefile.am b/Makefile.am index 4808fdb5..45c11bc6 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,7 +1,7 @@ # # Makefile.am --- automake input file for gawk # -# Copyright (C) 2000-2021 the Free Software Foundation, Inc. +# Copyright (C) 2000-2022 the Free Software Foundation, Inc. # # This file is part of GAWK, the GNU implementation of the # AWK Programming Language. diff --git a/Makefile.in b/Makefile.in index 597f3a8b..79a64c47 100644 --- a/Makefile.in +++ b/Makefile.in @@ -17,7 +17,7 @@ # # Makefile.am --- automake input file for gawk # -# Copyright (C) 2000-2021 the Free Software Foundation, Inc. +# Copyright (C) 2000-2022 the Free Software Foundation, Inc. # # This file is part of GAWK, the GNU implementation of the # AWK Programming Language. diff --git a/array.c b/array.c index cbed1254..3658ac72 100644 --- a/array.c +++ b/array.c @@ -3,7 +3,7 @@ */ /* - * Copyright (C) 1986, 1988, 1989, 1991-2014, 2016, 2018-2021, + * Copyright (C) 1986, 1988, 1989, 1991-2014, 2016, 2018-2022, * the Free Software Foundation, Inc. * * This file is part of GAWK, the GNU implementation of the diff --git a/awk.h b/awk.h index f89b0866..16b852ae 100644 --- a/awk.h +++ b/awk.h @@ -3,7 +3,7 @@ */ /* - * Copyright (C) 1986, 1988, 1989, 1991-2021 the Free Software Foundation, Inc. + * Copyright (C) 1986, 1988, 1989, 1991-2022 the Free Software Foundation, Inc. * * This file is part of GAWK, the GNU implementation of the * AWK Programming Language. diff --git a/awkgram.y b/awkgram.y index be0fdeb8..daf90a5b 100644 --- a/awkgram.y +++ b/awkgram.y @@ -3,7 +3,7 @@ */ /* - * Copyright (C) 1986, 1988, 1989, 1991-2021 the Free Software Foundation, Inc. + * Copyright (C) 1986, 1988, 1989, 1991-2022 the Free Software Foundation, Inc. * * This file is part of GAWK, the GNU implementation of the * AWK Programming Language. diff --git a/builtin.c b/builtin.c index 3a38a478..194ca385 100644 --- a/builtin.c +++ b/builtin.c @@ -3,7 +3,7 @@ */ /* - * Copyright (C) 1986, 1988, 1989, 1991-2021, + * Copyright (C) 1986, 1988, 1989, 1991-2022, * the Free Software Foundation, Inc. * * This file is part of GAWK, the GNU implementation of the diff --git a/cint_array.c b/cint_array.c index 91947766..0dc04875 100644 --- a/cint_array.c +++ b/cint_array.c @@ -3,7 +3,7 @@ */ /* - * Copyright (C) 1986, 1988, 1989, 1991-2013, 2016, 2017, 2019, 2020, 2021, + * Copyright (C) 1986, 1988, 1989, 1991-2013, 2016, 2017, 2019-2022, * the Free Software Foundation, Inc. * * This file is part of GAWK, the GNU implementation of the diff --git a/configure b/configure index 11a42ed6..97634655 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for GNU Awk 5.1.60. +# Generated by GNU Autoconf 2.71 for GNU Awk 5.1.61. # # Report bugs to . # @@ -611,8 +611,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='GNU Awk' PACKAGE_TARNAME='gawk' -PACKAGE_VERSION='5.1.60' -PACKAGE_STRING='GNU Awk 5.1.60' +PACKAGE_VERSION='5.1.61' +PACKAGE_STRING='GNU Awk 5.1.61' PACKAGE_BUGREPORT='bug-gawk@gnu.org' PACKAGE_URL='https://www.gnu.org/software/gawk/' @@ -1374,7 +1374,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures GNU Awk 5.1.60 to adapt to many kinds of systems. +\`configure' configures GNU Awk 5.1.61 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1445,7 +1445,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of GNU Awk 5.1.60:";; + short | recursive ) echo "Configuration of GNU Awk 5.1.61:";; esac cat <<\_ACEOF @@ -1570,7 +1570,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -GNU Awk configure 5.1.60 +GNU Awk configure 5.1.61 generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -2227,7 +2227,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by GNU Awk $as_me 5.1.60, which was +It was created by GNU Awk $as_me 5.1.61, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -3521,7 +3521,7 @@ fi # Define the identity of the package. PACKAGE='gawk' - VERSION='5.1.60' + VERSION='5.1.61' printf "%s\n" "#define PACKAGE \"$PACKAGE\"" >>confdefs.h @@ -14343,7 +14343,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by GNU Awk $as_me 5.1.60, which was +This file was extended by GNU Awk $as_me 5.1.61, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -14413,7 +14413,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -GNU Awk config.status 5.1.60 +GNU Awk config.status 5.1.61 configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" diff --git a/configure.ac b/configure.ac index 80cee254..863bc317 100644 --- a/configure.ac +++ b/configure.ac @@ -1,7 +1,7 @@ dnl dnl configure.ac --- autoconf input file for gawk dnl -dnl Copyright (C) 1995-2021 the Free Software Foundation, Inc. +dnl Copyright (C) 1995-2022 the Free Software Foundation, Inc. dnl dnl This file is part of GAWK, the GNU implementation of the dnl AWK Programming Language. @@ -23,7 +23,7 @@ dnl dnl Process this file with autoconf to produce a configure script. -AC_INIT([GNU Awk],[5.1.60],[bug-gawk@gnu.org],[gawk]) +AC_INIT([GNU Awk],[5.1.61],[bug-gawk@gnu.org],[gawk]) # This is a hack. Different versions of install on different systems # are just too different. Chuck it and use install-sh. diff --git a/custom.h b/custom.h index 67e51df3..ace6c81b 100644 --- a/custom.h +++ b/custom.h @@ -11,7 +11,7 @@ */ /* - * Copyright (C) 1995-2004, 2008, 2009, 2011, 2016, 2018-2021, + * Copyright (C) 1995-2004, 2008, 2009, 2011, 2016, 2018-2022, * the Free Software Foundation, Inc. * * This file is part of GAWK, the GNU implementation of the diff --git a/debug.c b/debug.c index 2849a4c1..09bd90f4 100644 --- a/debug.c +++ b/debug.c @@ -3,7 +3,7 @@ */ /* - * Copyright (C) 2004, 2010-2013, 2016-2021 the Free Software Foundation, Inc. + * Copyright (C) 2004, 2010-2013, 2016-2022 the Free Software Foundation, Inc. * * This file is part of GAWK, the GNU implementation of the * AWK Programming Language. diff --git a/eval.c b/eval.c index c6f8bcb9..ddbf87e3 100644 --- a/eval.c +++ b/eval.c @@ -3,7 +3,7 @@ */ /* - * Copyright (C) 1986, 1988, 1989, 1991-2019, 2021, + * Copyright (C) 1986, 1988, 1989, 1991-2019, 2021, 2022, * the Free Software Foundation, Inc. * * This file is part of GAWK, the GNU implementation of the diff --git a/ext.c b/ext.c index 30e52aae..c4e37297 100644 --- a/ext.c +++ b/ext.c @@ -7,7 +7,7 @@ */ /* - * Copyright (C) 1995 - 2001, 2003-2014, 2016-2020, + * Copyright (C) 1995 - 2001, 2003-2014, 2016-2020, 2022, * the Free Software Foundation, Inc. * * This file is part of GAWK, the GNU implementation of the diff --git a/extension/ChangeLog b/extension/ChangeLog index 29d7b2da..47999f7f 100644 --- a/extension/ChangeLog +++ b/extension/ChangeLog @@ -1,3 +1,8 @@ +2022-07-01 Arnold D. Robbins + + * Makefile.am, intdiv.c, readfile.c, rwarray.3am, rwarray.c, + testext.c: Update copyright year. + 2022-06-17 Corinna Vinschen Changes required on Cygwin to build extension DLLs successfully. @@ -30,7 +35,7 @@ 2022-03-11 Arnold D. Robbins - * rwarray.3m: Typo fixes, update copyright and modification dates. + * rwarray.3am: Typo fixes, update copyright and modification dates. 2022-02-25 Andrew J. Schorr diff --git a/extension/Makefile.am b/extension/Makefile.am index 2a15f9f7..736fa1ef 100644 --- a/extension/Makefile.am +++ b/extension/Makefile.am @@ -1,7 +1,7 @@ # # extension/Makefile.am --- automake input file for gawk # -# Copyright (C) 1995-2006, 2012-2015, 2017, 2020, 2021, +# Copyright (C) 1995-2006, 2012-2015, 2017, 2020, 2021, 2022, # the Free Software Foundation, Inc. # # This file is part of GAWK, the GNU implementation of the diff --git a/extension/Makefile.in b/extension/Makefile.in index afd3fd79..fbe7aaad 100644 --- a/extension/Makefile.in +++ b/extension/Makefile.in @@ -17,7 +17,7 @@ # # extension/Makefile.am --- automake input file for gawk # -# Copyright (C) 1995-2006, 2012-2015, 2017, 2020, 2021, +# Copyright (C) 1995-2006, 2012-2015, 2017, 2020, 2021, 2022, # the Free Software Foundation, Inc. # # This file is part of GAWK, the GNU implementation of the diff --git a/extension/configure b/extension/configure index d8cf11d4..b7542633 100755 --- a/extension/configure +++ b/extension/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for GNU Awk Bundled Extensions 5.1.1. +# Generated by GNU Autoconf 2.71 for GNU Awk Bundled Extensions 5.2.0. # # Report bugs to . # @@ -621,8 +621,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='GNU Awk Bundled Extensions' PACKAGE_TARNAME='gawk-extensions' -PACKAGE_VERSION='5.1.1' -PACKAGE_STRING='GNU Awk Bundled Extensions 5.1.1' +PACKAGE_VERSION='5.2.0' +PACKAGE_STRING='GNU Awk Bundled Extensions 5.2.0' PACKAGE_BUGREPORT='bug-gawk@gnu.org' PACKAGE_URL='https://www.gnu.org/software/gawk-extensions/' @@ -1379,7 +1379,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures GNU Awk Bundled Extensions 5.1.1 to adapt to many kinds of systems. +\`configure' configures GNU Awk Bundled Extensions 5.2.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1450,7 +1450,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of GNU Awk Bundled Extensions 5.1.1:";; + short | recursive ) echo "Configuration of GNU Awk Bundled Extensions 5.2.0:";; esac cat <<\_ACEOF @@ -1573,7 +1573,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -GNU Awk Bundled Extensions configure 5.1.1 +GNU Awk Bundled Extensions configure 5.2.0 generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -1984,7 +1984,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by GNU Awk Bundled Extensions $as_me 5.1.1, which was +It was created by GNU Awk Bundled Extensions $as_me 5.2.0, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -3263,7 +3263,7 @@ fi # Define the identity of the package. PACKAGE='gawk-extensions' - VERSION='5.1.1' + VERSION='5.2.0' printf "%s\n" "#define PACKAGE \"$PACKAGE\"" >>confdefs.h @@ -17827,7 +17827,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by GNU Awk Bundled Extensions $as_me 5.1.1, which was +This file was extended by GNU Awk Bundled Extensions $as_me 5.2.0, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -17897,7 +17897,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -GNU Awk Bundled Extensions config.status 5.1.1 +GNU Awk Bundled Extensions config.status 5.2.0 configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" diff --git a/extension/configure.ac b/extension/configure.ac index 3ca440ee..b7c04512 100644 --- a/extension/configure.ac +++ b/extension/configure.ac @@ -23,7 +23,7 @@ dnl dnl Process this file with autoconf to produce a configure script. -AC_INIT([GNU Awk Bundled Extensions],[5.1.1],[bug-gawk@gnu.org],[gawk-extensions]) +AC_INIT([GNU Awk Bundled Extensions],[5.2.0],[bug-gawk@gnu.org],[gawk-extensions]) AC_PREREQ([2.71]) diff --git a/extension/intdiv.c b/extension/intdiv.c index 7eaa4841..f44df6ac 100644 --- a/extension/intdiv.c +++ b/extension/intdiv.c @@ -3,7 +3,7 @@ */ /* - * Copyright (C) 2017, 2018, 2021, the Free Software Foundation, Inc. + * Copyright (C) 2017, 2018, 2021, 2022, the Free Software Foundation, Inc. * * This file is part of GAWK, the GNU implementation of the * AWK Programming Language. diff --git a/extension/readfile.c b/extension/readfile.c index def414ee..a66cb9bf 100644 --- a/extension/readfile.c +++ b/extension/readfile.c @@ -12,7 +12,7 @@ */ /* - * Copyright (C) 2002, 2003, 2004, 2011, 2012, 2013, 2014, 2018 + * Copyright (C) 2002, 2003, 2004, 2011, 2012, 2013, 2014, 2018, 2022, * the Free Software Foundation, Inc. * * This file is part of GAWK, the GNU implementation of the diff --git a/extension/rwarray.c b/extension/rwarray.c index c016cd0d..3e09102e 100644 --- a/extension/rwarray.c +++ b/extension/rwarray.c @@ -9,7 +9,8 @@ */ /* - * Copyright (C) 2009-2014, 2017, 2018, 2020, 2021 the Free Software Foundation, Inc. + * Copyright (C) 2009-2014, 2017, 2018, 2020-2022 + * the Free Software Foundation, Inc. * * This file is part of GAWK, the GNU implementation of the * AWK Programming Language. diff --git a/extension/testext.c b/extension/testext.c index fa908969..4f353f14 100644 --- a/extension/testext.c +++ b/extension/testext.c @@ -3,7 +3,7 @@ */ /* - * Copyright (C) 2012, 2013, 2014, 2015, 2017, 2018, 2021 + * Copyright (C) 2012, 2013, 2014, 2015, 2017, 2018, 2021, 2022, * the Free Software Foundation, Inc. * * This file is part of GAWK, the GNU implementation of the diff --git a/field.c b/field.c index 88309a88..0232cd5a 100644 --- a/field.c +++ b/field.c @@ -3,7 +3,7 @@ */ /* - * Copyright (C) 1986, 1988, 1989, 1991-2021 the Free Software Foundation, Inc. + * Copyright (C) 1986, 1988, 1989, 1991-2022 the Free Software Foundation, Inc. * * This file is part of GAWK, the GNU implementation of the * AWK Programming Language. diff --git a/gawkapi.c b/gawkapi.c index 01157d52..7f19916f 100644 --- a/gawkapi.c +++ b/gawkapi.c @@ -3,7 +3,7 @@ */ /* - * Copyright (C) 2012-2019, 2021, the Free Software Foundation, Inc. + * Copyright (C) 2012-2019, 2021, 2022, the Free Software Foundation, Inc. * * This file is part of GAWK, the GNU implementation of the * AWK Programming Language. diff --git a/gawkapi.h b/gawkapi.h index 825ec3dd..5aa8a4ca 100644 --- a/gawkapi.h +++ b/gawkapi.h @@ -3,7 +3,7 @@ */ /* - * Copyright (C) 2012-2019, 2021 the Free Software Foundation, Inc. + * Copyright (C) 2012-2019, 2021, 2022, the Free Software Foundation, Inc. * * This file is part of GAWK, the GNU implementation of the * AWK Programming Language. diff --git a/int_array.c b/int_array.c index 382aa799..2e9e2476 100644 --- a/int_array.c +++ b/int_array.c @@ -3,7 +3,7 @@ */ /* - * Copyright (C) 1986, 1988, 1989, 1991-2013, 2016, 2017, 2019, 2020, + * Copyright (C) 1986, 1988, 1989, 1991-2013, 2016, 2017, 2019, 2020, 2022, * the Free Software Foundation, Inc. * * This file is part of GAWK, the GNU implementation of the diff --git a/interpret.h b/interpret.h index bed2dfe8..24419183 100644 --- a/interpret.h +++ b/interpret.h @@ -3,7 +3,7 @@ */ /* - * Copyright (C) 1986, 1988, 1989, 1991-2021, + * Copyright (C) 1986, 1988, 1989, 1991-2022, * the Free Software Foundation, Inc. * * This file is part of GAWK, the GNU implementation of the diff --git a/io.c b/io.c index 71745d24..88fd1ea4 100644 --- a/io.c +++ b/io.c @@ -3,7 +3,7 @@ */ /* - * Copyright (C) 1986, 1988, 1989, 1991-2021, + * Copyright (C) 1986, 1988, 1989, 1991-2022, * the Free Software Foundation, Inc. * * This file is part of GAWK, the GNU implementation of the diff --git a/main.c b/main.c index 1a7f642c..f12ae68f 100644 --- a/main.c +++ b/main.c @@ -3,7 +3,7 @@ */ /* - * Copyright (C) 1986, 1988, 1989, 1991-2021, + * Copyright (C) 1986, 1988, 1989, 1991-2022, * the Free Software Foundation, Inc. * * This file is part of GAWK, the GNU implementation of the @@ -25,7 +25,7 @@ */ /* FIX THIS BEFORE EVERY RELEASE: */ -#define UPDATE_YEAR 2021 +#define UPDATE_YEAR 2022 #include "awk.h" #include "getopt.h" diff --git a/mpfr.c b/mpfr.c index 7f61b692..6afa8c65 100644 --- a/mpfr.c +++ b/mpfr.c @@ -3,7 +3,7 @@ */ /* - * Copyright (C) 2012, 2013, 2015, 2017, 2018, 2019, 2021 + * Copyright (C) 2012, 2013, 2015, 2017, 2018, 2019, 2021, 2022, * the Free Software Foundation, Inc. * * This file is part of GAWK, the GNU implementation of the diff --git a/node.c b/node.c index cbf5c56e..1c913799 100644 --- a/node.c +++ b/node.c @@ -3,7 +3,7 @@ */ /* - * Copyright (C) 1986, 1988, 1989, 1991-2001, 2003-2015, 2017-2019, 2021, + * Copyright (C) 1986, 1988, 1989, 1991-2001, 2003-2015, 2017-2019, 2021, 2022, * the Free Software Foundation, Inc. * * This file is part of GAWK, the GNU implementation of the diff --git a/profile.c b/profile.c index 13e13e6f..a5b91569 100644 --- a/profile.c +++ b/profile.c @@ -3,7 +3,7 @@ */ /* - * Copyright (C) 1999-2021 the Free Software Foundation, Inc. + * Copyright (C) 1999-2022 the Free Software Foundation, Inc. * * This file is part of GAWK, the GNU implementation of the * AWK Programming Language. diff --git a/re.c b/re.c index 544e9944..d709a5ef 100644 --- a/re.c +++ b/re.c @@ -3,7 +3,7 @@ */ /* - * Copyright (C) 1991-2019, 2021 the Free Software Foundation, Inc. + * Copyright (C) 1991-2019, 2021, 2022, the Free Software Foundation, Inc. * * This file is part of GAWK, the GNU implementation of the * AWK Programming Language. diff --git a/str_array.c b/str_array.c index 08704312..a6bc7170 100644 --- a/str_array.c +++ b/str_array.c @@ -4,7 +4,7 @@ /* * Copyright (C) 1986, 1988, 1989, 1991-2013, 2016, 2017, 2018, 2019, - * 2021, + * 2021, 2022, * the Free Software Foundation, Inc. * * This file is part of GAWK, the GNU implementation of the diff --git a/support/ChangeLog b/support/ChangeLog index 2815c594..3e99d847 100644 --- a/support/ChangeLog +++ b/support/ChangeLog @@ -1,3 +1,7 @@ +2022-07-01 Arnold D. Robbins + + * Makefile.am: Update copyright year. + 2022-06-17 Arnold D. Robbins * dfa.c, dfa.h: Sync with GNULIB. diff --git a/support/Makefile.am b/support/Makefile.am index 9afadbd2..a2ed128c 100644 --- a/support/Makefile.am +++ b/support/Makefile.am @@ -1,7 +1,8 @@ # # Makefile.am --- automake input file for gawk # -# Copyright (C) 2000-2016, 2018, 2019, 2021 the Free Software Foundation, Inc. +# Copyright (C) 2000-2016, 2018, 2019, 2021, 2022 +# the Free Software Foundation, Inc. # # This file is part of GAWK, the GNU implementation of the # AWK Programming Language. diff --git a/support/Makefile.in b/support/Makefile.in index 5cbf33e7..bfa2e9fa 100644 --- a/support/Makefile.in +++ b/support/Makefile.in @@ -17,7 +17,8 @@ # # Makefile.am --- automake input file for gawk # -# Copyright (C) 2000-2016, 2018, 2019, 2021 the Free Software Foundation, Inc. +# Copyright (C) 2000-2016, 2018, 2019, 2021, 2022 +# the Free Software Foundation, Inc. # # This file is part of GAWK, the GNU implementation of the # AWK Programming Language. diff --git a/symbol.c b/symbol.c index 5ac5656d..8f29f5c4 100644 --- a/symbol.c +++ b/symbol.c @@ -3,7 +3,7 @@ */ /* - * Copyright (C) 1986, 1988, 1989, 1991-2015, 2017-2020, + * Copyright (C) 1986, 1988, 1989, 1991-2015, 2017-2020, 2022, * the Free Software Foundation, Inc. * * This file is part of GAWK, the GNU implementation of the diff --git a/test/ChangeLog b/test/ChangeLog index 3f263224..d8fa21e5 100644 --- a/test/ChangeLog +++ b/test/ChangeLog @@ -1,3 +1,7 @@ +2022-07-01 Arnold D. Robbins + + * Makefie.am: Update copyright year. + 2022-05-24 Adam Van Scyoc * Makefile.am (EXTRA_DIST): getlnfa, new test. diff --git a/test/Makefile.am b/test/Makefile.am index fd73e646..46e22334 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -1,7 +1,7 @@ # # test/Makefile.am --- automake input file for gawk # -# Copyright (C) 1988-2021 the Free Software Foundation, Inc. +# Copyright (C) 1988-2022 the Free Software Foundation, Inc. # # This file is part of GAWK, the GNU implementation of the # AWK Programming Language. diff --git a/test/Makefile.in b/test/Makefile.in index 2673a17b..0520e71f 100644 --- a/test/Makefile.in +++ b/test/Makefile.in @@ -17,7 +17,7 @@ # # test/Makefile.am --- automake input file for gawk # -# Copyright (C) 1988-2021 the Free Software Foundation, Inc. +# Copyright (C) 1988-2022 the Free Software Foundation, Inc. # # This file is part of GAWK, the GNU implementation of the # AWK Programming Language. -- cgit v1.2.1 From 30af96ec90df362d55a8e08d240dda10c149cade Mon Sep 17 00:00:00 2001 From: "Arnold D. Robbins" Date: Fri, 1 Jul 2022 11:53:20 +0300 Subject: Typo fix. --- test/ChangeLog | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/ChangeLog b/test/ChangeLog index d8fa21e5..32ba55e1 100644 --- a/test/ChangeLog +++ b/test/ChangeLog @@ -1,6 +1,6 @@ 2022-07-01 Arnold D. Robbins - * Makefie.am: Update copyright year. + * Makefile.am: Update copyright year. 2022-05-24 Adam Van Scyoc -- cgit v1.2.1 From baf8b9659765f8e8da75a084059a0724555a767a Mon Sep 17 00:00:00 2001 From: "Arnold D. Robbins" Date: Sun, 3 Jul 2022 21:14:37 +0300 Subject: Start updating README files. --- ChangeLog | 4 ++++ README | 9 +++++---- README_d/ChangeLog | 5 +++++ README_d/README.gcc-3 | 11 ----------- README_d/README.mpfr | 14 ++++++++++++++ 5 files changed, 28 insertions(+), 15 deletions(-) delete mode 100644 README_d/README.gcc-3 diff --git a/ChangeLog b/ChangeLog index 31d95383..3fdbea98 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2022-07-03 Arnold D. Robbins + + * README: Updated. + 2022-06-20 Arnold D. Robbins * NEWS: MPFR is now "on parole" instead of deprecated. diff --git a/README b/README index fad19437..316d686b 100644 --- a/README +++ b/README @@ -1,5 +1,5 @@ Copyright (C) 2005, 2006, 2007, 2009, 2010, 2011, 2012, 2013, 2014, 2015, - 2016, 2017, 2018, 2019, 2020, 2021 Free Software Foundation, Inc. + 2016, 2017, 2018, 2019, 2020, 2021, 2022 Free Software Foundation, Inc. Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright @@ -7,11 +7,11 @@ README: -This is GNU Awk 5.1.1. It is upwardly compatible with Brian Kernighan's +This is GNU Awk 5.2.0. It is upwardly compatible with Brian Kernighan's version of Unix awk. It is almost completely compliant with the 2018 POSIX 1003.1 standard for awk. (See the note below about POSIX.) -This is a bug-fix release. See NEWS and ChangeLog for details. +This is a major release. See NEWS and ChangeLog for details. Work to be done is described briefly in the TODO file, which is available only in the 'master' branch in the Git repo. @@ -76,7 +76,8 @@ is about the worst place to post a gawk bug report. So too is use of a web forum such as Stack Overflow. Please, use the mechanisms outlined in the manual. -Bug reports should be sent to bug-gawk@gnu.org. This is a separate mailing +Bug reports should be submitted using the `gawkbug' script. This formats +a report and sends it to bug-gawk@gnu.org. This is a separate mailing list at GNU Central. The advantage to using this address is that bug reports are archived at GNU Central. diff --git a/README_d/ChangeLog b/README_d/ChangeLog index 3a877514..96c64813 100644 --- a/README_d/ChangeLog +++ b/README_d/ChangeLog @@ -1,3 +1,8 @@ +2022-07-03 Arnold D. Robbins + + * README.gcc-3: Deleted. + * README.mpfr: Updated. + 2021-10-27 Arnold D. Robbins * 5.1.1: Release tar ball made. diff --git a/README_d/README.gcc-3 b/README_d/README.gcc-3 deleted file mode 100644 index c76a9af7..00000000 --- a/README_d/README.gcc-3 +++ /dev/null @@ -1,11 +0,0 @@ -Wed Apr 2 21:29:17 IDT 2014 -============================ - -I have had a report that on a GNU/Linux system using gcc 3.3.6 (32 bit) -that the aasort test fails. Compiling without -O builds a gawk that -does pass all tests. - -Caveat Emptor. - -Arnold Robbins -arnold@skeeve.com diff --git a/README_d/README.mpfr b/README_d/README.mpfr index 996cb8e8..8dfd4288 100644 --- a/README_d/README.mpfr +++ b/README_d/README.mpfr @@ -1,3 +1,16 @@ +Sun 03 Jul 2022 02:51:58 PM IDT +=============================== + +As mentioned in the NEWS file and documented in a little more detail +in the manual, the MPFR feature is "on parole". This means that the +gawk maintainer (Arnold ROobins) is no longer fixing bugs in the code +or dealing with it. However, a member of the gawk development team has +volunteered to maintain this code. + +As long as this situation works, the MPFR feature will remain part of +the gawk code base. If it changes, then MPFR support will be TOTALLY +REMOVED from the next subsequent gawk release. + -------------------------- DJGPP ----------------------------------- 2017-11-13 @@ -54,3 +67,4 @@ GNU MPFR 2.4.2, GNU MP 4.3.2 GNU MPFR 3.1.0, GNU MP 5.0.2, 5.0.3 GNU MPFR 3.1.4, GNU MP 6.1.0 GNU MPFR 4.0.1, GNU MP 6.1.2 +GNU MPFR 4.0.2, GNU MP 6.2.0 -- cgit v1.2.1 From 12b052d0b466b3cbac905bead7c635c5d9a96c9c Mon Sep 17 00:00:00 2001 From: "Arnold D. Robbins" Date: Tue, 5 Jul 2022 11:16:08 +0300 Subject: Squashed commit of the following: commit 05b8f271482d472db8d6c2a3764b68dd3543cacc Author: Arnold D. Robbins Date: Sun Jul 3 21:35:43 2022 +0300 Nuke OS/2 stuff. --- ChangeLog | 4 +- NEWS | 3 + README | 6 +- README_d/ChangeLog | 2 + README_d/README.os2 | 57 ---- README_d/README.pc | 10 +- awk.h | 4 +- awkgram.y | 11 - doc/ChangeLog | 4 + doc/gawk.info | 845 +++++++++++++++++++++++++-------------------------- doc/gawk.texi | 8 - doc/gawktexi.in | 8 - gawkmisc.c | 2 +- io.c | 56 +--- main.c | 2 - missing_d/ChangeLog | 4 + missing_d/snprintf.c | 4 +- nonposix.h | 18 +- pc/ChangeLog | 5 + pc/Makefile | 46 +-- pc/config.h | 8 - pc/config.sed | 8 - pc/gawkmisc.pc | 263 +--------------- 23 files changed, 468 insertions(+), 910 deletions(-) delete mode 100644 README_d/README.os2 diff --git a/ChangeLog b/ChangeLog index 3fdbea98..94f43869 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,8 @@ 2022-07-03 Arnold D. Robbins - * README: Updated. + * README: Updated. Remove mention of OS/2. + * awk.h, awgram.y. gawkmisc.c, io.c, main.c, nonposix.h: + Remove all code for __EMX__. 2022-06-20 Arnold D. Robbins diff --git a/NEWS b/NEWS index 1f7f66e6..93f683a3 100644 --- a/NEWS +++ b/NEWS @@ -49,6 +49,9 @@ allowing gawk to preserve the contents of its variables and arrays between runs. THIS IS AN EXPERIMENTAL FEATURE! For more information, see the manual. +10. Support for OS/2 has been removed. It was not being actively +maintained. + Changes from 5.1.1 to 5.1.2 --------------------------- diff --git a/README b/README index 316d686b..1c9d52af 100644 --- a/README +++ b/README @@ -42,7 +42,7 @@ want to get a copy of Bison from the FSF too.) The build mechanics depend upon Bison. Also, gawk doesn't work correctly with some versions of yacc, so just use Bison. -If you have an MS-DOS, MS-Windows, or OS/2 system, use the stuff in the `pc' +If you have an MS-DOS, or MS-Windows system, use the stuff in the `pc' directory. Similarly, there is a separate directory for VMS. Appendix B of ``GAWK: Effective Awk Programming'' discusses configuration @@ -95,10 +95,6 @@ MS-Windows with MinGW: Eli Zaretskii eliz@gnu.org -OS/2: - Andreas Buening - andreas.buening@nexgo.de - VMS: John Malmberg wb8tyw@qsl.net diff --git a/README_d/ChangeLog b/README_d/ChangeLog index 96c64813..75bf9693 100644 --- a/README_d/ChangeLog +++ b/README_d/ChangeLog @@ -2,6 +2,8 @@ * README.gcc-3: Deleted. * README.mpfr: Updated. + * README.os: Removed. + * README.pc: Updated. 2021-10-27 Arnold D. Robbins diff --git a/README_d/README.os2 b/README_d/README.os2 deleted file mode 100644 index c12f82db..00000000 --- a/README_d/README.os2 +++ /dev/null @@ -1,57 +0,0 @@ -From andreas.buening@nexgo.de Thu Oct 19 15:34:16 2017 -Date: Thu, 19 Oct 2017 23:34:09 +0200 (CEST) -From: =?UTF-8?Q?Andreas_B=C3=BCning?= -To: arnold@skeeve.com -Message-ID: <1433289104.12656.1508448849820@mail.vodafone.de> -Subject: Re: gawk for OS/2 - any updates? - -Hello Arnold, - -I'd like to inform you about the current state of compiling gawk on -OS/2: - -1. Compilation - -Running ./configure does work but - -- I tried only running with --disable-nls, so with NLS I didn't test. -- Depending on the gcc version you use you may get linker errors. In - that case add 'CFLAGS=-O2 -g -fgnu89-inline' to the configure options - (-O2 -g already is the default). - - -2. Tests - -It is possible to run the built-in checks but many test results depend -on the shell being used. I recommend to use 'make -i check' to run -the tests because some failures might cause a immediate termination -of the make run. - -- If your shell uses \r\n linebreaks (in that case all tests fail) - then you have to run 'make -i check CMP=diff' to ignore the linebreak - differences at the test result comparison. -- Depending on the shell some tests might just hang forever. Press - Ctrl+C and/or Ctrl+Break until the tests continue. -- OS/2 can only load DLLs with filenames up to 8+3 bytes but gawk - creates three internal DLLs with longer names (e.g. filefuncs.dll, - revoutput.dll, revtwoway.dll). Thus, all tests trying to load - filefuncs.dll or the other two DLLs will fail. This is not a bug - of gawk. If you change e.g. the '@load filefuncs' directive to - '@load filefunc' in the according *.awk file then the tests will - succeed. -- The number of failling tests is currently around 50, less if your - shell uses \r\n linebreaks, more otherwise. - -Best wishes, - -Andreas Buening -====================================================== - -Sat Oct 21 21:01:49 IDT 2017 -============================ - -Fixes for loading extension libraries have since been included -in the git repo and will be part of 4.2.1. - -Arnold Robbins -arnold@skeeve.com diff --git a/README_d/README.pc b/README_d/README.pc index eb9e8fe1..a366c661 100644 --- a/README_d/README.pc +++ b/README_d/README.pc @@ -2,8 +2,7 @@ This is the README for GNU awk 4 under Windows32, OS/2, and DOS. Gawk has been compiled and tested under OS/2, DOS, and Windows32 using the GNU development tools from DJ Delorie (DJGPP; DOS with special -support for long filenames on Windows), Eberhard Mattes (EMX; OS/2, -DOS, and Windows32 with rsxnt), and Jan-Jaap van der Heijden and Mumit Khan +support for long filenames on Windows), and Jan-Jaap van der Heijden and Mumit Khan (Mingw32; Windows32). The Cygwin environment (http://cygwin.com) may also be used @@ -38,7 +37,7 @@ gawk will be installed under $(prefix)/lib/awk (e.g., /gnu/lib/awk), it is convenient to have this directory in DEFPATH of config.h. The makefile contains a number of targets for building various DOS and -OS/2 versions. A list of targets will be printed if the make command is +Windows versions. A list of targets will be printed if the make command is given without a target. As an example, to build gawk using the djgpp tools, enter "make djgpp". @@ -102,14 +101,11 @@ additional help on changes for Windows32. ---- -If you have any problems with the DOS or OS/2 versions of Gawk, +If you have any problems with the DOS versions of Gawk, please send bug reports (along with the version and compiler used) to Juan Manuel Guerrero, juan.guerrero@gmx.de (DJGPP) -or - - andreas.buening@nexgo.de (OS/2 version) Support for Windows32 started in gawk-3.0.3. diff --git a/awk.h b/awk.h index 16b852ae..0da24149 100644 --- a/awk.h +++ b/awk.h @@ -169,9 +169,9 @@ extern void *memset_ulong(void *dest, int val, unsigned long l); #define fwrite fwrite_unlocked #endif /* HAVE_FWRITE_UNLOCKED */ -#if defined(__DJGPP__) || defined(__EMX__) || defined(__MINGW32__) +#if defined(__DJGPP__) || defined(__MINGW32__) #include "nonposix.h" -#endif /* defined(__DJGPP__) || defined(__EMX__) || defined(__MINGW32__) */ +#endif /* defined(__DJGPP__) || defined(__MINGW32__) */ /* use this as lintwarn("...") this is a hack but it gives us the right semantics */ diff --git a/awkgram.y b/awkgram.y index daf90a5b..36cac704 100644 --- a/awkgram.y +++ b/awkgram.y @@ -3612,17 +3612,6 @@ yylex(void) return lasttok = NEWLINE_EOF; pushback(); -#if defined __EMX__ - /* - * added for OS/2's extproc feature of cmd.exe - * (like #! in BSD sh) - */ - if (strncasecmp(lexptr, "extproc ", 8) == 0) { - while (*lexptr && *lexptr != '\n') - lexptr++; - } -#endif - lexeme = lexptr; thisline = NULL; diff --git a/doc/ChangeLog b/doc/ChangeLog index 61eef4f3..7963cc16 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -1,3 +1,7 @@ +2022-07-03 Arnold D. Robbins + + * gawktexi.in: Remove stuff related to OS/2. + 2022-06-29 Arnold D. Robbins * gawktexi.in (Persistent Memory): Note that only 64-bit diff --git a/doc/gawk.info b/doc/gawk.info index 31f85ac8..638f2195 100644 --- a/doc/gawk.info +++ b/doc/gawk.info @@ -11439,9 +11439,6 @@ they are not special: Microsoft Windows, using either DJGPP or MinGW, respectively. - '"os2"' - OS/2. - '"os390"' OS/390. @@ -32299,8 +32296,6 @@ MS-DOS with DJGPP Juan Manuel Guerrero, MS-Windows with MinGW Eli Zaretskii, -OS/2 Andreas Buening, - VMS John Malmberg, z/OS (OS/390) Daniel Richard G. @@ -36512,7 +36507,7 @@ Index * dark corner, exit statement: Exit Statement. (line 30) * dark corner, value of ARGV[0]: Auto-set. (line 39) * dark corner, FILENAME variable <1>: Auto-set. (line 108) -* dark corner, FNR/NR variables: Auto-set. (line 409) +* dark corner, FNR/NR variables: Auto-set. (line 406) * dark corner, array subscripts: Uninitialized Subscripts. (line 43) * dark corner, regexp as second argument to index(): String Functions. @@ -36761,8 +36756,8 @@ Index * differences in awk and gawk, ERRNO variable: Auto-set. (line 87) * differences in awk and gawk, FUNCTAB variable: Auto-set. (line 134) * differences in awk and gawk, PROCINFO array: Auto-set. (line 148) -* differences in awk and gawk, RS/RT variables <3>: Auto-set. (line 348) -* differences in awk and gawk, SYMTAB variable: Auto-set. (line 352) +* differences in awk and gawk, RS/RT variables <3>: Auto-set. (line 345) +* differences in awk and gawk, SYMTAB variable: Auto-set. (line 349) * differences in awk and gawk, ARGC/ARGV variables: ARGC and ARGV. (line 89) * differences in awk and gawk, array elements, deleting: Delete. @@ -36959,7 +36954,7 @@ Index * expressions, selecting: Conditional Exp. (line 6) * expressions, as patterns: Expression Patterns. (line 6) * Extended Regular Expressions (EREs): Bracket Expressions. (line 34) -* extension API, version number: Auto-set. (line 287) +* extension API, version number: Auto-set. (line 284) * extension API, interaction with namespaces: Namespace And Features. (line 22) * extension API: Extension API Description. @@ -37135,7 +37130,7 @@ Index (line 12) * FNR variable: Records. (line 6) * FNR variable <1>: Auto-set. (line 118) -* FNR variable, changing: Auto-set. (line 409) +* FNR variable, changing: Auto-set. (line 406) * for statement: For Statement. (line 6) * for statement, looping over arrays: Scanning an Array. (line 20) * fork() extension function: Extension Sample Fork. @@ -37299,9 +37294,9 @@ Index * gawk, ERRNO variable in <3>: Auto-set. (line 87) * gawk, FUNCTAB array in: Auto-set. (line 134) * gawk, PROCINFO array in <1>: Auto-set. (line 148) -* gawk, version of: Auto-set. (line 262) -* gawk, RT variable in <3>: Auto-set. (line 348) -* gawk, SYMTAB array in: Auto-set. (line 352) +* gawk, version of: Auto-set. (line 259) +* gawk, RT variable in <3>: Auto-set. (line 345) +* gawk, SYMTAB array in: Auto-set. (line 349) * gawk, IGNORECASE variable in <2>: Array Intro. (line 100) * gawk, function arguments and: Calling Built-in. (line 16) * gawk, IGNORECASE variable in <3>: String Functions. (line 57) @@ -37745,7 +37740,7 @@ Index * mawk utility <2>: Concatenation. (line 36) * mawk utility <3>: Nextfile Statement. (line 47) * mawk utility <4>: Other Versions. (line 39) -* maximum precision supported by MPFR library: Auto-set. (line 276) +* maximum precision supported by MPFR library: Auto-set. (line 273) * McIlroy, Doug: Glossary. (line 255) * McPhee, Patrick T.J.: Contributors. (line 103) * memory, allocating for extensions: Memory Allocation Functions. @@ -37760,7 +37755,7 @@ Index * messages from extensions: Printing Messages. (line 6) * metacharacters, escape sequences for: Escape Sequences. (line 139) * metacharacters, in regular expressions: Regexp Operators. (line 6) -* minimum precision required by MPFR library: Auto-set. (line 279) +* minimum precision required by MPFR library: Auto-set. (line 276) * Minshall, Greg: Getopt Function. (line 105) * mkbool: Boolean Functions. (line 10) * mktime: Time Functions. (line 25) @@ -37857,7 +37852,7 @@ Index * not Boolean-logic operator: Boolean Ops. (line 6) * NR variable: Records. (line 6) * NR variable <1>: Auto-set. (line 143) -* NR variable, changing: Auto-set. (line 409) +* NR variable, changing: Auto-set. (line 406) * null strings, in gawk arguments, quoting and: Quoting. (line 82) * null strings, in gawk arguments, quoting and <1>: Other Arguments. (line 73) @@ -37974,7 +37969,7 @@ Index (line 39) * package, definition of: Global Namespace. (line 18) * Papadopoulos, Panos: Contributors. (line 131) -* parent process ID of gawk process: Auto-set. (line 251) +* parent process ID of gawk process: Auto-set. (line 248) * parentheses (), regexp operator: Regexp Operator Details. (line 77) * parentheses (), in a profile: Profiling. (line 146) @@ -38173,8 +38168,8 @@ Index * printing, mailing labels: Labels Program. (line 6) * printing, messages from extensions: Printing Messages. (line 6) * private variables: Library Names. (line 11) -* process group ID of gawk process: Auto-set. (line 245) -* process ID of gawk process: Auto-set. (line 248) +* process group ID of gawk process: Auto-set. (line 242) +* process ID of gawk process: Auto-set. (line 245) * processes, two-way communications with: Two-way I/O. (line 6) * processing data: Basic High Level. (line 6) * PROCINFO array: Auto-set. (line 148) @@ -38364,7 +38359,7 @@ Index * right angle bracket (>), >> operator (I/O) <1>: Precedence. (line 64) * right shift, bitwise: Bitwise Functions. (line 33) * Ritchie, Dennis: Basic Data Typing. (line 54) -* RLENGTH variable: Auto-set. (line 335) +* RLENGTH variable: Auto-set. (line 332) * RLENGTH variable, match() function and: String Functions. (line 241) * Robbins, Miriam: Acknowledgments. (line 94) * Robbins, Jean: Acknowledgments. (line 94) @@ -38394,12 +38389,12 @@ Index * RS variable, multiline records and: Multiple Line. (line 17) * RS variable <1>: User-modified. (line 135) * rshift: Bitwise Functions. (line 55) -* RSTART variable: Auto-set. (line 341) +* RSTART variable: Auto-set. (line 338) * RSTART variable, match() function and: String Functions. (line 241) * RT variable: awk split records. (line 118) * RT variable <1>: gawk split records. (line 66) * RT variable <2>: Multiple Line. (line 138) -* RT variable <3>: Auto-set. (line 348) +* RT variable <3>: Auto-set. (line 345) * Rubin, Paul: History. (line 30) * Rubin, Paul <1>: Contributors. (line 16) * rule, definition of: Getting Started. (line 21) @@ -38417,7 +38412,7 @@ Index * scanning arrays: Scanning an Array. (line 6) * scanning multidimensional arrays: Multiscanning. (line 11) * Schorr, Andrew: Acknowledgments. (line 60) -* Schorr, Andrew <1>: Auto-set. (line 379) +* Schorr, Andrew <1>: Auto-set. (line 376) * Schorr, Andrew <2>: Contributors. (line 136) * Schreiber, Bert: Acknowledgments. (line 38) * Schreiber, Rita: Acknowledgments. (line 38) @@ -38541,7 +38536,7 @@ Index * sidebar, Syntactic Ambiguities Between /= and Regular Expressions: Assignment Ops. (line 148) * sidebar, Operator Evaluation Order: Increment Ops. (line 58) -* sidebar, Changing NR and FNR: Auto-set. (line 407) +* sidebar, Changing NR and FNR: Auto-set. (line 404) * sidebar, Matching the Null String: String Functions. (line 561) * sidebar, Interactive Versus Noninteractive Buffering: I/O Functions. (line 73) @@ -38699,9 +38694,9 @@ Index * substr: String Functions. (line 499) * substring: String Functions. (line 499) * Sumner, Andrew: Other Versions. (line 64) -* supplementary groups of gawk process: Auto-set. (line 292) +* supplementary groups of gawk process: Auto-set. (line 289) * switch statement: Switch Statement. (line 6) -* SYMTAB array: Auto-set. (line 352) +* SYMTAB array: Auto-set. (line 349) * syntactic ambiguity: /= operator vs. /=.../ regexp constant: Assignment Ops. (line 150) * system: I/O Functions. (line 105) @@ -38920,10 +38915,10 @@ Index * variables, global, for library functions: Library Names. (line 11) * variables, private: Library Names. (line 11) * variables <1>: Basic Data Typing. (line 6) -* version of, gawk: Auto-set. (line 262) -* version of, GNU MP library: Auto-set. (line 270) -* version of, GNU MPFR library: Auto-set. (line 272) -* version of, gawk extension API: Auto-set. (line 287) +* version of, gawk: Auto-set. (line 259) +* version of, GNU MP library: Auto-set. (line 267) +* version of, GNU MPFR library: Auto-set. (line 269) +* version of, gawk extension API: Auto-set. (line 284) * vertical bar (|): Regexp Operator Details. (line 66) * vertical bar (|), | operator (I/O): Getline/Pipe. (line 10) @@ -39210,401 +39205,401 @@ Node: Exit Statement469789 Node: Built-in Variables472192 Node: User-modified473325 Node: Auto-set481092 -Ref: Auto-set-Footnote-1497899 -Ref: Auto-set-Footnote-2498105 -Node: ARGC and ARGV498161 -Node: Pattern Action Summary502374 -Node: Arrays504804 -Node: Array Basics506133 -Node: Array Intro506977 -Ref: figure-array-elements508952 -Ref: Array Intro-Footnote-1511657 -Node: Reference to Elements511785 -Node: Assigning Elements514249 -Node: Array Example514740 -Node: Scanning an Array516694 -Node: Controlling Scanning519716 -Ref: Controlling Scanning-Footnote-1526172 -Node: Numeric Array Subscripts526488 -Node: Uninitialized Subscripts528672 -Node: Delete530291 -Ref: Delete-Footnote-1533043 -Node: Multidimensional533100 -Node: Multiscanning536195 -Node: Arrays of Arrays537786 -Node: Arrays Summary542554 -Node: Functions544647 -Node: Built-in545685 -Node: Calling Built-in546838 -Node: Boolean Functions548834 -Node: Numeric Functions549388 -Ref: Numeric Functions-Footnote-1553415 -Ref: Numeric Functions-Footnote-2554063 -Ref: Numeric Functions-Footnote-3554111 -Node: String Functions554383 -Ref: String Functions-Footnote-1579225 -Ref: String Functions-Footnote-2579353 -Ref: String Functions-Footnote-3579601 -Node: Gory Details579688 -Ref: table-sub-escapes581479 -Ref: table-sub-proposed582999 -Ref: table-posix-sub584363 -Ref: table-gensub-escapes585905 -Ref: Gory Details-Footnote-1586729 -Node: I/O Functions586883 -Ref: table-system-return-values593337 -Ref: I/O Functions-Footnote-1595418 -Ref: I/O Functions-Footnote-2595566 -Node: Time Functions595686 -Ref: Time Functions-Footnote-1606357 -Ref: Time Functions-Footnote-2606425 -Ref: Time Functions-Footnote-3606583 -Ref: Time Functions-Footnote-4606694 -Ref: Time Functions-Footnote-5606806 -Ref: Time Functions-Footnote-6607033 -Node: Bitwise Functions607299 -Ref: table-bitwise-ops607893 -Ref: Bitwise Functions-Footnote-1613957 -Ref: Bitwise Functions-Footnote-2614130 -Node: Type Functions614321 -Node: I18N Functions617741 -Node: User-defined619392 -Node: Definition Syntax620204 -Ref: Definition Syntax-Footnote-1625898 -Node: Function Example625969 -Ref: Function Example-Footnote-1628891 -Node: Function Calling628913 -Node: Calling A Function629501 -Node: Variable Scope630459 -Node: Pass By Value/Reference633453 -Node: Function Caveats636097 -Ref: Function Caveats-Footnote-1638144 -Node: Return Statement638264 -Node: Dynamic Typing641243 -Node: Indirect Calls642173 -Node: Functions Summary653100 -Node: Library Functions655805 -Ref: Library Functions-Footnote-1659412 -Ref: Library Functions-Footnote-2659555 -Node: Library Names659726 -Ref: Library Names-Footnote-1663393 -Ref: Library Names-Footnote-2663616 -Node: General Functions663702 -Node: Strtonum Function664884 -Node: Assert Function667906 -Node: Round Function671232 -Node: Cliff Random Function672772 -Node: Ordinal Functions673788 -Ref: Ordinal Functions-Footnote-1676851 -Ref: Ordinal Functions-Footnote-2677103 -Node: Join Function677313 -Ref: Join Function-Footnote-1679083 -Node: Getlocaltime Function679283 -Node: Readfile Function683025 -Node: Shell Quoting685002 -Node: Isnumeric Function686430 -Node: Data File Management687818 -Node: Filetrans Function688450 -Node: Rewind Function692546 -Node: File Checking694455 -Ref: File Checking-Footnote-1695789 -Node: Empty Files695990 -Node: Ignoring Assigns697969 -Node: Getopt Function699519 -Ref: Getopt Function-Footnote-1714816 -Node: Passwd Functions715016 -Ref: Passwd Functions-Footnote-1723855 -Node: Group Functions723943 -Ref: Group Functions-Footnote-1731841 -Node: Walking Arrays732048 -Node: Library Functions Summary735056 -Node: Library Exercises736462 -Node: Sample Programs736927 -Node: Running Examples737697 -Node: Clones738425 -Node: Cut Program739649 -Node: Egrep Program749789 -Node: Id Program758790 -Node: Split Program768725 -Ref: Split Program-Footnote-1778618 -Node: Tee Program778791 -Node: Uniq Program781581 -Node: Wc Program789169 -Node: Bytes vs. Characters789556 -Node: Using extensions791104 -Node: wc program791858 -Node: Miscellaneous Programs796723 -Node: Dupword Program797936 -Node: Alarm Program799966 -Node: Translate Program804821 -Ref: Translate Program-Footnote-1809386 -Node: Labels Program809656 -Ref: Labels Program-Footnote-1813007 -Node: Word Sorting813091 -Node: History Sorting817163 -Node: Extract Program819388 -Node: Simple Sed827401 -Node: Igawk Program830475 -Ref: Igawk Program-Footnote-1844806 -Ref: Igawk Program-Footnote-2845008 -Ref: Igawk Program-Footnote-3845130 -Node: Anagram Program845245 -Node: Signature Program848307 -Node: Programs Summary849554 -Node: Programs Exercises850768 -Ref: Programs Exercises-Footnote-1854898 -Node: Advanced Features854984 -Node: Nondecimal Data857381 -Node: Boolean Typed Values858979 -Node: Array Sorting860860 -Node: Controlling Array Traversal861565 -Ref: Controlling Array Traversal-Footnote-1869933 -Node: Array Sorting Functions870051 -Ref: Array Sorting Functions-Footnote-1875962 -Node: Two-way I/O876158 -Ref: Two-way I/O-Footnote-1883884 -Ref: Two-way I/O-Footnote-2884071 -Node: TCP/IP Networking884153 -Node: Profiling887229 -Node: Persistent Memory896535 -Ref: Persistent Memory-Footnote-1902704 -Node: Extension Philosophy902831 -Node: Advanced Features Summary904318 -Node: Internationalization906490 -Node: I18N and L10N908164 -Node: Explaining gettext908851 -Ref: Explaining gettext-Footnote-1914743 -Ref: Explaining gettext-Footnote-2914928 -Node: Programmer i18n915093 -Ref: Programmer i18n-Footnote-1920042 -Node: Translator i18n920091 -Node: String Extraction920885 -Ref: String Extraction-Footnote-1922017 -Node: Printf Ordering922103 -Ref: Printf Ordering-Footnote-1924889 -Node: I18N Portability924953 -Ref: I18N Portability-Footnote-1927409 -Node: I18N Example927472 -Ref: I18N Example-Footnote-1930747 -Ref: I18N Example-Footnote-2930820 -Node: Gawk I18N930929 -Node: I18N Summary931551 -Node: Debugger932892 -Node: Debugging933892 -Node: Debugging Concepts934333 -Node: Debugging Terms936142 -Node: Awk Debugging938717 -Ref: Awk Debugging-Footnote-1939662 -Node: Sample Debugging Session939794 -Node: Debugger Invocation940328 -Node: Finding The Bug941714 -Node: List of Debugger Commands948188 -Node: Breakpoint Control949521 -Node: Debugger Execution Control953215 -Node: Viewing And Changing Data956577 -Node: Execution Stack960118 -Node: Debugger Info961755 -Node: Miscellaneous Debugger Commands965826 -Node: Readline Support970888 -Node: Limitations971784 -Node: Debugging Summary974338 -Node: Namespaces975617 -Node: Global Namespace976728 -Node: Qualified Names978126 -Node: Default Namespace979125 -Node: Changing The Namespace979866 -Node: Naming Rules981480 -Node: Internal Name Management983328 -Node: Namespace Example984370 -Node: Namespace And Features986932 -Node: Namespace Summary988367 -Node: Arbitrary Precision Arithmetic989844 -Node: Computer Arithmetic991331 -Ref: table-numeric-ranges995097 -Ref: table-floating-point-ranges995591 -Ref: Computer Arithmetic-Footnote-1996250 -Node: Math Definitions996307 -Ref: table-ieee-formats999283 -Node: MPFR features999851 -Node: MPFR On Parole1000296 -Ref: MPFR On Parole-Footnote-11001125 -Node: MPFR Intro1001280 -Node: FP Math Caution1002919 -Ref: FP Math Caution-Footnote-11003991 -Node: Inexactness of computations1004360 -Node: Inexact representation1005391 -Node: Comparing FP Values1006751 -Node: Errors accumulate1007992 -Node: Strange values1009448 -Ref: Strange values-Footnote-11012036 -Node: Getting Accuracy1012141 -Node: Try To Round1014851 -Node: Setting precision1015750 -Ref: table-predefined-precision-strings1016447 -Node: Setting the rounding mode1018278 -Ref: table-gawk-rounding-modes1018652 -Ref: Setting the rounding mode-Footnote-11022584 -Node: Arbitrary Precision Integers1022763 -Ref: Arbitrary Precision Integers-Footnote-11025938 -Node: Checking for MPFR1026087 -Node: POSIX Floating Point Problems1027561 -Ref: POSIX Floating Point Problems-Footnote-11032214 -Node: Floating point summary1032252 -Node: Dynamic Extensions1034442 -Node: Extension Intro1035995 -Node: Plugin License1037261 -Node: Extension Mechanism Outline1038058 -Ref: figure-load-extension1038497 -Ref: figure-register-new-function1040063 -Ref: figure-call-new-function1041156 -Node: Extension API Description1043219 -Node: Extension API Functions Introduction1044932 -Ref: table-api-std-headers1046768 -Node: General Data Types1051018 -Ref: General Data Types-Footnote-11059724 -Node: Memory Allocation Functions1060023 -Ref: Memory Allocation Functions-Footnote-11064524 -Node: Constructor Functions1064623 -Node: API Ownership of MPFR and GMP Values1068276 -Node: Registration Functions1069809 -Node: Extension Functions1070509 -Node: Exit Callback Functions1075831 -Node: Extension Version String1077081 -Node: Input Parsers1077744 -Node: Output Wrappers1090465 -Node: Two-way processors1094977 -Node: Printing Messages1097242 -Ref: Printing Messages-Footnote-11098413 -Node: Updating ERRNO1098566 -Node: Requesting Values1099305 -Ref: table-value-types-returned1100042 -Node: Accessing Parameters1101151 -Node: Symbol Table Access1102388 -Node: Symbol table by name1102900 -Ref: Symbol table by name-Footnote-11105925 -Node: Symbol table by cookie1106053 -Ref: Symbol table by cookie-Footnote-11110238 -Node: Cached values1110302 -Ref: Cached values-Footnote-11113838 -Node: Array Manipulation1113991 -Ref: Array Manipulation-Footnote-11115082 -Node: Array Data Types1115119 -Ref: Array Data Types-Footnote-11117777 -Node: Array Functions1117869 -Node: Flattening Arrays1122654 -Node: Creating Arrays1129630 -Node: Redirection API1134397 -Node: Extension API Variables1137230 -Node: Extension Versioning1137941 -Ref: gawk-api-version1138370 -Node: Extension GMP/MPFR Versioning1140102 -Node: Extension API Informational Variables1141730 -Node: Extension API Boilerplate1142803 -Node: Changes from API V11146777 -Node: Finding Extensions1148349 -Node: Extension Example1148908 -Node: Internal File Description1149706 -Node: Internal File Ops1153786 -Ref: Internal File Ops-Footnote-11165136 -Node: Using Internal File Ops1165276 -Ref: Using Internal File Ops-Footnote-11167659 -Node: Extension Samples1167933 -Node: Extension Sample File Functions1169462 -Node: Extension Sample Fnmatch1177111 -Node: Extension Sample Fork1178598 -Node: Extension Sample Inplace1179816 -Node: Extension Sample Ord1183442 -Node: Extension Sample Readdir1184278 -Ref: table-readdir-file-types1185167 -Node: Extension Sample Revout1186235 -Node: Extension Sample Rev2way1186824 -Node: Extension Sample Read write array1187564 -Node: Extension Sample Readfile1190729 -Node: Extension Sample Time1191824 -Node: Extension Sample API Tests1193576 -Node: gawkextlib1194068 -Node: Extension summary1196986 -Node: Extension Exercises1200688 -Node: Language History1201930 -Node: V7/SVR3.11203586 -Node: SVR41205738 -Node: POSIX1207172 -Node: BTL1208553 -Node: POSIX/GNU1209282 -Node: Feature History1215060 -Node: Common Extensions1232235 -Node: Ranges and Locales1233518 -Ref: Ranges and Locales-Footnote-11238134 -Ref: Ranges and Locales-Footnote-21238161 -Ref: Ranges and Locales-Footnote-31238396 -Node: Contributors1238619 -Node: History summary1244616 -Node: Installation1245996 -Node: Gawk Distribution1246940 -Node: Getting1247424 -Node: Extracting1248387 -Node: Distribution contents1250025 -Node: Unix Installation1257086 -Node: Quick Installation1257890 -Node: Compiling with MPFR1260310 -Node: Shell Startup Files1261000 -Node: Additional Configuration Options1262089 -Node: Configuration Philosophy1264404 -Node: Compiling from Git1266800 -Node: Building the Documentation1267355 -Node: Non-Unix Installation1268739 -Node: PC Installation1269199 -Node: PC Binary Installation1270037 -Node: PC Compiling1270910 -Node: PC Using1272027 -Node: Cygwin1275580 -Node: MSYS1276804 -Node: VMS Installation1277406 -Node: VMS Compilation1278125 -Ref: VMS Compilation-Footnote-11279354 -Node: VMS Dynamic Extensions1279412 -Node: VMS Installation Details1281097 -Node: VMS Running1283359 -Node: VMS GNV1287638 -Node: Bugs1288352 -Node: Bug definition1289264 -Node: Bug address1292200 -Node: Usenet1295388 -Node: Performance bugs1296577 -Node: Asking for help1299498 -Node: Maintainers1301465 -Node: Other Versions1302659 -Node: Installation summary1310929 -Node: Notes1312293 -Node: Compatibility Mode1313087 -Node: Additions1313869 -Node: Accessing The Source1314794 -Node: Adding Code1316231 -Node: New Ports1323046 -Node: Derived Files1327421 -Ref: Derived Files-Footnote-11333081 -Ref: Derived Files-Footnote-21333116 -Ref: Derived Files-Footnote-31333714 -Node: Future Extensions1333828 -Node: Implementation Limitations1334486 -Node: Extension Design1335696 -Node: Old Extension Problems1336840 -Ref: Old Extension Problems-Footnote-11338358 -Node: Extension New Mechanism Goals1338415 -Ref: Extension New Mechanism Goals-Footnote-11341779 -Node: Extension Other Design Decisions1341968 -Node: Extension Future Growth1344081 -Node: Notes summary1344687 -Node: Basic Concepts1345845 -Node: Basic High Level1346526 -Ref: figure-general-flow1346808 -Ref: figure-process-flow1347494 -Ref: Basic High Level-Footnote-11350796 -Node: Basic Data Typing1350981 -Node: Glossary1354309 -Node: Copying1386196 -Node: GNU Free Documentation License1423739 -Node: Index1448859 +Ref: Auto-set-Footnote-1497859 +Ref: Auto-set-Footnote-2498065 +Node: ARGC and ARGV498121 +Node: Pattern Action Summary502334 +Node: Arrays504764 +Node: Array Basics506093 +Node: Array Intro506937 +Ref: figure-array-elements508912 +Ref: Array Intro-Footnote-1511617 +Node: Reference to Elements511745 +Node: Assigning Elements514209 +Node: Array Example514700 +Node: Scanning an Array516654 +Node: Controlling Scanning519676 +Ref: Controlling Scanning-Footnote-1526132 +Node: Numeric Array Subscripts526448 +Node: Uninitialized Subscripts528632 +Node: Delete530251 +Ref: Delete-Footnote-1533003 +Node: Multidimensional533060 +Node: Multiscanning536155 +Node: Arrays of Arrays537746 +Node: Arrays Summary542514 +Node: Functions544607 +Node: Built-in545645 +Node: Calling Built-in546798 +Node: Boolean Functions548794 +Node: Numeric Functions549348 +Ref: Numeric Functions-Footnote-1553375 +Ref: Numeric Functions-Footnote-2554023 +Ref: Numeric Functions-Footnote-3554071 +Node: String Functions554343 +Ref: String Functions-Footnote-1579185 +Ref: String Functions-Footnote-2579313 +Ref: String Functions-Footnote-3579561 +Node: Gory Details579648 +Ref: table-sub-escapes581439 +Ref: table-sub-proposed582959 +Ref: table-posix-sub584323 +Ref: table-gensub-escapes585865 +Ref: Gory Details-Footnote-1586689 +Node: I/O Functions586843 +Ref: table-system-return-values593297 +Ref: I/O Functions-Footnote-1595378 +Ref: I/O Functions-Footnote-2595526 +Node: Time Functions595646 +Ref: Time Functions-Footnote-1606317 +Ref: Time Functions-Footnote-2606385 +Ref: Time Functions-Footnote-3606543 +Ref: Time Functions-Footnote-4606654 +Ref: Time Functions-Footnote-5606766 +Ref: Time Functions-Footnote-6606993 +Node: Bitwise Functions607259 +Ref: table-bitwise-ops607853 +Ref: Bitwise Functions-Footnote-1613917 +Ref: Bitwise Functions-Footnote-2614090 +Node: Type Functions614281 +Node: I18N Functions617701 +Node: User-defined619352 +Node: Definition Syntax620164 +Ref: Definition Syntax-Footnote-1625858 +Node: Function Example625929 +Ref: Function Example-Footnote-1628851 +Node: Function Calling628873 +Node: Calling A Function629461 +Node: Variable Scope630419 +Node: Pass By Value/Reference633413 +Node: Function Caveats636057 +Ref: Function Caveats-Footnote-1638104 +Node: Return Statement638224 +Node: Dynamic Typing641203 +Node: Indirect Calls642133 +Node: Functions Summary653060 +Node: Library Functions655765 +Ref: Library Functions-Footnote-1659372 +Ref: Library Functions-Footnote-2659515 +Node: Library Names659686 +Ref: Library Names-Footnote-1663353 +Ref: Library Names-Footnote-2663576 +Node: General Functions663662 +Node: Strtonum Function664844 +Node: Assert Function667866 +Node: Round Function671192 +Node: Cliff Random Function672732 +Node: Ordinal Functions673748 +Ref: Ordinal Functions-Footnote-1676811 +Ref: Ordinal Functions-Footnote-2677063 +Node: Join Function677273 +Ref: Join Function-Footnote-1679043 +Node: Getlocaltime Function679243 +Node: Readfile Function682985 +Node: Shell Quoting684962 +Node: Isnumeric Function686390 +Node: Data File Management687778 +Node: Filetrans Function688410 +Node: Rewind Function692506 +Node: File Checking694415 +Ref: File Checking-Footnote-1695749 +Node: Empty Files695950 +Node: Ignoring Assigns697929 +Node: Getopt Function699479 +Ref: Getopt Function-Footnote-1714776 +Node: Passwd Functions714976 +Ref: Passwd Functions-Footnote-1723815 +Node: Group Functions723903 +Ref: Group Functions-Footnote-1731801 +Node: Walking Arrays732008 +Node: Library Functions Summary735016 +Node: Library Exercises736422 +Node: Sample Programs736887 +Node: Running Examples737657 +Node: Clones738385 +Node: Cut Program739609 +Node: Egrep Program749749 +Node: Id Program758750 +Node: Split Program768685 +Ref: Split Program-Footnote-1778578 +Node: Tee Program778751 +Node: Uniq Program781541 +Node: Wc Program789129 +Node: Bytes vs. Characters789516 +Node: Using extensions791064 +Node: wc program791818 +Node: Miscellaneous Programs796683 +Node: Dupword Program797896 +Node: Alarm Program799926 +Node: Translate Program804781 +Ref: Translate Program-Footnote-1809346 +Node: Labels Program809616 +Ref: Labels Program-Footnote-1812967 +Node: Word Sorting813051 +Node: History Sorting817123 +Node: Extract Program819348 +Node: Simple Sed827361 +Node: Igawk Program830435 +Ref: Igawk Program-Footnote-1844766 +Ref: Igawk Program-Footnote-2844968 +Ref: Igawk Program-Footnote-3845090 +Node: Anagram Program845205 +Node: Signature Program848267 +Node: Programs Summary849514 +Node: Programs Exercises850728 +Ref: Programs Exercises-Footnote-1854858 +Node: Advanced Features854944 +Node: Nondecimal Data857341 +Node: Boolean Typed Values858939 +Node: Array Sorting860820 +Node: Controlling Array Traversal861525 +Ref: Controlling Array Traversal-Footnote-1869893 +Node: Array Sorting Functions870011 +Ref: Array Sorting Functions-Footnote-1875922 +Node: Two-way I/O876118 +Ref: Two-way I/O-Footnote-1883844 +Ref: Two-way I/O-Footnote-2884031 +Node: TCP/IP Networking884113 +Node: Profiling887189 +Node: Persistent Memory896495 +Ref: Persistent Memory-Footnote-1902664 +Node: Extension Philosophy902791 +Node: Advanced Features Summary904278 +Node: Internationalization906450 +Node: I18N and L10N908124 +Node: Explaining gettext908811 +Ref: Explaining gettext-Footnote-1914703 +Ref: Explaining gettext-Footnote-2914888 +Node: Programmer i18n915053 +Ref: Programmer i18n-Footnote-1920002 +Node: Translator i18n920051 +Node: String Extraction920845 +Ref: String Extraction-Footnote-1921977 +Node: Printf Ordering922063 +Ref: Printf Ordering-Footnote-1924849 +Node: I18N Portability924913 +Ref: I18N Portability-Footnote-1927369 +Node: I18N Example927432 +Ref: I18N Example-Footnote-1930707 +Ref: I18N Example-Footnote-2930780 +Node: Gawk I18N930889 +Node: I18N Summary931511 +Node: Debugger932852 +Node: Debugging933852 +Node: Debugging Concepts934293 +Node: Debugging Terms936102 +Node: Awk Debugging938677 +Ref: Awk Debugging-Footnote-1939622 +Node: Sample Debugging Session939754 +Node: Debugger Invocation940288 +Node: Finding The Bug941674 +Node: List of Debugger Commands948148 +Node: Breakpoint Control949481 +Node: Debugger Execution Control953175 +Node: Viewing And Changing Data956537 +Node: Execution Stack960078 +Node: Debugger Info961715 +Node: Miscellaneous Debugger Commands965786 +Node: Readline Support970848 +Node: Limitations971744 +Node: Debugging Summary974298 +Node: Namespaces975577 +Node: Global Namespace976688 +Node: Qualified Names978086 +Node: Default Namespace979085 +Node: Changing The Namespace979826 +Node: Naming Rules981440 +Node: Internal Name Management983288 +Node: Namespace Example984330 +Node: Namespace And Features986892 +Node: Namespace Summary988327 +Node: Arbitrary Precision Arithmetic989804 +Node: Computer Arithmetic991291 +Ref: table-numeric-ranges995057 +Ref: table-floating-point-ranges995551 +Ref: Computer Arithmetic-Footnote-1996210 +Node: Math Definitions996267 +Ref: table-ieee-formats999243 +Node: MPFR features999811 +Node: MPFR On Parole1000256 +Ref: MPFR On Parole-Footnote-11001085 +Node: MPFR Intro1001240 +Node: FP Math Caution1002879 +Ref: FP Math Caution-Footnote-11003951 +Node: Inexactness of computations1004320 +Node: Inexact representation1005351 +Node: Comparing FP Values1006711 +Node: Errors accumulate1007952 +Node: Strange values1009408 +Ref: Strange values-Footnote-11011996 +Node: Getting Accuracy1012101 +Node: Try To Round1014811 +Node: Setting precision1015710 +Ref: table-predefined-precision-strings1016407 +Node: Setting the rounding mode1018238 +Ref: table-gawk-rounding-modes1018612 +Ref: Setting the rounding mode-Footnote-11022544 +Node: Arbitrary Precision Integers1022723 +Ref: Arbitrary Precision Integers-Footnote-11025898 +Node: Checking for MPFR1026047 +Node: POSIX Floating Point Problems1027521 +Ref: POSIX Floating Point Problems-Footnote-11032174 +Node: Floating point summary1032212 +Node: Dynamic Extensions1034402 +Node: Extension Intro1035955 +Node: Plugin License1037221 +Node: Extension Mechanism Outline1038018 +Ref: figure-load-extension1038457 +Ref: figure-register-new-function1040023 +Ref: figure-call-new-function1041116 +Node: Extension API Description1043179 +Node: Extension API Functions Introduction1044892 +Ref: table-api-std-headers1046728 +Node: General Data Types1050978 +Ref: General Data Types-Footnote-11059684 +Node: Memory Allocation Functions1059983 +Ref: Memory Allocation Functions-Footnote-11064484 +Node: Constructor Functions1064583 +Node: API Ownership of MPFR and GMP Values1068236 +Node: Registration Functions1069769 +Node: Extension Functions1070469 +Node: Exit Callback Functions1075791 +Node: Extension Version String1077041 +Node: Input Parsers1077704 +Node: Output Wrappers1090425 +Node: Two-way processors1094937 +Node: Printing Messages1097202 +Ref: Printing Messages-Footnote-11098373 +Node: Updating ERRNO1098526 +Node: Requesting Values1099265 +Ref: table-value-types-returned1100002 +Node: Accessing Parameters1101111 +Node: Symbol Table Access1102348 +Node: Symbol table by name1102860 +Ref: Symbol table by name-Footnote-11105885 +Node: Symbol table by cookie1106013 +Ref: Symbol table by cookie-Footnote-11110198 +Node: Cached values1110262 +Ref: Cached values-Footnote-11113798 +Node: Array Manipulation1113951 +Ref: Array Manipulation-Footnote-11115042 +Node: Array Data Types1115079 +Ref: Array Data Types-Footnote-11117737 +Node: Array Functions1117829 +Node: Flattening Arrays1122614 +Node: Creating Arrays1129590 +Node: Redirection API1134357 +Node: Extension API Variables1137190 +Node: Extension Versioning1137901 +Ref: gawk-api-version1138330 +Node: Extension GMP/MPFR Versioning1140062 +Node: Extension API Informational Variables1141690 +Node: Extension API Boilerplate1142763 +Node: Changes from API V11146737 +Node: Finding Extensions1148309 +Node: Extension Example1148868 +Node: Internal File Description1149666 +Node: Internal File Ops1153746 +Ref: Internal File Ops-Footnote-11165096 +Node: Using Internal File Ops1165236 +Ref: Using Internal File Ops-Footnote-11167619 +Node: Extension Samples1167893 +Node: Extension Sample File Functions1169422 +Node: Extension Sample Fnmatch1177071 +Node: Extension Sample Fork1178558 +Node: Extension Sample Inplace1179776 +Node: Extension Sample Ord1183402 +Node: Extension Sample Readdir1184238 +Ref: table-readdir-file-types1185127 +Node: Extension Sample Revout1186195 +Node: Extension Sample Rev2way1186784 +Node: Extension Sample Read write array1187524 +Node: Extension Sample Readfile1190689 +Node: Extension Sample Time1191784 +Node: Extension Sample API Tests1193536 +Node: gawkextlib1194028 +Node: Extension summary1196946 +Node: Extension Exercises1200648 +Node: Language History1201890 +Node: V7/SVR3.11203546 +Node: SVR41205698 +Node: POSIX1207132 +Node: BTL1208513 +Node: POSIX/GNU1209242 +Node: Feature History1215020 +Node: Common Extensions1232195 +Node: Ranges and Locales1233478 +Ref: Ranges and Locales-Footnote-11238094 +Ref: Ranges and Locales-Footnote-21238121 +Ref: Ranges and Locales-Footnote-31238356 +Node: Contributors1238579 +Node: History summary1244576 +Node: Installation1245956 +Node: Gawk Distribution1246900 +Node: Getting1247384 +Node: Extracting1248347 +Node: Distribution contents1249985 +Node: Unix Installation1257046 +Node: Quick Installation1257850 +Node: Compiling with MPFR1260270 +Node: Shell Startup Files1260960 +Node: Additional Configuration Options1262049 +Node: Configuration Philosophy1264364 +Node: Compiling from Git1266760 +Node: Building the Documentation1267315 +Node: Non-Unix Installation1268699 +Node: PC Installation1269159 +Node: PC Binary Installation1269997 +Node: PC Compiling1270870 +Node: PC Using1271987 +Node: Cygwin1275540 +Node: MSYS1276764 +Node: VMS Installation1277366 +Node: VMS Compilation1278085 +Ref: VMS Compilation-Footnote-11279314 +Node: VMS Dynamic Extensions1279372 +Node: VMS Installation Details1281057 +Node: VMS Running1283319 +Node: VMS GNV1287598 +Node: Bugs1288312 +Node: Bug definition1289224 +Node: Bug address1292160 +Node: Usenet1295348 +Node: Performance bugs1296537 +Node: Asking for help1299458 +Node: Maintainers1301425 +Node: Other Versions1302526 +Node: Installation summary1310796 +Node: Notes1312160 +Node: Compatibility Mode1312954 +Node: Additions1313736 +Node: Accessing The Source1314661 +Node: Adding Code1316098 +Node: New Ports1322913 +Node: Derived Files1327288 +Ref: Derived Files-Footnote-11332948 +Ref: Derived Files-Footnote-21332983 +Ref: Derived Files-Footnote-31333581 +Node: Future Extensions1333695 +Node: Implementation Limitations1334353 +Node: Extension Design1335563 +Node: Old Extension Problems1336707 +Ref: Old Extension Problems-Footnote-11338225 +Node: Extension New Mechanism Goals1338282 +Ref: Extension New Mechanism Goals-Footnote-11341646 +Node: Extension Other Design Decisions1341835 +Node: Extension Future Growth1343948 +Node: Notes summary1344554 +Node: Basic Concepts1345712 +Node: Basic High Level1346393 +Ref: figure-general-flow1346675 +Ref: figure-process-flow1347361 +Ref: Basic High Level-Footnote-11350663 +Node: Basic Data Typing1350848 +Node: Glossary1354176 +Node: Copying1386063 +Node: GNU Free Documentation License1423606 +Node: Index1448726  End Tag Table diff --git a/doc/gawk.texi b/doc/gawk.texi index acbda21e..9a276ad9 100644 --- a/doc/gawk.texi +++ b/doc/gawk.texi @@ -16426,9 +16426,6 @@ This element gives a string indicating the platform for which @itemx "mingw" Microsoft Windows, using either DJGPP or MinGW, respectively. -@item "os2" -OS/2. - @item "os390" OS/390. @@ -44010,10 +44007,6 @@ The people maintaining the various @command{gawk} ports are: @item MS-Windows with MinGW @tab Eli Zaretskii, @EMAIL{eliz@@gnu.org,eliz at gnu dot org} -@c Leave this in the document on purpose. -@c OS/2 is not mentioned anywhere else though. -@item OS/2 @tab Andreas Buening, @EMAIL{andreas.buening@@nexgo.de,andreas dot buening at nexgo dot de} - @item VMS @tab John Malmberg, @EMAIL{wb8tyw@@qsl.net,wb8tyw at qsl dot net} @item z/OS (OS/390) @tab Daniel Richard G.@: @EMAIL{skunk@@iSKUNK.ORG,skunk at iSKUNK dot ORG} @@ -44322,7 +44315,6 @@ the file. @command{gawk} may be built on non-POSIX systems as well. The currently supported systems are MS-Windows using MSYS, MSYS2, DJGPP, MinGW, and Cygwin, -@c OS/2, and both Vax/VMS and OpenVMS. Instructions for each system are included in this @value{APPENDIX}. diff --git a/doc/gawktexi.in b/doc/gawktexi.in index 9e39f158..19476ea8 100644 --- a/doc/gawktexi.in +++ b/doc/gawktexi.in @@ -15613,9 +15613,6 @@ This element gives a string indicating the platform for which @itemx "mingw" Microsoft Windows, using either DJGPP or MinGW, respectively. -@item "os2" -OS/2. - @item "os390" OS/390. @@ -42853,10 +42850,6 @@ The people maintaining the various @command{gawk} ports are: @item MS-Windows with MinGW @tab Eli Zaretskii, @EMAIL{eliz@@gnu.org,eliz at gnu dot org} -@c Leave this in the document on purpose. -@c OS/2 is not mentioned anywhere else though. -@item OS/2 @tab Andreas Buening, @EMAIL{andreas.buening@@nexgo.de,andreas dot buening at nexgo dot de} - @item VMS @tab John Malmberg, @EMAIL{wb8tyw@@qsl.net,wb8tyw at qsl dot net} @item z/OS (OS/390) @tab Daniel Richard G.@: @EMAIL{skunk@@iSKUNK.ORG,skunk at iSKUNK dot ORG} @@ -43165,7 +43158,6 @@ the file. @command{gawk} may be built on non-POSIX systems as well. The currently supported systems are MS-Windows using MSYS, MSYS2, DJGPP, MinGW, and Cygwin, -@c OS/2, and both Vax/VMS and OpenVMS. Instructions for each system are included in this @value{APPENDIX}. diff --git a/gawkmisc.c b/gawkmisc.c index 1f85b221..165e15c6 100644 --- a/gawkmisc.c +++ b/gawkmisc.c @@ -32,7 +32,7 @@ /* some old compilers don't grok #elif. sigh */ -#if defined(__EMX__) || defined(__DJGPP__) || defined(__MINGW32__) +#if defined(__DJGPP__) || defined(__MINGW32__) #include "pc/gawkmisc.pc" #else /* not __DJGPP__, not __MINGW32__ */ #if defined(VMS) diff --git a/io.c b/io.c index 88fd1ea4..8fac000a 100644 --- a/io.c +++ b/io.c @@ -113,18 +113,6 @@ #include "popen.h" #endif -#ifdef __EMX__ -#include - -#if !defined(_S_IFDIR) && defined(S_IFDIR) -#define _S_IFDIR S_IFDIR -#endif - -#if !defined(_S_IRWXU) && defined(S_IRWXU) -#define _S_IRWXU S_IRWXU -#endif -#endif - #ifndef ENFILE #define ENFILE EMFILE #endif @@ -361,7 +349,7 @@ init_io() } -#if defined(__DJGPP__) || defined(__MINGW32__) || defined(__EMX__) || defined(__CYGWIN__) +#if defined(__DJGPP__) || defined(__MINGW32__) || defined(__CYGWIN__) /* binmode --- convert BINMODE to string for fopen */ static const char * @@ -1950,7 +1938,7 @@ strictopen: if (openfd == INVALID_HANDLE && errno == ENOENT && save_errno) errno = save_errno; } -#if defined(__EMX__) || defined(__MINGW32__) +#if defined(__MINGW32__) if (openfd == INVALID_HANDLE && errno == EACCES) { /* On OS/2 and Windows directory access via open() is not permitted. */ @@ -2366,11 +2354,9 @@ use_pipes: int ptoc[2], ctop[2]; int pid; int save_errno; -#if defined(__EMX__) || defined(__MINGW32__) +#if defined(__MINGW32__) int save_stdout, save_stdin; -#ifdef __MINGW32__ char *qcmd = NULL; -#endif #endif if (pipe(ptoc) < 0) @@ -2384,7 +2370,7 @@ use_pipes: return false; } -#if defined(__EMX__) || defined(__MINGW32__) +#if defined(__MINGW32__) save_stdin = dup(0); /* duplicate stdin */ save_stdout = dup(1); /* duplicate stdout */ @@ -2427,13 +2413,9 @@ use_pipes: os_close_on_exec(save_stdout, str, "pipe", "from"); /* saved stdout of the parent process */ /* stderr does NOT get dup'ed onto child's stdout */ -#ifdef __EMX__ - pid = spawnl(P_NOWAIT, "/bin/sh", "sh", "-c", str, NULL); -#else /* __MINGW32__ */ pid = spawnl(P_NOWAIT, getenv("ComSpec"), "cmd.exe", "/c", qcmd = quote_cmd(str), NULL); efree(qcmd); -#endif /* restore stdin and stdout */ close(1); @@ -2461,7 +2443,7 @@ use_pipes: return false; } -#else /* NOT __EMX__, NOT __MINGW32__ */ +#else /* NOT __MINGW32__ */ if ((pid = fork()) < 0) { save_errno = errno; close(ptoc[0]); close(ptoc[1]); @@ -2489,7 +2471,7 @@ use_pipes: execl("/bin/sh", "sh", "-c", str, NULL); _exit(errno == ENOENT ? 127 : 126); } -#endif /* NOT __EMX__, NOT __MINGW32__ */ +#endif /* NOT __MINGW32__ */ /* parent */ if ((BINMODE & BINMODE_INPUT) != 0) @@ -2529,7 +2511,7 @@ use_pipes: else find_output_wrapper(& rp->output); -#if !defined(__EMX__) && !defined(__MINGW32__) +#if !defined(__MINGW32__) os_close_on_exec(ctop[0], str, "pipe", "from"); os_close_on_exec(ptoc[1], str, "pipe", "from"); @@ -2656,11 +2638,9 @@ gawk_popen(const char *cmd, struct redirect *rp) { int p[2]; int pid; -#if defined(__EMX__) || defined(__MINGW32__) +#if defined(__MINGW32__) int save_stdout; -#ifdef __MINGW32__ char *qcmd = NULL; -#endif #endif /* @@ -2674,7 +2654,7 @@ gawk_popen(const char *cmd, struct redirect *rp) if (pipe(p) < 0) fatal(_("cannot open pipe `%s': %s"), cmd, strerror(errno)); -#if defined(__EMX__) || defined(__MINGW32__) +#if defined(__MINGW32__) rp->iop = NULL; save_stdout = dup(1); /* save stdout */ if (save_stdout == -1) { @@ -2697,13 +2677,9 @@ gawk_popen(const char *cmd, struct redirect *rp) os_close_on_exec(p[0], cmd, "pipe", "from"); /* pipe output: input of the parent process */ os_close_on_exec(save_stdout, cmd, "pipe", "from"); /* saved stdout of the parent process */ -#ifdef __EMX__ - pid = spawnl(P_NOWAIT, "/bin/sh", "sh", "-c", cmd, NULL); -#else /* __MINGW32__ */ pid = spawnl(P_NOWAIT, getenv("ComSpec"), "cmd.exe", "/c", qcmd = quote_cmd(cmd), NULL); efree(qcmd); -#endif /* restore stdout */ close(1); @@ -2713,7 +2689,7 @@ gawk_popen(const char *cmd, struct redirect *rp) } close(save_stdout); -#else /* NOT __EMX__, NOT __MINGW32__ */ +#else /* NOT __MINGW32__ */ if ((pid = fork()) == 0) { if (close(1) == -1) fatal(_("close of stdout in child failed: %s"), @@ -2726,14 +2702,14 @@ gawk_popen(const char *cmd, struct redirect *rp) execl("/bin/sh", "sh", "-c", cmd, NULL); _exit(errno == ENOENT ? 127 : 126); } -#endif /* NOT __EMX__, NOT __MINGW32__ */ +#endif /* NOT __MINGW32__ */ if (pid == -1) { close(p[0]); close(p[1]); fatal(_("cannot create child process for `%s' (fork: %s)"), cmd, strerror(errno)); } rp->pid = pid; -#if !defined(__EMX__) && !defined(__MINGW32__) +#if !defined(__MINGW32__) if (close(p[1]) == -1) { close(p[0]); fatal(_("close of pipe failed: %s"), strerror(errno)); @@ -3090,12 +3066,6 @@ find_source(const char *src, struct stat *stb, int *errcode, int is_extlib) *errcode = 0; if (src == NULL || *src == '\0') return NULL; -#ifdef __EMX__ - char os2_src[strlen(src) + 1]; - - if (is_extlib) - src = os2_fixdllname(os2_src, src, sizeof(os2_src)); -#endif /* __EMX__ */ path = do_find_source(src, stb, errcode, pi); if (path == NULL && is_extlib) { @@ -3411,7 +3381,7 @@ iop_alloc(int fd, const char *name, int errno_val) if (fd != INVALID_HANDLE) fstat(fd, & iop->public.sbuf); -#if defined(__EMX__) || defined(__MINGW32__) +#if defined(__MINGW32__) else if (errno_val == EISDIR) { iop->public.sbuf.st_mode = (_S_IFDIR | _S_IRWXU); iop->public.fd = FAKE_FD_VALUE; diff --git a/main.c b/main.c index f12ae68f..53126435 100644 --- a/main.c +++ b/main.c @@ -1864,8 +1864,6 @@ platform_name() return "mingw"; #elif defined(__DJGPP__) return "djgpp"; -#elif defined(__EMX__) - return "os2"; #elif defined(USE_EBCDIC) return "os390"; #else diff --git a/missing_d/ChangeLog b/missing_d/ChangeLog index c8ae30ff..f645dd06 100644 --- a/missing_d/ChangeLog +++ b/missing_d/ChangeLog @@ -1,3 +1,7 @@ +2022-07-03 Arnold D. Robbins + + * snprintf.c: Remove stuff related to __EMX__. + 2021-10-27 Arnold D. Robbins * 5.1.1: Release tar ball made. diff --git a/missing_d/snprintf.c b/missing_d/snprintf.c index c09c7473..dfe57c6b 100644 --- a/missing_d/snprintf.c +++ b/missing_d/snprintf.c @@ -87,9 +87,9 @@ safe_tmpfile (void) return NULL; #if ! defined(__DJGPP__) && ! defined(MSDOS) && ! defined(_MSC_VER) \ - && ! defined(_WIN32) && ! defined(__CRTRSXNT__) && ! defined(__EMX__) \ + && ! defined(_WIN32) && ! defined(__CRTRSXNT__) \ && ! defined(__MINGW32__) && ! defined(__WIN32__) - /* If not MS or OS/2, unlink after opening. */ + /* If not MS unlink after opening. */ unlink (tmpfilename); free(tmpfilename); tmpfilename = NULL; diff --git a/nonposix.h b/nonposix.h index b975f75e..80d30da4 100644 --- a/nonposix.h +++ b/nonposix.h @@ -3,7 +3,7 @@ */ /* - * Copyright (C) 2012, 2013, 2016, 2017, 2018, 2019 + * Copyright (C) 2012, 2013, 2016, 2017, 2018, 2019, 2022 * the Free Software Foundation, Inc. * * This file is part of GAWK, the GNU implementation of the @@ -81,19 +81,3 @@ int getppid(void); wint_t btowc (int c); wint_t putwc (wchar_t wc, FILE *stream); #endif - -#ifdef __EMX__ - -char *os2_fixdllname(char *dst, const char *src, size_t n); - -#ifdef __KLIBC__ -#include - -#define dlopen(f, m) os2_dlopen(f, m) -void *os2_dlopen(const char *file, int mode); - -#define dlsym(h, n) os2_dlsym(h, n) -void *os2_dlsym(void *handle, const char *name); -#endif /* __KLIBC__ */ - -#endif /* __EMX__ */ diff --git a/pc/ChangeLog b/pc/ChangeLog index e012e4b3..65100263 100644 --- a/pc/ChangeLog +++ b/pc/ChangeLog @@ -1,3 +1,8 @@ +2022-07-03 Arnold D. Robbins + + * Makefile, config.h, config.sed, gawkmisc.pc: + Remove stuff related to __EMX__. + 2022-05-24 Adam Van Scyoc * Makefile.tst: Regenerated. diff --git a/pc/Makefile b/pc/Makefile index e0ef7662..1eb1fc9e 100644 --- a/pc/Makefile +++ b/pc/Makefile @@ -1,7 +1,6 @@ # Makefile for gawk (GNU awk) Dec 2010 # # - for GNU C (djgpp) [32bit protected-mode executable for DOS] -# - for GNU C (emx) [32bit executable for OS/2 or DOS or Windows32] # - for GNU C (mingw32) [Windows32 executable for Windows 9x/NT/2K/XP/7] # Tested with GNU make on Windows, OS/2 and DOS. @@ -26,9 +25,6 @@ default: @echo " djgpp-readline . Like djgpp, but with readline " @echo " [You will need to have GNU readline library installed.] " @echo " djgpp-readline-mpfr . djgpp with readline and MPFR " - @echo " emx ..... OS/2 32-bit exe [emx/gcc; uses emxlibc.dll] " - @echo " emxnt ... NT exe [emx/gcc with RSXNT] " - @echo " emxbnd .. OS/2 and DOS 32-bit exe [emx/gcc] " @echo " mingw32 . Windows32 exe [Mingw32 GNU C] " @echo " mingw32-readline . Like mingw32, but with readline " @echo " [You will need to have GNU readline library installed.] " @@ -65,7 +61,7 @@ RSPFILE = gawk.rsp #LDRSP = $(GAWKOBJS) #LNKRSP = $(LDRSP) # -# else use brain-dead approach (emxbnd will need 'tr'). +# else use brain-dead approach RSP = $(RSPFILE) LDRSP = @$(RSP) LNKRSP = $(LDRSP) @@ -149,46 +145,6 @@ djgpp-readline-mpfr: LNK=LDJG LF=-s LF2="-lreadline -lmpfr -lgmp -lm" \ BIND=BDJG -#======================================================================== -#========================== EMX ========================================= -#======================================================================== - -# Link command for OS/2 versions. -LEMX = $(CC) $(LF) -o $@ $(GAWKOBJS) gawk.def -lbsd $(LF2) - -# Link and bind for DOS and OS/2 versions. -# emx-09 needs '-p' emx option here or in EMXOPT environ var. -# The following works with 0.9a or newer -LEMXBND = $(CC) $(LF) -o gawk $(LDRSP) gawk.def -lbsd $(LF2) -BEMX = emxbind -bs gawk -p -# The following works with 0.9c or newer -#LEMXBND = $(CC) $(LF) -o a.out $(LDRSP) gawk.def -lbsd $(LF2) -#BEMX = emxbind -bs -o $@ a.out -p -#BEMX = emxbind -bs /emx/bin/emx.exe a.out $@ -p -BEMXD = emxbind -b -o $@ a.out -p - -emx: - $(MAK) all \ - "CC=gcc -Zomf" O=.obj "CF=-O -DOS2" \ - LNK=LEMX "LF=-s -Zcrtdll -Zstack 512" RSP= - -emxnt: - $(MAK) all \ - "CC=gcc -Zwin32 -Zcrtdll=rsxntcs" O=.o "CF=-O -DOS2" \ - LNK=LEMX "LF=-s -Zstack 512" RSP= - -emxbnd: - $(MAK) all \ - CC=gcc O=.o "CF=-O -DOS2 -DMSDOS" OBJ=popen.o \ - LNK=LEMXBND \ - BIND=BEMX "P=|tr \" \" \"\n\"" - -emxbnd-debug: - $(MAK) all \ - CC=gcc O=.o "CF=-g -DOS2 -DMSDOS" OBJ=popen.o \ - LNK=LEMXBND \ - BIND=BEMXD "P=|tr \" \" \"\n\"" - #======================================================================== #========================== MINGW32 ===================================== #======================================================================== diff --git a/pc/config.h b/pc/config.h index 7896a73f..bec42cfa 100644 --- a/pc/config.h +++ b/pc/config.h @@ -298,9 +298,6 @@ /* Define to 1 if you have the `strncasecmp' function. */ #define HAVE_STRNCASECMP 1 -#ifdef __EMX__ -#define strncasecmp strnicmp -#endif /* Define to 1 if you have the header file. */ #undef HAVE_STROPTS_H @@ -711,8 +708,3 @@ extern bool is_valid_identifier(const char *name); #ifndef __DJGPP__ #define HAVE_POPEN_H 1 #endif - -#if defined(__EMX__) -#define strcasecmp stricmp -#define strncasecmp strnicmp -#endif diff --git a/pc/config.sed b/pc/config.sed index e194fdcb..4547a842 100644 --- a/pc/config.sed +++ b/pc/config.sed @@ -183,9 +183,6 @@ s/^#undef HAVE_STRINGS_H *$/#define HAVE_STRINGS_H 1/ s/^#undef HAVE_STRING_H *$/#define HAVE_STRING_H 1/ /^#undef HAVE_STRNCASECMP *$/c\ #define HAVE_STRNCASECMP 1\ -#ifdef __EMX__\ -#define strncasecmp strnicmp\ -#endif s/^#undef HAVE_STRTOD *$/#define HAVE_STRTOD 1/ /^#undef HAVE_STRTOUL *$/c\ #if defined(__MINGW32__) || defined(__DJGPP__)\ @@ -326,9 +323,4 @@ extern bool is_valid_identifier(const char *name);\ \ #ifndef __DJGPP__\ #define HAVE_POPEN_H 1\ -#endif\ -\ -#if defined(__EMX__)\ -#define strcasecmp stricmp\ -#define strncasecmp strnicmp\ #endif diff --git a/pc/gawkmisc.pc b/pc/gawkmisc.pc index 149ea62c..813c201a 100644 --- a/pc/gawkmisc.pc +++ b/pc/gawkmisc.pc @@ -33,14 +33,6 @@ const char *defpath = ".;c:\\lib\\awk;c:\\gnu\\lib\\awk"; /* the Makefile should define DEFLIBPATH */ const char *deflibpath = DEFLIBPATH; -#ifdef __EMX__ -#include - -static int _os2_is_abs_path(const char *dirname); -static char* _os2_unixroot(const char *path); -static const char* _os2_unixroot_path(const char *path); -#endif - #ifdef __MINGW32__ #ifdef HAVE_SOCKETS #include @@ -123,17 +115,6 @@ os_arg_fixup(argcp, argvp) int *argcp; char ***argvp; { -#ifdef __EMX__ -# ifdef initialize_main - initialize_main(argcp, argvp); -# else - _wildcard(argcp, argvp); - _response(argcp, argvp); -# endif - - setvbuf(stdout, NULL, _IOLBF, BUFSIZ); - defpath = (char*) _os2_unixroot_path(defpath); -#endif /* __EMX__ */ return; } @@ -144,10 +125,6 @@ os_devopen(name, flag) const char *name; int flag; { -#ifdef __EMX__ - /* do not use open(name, flag) here !!! */ - return -1; -#else if (strcmp(name, "/dev/null") == 0) return open("NUL", flag); /* FIXME: */ @@ -155,7 +132,6 @@ int flag; * return open("???", flag); */ return -1; -#endif } /* optimal_bufsize --- determine optimal buffer size */ @@ -190,10 +166,6 @@ int ispath(file) const char *file; { -#ifdef __EMX__ - return (strpbrk(file, "/\\") != NULL || - (toupper(file[0]) >= 'A' && toupper(file[0]) <= 'Z' && file[1] == ':')); -#else for (; *file; file++) { switch (*file) { case '/': @@ -203,7 +175,6 @@ const char *file; } } return 0; -#endif } /* isdirpunct --- return true if char is a directory separator */ @@ -222,7 +193,7 @@ os_close_on_exec(fd, name, what, dir) int fd; const char *name, *what, *dir; { -#if (defined(__DJGPP__) && (__DJGPP__ > 2 || __DJGPP_MINOR__ >= 4)) || defined __EMX__ +#if (defined(__DJGPP__) && (__DJGPP__ > 2 || __DJGPP_MINOR__ >= 4)) if (fd <= 2) /* sanity */ return; @@ -283,16 +254,7 @@ os_isreadable(const awk_input_buf_t *iobuf, bool *isdir) int os_is_setuid() { -#ifdef __EMX__ - long uid, euid; - - uid = getuid(); - euid = geteuid(); - - return (euid == 0 && euid != uid); -#else return 0; -#endif } /* os_setbinmode --- set binary mode on file */ @@ -377,225 +339,6 @@ files_are_same(char *path, SRCFILE *src) return 0; } - -#ifdef __EMX__ -# ifndef PATH_SEPARATOR -# define PATH_SEPARATOR ';' -# endif - -/* result is 0 if dirname is no absolute path, 1 otherwise */ - -static int -_os2_is_abs_path(const char *dirname) -{ - int result = 0; - if (dirname != NULL && dirname[0] != '\0') { - /* if dirname contains a valid drive letter like "c:" */ - if (((dirname[0] >= 'A' && dirname[0] <= 'Z') || (dirname[0] >= 'a' && dirname[0] <= 'z')) - && dirname[1] == ':') dirname += 2; /* remove the drive letter */ - - if (dirname[0] == '/' || dirname[0] == '\\') result = 1; /* asbolute path */ - } - - return result; -} - - -/* path is assumed to be a list of directories separated by PATH_SEPARATOR. - This function determines if the first directory of path is on the - drive specified by the environment variable UNIXROOT. - If it is the case, NULL is returned, otherwise a new directory name - is allocated using the drive letter from UNIXROOT and returned as result. - If the first directory is a relative path NULL is returned, too. - The new directory name is allocated by malloc(). - Example (UNIXROOT is set to "e:"): - "c:/usr/share" -> "e:/usr/share" - "e:/usr/share" -> NULL (already on the $UNIXROOT drive) - "/usr/share" -> "e:/usr/share" - "." -> NULL (not an absolute path) - "usr/share" -> NULL (not an absolute path) - "c:usr/share" -> NULL (not an absolute path) - "c:/usr/share;d:/etc" -> "e:/usr/share" (only the first directory in path is used) */ - -static char* -_os2_unixroot(const char *path) -{ - static const char *unixroot = NULL; - static int unixroot_init = 0; - char *result = NULL; - - if (unixroot_init == 0) { - /* get $UNIXROOT only one time */ - unixroot = getenv("UNIXROOT"); - - /* check whether unixroot is valid (must be "x:") */ - if (unixroot != NULL) { - int drive = toupper(unixroot[0]); - if (drive < 'A' || drive > 'Z' || unixroot[1] != ':' || unixroot[2] != '\0') - unixroot = NULL; /* unixroot not valid */ - } - - unixroot_init = 1; /* initialized */ - } - - /* note: if unixroot != NULL then it contains a valid drive letter */ - if (unixroot != NULL && _os2_is_abs_path(path)) { - /* dirname is an absolute path and unixroot is a drive letter, "c:" for example */ - size_t old_path_len = strlen(path); - - /* end points to the first ';' in path or to NULL */ - const char *end = strchr(path, PATH_SEPARATOR); - - /* dir_len is the length of the first directory in path */ - size_t dir_len = (end) ? end - path : old_path_len; - - if (toupper(unixroot[0]) != toupper(path[0]) || path[1] != ':') { - /* the first directory of path does not start with the string $UNIXROOT */ - if (path[1] == ':') { - /* if there is a drive letter remove it */ - dir_len -= 2; - path += 2; - } - - result = malloc(dir_len + 3); - if (result) { /* do nothing if we are out of memory */ - result[0] = unixroot[0]; - result[1] = unixroot[1]; - memcpy(result + 2, path, dir_len); - result[dir_len + 2] = '\0'; - } - } - } - return result; -} - -/* path is assumed to be a list of directories separated by PATH_SEPARATOR. - Every directory is processed. _os2_unixroot() is used to find out whether - these directories are on the drive specified by the environment variable - UNIXROOT. If this is not the case the same directory on the UNIXROOT drive - is added to the end of path. If path is a valid path this function returns a valid path, too. - Example ($UNIXROOT is set to "e:"): - ".;c:/usr/local;d:/usr/local;d:/etc;e:/etc" - -> ".;c:/usr/local;d:/usr/local;d:/etc;e:/etc;e:/usr/local;e:/usr/local;e:/etc" */ - -static const char* -_os2_unixroot_path(const char *path) -{ - char *result = NULL; - const char *p = path; - unsigned dir_count = 1; - - if (path == NULL || path[0] == '\0') return NULL; /* empty path */ - - /* save number of path components in dir_count */ - while(*p) { - if (*p++ == PATH_SEPARATOR && *p != '\0' && *p != PATH_SEPARATOR) - dir_count += 1; - } - - { - const char *list[dir_count]; /* list of char pointers */ - size_t dir_len[dir_count]; /* the according directory length */ - size_t old_path_len = strlen(path); /* the old path length */ - size_t total_len; - unsigned i = 0; - - if (path[old_path_len - 1] == PATH_SEPARATOR) /* last character is ';' */ - old_path_len--; - - list[0] = p = path; /* first directory */ - - while(*p) { - if (*p++ == PATH_SEPARATOR && *p != '\0' && *p != PATH_SEPARATOR) - list[++i] = p; - } - /* now list[i] contains the ith directory of path (no 0-terminated strings!!!) */ - - /* determine the total length for the new path */ - total_len = old_path_len; - - for(i = 0; i < dir_count; i++) { - list[i] = _os2_unixroot(list[i]); - if (list[i] != NULL) { - dir_len[i] = strlen(list[i]); - total_len += dir_len[i] + 1; /* one character for ';' or '\0' */ - } - else dir_len[i] = 0; - } - /* now list[] contains the according directories on the UNIXROOT drive or NULL - total_len contains the total length for the new path */ - result = malloc(total_len + 1); - - if (result) { - /* copy the old path and the new directories into the new path */ - char *q = result; - memcpy(q, path, old_path_len); - q += old_path_len; - - for(i = 0; i < dir_count; i++) { - if (dir_len[i] != 0) { - *q++ = PATH_SEPARATOR; - memcpy(q, list[i], dir_len[i]); - q += dir_len[i]; - } - } - - *q = '\0'; /* terminating '\0' */ - } - - for(i = 0; i < dir_count; i++) free((void*) list[i]); - } - - return (result) ? (const char*) result : path; -} - -/* limit a length of DLL name up to 8 characters. If dst is not enough for - a fixed dll name, it is truncated. */ -char *os2_fixdllname(char *dst, const char *src, size_t n) -{ - char drive[_MAX_DRIVE]; - char dir[_MAX_DIR]; - char name[_MAX_FNAME]; - char ext[_MAX_EXT]; - char dll_file[_MAX_PATH]; - - _splitpath(src, drive, dir, name, ext); - if (strlen(name) > 8) - name[8] = '\0'; - _makepath(dll_file, drive, dir, name, ext); - - strncpy(dst, dll_file, n); - dst[n - 1] = '\0'; - - return dst; -} - -#ifdef __KLIBC__ - -/* replacement of dlopen(). This limits a length of a base name up to 8 - characters. */ -void *os2_dlopen(const char *file, int mode) -{ - char dll_file[strlen(file) + 1]; - - return (dlopen)(os2_fixdllname(dll_file, file, sizeof(dll_file)), mode); -} - -/* replacement of dlsym(). This prepends '_' to name. */ -void *os2_dlsym(void *handle, const char *name) -{ - char sym[strlen(name) + 1 + 1]; /* 1 for '_', 1 for NUL */ - - sym[0] = '_'; - strcpy(sym + 1, name); - - return (dlsym)(handle, sym); -} - -#endif /* __KLIBC__ */ - -#endif /* __EMX__ */ - #ifdef __MINGW32__ extern void *xmalloc (size_t); @@ -1091,12 +834,12 @@ os_maybe_set_errno (void) #endif /* __MINGW32__ */ -#if defined(__DJGPP__) || defined(__MINGW32__) || defined(__EMX__) +#if defined(__DJGPP__) || defined(__MINGW32__) void init_sockets(void) { -#if defined(HAVE_SOCKETS) && !defined(__EMX__) +#if defined(HAVE_SOCKETS) WSADATA winsockData; int errcode; -- cgit v1.2.1 From 37989990f95388b07ca727d9cda9c0a540d27f9a Mon Sep 17 00:00:00 2001 From: "Arnold D. Robbins" Date: Tue, 5 Jul 2022 11:20:13 +0300 Subject: Doc updates. --- README_d/ChangeLog | 2 +- doc/ChangeLog | 5 ++ doc/gawk.info | 166 +++++++++++++++++++++++++++++------------------------ doc/gawk.texi | 35 +++++++++++ doc/gawktexi.in | 35 +++++++++++ 5 files changed, 168 insertions(+), 75 deletions(-) diff --git a/README_d/ChangeLog b/README_d/ChangeLog index 75bf9693..4d6c933b 100644 --- a/README_d/ChangeLog +++ b/README_d/ChangeLog @@ -2,7 +2,7 @@ * README.gcc-3: Deleted. * README.mpfr: Updated. - * README.os: Removed. + * README.os2: Removed. * README.pc: Updated. 2021-10-27 Arnold D. Robbins diff --git a/doc/ChangeLog b/doc/ChangeLog index 7963cc16..1bf2ed3f 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -1,3 +1,8 @@ +2022-07-04 Arnold D. Robbins + + * gawktexi.in (POSIX/GNU): Updated. + (Feature History): Updated. + 2022-07-03 Arnold D. Robbins * gawktexi.in: Remove stuff related to OS/2. diff --git a/doc/gawk.info b/doc/gawk.info index 638f2195..e8dead37 100644 --- a/doc/gawk.info +++ b/doc/gawk.info @@ -30052,6 +30052,11 @@ current version of 'gawk'. - GNU/Linux on Alpha + * Support for the following systems was removed from the code for + 'gawk' version 5.2: + + - OS/2 +  File: gawk.info, Node: Feature History, Next: Common Extensions, Prev: POSIX/GNU, Up: Language History @@ -30548,6 +30553,19 @@ unfortunately. It added the following features: * Handling of Infinity and NaN values were improved. *Note Math Definitions::, and also see *note POSIX Floating Point Problems::. + Version 5.2 added the following features: + + * The 'mkbool()' built-in function (*note Boolean Functions::). + + * Interval expressions in regular expressions are enabled by default + (*note Interval Expressions::). + + * The 'gawkbug' script for reporting bugs (*note Bug address::). + + * Terence Kelly's persistent memory allocator (PMA) was added, + allowing the use of persistent data on certain systems (*note + Persistent Memory::). +  File: gawk.info, Node: Common Extensions, Next: Ranges and Locales, Prev: Feature History, Up: Language History @@ -39526,80 +39544,80 @@ Node: SVR41205698 Node: POSIX1207132 Node: BTL1208513 Node: POSIX/GNU1209242 -Node: Feature History1215020 -Node: Common Extensions1232195 -Node: Ranges and Locales1233478 -Ref: Ranges and Locales-Footnote-11238094 -Ref: Ranges and Locales-Footnote-21238121 -Ref: Ranges and Locales-Footnote-31238356 -Node: Contributors1238579 -Node: History summary1244576 -Node: Installation1245956 -Node: Gawk Distribution1246900 -Node: Getting1247384 -Node: Extracting1248347 -Node: Distribution contents1249985 -Node: Unix Installation1257046 -Node: Quick Installation1257850 -Node: Compiling with MPFR1260270 -Node: Shell Startup Files1260960 -Node: Additional Configuration Options1262049 -Node: Configuration Philosophy1264364 -Node: Compiling from Git1266760 -Node: Building the Documentation1267315 -Node: Non-Unix Installation1268699 -Node: PC Installation1269159 -Node: PC Binary Installation1269997 -Node: PC Compiling1270870 -Node: PC Using1271987 -Node: Cygwin1275540 -Node: MSYS1276764 -Node: VMS Installation1277366 -Node: VMS Compilation1278085 -Ref: VMS Compilation-Footnote-11279314 -Node: VMS Dynamic Extensions1279372 -Node: VMS Installation Details1281057 -Node: VMS Running1283319 -Node: VMS GNV1287598 -Node: Bugs1288312 -Node: Bug definition1289224 -Node: Bug address1292160 -Node: Usenet1295348 -Node: Performance bugs1296537 -Node: Asking for help1299458 -Node: Maintainers1301425 -Node: Other Versions1302526 -Node: Installation summary1310796 -Node: Notes1312160 -Node: Compatibility Mode1312954 -Node: Additions1313736 -Node: Accessing The Source1314661 -Node: Adding Code1316098 -Node: New Ports1322913 -Node: Derived Files1327288 -Ref: Derived Files-Footnote-11332948 -Ref: Derived Files-Footnote-21332983 -Ref: Derived Files-Footnote-31333581 -Node: Future Extensions1333695 -Node: Implementation Limitations1334353 -Node: Extension Design1335563 -Node: Old Extension Problems1336707 -Ref: Old Extension Problems-Footnote-11338225 -Node: Extension New Mechanism Goals1338282 -Ref: Extension New Mechanism Goals-Footnote-11341646 -Node: Extension Other Design Decisions1341835 -Node: Extension Future Growth1343948 -Node: Notes summary1344554 -Node: Basic Concepts1345712 -Node: Basic High Level1346393 -Ref: figure-general-flow1346675 -Ref: figure-process-flow1347361 -Ref: Basic High Level-Footnote-11350663 -Node: Basic Data Typing1350848 -Node: Glossary1354176 -Node: Copying1386063 -Node: GNU Free Documentation License1423606 -Node: Index1448726 +Node: Feature History1215131 +Node: Common Extensions1232760 +Node: Ranges and Locales1234043 +Ref: Ranges and Locales-Footnote-11238659 +Ref: Ranges and Locales-Footnote-21238686 +Ref: Ranges and Locales-Footnote-31238921 +Node: Contributors1239144 +Node: History summary1245141 +Node: Installation1246521 +Node: Gawk Distribution1247465 +Node: Getting1247949 +Node: Extracting1248912 +Node: Distribution contents1250550 +Node: Unix Installation1257611 +Node: Quick Installation1258415 +Node: Compiling with MPFR1260835 +Node: Shell Startup Files1261525 +Node: Additional Configuration Options1262614 +Node: Configuration Philosophy1264929 +Node: Compiling from Git1267325 +Node: Building the Documentation1267880 +Node: Non-Unix Installation1269264 +Node: PC Installation1269724 +Node: PC Binary Installation1270562 +Node: PC Compiling1271435 +Node: PC Using1272552 +Node: Cygwin1276105 +Node: MSYS1277329 +Node: VMS Installation1277931 +Node: VMS Compilation1278650 +Ref: VMS Compilation-Footnote-11279879 +Node: VMS Dynamic Extensions1279937 +Node: VMS Installation Details1281622 +Node: VMS Running1283884 +Node: VMS GNV1288163 +Node: Bugs1288877 +Node: Bug definition1289789 +Node: Bug address1292725 +Node: Usenet1295913 +Node: Performance bugs1297102 +Node: Asking for help1300023 +Node: Maintainers1301990 +Node: Other Versions1303091 +Node: Installation summary1311361 +Node: Notes1312725 +Node: Compatibility Mode1313519 +Node: Additions1314301 +Node: Accessing The Source1315226 +Node: Adding Code1316663 +Node: New Ports1323478 +Node: Derived Files1327853 +Ref: Derived Files-Footnote-11333513 +Ref: Derived Files-Footnote-21333548 +Ref: Derived Files-Footnote-31334146 +Node: Future Extensions1334260 +Node: Implementation Limitations1334918 +Node: Extension Design1336128 +Node: Old Extension Problems1337272 +Ref: Old Extension Problems-Footnote-11338790 +Node: Extension New Mechanism Goals1338847 +Ref: Extension New Mechanism Goals-Footnote-11342211 +Node: Extension Other Design Decisions1342400 +Node: Extension Future Growth1344513 +Node: Notes summary1345119 +Node: Basic Concepts1346277 +Node: Basic High Level1346958 +Ref: figure-general-flow1347240 +Ref: figure-process-flow1347926 +Ref: Basic High Level-Footnote-11351228 +Node: Basic Data Typing1351413 +Node: Glossary1354741 +Node: Copying1386628 +Node: GNU Free Documentation License1424171 +Node: Index1449291  End Tag Table diff --git a/doc/gawk.texi b/doc/gawk.texi index 9a276ad9..67a12eba 100644 --- a/doc/gawk.texi +++ b/doc/gawk.texi @@ -41080,9 +41080,22 @@ MirBSD GNU/Linux on Alpha @end itemize +@item +Support for the following systems was removed from the code +for @command{gawk} @value{PVERSION} 5.2: + + +@c nested table +@itemize @value{MINUS} +@item +OS/2 + +@c add more removed systems here + @end itemize @c XXX ADD MORE STUFF HERE +@end itemize @c This does not need to be in the formal book. @@ -41875,6 +41888,28 @@ Handling of Infinity and NaN values were improved. @ref{POSIX Floating Point Problems}. @end itemize +Version 5.2 added the following features: + +@itemize +@item +The @code{mkbool()} built-in function +(@pxref{Boolean Functions}). + +@item +Interval expressions in regular expressions are +enabled by default (@pxref{Interval Expressions}). + +@item +The @command{gawkbug} script for reporting bugs +(@pxref{Bug address}). + +@item +Terence Kelly's persistent memory allocator (PMA) was +added, allowing the use of persistent data on certain systems +(@pxref{Persistent Memory}). + +@end itemize + @c XXX ADD MORE STUFF HERE @end ifclear diff --git a/doc/gawktexi.in b/doc/gawktexi.in index 19476ea8..d72665a0 100644 --- a/doc/gawktexi.in +++ b/doc/gawktexi.in @@ -39923,9 +39923,22 @@ MirBSD GNU/Linux on Alpha @end itemize +@item +Support for the following systems was removed from the code +for @command{gawk} @value{PVERSION} 5.2: + + +@c nested table +@itemize @value{MINUS} +@item +OS/2 + +@c add more removed systems here + @end itemize @c XXX ADD MORE STUFF HERE +@end itemize @c This does not need to be in the formal book. @@ -40718,6 +40731,28 @@ Handling of Infinity and NaN values were improved. @ref{POSIX Floating Point Problems}. @end itemize +Version 5.2 added the following features: + +@itemize +@item +The @code{mkbool()} built-in function +(@pxref{Boolean Functions}). + +@item +Interval expressions in regular expressions are +enabled by default (@pxref{Interval Expressions}). + +@item +The @command{gawkbug} script for reporting bugs +(@pxref{Bug address}). + +@item +Terence Kelly's persistent memory allocator (PMA) was +added, allowing the use of persistent data on certain systems +(@pxref{Persistent Memory}). + +@end itemize + @c XXX ADD MORE STUFF HERE @end ifclear -- cgit v1.2.1 From 628b387658b5704cc711e106459ed3bee37ef600 Mon Sep 17 00:00:00 2001 From: "Arnold D. Robbins" Date: Wed, 6 Jul 2022 15:26:09 +0300 Subject: Remove DJGPP support. --- ChangeLog | 6 + README | 4 - awk.h | 4 +- custom.h | 2 - doc/ChangeLog | 6 + doc/gawk.info | 883 +++++++++++++++++++++++++------------------------- doc/gawk.texi | 17 +- doc/gawktexi.in | 19 +- doc/wordlist | 1 - doc/wordlist3 | 1 + eval.c | 2 - gawkmisc.c | 6 +- io.c | 10 +- main.c | 2 - missing_d/ChangeLog | 4 + missing_d/snprintf.c | 2 +- nonposix.h | 11 +- pc/ChangeLog | 6 + pc/GenMakefileTst.awk | 16 +- pc/Makefile | 51 --- pc/Makefile.tst | 70 +--- pc/config.h | 104 ++---- pc/config.sed | 104 ++---- pc/gawkmisc.pc | 59 +--- pc/getid.c | 4 +- pc/popen.h | 6 +- profile.c | 5 - re.c | 2 +- replace.c | 4 - test/ChangeLog | 4 + test/Makefile.am | 11 +- test/Makefile.in | 12 +- 32 files changed, 564 insertions(+), 874 deletions(-) diff --git a/ChangeLog b/ChangeLog index 94f43869..acfb88f8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2022-07-06 Arnold D. Robbins + + * README: Updated. Remove mention of DJGPP. + * awk.h, custom.h, eval.c, gawkmisc.c, io.c, main.c, nonposix.h, + re.c, replace.c: Remove all code for __DJGPP__. + 2022-07-03 Arnold D. Robbins * README: Updated. Remove mention of OS/2. diff --git a/README b/README index 1c9d52af..599154d3 100644 --- a/README +++ b/README @@ -87,10 +87,6 @@ Arnold Robbins BUG REPORTS AND FIXES, non-Unix systems: -MS-DOS with DJGPP: - Juan Manuel Guerrero - juan.guerrero@gmx.de - MS-Windows with MinGW: Eli Zaretskii eliz@gnu.org diff --git a/awk.h b/awk.h index 0da24149..67562f4e 100644 --- a/awk.h +++ b/awk.h @@ -169,9 +169,9 @@ extern void *memset_ulong(void *dest, int val, unsigned long l); #define fwrite fwrite_unlocked #endif /* HAVE_FWRITE_UNLOCKED */ -#if defined(__DJGPP__) || defined(__MINGW32__) +#if defined(__MINGW32__) #include "nonposix.h" -#endif /* defined(__DJGPP__) || defined(__MINGW32__) */ +#endif /* defined(__MINGW32__) */ /* use this as lintwarn("...") this is a hack but it gives us the right semantics */ diff --git a/custom.h b/custom.h index ace6c81b..67d0d1f0 100644 --- a/custom.h +++ b/custom.h @@ -112,8 +112,6 @@ typedef unsigned long long uint_fast64_t; #define xirealloc xrealloc #define ximalloc xmalloc -#include "mbsupport.h" /* defines stuff for DJGPP to fake MBS */ - #ifdef USE_PERSISTENT_MALLOC #include #include "pma.h" diff --git a/doc/ChangeLog b/doc/ChangeLog index 1bf2ed3f..bf386be7 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -1,3 +1,9 @@ +2022-07-06 Arnold D. Robbins + + * gawktexi.in: Remove stuff related to DJGPP. + (POSIX/GNU): Updated. + * wordlist, wordlist3: Updated. + 2022-07-04 Arnold D. Robbins * gawktexi.in (POSIX/GNU): Updated. diff --git a/doc/gawk.info b/doc/gawk.info index e8dead37..16af2c5b 100644 --- a/doc/gawk.info +++ b/doc/gawk.info @@ -11434,10 +11434,8 @@ they are not special: This element gives a string indicating the platform for which 'gawk' was compiled. The value will be one of the following: - '"djgpp"' '"mingw"' - Microsoft Windows, using either DJGPP or MinGW, - respectively. + Microsoft Windows, using MinGW. '"os390"' OS/390. @@ -30057,6 +30055,8 @@ current version of 'gawk'. - OS/2 + - DJGPP +  File: gawk.info, Node: Feature History, Next: Common Extensions, Prev: POSIX/GNU, Up: Language History @@ -31561,12 +31561,11 @@ File: gawk.info, Node: PC Using, Next: Cygwin, Prev: PC Compiling, Up: PC In B.3.1.3 Using 'gawk' on PC Operating Systems ............................................ -Information in this section applies to the MinGW and DJGPP ports of -'gawk'. *Note Cygwin:: for information about the Cygwin port. +Information in this section applies to the MinGW port of 'gawk'. *Note +Cygwin:: for information about the Cygwin port. Under MS-Windows, the MinGW environment supports both the '|&' -operator and TCP/IP networking (*note TCP/IP Networking::). The DJGPP -environment does not support '|&'. +operator and TCP/IP networking (*note TCP/IP Networking::). The MS-Windows version of 'gawk' searches for program files as described in *note AWKPATH Variable::. However, semicolons (rather than @@ -32310,8 +32309,6 @@ should be considered authoritative if it conflicts with this Info file. Unix and POSIX Arnold Robbins, systems -MS-DOS with DJGPP Juan Manuel Guerrero, - MS-Windows with MinGW Eli Zaretskii, VMS John Malmberg, @@ -32534,9 +32531,9 @@ B.6 Summary file. * 'gawk' may be built on non-POSIX systems as well. The currently - supported systems are MS-Windows using MSYS, MSYS2, DJGPP, MinGW, - and Cygwin, and both Vax/VMS and OpenVMS. Instructions for each - system are included in this major node. + supported systems are MS-Windows using MSYS, MSYS2, MinGW, and + Cygwin, 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 @@ -35684,7 +35681,7 @@ Index (line 19) * ; (semicolon), separating statements in actions <2>: Statements. (line 10) -* ; (semicolon), AWKPATH variable and: PC Using. (line 13) +* ; (semicolon), AWKPATH variable and: PC Using. (line 12) * < (left angle bracket), < operator (I/O): Getline/File. (line 6) * < (left angle bracket), < operator: Comparison Operators. (line 11) @@ -36060,7 +36057,7 @@ Index * AWKgo: Other Versions. (line 133) * AWKLIBPATH environment variable: AWKLIBPATH Variable. (line 6) * AWKPATH environment variable: AWKPATH Variable. (line 6) -* AWKPATH environment variable <1>: PC Using. (line 13) +* AWKPATH environment variable <1>: PC Using. (line 12) * awkprof.out file: Profiling. (line 6) * awksed.awk program: Simple Sed. (line 25) * awkvars.out file: Options. (line 97) @@ -36160,7 +36157,7 @@ Index * bindtextdomain() function (gawk), portability and: I18N Portability. (line 33) * BINMODE variable: User-modified. (line 15) -* BINMODE variable <1>: PC Using. (line 19) +* BINMODE variable <1>: PC Using. (line 18) * bit-manipulation functions: Bitwise Functions. (line 6) * bits2str() user-defined function: Bitwise Functions. (line 70) * bitwise, operations: Bitwise Functions. (line 6) @@ -36383,7 +36380,7 @@ Index * common extensions, length() applied to an array: String Functions. (line 214) * common extensions, func keyword: Definition Syntax. (line 99) -* common extensions, BINMODE variable: PC Using. (line 19) +* common extensions, BINMODE variable: PC Using. (line 18) * comp.lang.awk newsgroup: Usenet. (line 11) * comparison expressions: Typing and Comparison. (line 9) @@ -36525,7 +36522,7 @@ Index * dark corner, exit statement: Exit Statement. (line 30) * dark corner, value of ARGV[0]: Auto-set. (line 39) * dark corner, FILENAME variable <1>: Auto-set. (line 108) -* dark corner, FNR/NR variables: Auto-set. (line 406) +* dark corner, FNR/NR variables: Auto-set. (line 404) * dark corner, array subscripts: Uninitialized Subscripts. (line 43) * dark corner, regexp as second argument to index(): String Functions. @@ -36774,8 +36771,8 @@ Index * differences in awk and gawk, ERRNO variable: Auto-set. (line 87) * differences in awk and gawk, FUNCTAB variable: Auto-set. (line 134) * differences in awk and gawk, PROCINFO array: Auto-set. (line 148) -* differences in awk and gawk, RS/RT variables <3>: Auto-set. (line 345) -* differences in awk and gawk, SYMTAB variable: Auto-set. (line 349) +* differences in awk and gawk, RS/RT variables <3>: Auto-set. (line 343) +* differences in awk and gawk, SYMTAB variable: Auto-set. (line 347) * differences in awk and gawk, ARGC/ARGV variables: ARGC and ARGV. (line 89) * differences in awk and gawk, array elements, deleting: Delete. @@ -36791,7 +36788,7 @@ Index * differences in awk and gawk, indirect function calls: Indirect Calls. (line 6) * differences in awk and gawk, BINMODE variable <1>: PC Using. - (line 19) + (line 18) * directories, searching, for source files: AWKPATH Variable. (line 6) * directories, searching, for loadable extensions: AWKLIBPATH Variable. (line 6) @@ -36904,7 +36901,7 @@ Index * environment variables, LC_ALL: I18N Example. (line 68) * environment variables, LANG: I18N Example. (line 68) * environment variables, LC_MESSAGES: I18N Example. (line 68) -* environment variables, AWKPATH <1>: PC Using. (line 13) +* environment variables, AWKPATH <1>: PC Using. (line 12) * epoch, definition of: Glossary. (line 310) * equals sign (=), = operator: Assignment Ops. (line 6) * equals sign (=), == operator: Comparison Operators. @@ -36972,7 +36969,7 @@ Index * expressions, selecting: Conditional Exp. (line 6) * expressions, as patterns: Expression Patterns. (line 6) * Extended Regular Expressions (EREs): Bracket Expressions. (line 34) -* extension API, version number: Auto-set. (line 284) +* extension API, version number: Auto-set. (line 282) * extension API, interaction with namespaces: Namespace And Features. (line 22) * extension API: Extension API Description. @@ -37012,7 +37009,7 @@ Index * extensions, in gawk, not in POSIX awk: POSIX/GNU. (line 6) * extensions, Brian Kernighan's awk <1>: Common Extensions. (line 6) * extensions, mawk: Common Extensions. (line 6) -* extensions, common, BINMODE variable: PC Using. (line 19) +* extensions, common, BINMODE variable: PC Using. (line 18) * extract.awk program: Extract Program. (line 79) * extraction, of marked strings (internationalization): String Extraction. (line 6) @@ -37148,7 +37145,7 @@ Index (line 12) * FNR variable: Records. (line 6) * FNR variable <1>: Auto-set. (line 118) -* FNR variable, changing: Auto-set. (line 406) +* FNR variable, changing: Auto-set. (line 404) * for statement: For Statement. (line 6) * for statement, looping over arrays: Scanning an Array. (line 20) * fork() extension function: Extension Sample Fork. @@ -37312,9 +37309,9 @@ Index * gawk, ERRNO variable in <3>: Auto-set. (line 87) * gawk, FUNCTAB array in: Auto-set. (line 134) * gawk, PROCINFO array in <1>: Auto-set. (line 148) -* gawk, version of: Auto-set. (line 259) -* gawk, RT variable in <3>: Auto-set. (line 345) -* gawk, SYMTAB array in: Auto-set. (line 349) +* gawk, version of: Auto-set. (line 257) +* gawk, RT variable in <3>: Auto-set. (line 343) +* gawk, SYMTAB array in: Auto-set. (line 347) * gawk, IGNORECASE variable in <2>: Array Intro. (line 100) * gawk, function arguments and: Calling Built-in. (line 16) * gawk, IGNORECASE variable in <3>: String Functions. (line 57) @@ -37342,7 +37339,7 @@ Index (line 6) * gawk, configuring: Configuration Philosophy. (line 6) -* gawk, MS-Windows version of: PC Using. (line 13) +* gawk, MS-Windows version of: PC Using. (line 12) * gawk, VMS version of: VMS Installation. (line 6) * gawk, implementation issues: Notes. (line 6) * gawk, implementation issues, downward compatibility: Compatibility Mode. @@ -37758,7 +37755,7 @@ Index * mawk utility <2>: Concatenation. (line 36) * mawk utility <3>: Nextfile Statement. (line 47) * mawk utility <4>: Other Versions. (line 39) -* maximum precision supported by MPFR library: Auto-set. (line 273) +* maximum precision supported by MPFR library: Auto-set. (line 271) * McIlroy, Doug: Glossary. (line 255) * McPhee, Patrick T.J.: Contributors. (line 103) * memory, allocating for extensions: Memory Allocation Functions. @@ -37773,7 +37770,7 @@ Index * messages from extensions: Printing Messages. (line 6) * metacharacters, escape sequences for: Escape Sequences. (line 139) * metacharacters, in regular expressions: Regexp Operators. (line 6) -* minimum precision required by MPFR library: Auto-set. (line 276) +* minimum precision required by MPFR library: Auto-set. (line 274) * Minshall, Greg: Getopt Function. (line 105) * mkbool: Boolean Functions. (line 10) * mktime: Time Functions. (line 25) @@ -37870,7 +37867,7 @@ Index * not Boolean-logic operator: Boolean Ops. (line 6) * NR variable: Records. (line 6) * NR variable <1>: Auto-set. (line 143) -* NR variable, changing: Auto-set. (line 406) +* NR variable, changing: Auto-set. (line 404) * null strings, in gawk arguments, quoting and: Quoting. (line 82) * null strings, in gawk arguments, quoting and <1>: Other Arguments. (line 73) @@ -37987,7 +37984,7 @@ Index (line 39) * package, definition of: Global Namespace. (line 18) * Papadopoulos, Panos: Contributors. (line 131) -* parent process ID of gawk process: Auto-set. (line 248) +* parent process ID of gawk process: Auto-set. (line 246) * parentheses (), regexp operator: Regexp Operator Details. (line 77) * parentheses (), in a profile: Profiling. (line 146) @@ -38186,8 +38183,8 @@ Index * printing, mailing labels: Labels Program. (line 6) * printing, messages from extensions: Printing Messages. (line 6) * private variables: Library Names. (line 11) -* process group ID of gawk process: Auto-set. (line 242) -* process ID of gawk process: Auto-set. (line 245) +* process group ID of gawk process: Auto-set. (line 240) +* process ID of gawk process: Auto-set. (line 243) * processes, two-way communications with: Two-way I/O. (line 6) * processing data: Basic High Level. (line 6) * PROCINFO array: Auto-set. (line 148) @@ -38377,7 +38374,7 @@ Index * right angle bracket (>), >> operator (I/O) <1>: Precedence. (line 64) * right shift, bitwise: Bitwise Functions. (line 33) * Ritchie, Dennis: Basic Data Typing. (line 54) -* RLENGTH variable: Auto-set. (line 332) +* RLENGTH variable: Auto-set. (line 330) * RLENGTH variable, match() function and: String Functions. (line 241) * Robbins, Miriam: Acknowledgments. (line 94) * Robbins, Jean: Acknowledgments. (line 94) @@ -38407,12 +38404,12 @@ Index * RS variable, multiline records and: Multiple Line. (line 17) * RS variable <1>: User-modified. (line 135) * rshift: Bitwise Functions. (line 55) -* RSTART variable: Auto-set. (line 338) +* RSTART variable: Auto-set. (line 336) * RSTART variable, match() function and: String Functions. (line 241) * RT variable: awk split records. (line 118) * RT variable <1>: gawk split records. (line 66) * RT variable <2>: Multiple Line. (line 138) -* RT variable <3>: Auto-set. (line 345) +* RT variable <3>: Auto-set. (line 343) * Rubin, Paul: History. (line 30) * Rubin, Paul <1>: Contributors. (line 16) * rule, definition of: Getting Started. (line 21) @@ -38430,7 +38427,7 @@ Index * scanning arrays: Scanning an Array. (line 6) * scanning multidimensional arrays: Multiscanning. (line 11) * Schorr, Andrew: Acknowledgments. (line 60) -* Schorr, Andrew <1>: Auto-set. (line 376) +* Schorr, Andrew <1>: Auto-set. (line 374) * Schorr, Andrew <2>: Contributors. (line 136) * Schreiber, Bert: Acknowledgments. (line 38) * Schreiber, Rita: Acknowledgments. (line 38) @@ -38440,8 +38437,8 @@ Index * search paths, for loadable extensions: AWKLIBPATH Variable. (line 6) * search paths: Programs Exercises. (line 70) * search paths, for source files <1>: Programs Exercises. (line 70) -* search paths <1>: PC Using. (line 13) -* search paths, for source files <2>: PC Using. (line 13) +* search paths <1>: PC Using. (line 12) +* search paths, for source files <2>: PC Using. (line 12) * search paths <2>: VMS Running. (line 57) * search paths, for source files <3>: VMS Running. (line 57) * searching, files for regular expressions: Egrep Program. (line 6) @@ -38457,7 +38454,7 @@ Index (line 19) * semicolon (;), separating statements in actions <2>: Statements. (line 10) -* semicolon (;), AWKPATH variable and: PC Using. (line 13) +* semicolon (;), AWKPATH variable and: PC Using. (line 12) * separators, for records: awk split records. (line 6) * separators, for records <1>: awk split records. (line 85) * separators, for records, regular expressions as: awk split records. @@ -38554,7 +38551,7 @@ Index * sidebar, Syntactic Ambiguities Between /= and Regular Expressions: Assignment Ops. (line 148) * sidebar, Operator Evaluation Order: Increment Ops. (line 58) -* sidebar, Changing NR and FNR: Auto-set. (line 404) +* sidebar, Changing NR and FNR: Auto-set. (line 402) * sidebar, Matching the Null String: String Functions. (line 561) * sidebar, Interactive Versus Noninteractive Buffering: I/O Functions. (line 73) @@ -38712,9 +38709,9 @@ Index * substr: String Functions. (line 499) * substring: String Functions. (line 499) * Sumner, Andrew: Other Versions. (line 64) -* supplementary groups of gawk process: Auto-set. (line 289) +* supplementary groups of gawk process: Auto-set. (line 287) * switch statement: Switch Statement. (line 6) -* SYMTAB array: Auto-set. (line 349) +* SYMTAB array: Auto-set. (line 347) * syntactic ambiguity: /= operator vs. /=.../ regexp constant: Assignment Ops. (line 150) * system: I/O Functions. (line 105) @@ -38933,10 +38930,10 @@ Index * variables, global, for library functions: Library Names. (line 11) * variables, private: Library Names. (line 11) * variables <1>: Basic Data Typing. (line 6) -* version of, gawk: Auto-set. (line 259) -* version of, GNU MP library: Auto-set. (line 267) -* version of, GNU MPFR library: Auto-set. (line 269) -* version of, gawk extension API: Auto-set. (line 284) +* version of, gawk: Auto-set. (line 257) +* version of, GNU MP library: Auto-set. (line 265) +* version of, GNU MPFR library: Auto-set. (line 267) +* version of, gawk extension API: Auto-set. (line 282) * vertical bar (|): Regexp Operator Details. (line 66) * vertical bar (|), | operator (I/O): Getline/Pipe. (line 10) @@ -39223,401 +39220,401 @@ Node: Exit Statement469789 Node: Built-in Variables472192 Node: User-modified473325 Node: Auto-set481092 -Ref: Auto-set-Footnote-1497859 -Ref: Auto-set-Footnote-2498065 -Node: ARGC and ARGV498121 -Node: Pattern Action Summary502334 -Node: Arrays504764 -Node: Array Basics506093 -Node: Array Intro506937 -Ref: figure-array-elements508912 -Ref: Array Intro-Footnote-1511617 -Node: Reference to Elements511745 -Node: Assigning Elements514209 -Node: Array Example514700 -Node: Scanning an Array516654 -Node: Controlling Scanning519676 -Ref: Controlling Scanning-Footnote-1526132 -Node: Numeric Array Subscripts526448 -Node: Uninitialized Subscripts528632 -Node: Delete530251 -Ref: Delete-Footnote-1533003 -Node: Multidimensional533060 -Node: Multiscanning536155 -Node: Arrays of Arrays537746 -Node: Arrays Summary542514 -Node: Functions544607 -Node: Built-in545645 -Node: Calling Built-in546798 -Node: Boolean Functions548794 -Node: Numeric Functions549348 -Ref: Numeric Functions-Footnote-1553375 -Ref: Numeric Functions-Footnote-2554023 -Ref: Numeric Functions-Footnote-3554071 -Node: String Functions554343 -Ref: String Functions-Footnote-1579185 -Ref: String Functions-Footnote-2579313 -Ref: String Functions-Footnote-3579561 -Node: Gory Details579648 -Ref: table-sub-escapes581439 -Ref: table-sub-proposed582959 -Ref: table-posix-sub584323 -Ref: table-gensub-escapes585865 -Ref: Gory Details-Footnote-1586689 -Node: I/O Functions586843 -Ref: table-system-return-values593297 -Ref: I/O Functions-Footnote-1595378 -Ref: I/O Functions-Footnote-2595526 -Node: Time Functions595646 -Ref: Time Functions-Footnote-1606317 -Ref: Time Functions-Footnote-2606385 -Ref: Time Functions-Footnote-3606543 -Ref: Time Functions-Footnote-4606654 -Ref: Time Functions-Footnote-5606766 -Ref: Time Functions-Footnote-6606993 -Node: Bitwise Functions607259 -Ref: table-bitwise-ops607853 -Ref: Bitwise Functions-Footnote-1613917 -Ref: Bitwise Functions-Footnote-2614090 -Node: Type Functions614281 -Node: I18N Functions617701 -Node: User-defined619352 -Node: Definition Syntax620164 -Ref: Definition Syntax-Footnote-1625858 -Node: Function Example625929 -Ref: Function Example-Footnote-1628851 -Node: Function Calling628873 -Node: Calling A Function629461 -Node: Variable Scope630419 -Node: Pass By Value/Reference633413 -Node: Function Caveats636057 -Ref: Function Caveats-Footnote-1638104 -Node: Return Statement638224 -Node: Dynamic Typing641203 -Node: Indirect Calls642133 -Node: Functions Summary653060 -Node: Library Functions655765 -Ref: Library Functions-Footnote-1659372 -Ref: Library Functions-Footnote-2659515 -Node: Library Names659686 -Ref: Library Names-Footnote-1663353 -Ref: Library Names-Footnote-2663576 -Node: General Functions663662 -Node: Strtonum Function664844 -Node: Assert Function667866 -Node: Round Function671192 -Node: Cliff Random Function672732 -Node: Ordinal Functions673748 -Ref: Ordinal Functions-Footnote-1676811 -Ref: Ordinal Functions-Footnote-2677063 -Node: Join Function677273 -Ref: Join Function-Footnote-1679043 -Node: Getlocaltime Function679243 -Node: Readfile Function682985 -Node: Shell Quoting684962 -Node: Isnumeric Function686390 -Node: Data File Management687778 -Node: Filetrans Function688410 -Node: Rewind Function692506 -Node: File Checking694415 -Ref: File Checking-Footnote-1695749 -Node: Empty Files695950 -Node: Ignoring Assigns697929 -Node: Getopt Function699479 -Ref: Getopt Function-Footnote-1714776 -Node: Passwd Functions714976 -Ref: Passwd Functions-Footnote-1723815 -Node: Group Functions723903 -Ref: Group Functions-Footnote-1731801 -Node: Walking Arrays732008 -Node: Library Functions Summary735016 -Node: Library Exercises736422 -Node: Sample Programs736887 -Node: Running Examples737657 -Node: Clones738385 -Node: Cut Program739609 -Node: Egrep Program749749 -Node: Id Program758750 -Node: Split Program768685 -Ref: Split Program-Footnote-1778578 -Node: Tee Program778751 -Node: Uniq Program781541 -Node: Wc Program789129 -Node: Bytes vs. Characters789516 -Node: Using extensions791064 -Node: wc program791818 -Node: Miscellaneous Programs796683 -Node: Dupword Program797896 -Node: Alarm Program799926 -Node: Translate Program804781 -Ref: Translate Program-Footnote-1809346 -Node: Labels Program809616 -Ref: Labels Program-Footnote-1812967 -Node: Word Sorting813051 -Node: History Sorting817123 -Node: Extract Program819348 -Node: Simple Sed827361 -Node: Igawk Program830435 -Ref: Igawk Program-Footnote-1844766 -Ref: Igawk Program-Footnote-2844968 -Ref: Igawk Program-Footnote-3845090 -Node: Anagram Program845205 -Node: Signature Program848267 -Node: Programs Summary849514 -Node: Programs Exercises850728 -Ref: Programs Exercises-Footnote-1854858 -Node: Advanced Features854944 -Node: Nondecimal Data857341 -Node: Boolean Typed Values858939 -Node: Array Sorting860820 -Node: Controlling Array Traversal861525 -Ref: Controlling Array Traversal-Footnote-1869893 -Node: Array Sorting Functions870011 -Ref: Array Sorting Functions-Footnote-1875922 -Node: Two-way I/O876118 -Ref: Two-way I/O-Footnote-1883844 -Ref: Two-way I/O-Footnote-2884031 -Node: TCP/IP Networking884113 -Node: Profiling887189 -Node: Persistent Memory896495 -Ref: Persistent Memory-Footnote-1902664 -Node: Extension Philosophy902791 -Node: Advanced Features Summary904278 -Node: Internationalization906450 -Node: I18N and L10N908124 -Node: Explaining gettext908811 -Ref: Explaining gettext-Footnote-1914703 -Ref: Explaining gettext-Footnote-2914888 -Node: Programmer i18n915053 -Ref: Programmer i18n-Footnote-1920002 -Node: Translator i18n920051 -Node: String Extraction920845 -Ref: String Extraction-Footnote-1921977 -Node: Printf Ordering922063 -Ref: Printf Ordering-Footnote-1924849 -Node: I18N Portability924913 -Ref: I18N Portability-Footnote-1927369 -Node: I18N Example927432 -Ref: I18N Example-Footnote-1930707 -Ref: I18N Example-Footnote-2930780 -Node: Gawk I18N930889 -Node: I18N Summary931511 -Node: Debugger932852 -Node: Debugging933852 -Node: Debugging Concepts934293 -Node: Debugging Terms936102 -Node: Awk Debugging938677 -Ref: Awk Debugging-Footnote-1939622 -Node: Sample Debugging Session939754 -Node: Debugger Invocation940288 -Node: Finding The Bug941674 -Node: List of Debugger Commands948148 -Node: Breakpoint Control949481 -Node: Debugger Execution Control953175 -Node: Viewing And Changing Data956537 -Node: Execution Stack960078 -Node: Debugger Info961715 -Node: Miscellaneous Debugger Commands965786 -Node: Readline Support970848 -Node: Limitations971744 -Node: Debugging Summary974298 -Node: Namespaces975577 -Node: Global Namespace976688 -Node: Qualified Names978086 -Node: Default Namespace979085 -Node: Changing The Namespace979826 -Node: Naming Rules981440 -Node: Internal Name Management983288 -Node: Namespace Example984330 -Node: Namespace And Features986892 -Node: Namespace Summary988327 -Node: Arbitrary Precision Arithmetic989804 -Node: Computer Arithmetic991291 -Ref: table-numeric-ranges995057 -Ref: table-floating-point-ranges995551 -Ref: Computer Arithmetic-Footnote-1996210 -Node: Math Definitions996267 -Ref: table-ieee-formats999243 -Node: MPFR features999811 -Node: MPFR On Parole1000256 -Ref: MPFR On Parole-Footnote-11001085 -Node: MPFR Intro1001240 -Node: FP Math Caution1002879 -Ref: FP Math Caution-Footnote-11003951 -Node: Inexactness of computations1004320 -Node: Inexact representation1005351 -Node: Comparing FP Values1006711 -Node: Errors accumulate1007952 -Node: Strange values1009408 -Ref: Strange values-Footnote-11011996 -Node: Getting Accuracy1012101 -Node: Try To Round1014811 -Node: Setting precision1015710 -Ref: table-predefined-precision-strings1016407 -Node: Setting the rounding mode1018238 -Ref: table-gawk-rounding-modes1018612 -Ref: Setting the rounding mode-Footnote-11022544 -Node: Arbitrary Precision Integers1022723 -Ref: Arbitrary Precision Integers-Footnote-11025898 -Node: Checking for MPFR1026047 -Node: POSIX Floating Point Problems1027521 -Ref: POSIX Floating Point Problems-Footnote-11032174 -Node: Floating point summary1032212 -Node: Dynamic Extensions1034402 -Node: Extension Intro1035955 -Node: Plugin License1037221 -Node: Extension Mechanism Outline1038018 -Ref: figure-load-extension1038457 -Ref: figure-register-new-function1040023 -Ref: figure-call-new-function1041116 -Node: Extension API Description1043179 -Node: Extension API Functions Introduction1044892 -Ref: table-api-std-headers1046728 -Node: General Data Types1050978 -Ref: General Data Types-Footnote-11059684 -Node: Memory Allocation Functions1059983 -Ref: Memory Allocation Functions-Footnote-11064484 -Node: Constructor Functions1064583 -Node: API Ownership of MPFR and GMP Values1068236 -Node: Registration Functions1069769 -Node: Extension Functions1070469 -Node: Exit Callback Functions1075791 -Node: Extension Version String1077041 -Node: Input Parsers1077704 -Node: Output Wrappers1090425 -Node: Two-way processors1094937 -Node: Printing Messages1097202 -Ref: Printing Messages-Footnote-11098373 -Node: Updating ERRNO1098526 -Node: Requesting Values1099265 -Ref: table-value-types-returned1100002 -Node: Accessing Parameters1101111 -Node: Symbol Table Access1102348 -Node: Symbol table by name1102860 -Ref: Symbol table by name-Footnote-11105885 -Node: Symbol table by cookie1106013 -Ref: Symbol table by cookie-Footnote-11110198 -Node: Cached values1110262 -Ref: Cached values-Footnote-11113798 -Node: Array Manipulation1113951 -Ref: Array Manipulation-Footnote-11115042 -Node: Array Data Types1115079 -Ref: Array Data Types-Footnote-11117737 -Node: Array Functions1117829 -Node: Flattening Arrays1122614 -Node: Creating Arrays1129590 -Node: Redirection API1134357 -Node: Extension API Variables1137190 -Node: Extension Versioning1137901 -Ref: gawk-api-version1138330 -Node: Extension GMP/MPFR Versioning1140062 -Node: Extension API Informational Variables1141690 -Node: Extension API Boilerplate1142763 -Node: Changes from API V11146737 -Node: Finding Extensions1148309 -Node: Extension Example1148868 -Node: Internal File Description1149666 -Node: Internal File Ops1153746 -Ref: Internal File Ops-Footnote-11165096 -Node: Using Internal File Ops1165236 -Ref: Using Internal File Ops-Footnote-11167619 -Node: Extension Samples1167893 -Node: Extension Sample File Functions1169422 -Node: Extension Sample Fnmatch1177071 -Node: Extension Sample Fork1178558 -Node: Extension Sample Inplace1179776 -Node: Extension Sample Ord1183402 -Node: Extension Sample Readdir1184238 -Ref: table-readdir-file-types1185127 -Node: Extension Sample Revout1186195 -Node: Extension Sample Rev2way1186784 -Node: Extension Sample Read write array1187524 -Node: Extension Sample Readfile1190689 -Node: Extension Sample Time1191784 -Node: Extension Sample API Tests1193536 -Node: gawkextlib1194028 -Node: Extension summary1196946 -Node: Extension Exercises1200648 -Node: Language History1201890 -Node: V7/SVR3.11203546 -Node: SVR41205698 -Node: POSIX1207132 -Node: BTL1208513 -Node: POSIX/GNU1209242 -Node: Feature History1215131 -Node: Common Extensions1232760 -Node: Ranges and Locales1234043 -Ref: Ranges and Locales-Footnote-11238659 -Ref: Ranges and Locales-Footnote-21238686 -Ref: Ranges and Locales-Footnote-31238921 -Node: Contributors1239144 -Node: History summary1245141 -Node: Installation1246521 -Node: Gawk Distribution1247465 -Node: Getting1247949 -Node: Extracting1248912 -Node: Distribution contents1250550 -Node: Unix Installation1257611 -Node: Quick Installation1258415 -Node: Compiling with MPFR1260835 -Node: Shell Startup Files1261525 -Node: Additional Configuration Options1262614 -Node: Configuration Philosophy1264929 -Node: Compiling from Git1267325 -Node: Building the Documentation1267880 -Node: Non-Unix Installation1269264 -Node: PC Installation1269724 -Node: PC Binary Installation1270562 -Node: PC Compiling1271435 -Node: PC Using1272552 -Node: Cygwin1276105 -Node: MSYS1277329 -Node: VMS Installation1277931 -Node: VMS Compilation1278650 -Ref: VMS Compilation-Footnote-11279879 -Node: VMS Dynamic Extensions1279937 -Node: VMS Installation Details1281622 -Node: VMS Running1283884 -Node: VMS GNV1288163 -Node: Bugs1288877 -Node: Bug definition1289789 -Node: Bug address1292725 -Node: Usenet1295913 -Node: Performance bugs1297102 -Node: Asking for help1300023 -Node: Maintainers1301990 -Node: Other Versions1303091 -Node: Installation summary1311361 -Node: Notes1312725 -Node: Compatibility Mode1313519 -Node: Additions1314301 -Node: Accessing The Source1315226 -Node: Adding Code1316663 -Node: New Ports1323478 -Node: Derived Files1327853 -Ref: Derived Files-Footnote-11333513 -Ref: Derived Files-Footnote-21333548 -Ref: Derived Files-Footnote-31334146 -Node: Future Extensions1334260 -Node: Implementation Limitations1334918 -Node: Extension Design1336128 -Node: Old Extension Problems1337272 -Ref: Old Extension Problems-Footnote-11338790 -Node: Extension New Mechanism Goals1338847 -Ref: Extension New Mechanism Goals-Footnote-11342211 -Node: Extension Other Design Decisions1342400 -Node: Extension Future Growth1344513 -Node: Notes summary1345119 -Node: Basic Concepts1346277 -Node: Basic High Level1346958 -Ref: figure-general-flow1347240 -Ref: figure-process-flow1347926 -Ref: Basic High Level-Footnote-11351228 -Node: Basic Data Typing1351413 -Node: Glossary1354741 -Node: Copying1386628 -Node: GNU Free Documentation License1424171 -Node: Index1449291 +Ref: Auto-set-Footnote-1497794 +Ref: Auto-set-Footnote-2498000 +Node: ARGC and ARGV498056 +Node: Pattern Action Summary502269 +Node: Arrays504699 +Node: Array Basics506028 +Node: Array Intro506872 +Ref: figure-array-elements508847 +Ref: Array Intro-Footnote-1511552 +Node: Reference to Elements511680 +Node: Assigning Elements514144 +Node: Array Example514635 +Node: Scanning an Array516589 +Node: Controlling Scanning519611 +Ref: Controlling Scanning-Footnote-1526067 +Node: Numeric Array Subscripts526383 +Node: Uninitialized Subscripts528567 +Node: Delete530186 +Ref: Delete-Footnote-1532938 +Node: Multidimensional532995 +Node: Multiscanning536090 +Node: Arrays of Arrays537681 +Node: Arrays Summary542449 +Node: Functions544542 +Node: Built-in545580 +Node: Calling Built-in546733 +Node: Boolean Functions548729 +Node: Numeric Functions549283 +Ref: Numeric Functions-Footnote-1553310 +Ref: Numeric Functions-Footnote-2553958 +Ref: Numeric Functions-Footnote-3554006 +Node: String Functions554278 +Ref: String Functions-Footnote-1579120 +Ref: String Functions-Footnote-2579248 +Ref: String Functions-Footnote-3579496 +Node: Gory Details579583 +Ref: table-sub-escapes581374 +Ref: table-sub-proposed582894 +Ref: table-posix-sub584258 +Ref: table-gensub-escapes585800 +Ref: Gory Details-Footnote-1586624 +Node: I/O Functions586778 +Ref: table-system-return-values593232 +Ref: I/O Functions-Footnote-1595313 +Ref: I/O Functions-Footnote-2595461 +Node: Time Functions595581 +Ref: Time Functions-Footnote-1606252 +Ref: Time Functions-Footnote-2606320 +Ref: Time Functions-Footnote-3606478 +Ref: Time Functions-Footnote-4606589 +Ref: Time Functions-Footnote-5606701 +Ref: Time Functions-Footnote-6606928 +Node: Bitwise Functions607194 +Ref: table-bitwise-ops607788 +Ref: Bitwise Functions-Footnote-1613852 +Ref: Bitwise Functions-Footnote-2614025 +Node: Type Functions614216 +Node: I18N Functions617636 +Node: User-defined619287 +Node: Definition Syntax620099 +Ref: Definition Syntax-Footnote-1625793 +Node: Function Example625864 +Ref: Function Example-Footnote-1628786 +Node: Function Calling628808 +Node: Calling A Function629396 +Node: Variable Scope630354 +Node: Pass By Value/Reference633348 +Node: Function Caveats635992 +Ref: Function Caveats-Footnote-1638039 +Node: Return Statement638159 +Node: Dynamic Typing641138 +Node: Indirect Calls642068 +Node: Functions Summary652995 +Node: Library Functions655700 +Ref: Library Functions-Footnote-1659307 +Ref: Library Functions-Footnote-2659450 +Node: Library Names659621 +Ref: Library Names-Footnote-1663288 +Ref: Library Names-Footnote-2663511 +Node: General Functions663597 +Node: Strtonum Function664779 +Node: Assert Function667801 +Node: Round Function671127 +Node: Cliff Random Function672667 +Node: Ordinal Functions673683 +Ref: Ordinal Functions-Footnote-1676746 +Ref: Ordinal Functions-Footnote-2676998 +Node: Join Function677208 +Ref: Join Function-Footnote-1678978 +Node: Getlocaltime Function679178 +Node: Readfile Function682920 +Node: Shell Quoting684897 +Node: Isnumeric Function686325 +Node: Data File Management687713 +Node: Filetrans Function688345 +Node: Rewind Function692441 +Node: File Checking694350 +Ref: File Checking-Footnote-1695684 +Node: Empty Files695885 +Node: Ignoring Assigns697864 +Node: Getopt Function699414 +Ref: Getopt Function-Footnote-1714711 +Node: Passwd Functions714911 +Ref: Passwd Functions-Footnote-1723750 +Node: Group Functions723838 +Ref: Group Functions-Footnote-1731736 +Node: Walking Arrays731943 +Node: Library Functions Summary734951 +Node: Library Exercises736357 +Node: Sample Programs736822 +Node: Running Examples737592 +Node: Clones738320 +Node: Cut Program739544 +Node: Egrep Program749684 +Node: Id Program758685 +Node: Split Program768620 +Ref: Split Program-Footnote-1778513 +Node: Tee Program778686 +Node: Uniq Program781476 +Node: Wc Program789064 +Node: Bytes vs. Characters789451 +Node: Using extensions790999 +Node: wc program791753 +Node: Miscellaneous Programs796618 +Node: Dupword Program797831 +Node: Alarm Program799861 +Node: Translate Program804716 +Ref: Translate Program-Footnote-1809281 +Node: Labels Program809551 +Ref: Labels Program-Footnote-1812902 +Node: Word Sorting812986 +Node: History Sorting817058 +Node: Extract Program819283 +Node: Simple Sed827296 +Node: Igawk Program830370 +Ref: Igawk Program-Footnote-1844701 +Ref: Igawk Program-Footnote-2844903 +Ref: Igawk Program-Footnote-3845025 +Node: Anagram Program845140 +Node: Signature Program848202 +Node: Programs Summary849449 +Node: Programs Exercises850663 +Ref: Programs Exercises-Footnote-1854793 +Node: Advanced Features854879 +Node: Nondecimal Data857276 +Node: Boolean Typed Values858874 +Node: Array Sorting860755 +Node: Controlling Array Traversal861460 +Ref: Controlling Array Traversal-Footnote-1869828 +Node: Array Sorting Functions869946 +Ref: Array Sorting Functions-Footnote-1875857 +Node: Two-way I/O876053 +Ref: Two-way I/O-Footnote-1883779 +Ref: Two-way I/O-Footnote-2883966 +Node: TCP/IP Networking884048 +Node: Profiling887124 +Node: Persistent Memory896430 +Ref: Persistent Memory-Footnote-1902599 +Node: Extension Philosophy902726 +Node: Advanced Features Summary904213 +Node: Internationalization906385 +Node: I18N and L10N908059 +Node: Explaining gettext908746 +Ref: Explaining gettext-Footnote-1914638 +Ref: Explaining gettext-Footnote-2914823 +Node: Programmer i18n914988 +Ref: Programmer i18n-Footnote-1919937 +Node: Translator i18n919986 +Node: String Extraction920780 +Ref: String Extraction-Footnote-1921912 +Node: Printf Ordering921998 +Ref: Printf Ordering-Footnote-1924784 +Node: I18N Portability924848 +Ref: I18N Portability-Footnote-1927304 +Node: I18N Example927367 +Ref: I18N Example-Footnote-1930642 +Ref: I18N Example-Footnote-2930715 +Node: Gawk I18N930824 +Node: I18N Summary931446 +Node: Debugger932787 +Node: Debugging933787 +Node: Debugging Concepts934228 +Node: Debugging Terms936037 +Node: Awk Debugging938612 +Ref: Awk Debugging-Footnote-1939557 +Node: Sample Debugging Session939689 +Node: Debugger Invocation940223 +Node: Finding The Bug941609 +Node: List of Debugger Commands948083 +Node: Breakpoint Control949416 +Node: Debugger Execution Control953110 +Node: Viewing And Changing Data956472 +Node: Execution Stack960013 +Node: Debugger Info961650 +Node: Miscellaneous Debugger Commands965721 +Node: Readline Support970783 +Node: Limitations971679 +Node: Debugging Summary974233 +Node: Namespaces975512 +Node: Global Namespace976623 +Node: Qualified Names978021 +Node: Default Namespace979020 +Node: Changing The Namespace979761 +Node: Naming Rules981375 +Node: Internal Name Management983223 +Node: Namespace Example984265 +Node: Namespace And Features986827 +Node: Namespace Summary988262 +Node: Arbitrary Precision Arithmetic989739 +Node: Computer Arithmetic991226 +Ref: table-numeric-ranges994992 +Ref: table-floating-point-ranges995486 +Ref: Computer Arithmetic-Footnote-1996145 +Node: Math Definitions996202 +Ref: table-ieee-formats999178 +Node: MPFR features999746 +Node: MPFR On Parole1000191 +Ref: MPFR On Parole-Footnote-11001020 +Node: MPFR Intro1001175 +Node: FP Math Caution1002814 +Ref: FP Math Caution-Footnote-11003886 +Node: Inexactness of computations1004255 +Node: Inexact representation1005286 +Node: Comparing FP Values1006646 +Node: Errors accumulate1007887 +Node: Strange values1009343 +Ref: Strange values-Footnote-11011931 +Node: Getting Accuracy1012036 +Node: Try To Round1014746 +Node: Setting precision1015645 +Ref: table-predefined-precision-strings1016342 +Node: Setting the rounding mode1018173 +Ref: table-gawk-rounding-modes1018547 +Ref: Setting the rounding mode-Footnote-11022479 +Node: Arbitrary Precision Integers1022658 +Ref: Arbitrary Precision Integers-Footnote-11025833 +Node: Checking for MPFR1025982 +Node: POSIX Floating Point Problems1027456 +Ref: POSIX Floating Point Problems-Footnote-11032109 +Node: Floating point summary1032147 +Node: Dynamic Extensions1034337 +Node: Extension Intro1035890 +Node: Plugin License1037156 +Node: Extension Mechanism Outline1037953 +Ref: figure-load-extension1038392 +Ref: figure-register-new-function1039958 +Ref: figure-call-new-function1041051 +Node: Extension API Description1043114 +Node: Extension API Functions Introduction1044827 +Ref: table-api-std-headers1046663 +Node: General Data Types1050913 +Ref: General Data Types-Footnote-11059619 +Node: Memory Allocation Functions1059918 +Ref: Memory Allocation Functions-Footnote-11064419 +Node: Constructor Functions1064518 +Node: API Ownership of MPFR and GMP Values1068171 +Node: Registration Functions1069704 +Node: Extension Functions1070404 +Node: Exit Callback Functions1075726 +Node: Extension Version String1076976 +Node: Input Parsers1077639 +Node: Output Wrappers1090360 +Node: Two-way processors1094872 +Node: Printing Messages1097137 +Ref: Printing Messages-Footnote-11098308 +Node: Updating ERRNO1098461 +Node: Requesting Values1099200 +Ref: table-value-types-returned1099937 +Node: Accessing Parameters1101046 +Node: Symbol Table Access1102283 +Node: Symbol table by name1102795 +Ref: Symbol table by name-Footnote-11105820 +Node: Symbol table by cookie1105948 +Ref: Symbol table by cookie-Footnote-11110133 +Node: Cached values1110197 +Ref: Cached values-Footnote-11113733 +Node: Array Manipulation1113886 +Ref: Array Manipulation-Footnote-11114977 +Node: Array Data Types1115014 +Ref: Array Data Types-Footnote-11117672 +Node: Array Functions1117764 +Node: Flattening Arrays1122549 +Node: Creating Arrays1129525 +Node: Redirection API1134292 +Node: Extension API Variables1137125 +Node: Extension Versioning1137836 +Ref: gawk-api-version1138265 +Node: Extension GMP/MPFR Versioning1139997 +Node: Extension API Informational Variables1141625 +Node: Extension API Boilerplate1142698 +Node: Changes from API V11146672 +Node: Finding Extensions1148244 +Node: Extension Example1148803 +Node: Internal File Description1149601 +Node: Internal File Ops1153681 +Ref: Internal File Ops-Footnote-11165031 +Node: Using Internal File Ops1165171 +Ref: Using Internal File Ops-Footnote-11167554 +Node: Extension Samples1167828 +Node: Extension Sample File Functions1169357 +Node: Extension Sample Fnmatch1177006 +Node: Extension Sample Fork1178493 +Node: Extension Sample Inplace1179711 +Node: Extension Sample Ord1183337 +Node: Extension Sample Readdir1184173 +Ref: table-readdir-file-types1185062 +Node: Extension Sample Revout1186130 +Node: Extension Sample Rev2way1186719 +Node: Extension Sample Read write array1187459 +Node: Extension Sample Readfile1190624 +Node: Extension Sample Time1191719 +Node: Extension Sample API Tests1193471 +Node: gawkextlib1193963 +Node: Extension summary1196881 +Node: Extension Exercises1200583 +Node: Language History1201825 +Node: V7/SVR3.11203481 +Node: SVR41205633 +Node: POSIX1207067 +Node: BTL1208448 +Node: POSIX/GNU1209177 +Node: Feature History1215083 +Node: Common Extensions1232712 +Node: Ranges and Locales1233995 +Ref: Ranges and Locales-Footnote-11238611 +Ref: Ranges and Locales-Footnote-21238638 +Ref: Ranges and Locales-Footnote-31238873 +Node: Contributors1239096 +Node: History summary1245093 +Node: Installation1246473 +Node: Gawk Distribution1247417 +Node: Getting1247901 +Node: Extracting1248864 +Node: Distribution contents1250502 +Node: Unix Installation1257563 +Node: Quick Installation1258367 +Node: Compiling with MPFR1260787 +Node: Shell Startup Files1261477 +Node: Additional Configuration Options1262566 +Node: Configuration Philosophy1264881 +Node: Compiling from Git1267277 +Node: Building the Documentation1267832 +Node: Non-Unix Installation1269216 +Node: PC Installation1269676 +Node: PC Binary Installation1270514 +Node: PC Compiling1271387 +Node: PC Using1272504 +Node: Cygwin1276000 +Node: MSYS1277224 +Node: VMS Installation1277826 +Node: VMS Compilation1278545 +Ref: VMS Compilation-Footnote-11279774 +Node: VMS Dynamic Extensions1279832 +Node: VMS Installation Details1281517 +Node: VMS Running1283779 +Node: VMS GNV1288058 +Node: Bugs1288772 +Node: Bug definition1289684 +Node: Bug address1292620 +Node: Usenet1295808 +Node: Performance bugs1296997 +Node: Asking for help1299918 +Node: Maintainers1301885 +Node: Other Versions1302892 +Node: Installation summary1311162 +Node: Notes1312519 +Node: Compatibility Mode1313313 +Node: Additions1314095 +Node: Accessing The Source1315020 +Node: Adding Code1316457 +Node: New Ports1323272 +Node: Derived Files1327647 +Ref: Derived Files-Footnote-11333307 +Ref: Derived Files-Footnote-21333342 +Ref: Derived Files-Footnote-31333940 +Node: Future Extensions1334054 +Node: Implementation Limitations1334712 +Node: Extension Design1335922 +Node: Old Extension Problems1337066 +Ref: Old Extension Problems-Footnote-11338584 +Node: Extension New Mechanism Goals1338641 +Ref: Extension New Mechanism Goals-Footnote-11342005 +Node: Extension Other Design Decisions1342194 +Node: Extension Future Growth1344307 +Node: Notes summary1344913 +Node: Basic Concepts1346071 +Node: Basic High Level1346752 +Ref: figure-general-flow1347034 +Ref: figure-process-flow1347720 +Ref: Basic High Level-Footnote-11351022 +Node: Basic Data Typing1351207 +Node: Glossary1354535 +Node: Copying1386422 +Node: GNU Free Documentation License1423965 +Node: Index1449085  End Tag Table diff --git a/doc/gawk.texi b/doc/gawk.texi index 67a12eba..62a04d37 100644 --- a/doc/gawk.texi +++ b/doc/gawk.texi @@ -16422,9 +16422,8 @@ This element gives a string indicating the platform for which @c nested table @table @code -@item "djgpp" -@itemx "mingw" -Microsoft Windows, using either DJGPP or MinGW, respectively. +@item "mingw" +Microsoft Windows, using MinGW. @item "os390" OS/390. @@ -41090,7 +41089,8 @@ for @command{gawk} @value{PVERSION} 5.2: @item OS/2 -@c add more removed systems here +@item +DJGPP @end itemize @@ -43130,14 +43130,13 @@ type @samp{make mingw32}. @cindex operating systems @subentry PC, @command{gawk} on @cindex PC operating systems, @command{gawk} on -Information in this section applies to the MinGW and -DJGPP ports of @command{gawk}. @xref{Cygwin} for information +Information in this section applies to the MinGW +port of @command{gawk}. @xref{Cygwin} for information about the Cygwin port. Under MS-Windows, the MinGW environment supports both the @samp{|&} operator and TCP/IP networking (@pxref{TCP/IP Networking}). -The DJGPP environment does not support @samp{|&}. @cindex search paths @cindex search paths @subentry for source files @@ -44038,8 +44037,6 @@ 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 Juan Manuel Guerrero, @EMAIL{juan.guerrero@@gmx.de, juan dot guerrero at gmx dot de} - @item MS-Windows with MinGW @tab Eli Zaretskii, @EMAIL{eliz@@gnu.org,eliz at gnu dot org} @item VMS @tab John Malmberg, @EMAIL{wb8tyw@@qsl.net,wb8tyw at qsl dot net} @@ -44349,7 +44346,7 @@ the file. @item @command{gawk} may be built on non-POSIX systems as well. The currently supported systems are MS-Windows using -MSYS, MSYS2, DJGPP, MinGW, and Cygwin, +MSYS, MSYS2, MinGW, and Cygwin, and both Vax/VMS and OpenVMS. Instructions for each system are included in this @value{APPENDIX}. diff --git a/doc/gawktexi.in b/doc/gawktexi.in index d72665a0..8af244cc 100644 --- a/doc/gawktexi.in +++ b/doc/gawktexi.in @@ -4113,7 +4113,7 @@ the arbitrary precision arithmetic features in @command{gawk} are ``on parole.'' The primary maintainer is no longer willing to support this feature, but another member of the development team has stepped up to take it over. -As long as this situation reamins stable, MPFR will be supported. If it +As long as this situation remains stable, MPFR will be supported. If it changes, the MPFR support will be removed from @command{gawk}. @ignore If you use this option, @command{gawk} generates a warning message. @@ -15609,9 +15609,8 @@ This element gives a string indicating the platform for which @c nested table @table @code -@item "djgpp" -@itemx "mingw" -Microsoft Windows, using either DJGPP or MinGW, respectively. +@item "mingw" +Microsoft Windows, using MinGW. @item "os390" OS/390. @@ -39933,7 +39932,8 @@ for @command{gawk} @value{PVERSION} 5.2: @item OS/2 -@c add more removed systems here +@item +DJGPP @end itemize @@ -41973,14 +41973,13 @@ type @samp{make mingw32}. @cindex operating systems @subentry PC, @command{gawk} on @cindex PC operating systems, @command{gawk} on -Information in this section applies to the MinGW and -DJGPP ports of @command{gawk}. @xref{Cygwin} for information +Information in this section applies to the MinGW +port of @command{gawk}. @xref{Cygwin} for information about the Cygwin port. Under MS-Windows, the MinGW environment supports both the @samp{|&} operator and TCP/IP networking (@pxref{TCP/IP Networking}). -The DJGPP environment does not support @samp{|&}. @cindex search paths @cindex search paths @subentry for source files @@ -42881,8 +42880,6 @@ 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 Juan Manuel Guerrero, @EMAIL{juan.guerrero@@gmx.de, juan dot guerrero at gmx dot de} - @item MS-Windows with MinGW @tab Eli Zaretskii, @EMAIL{eliz@@gnu.org,eliz at gnu dot org} @item VMS @tab John Malmberg, @EMAIL{wb8tyw@@qsl.net,wb8tyw at qsl dot net} @@ -43192,7 +43189,7 @@ the file. @item @command{gawk} may be built on non-POSIX systems as well. The currently supported systems are MS-Windows using -MSYS, MSYS2, DJGPP, MinGW, and Cygwin, +MSYS, MSYS2, MinGW, and Cygwin, and both Vax/VMS and OpenVMS. Instructions for each system are included in this @value{APPENDIX}. diff --git a/doc/wordlist b/doc/wordlist index abb631eb..1f25fc30 100644 --- a/doc/wordlist +++ b/doc/wordlist @@ -861,7 +861,6 @@ dircategory direntry distributable div -djgpp dl dll dlopen diff --git a/doc/wordlist3 b/doc/wordlist3 index cbe0cdcb..d8846134 100644 --- a/doc/wordlist3 +++ b/doc/wordlist3 @@ -21,6 +21,7 @@ GMP IGNORECASE IPv ISBN +Jun LC MPFR MSEC diff --git a/eval.c b/eval.c index ddbf87e3..8fde6b39 100644 --- a/eval.c +++ b/eval.c @@ -543,7 +543,6 @@ posix_compare(NODE *s1, NODE *s2) s1->stptr[s1->stlen] = save1; s2->stptr[s2->stlen] = save2; } -#if ! defined(__DJGPP__) else { /* Similar logic, using wide characters */ const wchar_t *p1, *p2; @@ -576,7 +575,6 @@ posix_compare(NODE *s1, NODE *s2) } } } -#endif return ret; } diff --git a/gawkmisc.c b/gawkmisc.c index 165e15c6..8a7bf0e5 100644 --- a/gawkmisc.c +++ b/gawkmisc.c @@ -32,12 +32,12 @@ /* some old compilers don't grok #elif. sigh */ -#if defined(__DJGPP__) || defined(__MINGW32__) +#if defined(__MINGW32__) #include "pc/gawkmisc.pc" -#else /* not __DJGPP__, not __MINGW32__ */ +#else /* not __MINGW32__ */ #if defined(VMS) #include "vms/gawkmisc.vms" #else /* not VMS */ #include "posix/gawkmisc.c" #endif /* not VMS */ -#endif /* not __DJGPP__, not __MINGW32__ */ +#endif /* not __MINGW32__ */ diff --git a/io.c b/io.c index 8fac000a..91fa2225 100644 --- a/io.c +++ b/io.c @@ -117,10 +117,6 @@ #define ENFILE EMFILE #endif -#if defined(__DJGPP__) -#define closemaybesocket(fd) close(fd) -#endif - #if defined(VMS) #include #ifndef SS$_EXBYTLM @@ -183,10 +179,6 @@ #undef TANDEM /* AIX defines this in one of its header files */ #endif -#ifdef __DJGPP__ -#define PIPES_SIMULATED -#endif - #ifdef __MINGW32__ # ifndef PIPES_SIMULATED # define pipe(fds) _pipe(fds, 0, O_NOINHERIT) @@ -349,7 +341,7 @@ init_io() } -#if defined(__DJGPP__) || defined(__MINGW32__) || defined(__CYGWIN__) +#if defined(__MINGW32__) || defined(__CYGWIN__) /* binmode --- convert BINMODE to string for fopen */ static const char * diff --git a/main.c b/main.c index 53126435..999361c3 100644 --- a/main.c +++ b/main.c @@ -1862,8 +1862,6 @@ platform_name() return "vms"; #elif defined(__MINGW32__) return "mingw"; -#elif defined(__DJGPP__) - return "djgpp"; #elif defined(USE_EBCDIC) return "os390"; #else diff --git a/missing_d/ChangeLog b/missing_d/ChangeLog index f645dd06..6ca385e6 100644 --- a/missing_d/ChangeLog +++ b/missing_d/ChangeLog @@ -1,3 +1,7 @@ +2022-07-06 Arnold D. Robbins + + * snprintf.c: Remove stuff related to __DJGPP__. + 2022-07-03 Arnold D. Robbins * snprintf.c: Remove stuff related to __EMX__. diff --git a/missing_d/snprintf.c b/missing_d/snprintf.c index dfe57c6b..af63dff7 100644 --- a/missing_d/snprintf.c +++ b/missing_d/snprintf.c @@ -86,7 +86,7 @@ safe_tmpfile (void) if ((fd = mkstemp (tmpfilename)) < 0) return NULL; -#if ! defined(__DJGPP__) && ! defined(MSDOS) && ! defined(_MSC_VER) \ +#if ! defined(MSDOS) && ! defined(_MSC_VER) \ && ! defined(_WIN32) && ! defined(__CRTRSXNT__) \ && ! defined(__MINGW32__) && ! defined(__WIN32__) /* If not MS unlink after opening. */ diff --git a/nonposix.h b/nonposix.h index 80d30da4..92a79504 100644 --- a/nonposix.h +++ b/nonposix.h @@ -67,17 +67,10 @@ char *w32_setlocale (int, const char *); #endif /* __MINGW32__ */ -#if defined(VMS) || defined(__DJGPP__) || defined(__MINGW32__) +#if defined(VMS) || defined(__MINGW32__) int getpgrp(void); #endif -#if defined(__DJGPP__) || defined(__MINGW32__) +#if defined(__MINGW32__) int getppid(void); #endif - -#ifdef __DJGPP__ -/* Prototypes of for Posix functions for which we define replacements - in pc/ files. */ -wint_t btowc (int c); -wint_t putwc (wchar_t wc, FILE *stream); -#endif diff --git a/pc/ChangeLog b/pc/ChangeLog index 65100263..ddeb8883 100644 --- a/pc/ChangeLog +++ b/pc/ChangeLog @@ -1,3 +1,9 @@ +2022-07-06 Arnold D. Robbins + + * GenMakefileTst.awk, Makefile, Makefile.tst, config.h, config.sed, + gawkmisc.pc, getid.c, popen.h: Remove stuff related to DJGPP. + +Untracked files: 2022-07-03 Arnold D. Robbins * Makefile, config.h, config.sed, gawkmisc.pc: diff --git a/pc/GenMakefileTst.awk b/pc/GenMakefileTst.awk index 964573c9..6176370a 100644 --- a/pc/GenMakefileTst.awk +++ b/pc/GenMakefileTst.awk @@ -12,16 +12,6 @@ # Process the bits in Makefile.in we need to generate the tests properly -# Tests that fail on DJGPP -/^EXPECTED_FAIL_DJGPP *=/,/[^\\]$/ { - print - gsub(/(^EXPECTED_FAIL_DJGPP *=|\\$)/,"") - for (i = 1; i <= NF; i++) - djgpp[$i] - - next -} - # Tests that fail on MinGW /^EXPECTED_FAIL_MINGW *=/,/[^\\]$/ { print @@ -116,11 +106,7 @@ function print_recipe( i, start) start = 2 # print the right warning - if (name in djgpp && name in mingw) { - print "\t@echo Expect $@ to fail with DJGPP and MinGW." - } else if (name in djgpp) { - print "\t@echo Expect $@ to fail with DJGPP." - } else if (name in mingw) { + if (name in mingw) { print "\t@echo Expect $@ to fail with MinGW." } diff --git a/pc/Makefile b/pc/Makefile index 1eb1fc9e..f05aae92 100644 --- a/pc/Makefile +++ b/pc/Makefile @@ -1,6 +1,5 @@ # Makefile for gawk (GNU awk) Dec 2010 # -# - for GNU C (djgpp) [32bit protected-mode executable for DOS] # - for GNU C (mingw32) [Windows32 executable for Windows 9x/NT/2K/XP/7] # Tested with GNU make on Windows, OS/2 and DOS. @@ -19,12 +18,6 @@ default: @echo "Enter $(MAK) target " @echo " where 'target' is chosen from " - @echo " djgpp ... DOS 32-bit exe [GNU C, Delorie, v2] " - @echo " djgpp-mpfr . Like djgpp, but with MPFR " - @echo " [You will need to have GNU MPFR library installed.] " - @echo " djgpp-readline . Like djgpp, but with readline " - @echo " [You will need to have GNU readline library installed.] " - @echo " djgpp-readline-mpfr . djgpp with readline and MPFR " @echo " mingw32 . Windows32 exe [Mingw32 GNU C] " @echo " mingw32-readline . Like mingw32, but with readline " @echo " [You will need to have GNU readline library installed.] " @@ -37,11 +30,9 @@ default: @echo " doc ..... Create documentation " # Support dropped in 4.0 -# - for DJGPP v1.x [DOS 32bit protected-mode executable] # - for MS-Visual C/C++ 4.x [Windows32 executable for Windows 9x/NT] # - for Microsoft C 7 [16bit ececutable for DOS] # - for Microsoft C 6.00A [16bit executable for OS/2 or DOS] -# @echo " djgppv1 . DOS 32-bit exe [GNU C, Delorie, v1] " # @echo " msc ..... DOS exe [Microsoft C 7 & 8 (AKA 1.52)] " # @echo " msc6 .... DOS exe [Microsoft C 6.00a] " # @echo " msc6os2 . OS/2 exe [Microsoft C 6.00a] " @@ -103,48 +94,6 @@ VPATH = .;./support;./support/malloc # End of general configuration. Some platform-specific configuration # notes appear below. -#======================================================================== -#========================== DJGPP ======================================= -#======================================================================== - -ifneq ($(DJGPP),) -prefix = /dev/env/DJDIR -pkgdatadir = $(prefix)/share/awk -SHLIBEXT = "\"dxe\"" -endif -LDJG = $(CC) $(LF) -o gawk.exe $(LDRSP) $(LF2) -BDJG = stubify -g awk.exe | stubedit awk.exe runfile=gawk - -djgpp: - $(MAK) all \ - CC=gcc O=.o CF=-O2 \ - LNK=LDJG LF=-s LF2=-lm \ - BIND=BDJG - -djgpp-debug: - $(MAK) all \ - CC=gcc O=.o CF='-O2 -g' \ - LNK=LDJG LF2=-lm \ - BIND=BDJG - -djgpp-mpfr: - $(MAK) all \ - CC=gcc O=.o CF='-O2 -DHAVE_MPFR' \ - LNK=LDJG LF=-s LF2="-lmpfr -lgmp -lm" \ - BIND=BDJG - -djgpp-readline: - $(MAK) all \ - CC=gcc O=.o CF='-O2 -DHAVE_LIBREADLINE' \ - LNK=LDJG LF=-s LF2="-lreadline -lm" \ - BIND=BDJG - -djgpp-readline-mpfr: - $(MAK) all \ - CC=gcc O=.o CF='-O2 -DHAVE_LIBREADLINE -DHAVE_MPFR' \ - LNK=LDJG LF=-s LF2="-lreadline -lmpfr -lgmp -lm" \ - BIND=BDJG - #======================================================================== #========================== MINGW32 ===================================== #======================================================================== diff --git a/pc/Makefile.tst b/pc/Makefile.tst index e07a22ed..9dc6837d 100644 --- a/pc/Makefile.tst +++ b/pc/Makefile.tst @@ -315,16 +315,6 @@ NEED_LOCALE_EN = \ NEED_LOCALE_JP = mbprintf2 NEED_LOCALE_RU = mtchi18n -# List of tests that fail on DJGPP -EXPECTED_FAIL_DJGPP = \ - backbigs1 backsmalls1 backw beginfile1 clos1way clos1way2 \ - clos1way3 clos1way4 clos1way5 clos1way6 errno getlndir \ - getlnhd gnuops3 gnureops id ignrcas3 inetdayt inetdayu \ - inetecht inetechu inftest jarebug mbfw1 mbprintf1 mbprintf4 \ - mbstr1 mbstr2 mpfrsqrt nonfatal1 nonfatal2 nonfatal3 pid pty1 pty2 \ - randtest regx8bit strtod sigpipe1 symtab6 timeout - - # List of tests that fail on MinGW EXPECTED_FAIL_MINGW = \ backbigs1 backsmalls1 clos1way6 devfd devfd1 devfd2 \ @@ -355,7 +345,7 @@ GENTESTS_UNUSED = Makefile.in checknegtime.awk dtdgport.awk fix-fmtspcl.awk \ readall1.awk readall2.awk -# List of tests on MinGW or DJGPP that need a different cmp program +# List of tests on MinGW that need a different cmp program NEED_TESTOUTCMP = \ beginfile2 double2 exit fmttest hsprint posix profile5 space @@ -543,7 +533,6 @@ compare:: inftest:: @echo $@ - @echo Expect $@ to fail with DJGPP. @echo This test is very machine specific... @-$(AWK) -f "$(srcdir)"/inftest.awk | sed "s/inf/Inf/g" >_$@ || echo EXIT CODE: $$? >> _$@ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ @@ -585,7 +574,7 @@ devfd:: # on the command line. errno: @echo $@ $(ZOS_FAIL) - @echo Expect $@ to fail with DJGPP and MinGW. + @echo Expect $@ to fail with MinGW. @-AWKPATH="$(srcdir)" $(AWK) -f $@.awk "$(srcdir)"/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ @@ -599,7 +588,7 @@ tweakfld:: # command so that pid.sh is fork'ed as a child before being exec'ed. pid:: @echo $@ - @echo Expect $@ to fail with DJGPP and MinGW. + @echo Expect $@ to fail with MinGW. @-AWKPATH="$(srcdir)" AWK=$(AWKPROG) $(SHELL) "$(srcdir)"/pid.sh $$$$ > _`basename $@` ; : @-$(CMP) "$(srcdir)"/pid.ok _`basename $@` && rm -f _`basename $@` @@ -671,23 +660,21 @@ inetmesg:: @-echo file /etc/services and do "'netstat -a'". inetechu:: - @echo Expect $@ to fail with DJGPP. @echo This test is for establishing UDP connections @-$(AWK) 'BEGIN {print "" |& "/inet/udp/0/127.0.0.1/9"}' inetecht:: - @echo Expect $@ to fail with DJGPP and MinGW. + @echo Expect $@ to fail with MinGW. @echo This test is for establishing TCP connections @-$(AWK) 'BEGIN {print "" |& "/inet/tcp/0/127.0.0.1/9"}' inetdayu:: - @echo Expect $@ to fail with DJGPP. @echo This test is for bidirectional UDP transmission @-$(AWK) 'BEGIN { print "" |& "/inet/udp/0/127.0.0.1/13"; \ "/inet/udp/0/127.0.0.1/13" |& getline; print $0}' inetdayt:: - @echo Expect $@ to fail with DJGPP and MinGW. + @echo Expect $@ to fail with MinGW. @echo This test is for bidirectional TCP transmission @-$(AWK) 'BEGIN { print "" |& "/inet/tcp/0/127.0.0.1/13"; \ "/inet/tcp/0/127.0.0.1/13" |& getline; print $0}' @@ -788,7 +775,6 @@ printfbad2: printfbad2.ok beginfile1:: @echo $@ $(ZOS_FAIL) - @echo Expect $@ to fail with DJGPP. @-AWKPATH="$(srcdir)" $(AWK) -f $@.awk "$(srcdir)"/$@.awk . ./no/such/file Makefile >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ @@ -890,7 +876,6 @@ mpfrmemok1: jarebug:: @echo $@ - @echo Expect $@ to fail with DJGPP. @-"$(srcdir)"/$@.sh "$(AWKPROG)" "$(srcdir)"/$@.awk "$(srcdir)"/$@.in "_$@" || echo EXIT CODE: $$? >> _$@ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ @@ -1101,7 +1086,6 @@ charasbytes: symtab6: @echo $@ - @echo Expect $@ to fail with DJGPP. @-AWKPATH="$(srcdir)" $(AWK) -f $@.awk > _$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ @@ -1158,7 +1142,7 @@ watchpoint1: pty1: @echo $@ - @echo Expect $@ to fail with DJGPP and MinGW. + @echo Expect $@ to fail with MinGW. @-case `uname` in \ *[Oo][Ss]/390*) : ;; \ *) AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ ; \ @@ -1167,7 +1151,7 @@ pty1: pty2: @echo $@ - @echo Expect $@ to fail with DJGPP and MinGW. + @echo Expect $@ to fail with MinGW. @-case `uname` in \ *[Oo][Ss]/390*) : ;; \ *) AWKPATH="$(srcdir)" $(AWK) -f $@.awk | od -c | $(AWK) '{ $$1 = $$1 ; print }' >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ ; \ @@ -1176,7 +1160,7 @@ pty2: ignrcas3:: @echo $@ - @echo Expect $@ to fail with DJGPP and MinGW. + @echo Expect $@ to fail with MinGW. @-if locale -a | grep ell_GRC.1253 > /dev/null ; then \ [ -z "$$GAWKLOCALE" ] && GAWKLOCALE=ell_GRC.1253 ; export GAWKLOCALE; \ AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ ; \ @@ -1208,7 +1192,6 @@ nsbad_cmd: # Use [:] in the regexp to keep MSYS from converting the /'s to \'s. nonfatal1: @echo $@ - @echo Expect $@ to fail with DJGPP. @-AWKPATH="$(srcdir)" $(AWK) -f $@.awk 2>&1 | $(AWK) '{print gensub(/invalid[:].*$$/, "invalid", 1, $$0)}' >_$@ || echo EXIT CODE: $$? >>_$@ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ @@ -2140,7 +2123,6 @@ rand: randtest: @echo $@ - @echo Expect $@ to fail with DJGPP. @-$(LOCALES) AWK="$(AWKPROG)" "$(srcdir)"/$@.sh > _$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ @@ -2310,7 +2292,6 @@ setrec1: sigpipe1: @echo $@ $(ZOS_FAIL) - @echo Expect $@ to fail with DJGPP. @-AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ @@ -2377,7 +2358,6 @@ strnum2: strtod: @echo $@ - @echo Expect $@ to fail with DJGPP. @-AWKPATH="$(srcdir)" $(AWK) -f $@.awk < "$(srcdir)"/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ @@ -2551,7 +2531,7 @@ fflush: getlnhd: @echo $@ - @echo Expect $@ to fail with DJGPP and MinGW. + @echo Expect $@ to fail with MinGW. @-AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ @@ -2619,44 +2599,38 @@ asortbool: backw: @echo $@ - @echo Expect $@ to fail with DJGPP. @-AWKPATH="$(srcdir)" $(AWK) -f $@.awk < "$(srcdir)"/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ clos1way: @echo $@ - @echo Expect $@ to fail with DJGPP. @-[ -z "$$GAWKLOCALE" ] && GAWKLOCALE=C; export GAWKLOCALE; \ AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ clos1way2: @echo $@ - @echo Expect $@ to fail with DJGPP. @-AWKPATH="$(srcdir)" $(AWK) -f $@.awk < "$(srcdir)"/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ clos1way3: @echo $@ - @echo Expect $@ to fail with DJGPP. @-AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ clos1way4: @echo $@ - @echo Expect $@ to fail with DJGPP. @-AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ clos1way5: @echo $@ - @echo Expect $@ to fail with DJGPP. @-AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ clos1way6: @echo $@ $(ZOS_FAIL) - @echo Expect $@ to fail with DJGPP and MinGW. + @echo Expect $@ to fail with MinGW. @-AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ @@ -2853,7 +2827,6 @@ gensub3: getlndir: @echo $@ $(ZOS_FAIL) - @echo Expect $@ to fail with DJGPP. @-AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ @@ -2864,13 +2837,11 @@ gnuops2: gnuops3: @echo $@ - @echo Expect $@ to fail with DJGPP. @-AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ gnureops: @echo $@ - @echo Expect $@ to fail with DJGPP. @-AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ @@ -2891,7 +2862,6 @@ icasers: id: @echo $@ - @echo Expect $@ to fail with DJGPP. @-AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ @@ -3024,14 +2994,14 @@ match3: mbstr1: @echo $@ $(ZOS_FAIL) - @echo Expect $@ to fail with DJGPP and MinGW. + @echo Expect $@ to fail with MinGW. @-[ -z "$$GAWKLOCALE" ] && GAWKLOCALE=ENU_USA.1252; export GAWKLOCALE; \ AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ mbstr2: @echo $@ $(ZOS_FAIL) - @echo Expect $@ to fail with DJGPP and MinGW. + @echo Expect $@ to fail with MinGW. @-[ -z "$$GAWKLOCALE" ] && GAWKLOCALE=ENU_USA.1252; export GAWKLOCALE; \ AWKPATH="$(srcdir)" $(AWK) -f $@.awk < "$(srcdir)"/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ @@ -3073,13 +3043,11 @@ nondec2: nonfatal2: @echo $@ $(ZOS_FAIL) - @echo Expect $@ to fail with DJGPP. @-AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ nonfatal3: @echo $@ - @echo Expect $@ to fail with DJGPP. @-AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ @@ -3231,7 +3199,6 @@ regnul2: regx8bit: @echo $@ - @echo Expect $@ to fail with DJGPP. @-AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ @@ -3393,7 +3360,7 @@ symtab7: timeout: @echo $@ $(ZOS_FAIL) - @echo Expect $@ to fail with DJGPP and MinGW. + @echo Expect $@ to fail with MinGW. @-AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ @@ -3484,14 +3451,14 @@ asorti: backbigs1: @echo $@ $(ZOS_FAIL) - @echo Expect $@ to fail with DJGPP and MinGW. + @echo Expect $@ to fail with MinGW. @-[ -z "$$GAWKLOCALE" ] && GAWKLOCALE=ENU_USA.1252; export GAWKLOCALE; \ AWKPATH="$(srcdir)" $(AWK) -f $@.awk < "$(srcdir)"/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ backsmalls1: @echo $@ $(ZOS_FAIL) - @echo Expect $@ to fail with DJGPP and MinGW. + @echo Expect $@ to fail with MinGW. @-[ -z "$$GAWKLOCALE" ] && GAWKLOCALE=ENU_USA.1252; export GAWKLOCALE; \ AWKPATH="$(srcdir)" $(AWK) -f $@.awk < "$(srcdir)"/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ @@ -3529,14 +3496,14 @@ lc_num1: mbfw1: @echo $@ $(ZOS_FAIL) - @echo Expect $@ to fail with DJGPP and MinGW. + @echo Expect $@ to fail with MinGW. @-[ -z "$$GAWKLOCALE" ] && GAWKLOCALE=ENU_USA.1252; export GAWKLOCALE; \ AWKPATH="$(srcdir)" $(AWK) -f $@.awk < "$(srcdir)"/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ mbprintf1: @echo $@ $(ZOS_FAIL) - @echo Expect $@ to fail with DJGPP and MinGW. + @echo Expect $@ to fail with MinGW. @-[ -z "$$GAWKLOCALE" ] && GAWKLOCALE=ENU_USA.1252; export GAWKLOCALE; \ AWKPATH="$(srcdir)" $(AWK) -f $@.awk < "$(srcdir)"/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ @@ -3555,7 +3522,7 @@ mbprintf3: mbprintf4: @echo $@ $(ZOS_FAIL) - @echo Expect $@ to fail with DJGPP and MinGW. + @echo Expect $@ to fail with MinGW. @-[ -z "$$GAWKLOCALE" ] && GAWKLOCALE=ENU_USA.1252; export GAWKLOCALE; \ AWKPATH="$(srcdir)" $(AWK) -f $@.awk < "$(srcdir)"/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ @@ -3691,7 +3658,6 @@ mpfrrndeval: mpfrsqrt: @echo $@ - @echo Expect $@ to fail with DJGPP. @-AWKPATH="$(srcdir)" $(AWK) -f $@.awk -M >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ diff --git a/pc/config.h b/pc/config.h index bec42cfa..12c14560 100644 --- a/pc/config.h +++ b/pc/config.h @@ -88,17 +88,17 @@ #undef HAVE_ICONV /* Define to 1 if the system has the type `intmax_t'. */ -#if defined(__MINGW32__) || defined(__DJGPP__) +#if defined(__MINGW32__) #define HAVE_INTMAX_T 1 #endif /* Define to 1 if you have the header file. */ -#if defined(__MINGW32__) || defined(__DJGPP__) +#if defined(__MINGW32__) #define HAVE_INTTYPES_H 1 #endif /* Define to 1 if you have the `isascii' function. */ -#if defined(__MINGW32__) || defined(__DJGPP__) +#if defined(__MINGW32__) #define HAVE_ISASCII 1 #endif @@ -121,7 +121,7 @@ #endif /* Define if you have and nl_langinfo(CODESET). */ -#if defined(__DJGPP__) || defined(__MINGW32__) +#if defined(__MINGW32__) #define HAVE_LANGINFO_CODESET 1 #endif @@ -138,7 +138,7 @@ #undef HAVE_LIBSIGSEGV /* Define to 1 if you have the header file. */ -#if defined(__MINGW32__) || defined(__DJGPP__) +#if defined(__MINGW32__) #define HAVE_LOCALE_H 1 #endif @@ -168,15 +168,10 @@ #undef HAVE_MEMCPY_ULONG /* Define to 1 if you have the `memmove' function. */ -#if defined(__MINGW32__) || defined(__DJGPP__) +#if defined(__MINGW32__) #define HAVE_MEMMOVE 1 #endif -/* Define to 1 if you have the header file. */ -#ifdef __DJGPP__ -#define HAVE_MEMORY_H 1 -#endif - /* Define to 1 if you have the `memset' function. */ #define HAVE_MEMSET 1 @@ -186,11 +181,6 @@ /* Define to 1 if you have the header file. */ #undef HAVE_MINIX_CONFIG_H -/* Define to 1 if you have the `mkstemp' function. */ -#ifdef __DJGPP__ -#define HAVE_MKSTEMP 1 -#endif - /* we have the mktime function */ #define HAVE_MKTIME 1 @@ -210,12 +200,12 @@ #undef HAVE_POSIX_OPENPT /* Define to 1 if you have the `setenv' function. */ -#if defined(__MINGW32__) || defined(__DJGPP__) +#if defined(__MINGW32__) #define HAVE_SETENV 1 #endif /* Define to 1 if you have the `setlocale' function. */ -#if defined(__MINGW32__) || defined(__DJGPP__) +#if defined(__MINGW32__) #define HAVE_SETLOCALE 1 #endif @@ -226,7 +216,7 @@ #undef HAVE_SIGPROCMASK /* Define to 1 if you have the `snprintf' function. */ -#if defined(__MINGW32__) || defined(__DJGPP__) +#if defined(__MINGW32__) #define HAVE_SNPRINTF 1 #endif @@ -241,7 +231,7 @@ #endif /* Define to 1 if stdbool.h conforms to C99. */ -#if defined(__MINGW32__) || defined(__DJGPP__) +#if defined(__MINGW32__) #define HAVE_STDBOOL_H 1 #endif @@ -251,7 +241,7 @@ #endif /* Define to 1 if you have the header file. */ -#if defined(__MINGW32__) || defined(__DJGPP__) +#if defined(__MINGW32__) #define HAVE_STDINT_H 1 #endif @@ -259,23 +249,13 @@ #undef HAVE_STDIO_H /* Define to 1 if you have the header file. */ -#if defined(__MINGW32__) || defined(__DJGPP__) +#if defined(__MINGW32__) #define HAVE_STDLIB_H 1 #endif -/* Define to 1 if you have the `strcasecmp' function. */ -#ifdef __DJGPP__ -#define HAVE_STRCASECMP 1 -#endif - /* Define to 1 if you have the `strchr' function. */ #define HAVE_STRCHR 1 -/* Define to 1 if you have the `strcoll' function. */ -#ifdef __DJGPP__ -#define HAVE_STRCOLL 1 -#endif - /* Define to 1 if you have the `strerror' function. */ #define HAVE_STRERROR 1 @@ -306,7 +286,7 @@ #define HAVE_STRTOD 1 /* Define to 1 if you have the `strtoul' function. */ -#if defined(__MINGW32__) || defined(__DJGPP__) +#if defined(__MINGW32__) #define HAVE_STRTOUL 1 #endif @@ -317,7 +297,7 @@ #undef HAVE_STRUCT_PASSWD_PW_PASSWD /* Define to 1 if `st_blksize' is a member of `struct stat'. */ -#if defined(__MINGW32__) || defined(__DJGPP__) +#if defined(__MINGW32__) #define HAVE_STRUCT_STAT_ST_BLKSIZE 1 #endif @@ -327,13 +307,8 @@ /* Define to 1 if you have the `system' function. */ #define HAVE_SYSTEM 1 -/* Define to 1 if you have the header file. */ -#ifdef __DJGPP__ -#define HAVE_SYS_IOCTL_H 1 -#endif - /* Define to 1 if you have the header file. */ -#if defined(__MINGW32__) || defined(__DJGPP__) +#if defined(__MINGW32__) #define HAVE_SYS_PARAM_H 1 #endif @@ -344,34 +319,24 @@ #undef HAVE_SYS_SOCKET_H /* Define to 1 if you have the header file. */ -#if defined(__MINGW32__) || defined(__DJGPP__) +#if defined(__MINGW32__) #define HAVE_SYS_STAT_H 1 #endif /* Define to 1 if you have the header file. */ -#if defined(__DJGPP__) || defined(__MINGW32__) +#if defined(__MINGW32__) #define HAVE_SYS_TIME_H 1 #endif /* Define to 1 if you have the header file. */ #define HAVE_SYS_TYPES_H 1 -/* Define to 1 if you have that is POSIX.1 compatible. */ -#ifdef __DJGPP__ -#define HAVE_SYS_WAIT_H 1 -#endif - /* Define to 1 if you have the header file. */ #undef HAVE_TERMIOS_H /* Define to 1 if you have the `timegm' function. */ #undef HAVE_TIMEGM -/* Define to 1 if you have the `tmpfile' function. */ -#ifdef __DJGPP__ -#define HAVE_TMPFILE 1 -#endif - /* Define to 1 if your `struct tm' has `tm_zone'. Deprecated, use `HAVE_STRUCT_TM_TM_ZONE' instead. */ #undef HAVE_TM_ZONE @@ -394,12 +359,12 @@ #define HAVE_TZSET 1 /* Define to 1 if the system has the type `uintmax_t'. */ -#if defined(__DJGPP__) || defined(__MINGW32__) +#if defined(__MINGW32__) #define HAVE_UINTMAX_T 1 #endif /* Define to 1 if you have the header file. */ -#if defined(__DJGPP__) || defined(__MINGW32__) +#if defined(__MINGW32__) #define HAVE_UNISTD_H 1 #endif @@ -407,7 +372,7 @@ #undef HAVE_UNSIGNED_LONG_LONG_INT /* Define to 1 if you have the `usleep' function. */ -#if defined(__DJGPP__) || defined(__MINGW32__) +#if defined(__MINGW32__) #define HAVE_USLEEP 1 #endif @@ -449,11 +414,6 @@ #define HAVE_WINT_T 1 #endif -/* Define to 1 if the system has the type `_Bool'. */ -#ifdef __DJGPP__ -#define HAVE__BOOL 1 -#endif - /* Define to 1 if you have the `__etoa_l' function. */ #undef HAVE___ETOA_L @@ -484,11 +444,6 @@ /* Define to 1 if *printf supports %a format */ #define PRINTF_HAS_A_FORMAT 1 -/* Define to 1 if *printf supports %F format */ -#ifdef __DJGPP__ -#define PRINTF_HAS_F_FORMAT 1 -#endif - /* The size of `unsigned int', as computed by sizeof. */ #define SIZEOF_UNSIGNED_INT 4 @@ -513,7 +468,7 @@ #undef USE_EBCDIC /* This is required to compile Gnulib regex code. */ -#if defined(__DJGPP__) || defined(__MINGW32__) +#if defined(__MINGW32__) #define _GNU_SOURCE 1 #endif /* Enable extensions on AIX 3, Interix. */ @@ -689,22 +644,5 @@ #undef uintmax_t #include "custom.h" -#ifdef __DJGPP__ -/* gcc no longer includes this by default */ -# include -/* Library search path */ -# if (__DJGPP__ > 2 || __DJGPP_MINOR__ >= 3) -# define DEFPATH ".;/dev/env/DJDIR/share/awk" -# else -# define DEFPATH ".;c:/lib/awk;c:/gnu/lib/awk" -# endif - -/* Function prototype. */ -#include -extern bool is_valid_identifier(const char *name); -#endif - -#ifndef __DJGPP__ #define HAVE_POPEN_H 1 -#endif diff --git a/pc/config.sed b/pc/config.sed index 4547a842..1c1b7a2d 100644 --- a/pc/config.sed +++ b/pc/config.sed @@ -32,10 +32,6 @@ #endif s/^#undef GETPGRP_VOID *$/#define GETPGRP_VOID 1/ s/^#undef GETGROUPS_T *$/#define GETGROUPS_T gid_t/ -/^#undef GETPGRP_VOID$/c\ -#ifdef __DJGPP__\ -#define GETPGRP_VOID 1\ -#endif s/^#undef HAVE_ALARM *$/#define HAVE_ALARM 1/ s/^#undef HAVE_ATEXIT *$/#define HAVE_ATEXIT 1/ /^#undef HAVE_BTOWC *$/c\ @@ -55,11 +51,11 @@ s/^#undef HAVE_FMOD *$/#define HAVE_FMOD 1/ #define HAVE_GETADDRINFO 1\ #endif /^#undef HAVE_INTMAX_T *$/c\ -#if defined(__MINGW32__) || defined(__DJGPP__)\ +#if defined(__MINGW32__)\ #define HAVE_INTMAX_T 1\ #endif /^#undef HAVE_INTTYPES_H *$/c\ -#if defined(__MINGW32__) || defined(__DJGPP__)\ +#if defined(__MINGW32__)\ #define HAVE_INTTYPES_H 1\ #endif /^#undef HAVE_INTTYPES_H_WITH_UINTMAX *$/c\ @@ -67,7 +63,7 @@ s/^#undef HAVE_FMOD *$/#define HAVE_FMOD 1/ #define HAVE_INTTYPES_H_WITH_UINTMAX 1\ #endif /^#undef HAVE_ISASCII *$/c\ -#if defined(__MINGW32__) || defined(__DJGPP__)\ +#if defined(__MINGW32__)\ #define HAVE_ISASCII 1\ #endif /^#undef HAVE_ISWCTYPE *$/c\ @@ -83,7 +79,7 @@ s/^#undef HAVE_FMOD *$/#define HAVE_FMOD 1/ #define HAVE_ISWUPPER 1\ #endif /^#undef HAVE_LANGINFO_CODESET *$/c\ -#if defined(__DJGPP__) || defined(__MINGW32__)\ +#if defined(__MINGW32__)\ #define HAVE_LANGINFO_CODESET 1\ #endif s/^#undef HAVE_LIBM *$/#define HAVE_LIBM 1/ @@ -91,7 +87,7 @@ s/^#undef HAVE_LIBM *$/#define HAVE_LIBM 1/ /* #undef HAVE_LIBREADLINE */ s/^#undef HAVE_LIMITS_H *$/#define HAVE_LIMITS_H 1/ /^#undef HAVE_LOCALE_H *$/c\ -#if defined(__MINGW32__) || defined(__DJGPP__)\ +#if defined(__MINGW32__)\ #define HAVE_LOCALE_H 1\ #endif /^#undef HAVE_LONG_LONG *$/c\ @@ -109,31 +105,23 @@ s/^#undef HAVE_LIMITS_H *$/#define HAVE_LIMITS_H 1/ s/^#undef HAVE_MEMCMP *$/#define HAVE_MEMCMP 1/ s/^#undef HAVE_MEMCPY *$/#define HAVE_MEMCPY 1/ /^#undef HAVE_MEMMOVE *$/c\ -#if defined(__MINGW32__) || defined(__DJGPP__)\ +#if defined(__MINGW32__)\ #define HAVE_MEMMOVE 1\ #endif -/^#undef HAVE_MEMORY_H *$/c\ -#ifdef __DJGPP__\ -#define HAVE_MEMORY_H 1\ -#endif s/^#undef HAVE_MEMSET *$/#define HAVE_MEMSET 1/ -/^#undef HAVE_MKSTEMP *$/c\ -#ifdef __DJGPP__\ -#define HAVE_MKSTEMP 1\ -#endif s/^#undef HAVE_MKTIME *$/#define HAVE_MKTIME 1/ /^#undef HAVE_MPFR *$/c\ /* #undef HAVE_MPFR */ /^#undef HAVE_SETENV *$/c\ -#if defined(__MINGW32__) || defined(__DJGPP__)\ +#if defined(__MINGW32__)\ #define HAVE_SETENV 1\ #endif /^#undef HAVE_SETLOCALE *$/c\ -#if defined(__MINGW32__) || defined(__DJGPP__)\ +#if defined(__MINGW32__)\ #define HAVE_SETLOCALE 1\ #endif /^#undef HAVE_SNPRINTF *$/c\ -#if defined(__MINGW32__) || defined(__DJGPP__)\ +#if defined(__MINGW32__)\ #define HAVE_SNPRINTF 1\ #endif /^#undef HAVE_SOCKADDR_STORAGE *$/c\ @@ -146,7 +134,7 @@ s/^#undef HAVE_MKTIME *$/#define HAVE_MKTIME 1/ #endif s/^#undef HAVE_STDARG_H *$/#define HAVE_STDARG_H 1/ /^#undef HAVE_STDBOOL_H *$/c\ -#if defined(__MINGW32__) || defined(__DJGPP__)\ +#if defined(__MINGW32__)\ #define HAVE_STDBOOL_H 1\ #endif /^#undef HAVE_STDDEF_H *$/c\ @@ -154,21 +142,13 @@ s/^#undef HAVE_STDARG_H *$/#define HAVE_STDARG_H 1/ #define HAVE_STDDEF_H 1\ #endif /^#undef HAVE_STDINT_H *$/c\ -#if defined(__MINGW32__) || defined(__DJGPP__)\ +#if defined(__MINGW32__)\ #define HAVE_STDINT_H 1\ #endif /^#undef HAVE_STDLIB_H *$/c\ -#if defined(__MINGW32__) || defined(__DJGPP__)\ +#if defined(__MINGW32__)\ #define HAVE_STDLIB_H 1\ #endif -/^#undef HAVE_STRCASECMP *$/c\ -#ifdef __DJGPP__\ -#define HAVE_STRCASECMP 1\ -#endif -/^#undef HAVE_STRCOLL *$/c\ -#ifdef __DJGPP__\ -#define HAVE_STRCOLL 1\ -#endif s/^#undef HAVE_STRCHR *$/#define HAVE_STRCHR 1/ s/^#undef HAVE_STRERROR *$/#define HAVE_STRERROR 1/ /^#undef HAVE_STRFTIME *$/c\ @@ -185,39 +165,27 @@ s/^#undef HAVE_STRING_H *$/#define HAVE_STRING_H 1/ #define HAVE_STRNCASECMP 1\ s/^#undef HAVE_STRTOD *$/#define HAVE_STRTOD 1/ /^#undef HAVE_STRTOUL *$/c\ -#if defined(__MINGW32__) || defined(__DJGPP__)\ +#if defined(__MINGW32__)\ #define HAVE_STRTOUL 1\ #endif /^#undef HAVE_STRUCT_STAT_ST_BLKSIZE *$/c\ -#if defined(__MINGW32__) || defined(__DJGPP__)\ +#if defined(__MINGW32__)\ #define HAVE_STRUCT_STAT_ST_BLKSIZE 1\ #endif -/^#undef HAVE_SYS_IOCTL_H *$/c\ -#ifdef __DJGPP__\ -#define HAVE_SYS_IOCTL_H 1\ -#endif s/^#undef HAVE_SYSTEM *$/#define HAVE_SYSTEM 1/ /^#undef HAVE_SYS_PARAM_H *$/c\ -#if defined(__MINGW32__) || defined(__DJGPP__)\ +#if defined(__MINGW32__)\ #define HAVE_SYS_PARAM_H 1\ #endif /^#undef HAVE_SYS_STAT_H *$/c\ -#if defined(__MINGW32__) || defined(__DJGPP__)\ +#if defined(__MINGW32__)\ #define HAVE_SYS_STAT_H 1\ #endif /^#undef HAVE_SYS_TIME_H *$/c\ -#if defined(__DJGPP__) || defined(__MINGW32__)\ +#if defined(__MINGW32__)\ #define HAVE_SYS_TIME_H 1\ #endif s/^#undef HAVE_SYS_TYPES_H *$/#define HAVE_SYS_TYPES_H 1/ -/^#undef HAVE_SYS_WAIT_H *$/c\ -#ifdef __DJGPP__\ -#define HAVE_SYS_WAIT_H 1\ -#endif -/^#undef HAVE_TMPFILE *$/c\ -#ifdef __DJGPP__\ -#define HAVE_TMPFILE 1\ -#endif /^#undef HAVE_TOWLOWER *$/c\ #ifdef __MINGW32__\ #define HAVE_TOWLOWER 1\ @@ -229,16 +197,16 @@ s/^#undef HAVE_SYS_TYPES_H *$/#define HAVE_SYS_TYPES_H 1/ s/^#undef HAVE_TZNAME *$/#define HAVE_TZNAME 1/ s/^#undef HAVE_TZSET *$/#define HAVE_TZSET 1/ /^#undef HAVE_UINTMAX_T *$/c\ -#if defined(__DJGPP__) || defined(__MINGW32__)\ +#if defined(__MINGW32__)\ #define HAVE_UINTMAX_T 1\ #endif /^#undef HAVE_UNISTD_H *$/c\ -#if defined(__DJGPP__) || defined(__MINGW32__)\ +#if defined(__MINGW32__)\ #define HAVE_UNISTD_H 1\ #endif s/^#undef HAVE_UNSIGNED_LONG_LONG *$/#define HAVE_UNSIGNED_LONG_LONG 1/ /^#undef HAVE_USLEEP *$/c\ -#if defined(__DJGPP__) || defined(__MINGW32__)\ +#if defined(__MINGW32__)\ #define HAVE_USLEEP 1\ #endif s/^#undef HAVE_VPRINTF *$/#define HAVE_VPRINTF 1/ @@ -270,21 +238,13 @@ s/^#undef HAVE_VPRINTF *$/#define HAVE_VPRINTF 1/ #ifdef __MINGW32__\ #define HAVE_WINT_T 1\ #endif -/^#undef HAVE__BOOL *$/c\ -#ifdef __DJGPP__\ -#define HAVE__BOOL 1\ -#endif /^#undef PRINTF_HAS_A_FORMAT *$/c\ #define PRINTF_HAS_A_FORMAT 1 -/^#undef PRINTF_HAS_F_FORMAT *$/c\ -#ifdef __DJGPP__\ -#define PRINTF_HAS_F_FORMAT 1\ -#endif s/^#undef PROTOTYPES *$/#define PROTOTYPES 1/ s/^#undef RETSIGTYPE *$/#define RETSIGTYPE void/ /^#.*RETSIGTYPE /a\ \ -#if defined(__DJGPP__) || defined(__MINGW32__)\ +#if defined(__MINGW32__)\ #include \ #endif s/^#undef SIZEOF_UNSIGNED_INT *$/#define SIZEOF_UNSIGNED_INT 4/ @@ -298,29 +258,11 @@ s/^#undef TIME_WITH_SYS_TIME *$/#define TIME_WITH_SYS_TIME 1/ /^\/\* Enable extensions on AIX 3, Interix. \*\//i\ /* This is required to compile Gnulib regex code. */\ -#if defined(__DJGPP__) || defined(__MINGW32__)\ +#if defined(__MINGW32__)\ #define _GNU_SOURCE 1\ #endif s|^#undef PACKAGE_URL *$|#define PACKAGE_URL "http://www.gnu.org/software/gawk/"| $a\ -#ifdef __DJGPP__\ -/* gcc no longer includes this by default */\ -# include \ -\ -/* Library search path */\ -# if (__DJGPP__ > 2 || __DJGPP_MINOR__ >= 3)\ -# define DEFPATH ".;/dev/env/DJDIR/share/awk"\ -# else\ -# define DEFPATH ".;c:/lib/awk;c:/gnu/lib/awk"\ -# endif\ -\ -/* Function prototype. */\ -#include \ -extern bool is_valid_identifier(const char *name);\ -#endif\ -\ -#ifndef __DJGPP__\ -#define HAVE_POPEN_H 1\ -#endif +#define HAVE_POPEN_H 1 diff --git a/pc/gawkmisc.pc b/pc/gawkmisc.pc index 813c201a..c37d9934 100644 --- a/pc/gawkmisc.pc +++ b/pc/gawkmisc.pc @@ -193,7 +193,7 @@ os_close_on_exec(fd, name, what, dir) int fd; const char *name, *what, *dir; { -#if (defined(__DJGPP__) && (__DJGPP__ > 2 || __DJGPP_MINOR__ >= 4)) +#if __DJGPP__ > 2 || __DJGPP_MINOR__ >= 4 if (fd <= 2) /* sanity */ return; @@ -259,10 +259,6 @@ os_is_setuid() /* os_setbinmode --- set binary mode on file */ -#ifdef __DJGPP__ -#include -#include -#endif static int orig_tty_mode = -1; int @@ -271,10 +267,6 @@ int fd, mode; { int prev_mode = setmode(fd, mode); -#ifdef __DJGPP__ - if ((mode & O_BINARY) != 0) - __djgpp_set_ctrl_c(1); /* allow to interrupt with Ctrl-C */ -#endif /* Save the original tty mode as we found it. */ if (orig_tty_mode == -1 && fd >= 0 && fd <= 2) orig_tty_mode = prev_mode; @@ -834,7 +826,7 @@ os_maybe_set_errno (void) #endif /* __MINGW32__ */ -#if defined(__DJGPP__) || defined(__MINGW32__) +#if defined(__MINGW32__) void init_sockets(void) @@ -849,49 +841,4 @@ init_sockets(void) #endif } -#endif /* __DJGPP__ || __MINGW32__ */ - -#ifdef __DJGPP__ - -/* Replacement for the missing nl_langinfo. DJGPP provides only C locale. */ -#include - -char * -nl_langinfo (int item) -{ - switch (item) - { - case CODESET: - default: - return (char *) ""; - } -} - - -# if __DJGPP__ == 2 && __DJGPP_MINOR__ < 4 -int -unsetenv (const char *name) -{ - if (!name || !*name || strchr (name, '=') != NULL) - return -1; - - return putenv (name); -} -#endif - -/* This is needed to defeat too-clever GCC warnings in dfa.c about - comparison being always false due to limited range of data type. */ -wint_t -btowc (int c) -{ - return c; -} - -wint_t -putwc(wchar_t wc, FILE *stream) -{ - return MB_CUR_MAX == 1 && wc > 0 && wc <= UCHAR_MAX - && putc((unsigned char)wc, stream) != EOF ? (wint_t)wc : WEOF; -} - -#endif /* __DJGPP__ */ +#endif /* __MINGW32__ */ diff --git a/pc/getid.c b/pc/getid.c index 71491acf..543c559c 100644 --- a/pc/getid.c +++ b/pc/getid.c @@ -50,9 +50,9 @@ int getpgrp(void) return (0); } -#if defined(__DJGPP__) || defined(__MINGW32__) +#if defined(__MINGW32__) int getppid(void) { return (0); } -#endif /* __DJGPP__ || __MINGW32__ */ +#endif /* __MINGW32__ */ diff --git a/pc/popen.h b/pc/popen.h index 8e893326..4e6f125f 100644 --- a/pc/popen.h +++ b/pc/popen.h @@ -22,7 +22,6 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */ -#if !defined (__DJGPP__) # if defined (popen) # undef popen # undef pclose @@ -31,11 +30,10 @@ # define pclose(f) os_pclose(f) extern FILE *os_popen( const char *, const char * ); extern int os_pclose( FILE * ); -# ifdef __MINGW32__ +#ifdef __MINGW32__ # define system(c) os_system(c) extern int os_system( const char * ); # define SIGKILL 9 extern int kill( int, int ); extern char *quote_cmd( const char * ); -# endif /* __MINGW32__ */ -#endif /* !__DJGPP__ */ +#endif /* __MINGW32__ */ diff --git a/profile.c b/profile.c index a5b91569..5b07e223 100644 --- a/profile.c +++ b/profile.c @@ -119,17 +119,12 @@ set_prof_file(const char *file) void init_profiling_signals() { -#ifdef __DJGPP__ - signal(SIGINT, dump_and_exit); - signal(SIGQUIT, just_dump); -#else /* !__DJGPP__ */ #ifdef SIGHUP signal(SIGHUP, dump_and_exit); #endif #ifdef SIGUSR1 signal(SIGUSR1, just_dump); #endif -#endif /* !__DJGPP__ */ } /* indent --- print out enough tabs */ diff --git a/re.c b/re.c index d709a5ef..fa94fdd6 100644 --- a/re.c +++ b/re.c @@ -388,7 +388,7 @@ void dfaerror(const char *s) { fatal("%s", s); - exit(EXIT_FATAL); /* for DJGPP */ + exit(EXIT_FATAL); } /* re_cache_get --- populate regexp cache if empty */ diff --git a/replace.c b/replace.c index 77670b06..cf97f39d 100644 --- a/replace.c +++ b/replace.c @@ -114,7 +114,3 @@ #ifndef HAVE_STRCOLL #include "missing_d/strcoll.c" #endif - -#if defined(__DJGPP__) -#include "missing_d/wcmisc.c" -#endif diff --git a/test/ChangeLog b/test/ChangeLog index 32ba55e1..7a342484 100644 --- a/test/ChangeLog +++ b/test/ChangeLog @@ -1,3 +1,7 @@ +2022-07-06 Arnold D. Robbins + + * Makefile.am (EXPECTED_FAIL_DJGPP): Removed. + 2022-07-01 Arnold D. Robbins * Makefile.am: Update copyright year. diff --git a/test/Makefile.am b/test/Makefile.am index 46e22334..e3e2c707 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -1589,15 +1589,6 @@ NEED_LOCALE_JP = mbprintf2 NEED_LOCALE_RU = mtchi18n -# List of tests that fail on DJGPP -EXPECTED_FAIL_DJGPP = \ - backbigs1 backsmalls1 backw beginfile1 clos1way clos1way2 \ - clos1way3 clos1way4 clos1way5 clos1way6 errno getlndir \ - getlnhd gnuops3 gnureops id ignrcas3 inetdayt inetdayu \ - inetecht inetechu inftest jarebug mbfw1 mbprintf1 mbprintf4 \ - mbstr1 mbstr2 mpfrsqrt nonfatal1 nonfatal2 nonfatal3 pid pty1 pty2 \ - randtest regx8bit strtod sigpipe1 symtab6 timeout - # List of tests that fail on MinGW EXPECTED_FAIL_MINGW = \ backbigs1 backsmalls1 clos1way6 devfd devfd1 devfd2 \ @@ -1627,7 +1618,7 @@ GENTESTS_UNUSED = Makefile.in checknegtime.awk dtdgport.awk fix-fmtspcl.awk \ printfloat.awk readdir0.awk valgrind.awk xref.awk \ readall1.awk readall2.awk -# List of tests on MinGW or DJGPP that need a different cmp program +# List of tests on MinGW that need a different cmp program NEED_TESTOUTCMP = \ beginfile2 double2 exit fmttest hsprint posix profile5 space diff --git a/test/Makefile.in b/test/Makefile.in index 0520e71f..f801a253 100644 --- a/test/Makefile.in +++ b/test/Makefile.in @@ -1856,16 +1856,6 @@ NEED_LOCALE_EN = \ NEED_LOCALE_JP = mbprintf2 NEED_LOCALE_RU = mtchi18n -# List of tests that fail on DJGPP -EXPECTED_FAIL_DJGPP = \ - backbigs1 backsmalls1 backw beginfile1 clos1way clos1way2 \ - clos1way3 clos1way4 clos1way5 clos1way6 errno getlndir \ - getlnhd gnuops3 gnureops id ignrcas3 inetdayt inetdayu \ - inetecht inetechu inftest jarebug mbfw1 mbprintf1 mbprintf4 \ - mbstr1 mbstr2 mpfrsqrt nonfatal1 nonfatal2 nonfatal3 pid pty1 pty2 \ - randtest regx8bit strtod sigpipe1 symtab6 timeout - - # List of tests that fail on MinGW EXPECTED_FAIL_MINGW = \ backbigs1 backsmalls1 clos1way6 devfd devfd1 devfd2 \ @@ -1896,7 +1886,7 @@ GENTESTS_UNUSED = Makefile.in checknegtime.awk dtdgport.awk fix-fmtspcl.awk \ readall1.awk readall2.awk -# List of tests on MinGW or DJGPP that need a different cmp program +# List of tests on MinGW that need a different cmp program NEED_TESTOUTCMP = \ beginfile2 double2 exit fmttest hsprint posix profile5 space -- cgit v1.2.1 From 8c7f9f0b1d073fd907d28278e81cc458a7e20b39 Mon Sep 17 00:00:00 2001 From: Antonio Giovanni Colombo Date: Wed, 6 Jul 2022 16:05:14 +0200 Subject: no more os/2 support... --- doc/it/ChangeLog | 4 ++++ doc/it/gawktexi.in | 70 ++++++++++++++++++++++++++++++++++++++++-------------- 2 files changed, 56 insertions(+), 18 deletions(-) diff --git a/doc/it/ChangeLog b/doc/it/ChangeLog index 3b9220f7..98c78d30 100644 --- a/doc/it/ChangeLog +++ b/doc/it/ChangeLog @@ -1,3 +1,7 @@ +2022-07-06 Antonio Giovanni Colombo + + * gawktexi.in: Updated. + 2022-06-29 Antonio Giovanni Colombo * gawktexi.in: Updated. diff --git a/doc/it/gawktexi.in b/doc/it/gawktexi.in index 1ec4909d..a837f33b 100755 --- a/doc/it/gawktexi.in +++ b/doc/it/gawktexi.in @@ -1085,7 +1085,7 @@ Copyright dell'edizione italiana @copyright{} 2016 -- Free Software Foundation, esattamente. * Confronti tra valori in VM:: Come confrontare valori in virgola mobile. * Gli errori si sommano:: Gli errori diventano sempre maggiori. -* Valori strani:: Un cenno riguardo ai valori infiniti e a NaN [Non un Numero]. +* Valori strani:: Un cenno riguardo ai valori infiniti e a NaN [Not a Number]. * Ottenere la precisione:: Ottenere la precisione voluta. * Tentare di arrotondare:: Tentare di aggiungere bit di precisione e arrotondare. @@ -10760,7 +10760,7 @@ stampare valori non validi, o comportarsi in modo completamente differente. @quotation NOTA Lo standard IEEE 754 per l'aritmetica in virgola mobile consente di avere valori speciali per rappresentare ``infinito'' (sia positivo che -negativo) e valori che sono ``non numerici'' (NaN - [Non un Numero]). +negativo) e valori che sono ``non numerici'' (NaN - [Not a Number]). L'input e l'output di tali valori avviene sotto forma di stringhe di testo. Ci@`o pone dei problemi nel linguaggio @command{awk}, che @@ -19422,7 +19422,7 @@ modalit@`a compatibile (@pxref{Opzioni}). @cindexawkfunc{log} @cindex logaritmo Restituisce il logaritmo naturale di @var{x}, se @var{x} @`e positivo; -altrimenti, restituisce NaN (``not a number'',[Non un Numero]) +altrimenti, restituisce NaN (``Not a Number'',[Non un Numero]) sui sistemi che implementano lo standard IEEE 754. Inoltre, @command{gawk} stampa un messaggio di avvertimento qualora @code{x} sia negativo. @@ -32630,7 +32630,7 @@ delle costanti numeriche; se sono stati usati dei valori ottali o esadecimali nel codice sorgente, questi compariranno nell'output nello stesso formato con cui sono stati inseriti. -@node memoria persistente +@node Memoria persistente @section Preservare dati fra successive esecuzioni di @command{gawk} A partire dalle versione @value{PVERSION} 5.2, @command{gawk} supporta @@ -36732,8 +36732,8 @@ per questa descrizione, che abbiamo parafrasato, e per gli esempi.} Questo @`e un valore speciale che risulta da un calcolo che non ha come risposta un numero reale. In tal caso, i programmi possono o ricevere -un’eccezione di virgola mobile, o restituire NaN [Non un Numero] come risultato. -Lo standard IEEE 754 consiglia che i sistemi restituiscano NaN [Non un Numero]. +un’eccezione di virgola mobile, o restituire NaN [Not a Number] come risultato. +Lo standard IEEE 754 consiglia che i sistemi restituiscano NaN [Not a Number]. Alcuni esempi: @table @code @@ -36756,11 +36756,11 @@ per cui il risultato @`e @code{NaN}. I valori Nan sono strani. In particolare, non possono essere confrontati con altri numeri in virgola mobile; ogni confronto di questo tipo, eccetto quello ``non uguale a'', restituisce il valore ``falso''. -I valori NaN [Non un Numero] sono talmente differenti da altri valori che perfino il +I valori NaN [Not a Number] sono talmente differenti da altri valori che perfino il confronto di due valori NaN identici fra loro con @code{!=} restituisce il valore ``vero''! -I valori NaN [Non un Numero] possono anche avere un segno (positivo o negativo), +I valori NaN [Not a Number] possono anche avere un segno (positivo o negativo), anche se dipende dall'implementazione quale segno viene restituito da qualsiasi operazione il cui risultato sia un valore NaN. Per esempio, su alcuni sistemi la funzione @code{sqrt(-1)} @@ -37574,7 +37574,7 @@ esadecimale (p.es., @code{0xDEADBEEF}). (Da notare: valore dei dati letti, @item Supporto per i valori in virgola mobile speciali IEEE 754 ``not a number'' -(NaN) [Non un Numero], pi@`u infinito (``inf'') e meno infinito (``@minus{}inf''). +(NaN) [Not a Number], pi@`u infinito (``inf'') e meno infinito (``@minus{}inf''). In particolare, il formato per questi valori @`e quello specificato dallo standard C ISO 1999, che non distingue maiuscole/minuscole e pu@`o consentire caratteri aggiuntivi dipendenti dall'implementazione dopo il @samp{nan}, e @@ -37662,7 +37662,7 @@ speciali. Cos@`{@dotless{i}}, @samp{+nan} e @samp{+NaN} sono la stessa cosa. @cindex POSIX @subentry modalit@`a Oltre a gestire l'input, @command{gawk} deve anche stampare valori -``corretti'' in output, quando un valore sia NaN [Non un Numero] +``corretti'' in output, quando un valore sia NaN [Not a Number] o Infinity [Infinito]. A partire dalla @value{PVERSION} 4.2.2, per tali valori @command{gawk} stampa una delle quattro stringhe sopra descritte: @@ -43833,9 +43833,22 @@ MirBSD GNU/Linux su Alpha @end itemize +@item +Il supporto per i seguenti sistemi è stato rimosso dal +codice sorgente @command{gawk} a partire dalla @value{PVERSION} 5.2: + + +@c nested table +@itemize @value{MINUS} +@item +OS/2 + +@c add more removed systems here + @end itemize @c XXX ADD MORE STUFF HERE +@end itemize @c This does not need to be in the formal book. @@ -44719,12 +44732,38 @@ e ora sono pi@`u ragionevoli. (@pxref{Opzioni}). @item -La gestione dei valori Infinity [Infinito] e NaN [Non un Numero] +La gestione dei valori Infinity [Infinito] e NaN [Not a Number] @`e stata migliorata. @xref{Definizioni matematiche} e vedere anche @ref{Problemi virgola mobile POSIX}. @end itemize +La Versione 5.2 ha aggiunto le seguenti funzionalità: + +@itemize +@item +La funzione predefinita @code{mkbool()} +(@pxref{Funzioni booleane}). + +@item +Le espressioni di intervallo sono consentite +per default nelle espressioni regolari +(@pxref{Espressioni di intervallo}). + +@item +Lo script @command{gawkbug} per la segnalazione di bug +(@pxref{Indirizzo bug}). + +@cindex Kelly, Terence +@item +L'allocatore di memoria persistente di Terence Kelly (PMA) è stato +integrato, consentendo l'uso di dati persistenti +[fra successive chiamate di @command{gawk}] su alcuni +sistemi +(@pxref{Memoria persistente}). + +@end itemize + @c XXX ADD MORE STUFF HERE @end ifclear @@ -46826,7 +46865,7 @@ con un @value{DF} in input che possa riprodurre il problema. @item @cindex @command{gawkbug} utility @cindex programma di utilit@`a @subentry @command{gawkbug} -Si usi il programma @command{gawkbug} per preparare la segnalazione +Si usi lo script @command{gawkbug} per preparare la segnalazione del bug. Questo programma prepara un modello di segnalazione di bug e vi permette di modificarlo nel vostro programma di edit. Va quindi modificato appropriatamente per includere: @@ -46867,7 +46906,7 @@ lingua che tutti i manutentori comprendono.} @cindex indirizzo email per segnalare bug @subentry @email{bug-gawk@@gnu.org} @cindex bug @subentry segnalare @subentry indirizzo email, @email{bug-gawk@@gnu.org} @cindex segnalare bug @subentry indirizzo email @subentry @email{bug-gawk@@gnu.org} -Il programma @command{gawkbug} spedisce un messaggio di posta elettronica a +Lo script @command{gawkbug} spedisce un messaggio di posta elettronica a @EMAIL{bug-gawk@@gnu.org,bug (trattino) gawk (chiocciola) gnu (punto) org}. I manutentori di @command{gawk} sono i destinatari, e riceveranno la @@ -47149,10 +47188,6 @@ Le persone che si occupano delle varie versioni di @command{gawk} sono: @item MS-Windows con MinGW @tab Eli Zaretskii, @EMAIL{eliz@@gnu.org,eliz (chiocciola) gnu (punto) org} -@c Leave this in the document on purpose. -@c OS/2 is not mentioned anywhere else though. -@item OS/2 @tab Andreas Buening, @EMAIL{andreas.buening@@nexgo.de,andreas (punto) buening (chiocciola) nexgo (punto) de} - @item VMS @tab John Malmberg, @EMAIL{wb8tyw@@qsl.net,wb8tyw (chiocciola) qsl (punto) net} @item z/OS (OS/390) @tab Daniel Richard G.@: @EMAIL{skunk@@iSKUNK.ORG,skunk (chiocciola) iSKUNK (punto) ORG} @@ -47512,7 +47547,6 @@ per poter scaricare il file. @command{gawk} pu@`o essere installato anche su sistemi non-POSIX. I sistemi correntemente supportati sono MS-Windows, usando MSYS, MSYS2, DJGPP, MinGW e Cygwin, -@c OS/2, e sia Vax/VMS che OpenVMS. Le istruzioni per ognuno di questi sistemi sono incluse in @ifnotinfo -- cgit v1.2.1 From 8c6df3835eb7010aa2ca80e4562a1bc179b06a7f Mon Sep 17 00:00:00 2001 From: "Arnold D. Robbins" Date: Thu, 7 Jul 2022 10:14:44 +0300 Subject: Remove mbsupport.h. --- ChangeLog | 4 ++++ mbsupport.h | 58 ---------------------------------------------------------- 2 files changed, 4 insertions(+), 58 deletions(-) delete mode 100644 mbsupport.h diff --git a/ChangeLog b/ChangeLog index acfb88f8..bf467059 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2022-07-07 Arnold D. Robbins + + * mbsupport.h: Removed. + 2022-07-06 Arnold D. Robbins * README: Updated. Remove mention of DJGPP. diff --git a/mbsupport.h b/mbsupport.h deleted file mode 100644 index 51cec3c7..00000000 --- a/mbsupport.h +++ /dev/null @@ -1,58 +0,0 @@ -/* - * mbsupport.h --- Localize determination of whether we have multibyte stuff. - */ - -/* - * Copyright (C) 2004, 2005, 2011, 2012, 2015, 2016 - * the Free Software Foundation, Inc. - * - * This file is part of GAWK, the GNU implementation of the - * AWK Programming Language. - * - * GAWK is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * GAWK 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA - */ - - -#ifdef __DJGPP__ -# undef MB_CUR_MAX -# define MB_CUR_MAX 1 - -/* All this glop is for DGJPP */ - -#define towupper toupper -#define towlower tolower -#define iswalnum isalnum -#define iswalpha isalpha -#define iswupper isupper -#define iswlower islower - -#define mbrtowc(wcp, s, e, mbs) (-1) -#define mbrlen(s, e, mbs) strlen(s) -#define wcrtomb(wc, b, mbs) (-1) -#define wcslen strlen -#define wctob(wc) (EOF) - -#if (__DJGPP__ > 2 || __DJGPP_MINOR__ >= 3) -# include -# include -# include -#else -# define mbstate_t int -#endif - -extern wctype_t wctype(const char *name); -extern int iswctype(wint_t wc, wctype_t desc); -extern int wcscoll(const wchar_t *ws1, const wchar_t *ws2); -#endif -- cgit v1.2.1 From 77aa3567360cf278addefe158d5c5038ac17a374 Mon Sep 17 00:00:00 2001 From: Antonio Giovanni Colombo Date: Thu, 7 Jul 2022 15:11:13 +0200 Subject: update for drop of DJGPP support --- doc/it/ChangeLog | 4 ++++ doc/it/gawktexi.in | 25 +++++++++++-------------- 2 files changed, 15 insertions(+), 14 deletions(-) diff --git a/doc/it/ChangeLog b/doc/it/ChangeLog index 98c78d30..d3fee608 100644 --- a/doc/it/ChangeLog +++ b/doc/it/ChangeLog @@ -1,3 +1,7 @@ +2022-07-07 Antonio Giovanni Colombo + + * gawktexi.in: Updated. + 2022-07-06 Antonio Giovanni Colombo * gawktexi.in: Updated. diff --git a/doc/it/gawktexi.in b/doc/it/gawktexi.in index a837f33b..42305126 100755 --- a/doc/it/gawktexi.in +++ b/doc/it/gawktexi.in @@ -17138,12 +17138,8 @@ uno dei seguenti: @c nested table @table @code -@item "djgpp" @itemx "mingw" -Microsoft Windows, utilizzando DJGPP o MinGW, rispettivamente. - -@item "os2" -OS/2. +Microsoft Windows, utilizzando MinGW. @item "os390" OS/390. @@ -43834,7 +43830,7 @@ GNU/Linux su Alpha @end itemize @item -Il supporto per i seguenti sistemi è stato rimosso dal +Il supporto per i seguenti sistemi @`e stato rimosso dal codice sorgente @command{gawk} a partire dalla @value{PVERSION} 5.2: @@ -43843,7 +43839,8 @@ codice sorgente @command{gawk} a partire dalla @value{PVERSION} 5.2: @item OS/2 -@c add more removed systems here +@item +DJGPP @end itemize @@ -44738,7 +44735,7 @@ La gestione dei valori Infinity [Infinito] e NaN [Not a Number] @ref{Problemi virgola mobile POSIX}. @end itemize -La Versione 5.2 ha aggiunto le seguenti funzionalità: +La Versione 5.2 ha aggiunto le seguenti funzionalit@`a: @itemize @item @@ -44756,7 +44753,7 @@ Lo script @command{gawkbug} per la segnalazione di bug @cindex Kelly, Terence @item -L'allocatore di memoria persistente di Terence Kelly (PMA) è stato +L'allocatore di memoria persistente di Terence Kelly (PMA) @`e stato integrato, consentendo l'uso di dati persistenti [fra successive chiamate di @command{gawk}] su alcuni sistemi @@ -46185,10 +46182,13 @@ usando gli strumenti MinGW, scrivere @samp{make mingw32}. @cindex PC @subentry @command{gawk} su sistemi operativi per @cindex sistemi operativi @subentry per PC @subentry @command{gawk} su +L'informazione in questa sezione si applica alla versione di @command{gawk} +per PC disponibile sotto MinGW. @xref{Cygwin} per informazioni sulla +versione di @command{gawk} per PC disponibile sotto Cygwin. + Sotto MS-Windows, l'ambiente MinGW consente di usare sia l'operatore @samp{|&} che le operazioni su rete TCP/IP (@pxref{Reti TCP/IP}). -L'ambiente DJGPP non consente di usare @samp{|&}. @cindex percorso di ricerca @cindex percorso di ricerca @subentry per file sorgente @@ -47175,7 +47175,6 @@ Le persone che si occupano delle varie versioni di @command{gawk} sono: @cindex G., Daniel Richard @cindex Robbins @subentry Arnold @cindex Zaretskii, Eli -@cindex Guerrero, Juan Manuel @ifset SMALLPRINT @multitable {MS-Windows} {123456789012345678901234567890123456789001234567890} @end ifset @@ -47184,8 +47183,6 @@ Le persone che si occupano delle varie versioni di @command{gawk} sono: @end ifclear @item Unix e sistemi POSIX @tab Arnold Robbins, @EMAIL{arnold@@skeeve.com,arnold (chiocciola) skeeve (punto) com} -@item MS-DOS with DJGPP @tab Juan Manuel Guerrero, @EMAIL{juan.guerrero@@gmx.de, juan (punto) guerrero (chiocciola) gmx (punto) de} - @item MS-Windows con MinGW @tab Eli Zaretskii, @EMAIL{eliz@@gnu.org,eliz (chiocciola) gnu (punto) org} @item VMS @tab John Malmberg, @EMAIL{wb8tyw@@qsl.net,wb8tyw (chiocciola) qsl (punto) net} @@ -47546,7 +47543,7 @@ per poter scaricare il file. @item @command{gawk} pu@`o essere installato anche su sistemi non-POSIX. I sistemi correntemente supportati sono MS-Windows, usando -MSYS, MSYS2, DJGPP, MinGW e Cygwin, +MSYS, MSYS2, MinGW e Cygwin, e sia Vax/VMS che OpenVMS. Le istruzioni per ognuno di questi sistemi sono incluse in @ifnotinfo -- cgit v1.2.1 From ff1f652ddb88dcd84edaffa9d2e5fe331aefabc9 Mon Sep 17 00:00:00 2001 From: "Arnold D. Robbins" Date: Thu, 7 Jul 2022 20:30:49 +0300 Subject: Doc updates. --- doc/ChangeLog | 5 +++++ doc/gawk.info | 6 ++++-- doc/gawk.texi | 6 ++++-- doc/gawktexi.in | 4 +++- 4 files changed, 16 insertions(+), 5 deletions(-) diff --git a/doc/ChangeLog b/doc/ChangeLog index bf386be7..067a4333 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -1,3 +1,8 @@ +2022-07-07 Arnold D. Robbins + + * gawktexi.in: Additional indexing. Thanks to Antonio + Columbo for the report. + 2022-07-06 Arnold D. Robbins * gawktexi.in: Remove stuff related to DJGPP. diff --git a/doc/gawk.info b/doc/gawk.info index 16af2c5b..5b3126f8 100644 --- a/doc/gawk.info +++ b/doc/gawk.info @@ -2755,7 +2755,7 @@ The following list describes options mandated by the POSIX standard: 'gawk' are "on parole." The primary maintainer is no longer willing to support this feature, but another member of the development team has stepped up to take it over. As long as this - situation reamins stable, MPFR will be supported. If it changes, + situation remains stable, MPFR will be supported. If it changes, the MPFR support will be removed from 'gawk'. '-n' @@ -37449,7 +37449,6 @@ Index * gsub() function, escape processing: Gory Details. (line 6) * Guerrero, Juan Manuel: Acknowledgments. (line 60) * Guerrero, Juan Manuel <1>: Contributors. (line 150) -* Guerrero, Juan Manuel <2>: Maintainers. (line 14) * h debugger command (alias for help): Miscellaneous Debugger Commands. (line 67) * Hankerson, Darrel: Acknowledgments. (line 60) @@ -37606,6 +37605,9 @@ Index * Kahrs, Jürgen: Acknowledgments. (line 60) * Kahrs, Jürgen <1>: Contributors. (line 71) * Kasal, Stepan: Acknowledgments. (line 60) +* Kelly, Terence: Persistent Memory. (line 55) +* Kelly, Terence <1>: Persistent Memory. (line 77) +* Kelly, Terence <2>: Feature History. (line 505) * Kenobi, Obi-Wan: Undocumented. (line 6) * Kernighan, Brian: History. (line 17) * Kernighan, Brian, quotes: Conventions. (line 38) diff --git a/doc/gawk.texi b/doc/gawk.texi index 62a04d37..f5a23722 100644 --- a/doc/gawk.texi +++ b/doc/gawk.texi @@ -4203,7 +4203,7 @@ the arbitrary precision arithmetic features in @command{gawk} are ``on parole.'' The primary maintainer is no longer willing to support this feature, but another member of the development team has stepped up to take it over. -As long as this situation reamins stable, MPFR will be supported. If it +As long as this situation remains stable, MPFR will be supported. If it changes, the MPFR support will be removed from @command{gawk}. @ignore If you use this option, @command{gawk} generates a warning message. @@ -31029,6 +31029,7 @@ and arrays, not the totality of @command{gawk}'s internal state. This lets you share data between unrelated programs, eliminating the need for scripts to communicate via text files. +@cindex Kelly, Terence Terence Kelly, the author of the persistent memory allocator @command{gawk} uses, provides the following advice about the backing file: @@ -31063,6 +31064,7 @@ Here are articles and web links that provide more information about persistent memory and why it's useful in a scripting language like @command{gawk}. +@cindex Kelly, Terence @table @asis @item @uref{https://web.eecs.umich.edu/~tpkelly/pma/} This is the canonical source for Terence Kelly's Persistent Memory @@ -41903,6 +41905,7 @@ enabled by default (@pxref{Interval Expressions}). The @command{gawkbug} script for reporting bugs (@pxref{Bug address}). +@cindex Kelly, Terence @item Terence Kelly's persistent memory allocator (PMA) was added, allowing the use of persistent data on certain systems @@ -44033,7 +44036,6 @@ The people maintaining the various @command{gawk} ports are: @cindex G., Daniel Richard @cindex Robbins @subentry Arnold @cindex Zaretskii, Eli -@cindex Guerrero, Juan Manuel @multitable {MS-Windows with MinGW} {123456789012345678901234567890123456789001234567890} @item Unix and POSIX systems @tab Arnold Robbins, @EMAIL{arnold@@skeeve.com,arnold at skeeve dot com} diff --git a/doc/gawktexi.in b/doc/gawktexi.in index 8af244cc..7fcd7e05 100644 --- a/doc/gawktexi.in +++ b/doc/gawktexi.in @@ -29911,6 +29911,7 @@ and arrays, not the totality of @command{gawk}'s internal state. This lets you share data between unrelated programs, eliminating the need for scripts to communicate via text files. +@cindex Kelly, Terence Terence Kelly, the author of the persistent memory allocator @command{gawk} uses, provides the following advice about the backing file: @@ -29945,6 +29946,7 @@ Here are articles and web links that provide more information about persistent memory and why it's useful in a scripting language like @command{gawk}. +@cindex Kelly, Terence @table @asis @item @uref{https://web.eecs.umich.edu/~tpkelly/pma/} This is the canonical source for Terence Kelly's Persistent Memory @@ -40746,6 +40748,7 @@ enabled by default (@pxref{Interval Expressions}). The @command{gawkbug} script for reporting bugs (@pxref{Bug address}). +@cindex Kelly, Terence @item Terence Kelly's persistent memory allocator (PMA) was added, allowing the use of persistent data on certain systems @@ -42876,7 +42879,6 @@ The people maintaining the various @command{gawk} ports are: @cindex G., Daniel Richard @cindex Robbins @subentry Arnold @cindex Zaretskii, Eli -@cindex Guerrero, Juan Manuel @multitable {MS-Windows with MinGW} {123456789012345678901234567890123456789001234567890} @item Unix and POSIX systems @tab Arnold Robbins, @EMAIL{arnold@@skeeve.com,arnold at skeeve dot com} -- cgit v1.2.1 From d2e694ad66a379fa128137d19c10b77b942972f2 Mon Sep 17 00:00:00 2001 From: "Arnold D. Robbins" Date: Fri, 8 Jul 2022 10:00:17 +0300 Subject: Squashed commit of the following: commit 50fbb5b087ad2d3522be24276df77bd2f20e5733 Merge: f8246bcd ff1f652d Author: Arnold D. Robbins Date: Thu Jul 7 20:32:20 2022 +0300 Merge branch 'master' into feature/mdim-start-again commit f8246bcd2aa993f686ebedfa52b073f8aecb3d6a Merge: e9e57774 fe43a264 Author: Arnold D. Robbins Date: Thu Jul 7 10:19:59 2022 +0300 Merge branch 'master' into feature/mdim-start-again commit e9e577747cfbe1d20db47a2ab58d57d27564f75f Merge: 4585a0b3 37989990 Author: Arnold D. Robbins Date: Tue Jul 5 11:26:20 2022 +0300 Merge branch 'master' into feature/mdim-start-again commit 4585a0b3090e686493f6f74df9224a5dd36a15e8 Author: Arnold D. Robbins Date: Sun Jul 3 21:11:54 2022 +0300 Additional fix. commit 72aee849f9ea9b979118a17b7cddb6d3eff85027 Merge: 114fba55 30af96ec Author: Arnold D. Robbins Date: Fri Jul 1 11:55:14 2022 +0300 Merge branch 'master' into feature/mdim-start-again commit 114fba55758093388c60d004d3f8718290cd752b Merge: a85b4b76 5b4a2474 Author: Arnold D. Robbins Date: Fri Jul 1 11:52:54 2022 +0300 Merge branch 'master' into feature/mdim-start-again commit a85b4b76890962a2c47f15ab76e0462e5c795dd5 Author: Arnold D. Robbins Date: Thu Jun 30 21:51:45 2022 +0300 Fix TOP_SCALAR and POP_SCALAR for Node_elem_new. commit 342bd54e3e87c0b127fcdb1296f4b4ca96b863fd Author: Arnold D. Robbins Date: Wed Jun 29 08:04:10 2022 +0300 New branch to continue on mdim stuff. Sigh. --- ChangeLog | 108 +++++ NEWS | 3 + array.c | 31 +- awk.h | 19 +- builtin.c | 3 +- cint_array.c | 2 +- debug.c | 13 +- eval.c | 31 ++ ext.c | 2 +- gawkapi.c | 12 +- int_array.c | 2 +- interpret.h | 31 +- mpfr.c | 9 + node.c | 9 + pc/ChangeLog | 12 + pc/Makefile.tst | 21 + str_array.c | 2 +- symbol.c | 2 + test/ChangeLog | 19 + test/Makefile.am | 10 + test/Makefile.in | 30 ++ test/Maketests | 20 + test/aadelete1.awk | 2 +- test/aadelete1.ok | 2 - test/mdim1.awk | 15 + test/mdim1.ok | 9 + test/mdim2.awk | 9 + test/mdim2.ok | 1 + test/mdim3.awk | 29 ++ test/mdim3.ok | 520 ++++++++++++++++++++ test/mdim4.awk | 168 +++++++ test/mdim4.in | 1373 ++++++++++++++++++++++++++++++++++++++++++++++++++++ test/mdim4.ok | 1373 ++++++++++++++++++++++++++++++++++++++++++++++++++++ test/typeof3.awk | 2 +- test/typeof3.ok | 4 +- 35 files changed, 3874 insertions(+), 24 deletions(-) create mode 100644 test/mdim1.awk create mode 100644 test/mdim1.ok create mode 100644 test/mdim2.awk create mode 100644 test/mdim2.ok create mode 100644 test/mdim3.awk create mode 100644 test/mdim3.ok create mode 100644 test/mdim4.awk create mode 100644 test/mdim4.in create mode 100644 test/mdim4.ok diff --git a/ChangeLog b/ChangeLog index bf467059..43ebd457 100644 --- a/ChangeLog +++ b/ChangeLog @@ -10,6 +10,15 @@ 2022-07-03 Arnold D. Robbins + * awk.h (TOP_SCALAR): Put converted value back on the stack + for any subsequent use. + +2022-06-30 Arnold D. Robbins + + * awk.h (POP_SCALAR): Convert Node_elem_new into a scalar. + (TOP_SCALAR): Ditto. + + Unrelated: * README: Updated. Remove mention of OS/2. * awk.h, awgram.y. gawkmisc.c, io.c, main.c, nonposix.h: Remove all code for __EMX__. @@ -80,17 +89,46 @@ an array. (api_impl): Add hook for api_destroy_array. +2022-06-03 Arnold D. Robbins + + * awk.h (elem_new_to_scalar): Add declaration. + * eval.c (elem_new_to_scalar): No longer static. Make it handle + things when valref is > 1. Returns a NODE * instead of being void. + (cmp_scalars): Change usage of elem_new_to_scalar(). + * interpret.h (r_interpret): Op_push*: Make Node_elem_new into + a separate case, using elem_new_to_scalar(). + * array.c (force_array): For Node_elem_new, clear symbol->stptr. + * eval.r (r_get_lhs): Use efree() intstead of free() in Node_elem_new + case. + 2022-06-02 Arnold D. Robbins * builtin.c (do_sub): Fix memory corruption when substituting into a value that is a typed regex. Thanks to valgrind. +2022-06-02 Arnold D. Robbins + + Fix a nasty memory corruption problem. Thanks to + Andrew Schorr for the report. + + * eval.c (r_get_lhs): Handle Node_elem_new separately + to free the string value. This was not the problem. + * interpret.h (r_interpret): For Op_assign, when turning + Node_elem_new into the null string, DEREF the old value + and dupnode the new one. THIS was the problem. + 2022-05-24 Adam Van Scyoc * awkgram.y (make_assignable): Handle Op_field_assign. Avoids a core dump upon a certain kind of syntax error; see test/getlnfa.awk. +2022-05-22 Arnold D. Robbins + + * array.c (force_array): When converting Node_elem_new to an array, + release the string storage. Thanks to valgrind, by way of Andrew + Schorr, for the report. + 2022-05-11 Arnold D. Robbins * profile.c (pp_list): Typo fix in a comment. @@ -127,16 +165,86 @@ merged. * profile.c (pprint): Improve code for Op_K_switch, Op_K_case. +2022-04-20 Arnold D. Robbins + + * mpfr.c (mpg_force_number): Small whitespace fix. + * node.c (r_force_number): Ditto. + 2022-04-18 Arnold D. Robbins * gawkbug.in: Small changes. +2022-04-06 Arnold D. Robbins + + Further cleanups. + + * array.c (new_array_element): Set s->stfmt to STFMT_UNUSED. + * awk.h (force_string_fmt): No need to set s->stfmt anymore. + * builtin.c (do_typeof): Collapse Node_var_new and Node_elem_new + cases. + * symbol.c (print_vars): Node_elem_new can't be in a top level + variable. Remove check and add a call to cant_happen if some + other node type is received. + * NEWS: Updated. + 2022-04-01 Arnold D. Robbins Small fix from the persistent-gawk guys. * profile.c (pprint): Use estrdup instead of strdup. +2022-03-31 Arnold D. Robbins + + * array.c (new_array_element): Make a full null string instead of + an empty node; it can be more easily converted to scalar that way. + * awk.h (force_string_fmt): Change the node type, remove NUMBER flag, + set STFMT_UNUSED. + * cint_array.c (lear_clear): Remove check for not equal Node_elem_new. + * int_array.c (int_clear): Ditto. + * str_array.c (str_clear): Ditto. + * eval.c (elem_new_to_scalar): Now only needs to change the node type. + * interpret.h (r_interpret): Treat Node_elem_new like Node_val, and + UPREF it when pushed. Remove test before DEREFing when popping. + * mpfr.c (mpg_force_number): Simplify converting Node_elem_new to + Node_val. Fix the string value. + * node.c (r_force_number): Ditto. + +2022-03-28 Arnold D. Robbins + + Allow unreferenced array elements to turn into subarrays. + + * awk.h (Node_elem_new): New node type. + (new_array_element): Add declaration. + (POP_ARRAY): Handle Node_elem_new. + (force_string_fmt): Ditto. Make sure valref has the right value. + * array.c (force_array): Handle Node_elem_new. + (do_sort_up_value_type): Ditto. + (new_array_element): New function, creates Node_elem_new node. + * builtin.c (do_length): Handle Node_elem_new. + (do_typeof): Ditto. + * cint_array.c (leaf_lookup): Use new_array_element() when creating + a new element. + (left_clear): Don't unref Node_elem_new. + * debug.c (print_symbol, do_set_var,watchpont_triggered, + initialize_watch_item, print_memory, do_print_f): Handle Node_elem_new. + * eval.c (nodetypes): Add Node_elem_new. + (r_get_lhs, setup_frame): Handle Node_elem_new. + (elem_new_to_scalar): New function. + (cmp_scalars): Use elem_new_to_scalar. + * ext.c (get_actual_argument): Handle Node_elem_new. + * gawkapi.c (api_get_argument, api_set_argument, node_to_awk_value, + api_sym_update): Handle Node_elem_new. + * int_array.c (int_clear): Don't unref Node_elem_new. + (int_insert): Use new_array_element() when creating a new element. + * interpret.h (r_interpret): Handle Node_elem_new as appropriate. + * mpfr.c (mpg_force_number): Handle Node_elem_new.Make sure valref has + the right value. + * node.c (r_force_number): Ditto. + * str_array.c (str_lookup): Use new_array_element() when creating a + new element. + (str_clear): Don't unref Node_elem_new. + * symbol.c (print_vars): Handle Node_elem_new. + 2022-03-27 Arnold D. Robbins Allow nested indirect function calls. Thanks to diff --git a/NEWS b/NEWS index 93f683a3..6adcd6ac 100644 --- a/NEWS +++ b/NEWS @@ -52,6 +52,9 @@ see the manual. 10. Support for OS/2 has been removed. It was not being actively maintained. +11. Some subtle issues with untyped array elements being passed to +functions have been fixed. + Changes from 5.1.1 to 5.1.2 --------------------------- diff --git a/array.c b/array.c index 3658ac72..6d2ed19b 100644 --- a/array.c +++ b/array.c @@ -315,7 +315,7 @@ array_vname(const NODE *symbol) /* * force_array --- proceed to the actual Node_var_array, - * change Node_var_new to an array. + * change Node_var_new or Node_elem_new to an array. * If canfatal and type isn't good, die fatally, * otherwise return the final actual value. */ @@ -334,6 +334,11 @@ force_array(NODE *symbol, bool canfatal) } switch (symbol->type) { + case Node_elem_new: + efree(symbol->stptr); + symbol->stptr = NULL; + symbol->stlen = 0; + /* fall through */ case Node_var_new: symbol->xarray = NULL; /* make sure union is as it should be */ null_array(symbol); @@ -1166,6 +1171,7 @@ do_sort_up_value_type(const void *p1, const void *p2) Node_func, Node_ext_func, Node_var_new, + Node_elem_new, Node_var, Node_var_array, Node_val, @@ -1429,3 +1435,26 @@ assoc_list(NODE *symbol, const char *sort_str, sort_context_t sort_ctxt) return list; } + +/* new_array_element --- return a new empty element node */ + +NODE * +new_array_element(void) +{ + NODE *n = make_number(0.0); + char *sp; + + emalloc(sp, char *, 2, "new_array_element"); + sp[0] = sp[1] = '\0'; + + n->stptr = sp; + n->stlen = 0; + n->stfmt = STFMT_UNUSED; + + n->flags |= (MALLOC|STRING|STRCUR); + + n->type = Node_elem_new; + n->valref = 1; + + return n; +} diff --git a/awk.h b/awk.h index 67562f4e..dacf6f32 100644 --- a/awk.h +++ b/awk.h @@ -258,6 +258,7 @@ typedef enum nodevals { Node_var, /* scalar variable, lnode is value */ Node_var_array, /* array is ptr to elements, table_size num of eles */ Node_var_new, /* newly created variable, may become an array */ + Node_elem_new, /* newly created array element, may become a subarray */ Node_param_list, /* lnode is a variable, rnode is more list */ Node_func, /* lnode is param. list, rnode is body */ Node_ext_func, /* extension function, code_ptr is builtin code */ @@ -1445,6 +1446,7 @@ extern NODE *do_asorti(int nargs); extern unsigned long (*hash)(const char *s, size_t len, unsigned long hsize, size_t *code); extern void init_env_array(NODE *env_node); extern void init_argv_array(NODE *argv_node, NODE *shadow_node); +extern NODE *new_array_element(void); /* awkgram.c */ extern NODE *variable(int location, char *name, NODETYPE type); extern int parse_program(INSTRUCTION **pcode, bool from_eval); @@ -1559,6 +1561,7 @@ extern STACK_ITEM *grow_stack(void); extern void dump_fcall_stack(FILE *fp); extern int register_exec_hook(Func_pre_exec preh, Func_post_exec posth); extern NODE **r_get_field(NODE *n, Func_ptr *assign, bool reference); +extern NODE *elem_new_to_scalar(NODE *n); /* ext.c */ extern NODE *do_ext(int nargs); void load_ext(const char *lib_name); /* temporary */ @@ -1849,7 +1852,8 @@ POP_ARRAY(bool check_for_untyped) NODE *t = POP(); static bool warned = false; - if (do_lint && ! warned && check_for_untyped && t->type == Node_var_new) { + if (do_lint && ! warned && check_for_untyped + && (t->type == Node_var_new || t->type == Node_elem_new)) { warned = true; lintwarn(_("behavior of `for' loop on untyped variable is not defined by POSIX")); } @@ -1876,6 +1880,8 @@ POP_SCALAR() if (t->type == Node_var_array) fatal(_("attempt to use array `%s' in a scalar context"), array_vname(t)); + else if (t->type == Node_elem_new) + t = elem_new_to_scalar(t); return t; } @@ -1889,6 +1895,10 @@ TOP_SCALAR() if (t->type == Node_var_array) fatal(_("attempt to use array `%s' in a scalar context"), array_vname(t)); + else if (t->type == Node_elem_new) { + t = elem_new_to_scalar(t); // fix it up + REPLACE(t); // put it back on the stack + } return t; } @@ -1942,6 +1952,13 @@ dupnode(NODE *n) static inline NODE * force_string_fmt(NODE *s, const char *fmtstr, int fmtidx) { + if (s->type == Node_elem_new) { + s->type = Node_val; + s->flags &= ~NUMBER; + + return s; + } + if ((s->flags & STRCUR) != 0 && (s->stfmt == STFMT_UNUSED || (s->stfmt == fmtidx #ifdef HAVE_MPFR diff --git a/builtin.c b/builtin.c index 194ca385..30795406 100644 --- a/builtin.c +++ b/builtin.c @@ -591,7 +591,7 @@ do_length(int nargs) size = assoc_length(tmp); return make_number(size); - } else if (tmp->type == Node_var_new) { + } else if (tmp->type == Node_var_new || tmp->type == Node_elem_new) { // this can happen from an indirect call DEREF(tmp); tmp = dupnode(Nnull_string); @@ -4342,6 +4342,7 @@ do_typeof(int nargs) } break; case Node_var_new: + case Node_elem_new: res = "untyped"; deref = false; break; diff --git a/cint_array.c b/cint_array.c index 0dc04875..27298fba 100644 --- a/cint_array.c +++ b/cint_array.c @@ -1068,7 +1068,7 @@ leaf_lookup(NODE *symbol, NODE *array, long k, long size, long base) lhs = array->nodes + (k - base); /* leaf element */ if (*lhs == NULL) { array->table_size++; /* one more element in leaf array */ - *lhs = dupnode(Nnull_string); + *lhs = new_array_element(); } return lhs; } diff --git a/debug.c b/debug.c index 09bd90f4..87d6fa74 100644 --- a/debug.c +++ b/debug.c @@ -967,6 +967,9 @@ print_symbol(NODE *r, bool isparam) case Node_var_new: fprintf(out_fp, "untyped variable\n"); break; + case Node_elem_new: + fprintf(out_fp, "untyped element\n"); + break; case Node_var: if (! isparam && r->var_update) r->var_update(); @@ -1241,6 +1244,7 @@ do_set_var(CMDARG *arg, int cmd ATTRIBUTE_UNUSED) switch (r->type) { case Node_var_new: + case Node_elem_new: r->type = Node_var; r->var_value = dupnode(Nnull_string); /* fall through */ @@ -1730,6 +1734,7 @@ watchpoint_triggered(struct list_item *w) t2 = symbol; break; case Node_var_new: + case Node_elem_new: break; default: cant_happen("unexpected symbol type %s", nodetype2str(symbol->type)); @@ -1806,7 +1811,7 @@ initialize_watch_item(struct list_item *w) r = *get_field(field_num, NULL); w->cur_value = dupnode(r); } else { - if (symbol->type == Node_var_new) + if (symbol->type == Node_var_new || symbol->type == Node_elem_new) w->cur_value = (NODE *) 0; else if (symbol->type == Node_var) { r = symbol->var_value; @@ -3753,6 +3758,10 @@ print_memory(NODE *m, NODE *func, Func_print print_func, FILE *fp) print_func(fp, "%s", m->vname); break; + case Node_elem_new: + print_func(fp, "element - %p", m); + break; + default: print_func(fp, "?"); /* can't happen */ } @@ -5109,7 +5118,7 @@ do_print_f(CMDARG *arg, int cmd ATTRIBUTE_UNUSED) r = find_symbol(name, NULL); if (r == NULL) goto done; - if (r->type == Node_var_new) + if (r->type == Node_var_new || r->type == Node_elem_new) tmp[i] = Nnull_string; else if (r->type != Node_var) { d_error(_("`%s' is not a scalar variable"), name); diff --git a/eval.c b/eval.c index 8fde6b39..d7d0b264 100644 --- a/eval.c +++ b/eval.c @@ -238,6 +238,7 @@ static const char *const nodetypes[] = { "Node_var", "Node_var_array", "Node_var_new", + "Node_elem_new", "Node_param_list", "Node_func", "Node_ext_func", @@ -1165,6 +1166,14 @@ r_get_lhs(NODE *n, bool reference) n->var_value = dupnode(Nnull_string); break; + case Node_elem_new: + efree(n->stptr); + n->stptr = NULL; + n->stlen = 0; + n->type = Node_var; + n->var_value = dupnode(Nnull_string); + break; + case Node_var: break; @@ -1311,6 +1320,7 @@ setup_frame(INSTRUCTION *pc) switch (m->type) { case Node_var_new: case Node_var_array: + case Node_elem_new: r->type = Node_array_ref; r->orig_array = r->prev_array = m; break; @@ -1532,6 +1542,10 @@ cmp_scalars(scalar_cmp_t comparison_type) t2 = POP_SCALAR(); t1 = TOP(); + + t1 = elem_new_to_scalar(t1); + t2 = elem_new_to_scalar(t2); + if (t1->type == Node_var_array) { DEREF(t2); fatal(_("attempt to use array `%s' in a scalar context"), array_vname(t1)); @@ -1870,3 +1884,20 @@ init_interpret() interpret = r_interpret; } +/* elem_new_to_scalar --- convert Node_elem_new to untyped scalar */ + +NODE * +elem_new_to_scalar(NODE *n) +{ + if (n->type != Node_elem_new) + return n; + + if (n->valref > 1) { + unref(n); + return dupnode(Nnull_string); + } + + n->type = Node_val; + + return n; +} diff --git a/ext.c b/ext.c index c4e37297..89b53ab5 100644 --- a/ext.c +++ b/ext.c @@ -200,7 +200,7 @@ get_actual_argument(NODE *t, int i, bool want_array) pc = TOP()->code_ptr; /* Op_ext_builtin instruction */ fname = (pc + 1)->func_name; - if (t->type == Node_var_new) { + if (t->type == Node_var_new || t->type == Node_elem_new) { if (want_array) return force_array(t, false); else { diff --git a/gawkapi.c b/gawkapi.c index 7f19916f..cec4a899 100644 --- a/gawkapi.c +++ b/gawkapi.c @@ -69,7 +69,7 @@ api_get_argument(awk_ext_id_t id, size_t count, return awk_false; /* if type is undefined */ - if (arg->type == Node_var_new) { + if (arg->type == Node_var_new || arg->type == Node_elem_new) { if (wanted == AWK_UNDEFINED) return awk_true; else if (wanted == AWK_ARRAY) { @@ -124,7 +124,7 @@ api_set_argument(awk_ext_id_t id, return awk_false; if ( (arg = get_argument(count)) == NULL - || arg->type != Node_var_new) + || (arg->type != Node_var_new && arg->type != Node_elem_new)) return awk_false; arg = get_array_argument(arg, count); @@ -564,6 +564,7 @@ node_to_awk_value(NODE *node, awk_value_t *val, awk_valtype_t wanted) switch (node->type) { case Node_var_new: /* undefined variable */ + case Node_elem_new: /* undefined element */ val->val_type = AWK_UNDEFINED; if (wanted == AWK_UNDEFINED) { ret = awk_true; @@ -896,10 +897,13 @@ api_sym_update(awk_ext_id_t id, efree((void *) full_name); - if ((node->type == Node_var && value->val_type != AWK_ARRAY) || node->type == Node_var_new) { + if ((node->type == Node_var && value->val_type != AWK_ARRAY) + || node->type == Node_var_new + || node->type == Node_elem_new) { unref(node->var_value); node->var_value = awk_value_to_node(value); - if (node->type == Node_var_new && value->val_type != AWK_UNDEFINED) + if ((node->type == Node_var_new || node->type == Node_elem_new) + && value->val_type != AWK_UNDEFINED) node->type = Node_var; return awk_true; diff --git a/int_array.c b/int_array.c index 2e9e2476..3a1c5966 100644 --- a/int_array.c +++ b/int_array.c @@ -792,7 +792,7 @@ int_insert(NODE *symbol, long k, uint32_t hash1) } b->ainum[i] = k; - b->aivalue[i] = dupnode(Nnull_string); + b->aivalue[i] = new_array_element(); b->aicount++; return & b->aivalue[i]; } diff --git a/interpret.h b/interpret.h index 24419183..57d060e6 100644 --- a/interpret.h +++ b/interpret.h @@ -224,6 +224,20 @@ uninitialized_scalar: save_symbol->vname); if (op != Op_push_arg_untyped) m = dupnode(Nnull_string); + UPREF(m); + PUSH(m); + break; + + case Node_elem_new: + if (op != Op_push_arg_untyped) { + /* convert untyped to scalar */ + m = elem_new_to_scalar(m); + } + if (do_lint) + lintwarn(isparam ? + _("reference to uninitialized argument `%s'") : + _("reference to uninitialized variable `%s'"), + save_symbol->vname); PUSH(m); break; @@ -320,7 +334,7 @@ uninitialized_scalar: } } - if (r->type == Node_val) + if (r->type == Node_val || r->type == Node_elem_new) UPREF(r); PUSH(r); break; @@ -353,6 +367,11 @@ uninitialized_scalar: t2 = force_string(t2); r->vname = estrdup(t2->stptr, t2->stlen); /* the subscript in parent array */ assoc_set(t1, t2, r); + } else if (r->type == Node_elem_new) { + r = force_array(r, false); + r->parent_array = t1; + t2 = force_string(t2); + r->vname = estrdup(t2->stptr, t2->stlen); /* the subscript in parent array */ } else if (r->type != Node_var_array) { t2 = force_string(t2); fatal(_("attempt to use scalar `%s[\"%.*s\"]' as an array"), @@ -389,7 +408,7 @@ uninitialized_scalar: * be stored in SYMTAB: * 1. Variables that don"t yet have a value (Node_var_new) * 2. Variables that have a value (Node_var) - * 3. Values that awk code stuck into SYMTAB not related to variables (Node_value) + * 3. Values that awk code stuck into SYMTAB not related to variables (Node_val) * For 1, since we are giving it a value, we have to change the type to Node_var. * For 1 and 2, we have to step through the Node_var to get to the value. * For 3, we fatal out. This avoids confusion on things like @@ -713,7 +732,7 @@ mod: * SYMTAB is a little more messy. Three possibilities for SYMTAB: * 1. Variables that don"t yet have a value (Node_var_new) * 2. Variables that have a value (Node_var) - * 3. Values that awk code stuck into SYMTAB not related to variables (Node_value) + * 3. Values that awk code stuck into SYMTAB not related to variables (Node_val) * For 1, since we are giving it a value, we have to change the type to Node_var. * For 1 and 2, we have to step through the Node_var to get to the value. * For 3, we fatal out. This avoids confusion on things like @@ -844,6 +863,10 @@ mod: lhs = POP_ADDRESS(); r = TOP_SCALAR(); unref(*lhs); + if (r->type == Node_elem_new) { + DEREF(r); + r = dupnode(Nnull_string); + } UPREF(r); UNFIELD(*lhs, r); REPLACE(r); @@ -1074,7 +1097,7 @@ arrayfor: (void) POP_CODE(); while (arg_count-- > 0) { t1 = POP(); - if (t1->type == Node_val) + if (t1->type == Node_val || t1->type == Node_elem_new) DEREF(t1); } free_api_string_copies(); diff --git a/mpfr.c b/mpfr.c index 6afa8c65..40833124 100644 --- a/mpfr.c +++ b/mpfr.c @@ -349,6 +349,15 @@ mpg_force_number(NODE *n) { char *cp, *cpend; + if (n->type == Node_elem_new) { + n->type = Node_val; + n->flags &= ~STRING; + n->stptr[0] = '0'; // STRCUR is still set + n->stlen = 1; + + return n; + } + if ((n->flags & NUMCUR) != 0) return n; n->flags |= NUMCUR; diff --git a/node.c b/node.c index 1c913799..7b4346bf 100644 --- a/node.c +++ b/node.c @@ -61,6 +61,15 @@ r_force_number(NODE *n) char save; char *ptr; + if (n->type == Node_elem_new) { + n->type = Node_val; + n->flags &= ~STRING; + n->stptr[0] = '0'; // STRCUR is still set + n->stlen = 1; + + return n; + } + if ((n->flags & NUMCUR) != 0) return n; diff --git a/pc/ChangeLog b/pc/ChangeLog index ddeb8883..652daeb3 100644 --- a/pc/ChangeLog +++ b/pc/ChangeLog @@ -9,6 +9,14 @@ Untracked files: * Makefile, config.h, config.sed, gawkmisc.pc: Remove stuff related to __EMX__. +2022-06-30 Arnold D. Robbins + + * Makefile.tst: Regenerated. + +2022-06-02 Arnold D. Robbins + + * Makefile.tst: Regenerated. + 2022-05-24 Adam Van Scyoc * Makefile.tst: Regenerated. @@ -29,6 +37,10 @@ Untracked files: * Makefile.tst: Regenerated. +2022-03-28 Arnold D. Robbins + + * Makefile.tst: Regenerated. + 2022-03-27 Arnold D. Robbins * Makefile.tst: Regenerated. diff --git a/pc/Makefile.tst b/pc/Makefile.tst index 9dc6837d..0dfd4534 100644 --- a/pc/Makefile.tst +++ b/pc/Makefile.tst @@ -202,6 +202,7 @@ GAWK_EXT_TESTS = \ indirectcall3 indirectbuiltin2 \ inf-nan-torture intarray iolint isarrayunset lint lintexp \ lintindex lintint lintlength lintold lintplus lintset lintwarn \ + mdim1 mdim2 mdim3 mdim4 \ manyfiles match1 match2 match3 mbstr1 mbstr2 mixed1 mktime \ modifiers muldimposix nastyparm negtime next nondec nondec2 \ nonfatal1 nonfatal2 nonfatal3 nsawk1a nsawk1b nsawk1c nsawk2a \ @@ -2977,6 +2978,26 @@ lintwarn: @-AWKPATH="$(srcdir)" $(AWK) -f $@.awk --lint >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ +mdim1: + @echo $@ + @-AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ + +mdim2: + @echo $@ + @-AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ + +mdim3: + @echo $@ + @-AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ + +mdim4: + @echo $@ + @-AWKPATH="$(srcdir)" $(AWK) -f $@.awk < "$(srcdir)"/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ + match1: @echo $@ @-AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ diff --git a/str_array.c b/str_array.c index a6bc7170..1ff8348f 100644 --- a/str_array.c +++ b/str_array.c @@ -217,7 +217,7 @@ str_lookup(NODE *symbol, NODE *subs) b->ahname = subs; b->ahname_str = subs->stptr; b->ahname_len = subs->stlen; - b->ahvalue = dupnode(Nnull_string); + b->ahvalue = new_array_element(); b->ahcode = code1; return & (b->ahvalue); } diff --git a/symbol.c b/symbol.c index 8f29f5c4..0d10a520 100644 --- a/symbol.c +++ b/symbol.c @@ -497,6 +497,8 @@ print_vars(NODE **table, int (*print_func)(FILE *, const char *, ...), FILE *fp) print_func(fp, "untyped variable\n"); else if (r->type == Node_var) valinfo(r->var_value, print_func, fp); + else + cant_happen("unexpected node type: %s", nodetype2str(r->type)); } } diff --git a/test/ChangeLog b/test/ChangeLog index 7a342484..0957a914 100644 --- a/test/ChangeLog +++ b/test/ChangeLog @@ -6,6 +6,16 @@ * Makefile.am: Update copyright year. +2022-06-30 Arnold D. Robbins + + * Makefile.am (EXTRA_DIST): mdim4: new test. + * mdim4.awk, mdim4.in, mdim4.ok: New files. + +2022-06-02 Arnold D. Robbins + + * Makefile.am (EXTRA_DIST): mdim3: new test. + * mdim3.awk, mdim3.ok: New files. + 2022-05-24 Adam Van Scyoc * Makefile.am (EXTRA_DIST): getlnfa, new test. @@ -36,10 +46,19 @@ * profile5.ok, profile10.ok, profile11.ok: Updated after code changes. * profile17.awk, profile17.ok: New files. +2022-03-31 Arnold D. Robbins + + * aadelete1.awk, aadelete1.ok: Changed to sync with code changes. + 2022-03-30 Arnold D. Robbins * delarprm2.awk, delarprm2.ok: Changes to make test more helpful. +2022-03-27 Arnold D. Robbins + + * Makefile.am (EXTRA_DIST): mdim1, mdim2: new tests. + * mdim1.awk, mdim1.ok, mdim2.awk, mdim2.ok: New files. + 2022-03-27 Arnold D. Robbins * Makefile.am (EXTRA_DIST): indirectcall3, new test. diff --git a/test/Makefile.am b/test/Makefile.am index e3e2c707..23908b70 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -678,6 +678,15 @@ EXTRA_DIST = \ manglprm.ok \ manyfiles.awk \ manyfiles.ok \ + mdim1.awk \ + mdim1.ok \ + mdim2.awk \ + mdim2.ok \ + mdim3.awk \ + mdim3.ok \ + mdim4.awk \ + mdim4.in \ + mdim4.ok \ modifiers.sh \ modifiers.ok \ muldimposix.awk \ @@ -1476,6 +1485,7 @@ GAWK_EXT_TESTS = \ indirectcall3 indirectbuiltin2 \ inf-nan-torture intarray iolint isarrayunset lint lintexp \ lintindex lintint lintlength lintold lintplus lintset lintwarn \ + mdim1 mdim2 mdim3 mdim4 \ manyfiles match1 match2 match3 mbstr1 mbstr2 mixed1 mktime \ modifiers muldimposix nastyparm negtime next nondec nondec2 \ nonfatal1 nonfatal2 nonfatal3 nsawk1a nsawk1b nsawk1c nsawk2a \ diff --git a/test/Makefile.in b/test/Makefile.in index f801a253..228e660a 100644 --- a/test/Makefile.in +++ b/test/Makefile.in @@ -945,6 +945,15 @@ EXTRA_DIST = \ manglprm.ok \ manyfiles.awk \ manyfiles.ok \ + mdim1.awk \ + mdim1.ok \ + mdim2.awk \ + mdim2.ok \ + mdim3.awk \ + mdim3.ok \ + mdim4.awk \ + mdim4.in \ + mdim4.ok \ modifiers.sh \ modifiers.ok \ muldimposix.awk \ @@ -1743,6 +1752,7 @@ GAWK_EXT_TESTS = \ indirectcall3 indirectbuiltin2 \ inf-nan-torture intarray iolint isarrayunset lint lintexp \ lintindex lintint lintlength lintold lintplus lintset lintwarn \ + mdim1 mdim2 mdim3 mdim4 \ manyfiles match1 match2 match3 mbstr1 mbstr2 mixed1 mktime \ modifiers muldimposix nastyparm negtime next nondec nondec2 \ nonfatal1 nonfatal2 nonfatal3 nsawk1a nsawk1b nsawk1c nsawk2a \ @@ -4701,6 +4711,26 @@ lintwarn: @-AWKPATH="$(srcdir)" $(AWK) -f $@.awk --lint >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ +mdim1: + @echo $@ + @-AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ + +mdim2: + @echo $@ + @-AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ + +mdim3: + @echo $@ + @-AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ + +mdim4: + @echo $@ + @-AWKPATH="$(srcdir)" $(AWK) -f $@.awk < "$(srcdir)"/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ + match1: @echo $@ @-AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ diff --git a/test/Maketests b/test/Maketests index 899b4ec7..e967f845 100644 --- a/test/Maketests +++ b/test/Maketests @@ -1728,6 +1728,26 @@ lintwarn: @-AWKPATH="$(srcdir)" $(AWK) -f $@.awk --lint >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ +mdim1: + @echo $@ + @-AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ + +mdim2: + @echo $@ + @-AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ + +mdim3: + @echo $@ + @-AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ + +mdim4: + @echo $@ + @-AWKPATH="$(srcdir)" $(AWK) -f $@.awk < "$(srcdir)"/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ + match1: @echo $@ @-AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ diff --git a/test/aadelete1.awk b/test/aadelete1.awk index 2484a057..158d2aa3 100644 --- a/test/aadelete1.awk +++ b/test/aadelete1.awk @@ -8,7 +8,7 @@ BEGIN { print length(a), length(a[1]) delete a print length(a), length(a[1]), length(a) - a[1][1] = 11 + a[1][1] = 11 # this used to fatal, now it no longer does. } function f(c, b) { diff --git a/test/aadelete1.ok b/test/aadelete1.ok index d4b678b5..c3e29d26 100644 --- a/test/aadelete1.ok +++ b/test/aadelete1.ok @@ -2,5 +2,3 @@ 1 1 1 0 0 1 -gawk: aadelete1.awk:11: fatal: attempt to use scalar `a["1"]' as an array -EXIT CODE: 2 diff --git a/test/mdim1.awk b/test/mdim1.awk new file mode 100644 index 00000000..c1f398d6 --- /dev/null +++ b/test/mdim1.awk @@ -0,0 +1,15 @@ +BEGIN { + print "typeof(x[0]) is", typeof(x[0]) + x[1] = x[0] + print "typeof(x[1]) is", typeof(x[1]) + x[0][1] = "xx" + print "typeof(x[0]) is", typeof(x[0]) + print "typeof(x[0][1]) is", typeof(x[0][1]) + print "typeof(y) is", typeof(y) + z = y + print "typeof(y) is", typeof(y) + print "typeof(z) is", typeof(z) + + x[1][0] = "xx" # this will fatal + print x[1][0] +} diff --git a/test/mdim1.ok b/test/mdim1.ok new file mode 100644 index 00000000..1247fab1 --- /dev/null +++ b/test/mdim1.ok @@ -0,0 +1,9 @@ +typeof(x[0]) is untyped +typeof(x[1]) is unassigned +typeof(x[0]) is array +typeof(x[0][1]) is string +typeof(y) is untyped +typeof(y) is unassigned +typeof(z) is unassigned +gawk: mdim1.awk:13: fatal: attempt to use scalar `x["1"]' as an array +EXIT CODE: 2 diff --git a/test/mdim2.awk b/test/mdim2.awk new file mode 100644 index 00000000..7bc0c127 --- /dev/null +++ b/test/mdim2.awk @@ -0,0 +1,9 @@ +BEGIN { + p(a[0]) + print a[0][0] +} + +function p(f) +{ + f[0] = 1 +} diff --git a/test/mdim2.ok b/test/mdim2.ok new file mode 100644 index 00000000..d00491fd --- /dev/null +++ b/test/mdim2.ok @@ -0,0 +1 @@ +1 diff --git a/test/mdim3.awk b/test/mdim3.awk new file mode 100644 index 00000000..3cd56b61 --- /dev/null +++ b/test/mdim3.awk @@ -0,0 +1,29 @@ +BEGIN { + inp[0] = "blah" + inp[1] = "blah" + inp[2] = "" + inp[3] = "Summary Statistics" + inp[4] = "temperature,0" + inp[5] = "rain,1" + + for (i = 1; i <= 40; i++) { + print "i =", i + mode = 0 + nr = 0 + delete val + for (j = 0; j < 6; j++) { + x = inp[j] + print "\tj =", j +# if (i == 27 && j == 3) +# stopme() + nf = split(x,f,",") + print "\tnf =", nf + if (++nr > 1) { + if (!nf) + mode = 1 + else if (mode == 1) + val[f[1]] = f[2] + } + } + } +} diff --git a/test/mdim3.ok b/test/mdim3.ok new file mode 100644 index 00000000..a8f05990 --- /dev/null +++ b/test/mdim3.ok @@ -0,0 +1,520 @@ +i = 1 + j = 0 + nf = 1 + j = 1 + nf = 1 + j = 2 + nf = 0 + j = 3 + nf = 1 + j = 4 + nf = 2 + j = 5 + nf = 2 +i = 2 + j = 0 + nf = 1 + j = 1 + nf = 1 + j = 2 + nf = 0 + j = 3 + nf = 1 + j = 4 + nf = 2 + j = 5 + nf = 2 +i = 3 + j = 0 + nf = 1 + j = 1 + nf = 1 + j = 2 + nf = 0 + j = 3 + nf = 1 + j = 4 + nf = 2 + j = 5 + nf = 2 +i = 4 + j = 0 + nf = 1 + j = 1 + nf = 1 + j = 2 + nf = 0 + j = 3 + nf = 1 + j = 4 + nf = 2 + j = 5 + nf = 2 +i = 5 + j = 0 + nf = 1 + j = 1 + nf = 1 + j = 2 + nf = 0 + j = 3 + nf = 1 + j = 4 + nf = 2 + j = 5 + nf = 2 +i = 6 + j = 0 + nf = 1 + j = 1 + nf = 1 + j = 2 + nf = 0 + j = 3 + nf = 1 + j = 4 + nf = 2 + j = 5 + nf = 2 +i = 7 + j = 0 + nf = 1 + j = 1 + nf = 1 + j = 2 + nf = 0 + j = 3 + nf = 1 + j = 4 + nf = 2 + j = 5 + nf = 2 +i = 8 + j = 0 + nf = 1 + j = 1 + nf = 1 + j = 2 + nf = 0 + j = 3 + nf = 1 + j = 4 + nf = 2 + j = 5 + nf = 2 +i = 9 + j = 0 + nf = 1 + j = 1 + nf = 1 + j = 2 + nf = 0 + j = 3 + nf = 1 + j = 4 + nf = 2 + j = 5 + nf = 2 +i = 10 + j = 0 + nf = 1 + j = 1 + nf = 1 + j = 2 + nf = 0 + j = 3 + nf = 1 + j = 4 + nf = 2 + j = 5 + nf = 2 +i = 11 + j = 0 + nf = 1 + j = 1 + nf = 1 + j = 2 + nf = 0 + j = 3 + nf = 1 + j = 4 + nf = 2 + j = 5 + nf = 2 +i = 12 + j = 0 + nf = 1 + j = 1 + nf = 1 + j = 2 + nf = 0 + j = 3 + nf = 1 + j = 4 + nf = 2 + j = 5 + nf = 2 +i = 13 + j = 0 + nf = 1 + j = 1 + nf = 1 + j = 2 + nf = 0 + j = 3 + nf = 1 + j = 4 + nf = 2 + j = 5 + nf = 2 +i = 14 + j = 0 + nf = 1 + j = 1 + nf = 1 + j = 2 + nf = 0 + j = 3 + nf = 1 + j = 4 + nf = 2 + j = 5 + nf = 2 +i = 15 + j = 0 + nf = 1 + j = 1 + nf = 1 + j = 2 + nf = 0 + j = 3 + nf = 1 + j = 4 + nf = 2 + j = 5 + nf = 2 +i = 16 + j = 0 + nf = 1 + j = 1 + nf = 1 + j = 2 + nf = 0 + j = 3 + nf = 1 + j = 4 + nf = 2 + j = 5 + nf = 2 +i = 17 + j = 0 + nf = 1 + j = 1 + nf = 1 + j = 2 + nf = 0 + j = 3 + nf = 1 + j = 4 + nf = 2 + j = 5 + nf = 2 +i = 18 + j = 0 + nf = 1 + j = 1 + nf = 1 + j = 2 + nf = 0 + j = 3 + nf = 1 + j = 4 + nf = 2 + j = 5 + nf = 2 +i = 19 + j = 0 + nf = 1 + j = 1 + nf = 1 + j = 2 + nf = 0 + j = 3 + nf = 1 + j = 4 + nf = 2 + j = 5 + nf = 2 +i = 20 + j = 0 + nf = 1 + j = 1 + nf = 1 + j = 2 + nf = 0 + j = 3 + nf = 1 + j = 4 + nf = 2 + j = 5 + nf = 2 +i = 21 + j = 0 + nf = 1 + j = 1 + nf = 1 + j = 2 + nf = 0 + j = 3 + nf = 1 + j = 4 + nf = 2 + j = 5 + nf = 2 +i = 22 + j = 0 + nf = 1 + j = 1 + nf = 1 + j = 2 + nf = 0 + j = 3 + nf = 1 + j = 4 + nf = 2 + j = 5 + nf = 2 +i = 23 + j = 0 + nf = 1 + j = 1 + nf = 1 + j = 2 + nf = 0 + j = 3 + nf = 1 + j = 4 + nf = 2 + j = 5 + nf = 2 +i = 24 + j = 0 + nf = 1 + j = 1 + nf = 1 + j = 2 + nf = 0 + j = 3 + nf = 1 + j = 4 + nf = 2 + j = 5 + nf = 2 +i = 25 + j = 0 + nf = 1 + j = 1 + nf = 1 + j = 2 + nf = 0 + j = 3 + nf = 1 + j = 4 + nf = 2 + j = 5 + nf = 2 +i = 26 + j = 0 + nf = 1 + j = 1 + nf = 1 + j = 2 + nf = 0 + j = 3 + nf = 1 + j = 4 + nf = 2 + j = 5 + nf = 2 +i = 27 + j = 0 + nf = 1 + j = 1 + nf = 1 + j = 2 + nf = 0 + j = 3 + nf = 1 + j = 4 + nf = 2 + j = 5 + nf = 2 +i = 28 + j = 0 + nf = 1 + j = 1 + nf = 1 + j = 2 + nf = 0 + j = 3 + nf = 1 + j = 4 + nf = 2 + j = 5 + nf = 2 +i = 29 + j = 0 + nf = 1 + j = 1 + nf = 1 + j = 2 + nf = 0 + j = 3 + nf = 1 + j = 4 + nf = 2 + j = 5 + nf = 2 +i = 30 + j = 0 + nf = 1 + j = 1 + nf = 1 + j = 2 + nf = 0 + j = 3 + nf = 1 + j = 4 + nf = 2 + j = 5 + nf = 2 +i = 31 + j = 0 + nf = 1 + j = 1 + nf = 1 + j = 2 + nf = 0 + j = 3 + nf = 1 + j = 4 + nf = 2 + j = 5 + nf = 2 +i = 32 + j = 0 + nf = 1 + j = 1 + nf = 1 + j = 2 + nf = 0 + j = 3 + nf = 1 + j = 4 + nf = 2 + j = 5 + nf = 2 +i = 33 + j = 0 + nf = 1 + j = 1 + nf = 1 + j = 2 + nf = 0 + j = 3 + nf = 1 + j = 4 + nf = 2 + j = 5 + nf = 2 +i = 34 + j = 0 + nf = 1 + j = 1 + nf = 1 + j = 2 + nf = 0 + j = 3 + nf = 1 + j = 4 + nf = 2 + j = 5 + nf = 2 +i = 35 + j = 0 + nf = 1 + j = 1 + nf = 1 + j = 2 + nf = 0 + j = 3 + nf = 1 + j = 4 + nf = 2 + j = 5 + nf = 2 +i = 36 + j = 0 + nf = 1 + j = 1 + nf = 1 + j = 2 + nf = 0 + j = 3 + nf = 1 + j = 4 + nf = 2 + j = 5 + nf = 2 +i = 37 + j = 0 + nf = 1 + j = 1 + nf = 1 + j = 2 + nf = 0 + j = 3 + nf = 1 + j = 4 + nf = 2 + j = 5 + nf = 2 +i = 38 + j = 0 + nf = 1 + j = 1 + nf = 1 + j = 2 + nf = 0 + j = 3 + nf = 1 + j = 4 + nf = 2 + j = 5 + nf = 2 +i = 39 + j = 0 + nf = 1 + j = 1 + nf = 1 + j = 2 + nf = 0 + j = 3 + nf = 1 + j = 4 + nf = 2 + j = 5 + nf = 2 +i = 40 + j = 0 + nf = 1 + j = 1 + nf = 1 + j = 2 + nf = 0 + j = 3 + nf = 1 + j = 4 + nf = 2 + j = 5 + nf = 2 diff --git a/test/mdim4.awk b/test/mdim4.awk new file mode 100644 index 00000000..8f5e0f21 --- /dev/null +++ b/test/mdim4.awk @@ -0,0 +1,168 @@ +BEGIN { +S["am__EXEEXT_FALSE"]="" +S["am__EXEEXT_TRUE"]="#" +S["LTLIBOBJS"]="" +S["subdirs"]=" extension" +S["GAWKLIBEXT"]="so" +S["LIBMPFR"]="-lmpfr -lgmp" +S["LIBREADLINE"]="-lreadline" +S["SOCKET_LIBS"]="" +S["ENABLE_EXTENSIONS_FALSE"]="#" +S["ENABLE_EXTENSIONS_TRUE"]="" +S["USE_PERSISTENT_MALLOC_FALSE"]="#" +S["USE_PERSISTENT_MALLOC_TRUE"]="" +S["LIBSIGSEGV_PREFIX"]="" +S["LTLIBSIGSEGV"]="" +S["LIBSIGSEGV"]="" +S["HAVE_LIBSIGSEGV"]="no" +S["LIBOBJS"]="" +S["TEST_CROSS_COMPILE_FALSE"]="" +S["TEST_CROSS_COMPILE_TRUE"]="#" +S["POSUB"]="po" +S["LTLIBINTL"]="" +S["LIBINTL"]="" +S["INTLLIBS"]="" +S["LTLIBICONV"]="-liconv" +S["LIBICONV"]="-liconv" +S["INTL_MACOSX_LIBS"]="" +S["XGETTEXT_EXTRA_OPTIONS"]="" +S["MSGMERGE_FOR_MSGFMT_OPTION"]="--for-msgfmt" +S["MSGMERGE"]="/usr/local/bin/msgmerge" +S["XGETTEXT_015"]="/usr/local/bin/xgettext" +S["XGETTEXT"]="/usr/local/bin/xgettext" +S["GMSGFMT_015"]="/usr/local/bin/msgfmt" +S["GMSGFMT"]="/usr/local/bin/msgfmt" +S["MSGFMT"]="/usr/local/bin/msgfmt" +S["GETTEXT_MACRO_VERSION"]="0.20" +S["USE_NLS"]="yes" +S["SED"]="/bin/sed" +S["ZOS_FAIL"]="" +S["acl_shlibext"]="so" +S["ac_ct_AR"]="ar" +S["AR"]="ar" +S["RANLIB"]="ranlib" +S["CPP"]="gcc -E" +S["LN_S"]="ln -s" +S["YFLAGS"]="" +S["YACC"]="bison -y" +S["EGREP"]="/bin/grep -E" +S["GREP"]="/bin/grep" +S["am__fastdepCC_FALSE"]="#" +S["am__fastdepCC_TRUE"]="" +S["CCDEPMODE"]="depmode=gcc3" +S["am__nodep"]="_no" +S["AMDEPBACKSLASH"]="\\" +S["AMDEP_FALSE"]="#" +S["AMDEP_TRUE"]="" +S["am__include"]="include" +S["DEPDIR"]=".deps" +S["OBJEXT"]="o" +S["EXEEXT"]="" +S["ac_ct_CC"]="gcc" +S["CPPFLAGS"]="" +S["LDFLAGS"]=" -no-pie" +S["CFLAGS"]="-g -O2 -DARRAYDEBUG -DYYDEBUG -DLOCALEDEBUG -DMEMDEBUG -Wall -fno-builtin -g3 -ggdb3" +S["CC"]="gcc" +S["host_os"]="linux-gnu" +S["host_vendor"]="pc" +S["host_cpu"]="x86_64" +S["host"]="x86_64-pc-linux-gnu" +S["build_os"]="linux-gnu" +S["build_vendor"]="pc" +S["build_cpu"]="x86_64" +S["build"]="x86_64-pc-linux-gnu" +S["pkgextensiondir"]="${pkglibdir}" +S["AM_BACKSLASH"]="\\" +S["AM_DEFAULT_VERBOSITY"]="1" +S["AM_DEFAULT_V"]="$(AM_DEFAULT_VERBOSITY)" +S["AM_V"]="$(V)" +S["CSCOPE"]="cscope" +S["ETAGS"]="etags" +S["CTAGS"]="ctags" +S["am__untar"]="$${TAR-tar} xf -" +S["am__tar"]="$${TAR-tar} chof - \"$$tardir\"" +S["AMTAR"]="$${TAR-tar}" +S["am__leading_dot"]="." +S["SET_MAKE"]="" +S["AWK"]="gawk" +S["mkdir_p"]="$(MKDIR_P)" +S["MKDIR_P"]="/bin/mkdir -p" +S["INSTALL_STRIP_PROGRAM"]="$(install_sh) -c -s" +S["STRIP"]="" +S["install_sh"]="${SHELL} /home/arnold/Gnu/gawk/gawk.git/build-aux/install-sh" +S["MAKEINFO"]="${SHELL} '/home/arnold/Gnu/gawk/gawk.git/build-aux/missing' makeinfo" +S["AUTOHEADER"]="${SHELL} '/home/arnold/Gnu/gawk/gawk.git/build-aux/missing' autoheader" +S["AUTOMAKE"]="${SHELL} '/home/arnold/Gnu/gawk/gawk.git/build-aux/missing' automake-1.16" +S["AUTOCONF"]="${SHELL} '/home/arnold/Gnu/gawk/gawk.git/build-aux/missing' autoconf" +S["ACLOCAL"]="${SHELL} '/home/arnold/Gnu/gawk/gawk.git/build-aux/missing' aclocal-1.16" +S["VERSION"]="5.1.60" +S["PACKAGE"]="gawk" +S["CYGPATH_W"]="echo" +S["am__isrc"]="" +S["INSTALL_DATA"]="${INSTALL} -m 644" +S["INSTALL_SCRIPT"]="${INSTALL}" +S["INSTALL_PROGRAM"]="${INSTALL}" +S["target_alias"]="" +S["host_alias"]="" +S["build_alias"]="" +S["LIBS"]="-ldl -lm " +S["ECHO_T"]="" +S["ECHO_N"]="-n" +S["ECHO_C"]="" +S["DEFS"]="-DHAVE_CONFIG_H" +S["mandir"]="${datarootdir}/man" +S["localedir"]="${datarootdir}/locale" +S["libdir"]="${exec_prefix}/lib" +S["psdir"]="${docdir}" +S["pdfdir"]="${docdir}" +S["dvidir"]="${docdir}" +S["htmldir"]="${docdir}" +S["infodir"]="${datarootdir}/info" +S["docdir"]="${datarootdir}/doc/${PACKAGE_TARNAME}" +S["oldincludedir"]="/usr/include" +S["includedir"]="${prefix}/include" +S["runstatedir"]="${localstatedir}/run" +S["localstatedir"]="${prefix}/var" +S["sharedstatedir"]="${prefix}/com" +S["sysconfdir"]="${prefix}/etc" +S["datadir"]="${datarootdir}" +S["datarootdir"]="${prefix}/share" +S["libexecdir"]="${exec_prefix}/libexec" +S["sbindir"]="${exec_prefix}/sbin" +S["bindir"]="${exec_prefix}/bin" +S["program_transform_name"]="s,x,x," +S["prefix"]="/usr/local" +S["exec_prefix"]="${prefix}" +S["PACKAGE_URL"]="https://www.gnu.org/software/gawk/" +S["PACKAGE_BUGREPORT"]="bug-gawk@gnu.org" +S["PACKAGE_STRING"]="GNU Awk 5.1.60" +S["PACKAGE_VERSION"]="5.1.60" +S["PACKAGE_TARNAME"]="gawk" +S["PACKAGE_NAME"]="GNU Awk" +S["PATH_SEPARATOR"]=":" +S["SHELL"]="/bin/bash" +S["am__quote"]="" + for (key in S) S_is_set[key] = 1 + FS = "" + +} +{ + line = $ 0 + nfields = split(line, field, "@") + substed = 0 + len = length(field[1]) + for (i = 2; i < nfields; i++) { + key = field[i] + keylen = length(key) + if (S_is_set[key]) { + value = S[key] + line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) + len += length(value) + length(field[++i]) + substed = 1 + } else + len += 1 + keylen + } + + print line +} + diff --git a/test/mdim4.in b/test/mdim4.in new file mode 100644 index 00000000..597f3a8b --- /dev/null +++ b/test/mdim4.in @@ -0,0 +1,1373 @@ +# Makefile.in generated by automake 1.16.5 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994-2021 Free Software Foundation, Inc. + +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +# +# Makefile.am --- automake input file for gawk +# +# Copyright (C) 2000-2021 the Free Software Foundation, Inc. +# +# This file is part of GAWK, the GNU implementation of the +# AWK Programming Language. +# +# GAWK is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# GAWK 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 General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA +# + + + +VPATH = @srcdir@ +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ + +# Build in extension before test so that +# ./configure && make check +# works properly too. +@ENABLE_EXTENSIONS_TRUE@am__append_1 = extension +bin_PROGRAMS = gawk$(EXEEXT) +subdir = . +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/arch.m4 \ + $(top_srcdir)/m4/codeset.m4 $(top_srcdir)/m4/gettext.m4 \ + $(top_srcdir)/m4/host-cpu-c-abi.m4 $(top_srcdir)/m4/iconv.m4 \ + $(top_srcdir)/m4/intlmacosx.m4 $(top_srcdir)/m4/lcmessage.m4 \ + $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ + $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libsigsegv.m4 \ + $(top_srcdir)/m4/longlong.m4 $(top_srcdir)/m4/mpfr.m4 \ + $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/noreturn.m4 \ + $(top_srcdir)/m4/pma.m4 $(top_srcdir)/m4/po.m4 \ + $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/m4/readline.m4 \ + $(top_srcdir)/m4/socket.m4 \ + $(top_srcdir)/m4/triplet-transformation.m4 \ + $(top_srcdir)/m4/ulonglong.m4 $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(top_srcdir)/configure \ + $(am__configure_deps) $(include_HEADERS) $(am__DIST_COMMON) +am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ + configure.lineno config.status.lineno +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = config.h +CONFIG_CLEAN_FILES = gawkbug +CONFIG_CLEAN_VPATH_FILES = +am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(bindir)" \ + "$(DESTDIR)$(includedir)" +PROGRAMS = $(bin_PROGRAMS) +am__objects_1 = array.$(OBJEXT) awkgram.$(OBJEXT) builtin.$(OBJEXT) \ + cint_array.$(OBJEXT) command.$(OBJEXT) debug.$(OBJEXT) \ + eval.$(OBJEXT) ext.$(OBJEXT) field.$(OBJEXT) \ + floatcomp.$(OBJEXT) gawkapi.$(OBJEXT) gawkmisc.$(OBJEXT) \ + int_array.$(OBJEXT) io.$(OBJEXT) main.$(OBJEXT) mpfr.$(OBJEXT) \ + msg.$(OBJEXT) node.$(OBJEXT) profile.$(OBJEXT) re.$(OBJEXT) \ + replace.$(OBJEXT) str_array.$(OBJEXT) symbol.$(OBJEXT) \ + version.$(OBJEXT) +am_gawk_OBJECTS = $(am__objects_1) +gawk_OBJECTS = $(am_gawk_OBJECTS) +gawk_LDADD = $(LDADD) +am__DEPENDENCIES_1 = +gawk_DEPENDENCIES = support/libsupport.a $(am__DEPENDENCIES_1) \ + $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ + $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ + $(am__DEPENDENCIES_1) +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } +SCRIPTS = $(bin_SCRIPTS) +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = +DEFAULT_INCLUDES = -I.@am__isrc@ +depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp +am__maybe_remake_depfiles = depfiles +am__depfiles_remade = ./$(DEPDIR)/array.Po ./$(DEPDIR)/awkgram.Po \ + ./$(DEPDIR)/builtin.Po ./$(DEPDIR)/cint_array.Po \ + ./$(DEPDIR)/command.Po ./$(DEPDIR)/debug.Po \ + ./$(DEPDIR)/eval.Po ./$(DEPDIR)/ext.Po ./$(DEPDIR)/field.Po \ + ./$(DEPDIR)/floatcomp.Po ./$(DEPDIR)/gawkapi.Po \ + ./$(DEPDIR)/gawkmisc.Po ./$(DEPDIR)/int_array.Po \ + ./$(DEPDIR)/io.Po ./$(DEPDIR)/main.Po ./$(DEPDIR)/mpfr.Po \ + ./$(DEPDIR)/msg.Po ./$(DEPDIR)/node.Po ./$(DEPDIR)/profile.Po \ + ./$(DEPDIR)/re.Po ./$(DEPDIR)/replace.Po \ + ./$(DEPDIR)/str_array.Po ./$(DEPDIR)/symbol.Po \ + ./$(DEPDIR)/version.Po +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_@AM_V@) +am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) +am__v_CC_0 = @echo " CC " $@; +am__v_CC_1 = +CCLD = $(CC) +LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_@AM_V@) +am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) +am__v_CCLD_0 = @echo " CCLD " $@; +am__v_CCLD_1 = +am__yacc_c2h = sed -e s/cc$$/hh/ -e s/cpp$$/hpp/ -e s/cxx$$/hxx/ \ + -e s/c++$$/h++/ -e s/c$$/h/ +YACCCOMPILE = $(YACC) $(AM_YFLAGS) $(YFLAGS) +AM_V_YACC = $(am__v_YACC_@AM_V@) +am__v_YACC_ = $(am__v_YACC_@AM_DEFAULT_V@) +am__v_YACC_0 = @echo " YACC " $@; +am__v_YACC_1 = +YLWRAP = $(top_srcdir)/build-aux/ylwrap +SOURCES = $(gawk_SOURCES) +DIST_SOURCES = $(gawk_SOURCES) +RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ + ctags-recursive dvi-recursive html-recursive info-recursive \ + install-data-recursive install-dvi-recursive \ + install-exec-recursive install-html-recursive \ + install-info-recursive install-pdf-recursive \ + install-ps-recursive install-recursive installcheck-recursive \ + installdirs-recursive pdf-recursive ps-recursive \ + tags-recursive uninstall-recursive +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +HEADERS = $(include_HEADERS) +RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ + distclean-recursive maintainer-clean-recursive +am__recursive_targets = \ + $(RECURSIVE_TARGETS) \ + $(RECURSIVE_CLEAN_TARGETS) \ + $(am__extra_recursive_targets) +AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ + cscope distdir distdir-am dist dist-all distcheck +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) \ + configh.in +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` +DIST_SUBDIRS = support . extension extras doc awklib po test +am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/configh.in \ + $(srcdir)/gawkbug.in $(top_srcdir)/build-aux/ar-lib \ + $(top_srcdir)/build-aux/compile \ + $(top_srcdir)/build-aux/config.guess \ + $(top_srcdir)/build-aux/config.rpath \ + $(top_srcdir)/build-aux/config.sub \ + $(top_srcdir)/build-aux/depcomp \ + $(top_srcdir)/build-aux/install-sh \ + $(top_srcdir)/build-aux/missing $(top_srcdir)/build-aux/ylwrap \ + ABOUT-NLS AUTHORS COPYING ChangeLog INSTALL NEWS README TODO \ + awkgram.c build-aux/ChangeLog build-aux/ar-lib \ + build-aux/compile build-aux/config.guess \ + build-aux/config.rpath build-aux/config.sub build-aux/depcomp \ + build-aux/install-sh build-aux/ltmain.sh build-aux/missing \ + build-aux/texinfo.tex build-aux/ylwrap command.c +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +distdir = $(PACKAGE)-$(VERSION) +top_distdir = $(distdir) +am__remove_distdir = \ + if test -d "$(distdir)"; then \ + find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \ + && rm -rf "$(distdir)" \ + || { sleep 5 && rm -rf "$(distdir)"; }; \ + else :; fi +am__post_remove_distdir = $(am__remove_distdir) +am__relativize = \ + dir0=`pwd`; \ + sed_first='s,^\([^/]*\)/.*$$,\1,'; \ + sed_rest='s,^[^/]*/*,,'; \ + sed_last='s,^.*/\([^/]*\)$$,\1,'; \ + sed_butlast='s,/*[^/]*$$,,'; \ + while test -n "$$dir1"; do \ + first=`echo "$$dir1" | sed -e "$$sed_first"`; \ + if test "$$first" != "."; then \ + if test "$$first" = ".."; then \ + dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ + dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ + else \ + first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ + if test "$$first2" = "$$first"; then \ + dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ + else \ + dir2="../$$dir2"; \ + fi; \ + dir0="$$dir0"/"$$first"; \ + fi; \ + fi; \ + dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ + done; \ + reldir="$$dir2" +DIST_ARCHIVES = $(distdir).tar.gz $(distdir).tar.lz $(distdir).tar.xz +GZIP_ENV = --best +DIST_TARGETS = dist-lzip dist-xz dist-gzip +# Exists only to be overridden by the user if desired. +AM_DISTCHECK_DVI_TARGET = dvi +distuninstallcheck_listfiles = find . -type f -print +am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \ + | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$' +distcleancheck_listfiles = find . -type f -print + +# Directory for gawk's data files. Automake supplies datadir. +pkgdatadir = $(datadir)/awk +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CSCOPE = @CSCOPE@ +CTAGS = @CTAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = -DDEFPATH=$(DEFPATH) -DDEFLIBPATH=$(DEFLIBPATH) -DSHLIBEXT=$(SHLIBEXT) -DHAVE_CONFIG_H -DGAWK -DLOCALEDIR='"$(datadir)/locale"' -I"$(srcdir)/support" +DEPDIR = @DEPDIR@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +ETAGS = @ETAGS@ +EXEEXT = @EXEEXT@ +GAWKLIBEXT = @GAWKLIBEXT@ +GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ +GMSGFMT = @GMSGFMT@ +GMSGFMT_015 = @GMSGFMT_015@ +GREP = @GREP@ +HAVE_LIBSIGSEGV = @HAVE_LIBSIGSEGV@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +INTLLIBS = @INTLLIBS@ +INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ +LDFLAGS = @LDFLAGS@ +LIBICONV = @LIBICONV@ +LIBINTL = @LIBINTL@ +LIBMPFR = @LIBMPFR@ +LIBOBJS = @LIBOBJS@ +LIBREADLINE = @LIBREADLINE@ +LIBS = @LIBS@ +LIBSIGSEGV = @LIBSIGSEGV@ +LIBSIGSEGV_PREFIX = @LIBSIGSEGV_PREFIX@ +LN_S = @LN_S@ +LTLIBICONV = @LTLIBICONV@ +LTLIBINTL = @LTLIBINTL@ +LTLIBOBJS = @LTLIBOBJS@ +LTLIBSIGSEGV = @LTLIBSIGSEGV@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +MSGFMT = @MSGFMT@ +MSGMERGE = @MSGMERGE@ +MSGMERGE_FOR_MSGFMT_OPTION = @MSGMERGE_FOR_MSGFMT_OPTION@ +OBJEXT = @OBJEXT@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +POSUB = @POSUB@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +SOCKET_LIBS = @SOCKET_LIBS@ +STRIP = @STRIP@ +USE_NLS = @USE_NLS@ +VERSION = @VERSION@ +XGETTEXT = @XGETTEXT@ +XGETTEXT_015 = @XGETTEXT_015@ +XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ +YACC = @YACC@ +YFLAGS = @YFLAGS@ +ZOS_FAIL = @ZOS_FAIL@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +acl_shlibext = @acl_shlibext@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +pkgextensiondir = @pkgextensiondir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +runstatedir = @runstatedir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +subdirs = @subdirs@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ + +# This variable insures that aclocal runs +# correctly after changing configure.ac +ACLOCAL_AMFLAGS = -I m4 +AM_CFLAGS = @CFLAGS@ +AM_LDFLAGS = @LDFLAGS@ + +# Stuff to include in the dist that doesn't need it's own +# Makefile.am files +EXTRA_DIST = \ + ChangeLog.0 \ + ChangeLog.1 \ + COPYING \ + INSTALL \ + NEWS \ + NEWS.0 \ + NEWS.1 \ + POSIX.STD \ + README_d \ + m4 \ + missing_d \ + po/README \ + pc \ + posix \ + vms + + +# The order to do things in. +# +# Build in support first, since we need the support library. +# +# Build explicitly in "." in order to build gawk first, so +# that `make check' without a prior `make' works. + +# Build in awklib after in doc, since we want to extract +# sample files if doc/gawk.texi changed. +SUBDIRS = support . $(am__append_1) extras doc awklib po test +bin_SCRIPTS = gawkbug +include_HEADERS = gawkapi.h +BUILT_SOURCES = $(srcdir)/pc/Makefile.tst + +# sources for gawk +base_sources = \ + array.c \ + awk.h \ + awkgram.y \ + builtin.c \ + cint_array.c \ + cmd.h \ + command.y \ + custom.h \ + debug.c \ + eval.c \ + ext.c \ + field.c \ + floatcomp.c \ + floatmagic.h \ + gawkapi.c \ + gawkapi.h \ + gawkmisc.c \ + gettext.h \ + int_array.c \ + interpret.h \ + io.c \ + mbsupport.h \ + main.c \ + mpfr.c \ + msg.c \ + node.c \ + nonposix.h \ + profile.c \ + protos.h \ + re.c \ + replace.c \ + str_array.c \ + symbol.c \ + version.c + +gawk_SOURCES = $(base_sources) + +# Get extra libs as needed, Automake will supply LIBINTL and SOCKET_LIBS. +LDADD = support/libsupport.a \ + $(LIBSIGSEGV) $(LIBINTL) $(SOCKET_LIBS) $(LIBREADLINE) $(LIBMPFR) \ + $(LDFLAGS) + + +# stuff for compiling gawk/pgawk +DEFPATH = '".$(PATH_SEPARATOR)$(pkgdatadir)"' + +# shared library support: +SHLIBEXT = "\"$(GAWKLIBEXT)"\" +DEFLIBPATH = "\"$(pkgextensiondir)\"" + +# Get rid of core files when cleaning +CLEANFILES = core core.* $(bin_SCRIPTS) + +# We want hard links for install-exec-hook, below +LN = ln + +# Make copies... +CP = cp + +# For some make's, e.g. OpenBSD, that don't define this +RM = rm -f +all: $(BUILT_SOURCES) config.h + $(MAKE) $(AM_MAKEFLAGS) all-recursive + +.SUFFIXES: +.SUFFIXES: .c .o .obj .y +am--refresh: Makefile + @: +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + echo ' cd $(srcdir) && $(AUTOMAKE) --gnu'; \ + $(am__cd) $(srcdir) && $(AUTOMAKE) --gnu \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + echo ' $(SHELL) ./config.status'; \ + $(SHELL) ./config.status;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__maybe_remake_depfiles)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__maybe_remake_depfiles);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + $(SHELL) ./config.status --recheck + +$(top_srcdir)/configure: $(am__configure_deps) + $(am__cd) $(srcdir) && $(AUTOCONF) +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) +$(am__aclocal_m4_deps): + +config.h: stamp-h1 + @test -f $@ || rm -f stamp-h1 + @test -f $@ || $(MAKE) $(AM_MAKEFLAGS) stamp-h1 + +stamp-h1: $(srcdir)/configh.in $(top_builddir)/config.status + @rm -f stamp-h1 + cd $(top_builddir) && $(SHELL) ./config.status config.h +$(srcdir)/configh.in: $(am__configure_deps) + ($(am__cd) $(top_srcdir) && $(AUTOHEADER)) + rm -f stamp-h1 + touch $@ + +distclean-hdr: + -rm -f config.h stamp-h1 +gawkbug: $(top_builddir)/config.status $(srcdir)/gawkbug.in + cd $(top_builddir) && $(SHELL) ./config.status $@ +install-binPROGRAMS: $(bin_PROGRAMS) + @$(NORMAL_INSTALL) + @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ + fi; \ + for p in $$list; do echo "$$p $$p"; done | \ + sed 's/$(EXEEXT)$$//' | \ + while read p p1; do if test -f $$p \ + ; then echo "$$p"; echo "$$p"; else :; fi; \ + done | \ + sed -e 'p;s,.*/,,;n;h' \ + -e 's|.*|.|' \ + -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ + sed 'N;N;N;s,\n, ,g' | \ + $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ + { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ + if ($$2 == $$4) files[d] = files[d] " " $$1; \ + else { print "f", $$3 "/" $$4, $$1; } } \ + END { for (d in files) print "f", d, files[d] }' | \ + while read type dir files; do \ + if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ + test -z "$$files" || { \ + echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ + $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ + } \ + ; done + +uninstall-binPROGRAMS: + @$(NORMAL_UNINSTALL) + @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ + files=`for p in $$list; do echo "$$p"; done | \ + sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ + -e 's/$$/$(EXEEXT)/' \ + `; \ + test -n "$$list" || exit 0; \ + echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(bindir)" && rm -f $$files + +clean-binPROGRAMS: + -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) + +gawk$(EXEEXT): $(gawk_OBJECTS) $(gawk_DEPENDENCIES) $(EXTRA_gawk_DEPENDENCIES) + @rm -f gawk$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(gawk_OBJECTS) $(gawk_LDADD) $(LIBS) +install-binSCRIPTS: $(bin_SCRIPTS) + @$(NORMAL_INSTALL) + @list='$(bin_SCRIPTS)'; test -n "$(bindir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ + fi; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \ + done | \ + sed -e 'p;s,.*/,,;n' \ + -e 'h;s|.*|.|' \ + -e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \ + $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \ + { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ + if ($$2 == $$4) { files[d] = files[d] " " $$1; \ + if (++n[d] == $(am__install_max)) { \ + print "f", d, files[d]; n[d] = 0; files[d] = "" } } \ + else { print "f", d "/" $$4, $$1 } } \ + END { for (d in files) print "f", d, files[d] }' | \ + while read type dir files; do \ + if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ + test -z "$$files" || { \ + echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(bindir)$$dir'"; \ + $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ + } \ + ; done + +uninstall-binSCRIPTS: + @$(NORMAL_UNINSTALL) + @list='$(bin_SCRIPTS)'; test -n "$(bindir)" || exit 0; \ + files=`for p in $$list; do echo "$$p"; done | \ + sed -e 's,.*/,,;$(transform)'`; \ + dir='$(DESTDIR)$(bindir)'; $(am__uninstall_files_from_dir) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/array.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/awkgram.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/builtin.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cint_array.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/command.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/debug.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eval.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ext.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/field.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/floatcomp.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gawkapi.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gawkmisc.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/int_array.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/io.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/main.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mpfr.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/msg.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/node.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/profile.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/re.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/replace.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/str_array.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/symbol.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/version.Po@am__quote@ # am--include-marker + +$(am__depfiles_remade): + @$(MKDIR_P) $(@D) + @echo '# dummy' >$@-t && $(am__mv) $@-t $@ + +am--depfiles: $(am__depfiles_remade) + +.c.o: +@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ +@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< + +.c.obj: +@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ +@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +.y.c: + $(AM_V_YACC)$(am__skipyacc) $(SHELL) $(YLWRAP) $< y.tab.c $@ y.tab.h `echo $@ | $(am__yacc_c2h)` y.output $*.output -- $(YACCCOMPILE) +install-includeHEADERS: $(include_HEADERS) + @$(NORMAL_INSTALL) + @list='$(include_HEADERS)'; test -n "$(includedir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(includedir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(includedir)" || exit 1; \ + fi; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(includedir)'"; \ + $(INSTALL_HEADER) $$files "$(DESTDIR)$(includedir)" || exit $$?; \ + done + +uninstall-includeHEADERS: + @$(NORMAL_UNINSTALL) + @list='$(include_HEADERS)'; test -n "$(includedir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + dir='$(DESTDIR)$(includedir)'; $(am__uninstall_files_from_dir) + +# This directory's subdirectories are mostly independent; you can cd +# into them and run 'make' without going through this Makefile. +# To change the values of 'make' variables: instead of editing Makefiles, +# (1) if the variable is set in 'config.status', edit 'config.status' +# (which will cause the Makefiles to be regenerated when you run 'make'); +# (2) otherwise, pass the desired values on the 'make' command line. +$(am__recursive_targets): + @fail=; \ + if $(am__make_keepgoing); then \ + failcom='fail=yes'; \ + else \ + failcom='exit 1'; \ + fi; \ + dot_seen=no; \ + target=`echo $@ | sed s/-recursive//`; \ + case "$@" in \ + distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ + *) list='$(SUBDIRS)' ;; \ + esac; \ + for subdir in $$list; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + dot_seen=yes; \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done; \ + if test "$$dot_seen" = "no"; then \ + $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ + fi; test -z "$$fail" + +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-recursive +TAGS: tags + +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + set x; \ + here=`pwd`; \ + if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ + include_option=--etags-include; \ + empty_fix=.; \ + else \ + include_option=--include; \ + empty_fix=; \ + fi; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test ! -f $$subdir/TAGS || \ + set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ + fi; \ + done; \ + $(am__define_uniq_tagged_files); \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: ctags-recursive + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" +cscope: cscope.files + test ! -s cscope.files \ + || $(CSCOPE) -b -q $(AM_CSCOPEFLAGS) $(CSCOPEFLAGS) -i cscope.files $(CSCOPE_ARGS) +clean-cscope: + -rm -f cscope.files +cscope.files: clean-cscope cscopelist +cscopelist: cscopelist-recursive + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + -rm -f cscope.out cscope.in.out cscope.po.out cscope.files +distdir: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) distdir-am + +distdir-am: $(DISTFILES) + $(am__remove_distdir) + test -d "$(distdir)" || mkdir "$(distdir)" + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done + @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + $(am__make_dryrun) \ + || test -d "$(distdir)/$$subdir" \ + || $(MKDIR_P) "$(distdir)/$$subdir" \ + || exit 1; \ + dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ + $(am__relativize); \ + new_distdir=$$reldir; \ + dir1=$$subdir; dir2="$(top_distdir)"; \ + $(am__relativize); \ + new_top_distdir=$$reldir; \ + echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ + echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ + ($(am__cd) $$subdir && \ + $(MAKE) $(AM_MAKEFLAGS) \ + top_distdir="$$new_top_distdir" \ + distdir="$$new_distdir" \ + am__remove_distdir=: \ + am__skip_length_check=: \ + am__skip_mode_fix=: \ + distdir) \ + || exit 1; \ + fi; \ + done + $(MAKE) $(AM_MAKEFLAGS) \ + top_distdir="$(top_distdir)" distdir="$(distdir)" \ + dist-hook + -test -n "$(am__skip_mode_fix)" \ + || find "$(distdir)" -type d ! -perm -755 \ + -exec chmod u+rwx,go+rx {} \; -o \ + ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ + ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ + ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ + || chmod -R a+r "$(distdir)" +dist-gzip: distdir + tardir=$(distdir) && $(am__tar) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).tar.gz + $(am__post_remove_distdir) + +dist-bzip2: distdir + tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2 + $(am__post_remove_distdir) +dist-lzip: distdir + tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz + $(am__post_remove_distdir) +dist-xz: distdir + tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz + $(am__post_remove_distdir) + +dist-zstd: distdir + tardir=$(distdir) && $(am__tar) | zstd -c $${ZSTD_CLEVEL-$${ZSTD_OPT--19}} >$(distdir).tar.zst + $(am__post_remove_distdir) + +dist-tarZ: distdir + @echo WARNING: "Support for distribution archives compressed with" \ + "legacy program 'compress' is deprecated." >&2 + @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 + tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z + $(am__post_remove_distdir) + +dist-shar: distdir + @echo WARNING: "Support for shar distribution archives is" \ + "deprecated." >&2 + @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 + shar $(distdir) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).shar.gz + $(am__post_remove_distdir) + +dist-zip: distdir + -rm -f $(distdir).zip + zip -rq $(distdir).zip $(distdir) + $(am__post_remove_distdir) + +dist dist-all: + $(MAKE) $(AM_MAKEFLAGS) $(DIST_TARGETS) am__post_remove_distdir='@:' + $(am__post_remove_distdir) + +# This target untars the dist file and tries a VPATH configuration. Then +# it guarantees that the distribution is self-contained by making another +# tarfile. +distcheck: dist + case '$(DIST_ARCHIVES)' in \ + *.tar.gz*) \ + eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).tar.gz | $(am__untar) ;;\ + *.tar.bz2*) \ + bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ + *.tar.lz*) \ + lzip -dc $(distdir).tar.lz | $(am__untar) ;;\ + *.tar.xz*) \ + xz -dc $(distdir).tar.xz | $(am__untar) ;;\ + *.tar.Z*) \ + uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ + *.shar.gz*) \ + eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).shar.gz | unshar ;;\ + *.zip*) \ + unzip $(distdir).zip ;;\ + *.tar.zst*) \ + zstd -dc $(distdir).tar.zst | $(am__untar) ;;\ + esac + chmod -R a-w $(distdir) + chmod u+w $(distdir) + mkdir $(distdir)/_build $(distdir)/_build/sub $(distdir)/_inst + chmod a-w $(distdir) + test -d $(distdir)/_build || exit 0; \ + dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ + && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ + && am__cwd=`pwd` \ + && $(am__cd) $(distdir)/_build/sub \ + && ../../configure \ + $(AM_DISTCHECK_CONFIGURE_FLAGS) \ + $(DISTCHECK_CONFIGURE_FLAGS) \ + --srcdir=../.. --prefix="$$dc_install_base" \ + && $(MAKE) $(AM_MAKEFLAGS) \ + && $(MAKE) $(AM_MAKEFLAGS) $(AM_DISTCHECK_DVI_TARGET) \ + && $(MAKE) $(AM_MAKEFLAGS) check \ + && $(MAKE) $(AM_MAKEFLAGS) install \ + && $(MAKE) $(AM_MAKEFLAGS) installcheck \ + && $(MAKE) $(AM_MAKEFLAGS) uninstall \ + && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ + distuninstallcheck \ + && chmod -R a-w "$$dc_install_base" \ + && ({ \ + (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ + && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ + && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ + && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ + distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ + } || { rm -rf "$$dc_destdir"; exit 1; }) \ + && rm -rf "$$dc_destdir" \ + && $(MAKE) $(AM_MAKEFLAGS) dist \ + && rm -rf $(DIST_ARCHIVES) \ + && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \ + && cd "$$am__cwd" \ + || exit 1 + $(am__post_remove_distdir) + @(echo "$(distdir) archives ready for distribution: "; \ + list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ + sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' +distuninstallcheck: + @test -n '$(distuninstallcheck_dir)' || { \ + echo 'ERROR: trying to run $@ with an empty' \ + '$$(distuninstallcheck_dir)' >&2; \ + exit 1; \ + }; \ + $(am__cd) '$(distuninstallcheck_dir)' || { \ + echo 'ERROR: cannot chdir into $(distuninstallcheck_dir)' >&2; \ + exit 1; \ + }; \ + test `$(am__distuninstallcheck_listfiles) | wc -l` -eq 0 \ + || { echo "ERROR: files left after uninstall:" ; \ + if test -n "$(DESTDIR)"; then \ + echo " (check DESTDIR support)"; \ + fi ; \ + $(distuninstallcheck_listfiles) ; \ + exit 1; } >&2 +distcleancheck: distclean + @if test '$(srcdir)' = . ; then \ + echo "ERROR: distcleancheck can only run from a VPATH build" ; \ + exit 1 ; \ + fi + @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ + || { echo "ERROR: files left in build directory after distclean:" ; \ + $(distcleancheck_listfiles) ; \ + exit 1; } >&2 +check-am: all-am + $(MAKE) $(AM_MAKEFLAGS) check-local +check: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) check-recursive +all-am: Makefile $(PROGRAMS) $(SCRIPTS) $(HEADERS) config.h +installdirs: installdirs-recursive +installdirs-am: + for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(includedir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) install-recursive +install-exec: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) install-exec-recursive +install-data: install-data-recursive +uninstall: uninstall-recursive + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-recursive +install-strip: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi +mostlyclean-generic: + +clean-generic: + -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." + -rm -f awkgram.c + -rm -f command.c + -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) +clean: clean-recursive + +clean-am: clean-binPROGRAMS clean-generic mostlyclean-am + +distclean: distclean-recursive + -rm -f $(am__CONFIG_DISTCLEAN_FILES) + -rm -f ./$(DEPDIR)/array.Po + -rm -f ./$(DEPDIR)/awkgram.Po + -rm -f ./$(DEPDIR)/builtin.Po + -rm -f ./$(DEPDIR)/cint_array.Po + -rm -f ./$(DEPDIR)/command.Po + -rm -f ./$(DEPDIR)/debug.Po + -rm -f ./$(DEPDIR)/eval.Po + -rm -f ./$(DEPDIR)/ext.Po + -rm -f ./$(DEPDIR)/field.Po + -rm -f ./$(DEPDIR)/floatcomp.Po + -rm -f ./$(DEPDIR)/gawkapi.Po + -rm -f ./$(DEPDIR)/gawkmisc.Po + -rm -f ./$(DEPDIR)/int_array.Po + -rm -f ./$(DEPDIR)/io.Po + -rm -f ./$(DEPDIR)/main.Po + -rm -f ./$(DEPDIR)/mpfr.Po + -rm -f ./$(DEPDIR)/msg.Po + -rm -f ./$(DEPDIR)/node.Po + -rm -f ./$(DEPDIR)/profile.Po + -rm -f ./$(DEPDIR)/re.Po + -rm -f ./$(DEPDIR)/replace.Po + -rm -f ./$(DEPDIR)/str_array.Po + -rm -f ./$(DEPDIR)/symbol.Po + -rm -f ./$(DEPDIR)/version.Po + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-hdr distclean-local distclean-tags + +dvi: dvi-recursive + +dvi-am: + +html: html-recursive + +html-am: + +info: info-recursive + +info-am: + +install-data-am: install-includeHEADERS + +install-dvi: install-dvi-recursive + +install-dvi-am: + +install-exec-am: install-binPROGRAMS install-binSCRIPTS + @$(NORMAL_INSTALL) + $(MAKE) $(AM_MAKEFLAGS) install-exec-hook +install-html: install-html-recursive + +install-html-am: + +install-info: install-info-recursive + +install-info-am: + +install-man: + +install-pdf: install-pdf-recursive + +install-pdf-am: + +install-ps: install-ps-recursive + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-recursive + -rm -f $(am__CONFIG_DISTCLEAN_FILES) + -rm -rf $(top_srcdir)/autom4te.cache + -rm -f ./$(DEPDIR)/array.Po + -rm -f ./$(DEPDIR)/awkgram.Po + -rm -f ./$(DEPDIR)/builtin.Po + -rm -f ./$(DEPDIR)/cint_array.Po + -rm -f ./$(DEPDIR)/command.Po + -rm -f ./$(DEPDIR)/debug.Po + -rm -f ./$(DEPDIR)/eval.Po + -rm -f ./$(DEPDIR)/ext.Po + -rm -f ./$(DEPDIR)/field.Po + -rm -f ./$(DEPDIR)/floatcomp.Po + -rm -f ./$(DEPDIR)/gawkapi.Po + -rm -f ./$(DEPDIR)/gawkmisc.Po + -rm -f ./$(DEPDIR)/int_array.Po + -rm -f ./$(DEPDIR)/io.Po + -rm -f ./$(DEPDIR)/main.Po + -rm -f ./$(DEPDIR)/mpfr.Po + -rm -f ./$(DEPDIR)/msg.Po + -rm -f ./$(DEPDIR)/node.Po + -rm -f ./$(DEPDIR)/profile.Po + -rm -f ./$(DEPDIR)/re.Po + -rm -f ./$(DEPDIR)/replace.Po + -rm -f ./$(DEPDIR)/str_array.Po + -rm -f ./$(DEPDIR)/symbol.Po + -rm -f ./$(DEPDIR)/version.Po + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-recursive + +mostlyclean-am: mostlyclean-compile mostlyclean-generic + +pdf: pdf-recursive + +pdf-am: + +ps: ps-recursive + +ps-am: + +uninstall-am: uninstall-binPROGRAMS uninstall-binSCRIPTS \ + uninstall-includeHEADERS + +.MAKE: $(am__recursive_targets) all check check-am install install-am \ + install-exec install-exec-am install-strip + +.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am \ + am--depfiles am--refresh check check-am check-local clean \ + clean-binPROGRAMS clean-cscope clean-generic cscope \ + cscopelist-am ctags ctags-am dist dist-all dist-bzip2 \ + dist-gzip dist-hook dist-lzip dist-shar dist-tarZ dist-xz \ + dist-zip dist-zstd distcheck distclean distclean-compile \ + distclean-generic distclean-hdr distclean-local distclean-tags \ + distcleancheck distdir distuninstallcheck dvi dvi-am html \ + html-am info info-am install install-am install-binPROGRAMS \ + install-binSCRIPTS install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-exec-hook \ + install-html install-html-am install-includeHEADERS \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-ps install-ps-am install-strip \ + installcheck installcheck-am installdirs installdirs-am \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-compile mostlyclean-generic pdf pdf-am ps ps-am \ + tags tags-am uninstall uninstall-am uninstall-binPROGRAMS \ + uninstall-binSCRIPTS uninstall-includeHEADERS + +.PRECIOUS: Makefile + + +# First, add a link from gawk to gawk-X.Y.Z. +# +# For GNU systems where gawk is awk, add a link to awk. +# (This is done universally, which may not always be right, but +# there's no easy way to distinguish GNU from non-GNU systems.) +# +# Use the transform, in case --program-prefix=XXX +install-exec-hook: + (cd $(DESTDIR)$(bindir); \ + name=`echo gawk | sed '$(transform)'` ; \ + $(LN) $${name}$(EXEEXT) gawk-$(VERSION)$(EXEEXT) 2>/dev/null ; \ + if [ ! -f awk$(EXEEXT) ]; \ + then $(LN_S) $${name}$(EXEEXT) awk$(EXEEXT); \ + fi; exit 0) + +# Undo the above when uninstalling +uninstall-links: + (cd $(DESTDIR)$(bindir); \ + name=`echo gawk | sed '$(transform)'` ; \ + if [ -f awk$(EXEEXT) ] && cmp awk$(EXEEXT) $${name}$(EXEEXT) > /dev/null; then rm -f awk$(EXEEXT); fi ; \ + rm -f gawk-$(VERSION)$(EXEEXT); exit 0) + +uninstall-recursive: uninstall-links + +# force there to be a gawk executable before running tests +check-local: gawk$(EXEEXT) + +# A little extra clean up when making distributions. +dist-hook: + cd "$(distdir)"/extension ; rm -f *.o *.so + cd "$(srcdir)"/pc ; \ + chmod u+w config.h ; \ + sed -n -f configpk.sed < ../configure.ac > /tmp/tmp.sed ; \ + sed -f config.sed < ../configh.in > /tmp/config.tmp ; \ + sed -f /tmp/tmp.sed < /tmp/config.tmp > config.h ; \ + $(RM) /tmp/tmp.sed /tmp/config.tmp + pwd + chmod u+w "$(distdir)"/pc/config.h + cp "$(srcdir)"/pc/config.h "$(distdir)"/pc/config.h + +# Special rules for individual files + +$(srcdir)/awkgram.c: awkgram.y + $(YACC) -o $@ $(AM_YFLAGS) $(YFLAGS) $< + sed 's/parse error/syntax error/g' < $@ > $@.tmp && mv $@.tmp $@ + +$(srcdir)/command.c: command.y + $(YACC) -o $@ -p zz $< + sed 's/parse error/syntax error/g' < $@ > $@.tmp && mv $@.tmp $@ + +$(srcdir)/pc/Makefile.tst: test/Makefile.in pc/Makefile.tst.prologue pc/GenMakefileTst.awk + $(AM_V_GEN)$(MKDIR_P) "$(srcdir)"/pc && \ + cat "$(srcdir)"/pc/Makefile.tst.prologue > "$(srcdir)"/pc/Makefile.tst && \ + $(AWK) -f "$(srcdir)"/pc/GenMakefileTst.awk "$(srcdir)"/test/Makefile.in >> "$(srcdir)"/pc/Makefile.tst + +# This is for my development & testing. +efence: gawk + $(CC) $(AM_LDFLAGS) -o gawk $$(ls *.o | grep -v '_p.o$$') $(LDADD) $(LIBS) -lefence + +diffout valgrind-scan zos-diffout: + @cd test && $(MAKE) $(AM_MAKEFLAGS) $@ + +valgrind: + cd test; rm -f log.[0-9]*; \ + make check VALGRIND="valgrind --leak-check=full --log-file=log.%p"; \ + make valgrind-scan + +valgrind-noleak: + cd test; rm -f log.[0-9]*; \ + make check VALGRIND="valgrind --leak-check=no --log-file=log.%p"; \ + make valgrind-scan + +spell: + cd "$(srcdir)"/doc ; $(MAKE) spell + +distclean-local: + rm -fr .deps + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/test/mdim4.ok b/test/mdim4.ok new file mode 100644 index 00000000..bb7c8d88 --- /dev/null +++ b/test/mdim4.ok @@ -0,0 +1,1373 @@ +# Makefile.in generated by automake 1.16.5 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994-2021 Free Software Foundation, Inc. + +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + + + +# +# Makefile.am --- automake input file for gawk +# +# Copyright (C) 2000-2021 the Free Software Foundation, Inc. +# +# This file is part of GAWK, the GNU implementation of the +# AWK Programming Language. +# +# GAWK is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# GAWK 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 General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA +# + + + +VPATH = @srcdir@ +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) +pkgincludedir = $(includedir)/gawk +pkglibdir = $(libdir)/gawk +pkglibexecdir = $(libexecdir)/gawk +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = x86_64-pc-linux-gnu +host_triplet = x86_64-pc-linux-gnu + +# Build in extension before test so that +# ./configure && make check +# works properly too. +am__append_1 = extension +bin_PROGRAMS = gawk$(EXEEXT) +subdir = . +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/arch.m4 \ + $(top_srcdir)/m4/codeset.m4 $(top_srcdir)/m4/gettext.m4 \ + $(top_srcdir)/m4/host-cpu-c-abi.m4 $(top_srcdir)/m4/iconv.m4 \ + $(top_srcdir)/m4/intlmacosx.m4 $(top_srcdir)/m4/lcmessage.m4 \ + $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ + $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libsigsegv.m4 \ + $(top_srcdir)/m4/longlong.m4 $(top_srcdir)/m4/mpfr.m4 \ + $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/noreturn.m4 \ + $(top_srcdir)/m4/pma.m4 $(top_srcdir)/m4/po.m4 \ + $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/m4/readline.m4 \ + $(top_srcdir)/m4/socket.m4 \ + $(top_srcdir)/m4/triplet-transformation.m4 \ + $(top_srcdir)/m4/ulonglong.m4 $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(top_srcdir)/configure \ + $(am__configure_deps) $(include_HEADERS) $(am__DIST_COMMON) +am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ + configure.lineno config.status.lineno +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = config.h +CONFIG_CLEAN_FILES = gawkbug +CONFIG_CLEAN_VPATH_FILES = +am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(bindir)" \ + "$(DESTDIR)$(includedir)" +PROGRAMS = $(bin_PROGRAMS) +am__objects_1 = array.$(OBJEXT) awkgram.$(OBJEXT) builtin.$(OBJEXT) \ + cint_array.$(OBJEXT) command.$(OBJEXT) debug.$(OBJEXT) \ + eval.$(OBJEXT) ext.$(OBJEXT) field.$(OBJEXT) \ + floatcomp.$(OBJEXT) gawkapi.$(OBJEXT) gawkmisc.$(OBJEXT) \ + int_array.$(OBJEXT) io.$(OBJEXT) main.$(OBJEXT) mpfr.$(OBJEXT) \ + msg.$(OBJEXT) node.$(OBJEXT) profile.$(OBJEXT) re.$(OBJEXT) \ + replace.$(OBJEXT) str_array.$(OBJEXT) symbol.$(OBJEXT) \ + version.$(OBJEXT) +am_gawk_OBJECTS = $(am__objects_1) +gawk_OBJECTS = $(am_gawk_OBJECTS) +gawk_LDADD = $(LDADD) +am__DEPENDENCIES_1 = +gawk_DEPENDENCIES = support/libsupport.a $(am__DEPENDENCIES_1) \ + $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ + $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ + $(am__DEPENDENCIES_1) +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } +SCRIPTS = $(bin_SCRIPTS) +AM_V_P = $(am__v_P_$(V)) +am__v_P_ = $(am__v_P_$(AM_DEFAULT_VERBOSITY)) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_$(V)) +am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_$(V)) +am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) +am__v_at_0 = @ +am__v_at_1 = +DEFAULT_INCLUDES = -I. +depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp +am__maybe_remake_depfiles = depfiles +am__depfiles_remade = ./$(DEPDIR)/array.Po ./$(DEPDIR)/awkgram.Po \ + ./$(DEPDIR)/builtin.Po ./$(DEPDIR)/cint_array.Po \ + ./$(DEPDIR)/command.Po ./$(DEPDIR)/debug.Po \ + ./$(DEPDIR)/eval.Po ./$(DEPDIR)/ext.Po ./$(DEPDIR)/field.Po \ + ./$(DEPDIR)/floatcomp.Po ./$(DEPDIR)/gawkapi.Po \ + ./$(DEPDIR)/gawkmisc.Po ./$(DEPDIR)/int_array.Po \ + ./$(DEPDIR)/io.Po ./$(DEPDIR)/main.Po ./$(DEPDIR)/mpfr.Po \ + ./$(DEPDIR)/msg.Po ./$(DEPDIR)/node.Po ./$(DEPDIR)/profile.Po \ + ./$(DEPDIR)/re.Po ./$(DEPDIR)/replace.Po \ + ./$(DEPDIR)/str_array.Po ./$(DEPDIR)/symbol.Po \ + ./$(DEPDIR)/version.Po +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_$(V)) +am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY)) +am__v_CC_0 = @echo " CC " $@; +am__v_CC_1 = +CCLD = $(CC) +LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_$(V)) +am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY)) +am__v_CCLD_0 = @echo " CCLD " $@; +am__v_CCLD_1 = +am__yacc_c2h = sed -e s/cc$$/hh/ -e s/cpp$$/hpp/ -e s/cxx$$/hxx/ \ + -e s/c++$$/h++/ -e s/c$$/h/ +YACCCOMPILE = $(YACC) $(AM_YFLAGS) $(YFLAGS) +AM_V_YACC = $(am__v_YACC_$(V)) +am__v_YACC_ = $(am__v_YACC_$(AM_DEFAULT_VERBOSITY)) +am__v_YACC_0 = @echo " YACC " $@; +am__v_YACC_1 = +YLWRAP = $(top_srcdir)/build-aux/ylwrap +SOURCES = $(gawk_SOURCES) +DIST_SOURCES = $(gawk_SOURCES) +RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ + ctags-recursive dvi-recursive html-recursive info-recursive \ + install-data-recursive install-dvi-recursive \ + install-exec-recursive install-html-recursive \ + install-info-recursive install-pdf-recursive \ + install-ps-recursive install-recursive installcheck-recursive \ + installdirs-recursive pdf-recursive ps-recursive \ + tags-recursive uninstall-recursive +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +HEADERS = $(include_HEADERS) +RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ + distclean-recursive maintainer-clean-recursive +am__recursive_targets = \ + $(RECURSIVE_TARGETS) \ + $(RECURSIVE_CLEAN_TARGETS) \ + $(am__extra_recursive_targets) +AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ + cscope distdir distdir-am dist dist-all distcheck +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) \ + configh.in +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` +DIST_SUBDIRS = support . extension extras doc awklib po test +am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/configh.in \ + $(srcdir)/gawkbug.in $(top_srcdir)/build-aux/ar-lib \ + $(top_srcdir)/build-aux/compile \ + $(top_srcdir)/build-aux/config.guess \ + $(top_srcdir)/build-aux/config.rpath \ + $(top_srcdir)/build-aux/config.sub \ + $(top_srcdir)/build-aux/depcomp \ + $(top_srcdir)/build-aux/install-sh \ + $(top_srcdir)/build-aux/missing $(top_srcdir)/build-aux/ylwrap \ + ABOUT-NLS AUTHORS COPYING ChangeLog INSTALL NEWS README TODO \ + awkgram.c build-aux/ChangeLog build-aux/ar-lib \ + build-aux/compile build-aux/config.guess \ + build-aux/config.rpath build-aux/config.sub build-aux/depcomp \ + build-aux/install-sh build-aux/ltmain.sh build-aux/missing \ + build-aux/texinfo.tex build-aux/ylwrap command.c +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +distdir = $(PACKAGE)-$(VERSION) +top_distdir = $(distdir) +am__remove_distdir = \ + if test -d "$(distdir)"; then \ + find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \ + && rm -rf "$(distdir)" \ + || { sleep 5 && rm -rf "$(distdir)"; }; \ + else :; fi +am__post_remove_distdir = $(am__remove_distdir) +am__relativize = \ + dir0=`pwd`; \ + sed_first='s,^\([^/]*\)/.*$$,\1,'; \ + sed_rest='s,^[^/]*/*,,'; \ + sed_last='s,^.*/\([^/]*\)$$,\1,'; \ + sed_butlast='s,/*[^/]*$$,,'; \ + while test -n "$$dir1"; do \ + first=`echo "$$dir1" | sed -e "$$sed_first"`; \ + if test "$$first" != "."; then \ + if test "$$first" = ".."; then \ + dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ + dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ + else \ + first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ + if test "$$first2" = "$$first"; then \ + dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ + else \ + dir2="../$$dir2"; \ + fi; \ + dir0="$$dir0"/"$$first"; \ + fi; \ + fi; \ + dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ + done; \ + reldir="$$dir2" +DIST_ARCHIVES = $(distdir).tar.gz $(distdir).tar.lz $(distdir).tar.xz +GZIP_ENV = --best +DIST_TARGETS = dist-lzip dist-xz dist-gzip +# Exists only to be overridden by the user if desired. +AM_DISTCHECK_DVI_TARGET = dvi +distuninstallcheck_listfiles = find . -type f -print +am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \ + | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$' +distcleancheck_listfiles = find . -type f -print + +# Directory for gawk's data files. Automake supplies datadir. +pkgdatadir = $(datadir)/awk +ACLOCAL = ${SHELL} '/home/arnold/Gnu/gawk/gawk.git/build-aux/missing' aclocal-1.16 +AMTAR = $${TAR-tar} +AM_DEFAULT_VERBOSITY = 1 +AR = ar +AUTOCONF = ${SHELL} '/home/arnold/Gnu/gawk/gawk.git/build-aux/missing' autoconf +AUTOHEADER = ${SHELL} '/home/arnold/Gnu/gawk/gawk.git/build-aux/missing' autoheader +AUTOMAKE = ${SHELL} '/home/arnold/Gnu/gawk/gawk.git/build-aux/missing' automake-1.16 +AWK = gawk +CC = gcc +CCDEPMODE = depmode=gcc3 +CFLAGS = -g -O2 -DARRAYDEBUG -DYYDEBUG -DLOCALEDEBUG -DMEMDEBUG -Wall -fno-builtin -g3 -ggdb3 +CPP = gcc -E +CPPFLAGS = +CSCOPE = cscope +CTAGS = ctags +CYGPATH_W = echo +DEFS = -DDEFPATH=$(DEFPATH) -DDEFLIBPATH=$(DEFLIBPATH) -DSHLIBEXT=$(SHLIBEXT) -DHAVE_CONFIG_H -DGAWK -DLOCALEDIR='"$(datadir)/locale"' -I"$(srcdir)/support" +DEPDIR = .deps +ECHO_C = +ECHO_N = -n +ECHO_T = +EGREP = /bin/grep -E +ETAGS = etags +EXEEXT = +GAWKLIBEXT = so +GETTEXT_MACRO_VERSION = 0.20 +GMSGFMT = /usr/local/bin/msgfmt +GMSGFMT_015 = /usr/local/bin/msgfmt +GREP = /bin/grep +HAVE_LIBSIGSEGV = no +INSTALL = @INSTALL@ +INSTALL_DATA = ${INSTALL} -m 644 +INSTALL_PROGRAM = ${INSTALL} +INSTALL_SCRIPT = ${INSTALL} +INSTALL_STRIP_PROGRAM = $(install_sh) -c -s +INTLLIBS = +INTL_MACOSX_LIBS = +LDFLAGS = -no-pie +LIBICONV = -liconv +LIBINTL = +LIBMPFR = -lmpfr -lgmp +LIBOBJS = +LIBREADLINE = -lreadline +LIBS = -ldl -lm +LIBSIGSEGV = +LIBSIGSEGV_PREFIX = +LN_S = ln -s +LTLIBICONV = -liconv +LTLIBINTL = +LTLIBOBJS = +LTLIBSIGSEGV = +MAKEINFO = ${SHELL} '/home/arnold/Gnu/gawk/gawk.git/build-aux/missing' makeinfo +MKDIR_P = /bin/mkdir -p +MSGFMT = /usr/local/bin/msgfmt +MSGMERGE = /usr/local/bin/msgmerge +MSGMERGE_FOR_MSGFMT_OPTION = --for-msgfmt +OBJEXT = o +PACKAGE = gawk +PACKAGE_BUGREPORT = bug-gawk@gnu.org +PACKAGE_NAME = GNU Awk +PACKAGE_STRING = GNU Awk 5.1.60 +PACKAGE_TARNAME = gawk +PACKAGE_URL = https://www.gnu.org/software/gawk/ +PACKAGE_VERSION = 5.1.60 +PATH_SEPARATOR = : +POSUB = po +RANLIB = ranlib +SED = /bin/sed +SET_MAKE = +SHELL = /bin/bash +SOCKET_LIBS = +STRIP = +USE_NLS = yes +VERSION = 5.1.60 +XGETTEXT = /usr/local/bin/xgettext +XGETTEXT_015 = /usr/local/bin/xgettext +XGETTEXT_EXTRA_OPTIONS = +YACC = bison -y +YFLAGS = +ZOS_FAIL = +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = ar +ac_ct_CC = gcc +acl_shlibext = so +am__include = include +am__leading_dot = . +am__quote = +am__tar = $${TAR-tar} chof - "$$tardir" +am__untar = $${TAR-tar} xf - +bindir = ${exec_prefix}/bin +build = x86_64-pc-linux-gnu +build_alias = +build_cpu = x86_64 +build_os = linux-gnu +build_vendor = pc +builddir = @builddir@ +datadir = ${datarootdir} +datarootdir = ${prefix}/share +docdir = ${datarootdir}/doc/${PACKAGE_TARNAME} +dvidir = ${docdir} +exec_prefix = ${prefix} +host = x86_64-pc-linux-gnu +host_alias = +host_cpu = x86_64 +host_os = linux-gnu +host_vendor = pc +htmldir = ${docdir} +includedir = ${prefix}/include +infodir = ${datarootdir}/info +install_sh = ${SHELL} /home/arnold/Gnu/gawk/gawk.git/build-aux/install-sh +libdir = ${exec_prefix}/lib +libexecdir = ${exec_prefix}/libexec +localedir = ${datarootdir}/locale +localstatedir = ${prefix}/var +mandir = ${datarootdir}/man +mkdir_p = $(MKDIR_P) +oldincludedir = /usr/include +pdfdir = ${docdir} +pkgextensiondir = ${pkglibdir} +prefix = /usr/local +program_transform_name = s,x,x, +psdir = ${docdir} +runstatedir = ${localstatedir}/run +sbindir = ${exec_prefix}/sbin +sharedstatedir = ${prefix}/com +srcdir = @srcdir@ +subdirs = extension +sysconfdir = ${prefix}/etc +target_alias = +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ + +# This variable insures that aclocal runs +# correctly after changing configure.ac +ACLOCAL_AMFLAGS = -I m4 +AM_CFLAGS = -g -O2 -DARRAYDEBUG -DYYDEBUG -DLOCALEDEBUG -DMEMDEBUG -Wall -fno-builtin -g3 -ggdb3 +AM_LDFLAGS = -no-pie + +# Stuff to include in the dist that doesn't need it's own +# Makefile.am files +EXTRA_DIST = \ + ChangeLog.0 \ + ChangeLog.1 \ + COPYING \ + INSTALL \ + NEWS \ + NEWS.0 \ + NEWS.1 \ + POSIX.STD \ + README_d \ + m4 \ + missing_d \ + po/README \ + pc \ + posix \ + vms + + +# The order to do things in. +# +# Build in support first, since we need the support library. +# +# Build explicitly in "." in order to build gawk first, so +# that `make check' without a prior `make' works. + +# Build in awklib after in doc, since we want to extract +# sample files if doc/gawk.texi changed. +SUBDIRS = support . $(am__append_1) extras doc awklib po test +bin_SCRIPTS = gawkbug +include_HEADERS = gawkapi.h +BUILT_SOURCES = $(srcdir)/pc/Makefile.tst + +# sources for gawk +base_sources = \ + array.c \ + awk.h \ + awkgram.y \ + builtin.c \ + cint_array.c \ + cmd.h \ + command.y \ + custom.h \ + debug.c \ + eval.c \ + ext.c \ + field.c \ + floatcomp.c \ + floatmagic.h \ + gawkapi.c \ + gawkapi.h \ + gawkmisc.c \ + gettext.h \ + int_array.c \ + interpret.h \ + io.c \ + mbsupport.h \ + main.c \ + mpfr.c \ + msg.c \ + node.c \ + nonposix.h \ + profile.c \ + protos.h \ + re.c \ + replace.c \ + str_array.c \ + symbol.c \ + version.c + +gawk_SOURCES = $(base_sources) + +# Get extra libs as needed, Automake will supply LIBINTL and SOCKET_LIBS. +LDADD = support/libsupport.a \ + $(LIBSIGSEGV) $(LIBINTL) $(SOCKET_LIBS) $(LIBREADLINE) $(LIBMPFR) \ + $(LDFLAGS) + + +# stuff for compiling gawk/pgawk +DEFPATH = '".$(PATH_SEPARATOR)$(pkgdatadir)"' + +# shared library support: +SHLIBEXT = "\"$(GAWKLIBEXT)"\" +DEFLIBPATH = "\"$(pkgextensiondir)\"" + +# Get rid of core files when cleaning +CLEANFILES = core core.* $(bin_SCRIPTS) + +# We want hard links for install-exec-hook, below +LN = ln + +# Make copies... +CP = cp + +# For some make's, e.g. OpenBSD, that don't define this +RM = rm -f +all: $(BUILT_SOURCES) config.h + $(MAKE) $(AM_MAKEFLAGS) all-recursive + +.SUFFIXES: +.SUFFIXES: .c .o .obj .y +am--refresh: Makefile + @: +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + echo ' cd $(srcdir) && $(AUTOMAKE) --gnu'; \ + $(am__cd) $(srcdir) && $(AUTOMAKE) --gnu \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + echo ' $(SHELL) ./config.status'; \ + $(SHELL) ./config.status;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__maybe_remake_depfiles)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__maybe_remake_depfiles);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + $(SHELL) ./config.status --recheck + +$(top_srcdir)/configure: $(am__configure_deps) + $(am__cd) $(srcdir) && $(AUTOCONF) +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) +$(am__aclocal_m4_deps): + +config.h: stamp-h1 + @test -f $@ || rm -f stamp-h1 + @test -f $@ || $(MAKE) $(AM_MAKEFLAGS) stamp-h1 + +stamp-h1: $(srcdir)/configh.in $(top_builddir)/config.status + @rm -f stamp-h1 + cd $(top_builddir) && $(SHELL) ./config.status config.h +$(srcdir)/configh.in: $(am__configure_deps) + ($(am__cd) $(top_srcdir) && $(AUTOHEADER)) + rm -f stamp-h1 + touch $@ + +distclean-hdr: + -rm -f config.h stamp-h1 +gawkbug: $(top_builddir)/config.status $(srcdir)/gawkbug.in + cd $(top_builddir) && $(SHELL) ./config.status $@ +install-binPROGRAMS: $(bin_PROGRAMS) + @$(NORMAL_INSTALL) + @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ + fi; \ + for p in $$list; do echo "$$p $$p"; done | \ + sed 's/$(EXEEXT)$$//' | \ + while read p p1; do if test -f $$p \ + ; then echo "$$p"; echo "$$p"; else :; fi; \ + done | \ + sed -e 'p;s,.*/,,;n;h' \ + -e 's|.*|.|' \ + -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ + sed 'N;N;N;s,\n, ,g' | \ + $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ + { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ + if ($$2 == $$4) files[d] = files[d] " " $$1; \ + else { print "f", $$3 "/" $$4, $$1; } } \ + END { for (d in files) print "f", d, files[d] }' | \ + while read type dir files; do \ + if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ + test -z "$$files" || { \ + echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ + $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ + } \ + ; done + +uninstall-binPROGRAMS: + @$(NORMAL_UNINSTALL) + @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ + files=`for p in $$list; do echo "$$p"; done | \ + sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ + -e 's/$$/$(EXEEXT)/' \ + `; \ + test -n "$$list" || exit 0; \ + echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(bindir)" && rm -f $$files + +clean-binPROGRAMS: + -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) + +gawk$(EXEEXT): $(gawk_OBJECTS) $(gawk_DEPENDENCIES) $(EXTRA_gawk_DEPENDENCIES) + @rm -f gawk$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(gawk_OBJECTS) $(gawk_LDADD) $(LIBS) +install-binSCRIPTS: $(bin_SCRIPTS) + @$(NORMAL_INSTALL) + @list='$(bin_SCRIPTS)'; test -n "$(bindir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ + fi; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \ + done | \ + sed -e 'p;s,.*/,,;n' \ + -e 'h;s|.*|.|' \ + -e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \ + $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \ + { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ + if ($$2 == $$4) { files[d] = files[d] " " $$1; \ + if (++n[d] == $(am__install_max)) { \ + print "f", d, files[d]; n[d] = 0; files[d] = "" } } \ + else { print "f", d "/" $$4, $$1 } } \ + END { for (d in files) print "f", d, files[d] }' | \ + while read type dir files; do \ + if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ + test -z "$$files" || { \ + echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(bindir)$$dir'"; \ + $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ + } \ + ; done + +uninstall-binSCRIPTS: + @$(NORMAL_UNINSTALL) + @list='$(bin_SCRIPTS)'; test -n "$(bindir)" || exit 0; \ + files=`for p in $$list; do echo "$$p"; done | \ + sed -e 's,.*/,,;$(transform)'`; \ + dir='$(DESTDIR)$(bindir)'; $(am__uninstall_files_from_dir) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +include ./$(DEPDIR)/array.Po # am--include-marker +include ./$(DEPDIR)/awkgram.Po # am--include-marker +include ./$(DEPDIR)/builtin.Po # am--include-marker +include ./$(DEPDIR)/cint_array.Po # am--include-marker +include ./$(DEPDIR)/command.Po # am--include-marker +include ./$(DEPDIR)/debug.Po # am--include-marker +include ./$(DEPDIR)/eval.Po # am--include-marker +include ./$(DEPDIR)/ext.Po # am--include-marker +include ./$(DEPDIR)/field.Po # am--include-marker +include ./$(DEPDIR)/floatcomp.Po # am--include-marker +include ./$(DEPDIR)/gawkapi.Po # am--include-marker +include ./$(DEPDIR)/gawkmisc.Po # am--include-marker +include ./$(DEPDIR)/int_array.Po # am--include-marker +include ./$(DEPDIR)/io.Po # am--include-marker +include ./$(DEPDIR)/main.Po # am--include-marker +include ./$(DEPDIR)/mpfr.Po # am--include-marker +include ./$(DEPDIR)/msg.Po # am--include-marker +include ./$(DEPDIR)/node.Po # am--include-marker +include ./$(DEPDIR)/profile.Po # am--include-marker +include ./$(DEPDIR)/re.Po # am--include-marker +include ./$(DEPDIR)/replace.Po # am--include-marker +include ./$(DEPDIR)/str_array.Po # am--include-marker +include ./$(DEPDIR)/symbol.Po # am--include-marker +include ./$(DEPDIR)/version.Po # am--include-marker + +$(am__depfiles_remade): + @$(MKDIR_P) $(@D) + @echo '# dummy' >$@-t && $(am__mv) $@-t $@ + +am--depfiles: $(am__depfiles_remade) + +.c.o: + $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ + $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ + $(am__mv) $$depbase.Tpo $$depbase.Po +# $(AM_V_CC)source='$<' object='$@' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(COMPILE) -c -o $@ $< + +.c.obj: + $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ + $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ + $(am__mv) $$depbase.Tpo $$depbase.Po +# $(AM_V_CC)source='$<' object='$@' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +.y.c: + $(AM_V_YACC)$(am__skipyacc) $(SHELL) $(YLWRAP) $< y.tab.c $@ y.tab.h `echo $@ | $(am__yacc_c2h)` y.output $*.output -- $(YACCCOMPILE) +install-includeHEADERS: $(include_HEADERS) + @$(NORMAL_INSTALL) + @list='$(include_HEADERS)'; test -n "$(includedir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(includedir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(includedir)" || exit 1; \ + fi; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(includedir)'"; \ + $(INSTALL_HEADER) $$files "$(DESTDIR)$(includedir)" || exit $$?; \ + done + +uninstall-includeHEADERS: + @$(NORMAL_UNINSTALL) + @list='$(include_HEADERS)'; test -n "$(includedir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + dir='$(DESTDIR)$(includedir)'; $(am__uninstall_files_from_dir) + +# This directory's subdirectories are mostly independent; you can cd +# into them and run 'make' without going through this Makefile. +# To change the values of 'make' variables: instead of editing Makefiles, +# (1) if the variable is set in 'config.status', edit 'config.status' +# (which will cause the Makefiles to be regenerated when you run 'make'); +# (2) otherwise, pass the desired values on the 'make' command line. +$(am__recursive_targets): + @fail=; \ + if $(am__make_keepgoing); then \ + failcom='fail=yes'; \ + else \ + failcom='exit 1'; \ + fi; \ + dot_seen=no; \ + target=`echo $@ | sed s/-recursive//`; \ + case "$@" in \ + distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ + *) list='$(SUBDIRS)' ;; \ + esac; \ + for subdir in $$list; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + dot_seen=yes; \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done; \ + if test "$$dot_seen" = "no"; then \ + $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ + fi; test -z "$$fail" + +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-recursive +TAGS: tags + +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + set x; \ + here=`pwd`; \ + if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ + include_option=--etags-include; \ + empty_fix=.; \ + else \ + include_option=--include; \ + empty_fix=; \ + fi; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test ! -f $$subdir/TAGS || \ + set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ + fi; \ + done; \ + $(am__define_uniq_tagged_files); \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: ctags-recursive + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" +cscope: cscope.files + test ! -s cscope.files \ + || $(CSCOPE) -b -q $(AM_CSCOPEFLAGS) $(CSCOPEFLAGS) -i cscope.files $(CSCOPE_ARGS) +clean-cscope: + -rm -f cscope.files +cscope.files: clean-cscope cscopelist +cscopelist: cscopelist-recursive + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + -rm -f cscope.out cscope.in.out cscope.po.out cscope.files +distdir: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) distdir-am + +distdir-am: $(DISTFILES) + $(am__remove_distdir) + test -d "$(distdir)" || mkdir "$(distdir)" + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done + @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + $(am__make_dryrun) \ + || test -d "$(distdir)/$$subdir" \ + || $(MKDIR_P) "$(distdir)/$$subdir" \ + || exit 1; \ + dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ + $(am__relativize); \ + new_distdir=$$reldir; \ + dir1=$$subdir; dir2="$(top_distdir)"; \ + $(am__relativize); \ + new_top_distdir=$$reldir; \ + echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ + echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ + ($(am__cd) $$subdir && \ + $(MAKE) $(AM_MAKEFLAGS) \ + top_distdir="$$new_top_distdir" \ + distdir="$$new_distdir" \ + am__remove_distdir=: \ + am__skip_length_check=: \ + am__skip_mode_fix=: \ + distdir) \ + || exit 1; \ + fi; \ + done + $(MAKE) $(AM_MAKEFLAGS) \ + top_distdir="$(top_distdir)" distdir="$(distdir)" \ + dist-hook + -test -n "$(am__skip_mode_fix)" \ + || find "$(distdir)" -type d ! -perm -755 \ + -exec chmod u+rwx,go+rx {} \; -o \ + ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ + ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ + ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ + || chmod -R a+r "$(distdir)" +dist-gzip: distdir + tardir=$(distdir) && $(am__tar) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).tar.gz + $(am__post_remove_distdir) + +dist-bzip2: distdir + tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2 + $(am__post_remove_distdir) +dist-lzip: distdir + tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz + $(am__post_remove_distdir) +dist-xz: distdir + tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz + $(am__post_remove_distdir) + +dist-zstd: distdir + tardir=$(distdir) && $(am__tar) | zstd -c $${ZSTD_CLEVEL-$${ZSTD_OPT--19}} >$(distdir).tar.zst + $(am__post_remove_distdir) + +dist-tarZ: distdir + @echo WARNING: "Support for distribution archives compressed with" \ + "legacy program 'compress' is deprecated." >&2 + @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 + tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z + $(am__post_remove_distdir) + +dist-shar: distdir + @echo WARNING: "Support for shar distribution archives is" \ + "deprecated." >&2 + @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 + shar $(distdir) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).shar.gz + $(am__post_remove_distdir) + +dist-zip: distdir + -rm -f $(distdir).zip + zip -rq $(distdir).zip $(distdir) + $(am__post_remove_distdir) + +dist dist-all: + $(MAKE) $(AM_MAKEFLAGS) $(DIST_TARGETS) am__post_remove_distdir='@:' + $(am__post_remove_distdir) + +# This target untars the dist file and tries a VPATH configuration. Then +# it guarantees that the distribution is self-contained by making another +# tarfile. +distcheck: dist + case '$(DIST_ARCHIVES)' in \ + *.tar.gz*) \ + eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).tar.gz | $(am__untar) ;;\ + *.tar.bz2*) \ + bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ + *.tar.lz*) \ + lzip -dc $(distdir).tar.lz | $(am__untar) ;;\ + *.tar.xz*) \ + xz -dc $(distdir).tar.xz | $(am__untar) ;;\ + *.tar.Z*) \ + uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ + *.shar.gz*) \ + eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).shar.gz | unshar ;;\ + *.zip*) \ + unzip $(distdir).zip ;;\ + *.tar.zst*) \ + zstd -dc $(distdir).tar.zst | $(am__untar) ;;\ + esac + chmod -R a-w $(distdir) + chmod u+w $(distdir) + mkdir $(distdir)/_build $(distdir)/_build/sub $(distdir)/_inst + chmod a-w $(distdir) + test -d $(distdir)/_build || exit 0; \ + dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ + && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ + && am__cwd=`pwd` \ + && $(am__cd) $(distdir)/_build/sub \ + && ../../configure \ + $(AM_DISTCHECK_CONFIGURE_FLAGS) \ + $(DISTCHECK_CONFIGURE_FLAGS) \ + --srcdir=../.. --prefix="$$dc_install_base" \ + && $(MAKE) $(AM_MAKEFLAGS) \ + && $(MAKE) $(AM_MAKEFLAGS) $(AM_DISTCHECK_DVI_TARGET) \ + && $(MAKE) $(AM_MAKEFLAGS) check \ + && $(MAKE) $(AM_MAKEFLAGS) install \ + && $(MAKE) $(AM_MAKEFLAGS) installcheck \ + && $(MAKE) $(AM_MAKEFLAGS) uninstall \ + && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ + distuninstallcheck \ + && chmod -R a-w "$$dc_install_base" \ + && ({ \ + (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ + && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ + && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ + && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ + distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ + } || { rm -rf "$$dc_destdir"; exit 1; }) \ + && rm -rf "$$dc_destdir" \ + && $(MAKE) $(AM_MAKEFLAGS) dist \ + && rm -rf $(DIST_ARCHIVES) \ + && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \ + && cd "$$am__cwd" \ + || exit 1 + $(am__post_remove_distdir) + @(echo "$(distdir) archives ready for distribution: "; \ + list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ + sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' +distuninstallcheck: + @test -n '$(distuninstallcheck_dir)' || { \ + echo 'ERROR: trying to run $@ with an empty' \ + '$$(distuninstallcheck_dir)' >&2; \ + exit 1; \ + }; \ + $(am__cd) '$(distuninstallcheck_dir)' || { \ + echo 'ERROR: cannot chdir into $(distuninstallcheck_dir)' >&2; \ + exit 1; \ + }; \ + test `$(am__distuninstallcheck_listfiles) | wc -l` -eq 0 \ + || { echo "ERROR: files left after uninstall:" ; \ + if test -n "$(DESTDIR)"; then \ + echo " (check DESTDIR support)"; \ + fi ; \ + $(distuninstallcheck_listfiles) ; \ + exit 1; } >&2 +distcleancheck: distclean + @if test '$(srcdir)' = . ; then \ + echo "ERROR: distcleancheck can only run from a VPATH build" ; \ + exit 1 ; \ + fi + @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ + || { echo "ERROR: files left in build directory after distclean:" ; \ + $(distcleancheck_listfiles) ; \ + exit 1; } >&2 +check-am: all-am + $(MAKE) $(AM_MAKEFLAGS) check-local +check: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) check-recursive +all-am: Makefile $(PROGRAMS) $(SCRIPTS) $(HEADERS) config.h +installdirs: installdirs-recursive +installdirs-am: + for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(includedir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) install-recursive +install-exec: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) install-exec-recursive +install-data: install-data-recursive +uninstall: uninstall-recursive + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-recursive +install-strip: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi +mostlyclean-generic: + +clean-generic: + -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." + -rm -f awkgram.c + -rm -f command.c + -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) +clean: clean-recursive + +clean-am: clean-binPROGRAMS clean-generic mostlyclean-am + +distclean: distclean-recursive + -rm -f $(am__CONFIG_DISTCLEAN_FILES) + -rm -f ./$(DEPDIR)/array.Po + -rm -f ./$(DEPDIR)/awkgram.Po + -rm -f ./$(DEPDIR)/builtin.Po + -rm -f ./$(DEPDIR)/cint_array.Po + -rm -f ./$(DEPDIR)/command.Po + -rm -f ./$(DEPDIR)/debug.Po + -rm -f ./$(DEPDIR)/eval.Po + -rm -f ./$(DEPDIR)/ext.Po + -rm -f ./$(DEPDIR)/field.Po + -rm -f ./$(DEPDIR)/floatcomp.Po + -rm -f ./$(DEPDIR)/gawkapi.Po + -rm -f ./$(DEPDIR)/gawkmisc.Po + -rm -f ./$(DEPDIR)/int_array.Po + -rm -f ./$(DEPDIR)/io.Po + -rm -f ./$(DEPDIR)/main.Po + -rm -f ./$(DEPDIR)/mpfr.Po + -rm -f ./$(DEPDIR)/msg.Po + -rm -f ./$(DEPDIR)/node.Po + -rm -f ./$(DEPDIR)/profile.Po + -rm -f ./$(DEPDIR)/re.Po + -rm -f ./$(DEPDIR)/replace.Po + -rm -f ./$(DEPDIR)/str_array.Po + -rm -f ./$(DEPDIR)/symbol.Po + -rm -f ./$(DEPDIR)/version.Po + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-hdr distclean-local distclean-tags + +dvi: dvi-recursive + +dvi-am: + +html: html-recursive + +html-am: + +info: info-recursive + +info-am: + +install-data-am: install-includeHEADERS + +install-dvi: install-dvi-recursive + +install-dvi-am: + +install-exec-am: install-binPROGRAMS install-binSCRIPTS + @$(NORMAL_INSTALL) + $(MAKE) $(AM_MAKEFLAGS) install-exec-hook +install-html: install-html-recursive + +install-html-am: + +install-info: install-info-recursive + +install-info-am: + +install-man: + +install-pdf: install-pdf-recursive + +install-pdf-am: + +install-ps: install-ps-recursive + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-recursive + -rm -f $(am__CONFIG_DISTCLEAN_FILES) + -rm -rf $(top_srcdir)/autom4te.cache + -rm -f ./$(DEPDIR)/array.Po + -rm -f ./$(DEPDIR)/awkgram.Po + -rm -f ./$(DEPDIR)/builtin.Po + -rm -f ./$(DEPDIR)/cint_array.Po + -rm -f ./$(DEPDIR)/command.Po + -rm -f ./$(DEPDIR)/debug.Po + -rm -f ./$(DEPDIR)/eval.Po + -rm -f ./$(DEPDIR)/ext.Po + -rm -f ./$(DEPDIR)/field.Po + -rm -f ./$(DEPDIR)/floatcomp.Po + -rm -f ./$(DEPDIR)/gawkapi.Po + -rm -f ./$(DEPDIR)/gawkmisc.Po + -rm -f ./$(DEPDIR)/int_array.Po + -rm -f ./$(DEPDIR)/io.Po + -rm -f ./$(DEPDIR)/main.Po + -rm -f ./$(DEPDIR)/mpfr.Po + -rm -f ./$(DEPDIR)/msg.Po + -rm -f ./$(DEPDIR)/node.Po + -rm -f ./$(DEPDIR)/profile.Po + -rm -f ./$(DEPDIR)/re.Po + -rm -f ./$(DEPDIR)/replace.Po + -rm -f ./$(DEPDIR)/str_array.Po + -rm -f ./$(DEPDIR)/symbol.Po + -rm -f ./$(DEPDIR)/version.Po + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-recursive + +mostlyclean-am: mostlyclean-compile mostlyclean-generic + +pdf: pdf-recursive + +pdf-am: + +ps: ps-recursive + +ps-am: + +uninstall-am: uninstall-binPROGRAMS uninstall-binSCRIPTS \ + uninstall-includeHEADERS + +.MAKE: $(am__recursive_targets) all check check-am install install-am \ + install-exec install-exec-am install-strip + +.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am \ + am--depfiles am--refresh check check-am check-local clean \ + clean-binPROGRAMS clean-cscope clean-generic cscope \ + cscopelist-am ctags ctags-am dist dist-all dist-bzip2 \ + dist-gzip dist-hook dist-lzip dist-shar dist-tarZ dist-xz \ + dist-zip dist-zstd distcheck distclean distclean-compile \ + distclean-generic distclean-hdr distclean-local distclean-tags \ + distcleancheck distdir distuninstallcheck dvi dvi-am html \ + html-am info info-am install install-am install-binPROGRAMS \ + install-binSCRIPTS install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-exec-hook \ + install-html install-html-am install-includeHEADERS \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-ps install-ps-am install-strip \ + installcheck installcheck-am installdirs installdirs-am \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-compile mostlyclean-generic pdf pdf-am ps ps-am \ + tags tags-am uninstall uninstall-am uninstall-binPROGRAMS \ + uninstall-binSCRIPTS uninstall-includeHEADERS + +.PRECIOUS: Makefile + + +# First, add a link from gawk to gawk-X.Y.Z. +# +# For GNU systems where gawk is awk, add a link to awk. +# (This is done universally, which may not always be right, but +# there's no easy way to distinguish GNU from non-GNU systems.) +# +# Use the transform, in case --program-prefix=XXX +install-exec-hook: + (cd $(DESTDIR)$(bindir); \ + name=`echo gawk | sed '$(transform)'` ; \ + $(LN) $${name}$(EXEEXT) gawk-$(VERSION)$(EXEEXT) 2>/dev/null ; \ + if [ ! -f awk$(EXEEXT) ]; \ + then $(LN_S) $${name}$(EXEEXT) awk$(EXEEXT); \ + fi; exit 0) + +# Undo the above when uninstalling +uninstall-links: + (cd $(DESTDIR)$(bindir); \ + name=`echo gawk | sed '$(transform)'` ; \ + if [ -f awk$(EXEEXT) ] && cmp awk$(EXEEXT) $${name}$(EXEEXT) > /dev/null; then rm -f awk$(EXEEXT); fi ; \ + rm -f gawk-$(VERSION)$(EXEEXT); exit 0) + +uninstall-recursive: uninstall-links + +# force there to be a gawk executable before running tests +check-local: gawk$(EXEEXT) + +# A little extra clean up when making distributions. +dist-hook: + cd "$(distdir)"/extension ; rm -f *.o *.so + cd "$(srcdir)"/pc ; \ + chmod u+w config.h ; \ + sed -n -f configpk.sed < ../configure.ac > /tmp/tmp.sed ; \ + sed -f config.sed < ../configh.in > /tmp/config.tmp ; \ + sed -f /tmp/tmp.sed < /tmp/config.tmp > config.h ; \ + $(RM) /tmp/tmp.sed /tmp/config.tmp + pwd + chmod u+w "$(distdir)"/pc/config.h + cp "$(srcdir)"/pc/config.h "$(distdir)"/pc/config.h + +# Special rules for individual files + +$(srcdir)/awkgram.c: awkgram.y + $(YACC) -o $@ $(AM_YFLAGS) $(YFLAGS) $< + sed 's/parse error/syntax error/g' < $@ > $@.tmp && mv $@.tmp $@ + +$(srcdir)/command.c: command.y + $(YACC) -o $@ -p zz $< + sed 's/parse error/syntax error/g' < $@ > $@.tmp && mv $@.tmp $@ + +$(srcdir)/pc/Makefile.tst: test/Makefile.in pc/Makefile.tst.prologue pc/GenMakefileTst.awk + $(AM_V_GEN)$(MKDIR_P) "$(srcdir)"/pc && \ + cat "$(srcdir)"/pc/Makefile.tst.prologue > "$(srcdir)"/pc/Makefile.tst && \ + $(AWK) -f "$(srcdir)"/pc/GenMakefileTst.awk "$(srcdir)"/test/Makefile.in >> "$(srcdir)"/pc/Makefile.tst + +# This is for my development & testing. +efence: gawk + $(CC) $(AM_LDFLAGS) -o gawk $$(ls *.o | grep -v '_p.o$$') $(LDADD) $(LIBS) -lefence + +diffout valgrind-scan zos-diffout: + @cd test && $(MAKE) $(AM_MAKEFLAGS) $@ + +valgrind: + cd test; rm -f log.[0-9]*; \ + make check VALGRIND="valgrind --leak-check=full --log-file=log.%p"; \ + make valgrind-scan + +valgrind-noleak: + cd test; rm -f log.[0-9]*; \ + make check VALGRIND="valgrind --leak-check=no --log-file=log.%p"; \ + make valgrind-scan + +spell: + cd "$(srcdir)"/doc ; $(MAKE) spell + +distclean-local: + rm -fr .deps + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/test/typeof3.awk b/test/typeof3.awk index d148f373..2f864f45 100644 --- a/test/typeof3.awk +++ b/test/typeof3.awk @@ -15,5 +15,5 @@ BEGIN { BEGIN { print typeof(x) print typeof(a[1]) - a[1][2] # fatals on this + a[1][2] # this used to fatal, it no longer does } diff --git a/test/typeof3.ok b/test/typeof3.ok index a6cd6c4a..f9026b08 100644 --- a/test/typeof3.ok +++ b/test/typeof3.ok @@ -4,6 +4,4 @@ regexp number 4 number -unassigned -gawk: typeof3.awk:18: fatal: attempt to use scalar `a["1"]' as an array -EXIT CODE: 2 +untyped -- cgit v1.2.1