Source-Changes archive

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

CVS commit: othersrc/external/historical/eawk



Module Name:    othersrc
Committed By:   agc
Date:           Fri May 31 05:56:38 UTC 2013

Modified Files:
        othersrc/external/historical/eawk: Makefile
        othersrc/external/historical/eawk/dist: Makefile awkgram.y awkre.h b.c
            eawk.h lex.c lib.c main.c parse.c proctab.c proto.h run.c tran.c
Added Files:
        othersrc/external/historical/eawk/bin: Makefile expected in1 m2
        othersrc/external/historical/eawk/dist: ext.c
        othersrc/external/historical/eawk/extend: Makefile
        othersrc/external/historical/eawk/extend/base64: Makefile b64.c b64.h
            base64.c shlib_version
        othersrc/external/historical/eawk/extend/c: Makefile c.c shlib_version
        othersrc/external/historical/eawk/extend/circa: Makefile circa.c
            shlib_version
        othersrc/external/historical/eawk/extend/db: Makefile db.c
            shlib_version
        othersrc/external/historical/eawk/extend/digest: Makefile crc32c.c
            crc32c.h digest.c shlib_version
        othersrc/external/historical/eawk/extend/dirent: Makefile dirent.c
            shlib_version
        othersrc/external/historical/eawk/extend/getopt2: Makefile getopt2.c
            shlib_version
        othersrc/external/historical/eawk/extend/hmac: Makefile hmac.c
            shlib_version
        othersrc/external/historical/eawk/extend/http: Makefile http.c
            shlib_version
        othersrc/external/historical/eawk/extend/mat: Makefile mat.c
            shlib_version
        othersrc/external/historical/eawk/extend/netdiff: Makefile netdiff.c
            shlib_version
        othersrc/external/historical/eawk/extend/netpgp: Makefile netpgp.c
            shlib_version
        othersrc/external/historical/eawk/extend/progress: Makefile progress.c
            shlib_version
        othersrc/external/historical/eawk/extend/rs: Makefile rs.c
            shlib_version
        othersrc/external/historical/eawk/extend/soundex: Makefile
            shlib_version soundex.c words
        othersrc/external/historical/eawk/extend/termcap: Makefile
            shlib_version termcap.c
        othersrc/external/historical/eawk/lib: Makefile shlib_version
        othersrc/external/historical/eawk/scripts: conn.sh conn2.sh n.sh
            progress.sh y.awk
Removed Files:
        othersrc/external/historical/eawk/dist: EAWK dl.sh dl2.sh dl3.sh dl4.sh
            dl5.sh dl6.sh dl7.sh dl8.sh dl9.sh dlA.sh dlB.sh dlC.sh
        othersrc/external/historical/eawk/eawk: Makefile expected
        othersrc/external/historical/eawk/libeawk: Makefile shlib_version

Log Message:
Re-do completely the way that external modules are loaded in eawk.
For now, use a

        use("digest")

style statement in the script to enable the bindings in a
libeawk-digest.so to be loaded via dlopen(3).

Also add readrec() and writerec() callbacks for use in embedded
programs, so that eawk can really be deeply embedded in other things,
and used as a command interpreter, etc.

Other headline changes include:
+ added gawk-style bit arithmetic ops
+ added gawk-style asort/asorti
+ added eawk_readrec() and eawk_writerec() callbacks for use
  in embedded operations
+ added extension use via use() command
+ added extensions for
        base64
        c
        circa
        db
        digests
        dirent
        getopt2
        hmac
        http
        mat
        netdiff
        netpgp
        progress
        rs
        soundex
        termcap

The upshot is that we can extend awk quite easily, as shown by this example
script:

% cat scripts/conn2.sh
#! /bin/sh

env LD_LIBRARY_PATH=lib:extend/c bin/eawk -v host=$1 '
BEGIN {
        use("c");
        if (host == "") print "phooey#0";
        addr["ai_family"] = PF_INET;
        if (getaddrinfo(host, "http", addr) != 0) print "phooey#1";
        sd = socket(PF_INET, SOCK_STREAM, 0);
        if (connect(sd, addr["ai_addr"], addr["ai_addrlen"]) != 0) print 
"phooey#2";
        s = sprintf("GET / HTTP/1.1\r\nHost: %s\r\nUser-Agent: 
eawk-2.1\r\n\r\n", host);
        write(sd, s, length(s));
        url = read(sd, 4096);
        print url;
        close(sd);
}'
% sh scripts/conn2.sh www.netbsd.org
HTTP/1.1 200 OK
Date: Fri, 31 May 2013 05:49:44 GMT
Server: Apache/2.2.24 (Unix)
Last-Modified: Sun, 19 May 2013 17:44:20 GMT
ETag: "83765-4fd9-4dd15c40bc500"
Accept-Ranges:  none
Content-Length: 20441
Content-Type: text/html; charset=ISO-8859-1

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
        "http://www.w3.org/TR/html4/loose.dtd";>

<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
    <!-- Copyright (c) 1994-2011
         The NetBSD Foundation, Inc.  ALL RIGHTS RESERVED. -->
    <link rev="made" href="mailto:www%NetBSD.org@localhost";>
    <link rel="shortcut icon" href="./favicon.ico" type="image/x-icon">
    <link rel="stylesheet" href="global.css" type="text/css">
    <link rel="alternate" type="application/rss+xml" title="NetBSD news"
          href="http://www.NetBSD.org/changes/rss-netbsd.xml";>
    <title>The NetBSD Project</title>
    <meta name="DESCRIPTION" content="PowerPC, Alpha, SPARC, MIPS, SH3, ARM, 
amd64, i386, m68k, VAX: Of course it runs NetBSD.">
    <meta name="KEYWORDS" content="NetBSD, BSD, 4.4BSD, UNIX, acorn26, acorn32, 
algor, algorithmics, alpha, amiga, amigappc, arc, arm26, arm32, atari, bebox, 
cats, cesfic, cobalt, evbarm, evbmips, evbppc, evbsh3, ews4800, hp300, hp700, 
hpcarm, hpcmips, hpcsh, hppa, i386, ibmnws, iyonix, luna68k, m68k, mac68k, 
macppc, mips, mmeye, mvme68k, mvmeppc, netwinder, news68k, newsmips, next68k, 
mipsco, ofppc, pica, pmax, pmppc, p
%


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.2 othersrc/external/historical/eawk/Makefile
cvs rdiff -u -r0 -r1.1 othersrc/external/historical/eawk/bin/Makefile \
    othersrc/external/historical/eawk/bin/expected \
    othersrc/external/historical/eawk/bin/in1 \
    othersrc/external/historical/eawk/bin/m2
cvs rdiff -u -r1.1.1.1 -r0 othersrc/external/historical/eawk/dist/EAWK \
    othersrc/external/historical/eawk/dist/dl.sh \
    othersrc/external/historical/eawk/dist/dl2.sh \
    othersrc/external/historical/eawk/dist/dl3.sh \
    othersrc/external/historical/eawk/dist/dl4.sh \
    othersrc/external/historical/eawk/dist/dl5.sh \
    othersrc/external/historical/eawk/dist/dl6.sh \
    othersrc/external/historical/eawk/dist/dl7.sh \
    othersrc/external/historical/eawk/dist/dl8.sh \
    othersrc/external/historical/eawk/dist/dl9.sh \
    othersrc/external/historical/eawk/dist/dlA.sh \
    othersrc/external/historical/eawk/dist/dlB.sh \
    othersrc/external/historical/eawk/dist/dlC.sh
cvs rdiff -u -r1.1.1.1 -r1.2 othersrc/external/historical/eawk/dist/Makefile \
    othersrc/external/historical/eawk/dist/awkre.h \
    othersrc/external/historical/eawk/dist/b.c \
    othersrc/external/historical/eawk/dist/eawk.h \
    othersrc/external/historical/eawk/dist/lib.c \
    othersrc/external/historical/eawk/dist/main.c \
    othersrc/external/historical/eawk/dist/parse.c \
    othersrc/external/historical/eawk/dist/tran.c
cvs rdiff -u -r1.2 -r1.3 othersrc/external/historical/eawk/dist/awkgram.y \
    othersrc/external/historical/eawk/dist/lex.c \
    othersrc/external/historical/eawk/dist/proctab.c \
    othersrc/external/historical/eawk/dist/proto.h
cvs rdiff -u -r0 -r1.1 othersrc/external/historical/eawk/dist/ext.c
cvs rdiff -u -r1.3 -r1.4 othersrc/external/historical/eawk/dist/run.c
cvs rdiff -u -r1.2 -r0 othersrc/external/historical/eawk/eawk/Makefile \
    othersrc/external/historical/eawk/eawk/expected
cvs rdiff -u -r0 -r1.1 othersrc/external/historical/eawk/extend/Makefile
cvs rdiff -u -r0 -r1.1 \
    othersrc/external/historical/eawk/extend/base64/Makefile \
    othersrc/external/historical/eawk/extend/base64/b64.c \
    othersrc/external/historical/eawk/extend/base64/b64.h \
    othersrc/external/historical/eawk/extend/base64/base64.c \
    othersrc/external/historical/eawk/extend/base64/shlib_version
cvs rdiff -u -r0 -r1.1 othersrc/external/historical/eawk/extend/c/Makefile \
    othersrc/external/historical/eawk/extend/c/c.c \
    othersrc/external/historical/eawk/extend/c/shlib_version
cvs rdiff -u -r0 -r1.1 \
    othersrc/external/historical/eawk/extend/circa/Makefile \
    othersrc/external/historical/eawk/extend/circa/circa.c \
    othersrc/external/historical/eawk/extend/circa/shlib_version
cvs rdiff -u -r0 -r1.1 othersrc/external/historical/eawk/extend/db/Makefile \
    othersrc/external/historical/eawk/extend/db/db.c \
    othersrc/external/historical/eawk/extend/db/shlib_version
cvs rdiff -u -r0 -r1.1 \
    othersrc/external/historical/eawk/extend/digest/Makefile \
    othersrc/external/historical/eawk/extend/digest/crc32c.c \
    othersrc/external/historical/eawk/extend/digest/crc32c.h \
    othersrc/external/historical/eawk/extend/digest/digest.c \
    othersrc/external/historical/eawk/extend/digest/shlib_version
cvs rdiff -u -r0 -r1.1 \
    othersrc/external/historical/eawk/extend/dirent/Makefile \
    othersrc/external/historical/eawk/extend/dirent/dirent.c \
    othersrc/external/historical/eawk/extend/dirent/shlib_version
cvs rdiff -u -r0 -r1.1 \
    othersrc/external/historical/eawk/extend/getopt2/Makefile \
    othersrc/external/historical/eawk/extend/getopt2/getopt2.c \
    othersrc/external/historical/eawk/extend/getopt2/shlib_version
cvs rdiff -u -r0 -r1.1 othersrc/external/historical/eawk/extend/hmac/Makefile \
    othersrc/external/historical/eawk/extend/hmac/hmac.c \
    othersrc/external/historical/eawk/extend/hmac/shlib_version
cvs rdiff -u -r0 -r1.1 othersrc/external/historical/eawk/extend/http/Makefile \
    othersrc/external/historical/eawk/extend/http/http.c \
    othersrc/external/historical/eawk/extend/http/shlib_version
cvs rdiff -u -r0 -r1.1 othersrc/external/historical/eawk/extend/mat/Makefile \
    othersrc/external/historical/eawk/extend/mat/mat.c \
    othersrc/external/historical/eawk/extend/mat/shlib_version
cvs rdiff -u -r0 -r1.1 \
    othersrc/external/historical/eawk/extend/netdiff/Makefile \
    othersrc/external/historical/eawk/extend/netdiff/netdiff.c \
    othersrc/external/historical/eawk/extend/netdiff/shlib_version
cvs rdiff -u -r0 -r1.1 \
    othersrc/external/historical/eawk/extend/netpgp/Makefile \
    othersrc/external/historical/eawk/extend/netpgp/netpgp.c \
    othersrc/external/historical/eawk/extend/netpgp/shlib_version
cvs rdiff -u -r0 -r1.1 \
    othersrc/external/historical/eawk/extend/progress/Makefile \
    othersrc/external/historical/eawk/extend/progress/progress.c \
    othersrc/external/historical/eawk/extend/progress/shlib_version
cvs rdiff -u -r0 -r1.1 othersrc/external/historical/eawk/extend/rs/Makefile \
    othersrc/external/historical/eawk/extend/rs/rs.c \
    othersrc/external/historical/eawk/extend/rs/shlib_version
cvs rdiff -u -r0 -r1.1 \
    othersrc/external/historical/eawk/extend/soundex/Makefile \
    othersrc/external/historical/eawk/extend/soundex/shlib_version \
    othersrc/external/historical/eawk/extend/soundex/soundex.c \
    othersrc/external/historical/eawk/extend/soundex/words
cvs rdiff -u -r0 -r1.1 \
    othersrc/external/historical/eawk/extend/termcap/Makefile \
    othersrc/external/historical/eawk/extend/termcap/shlib_version \
    othersrc/external/historical/eawk/extend/termcap/termcap.c
cvs rdiff -u -r0 -r1.1 othersrc/external/historical/eawk/lib/Makefile \
    othersrc/external/historical/eawk/lib/shlib_version
cvs rdiff -u -r1.1.1.1 -r0 othersrc/external/historical/eawk/libeawk/Makefile \
    othersrc/external/historical/eawk/libeawk/shlib_version
cvs rdiff -u -r0 -r1.1 othersrc/external/historical/eawk/scripts/conn.sh \
    othersrc/external/historical/eawk/scripts/conn2.sh \
    othersrc/external/historical/eawk/scripts/n.sh \
    othersrc/external/historical/eawk/scripts/progress.sh \
    othersrc/external/historical/eawk/scripts/y.awk

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.




Home | Main Index | Thread Index | Old Index