aboutsummaryrefslogtreecommitdiff
path: root/src/hyper/presea.in
diff options
context:
space:
mode:
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";
+}
+