aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArnold D. Robbins <arnold@skeeve.com>2016-05-30 07:32:18 -0400
committerArnold D. Robbins <arnold@skeeve.com>2016-05-30 07:32:18 -0400
commit2441456cafc36b85f069e43a0e9325775c103baa (patch)
treea30a1aa247acedfd8846fe5b5e6357a4cfd2c14b
parent33ffd32ea8ea143a210fef2181a804ee0c70cdfb (diff)
parenta9762c867aa96caa1419b65e7398fd21586baee6 (diff)
downloadegawk-2441456cafc36b85f069e43a0e9325775c103baa.tar.gz
egawk-2441456cafc36b85f069e43a0e9325775c103baa.tar.bz2
egawk-2441456cafc36b85f069e43a0e9325775c103baa.zip
Merge branch 'master' into feature/cmake
-rw-r--r--ChangeLog9
-rw-r--r--awk.h6
-rw-r--r--ext.c4
-rw-r--r--gawkapi.c6
-rw-r--r--vms/ChangeLog7
-rw-r--r--vms/stage_gawk_install.com2
-rw-r--r--vms/vmstest.com56
7 files changed, 70 insertions, 20 deletions
diff --git a/ChangeLog b/ChangeLog
index 1d1bc935..266f17f0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2016-05-26 Andrew J. Schorr <aschorr@telemetry-investments.com>
+
+ * awk.h (get_actual_argument): Remove unused "optional" argument.
+ (get_scalar_argument, get_array_argument): Change macro definition to
+ remove 3rd "optional" argument.
+ * ext.c (get_actual_argument): Remove unused "optional" argument.
+ * gawkapi.c (api_get_argument, api_set_argument): Remove unused final
+ argument to get_array_argument and get_scalar_argument.
+
2016-05-26 Arnold D. Robbins <arnold@skeeve.com>
* awk.h [fatal]: Make parentheses and use of indirection
diff --git a/awk.h b/awk.h
index 213651de..01da08ff 100644
--- a/awk.h
+++ b/awk.h
@@ -1449,9 +1449,9 @@ extern void close_extensions(void);
#ifdef DYNAMIC
extern awk_bool_t make_builtin(const awk_ext_func_t *);
extern NODE *get_argument(int);
-extern NODE *get_actual_argument(NODE *, int, bool, bool);
-#define get_scalar_argument(n, i, opt) get_actual_argument((n), (i), (opt), false)
-#define get_array_argument(n, i, opt) get_actual_argument((n), (i), (opt), true)
+extern NODE *get_actual_argument(NODE *, int, bool);
+#define get_scalar_argument(n, i) get_actual_argument((n), (i), false)
+#define get_array_argument(n, i) get_actual_argument((n), (i), true)
#endif
/* field.c */
extern void init_fields(void);
diff --git a/ext.c b/ext.c
index c622599d..aa13a19e 100644
--- a/ext.c
+++ b/ext.c
@@ -183,11 +183,11 @@ get_argument(int i)
/*
* get_actual_argument --- get the i'th scalar or array argument of a
- * dynamically linked function, allowed to be optional.
+ * dynamically linked function.
*/
NODE *
-get_actual_argument(NODE *t, int i, bool optional, bool want_array)
+get_actual_argument(NODE *t, int i, bool want_array)
{
char *fname;
INSTRUCTION *pc;
diff --git a/gawkapi.c b/gawkapi.c
index e86172ac..c9624d9e 100644
--- a/gawkapi.c
+++ b/gawkapi.c
@@ -87,7 +87,7 @@ api_get_argument(awk_ext_id_t id, size_t count,
array:
/* get the array here */
- arg = get_array_argument(arg, count, false);
+ arg = get_array_argument(arg, count);
if (arg == NULL)
return awk_false;
@@ -95,7 +95,7 @@ array:
scalar:
/* at this point we have a real type that is not an array */
- arg = get_scalar_argument(arg, count, false);
+ arg = get_scalar_argument(arg, count);
if (arg == NULL)
return awk_false;
@@ -125,7 +125,7 @@ api_set_argument(awk_ext_id_t id,
|| arg->type != Node_var_new)
return awk_false;
- arg = get_array_argument(arg, count, false);
+ arg = get_array_argument(arg, count);
if (arg == NULL)
return awk_false;
diff --git a/vms/ChangeLog b/vms/ChangeLog
index 463751e0..46354286 100644
--- a/vms/ChangeLog
+++ b/vms/ChangeLog
@@ -1,3 +1,10 @@
+2016-05-29 John E. Malmberg <wb8tyw@qsl.net>
+
+ * stage_gawk_install.com: Fix directory path
+ * vmstest.com: new tests
+ (basic) arrayind1, rscompat, sigpipe1
+ (ext) close1way2, clos1way3, clos1way4, clos1way5
+
2016-04-10 John E. Malmberg <wb8tyw@qsl.net>
* generate_config_vms_h_gawk.com: define __attribute() as macro.
diff --git a/vms/stage_gawk_install.com b/vms/stage_gawk_install.com
index 22daf7f5..c980eacf 100644
--- a/vms/stage_gawk_install.com
+++ b/vms/stage_gawk_install.com
@@ -39,7 +39,7 @@ $ create/dir new_gnu:[usr.share.awk]/prot=o:rwed
$ create/dir new_gnu:[usr.share.doc.gawk]/prot=o:rwed
$ create/dir new_gnu:[usr.share.info]/prot=o:rwed
$ create/dir new_gnu:[usr.src.gawk.extension.vms]/prot=o:rwed
-$ create/dir new_gnu:[usr.share.doc.man.man1]/prot=o:rwed
+$ create/dir new_gnu:[usr.share.man.man1]/prot=o:rwed
$ endif
$!
$ if mode .eqs. "install"
diff --git a/vms/vmstest.com b/vms/vmstest.com
index 6ef7055d..0bd5b09f 100644
--- a/vms/vmstest.com
+++ b/vms/vmstest.com
@@ -40,6 +40,12 @@ $! basic: aryprm9,exitval2,nulinsrc,rstest4,rstest5
$! ext: mbstr2,profile8,watchpoint1
$! shlib: inplace2,testext,lc_num1,mbprintf1
$! mbprintf2,mbfprintf3,mbfprintf4,mbfw1
+$!
+$! 4.1.3c: New tests
+$! ext: clos1way2, clos1way3, clos1way4, clos1way5
+$!
+$! 4.1.3f: New tests
+$! basic: arrayind1,rscompat,sigpipe1
$
$
$ echo = "write sys$output"
@@ -83,11 +89,12 @@ $ gosub list_of_tests
$ return
$
$basic: echo "basic..."
-$ list = "msg addcomma anchgsub argarray arrayparm arrayref" -
- + " arrymem1 arrayprm2 arrayprm3 arryref2 arryref3" -
- + " arryref4 arryref5 arynasty arynocls aryprm1 aryprm2" -
- + " aryprm3 aryprm4 aryprm5 aryprm6 aryprm7 aryprm8" -
- + " aryprm9 arysubnm asgext awkpath" -
+$ list = "msg addcomma anchgsub argarray arrayind1" -
+ + " arrayparm arrayref arrayprm2 arrayprm3 arrymem1" -
+ + " arryref2 arryref3 arryref4 arryref5 arynasty" -
+ + " arynocls aryprm1 aryprm2 aryprm3 aryprm4 aryprm5" -
+ + " aryprm6 aryprm7 aryprm8 aryprm9 arysubnm asgext" -
+ + " awkpath" -
+ " back89 backgsub badassign1 badbuild"
$ gosub list_of_tests
$ list = "callparam childin clobber closebad clsflnam" -
@@ -127,10 +134,10 @@ $ list = "paramasfunc1 paramasfunc2 paramdup" -
$ gosub list_of_tests
$ list = "rand range1 rebrackloc rebt8b1 redfilnm regeq" -
+ " regexpbrack regexprange regrange reindops reparse" -
- + " resplit rri1 rs rsnul1nl rsnulbig rsnulbig2 rstest1" -
- + " rstest2 rstest3 rstest4 rstest5 rswhite"
+ + " resplit rri1 rs rscompat rsnul1nl rsnulbig rsnulbig2" -
+ + " rstest1 rstest2 rstest3 rstest4 rstest5 rswhite"
$ gosub list_of_tests
-$ list = "scalar sclforin sclifin sortempty sortglos" -
+$ list = "scalar sclforin sclifin sigpipe1 sortempty sortglos" -
+ " splitargv splitarr splitdef splitvar splitwht" -
+ " strcat1 strtod strnum1 subamp subi18n subsepnm" -
+ " subslash substr swaplns synerr1 synerr2"
@@ -156,7 +163,8 @@ $gawk_ext: echo "gawk_ext... (gawk.extensions)"
$ list = "aadelete1 aadelete2 aarray1 aasort aasorti" -
+ " argtest arraysort" -
+ " backw badargs beginfile1 binmode1" -
- + " colonwarn clos1way charasbytes crlf" -
+ + " colonwarn clos1way clos1way2 clos1way3 clos1way4" -
+ + " clos1way5 charasbytes crlf" -
+ " dbugeval delsub devfd devfd1 devfd2 dumpvars" -
+ " exit" -
+ " fieldwdth fpat1 fpat2 fpat3 fpatnull funlen functab1" -
@@ -374,12 +382,22 @@ $uparrfs:
$wjposer1:
$zeroe0:
$! common with 'test'.in
+$!
$ echo "''test'"
$ gawk -f 'test'.awk 'test'.in >_'test'.tmp
$ cmp 'test'.ok sys$disk:[]_'test'.tmp
$ if $status then rm _'test'.tmp;
$ return
$!
+$arrayind1:
+$ echo "''test'"
+$ define/user sys$error _'test'.tmp
+$ gawk -f 'test'.awk 'test'.in >_'test'.tmp2
+$ append _'test'.tmp2 _'test'.tmp
+$ cmp 'test'.ok sys$disk:[]_'test'.tmp
+$ if $status then rm _'test'.tmp;,_'test'.tmp2;
+$ return
+$!
$indirectbuiltin: ! 4.1.2
$ echo "''test'"
$ ! No shell simulation in gawk
@@ -628,6 +646,14 @@ $poundbang:
$pty1:
$ echo "''test': not supported"
$ return
+$!
+$rscompat:
+$ echo "''test'"
+$ gawk --traditional -f 'test'.awk 'test'.in >_'test'.tmp
+$ cmp 'test'.ok sys$disk:[]_'test'.tmp
+$ if $status then rm _'test'.tmp;
+$ return
+$!
$
$
$messages: echo "''test'"
@@ -1308,9 +1334,13 @@ $ if $status then rm _leaddig.tmp;
$ return
$
$clos1way:
-$ echo "clos1way: not supported"
+$clos1way2:
+$clos1way3:
+$clos1way4:
+$clos1way5:
+$ echo "''test': not supported"
$ return
-$!!clos1way: echo "clos1way"
+$#clos1way: echo "''test'"
$ gawk -f clos1way.awk >_clos1way.tmp
$ cmp clos1way.ok sys$disk:[]_clos1way.tmp
$ if $status then rm _clos1way.tmp;
@@ -1377,6 +1407,10 @@ $ set On
$ cmp 'test'.ok sys$disk:[]_'test'.tmp
$ if $status then rm _'test'.tmp;
$ return
+$!
+$sigpipe1:
+$ echo "''test': not supported"
+$ return
$
$ !
$ ! For tests requiring exit code 2