From c38544a87dfb550dfe4731c450bbde093c095bde Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Mon, 19 Feb 1996 15:44:59 +0000 Subject: [PATCH] Sort of targets in multiple-targets selection. --- www/Makefile | 4 ++-- www/egw.res | 4 ++-- www/mtargets.egw | 14 ++++++++++++-- www/wsh.c | 15 ++++++++++++++- www/ztargets.conf | 46 +++++++++++++++++++++++++++++++++++++--------- 5 files changed, 67 insertions(+), 16 deletions(-) diff --git a/www/Makefile b/www/Makefile index dc58610..f1b6fa9 100644 --- a/www/Makefile +++ b/www/Makefile @@ -1,7 +1,7 @@ # 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 # @@ -9,7 +9,7 @@ ZDEFS= #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 # diff --git a/www/egw.res b/www/egw.res index 6cbc358..e7e87f7 100644 --- a/www/egw.res +++ b/www/egw.res @@ -1,6 +1,6 @@ # 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 @@ -9,5 +9,5 @@ fifo.dir: /tmp/egw timeout: 120 # Log level -log.level: default +log.level: all diff --git a/www/mtargets.egw b/www/mtargets.egw index 306fe16..1f81bfa 100644 --- a/www/mtargets.egw +++ b/www/mtargets.egw @@ -1,6 +1,6 @@ { -# $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] == ""} { @@ -39,7 +39,17 @@ html {

} \n html "
\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 {
} [ lindex $targets($t) 0] html {
} set databases [lindex $targets($t) 1] diff --git a/www/wsh.c b/www/wsh.c index 09e413d..55eb3d8 100644 --- a/www/wsh.c +++ b/www/wsh.c @@ -41,7 +41,10 @@ * 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 @@ -91,6 +94,9 @@ #include #include +#include +#include + #include #include #include "whtml.h" @@ -107,6 +113,13 @@ int main (int argc, char **argv) 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"); diff --git a/www/ztargets.conf b/www/ztargets.conf index c978605..6d8c2e1 100644 --- a/www/ztargets.conf +++ b/www/ztargets.conf @@ -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 @@ -170,14 +170,6 @@ set targets(IBM2.LOC.GOV:2210.NAMES) [ list \ 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 \ @@ -197,3 +189,39 @@ set targets(Tikal.dev.oclc.org.AGRICOLA) [list \ 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 \ +] + -- 1.7.10.4