aboutsummaryrefslogtreecommitdiff
path: root/src/hyper/presea.in
diff options
context:
space:
mode:
authordos-reis <gdr@axiomatics.org>2008-10-27 02:31:37 +0000
committerdos-reis <gdr@axiomatics.org>2008-10-27 02:31:37 +0000
commit761c8889e9cc0d4e73f32f06290fe7d07d75d551 (patch)
tree301776cedd2d498cc4cea2306a2c555918869d50 /src/hyper/presea.in
parent8906ae4ab9656413fb58db32f2abee8fbf99365e (diff)
downloadopen-axiom-761c8889e9cc0d4e73f32f06290fe7d07d75d551.tar.gz
* configure.ac.pamphlet: Look for path to `awk'.
Instantiate src/hyper/presea.
Diffstat (limited to 'src/hyper/presea.in')
-rwxr-xr-xsrc/hyper/presea.in28
1 files changed, 28 insertions, 0 deletions
diff --git a/src/hyper/presea.in b/src/hyper/presea.in
new file mode 100755
index 00000000..c8ab71c1
--- /dev/null
+++ b/src/hyper/presea.in
@@ -0,0 +1,28 @@
+#!@HOST_AWK@ -f
+BEGIN {n=0;m=0
+}
+
+{
+ a[n] = $0;
+ n=n+1;
+ j=split($0,b,"{");
+ if ( j>= 2)
+ 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";
+}
+