Sort of targets in multiple-targets selection.
authorAdam Dickmeiss <adam@indexdata.dk>
Mon, 19 Feb 1996 15:44:59 +0000 (15:44 +0000)
committerAdam Dickmeiss <adam@indexdata.dk>
Mon, 19 Feb 1996 15:44:59 +0000 (15:44 +0000)
www/Makefile
www/egw.res
www/mtargets.egw
www/wsh.c
www/ztargets.conf

index dc58610..f1b6fa9 100644 (file)
@@ -1,7 +1,7 @@
 # Makefile for www gateway utility
 # Europagate, 1995
 #
 # Makefile for www gateway utility
 # Europagate, 1995
 #
-# $Id: Makefile,v 1.29 1996/02/12 10:10:27 adam Exp $
+# $Id: Makefile,v 1.30 1996/02/19 15:44:59 adam Exp $
 #
 SHELL=/bin/sh
 #
 #
 SHELL=/bin/sh
 #
@@ -9,7 +9,7 @@ ZDEFS=
 #ZINC=-I../../yaz/include
 ZLIB=../../yaz/lib/libyaz.a
 #ZLIB=-lyaz
 #ZINC=-I../../yaz/include
 ZLIB=../../yaz/lib/libyaz.a
 #ZLIB=-lyaz
-MOSILIB=../../xtimosi/src/libmosi.a ../../yaz/lib/librfc.a
+#MOSILIB=../../xtimosi/src/libmosi.a ../../yaz/lib/librfc.a
 LIBIRTCL=../../ir-tcl/libirtcl.a $(ZLIB) $(MOSILIB)
 #NETLIB=-lnsl -lsocket
 #
 LIBIRTCL=../../ir-tcl/libirtcl.a $(ZLIB) $(MOSILIB)
 #NETLIB=-lnsl -lsocket
 #
index 6cbc358..e7e87f7 100644 (file)
@@ -1,6 +1,6 @@
 # WWW-Z39.50 Gateway configuration file
 #
 # WWW-Z39.50 Gateway configuration file
 #
-# $Id: egw.res,v 1.2 1996/02/12 13:39:40 adam Exp $
+# $Id: egw.res,v 1.3 1996/02/19 15:44:59 adam Exp $
 
 # FIFO file directory
 fifo.dir: /tmp/egw
 
 # FIFO file directory
 fifo.dir: /tmp/egw
@@ -9,5 +9,5 @@ fifo.dir: /tmp/egw
 timeout: 120
 
 # Log level
 timeout: 120
 
 # Log level
-log.level: default
+log.level: all
 
 
index 306fe16..1f81bfa 100644 (file)
@@ -1,6 +1,6 @@
 <html>
 {
 <html>
 {
-# $Id: mtargets.egw,v 1.14 1996/01/29 17:31:47 adam Exp $
+# $Id: mtargets.egw,v 1.15 1996/02/19 15:44:59 adam Exp $
     set setNo 1
     source ztargets.conf
     if {[info commands saveState] == ""} {
     set setNo 1
     source ztargets.conf
     if {[info commands saveState] == ""} {
     html {<form action="http:} $env(SCRIPT_NAME)
     html / $sessionId {/mquery.egw/} $setNo {" method=get><br>} \n
     html "<dl>\n"
     html {<form action="http:} $env(SCRIPT_NAME)
     html / $sessionId {/mquery.egw/} $setNo {" method=get><br>} \n
     html "<dl>\n"
-    foreach t [array names targets] {
+
+
+
+    proc targetsCmp {l r} {
+        global targets
+        return [string compare [string tolower [lindex $targets($l) 0]] \
+                               [string tolower [lindex $targets($r) 0]]]
+    }
+    set tt [array names targets]
+    set tn [lsort -command targetsCmp $tt]
+    foreach t $tn {
         html {<dt>} [ lindex $targets($t) 0]
         html {<dd>}
         set databases [lindex $targets($t) 1]
         html {<dt>} [ lindex $targets($t) 0]
         html {<dd>}
         set databases [lindex $targets($t) 1]
index 09e413d..55eb3d8 100644 (file)
--- a/www/wsh.c
+++ b/www/wsh.c
  * USE OR PERFORMANCE OF THIS SOFTWARE.
  *
  * $Log: wsh.c,v $
  * USE OR PERFORMANCE OF THIS SOFTWARE.
  *
  * $Log: wsh.c,v $
- * Revision 1.11  1996/02/12 10:10:32  adam
+ * Revision 1.12  1996/02/19 15:45:00  adam
+ * Sort of targets in multiple-targets selection.
+ *
+ * Revision 1.11  1996/02/12  10:10:32  adam
  * Resource/config system used by the gateway.
  *
  * Revision 1.10  1996/01/12  10:05:22  adam
  * Resource/config system used by the gateway.
  *
  * Revision 1.10  1996/01/12  10:05:22  adam
@@ -91,6 +94,9 @@
 #include <unistd.h>
 #include <ctype.h>
 
 #include <unistd.h>
 #include <ctype.h>
 
+#include <sys/resource.h>
+#include <sys/time.h>
+
 #include <gw-db.h>
 #include <gw-res.h>
 #include "whtml.h"
 #include <gw-db.h>
 #include <gw-res.h>
 #include "whtml.h"
@@ -107,6 +113,13 @@ int main (int argc, char **argv)
     W_Interp w_interp;
     GW_DB gw_db;
     GwRes shRes;
     W_Interp w_interp;
     GW_DB gw_db;
     GwRes shRes;
+#if 0
+    struct rlimit rlim;
+
+    rlim.rlim_cur = RLIM_INFINITY;
+    rlim.rlim_max = RLIM_INFINITY;
+    setrlimit (RLIMIT_CORE, &rlim);
+#endif
 
     gw_log_init (*argv);
     gw_log_file (GW_LOG_ALL, "egwsh_log");
 
     gw_log_init (*argv);
     gw_log_file (GW_LOG_ALL, "egwsh_log");
index c978605..6d8c2e1 100644 (file)
@@ -1,4 +1,4 @@
-# $Id: ztargets.conf,v 1.22 1996/02/12 13:39:41 adam Exp $
+# $Id: ztargets.conf,v 1.23 1996/02/19 15:45:00 adam Exp $
 #
 # This file contains the predefined targets in the WWW-Z59.50 gateway
 # Each target is an entry in associative array "targets". The
 #
 # This file contains the predefined targets in the WWW-Z59.50 gateway
 # Each target is an entry in associative array "targets". The
@@ -170,14 +170,6 @@ set targets(IBM2.LOC.GOV:2210.NAMES) [ list \
     1 \
 ]
 
     1 \
 ]
 
-set targets(localhost:210.Default) [list \
-    {Test} \
-    Default \
-    $commonFields \
-    {} \
-    {Server for testing purposes only.} \
-    0 \
-]
 
 set targets(199.92.147.99.UNICORN) [list \
     Baystate \
 
 set targets(199.92.147.99.UNICORN) [list \
     Baystate \
@@ -197,3 +189,39 @@ set targets(Tikal.dev.oclc.org.AGRICOLA) [list \
     1 \
 ]
 
     1 \
 ]
 
+set targets(localhost:8000.Default) [list \
+    {Test 8000} \
+    Default \
+    $commonFields \
+    {} \
+    {Server for testing purposes only.} \
+    0 \
+]
+
+set targets(localhost:8001.Default) [list \
+    {Test 8001} \
+    Default \
+    $commonFields \
+    {} \
+    {Server for testing purposes only.} \
+    0 \
+]
+
+set targets(localhost:8002.Default) [list \
+    {Test 8002} \
+    Default \
+    $commonFields \
+    {} \
+    {Server for testing purposes only.} \
+    0 \
+]
+
+set targets(localhost:8003.Default) [list \
+    {Test 8003} \
+    Default \
+    $commonFields \
+    {} \
+    {Server for testing purposes only.} \
+    0 \
+]
+