aboutsummaryrefslogtreecommitdiff
path: root/src/hyper/presea
diff options
context:
space:
mode:
authordos-reis <gdr@axiomatics.org>2008-03-07 15:19:01 +0000
committerdos-reis <gdr@axiomatics.org>2008-03-07 15:19:01 +0000
commit8531f4c74274b8aa99168d220738227557a9c418 (patch)
treec50b77870e432317be8f99c248e1339f74b51661 /src/hyper/presea
parent33949ff2e6e5b5abe8d22c5604f42a6c9371079a (diff)
downloadopen-axiom-8531f4c74274b8aa99168d220738227557a9c418.tar.gz
* hyper/: De-pamphletize.
Diffstat (limited to 'src/hyper/presea')
-rwxr-xr-xsrc/hyper/presea27
1 files changed, 27 insertions, 0 deletions
diff --git a/src/hyper/presea b/src/hyper/presea
new file mode 100755
index 00000000..b3b9485c
--- /dev/null
+++ b/src/hyper/presea
@@ -0,0 +1,27 @@
+#!/bin/awk -f
+BEGIN {n=0;m=0
+}
+
+{
+ a[n] = $0;
+ n=n+1;
+ j=split($0,b,"{");
+ m=m+substr(b[j],1,length(b[j])-1);
+}
+
+END {
+ if (case==1)
+ printf ("\\begin{page}{staticsearchpage}{No matches found}\n")
+ else if ( n==0 || m==0 )
+ printf ("\\begin{page}{staticsearchpage}{No matches found for {\\em %s}}\n",expr)
+ else
+ printf ("\\begin{page}{staticsearchpage}{%d matches found in %d pages for {\\em %s}}\n",m,n,expr);
+ printf ("Matches\\tab{8}in Page\n");
+ printf "\\beginscroll\n";
+ printf "\\beginmenu\n";
+ for(i=0;i<n;i++) printf ("%s\n",a[i]);
+ printf "\\endmenu\n";
+ printf "\\endscroll\n";
+ printf "\\end{page}\n";
+}
+