aboutsummaryrefslogtreecommitdiffstats
path: root/array.c
diff options
context:
space:
mode:
authorArnold D. Robbins <arnold@skeeve.com>2012-11-25 21:54:48 +0200
committerArnold D. Robbins <arnold@skeeve.com>2012-11-25 21:54:48 +0200
commit9a9ff61bbd952c1263b55f82a269da5b09289a6b (patch)
tree4bc31b31d0bec6d27f77e55f1a88f50534fa6ed4 /array.c
parentdbabe5a569ad82a9faeb2f121e387ec6399f9dcb (diff)
parent7af1da783175273a26609911c3a95975ed0f5c13 (diff)
downloadegawk-9a9ff61bbd952c1263b55f82a269da5b09289a6b.tar.gz
egawk-9a9ff61bbd952c1263b55f82a269da5b09289a6b.tar.bz2
egawk-9a9ff61bbd952c1263b55f82a269da5b09289a6b.zip
Merge branch 'master' into array-iface
Diffstat (limited to 'array.c')
-rw-r--r--array.c31
1 files changed, 8 insertions, 23 deletions
diff --git a/array.c b/array.c
index 66a1460f..f968edd9 100644
--- a/array.c
+++ b/array.c
@@ -60,13 +60,13 @@ register_array_func(afunc_t *afunc)
{
if (afunc && num_array_types < MAX_ATYPE) {
if (afunc != str_array_func && ! afunc[AFUNC(atypeof)])
- return FALSE;
+ return false;
array_types[num_array_types++] = afunc;
if (afunc[AFUNC(ainit)]) /* execute init routine if any */
(void) (*afunc[AFUNC(ainit)])(NULL, NULL);
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
@@ -170,21 +170,6 @@ null_dump(NODE *symbol, NODE *subs ATTRIBUTE_UNUSED)
}
-/*
- * r_in_array --- test whether the array element symbol[subs] exists or not,
- * return pointer to value if it does.
- */
-
-NODE *
-r_in_array(NODE *symbol, NODE *subs)
-{
- NODE **ret;
-
- ret = symbol->aexists(symbol, subs);
- return (ret ? *ret : NULL);
-}
-
-
/* assoc_copy --- duplicate input array "symbol" */
NODE *
@@ -338,14 +323,14 @@ array_vname(const NODE *symbol)
*/
NODE *
-force_array(NODE *symbol, int canfatal)
+force_array(NODE *symbol, bool canfatal)
{
NODE *save_symbol = symbol;
- int isparam = FALSE;
+ bool isparam = false;
if (symbol->type == Node_param_list) {
save_symbol = symbol = GET_PARAM(symbol->param_cnt);
- isparam = TRUE;
+ isparam = true;
if (symbol->type == Node_array_ref)
symbol = symbol->orig_array;
}
@@ -392,9 +377,9 @@ set_SUBSEP()
/* concat_exp --- concatenate expression list into a single string */
NODE *
-concat_exp(int nargs, int do_subsep)
+concat_exp(int nargs, bool do_subsep)
{
- /* do_subsep is FALSE for Op_concat */
+ /* do_subsep is false for Op_concat */
NODE *r;
char *str;
char *s;