From 058fc8ac436001c3f186bdeaf0d596352483a0b8 Mon Sep 17 00:00:00 2001 From: "Andrew J. Schorr" Date: Sun, 10 Jun 2012 12:06:32 -0400 Subject: Remove unused (obsolete) files in the extension directory. --- extension/testarg.c | 55 ----------------------------------------------------- 1 file changed, 55 deletions(-) delete mode 100644 extension/testarg.c (limited to 'extension/testarg.c') diff --git a/extension/testarg.c b/extension/testarg.c deleted file mode 100644 index 32481b33..00000000 --- a/extension/testarg.c +++ /dev/null @@ -1,55 +0,0 @@ -#include "awk.h" - -int plugin_is_GPL_compatible; - -static NODE * -do_check_arg(int nargs) -{ - int ret = 0; - NODE *arg1, *arg2, *arg3; - - printf("arg count: defined = 3, supplied = %d\n", nargs); - - arg1 = get_scalar_argument(0, false); - arg2 = get_array_argument(1, false); - arg3 = get_scalar_argument(2, true); /* optional */ - if (nargs > 3) { - /* try to use an extra arg */ - NODE *arg4; - arg4 = get_array_argument(3, true); - printf("Shouldn't see this line\n"); - } - if (arg3 != NULL) { - printf("3rd arg present\n"); - if (arg3->type != Node_val) - printf("3nd arg type = %s (*** NOT OK ***)\n", nodetype2str(arg3->type)); - } else - printf("no 3rd arg\n"); - - if (arg2 != NULL) { - if (arg2->type != Node_var_array) - printf("2nd arg type = %s (*** NOT OK ***)\n", nodetype2str(arg2->type)); - } else - printf("2nd arg missing (NULL) (*** NOT OK ***)\n"); - - if (arg1 != NULL) { - if (arg1->type != Node_val) - printf("1st arg type = %s (*** NOT OK ***)\n", nodetype2str(arg1->type)); - } else - printf("1st arg missing (NULL) (*** NOT OK ***)\n"); - printf("\n"); - - /* Set the return value */ - return make_number((AWKNUM) ret); -} - -/* dlload --- load new builtins in this library */ - -NODE * -dlload(tree, dl) -NODE *tree; -void *dl; -{ - make_builtin("check_arg", do_check_arg, 3); - return make_number((AWKNUM) 0); -} -- cgit v1.2.3