gawk-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[gawk-diffs] [SCM] gawk branch, extgawk, updated. 058fc8ac436001c3f186bd


From: Andrew J. Schorr
Subject: [gawk-diffs] [SCM] gawk branch, extgawk, updated. 058fc8ac436001c3f186bdeaf0d596352483a0b8
Date: Sun, 10 Jun 2012 16:07:18 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "gawk".

The branch, extgawk has been updated
       via  058fc8ac436001c3f186bdeaf0d596352483a0b8 (commit)
      from  dab3a678b3f65ae4cde21ca4b1d4fd24e8a71918 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://git.sv.gnu.org/cgit/gawk.git/commit/?id=058fc8ac436001c3f186bdeaf0d596352483a0b8

commit 058fc8ac436001c3f186bdeaf0d596352483a0b8
Author: Andrew J. Schorr <address@hidden>
Date:   Sun Jun 10 12:06:32 2012 -0400

    Remove unused (obsolete) files in the extension directory.

diff --git a/extension/ChangeLog b/extension/ChangeLog
index 140aea5..d647ebb 100644
--- a/extension/ChangeLog
+++ b/extension/ChangeLog
@@ -1,3 +1,9 @@
+2012-06-10         Andrew J. Schorr     <address@hidden>
+
+       * arrayparm.c, dl.c, doit, foo.awk, steps, testarg.awk, testarg.c,
+       testarrayparm.awk, testff.awk, testfork.awk, testordchr.awk: Remove
+       unused (obsolete) files.
+
 2012-06-06         Arnold D. Robbins     <address@hidden>
 
        * filefuncs.c (do_stat): Make `type' const char *.
diff --git a/extension/arrayparm.c b/extension/arrayparm.c
deleted file mode 100644
index 02b8c2e..0000000
--- a/extension/arrayparm.c
+++ /dev/null
@@ -1,83 +0,0 @@
-/*
- * arrayparm.c --- figure out how to make a parameter be an array
- *
- * Arnold Robbins
- * address@hidden
- * 10/2001
- *
- * Revised 7/2003
- * Revised 6/2004
- */
-
-/*
- * Copyright (C) 2001, 2003, 2004, 2011 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
- */
-
-#include "awk.h"
-
-int plugin_is_GPL_compatible;
-
-/*  do_mkarray --- turn a variable into an array */
-
-/*
- * From awk, call
- *
- *     mkarray(var, sub, val)
- */
-
-static NODE *
-do_mkarray(int nargs)
-{
-       int ret = -1;
-       NODE *var, *sub, *val;
-       NODE **elemval;
-
-       if  (do_lint && nargs > 3)
-               lintwarn("mkarray: called with too many arguments");
-
-       var = get_array_argument(0, false);
-       sub = get_scalar_argument(1, false);
-       val = get_scalar_argument(2, false);
-
-       printf("var->type = %s\n", nodetype2str(var->type));
-       printf("sub->type = %s\n", nodetype2str(sub->type));
-       printf("val->type = %s\n", nodetype2str(val->type));
-
-       assoc_clear(var);
-
-       elemval = assoc_lookup(var, sub);
-       *elemval = dupnode(val);
-       ret = 0;
-
-       /* 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("mkarray", do_mkarray, 3);
-
-       return make_number((AWKNUM) 0);
-}
diff --git a/extension/dl.c b/extension/dl.c
deleted file mode 100644
index ee3b08f..0000000
--- a/extension/dl.c
+++ /dev/null
@@ -1,92 +0,0 @@
-/*
- * dl.c - Example of adding a new builtin function to gawk.
- *
- * Christos Zoulas, Thu Jun 29 17:40:41 EDT 1995
- * Arnold Robbins, update for 3.1, Wed Sep 13 09:38:56 2000
- */
-
-/*
- * Copyright (C) 1995 - 2001, 2011 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
- */
-
-#include "awk.h"
-#include <dlfcn.h>
-
-int plugin_is_GPL_compatible;
-
-static void *sdl = NULL;
-
-static NODE *
-zaxxon(int nargs)
-{
-       NODE *obj;
-       int i;
-       int comma = 0;
-
-       /*
-        * Print the arguments
-        */
-       printf("External linkage zaxxon(");
-
-       for (i = 0; i < nargs; i++) {
-
-               obj = get_scalar_argument(i, true);
-
-               if (obj == NULL)
-                       break;
-
-               force_string(obj);
-
-               printf(comma ? ", %s" : "%s", obj->stptr);
-               comma = 1;
-       }
-
-       printf(");\n");
-
-       /*
-        * Do something useful
-        */
-       obj = get_scalar_argument(0, false);
-
-       if (obj != NULL) {
-               force_string(obj);
-               if (strcmp(obj->stptr, "unload") == 0 && sdl) {
-                       /*
-                        * XXX: How to clean up the function? 
-                        * I would like the ability to remove a function...
-                        */
-                       dlclose(sdl);
-                       sdl = NULL;
-               }
-       }
-
-       /* Set the return value */
-       return make_number((AWKNUM) 3.14);
-}
-
-NODE *
-dlload(tree, dl)
-NODE *tree;
-void *dl;
-{
-       sdl = dl;
-       make_builtin("zaxxon", zaxxon, 4);
-       return make_number((AWKNUM) 0);
-}
diff --git a/extension/doit b/extension/doit
deleted file mode 100755
index 29dff7d..0000000
--- a/extension/doit
+++ /dev/null
@@ -1 +0,0 @@
-../gawk -f foo.awk
diff --git a/extension/foo.awk b/extension/foo.awk
deleted file mode 100644
index 00a89e5..0000000
--- a/extension/foo.awk
+++ /dev/null
@@ -1,9 +0,0 @@
-BEGIN {
-    extension("./dl.so","dlload")
-    zaxxon("hi there", "this is", "a test", "of argument passing")
-    zaxxon(1)
-    zaxxon(1,2)
-    z = zaxxon(1,2,3,4)
-    z = zaxxon(1,zaxxon(zaxxon("foo")),3,4)
-    print z
-}
diff --git a/extension/steps b/extension/steps
deleted file mode 100755
index a6696dd..0000000
--- a/extension/steps
+++ /dev/null
@@ -1,23 +0,0 @@
-# what to do under linux to make dl.so
-# Tue Nov 24 15:04:14 EST 1998
-# Sun Aug 26 16:03:58 IDT 2001
-# Sun Apr 28 15:59:57 IDT 2002
-# Mon Jun 21 17:03:37 IDT 2004
-# Fri May 15 15:48:45 IDT 2009
-
-gcc -fPIC -shared -Wall -DHAVE_CONFIG_H -c -O -g -I.. dl.c
-gcc -fPIC -shared -Wall -DHAVE_CONFIG_H -c -O -g -I.. filefuncs.c
-gcc -fPIC -shared -Wall -DHAVE_CONFIG_H -c -O -g -I.. fork.c
-gcc -fPIC -shared -Wall -DHAVE_CONFIG_H -c -O -g -I.. ordchr.c
-gcc -fPIC -shared -Wall -DHAVE_CONFIG_H -c -O -g -I.. arrayparm.c
-gcc -fPIC -shared -Wall -DHAVE_CONFIG_H -c -O -g -I.. readfile.c
-gcc -fPIC -shared -Wall -DHAVE_CONFIG_H -c -O -g -I.. testarg.c
-gcc -fPIC -shared -Wall -DHAVE_CONFIG_H -c -O -g -I.. rwarray.c
-ld -o dl.so -shared dl.o
-ld -o filefuncs.so -shared filefuncs.o
-ld -o fork.so -shared fork.o
-ld -o ordchr.so -shared ordchr.o
-ld -o arrayparm.so -shared arrayparm.o
-ld -o readfile.so -shared readfile.o
-ld -o testarg.so -shared testarg.o
-ld -o rwarray.so -shared rwarray.o
diff --git a/extension/testarg.awk b/extension/testarg.awk
deleted file mode 100644
index a91df1a..0000000
--- a/extension/testarg.awk
+++ /dev/null
@@ -1,7 +0,0 @@
-BEGIN {
-       extension("./testarg.so", "dlload")
-       check_arg(x, a);
-       check_arg(y, b, z);
-       check_arg(u, v, u=1);
-       check_arg(p, q, r, s);
-}
diff --git a/extension/testarg.c b/extension/testarg.c
deleted file mode 100644
index 32481b3..0000000
--- 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);
-}
diff --git a/extension/testarrayparm.awk b/extension/testarrayparm.awk
deleted file mode 100644
index 08178f3..0000000
--- a/extension/testarrayparm.awk
+++ /dev/null
@@ -1,10 +0,0 @@
-#! /bin/awk -f
-
-BEGIN {
-       extension("./arrayparm.so", "dlload")
-
-       mkarray(newvar, "hi", "hello")
-
-       for (i in newvar)
-               printf ("newvar[\"%s\"] = \"%s\"\n", i, newvar[i])
-}
diff --git a/extension/testff.awk b/extension/testff.awk
deleted file mode 100644
index 0a0a9b2..0000000
--- a/extension/testff.awk
+++ /dev/null
@@ -1,30 +0,0 @@
-BEGIN {
-       extension("./filefuncs.so", "dlload")
-
-#      printf "before: "
-#      fflush()
-#      system("pwd")
-#
-#      chdir("..")
-#
-#      printf "after: "
-#      fflush()
-#      system("pwd")
-
-       chdir(".")
-
-       data[1] = 1
-       print "Info for testff.awk"
-       ret = stat("testff.awk", data)
-       print "ret =", ret
-       for (i in data)
-               printf "data[\"%s\"] = %s\n", i, data[i]
-       print "testff.awk modified:", strftime("%m %d %y %H:%M:%S", 
data["mtime"])
-
-       print "\nInfo for JUNK"
-       ret = stat("JUNK", data)
-       print "ret =", ret
-       for (i in data)
-               printf "data[\"%s\"] = %s\n", i, data[i]
-       print "JUNK modified:", strftime("%m %d %y %H:%M:%S", data["mtime"])
-}
diff --git a/extension/testfork.awk b/extension/testfork.awk
deleted file mode 100644
index ca00dca..0000000
--- a/extension/testfork.awk
+++ /dev/null
@@ -1,20 +0,0 @@
-BEGIN {
-       extension("./fork.so", "dlload")
-
-       printf "before fork, pid = %d, ppid = %d\n", PROCINFO["pid"],
-                       PROCINFO["ppid"]
-
-       fflush()
-       ret = fork()
-       if (ret < 0)
-               printf("ret = %d, ERRNO = %s\n", ret, ERRNO)
-       else if (ret == 0)
-               printf "child, pid = %d, ppid = %d\n", PROCINFO["pid"],
-                       PROCINFO["ppid"]
-       else {
-               system("sleep 3")
-               printf "parent, ret = %d\n", ret
-               printf "parent, pid = %d, ppid = %d\n", PROCINFO["pid"],
-                       PROCINFO["ppid"]
-       }
-}
diff --git a/extension/testordchr.awk b/extension/testordchr.awk
deleted file mode 100644
index 64e53d1..0000000
--- a/extension/testordchr.awk
+++ /dev/null
@@ -1,6 +0,0 @@
-BEGIN {
-       extension("./ordchr.so", "dlload")
-
-       print "ord(\"a\") is", ord("a")
-       print "chr(65) is", chr(65)
-}

-----------------------------------------------------------------------

Summary of changes:
 extension/ChangeLog         |    6 +++
 extension/arrayparm.c       |   83 --------------------------------------
 extension/dl.c              |   92 -------------------------------------------
 extension/doit              |    1 -
 extension/foo.awk           |    9 ----
 extension/steps             |   23 -----------
 extension/testarg.awk       |    7 ---
 extension/testarg.c         |   55 -------------------------
 extension/testarrayparm.awk |   10 -----
 extension/testff.awk        |   30 --------------
 extension/testfork.awk      |   20 ---------
 extension/testordchr.awk    |    6 ---
 12 files changed, 6 insertions(+), 336 deletions(-)
 delete mode 100644 extension/arrayparm.c
 delete mode 100644 extension/dl.c
 delete mode 100755 extension/doit
 delete mode 100644 extension/foo.awk
 delete mode 100755 extension/steps
 delete mode 100644 extension/testarg.awk
 delete mode 100644 extension/testarg.c
 delete mode 100644 extension/testarrayparm.awk
 delete mode 100644 extension/testff.awk
 delete mode 100644 extension/testfork.awk
 delete mode 100644 extension/testordchr.awk


hooks/post-receive
-- 
gawk



reply via email to

[Prev in Thread] Current Thread [Next in Thread]