aboutsummaryrefslogtreecommitdiffstats
path: root/awklib
diff options
context:
space:
mode:
Diffstat (limited to 'awklib')
-rw-r--r--awklib/ChangeLog4
-rw-r--r--awklib/Makefile.in10
-rw-r--r--awklib/eg/lib/grcat.c2
-rw-r--r--awklib/eg/lib/zerofile.awk19
-rw-r--r--awklib/eg/network/coreserv.awk4
-rw-r--r--awklib/eg/network/eliza.awk4
-rw-r--r--awklib/eg/network/protbase.awk2
-rw-r--r--awklib/eg/network/remconf.awk2
-rw-r--r--awklib/eg/network/statist.awk4
-rw-r--r--awklib/eg/network/stoxpred.awk22
10 files changed, 48 insertions, 25 deletions
diff --git a/awklib/ChangeLog b/awklib/ChangeLog
index c0983b60..57eaf732 100644
--- a/awklib/ChangeLog
+++ b/awklib/ChangeLog
@@ -1,3 +1,7 @@
+Mon Jul 7 11:01:43 2003 Arnold D. Robbins <arnold@skeeve.com>
+
+ * Release 3.1.3: Release tar file made.
+
Wed Mar 19 14:10:31 2003 Arnold D. Robbins <arnold@skeeve.com>
This time for sure.
diff --git a/awklib/Makefile.in b/awklib/Makefile.in
index e4fed88a..9ae786a9 100644
--- a/awklib/Makefile.in
+++ b/awklib/Makefile.in
@@ -1,4 +1,4 @@
-# Makefile.in generated by automake 1.7.3 from Makefile.am.
+# Makefile.in generated by automake 1.7.5 from Makefile.am.
# @configure_input@
# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
@@ -178,6 +178,7 @@ AUXAWK = passwd.awk group.awk
nodist_grcat_SOURCES = grcat.c
nodist_pwcat_SOURCES = pwcat.c
subdir = awklib
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
@@ -213,7 +214,7 @@ all: all-am
.SUFFIXES:
.SUFFIXES: .c .o .obj
-$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
+$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.ac $(ACLOCAL_M4)
cd $(top_srcdir) && \
$(AUTOMAKE) --gnu awklib/Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@@ -278,7 +279,7 @@ distclean-depend:
.c.o:
@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \
@am__fastdepCC_TRUE@ -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<; \
-@am__fastdepCC_TRUE@ then mv "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \
@am__fastdepCC_TRUE@ else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \
@am__fastdepCC_TRUE@ fi
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@@ -289,7 +290,7 @@ distclean-depend:
.c.obj:
@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \
@am__fastdepCC_TRUE@ -c -o $@ `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'; fi`; \
-@am__fastdepCC_TRUE@ then mv "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \
@am__fastdepCC_TRUE@ else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \
@am__fastdepCC_TRUE@ fi
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@@ -389,7 +390,6 @@ all-am: Makefile $(PROGRAMS) $(SCRIPTS)
installdirs:
$(mkinstalldirs) $(DESTDIR)$(libexecdir) $(DESTDIR)$(bindir)
-
install: install-am
install-exec: install-exec-am
install-data: install-data-am
diff --git a/awklib/eg/lib/grcat.c b/awklib/eg/lib/grcat.c
index c022dc7e..83567142 100644
--- a/awklib/eg/lib/grcat.c
+++ b/awklib/eg/lib/grcat.c
@@ -12,7 +12,7 @@
#if HAVE_CONFIG_H
#include <config.h>
#endif
-
+
#if defined (STDC_HEADERS)
#include <stdlib.h>
#endif
diff --git a/awklib/eg/lib/zerofile.awk b/awklib/eg/lib/zerofile.awk
new file mode 100644
index 00000000..01926fdd
--- /dev/null
+++ b/awklib/eg/lib/zerofile.awk
@@ -0,0 +1,19 @@
+# zerofile.awk --- library file to process empty input files
+#
+# Arnold Robbins, arnold@gnu.org, Public Domain
+# June 2003
+
+BEGIN { Argind = 0 }
+
+ARGIND > Argind + 1 {
+ for (Argind++; Argind < ARGIND; Argind++)
+ zerofile(ARGV[Argind], Argind)
+}
+
+ARGIND != Argind { Argind = ARGIND }
+
+END {
+ if (ARGIND > Argind)
+ for (Argind++; Argind <= ARGIND; Argind++)
+ zerofile(ARGV[Argind], Argind)
+}
diff --git a/awklib/eg/network/coreserv.awk b/awklib/eg/network/coreserv.awk
index e9e61710..348568e0 100644
--- a/awklib/eg/network/coreserv.awk
+++ b/awklib/eg/network/coreserv.awk
@@ -46,7 +46,7 @@ BEGIN {
print "Content-length:", len |& HttpService
print ORS Prompt |& HttpService
# ignore all the header lines
- while ((HttpService |& getline) > 0)
+ while ((HttpService |& getline) > 0)
continue
# stop talking to this client
close(HttpService)
@@ -75,7 +75,7 @@ function CGI_setup( method, uri, version, i)
PARAM[i] = _CGI_decode(PARAM[i])
j = index(PARAM[i], "=")
GETARG[substr(PARAM[i], 1, j-1)] = \
- substr(PARAM[i], j+1)
+ substr(PARAM[i], j+1)
}
} else { # there is no "?", no need for splitting PARAMs
split(uri, MENU, "[/:]")
diff --git a/awklib/eg/network/eliza.awk b/awklib/eg/network/eliza.awk
index 2e022b41..75e353a7 100644
--- a/awklib/eg/network/eliza.awk
+++ b/awklib/eg/network/eliza.awk
@@ -72,7 +72,7 @@ function ElizaSays(YouSay) {
if (w == "-") { # no keyword, take old subject
w = wold
subj = subjold
- } else { # find subject
+ } else { # find subject
subj = substr(q, index(q, w) + length(w)+1)
wold = w
subjold = subj # remember keyword and subject
@@ -228,7 +228,7 @@ function SetUpEliza() {
r[117] = "WHAT'S ABOUT ME ?"
r[118] = "WHY DO YOU ALWAYS BRING UP MY NAME ?"
# table for looking up answers that
- # fit to a certain keyword
+ # fit to a certain keyword
k["CAN YOU"] = "1 2 3"
k["CAN I"] = "4 5"
k["YOU ARE"] =\
diff --git a/awklib/eg/network/protbase.awk b/awklib/eg/network/protbase.awk
index 16199e45..f4a911c9 100644
--- a/awklib/eg/network/protbase.awk
+++ b/awklib/eg/network/protbase.awk
@@ -4,7 +4,7 @@ END {
BLASTService = "/inet/tcp/0/www.ncbi.nlm.nih.gov/80"
printf "POST /cgi-bin/BLAST/nph-blast_report HTTP/1.0\n" |& BLASTService
printf "Content-Length: " length(request) "\n\n" |& BLASTService
- printf request |& BLASTService
+ printf request |& BLASTService
while ((BLASTService |& getline) > 0)
print $0
close(BLASTService)
diff --git a/awklib/eg/network/remconf.awk b/awklib/eg/network/remconf.awk
index f4f21e1a..ef922265 100644
--- a/awklib/eg/network/remconf.awk
+++ b/awklib/eg/network/remconf.awk
@@ -35,7 +35,7 @@ function HandleGET() {
config[GETARG["Param"]] = GETARG["Value"]
Document = (GETARG["Param"] " = " GETARG["Value"] ".")
} else {
- Document = "Parameter <b>" GETARG["Param"] "</b> is invalid."
+ Document = "Parameter <b>" GETARG["Param"] "</b> is invalid."
}
} else {
Document = "<FORM method=GET><h4>Change one parameter</h4>\
diff --git a/awklib/eg/network/statist.awk b/awklib/eg/network/statist.awk
index 8a583940..a4fc55cf 100644
--- a/awklib/eg/network/statist.awk
+++ b/awklib/eg/network/statist.awk
@@ -73,9 +73,9 @@ function HandleGET() {
<TD><input type=text name=v2 value=" v2 " size=8></TD>\
<TD>2. Count </TD>
<TD><input type=text name=n2 value=" n2 " size=8></TD>\
- </TR> <input type=submit value=\"Compute\">\
+ </TR> <input type=submit value=\"Compute\">\
</TABLE></FORM><BR>"
- } else if (MENU[2] ~ "Image") {
+ } else if (MENU[2] ~ "Image") {
Reason = "OK" ORS "Content-type: image/png"
#Reason = "OK" ORS "Content-type: application/x-postscript"
#Reason = "OK" ORS "Content-type: image/gif"
diff --git a/awklib/eg/network/stoxpred.awk b/awklib/eg/network/stoxpred.awk
index 5cdc2a8d..62744c14 100644
--- a/awklib/eg/network/stoxpred.awk
+++ b/awklib/eg/network/stoxpred.awk
@@ -38,15 +38,15 @@ function Prediction() {
for (stock = 1; stock <= StockCount; stock++) {
if (data[1, stock] > data[2, stock]) {
predict[stock] = "up"
- } else if (data[1, stock] < data[2, stock]) {
- predict[stock] = "down"
+ } else if (data[1, stock] < data[2, stock]) {
+ predict[stock] = "down"
} else {
predict[stock] = "neutral"
}
if ((data[1, stock] > data[2, stock]) && (data[2, stock] > data[3, stock]))
hot[stock] = 1
if ((data[1, stock] < data[2, stock]) && (data[2, stock] < data[3, stock]))
- avoid[stock] = 1
+ avoid[stock] = 1
}
# Do a plausibility check: how many predictions proved correct?
for (s = 1; s <= StockCount; s++) {
@@ -57,20 +57,20 @@ function Prediction() {
DownCount++
} else {
NeutralCount++
- }
+ }
if (((data[d, s] > data[d+1, s]) && (data[d+1, s] > data[d+2, s])) ||
((data[d, s] < data[d+1, s]) && (data[d+1, s] < data[d+2, s])) ||
((data[d, s] == data[d+1, s]) && (data[d+1, s] == data[d+2, s])))
CorrectCount++
- }
- }
+ }
+ }
}
function Report() {
# Generate report
report = "\nThis is your daily "
report = report "stock market report for "strftime("%A, %B %d, %Y")".\n"
report = report "Here are the predictions for today:\n\n"
- for (stock = 1; stock <= StockCount; stock++)
+ for (stock = 1; stock <= StockCount; stock++)
report = report "\t" name[stock] "\t" predict[stock] "\n"
for (stock in hot) {
if (HotCount++ == 0)
@@ -83,7 +83,7 @@ function Report() {
report = report "\nThe stock shares to avoid today are these:\n\n"
report = report "\t" name[stock] "\t\thttp://biz.yahoo.com/n/" \
tolower(substr(name[stock], 1, 1)) "/" tolower(name[stock]) ".html\n"
- }
+ }
report = report "\nThis sums up to " HotCount+0 " winners and " AvoidCount+0
report = report " losers. When using this kind\nof prediction scheme for"
report = report " the 12 months which lie behind us,\nwe get " UpCount
@@ -97,8 +97,8 @@ function Report() {
report = report "market, this report is, of course, complete nonsense.\n"
report = report "If you are stupid enough to believe these predictions\n"
report = report "you should visit a doctor who can treat your ailment."
-}
-function SendMail() {
+}
+function SendMail() {
# send report to customers
customer["uncle.scrooge@ducktown.gov"] = "Uncle Scrooge"
customer["more@utopia.org" ] = "Sir Thomas More"
@@ -113,4 +113,4 @@ function SendMail() {
print report "\n.\n" | MailPipe
close(MailPipe)
}
-}
+}