Bug fix: in function wo_write realloc is used only when memory is already
[egate.git] / www / search.egw
index d6d8717..588f13a 100644 (file)
@@ -1,6 +1,6 @@
 <html>
 {
-# $Id: search.egw,v 1.29 1996/01/12 13:39:22 adam Exp $
+# $Id: search.egw,v 1.30 1996/01/24 08:27:29 adam Exp $
 
 proc start-scan {scanNo cache dir initSet} {
     global sessionId
@@ -78,7 +78,7 @@ proc start-scan {scanNo cache dir initSet} {
 
     if {$hist($setNo,$scanNo,scanTerm) == ""} {
         button-new-query 0 $setNo
-        wabort
+        egw_abort
         return
     }
     if {$dir == "b"} {
@@ -149,10 +149,10 @@ proc start-scan {scanNo cache dir initSet} {
     foreach e {SERVER_NAME PATH_INFO SCRIPT_NAME} {
         html $e {: } $env($e) {<br>} \n
     }
-    html "form: " [wform] " <br>\n"
+    html "form: " [egw_form] " <br>\n"
     html "target: " $host " <br>\n"
     html "databases: " $hist($setNo,database) " <br>\n"
-    html "selected: " [wform base] " <br>\n"
+    html "selected: " [egw_form base] " <br>\n"
     html "setNo: " $setNo " <br>\n"
     html "nextSetNo: " $nextSetNo " <br>\n"    
 }
@@ -205,7 +205,7 @@ proc buttons {setNo setMax startPos after} {
 
     set setNo [lindex $sessionParms 0]
 
-    if {[wform] != ""} {
+    if {[egw_form] != ""} {
         set hist($nextSetNo,idAuthentication) $hist($setNo,idAuthentication)
         set hist($nextSetNo,host) $hist($setNo,host)
 
@@ -217,37 +217,37 @@ proc buttons {setNo setMax startPos after} {
         }
         set hist($setNo,scan) 0
 
-        set hist($setNo,form,menu1) [wform menu1]
-        set hist($setNo,form,menu2) [wform menu2]
-        set hist($setNo,form,menu3) [wform menu3]
+        set hist($setNo,form,menu1) [egw_form menu1]
+        set hist($setNo,form,menu2) [egw_form menu2]
+        set hist($setNo,form,menu3) [egw_form menu3]
 
-        set hist($setNo,form,entry1) [wform entry1]
-        set hist($setNo,form,entry2) [wform entry2]
-        set hist($setNo,form,entry3) [wform entry3]
+        set hist($setNo,form,entry1) [egw_form entry1]
+        set hist($setNo,form,entry2) [egw_form entry2]
+        set hist($setNo,form,entry3) [egw_form entry3]
 
-        set hist($setNo,form,logic1) [wform logic1]
-        set hist($setNo,form,logic2) [wform logic2]
+        set hist($setNo,form,logic1) [egw_form logic1]
+        set hist($setNo,form,logic2) [egw_form logic2]
         set hist($setNo,form,logic3) {}
         
         set host $hist($setNo,host)
         set databases [lindex $targets($host) 1]
 
-        set b [wform base]
-       if {[wform baseall] != ""} {
+        set b [egw_form base]
+       if {[egw_form baseall] != ""} {
            set hist($setNo,database) $databases
         } elseif {$b == ""} {
             set hist($setNo,database) $databases
         } else {
             set hist($setNo,database) $b
         }
-        set hist($setNo,maxPresent) [wform hits]
+        set hist($setNo,maxPresent) [egw_form hits]
         if {$hist($setNo,maxPresent) == ""} {
             set hist($setNo,maxPresent) 30
         }
         set i [lindex $sessionParms 1]
         if {$i == ""} {
             for {set j 1} {$j <= 3} {incr j} {
-                if {[wform scan$j] != ""} {
+                if {[egw_form scan$j] != ""} {
                     set i $j
                     break
                 }
@@ -261,7 +261,7 @@ proc buttons {setNo setMax startPos after} {
             set hist($setNo,scanAttr) [lindex $termPlusAttr 1]
             start-scan $scanNo 0 {} {}
             html "</body></html>\n"
-            wabort
+            egw_abort
             return
         }
         set query [build-query $hist($setNo,host) 3]
@@ -270,7 +270,7 @@ proc buttons {setNo setMax startPos after} {
             displayError "Empty query" \
                 "You must specify at least one search word"
             html "</body></html>\n"
-            wabort
+            egw_abort
         }
         set hist($setNo,query) $query
     } else {
@@ -279,7 +279,7 @@ proc buttons {setNo setMax startPos after} {
             set hist($setNo,$scanNo,scanTerm) {}
             start-scan $scanNo 0 {} {}
             html "</body></html>\n"
-            wabort
+            egw_abort
         }
         if {![info exists hist($setNo,scan)]} return
         if {$hist($setNo,scan) > 0} {
@@ -290,7 +290,7 @@ proc buttons {setNo setMax startPos after} {
             }
             start-scan $scanNo 1 $dir $setNo
             html "</body></html>\n"
-            wabort
+            egw_abort
         }
     }
     set host $hist($setNo,host)
@@ -313,7 +313,7 @@ proc buttons {setNo setMax startPos after} {
         } else {
             html "<h3> No hits</h3>\n"
         }
-        wflush
+        egw_flush
         html "<ul>\n"
         display-rec 1 $setOffset display-brief 0
         incr setOffset
@@ -339,7 +339,7 @@ proc buttons {setNo setMax startPos after} {
         } else {
             html "<h3> No hits</h3>\n"
         }
-        wflush
+        egw_flush
         html "<ul>\n"
     }
     if {$setMax > 0} {
@@ -359,10 +359,10 @@ proc buttons {setNo setMax startPos after} {
     foreach n [array names env] {
         html "env($n) = " $env($n) " <br>\n"
     }
-    html "form: " [wform] " <br>\n"
+    html "form: " [egw_form] " <br>\n"
     html "target: " $host " <br>\n"
     html "databases: " $hist($setNo,database) " <br>\n"
-    html "selected: " [wform base] " <br>\n"
+    html "selected: " [egw_form base] " <br>\n"
     html "query: --" $hist($setNo,query) "-- <br>"
     html "setNo: " $setNo " <br>\n"
     html "nextSetNo: " $nextSetNo " <br>\n"